1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
.file "isOdd.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "true"
.LC1:
.string "false"
.LC2:
.string "Usage: '%s <number>'\n"
.section .text.startup,"ax",@progbits
.p2align 4,,15
.globl main
.type main, @function
main:
.LFB11:
.cfi_startproc
cmpl $2, %edi
pushq %rbx
.cfi_def_cfa_offset 16
.cfi_offset 3, -16
movl %edi, %ebx
je .L8
movq (%rsi), %rsi
movl $.LC2, %edi
xorl %eax, %eax
call printf
movl $1, %eax
popq %rbx
.cfi_remember_state
.cfi_def_cfa_offset 8
ret
.L8:
.cfi_restore_state
movq 8(%rsi), %rdi
xorl %eax, %eax
call atoi
cltd
movl $.LC0, %edi
idivl %ebx
movl $.LC1, %eax
testl %edx, %edx
cmove %rax, %rdi
call puts
xorl %eax, %eax
popq %rbx
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE11:
.size main, .-main
.text
.p2align 4,,15
.globl isOdd
.type isOdd, @function
isOdd:
.LFB12:
.cfi_startproc
movl %edi, %eax
shrl $31, %eax
addl %eax, %edi
andl $1, %edi
cmpl %eax, %edi
setne %al
ret
.cfi_endproc
.LFE12:
.size isOdd, .-isOdd
.ident "GCC: (GNU) 4.8.2 20131219 (prerelease)"
.section .note.GNU-stack,"",@progbits
|