mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-14 00:21:16 +00:00
443 lines
6.4 KiB
Text
Executable file
443 lines
6.4 KiB
Text
Executable file
.globl addpoint
|
|
.text
|
|
.text
|
|
.ent addpoint
|
|
addpoint:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-64($sp)
|
|
.frame $sp,64,$26,48
|
|
stq $17,24($sp)
|
|
stq $18,32($sp)
|
|
.prologue 1
|
|
ldl $27,-40+64($sp)
|
|
ldl $25,-32+64($sp)
|
|
addl $27,$25,$27
|
|
stl $27,-40+64($sp)
|
|
ldl $27,-36+64($sp)
|
|
ldl $25,-28+64($sp)
|
|
addl $27,$25,$27
|
|
stl $27,-36+64($sp)
|
|
lda $1,-40+64($sp)
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($16)
|
|
stl $2,4($16)
|
|
L.1:
|
|
lda $sp,64($sp)
|
|
ret
|
|
.end addpoint
|
|
.globl canonrect
|
|
.text
|
|
.ent canonrect
|
|
canonrect:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-112($sp)
|
|
.mask 0x4007800,-80
|
|
.frame $sp,112,$26,48
|
|
stq $11,0($sp)
|
|
stq $12,8($sp)
|
|
stq $13,16($sp)
|
|
stq $14,24($sp)
|
|
stq $26,32($sp)
|
|
stq $17,72($sp)
|
|
stq $18,80($sp)
|
|
.prologue 1
|
|
ldl $27,-40+112($sp)
|
|
ldl $25,-32+112($sp)
|
|
cmplt $27,$25,$23
|
|
beq $23,L.10
|
|
ldl $14,-40+112($sp)
|
|
br L.11
|
|
L.10:
|
|
ldl $14,-32+112($sp)
|
|
L.11:
|
|
stl $14,-72+112($sp)
|
|
ldl $27,-36+112($sp)
|
|
ldl $25,-28+112($sp)
|
|
cmplt $27,$25,$23
|
|
beq $23,L.20
|
|
ldl $13,-36+112($sp)
|
|
br L.21
|
|
L.20:
|
|
ldl $13,-28+112($sp)
|
|
L.21:
|
|
stl $13,-68+112($sp)
|
|
ldl $27,-40+112($sp)
|
|
ldl $25,-32+112($sp)
|
|
cmple $27,$25,$23
|
|
bne $23,L.26
|
|
ldl $12,-40+112($sp)
|
|
br L.27
|
|
L.26:
|
|
ldl $12,-32+112($sp)
|
|
L.27:
|
|
stl $12,-64+112($sp)
|
|
ldl $27,-36+112($sp)
|
|
ldl $25,-28+112($sp)
|
|
cmple $27,$25,$23
|
|
bne $23,L.37
|
|
ldl $11,-36+112($sp)
|
|
br L.38
|
|
L.37:
|
|
ldl $11,-28+112($sp)
|
|
L.38:
|
|
stl $11,-60+112($sp)
|
|
lda $1,-72+112($sp)
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($16)
|
|
stl $2,4($16)
|
|
ldl $4,8($1)
|
|
ldl $2,12($1)
|
|
stl $4,8($16)
|
|
stl $2,12($16)
|
|
L.5:
|
|
ldq $11,0($sp)
|
|
ldq $12,8($sp)
|
|
ldq $13,16($sp)
|
|
ldq $14,24($sp)
|
|
ldq $26,32($sp)
|
|
lda $sp,112($sp)
|
|
ret
|
|
.end canonrect
|
|
.globl makepoint
|
|
.text
|
|
.ent makepoint
|
|
makepoint:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-64($sp)
|
|
.frame $sp,64,$26,48
|
|
.prologue 1
|
|
stl $17,-64+64($sp)
|
|
stl $18,-60+64($sp)
|
|
lda $1,-64+64($sp)
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($16)
|
|
stl $2,4($16)
|
|
L.39:
|
|
lda $sp,64($sp)
|
|
ret
|
|
.end makepoint
|
|
.globl makerect
|
|
.text
|
|
.ent makerect
|
|
makerect:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-80($sp)
|
|
.mask 0x4000000,-80
|
|
.frame $sp,80,$26,48
|
|
stq $26,0($sp)
|
|
stq $16,32($sp)
|
|
stq $17,40($sp)
|
|
stq $18,48($sp)
|
|
.prologue 1
|
|
lda $27,-72+80($sp)
|
|
lda $1,-40+80($sp)
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($27)
|
|
stl $2,4($27)
|
|
lda $27,-64+80($sp)
|
|
lda $1,-32+80($sp)
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($27)
|
|
stl $2,4($27)
|
|
ldq $16,-48+80($sp)
|
|
lda $1,-72+80($sp)
|
|
uldq $17,0($1)
|
|
uldq $18,8($1)
|
|
jsr $26,canonrect
|
|
ldgp $gp,0($26)
|
|
L.42:
|
|
ldq $26,0($sp)
|
|
lda $sp,80($sp)
|
|
ret
|
|
.end makerect
|
|
.globl ptinrect
|
|
.text
|
|
.ent ptinrect
|
|
ptinrect:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-80($sp)
|
|
.mask 0x4004000,-72
|
|
.frame $sp,80,$26,48
|
|
stq $14,0($sp)
|
|
stq $26,8($sp)
|
|
stq $16,32($sp)
|
|
stq $17,40($sp)
|
|
stq $18,48($sp)
|
|
.prologue 1
|
|
ldl $27,-48+80($sp)
|
|
ldl $25,-40+80($sp)
|
|
cmplt $27,$25,$23
|
|
bne $23,L.53
|
|
ldl $25,-32+80($sp)
|
|
cmplt $27,$25,$23
|
|
beq $23,L.53
|
|
ldl $27,-44+80($sp)
|
|
ldl $25,-36+80($sp)
|
|
cmplt $27,$25,$23
|
|
bne $23,L.53
|
|
ldl $27,-44+80($sp)
|
|
ldl $25,-28+80($sp)
|
|
cmplt $27,$25,$23
|
|
beq $23,L.53
|
|
lda $14,1
|
|
br L.54
|
|
L.53:
|
|
mov $31,$14
|
|
L.54:
|
|
mov $14,$0
|
|
L.45:
|
|
ldq $14,0($sp)
|
|
ldq $26,8($sp)
|
|
lda $sp,80($sp)
|
|
ret
|
|
.end ptinrect
|
|
.sdata
|
|
.globl y
|
|
.align 0
|
|
y:
|
|
.byte 97
|
|
.byte 98
|
|
.byte 0
|
|
.globl odd
|
|
.text
|
|
.text
|
|
.ent odd
|
|
odd:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-80($sp)
|
|
.mask 0x4000000,-80
|
|
.frame $sp,80,$26,48
|
|
stq $26,0($sp)
|
|
stq $16,32($sp)
|
|
.prologue 1
|
|
lda $27,-59+80($sp)
|
|
lda $1,-48+80($sp)
|
|
ldb $4,0($1)
|
|
ldb $2,1($1)
|
|
stb $4,0($27)
|
|
stb $2,1($27)
|
|
ldb $4,2($1)
|
|
stb $4,2($27)
|
|
lda $16,L.56
|
|
lda $17,-59+80($sp)
|
|
jsr $26,printf
|
|
ldgp $gp,0($26)
|
|
mov $31,$0
|
|
L.55:
|
|
ldq $26,0($sp)
|
|
lda $sp,80($sp)
|
|
ret
|
|
.end odd
|
|
.rdata
|
|
.align 2
|
|
L.58:
|
|
.long 0x0
|
|
.long 0x0
|
|
.align 2
|
|
L.59:
|
|
.long 0x140
|
|
.long 0x140
|
|
.align 2
|
|
L.60:
|
|
.long 0xffffffff
|
|
.long 0xffffffff
|
|
.long 0x1
|
|
.long 0x1
|
|
.long 0x14
|
|
.long 0x12c
|
|
.long 0x1f4
|
|
.long 0x190
|
|
.globl main
|
|
.text
|
|
.text
|
|
.ent main
|
|
main:
|
|
ldgp $gp,0($27)
|
|
lda $sp,-176($sp)
|
|
.mask 0x4004000,-168
|
|
.frame $sp,176,$26,48
|
|
stq $14,0($sp)
|
|
stq $26,8($sp)
|
|
.prologue 1
|
|
lda $27,-120+176($sp)
|
|
lda $1,L.58
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($27)
|
|
stl $2,4($27)
|
|
lda $27,-128+176($sp)
|
|
lda $1,L.59
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($27)
|
|
stl $2,4($27)
|
|
lda $27,-88+176($sp)
|
|
lda $1,L.60
|
|
addq $1,32,$1
|
|
addq $27,32,$3
|
|
L.76:
|
|
addq $1,-8,$1
|
|
addq $3,-8,$3
|
|
ldl $4,0($1)
|
|
ldl $2,4($1)
|
|
stl $4,0($3)
|
|
stl $2,4($3)
|
|
cmpult $27,$3,$23
|
|
bne $23,L.76
|
|
lda $16,-136+176($sp)
|
|
lda $27,-10
|
|
mov $27,$17
|
|
mov $27,$18
|
|
jsr $26,makepoint
|
|
ldgp $gp,0($26)
|
|
lda $16,-144+176($sp)
|
|
lda $1,-128+176($sp)
|
|
uldq $17,0($1)
|
|
lda $1,-136+176($sp)
|
|
uldq $18,0($1)
|
|
jsr $26,addpoint
|
|
ldgp $gp,0($26)
|
|
lda $16,-152+176($sp)
|
|
lda $27,10
|
|
mov $27,$17
|
|
mov $27,$18
|
|
jsr $26,makepoint
|
|
ldgp $gp,0($26)
|
|
lda $16,-160+176($sp)
|
|
lda $1,-120+176($sp)
|
|
uldq $17,0($1)
|
|
lda $1,-152+176($sp)
|
|
uldq $18,0($1)
|
|
jsr $26,addpoint
|
|
ldgp $gp,0($26)
|
|
lda $16,-104+176($sp)
|
|
lda $1,-144+176($sp)
|
|
uldq $17,0($1)
|
|
lda $1,-160+176($sp)
|
|
uldq $18,0($1)
|
|
jsr $26,makerect
|
|
ldgp $gp,0($26)
|
|
mov $31,$14
|
|
br L.64
|
|
L.61:
|
|
lda $16,-112+176($sp)
|
|
sll $14,8*(8-4),$27
|
|
sra $27,8*(8-4),$27
|
|
sll $27,3,$27
|
|
lda $25,-88+176($sp)
|
|
addq $27,$25,$25
|
|
ldl $17,($25)
|
|
lda $25,-84+176($sp)
|
|
addq $27,$25,$27
|
|
ldl $18,($27)
|
|
jsr $26,makepoint
|
|
ldgp $gp,0($26)
|
|
lda $16,L.65
|
|
sll $14,8*(8-4),$27
|
|
sra $27,8*(8-4),$27
|
|
sll $27,3,$27
|
|
lda $25,-88+176($sp)
|
|
addq $27,$25,$27
|
|
ldl $17,($27)
|
|
ldl $18,-108+176($sp)
|
|
jsr $26,printf
|
|
ldgp $gp,0($26)
|
|
lda $1,-112+176($sp)
|
|
uldq $16,0($1)
|
|
lda $1,-104+176($sp)
|
|
uldq $17,0($1)
|
|
uldq $18,8($1)
|
|
jsr $26,ptinrect
|
|
ldgp $gp,0($26)
|
|
cmpeq $0,$31,$23
|
|
beq $23,L.68
|
|
lda $16,L.70
|
|
jsr $26,printf
|
|
ldgp $gp,0($26)
|
|
L.68:
|
|
lda $16,L.71
|
|
ldl $17,-104+176($sp)
|
|
ldl $18,-100+176($sp)
|
|
ldl $19,-96+176($sp)
|
|
ldl $20,-92+176($sp)
|
|
jsr $26,printf
|
|
ldgp $gp,0($26)
|
|
L.62:
|
|
lda $14,1($14)
|
|
L.64:
|
|
mov $14,$27
|
|
lda $25,4
|
|
cmpult $27,$25,$23
|
|
bne $23,L.61
|
|
lda $1,y
|
|
uldq $16,0($1)
|
|
jsr $26,odd
|
|
ldgp $gp,0($26)
|
|
mov $31,$16
|
|
jsr $26,exit
|
|
ldgp $gp,0($26)
|
|
mov $31,$0
|
|
L.57:
|
|
ldq $14,0($sp)
|
|
ldq $26,8($sp)
|
|
lda $sp,176($sp)
|
|
ret
|
|
.end main
|
|
.rdata
|
|
.align 0
|
|
L.71:
|
|
.byte 119
|
|
.byte 105
|
|
.byte 116
|
|
.byte 104
|
|
.byte 105
|
|
.byte 110
|
|
.byte 32
|
|
.byte 91
|
|
.byte 37
|
|
.byte 100
|
|
.byte 44
|
|
.byte 37
|
|
.byte 100
|
|
.byte 59
|
|
.byte 32
|
|
.byte 37
|
|
.byte 100
|
|
.byte 44
|
|
.byte 37
|
|
.byte 100
|
|
.byte 93
|
|
.byte 10
|
|
.byte 0
|
|
.align 0
|
|
L.70:
|
|
.byte 110
|
|
.byte 111
|
|
.byte 116
|
|
.byte 32
|
|
.byte 0
|
|
.align 0
|
|
L.65:
|
|
.byte 40
|
|
.byte 37
|
|
.byte 100
|
|
.byte 44
|
|
.byte 37
|
|
.byte 100
|
|
.byte 41
|
|
.byte 32
|
|
.byte 105
|
|
.byte 115
|
|
.byte 32
|
|
.byte 0
|
|
.align 0
|
|
L.56:
|
|
.byte 37
|
|
.byte 115
|
|
.byte 10
|
|
.byte 0
|