mirror of
https://github.com/UberGames/ioef.git
synced 2024-12-01 00:21:19 +00:00
162 lines
1.8 KiB
Text
162 lines
1.8 KiB
Text
|
.globl main
|
||
|
.text
|
||
|
.align 16
|
||
|
.type main,@function
|
||
|
main:
|
||
|
pushl %ebp
|
||
|
pushl %ebx
|
||
|
pushl %esi
|
||
|
pushl %edi
|
||
|
movl %esp,%ebp
|
||
|
subl $24,%esp
|
||
|
cmpl $1,20(%ebp)
|
||
|
jg .LC2
|
||
|
flds .LC4
|
||
|
fstps -16(%ebp)
|
||
|
jmp .LC3
|
||
|
.LC2:
|
||
|
movl 24(%ebp),%edi
|
||
|
pushl 4(%edi)
|
||
|
call atof
|
||
|
addl $4,%esp
|
||
|
fstps -20(%ebp)
|
||
|
flds -20(%ebp)
|
||
|
fdivs .LC5
|
||
|
fstps -16(%ebp)
|
||
|
.LC3:
|
||
|
movl $0,-4(%ebp)
|
||
|
.LC6:
|
||
|
movl -4(%ebp),%edi
|
||
|
leal 1(%edi),%esi
|
||
|
movl %esi,-4(%ebp)
|
||
|
flds .LC4
|
||
|
fstps f(,%edi,4)
|
||
|
.LC7:
|
||
|
cmpl $127,-4(%ebp)
|
||
|
jle .LC6
|
||
|
movl $0,-8(%ebp)
|
||
|
jmp .LC11
|
||
|
.LC10:
|
||
|
movl -12(%ebp),%edi
|
||
|
leal f(,%edi,4),%edi
|
||
|
flds (,%edi)
|
||
|
fadds .LC13
|
||
|
fstps (,%edi)
|
||
|
incl -8(%ebp)
|
||
|
.LC11:
|
||
|
call getchar
|
||
|
movl %eax,-12(%ebp)
|
||
|
cmpl $-1,%eax
|
||
|
jne .LC10
|
||
|
pushl $.LC14
|
||
|
call printf
|
||
|
addl $4,%esp
|
||
|
movl $0,-4(%ebp)
|
||
|
.LC15:
|
||
|
movl -4(%ebp),%edi
|
||
|
flds f(,%edi,4)
|
||
|
fstps -24(%ebp)
|
||
|
flds .LC4
|
||
|
fcomps -24(%ebp)
|
||
|
fstsw %ax
|
||
|
sahf
|
||
|
je .LC19
|
||
|
flds -24(%ebp)
|
||
|
fildl -8(%ebp)
|
||
|
fdivp %st(1),%st
|
||
|
flds -16(%ebp)
|
||
|
fcompp
|
||
|
fstsw %ax
|
||
|
sahf
|
||
|
ja .LC19
|
||
|
cmpl $32,-4(%ebp)
|
||
|
jg .LC21
|
||
|
pushl -4(%ebp)
|
||
|
pushl $.LC23
|
||
|
call printf
|
||
|
addl $8,%esp
|
||
|
jmp .LC22
|
||
|
.LC21:
|
||
|
pushl -4(%ebp)
|
||
|
pushl $.LC24
|
||
|
call printf
|
||
|
addl $8,%esp
|
||
|
.LC22:
|
||
|
flds .LC5
|
||
|
movl -4(%ebp),%edi
|
||
|
fmuls f(,%edi,4)
|
||
|
fildl -8(%ebp)
|
||
|
fdivp %st(1),%st
|
||
|
subl $8,%esp
|
||
|
fstpl (%esp)
|
||
|
pushl $.LC25
|
||
|
call printf
|
||
|
addl $12,%esp
|
||
|
.LC19:
|
||
|
.LC16:
|
||
|
incl -4(%ebp)
|
||
|
cmpl $127,-4(%ebp)
|
||
|
jle .LC15
|
||
|
movl $0,%eax
|
||
|
.LC1:
|
||
|
movl %ebp,%esp
|
||
|
popl %edi
|
||
|
popl %esi
|
||
|
popl %ebx
|
||
|
popl %ebp
|
||
|
ret
|
||
|
.Lf26:
|
||
|
.size main,.Lf26-main
|
||
|
.bss
|
||
|
.globl f
|
||
|
.align 4
|
||
|
.type f,@object
|
||
|
.size f,512
|
||
|
.comm f,512
|
||
|
.data
|
||
|
.align 1
|
||
|
.LC25:
|
||
|
.byte 9
|
||
|
.byte 37
|
||
|
.byte 46
|
||
|
.byte 49
|
||
|
.byte 102
|
||
|
.byte 10
|
||
|
.byte 0
|
||
|
.align 1
|
||
|
.LC24:
|
||
|
.byte 37
|
||
|
.byte 99
|
||
|
.byte 0
|
||
|
.align 1
|
||
|
.LC23:
|
||
|
.byte 37
|
||
|
.byte 48
|
||
|
.byte 51
|
||
|
.byte 111
|
||
|
.byte 0
|
||
|
.align 1
|
||
|
.LC14:
|
||
|
.byte 99
|
||
|
.byte 104
|
||
|
.byte 97
|
||
|
.byte 114
|
||
|
.byte 9
|
||
|
.byte 102
|
||
|
.byte 114
|
||
|
.byte 101
|
||
|
.byte 113
|
||
|
.byte 10
|
||
|
.byte 0
|
||
|
.align 4
|
||
|
.LC13:
|
||
|
.long 1065353216
|
||
|
.align 4
|
||
|
.LC5:
|
||
|
.long 1120403456
|
||
|
.align 4
|
||
|
.LC4:
|
||
|
.long 0
|
||
|
.text
|
||
|
.ident "LCC: 4.1"
|