app_disnasm.txt
hackfeed_mdpl-4th-sem-labs/lab_09/src/app_disnasm.txt

app.exe:     file format elf64-x86-64


Disassembly of section .init: # Startup section

0000000000001000 <_init>:
    1000:	f3 0f 1e fa          	endbr64 
    1004:	48 83 ec 08          	sub    $0x8,%rsp
    1008:	48 8b 05 d9 2f 00 00 	mov    0x2fd9(%rip),%rax        # 3fe8 <__gmon_start__>
    100f:	48 85 c0             	test   %rax,%rax
    1012:	74 02                	je     1016 <_init+0x16>
    1014:	ff d0                	callq  *%rax
    1016:	48 83 c4 08          	add    $0x8,%rsp
    101a:	c3                   	retq   

Disassembly of section .plt: # Procedure Linkage Table

0000000000001020 <.plt>:
    1020:	ff 35 e2 2f 00 00    	pushq  0x2fe2(%rip)        # 4008 <_GLOBAL_OFFSET_TABLE_+0x8>
    1026:	ff 25 e4 2f 00 00    	jmpq   *0x2fe4(%rip)        # 4010 <_GLOBAL_OFFSET_TABLE_+0x10>
    102c:	0f 1f 40 00          	nopl   0x0(%rax)

0000000000001030 <__stack_chk_fail@plt>:
    1030:	ff 25 e2 2f 00 00    	jmpq   *0x2fe2(%rip)        # 4018 <__stack_chk_fail@GLIBC_2.4>
    1036:	68 00 00 00 00       	pushq  $0x0
    103b:	e9 e0 ff ff ff       	jmpq   1020 <.plt>

0000000000001040 <printf@plt>:
    1040:	ff 25 da 2f 00 00    	jmpq   *0x2fda(%rip)        # 4020 <printf@GLIBC_2.2.5>
    1046:	68 01 00 00 00       	pushq  $0x1
    104b:	e9 d0 ff ff ff       	jmpq   1020 <.plt>

0000000000001050 <__isoc99_scanf@plt>:
    1050:	ff 25 d2 2f 00 00    	jmpq   *0x2fd2(%rip)        # 4028 <__isoc99_scanf@GLIBC_2.7>
    1056:	68 02 00 00 00       	pushq  $0x2
    105b:	e9 c0 ff ff ff       	jmpq   1020 <.plt>

Disassembly of section .text: # Main section

0000000000001060 <_start>:
    1060:	f3 0f 1e fa          	endbr64 
    1064:	31 ed                	xor    %ebp,%ebp
    1066:	49 89 d1             	mov    %rdx,%r9
    1069:	5e                   	pop    %rsi
    106a:	48 89 e2             	mov    %rsp,%rdx
    106d:	48 83 e4 f0          	and    $0xfffffffffffffff0,%rsp
    1071:	50                   	push   %rax
    1072:	54                   	push   %rsp
    1073:	4c 8d 05 96 02 00 00 	lea    0x296(%rip),%r8        # 1310 <__libc_csu_fini>
    107a:	48 8d 0d 1f 02 00 00 	lea    0x21f(%rip),%rcx        # 12a0 <__libc_csu_init>
    1081:	48 8d 3d 46 01 00 00 	lea    0x146(%rip),%rdi        # 11ce <main>
    1088:	ff 15 52 2f 00 00    	callq  *0x2f52(%rip)        # 3fe0 <__libc_start_main@GLIBC_2.2.5>
    108e:	f4                   	hlt    
    108f:	90                   	nop

0000000000001090 <deregister_tm_clones>:
    1090:	48 8d 3d a9 2f 00 00 	lea    0x2fa9(%rip),%rdi        # 4040 <__TMC_END__>
    1097:	48 8d 05 a2 2f 00 00 	lea    0x2fa2(%rip),%rax        # 4040 <__TMC_END__>
    109e:	48 39 f8             	cmp    %rdi,%rax
    10a1:	74 15                	je     10b8 <deregister_tm_clones+0x28>
    10a3:	48 8b 05 2e 2f 00 00 	mov    0x2f2e(%rip),%rax        # 3fd8 <_ITM_deregisterTMCloneTable>
    10aa:	48 85 c0             	test   %rax,%rax
    10ad:	74 09                	je     10b8 <deregister_tm_clones+0x28>
    10af:	ff e0                	jmpq   *%rax
    10b1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
    10b8:	c3                   	retq   
    10b9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

00000000000010c0 <register_tm_clones>:
    10c0:	48 8d 3d 79 2f 00 00 	lea    0x2f79(%rip),%rdi        # 4040 <__TMC_END__>
    10c7:	48 8d 35 72 2f 00 00 	lea    0x2f72(%rip),%rsi        # 4040 <__TMC_END__>
    10ce:	48 29 fe             	sub    %rdi,%rsi
    10d1:	48 89 f0             	mov    %rsi,%rax
    10d4:	48 c1 ee 3f          	shr    $0x3f,%rsi
    10d8:	48 c1 f8 03          	sar    $0x3,%rax
    10dc:	48 01 c6             	add    %rax,%rsi
    10df:	48 d1 fe             	sar    %rsi
    10e2:	74 14                	je     10f8 <register_tm_clones+0x38>
    10e4:	48 8b 05 05 2f 00 00 	mov    0x2f05(%rip),%rax        # 3ff0 <_ITM_registerTMCloneTable>
    10eb:	48 85 c0             	test   %rax,%rax
    10ee:	74 08                	je     10f8 <register_tm_clones+0x38>
    10f0:	ff e0                	jmpq   *%rax
    10f2:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
    10f8:	c3                   	retq   
    10f9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

0000000000001100 <__do_global_dtors_aux>:
    1100:	f3 0f 1e fa          	endbr64 
    1104:	80 3d 35 2f 00 00 00 	cmpb   $0x0,0x2f35(%rip)        # 4040 <__TMC_END__>
    110b:	75 33                	jne    1140 <__do_global_dtors_aux+0x40>
    110d:	55                   	push   %rbp
    110e:	48 83 3d e2 2e 00 00 	cmpq   $0x0,0x2ee2(%rip)        # 3ff8 <__cxa_finalize@GLIBC_2.2.5>
    1115:	00 
    1116:	48 89 e5             	mov    %rsp,%rbp
    1119:	74 0d                	je     1128 <__do_global_dtors_aux+0x28>
    111b:	48 8b 3d 16 2f 00 00 	mov    0x2f16(%rip),%rdi        # 4038 <__dso_handle>
    1122:	ff 15 d0 2e 00 00    	callq  *0x2ed0(%rip)        # 3ff8 <__cxa_finalize@GLIBC_2.2.5>
    1128:	e8 63 ff ff ff       	callq  1090 <deregister_tm_clones>
    112d:	c6 05 0c 2f 00 00 01 	movb   $0x1,0x2f0c(%rip)        # 4040 <__TMC_END__>
    1134:	5d                   	pop    %rbp
    1135:	c3                   	retq   
    1136:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    113d:	00 00 00 
    1140:	c3                   	retq   
    1141:	66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
    1148:	00 00 00 00 
    114c:	0f 1f 40 00          	nopl   0x0(%rax)

0000000000001150 <frame_dummy>:
    1150:	f3 0f 1e fa          	endbr64 
    1154:	e9 67 ff ff ff       	jmpq   10c0 <register_tm_clones>

0000000000001159 <getcyph>:
    1159:	55                   	push   %rbp                # Save register
    115a:	48 89 e5             	mov    %rsp,%rbp           # Use register in the code
    115d:	89 7d ec             	mov    %edi,-0x14(%rbp)    # arg1
    1160:	89 75 e8             	mov    %esi,-0x18(%rbp)    # arg2
    1163:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%rbp)     # a = 0
    116a:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)     # b = 0
    1171:	eb 1a                	jmp    118d <getcyph+0x34> # Jump to *
    1173:	8b 45 ec             	mov    -0x14(%rbp),%eax    # eax = arg1
    1176:	99                   	cltd                       # Convert double
    1177:	f7 7d e8             	idivl  -0x18(%rbp)         # (int) eax /= arg2
    117a:	89 d0                	mov    %edx,%eax           # Mod
    117c:	01 45 f4             	add    %eax,-0xc(%rbp)     # a += mod
    117f:	8b 45 ec             	mov    -0x14(%rbp),%eax    # eax = arg1
    1182:	99                   	cltd                       # Conver to double
    1183:	f7 7d e8             	idivl  -0x18(%rbp)         # arg1 /= arg2
    1186:	89 45 ec             	mov    %eax,-0x14(%rbp)    # arg1 = eax
    1189:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)     # b += 1
    118d:	83 7d ec 00          	cmpl   $0x0,-0x14(%rbp)    # * arg1 == 0?
    1191:	7f e0                	jg     1173 <getcyph+0x1a> # if arg1 > 0 jump to 1171
    1193:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)     # c = 0
    119a:	eb 0d                	jmp    11a9 <getcyph+0x50> # Jump to **
    119c:	8b 45 e8             	mov    -0x18(%rbp),%eax    # eax = arg2
    119f:	83 e8 01             	sub    $0x1,%eax           # eax -= 1
    11a2:	01 45 f4             	add    %eax,-0xc(%rbp)     # a += eax
    11a5:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)     # c += 1
    11a9:	8b 45 fc             	mov    -0x4(%rbp),%eax     # ** eax = c
    11ac:	3b 45 f8             	cmp    -0x8(%rbp),%eax     # b == c?
    11af:	7c eb                	jl     119c <getcyph+0x43> # is b < c jump to 119c
    11b1:	8b 45 f4             	mov    -0xc(%rbp),%eax     # return a
    11b4:	5d                   	pop    %rbp                # Pop saved registers
    11b5:	c3                   	retq                       # End of function

00000000000011b6 <cmpnum>:
    11b6:	55                   	push   %rbp                # Save register
    11b7:	48 89 e5             	mov    %rsp,%rbp           # Use register in the code
    11ba:	89 7d fc             	mov    %edi,-0x4(%rbp)     # arg1
    11bd:	89 75 f8             	mov    %esi,-0x8(%rbp)     # arg2
    11c0:	8b 45 fc             	mov    -0x4(%rbp),%eax     # eax = arg1
    11c3:	3b 45 f8             	cmp    -0x8(%rbp),%eax     # Compare arg1 with arg2
    11c6:	0f 94 c0             	sete   %al                 # Set AL to result of cmp (1 or 0)
    11c9:	0f b6 c0             	movzbl %al,%eax            # eax = al
    11cc:	5d                   	pop    %rbp                # Pop saved register
    11cd:	c3                   	retq                       # End of function

00000000000011ce <main>:
    11ce:	55                   	push   %rbp
    11cf:	48 89 e5             	mov    %rsp,%rbp
    11d2:	48 83 ec 20          	sub    $0x20,%rsp
    11d6:	64 48 8b 04 25 28 00 	mov    %fs:0x28,%rax
    11dd:	00 00 
    11df:	48 89 45 f8          	mov    %rax,-0x8(%rbp)
    11e3:	31 c0                	xor    %eax,%eax
    11e5:	48 8d 3d 1c 0e 00 00 	lea    0xe1c(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    11ec:	b8 00 00 00 00       	mov    $0x0,%eax
    11f1:	e8 4a fe ff ff       	callq  1040 <printf@plt>
    11f6:	48 8d 45 f0          	lea    -0x10(%rbp),%rax    # arg2
    11fa:	48 89 c6             	mov    %rax,%rsi           # arg2 address
    11fd:	48 8d 3d 1d 0e 00 00 	lea    0xe1d(%rip),%rdi        # 2021 <_IO_stdin_used+0x21>
    1204:	b8 00 00 00 00       	mov    $0x0,%eax
    1209:	e8 42 fe ff ff       	callq  1050 <__isoc99_scanf@plt>
    120e:	48 8d 3d 0f 0e 00 00 	lea    0xe0f(%rip),%rdi        # 2024 <_IO_stdin_used+0x24>
    1215:	b8 00 00 00 00       	mov    $0x0,%eax
    121a:	e8 21 fe ff ff       	callq  1040 <printf@plt>
    121f:	48 8d 45 ec          	lea    -0x14(%rbp),%rax    # arg1
    1223:	48 89 c6             	mov    %rax,%rsi           # arg1 address
    1226:	48 8d 3d f4 0d 00 00 	lea    0xdf4(%rip),%rdi        # 2021 <_IO_stdin_used+0x21>
    122d:	b8 00 00 00 00       	mov    $0x0,%eax
    1232:	e8 19 fe ff ff       	callq  1050 <__isoc99_scanf@plt>
    1237:	8b 55 f0             	mov    -0x10(%rbp),%edx    # arg2
    123a:	8b 45 ec             	mov    -0x14(%rbp),%eax    # arg1
    123d:	89 d6                	mov    %edx,%esi
    123f:	89 c7                	mov    %eax,%edi
    1241:	e8 13 ff ff ff       	callq  1159 <getcyph>
    1246:	89 45 f4             	mov    %eax,-0xc(%rbp)     # tmp = res of getcyph
    1249:	8b 45 f4             	mov    -0xc(%rbp),%eax     # eax = tmp
    124c:	be 58 00 00 00       	mov    $0x58,%esi          # arg2 = 88
    1251:	89 c7                	mov    %eax,%edi           # arg1 = tmp
    1253:	e8 5e ff ff ff       	callq  11b6 <cmpnum>
    1258:	85 c0                	test   %eax,%eax
    125a:	75 13                	jne    126f <main+0xa1>
    125c:	48 8d 3d dd 0d 00 00 	lea    0xddd(%rip),%rdi        # 2040 <_IO_stdin_used+0x40>
    1263:	b8 00 00 00 00       	mov    $0x0,%eax
    1268:	e8 d3 fd ff ff       	callq  1040 <printf@plt>
    126d:	eb 11                	jmp    1280 <main+0xb2>
    126f:	48 8d 3d e9 0d 00 00 	lea    0xde9(%rip),%rdi        # 205f <_IO_stdin_used+0x5f>
    1276:	b8 00 00 00 00       	mov    $0x0,%eax
    127b:	e8 c0 fd ff ff       	callq  1040 <printf@plt>
    1280:	b8 00 00 00 00       	mov    $0x0,%eax
    1285:	48 8b 4d f8          	mov    -0x8(%rbp),%rcx
    1289:	64 48 2b 0c 25 28 00 	sub    %fs:0x28,%rcx
    1290:	00 00 
    1292:	74 05                	je     1299 <main+0xcb>
    1294:	e8 97 fd ff ff       	callq  1030 <__stack_chk_fail@plt>
    1299:	c9                   	leaveq 
    129a:	c3                   	retq   
    129b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

00000000000012a0 <__libc_csu_init>:
    12a0:	f3 0f 1e fa          	endbr64 
    12a4:	41 57                	push   %r15
    12a6:	4c 8d 3d 3b 2b 00 00 	lea    0x2b3b(%rip),%r15        # 3de8 <__frame_dummy_init_array_entry>
    12ad:	41 56                	push   %r14
    12af:	49 89 d6             	mov    %rdx,%r14
    12b2:	41 55                	push   %r13
    12b4:	49 89 f5             	mov    %rsi,%r13
    12b7:	41 54                	push   %r12
    12b9:	41 89 fc             	mov    %edi,%r12d
    12bc:	55                   	push   %rbp
    12bd:	48 8d 2d 2c 2b 00 00 	lea    0x2b2c(%rip),%rbp        # 3df0 <__do_global_dtors_aux_fini_array_entry>
    12c4:	53                   	push   %rbx
    12c5:	4c 29 fd             	sub    %r15,%rbp
    12c8:	48 83 ec 08          	sub    $0x8,%rsp
    12cc:	e8 2f fd ff ff       	callq  1000 <_init>
    12d1:	48 c1 fd 03          	sar    $0x3,%rbp
    12d5:	74 1f                	je     12f6 <__libc_csu_init+0x56>
    12d7:	31 db                	xor    %ebx,%ebx
    12d9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
    12e0:	4c 89 f2             	mov    %r14,%rdx
    12e3:	4c 89 ee             	mov    %r13,%rsi
    12e6:	44 89 e7             	mov    %r12d,%edi
    12e9:	41 ff 14 df          	callq  *(%r15,%rbx,8)
    12ed:	48 83 c3 01          	add    $0x1,%rbx
    12f1:	48 39 dd             	cmp    %rbx,%rbp
    12f4:	75 ea                	jne    12e0 <__libc_csu_init+0x40>
    12f6:	48 83 c4 08          	add    $0x8,%rsp
    12fa:	5b                   	pop    %rbx
    12fb:	5d                   	pop    %rbp
    12fc:	41 5c                	pop    %r12
    12fe:	41 5d                	pop    %r13
    1300:	41 5e                	pop    %r14
    1302:	41 5f                	pop    %r15
    1304:	c3                   	retq   
    1305:	66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
    130c:	00 00 00 00 

0000000000001310 <__libc_csu_fini>:
    1310:	f3 0f 1e fa          	endbr64 
    1314:	c3                   	retq   

Disassembly of section .fini:

0000000000001318 <_fini>:
    1318:	f3 0f 1e fa          	endbr64 
    131c:	48 83 ec 08          	sub    $0x8,%rsp
    1320:	48 83 c4 08          	add    $0x8,%rsp
    1324:	c3                   	retq   
