mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-27 22:42:09 +00:00
477 lines
5.8 KiB
Text
Executable file
477 lines
5.8 KiB
Text
Executable file
.globl addpoint
|
|
.text
|
|
.align 16
|
|
.type addpoint,@function
|
|
addpoint:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
movl 32(%ebp),%edi
|
|
addl %edi,24(%ebp)
|
|
movl 36(%ebp),%edi
|
|
addl %edi,28(%ebp)
|
|
movl 20(%ebp),%edi
|
|
leal 24(%ebp),%esi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
.LC1:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf5:
|
|
.size addpoint,.Lf5-addpoint
|
|
.globl canonrect
|
|
.align 16
|
|
.type canonrect,@function
|
|
canonrect:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
subl $32,%esp
|
|
movl 32(%ebp),%edi
|
|
cmpl %edi,24(%ebp)
|
|
jge .LC11
|
|
movl 24(%ebp),%edi
|
|
movl %edi,-20(%ebp)
|
|
jmp .LC12
|
|
.LC11:
|
|
movl 32(%ebp),%edi
|
|
movl %edi,-20(%ebp)
|
|
.LC12:
|
|
movl -20(%ebp),%edi
|
|
movl %edi,-16(%ebp)
|
|
movl 36(%ebp),%edi
|
|
cmpl %edi,28(%ebp)
|
|
jge .LC21
|
|
movl 28(%ebp),%edi
|
|
movl %edi,-24(%ebp)
|
|
jmp .LC22
|
|
.LC21:
|
|
movl 36(%ebp),%edi
|
|
movl %edi,-24(%ebp)
|
|
.LC22:
|
|
movl -24(%ebp),%edi
|
|
movl %edi,-12(%ebp)
|
|
movl 32(%ebp),%edi
|
|
cmpl %edi,24(%ebp)
|
|
jle .LC27
|
|
movl 24(%ebp),%edi
|
|
movl %edi,-28(%ebp)
|
|
jmp .LC28
|
|
.LC27:
|
|
movl 32(%ebp),%edi
|
|
movl %edi,-28(%ebp)
|
|
.LC28:
|
|
movl -28(%ebp),%edi
|
|
movl %edi,-8(%ebp)
|
|
movl 36(%ebp),%edi
|
|
cmpl %edi,28(%ebp)
|
|
jle .LC38
|
|
movl 28(%ebp),%edi
|
|
movl %edi,-32(%ebp)
|
|
jmp .LC39
|
|
.LC38:
|
|
movl 36(%ebp),%edi
|
|
movl %edi,-32(%ebp)
|
|
.LC39:
|
|
movl -32(%ebp),%edi
|
|
movl %edi,-4(%ebp)
|
|
movl 20(%ebp),%edi
|
|
leal -16(%ebp),%esi
|
|
movl $16,%ecx
|
|
rep
|
|
movsb
|
|
.LC6:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf40:
|
|
.size canonrect,.Lf40-canonrect
|
|
.globl makepoint
|
|
.align 16
|
|
.type makepoint,@function
|
|
makepoint:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
subl $8,%esp
|
|
movl 24(%ebp),%edi
|
|
movl %edi,-8(%ebp)
|
|
movl 28(%ebp),%edi
|
|
movl %edi,-4(%ebp)
|
|
movl 20(%ebp),%edi
|
|
leal -8(%ebp),%esi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
.LC41:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf44:
|
|
.size makepoint,.Lf44-makepoint
|
|
.globl makerect
|
|
.align 16
|
|
.type makerect,@function
|
|
makerect:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
subl $16,%esp
|
|
leal -16(%ebp),%edi
|
|
leal 24(%ebp),%esi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -8(%ebp),%edi
|
|
leal 32(%ebp),%esi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -16(%ebp),%esi
|
|
subl $16,%esp
|
|
movl %esp,%edi
|
|
movl $16,%ecx
|
|
rep
|
|
movsb
|
|
pushl 20(%ebp)
|
|
call canonrect
|
|
addl $20,%esp
|
|
.LC45:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf48:
|
|
.size makerect,.Lf48-makerect
|
|
.globl ptinrect
|
|
.align 16
|
|
.type ptinrect,@function
|
|
ptinrect:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
subl $4,%esp
|
|
movl 20(%ebp),%edi
|
|
cmpl 28(%ebp),%edi
|
|
jl .LC57
|
|
cmpl 36(%ebp),%edi
|
|
jge .LC57
|
|
movl 32(%ebp),%edi
|
|
cmpl %edi,24(%ebp)
|
|
jl .LC57
|
|
movl 40(%ebp),%edi
|
|
cmpl %edi,24(%ebp)
|
|
jge .LC57
|
|
movl $1,-4(%ebp)
|
|
jmp .LC58
|
|
.LC57:
|
|
movl $0,-4(%ebp)
|
|
.LC58:
|
|
movl -4(%ebp),%eax
|
|
.LC49:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf59:
|
|
.size ptinrect,.Lf59-ptinrect
|
|
.data
|
|
.globl y
|
|
.align 4
|
|
.type y,@object
|
|
.size y,4
|
|
y:
|
|
.byte 97
|
|
.byte 98
|
|
.byte 0
|
|
.space 1
|
|
.globl odd
|
|
.text
|
|
.align 16
|
|
.type odd,@function
|
|
odd:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
subl $4,%esp
|
|
leal -4(%ebp),%edi
|
|
leal 20(%ebp),%esi
|
|
movl $4,%ecx
|
|
rep
|
|
movsb
|
|
leal -4(%ebp),%edi
|
|
pushl %edi
|
|
pushl $.LC61
|
|
call printf
|
|
addl $8,%esp
|
|
movl $0,%eax
|
|
.LC60:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf62:
|
|
.size odd,.Lf62-odd
|
|
.data
|
|
.align 4
|
|
.LC64:
|
|
.long 0
|
|
.long 0
|
|
.align 4
|
|
.LC65:
|
|
.long 320
|
|
.long 320
|
|
.align 4
|
|
.LC66:
|
|
.long -1
|
|
.long -1
|
|
.long 1
|
|
.long 1
|
|
.long 20
|
|
.long 300
|
|
.long 500
|
|
.long 400
|
|
.globl main
|
|
.text
|
|
.align 16
|
|
.type main,@function
|
|
main:
|
|
pushl %ebp
|
|
pushl %ebx
|
|
pushl %esi
|
|
pushl %edi
|
|
movl %esp,%ebp
|
|
subl $108,%esp
|
|
leal -68(%ebp),%edi
|
|
leal .LC64,%esi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -76(%ebp),%edi
|
|
leal .LC65,%esi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -36(%ebp),%edi
|
|
leal .LC66,%esi
|
|
movl $32,%ecx
|
|
rep
|
|
movsb
|
|
pushl $-10
|
|
pushl $-10
|
|
leal -84(%ebp),%edi
|
|
pushl %edi
|
|
call makepoint
|
|
addl $12,%esp
|
|
leal -84(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -76(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -92(%ebp),%edi
|
|
pushl %edi
|
|
call addpoint
|
|
addl $20,%esp
|
|
pushl $10
|
|
pushl $10
|
|
leal -100(%ebp),%edi
|
|
pushl %edi
|
|
call makepoint
|
|
addl $12,%esp
|
|
leal -100(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -68(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -108(%ebp),%edi
|
|
pushl %edi
|
|
call addpoint
|
|
addl $20,%esp
|
|
leal -108(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -92(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
leal -52(%ebp),%edi
|
|
pushl %edi
|
|
call makerect
|
|
addl $20,%esp
|
|
movl $0,-4(%ebp)
|
|
jmp .LC70
|
|
.LC67:
|
|
movl -4(%ebp),%edi
|
|
leal (,%edi,8),%edi
|
|
leal -32(%ebp),%esi
|
|
pushl (%esi,%edi)
|
|
leal -36(%ebp),%esi
|
|
pushl (%esi,%edi)
|
|
leal -60(%ebp),%edi
|
|
pushl %edi
|
|
call makepoint
|
|
addl $12,%esp
|
|
pushl -56(%ebp)
|
|
movl -4(%ebp),%edi
|
|
leal -36(%ebp),%esi
|
|
pushl (%esi,%edi,8)
|
|
pushl $.LC71
|
|
call printf
|
|
addl $12,%esp
|
|
leal -52(%ebp),%esi
|
|
subl $16,%esp
|
|
movl %esp,%edi
|
|
movl $16,%ecx
|
|
rep
|
|
movsb
|
|
leal -60(%ebp),%esi
|
|
subl $8,%esp
|
|
movl %esp,%edi
|
|
movl $8,%ecx
|
|
rep
|
|
movsb
|
|
call ptinrect
|
|
addl $24,%esp
|
|
cmpl $0,%eax
|
|
jne .LC74
|
|
pushl $.LC76
|
|
call printf
|
|
addl $4,%esp
|
|
.LC74:
|
|
pushl -40(%ebp)
|
|
pushl -44(%ebp)
|
|
pushl -48(%ebp)
|
|
pushl -52(%ebp)
|
|
pushl $.LC77
|
|
call printf
|
|
addl $20,%esp
|
|
.LC68:
|
|
incl -4(%ebp)
|
|
.LC70:
|
|
movl -4(%ebp),%edi
|
|
cmpl $4,%edi
|
|
jb .LC67
|
|
leal y,%esi
|
|
subl $4,%esp
|
|
movl %esp,%edi
|
|
movl $4,%ecx
|
|
rep
|
|
movsb
|
|
call odd
|
|
addl $4,%esp
|
|
pushl $0
|
|
call exit
|
|
addl $4,%esp
|
|
movl $0,%eax
|
|
.LC63:
|
|
movl %ebp,%esp
|
|
popl %edi
|
|
popl %esi
|
|
popl %ebx
|
|
popl %ebp
|
|
ret
|
|
.Lf82:
|
|
.size main,.Lf82-main
|
|
.data
|
|
.align 1
|
|
.LC77:
|
|
.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 1
|
|
.LC76:
|
|
.byte 110
|
|
.byte 111
|
|
.byte 116
|
|
.byte 32
|
|
.byte 0
|
|
.align 1
|
|
.LC71:
|
|
.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 1
|
|
.LC61:
|
|
.byte 37
|
|
.byte 115
|
|
.byte 10
|
|
.byte 0
|
|
.text
|
|
.ident "LCC: 4.1"
|