letzer commit vor der Prüfung ?

This commit is contained in:
Johannes Theiner 2018-06-19 12:59:42 +02:00
parent 126a5d45c1
commit 41cc53f8a1
30 changed files with 45 additions and 1947 deletions

4
.gitignore vendored
View File

@ -1,2 +1,6 @@
cmake-build-debug cmake-build-debug
.idea .idea
*.[oa]
*~
*.out
*.save

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,250 +0,0 @@
a.out: Dateiformat elf64-x86-64
Disassembly of section .init:
0000000000400378 <_init>:
400378: 48 83 ec 08 sub $0x8,%rsp
40037c: 48 8b 05 75 0c 20 00 mov 0x200c75(%rip),%rax # 600ff8 <__gmon_start__>
400383: 48 85 c0 test %rax,%rax
400386: 74 02 je 40038a <_init+0x12>
400388: ff d0 callq *%rax
40038a: e8 61 00 00 00 callq 4003f0 <__do_global_ctors_aux>
40038f: 48 83 c4 08 add $0x8,%rsp
400393: c3 retq
Disassembly of section .plt:
00000000004003a0 <.plt>:
4003a0: ff 35 62 0c 20 00 pushq 0x200c62(%rip) # 601008 <_GLOBAL_OFFSET_TABLE_+0x8>
4003a6: ff 25 64 0c 20 00 jmpq *0x200c64(%rip) # 601010 <_GLOBAL_OFFSET_TABLE_+0x10>
4003ac: 0f 1f 40 00 nopl 0x0(%rax)
00000000004003b0 <printf@plt>:
4003b0: ff 25 62 0c 20 00 jmpq *0x200c62(%rip) # 601018 <printf@GLIBC_2.2.5>
4003b6: 68 00 00 00 00 pushq $0x0
4003bb: e9 e0 ff ff ff jmpq 4003a0 <.plt>
Disassembly of section .text:
00000000004003c0 <_start>:
4003c0: 31 ed xor %ebp,%ebp
4003c2: 49 89 d1 mov %rdx,%r9
4003c5: 5e pop %rsi
4003c6: 48 89 e2 mov %rsp,%rdx
4003c9: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
4003cd: 50 push %rax
4003ce: 54 push %rsp
4003cf: 49 c7 c0 00 06 40 00 mov $0x400600,%r8
4003d6: 48 c7 c1 90 05 40 00 mov $0x400590,%rcx
4003dd: 48 c7 c7 28 05 40 00 mov $0x400528,%rdi
4003e4: ff 15 06 0c 20 00 callq *0x200c06(%rip) # 600ff0 <__libc_start_main@GLIBC_2.2.5>
4003ea: f4 hlt
4003eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
00000000004003f0 <__do_global_ctors_aux>:
4003f0: 8b 05 36 0c 20 00 mov 0x200c36(%rip),%eax # 60102c <initialized.1836>
4003f6: 85 c0 test %eax,%eax
4003f8: 74 06 je 400400 <__do_global_ctors_aux+0x10>
4003fa: f3 c3 repz retq
4003fc: 0f 1f 40 00 nopl 0x0(%rax)
400400: 55 push %rbp
400401: 53 push %rbx
400402: 48 83 ec 08 sub $0x8,%rsp
400406: 48 8b 05 33 0a 20 00 mov 0x200a33(%rip),%rax # 600e40 <__CTOR_LIST__>
40040d: c7 05 15 0c 20 00 01 movl $0x1,0x200c15(%rip) # 60102c <initialized.1836>
400414: 00 00 00
400417: 48 83 f8 ff cmp $0xffffffffffffffff,%rax
40041b: 48 89 c1 mov %rax,%rcx
40041e: 74 38 je 400458 <__do_global_ctors_aux+0x68>
400420: 48 8d 15 19 0a 20 00 lea 0x200a19(%rip),%rdx # 600e40 <__CTOR_LIST__>
400427: 48 85 c0 test %rax,%rax
40042a: 48 8d 58 ff lea -0x1(%rax),%rbx
40042e: 48 8d 14 c2 lea (%rdx,%rax,8),%rdx
400432: 74 1a je 40044e <__do_global_ctors_aux+0x5e>
400434: 48 89 d8 mov %rbx,%rax
400437: 48 f7 d8 neg %rax
40043a: 48 8d 2c c2 lea (%rdx,%rax,8),%rbp
40043e: 66 90 xchg %ax,%ax
400440: ff 54 dd 00 callq *0x0(%rbp,%rbx,8)
400444: 48 83 eb 01 sub $0x1,%rbx
400448: 48 83 fb ff cmp $0xffffffffffffffff,%rbx
40044c: 75 f2 jne 400440 <__do_global_ctors_aux+0x50>
40044e: 48 83 c4 08 add $0x8,%rsp
400452: 5b pop %rbx
400453: 5d pop %rbp
400454: c3 retq
400455: 0f 1f 00 nopl (%rax)
400458: 48 83 3d e8 09 20 00 cmpq $0x0,0x2009e8(%rip) # 600e48 <__CTOR_LIST__+0x8>
40045f: 00
400460: 74 ec je 40044e <__do_global_ctors_aux+0x5e>
400462: b8 01 00 00 00 mov $0x1,%eax
400467: eb 0a jmp 400473 <__do_global_ctors_aux+0x83>
400469: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
400470: 48 89 d0 mov %rdx,%rax
400473: 48 85 c9 test %rcx,%rcx
400476: 48 8d 50 01 lea 0x1(%rax),%rdx
40047a: 75 f4 jne 400470 <__do_global_ctors_aux+0x80>
40047c: eb a2 jmp 400420 <__do_global_ctors_aux+0x30>
40047e: 66 90 xchg %ax,%ax
0000000000400480 <__do_global_dtors_aux>:
400480: 8b 05 a2 0b 20 00 mov 0x200ba2(%rip),%eax # 601028 <_edata>
400486: 85 c0 test %eax,%eax
400488: 75 46 jne 4004d0 <__do_global_dtors_aux+0x50>
40048a: 48 8b 05 c7 09 20 00 mov 0x2009c7(%rip),%rax # 600e58 <__DTOR_LIST__+0x8>
400491: 48 85 c0 test %rax,%rax
400494: 74 2a je 4004c0 <__do_global_dtors_aux+0x40>
400496: 53 push %rbx
400497: 48 8d 1d ba 09 20 00 lea 0x2009ba(%rip),%rbx # 600e58 <__DTOR_LIST__+0x8>
40049e: 66 90 xchg %ax,%ax
4004a0: 48 83 c3 08 add $0x8,%rbx
4004a4: ff d0 callq *%rax
4004a6: 48 8b 03 mov (%rbx),%rax
4004a9: 48 85 c0 test %rax,%rax
4004ac: 75 f2 jne 4004a0 <__do_global_dtors_aux+0x20>
4004ae: c7 05 70 0b 20 00 01 movl $0x1,0x200b70(%rip) # 601028 <_edata>
4004b5: 00 00 00
4004b8: 5b pop %rbx
4004b9: c3 retq
4004ba: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004c0: c7 05 5e 0b 20 00 01 movl $0x1,0x200b5e(%rip) # 601028 <_edata>
4004c7: 00 00 00
4004ca: c3 retq
4004cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4004d0: f3 c3 repz retq
4004d2: 0f 1f 40 00 nopl 0x0(%rax)
4004d6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
4004dd: 00 00 00
00000000004004e0 <__call___do_global_ctors_aux>:
4004e0: 48 83 ec 08 sub $0x8,%rsp
4004e4: 48 83 c4 08 add $0x8,%rsp
4004e8: c3 retq
4004e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
00000000004004f0 <__call___do_global_dtors_aux>:
4004f0: 48 83 ec 08 sub $0x8,%rsp
4004f4: 48 83 c4 08 add $0x8,%rsp
4004f8: c3 retq
4004f9: 0f 1f 00 nopl (%rax)
00000000004004fc <sum>:
int global = 8150;
int sum(int,int);
4004fc: 55 push %rbp
4004fd: 48 89 e5 mov %rsp,%rbp
400500: 48 83 ec 10 sub $0x10,%rsp
400504: 89 7d f8 mov %edi,-0x8(%rbp)
400507: 89 75 f4 mov %esi,-0xc(%rbp)
int sum(int a, int b){
40050a: c7 45 fc c3 01 00 00 movl $0x1c3,-0x4(%rbp)
int result = 451;
400511: 8b 45 f8 mov -0x8(%rbp),%eax
400514: 03 45 f4 add -0xc(%rbp),%eax
400517: 89 45 fc mov %eax,-0x4(%rbp)
result = a + b;
40051a: 8b 45 fc mov -0x4(%rbp),%eax
40051d: 89 45 f0 mov %eax,-0x10(%rbp)
400520: eb 00 jmp 400522 <sum+0x26>
return result;
400522: 8b 45 f0 mov -0x10(%rbp),%eax
400525: c9 leaveq
400526: c3 retq
400527: 90 nop
0000000000400528 <main>:
}
int main(int argc, char **argv)
400528: 55 push %rbp
400529: 48 89 e5 mov %rsp,%rbp
40052c: 48 83 ec 30 sub $0x30,%rsp
400530: 89 7d f8 mov %edi,-0x8(%rbp)
400533: 48 89 75 f0 mov %rsi,-0x10(%rbp)
{
400537: c7 45 fc 67 12 00 00 movl $0x1267,-0x4(%rbp)
int local=4711;
40053e: 48 b8 18 06 40 00 00 movabs $0x400618,%rax
400545: 00 00 00
400548: 48 89 45 e8 mov %rax,-0x18(%rbp)
40054c: 8b 45 fc mov -0x4(%rbp),%eax
40054f: 89 45 e4 mov %eax,-0x1c(%rbp)
400552: 8b 55 e4 mov -0x1c(%rbp),%edx
400555: 8b 35 c9 0a 20 00 mov 0x200ac9(%rip),%esi # 601024 <global>
40055b: 48 8b 7d e8 mov -0x18(%rbp),%rdi
40055f: 31 c0 xor %eax,%eax
400561: e8 4a fe ff ff callq 4003b0 <printf@plt>
printf("Hello, world!\nglobal=%d local=%d\n", global, local);
400566: 8b 45 fc mov -0x4(%rbp),%eax
400569: 89 45 e0 mov %eax,-0x20(%rbp)
40056c: 8b 75 e0 mov -0x20(%rbp),%esi
40056f: 8b 3d af 0a 20 00 mov 0x200aaf(%rip),%edi # 601024 <global>
400575: e8 82 ff ff ff callq 4004fc <sum>
40057a: 89 45 fc mov %eax,-0x4(%rbp)
printf(func1(2));
40057d: 8b 45 fc mov -0x4(%rbp),%eax
400580: 89 45 dc mov %eax,-0x24(%rbp)
400583: eb 00 jmp 400585 <main+0x5d>
local = sum(global, local);
400585: 8b 45 dc mov -0x24(%rbp),%eax
400588: c9 leaveq
400589: c3 retq
40058a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
0000000000400590 <__libc_csu_init>:
400590: 41 57 push %r15
400592: 41 56 push %r14
400594: 41 89 ff mov %edi,%r15d
400597: 41 55 push %r13
400599: 41 54 push %r12
40059b: 4c 8d 25 9e 08 20 00 lea 0x20089e(%rip),%r12 # 600e40 <__CTOR_LIST__>
4005a2: 55 push %rbp
4005a3: 48 8d 2d 96 08 20 00 lea 0x200896(%rip),%rbp # 600e40 <__CTOR_LIST__>
4005aa: 53 push %rbx
4005ab: 49 89 f6 mov %rsi,%r14
4005ae: 49 89 d5 mov %rdx,%r13
4005b1: 4c 29 e5 sub %r12,%rbp
4005b4: 48 83 ec 08 sub $0x8,%rsp
4005b8: 48 c1 fd 03 sar $0x3,%rbp
4005bc: e8 b7 fd ff ff callq 400378 <_init>
4005c1: 48 85 ed test %rbp,%rbp
4005c4: 74 20 je 4005e6 <__libc_csu_init+0x56>
4005c6: 31 db xor %ebx,%ebx
4005c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
4005cf: 00
4005d0: 4c 89 ea mov %r13,%rdx
4005d3: 4c 89 f6 mov %r14,%rsi
4005d6: 44 89 ff mov %r15d,%edi
4005d9: 41 ff 14 dc callq *(%r12,%rbx,8)
4005dd: 48 83 c3 01 add $0x1,%rbx
4005e1: 48 39 dd cmp %rbx,%rbp
4005e4: 75 ea jne 4005d0 <__libc_csu_init+0x40>
4005e6: 48 83 c4 08 add $0x8,%rsp
4005ea: 5b pop %rbx
4005eb: 5d pop %rbp
4005ec: 41 5c pop %r12
4005ee: 41 5d pop %r13
4005f0: 41 5e pop %r14
4005f2: 41 5f pop %r15
4005f4: c3 retq
4005f5: 90 nop
4005f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
4005fd: 00 00 00
0000000000400600 <__libc_csu_fini>:
400600: f3 c3 repz retq
Disassembly of section .fini:
0000000000400604 <_fini>:
400604: 48 83 ec 08 sub $0x8,%rsp
400608: e8 73 fe ff ff callq 400480 <__do_global_dtors_aux>
40060d: 48 83 c4 08 add $0x8,%rsp
400611: c3 retq

View File

@ -1,379 +0,0 @@
a.out: Dateiformat elf64-x86-64
Disassembly of section .init:
0000000000400408 <.init>:
400408: 48 83 ec 08 sub $0x8,%rsp
40040c: 48 8b 05 e5 0b 20 00 mov 0x200be5(%rip),%rax # 600ff8 <pow@plt+0x200bb8>
400413: 48 85 c0 test %rax,%rax
400416: 74 02 je 40041a <printf@plt-0x16>
400418: ff d0 callq *%rax
40041a: 48 83 c4 08 add $0x8,%rsp
40041e: c3 retq
Disassembly of section .plt:
0000000000400420 <printf@plt-0x10>:
400420: ff 35 e2 0b 20 00 pushq 0x200be2(%rip) # 601008 <pow@plt+0x200bc8>
400426: ff 25 e4 0b 20 00 jmpq *0x200be4(%rip) # 601010 <pow@plt+0x200bd0>
40042c: 0f 1f 40 00 nopl 0x0(%rax)
0000000000400430 <printf@plt>:
400430: ff 25 e2 0b 20 00 jmpq *0x200be2(%rip) # 601018 <pow@plt+0x200bd8>
400436: 68 00 00 00 00 pushq $0x0
40043b: e9 e0 ff ff ff jmpq 400420 <printf@plt-0x10>
0000000000400440 <pow@plt>:
400440: ff 25 da 0b 20 00 jmpq *0x200bda(%rip) # 601020 <pow@plt+0x200be0>
400446: 68 01 00 00 00 pushq $0x1
40044b: e9 d0 ff ff ff jmpq 400420 <printf@plt-0x10>
Disassembly of section .text:
0000000000400450 <.text>:
400450: 31 ed xor %ebp,%ebp
400452: 49 89 d1 mov %rdx,%r9
400455: 5e pop %rsi
400456: 48 89 e2 mov %rsp,%rdx
400459: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
40045d: 50 push %rax
40045e: 54 push %rsp
40045f: 49 c7 c0 00 09 40 00 mov $0x400900,%r8
400466: 48 c7 c1 90 08 40 00 mov $0x400890,%rcx
40046d: 48 c7 c7 b0 06 40 00 mov $0x4006b0,%rdi
400474: ff 15 76 0b 20 00 callq *0x200b76(%rip) # 600ff0 <pow@plt+0x200bb0>
40047a: f4 hlt
40047b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400480: 55 push %rbp
400481: b8 40 10 60 00 mov $0x601040,%eax
400486: 48 3d 40 10 60 00 cmp $0x601040,%rax
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 74 17 je 4004a8 <pow@plt+0x68>
400491: b8 00 00 00 00 mov $0x0,%eax
400496: 48 85 c0 test %rax,%rax
400499: 74 0d je 4004a8 <pow@plt+0x68>
40049b: 5d pop %rbp
40049c: bf 40 10 60 00 mov $0x601040,%edi
4004a1: ff e0 jmpq *%rax
4004a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4004a8: 5d pop %rbp
4004a9: c3 retq
4004aa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004b0: be 40 10 60 00 mov $0x601040,%esi
4004b5: 55 push %rbp
4004b6: 48 81 ee 40 10 60 00 sub $0x601040,%rsi
4004bd: 48 89 e5 mov %rsp,%rbp
4004c0: 48 c1 fe 03 sar $0x3,%rsi
4004c4: 48 89 f0 mov %rsi,%rax
4004c7: 48 c1 e8 3f shr $0x3f,%rax
4004cb: 48 01 c6 add %rax,%rsi
4004ce: 48 d1 fe sar %rsi
4004d1: 74 15 je 4004e8 <pow@plt+0xa8>
4004d3: b8 00 00 00 00 mov $0x0,%eax
4004d8: 48 85 c0 test %rax,%rax
4004db: 74 0b je 4004e8 <pow@plt+0xa8>
4004dd: 5d pop %rbp
4004de: bf 40 10 60 00 mov $0x601040,%edi
4004e3: ff e0 jmpq *%rax
4004e5: 0f 1f 00 nopl (%rax)
4004e8: 5d pop %rbp
4004e9: c3 retq
4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004f0: 80 3d 45 0b 20 00 00 cmpb $0x0,0x200b45(%rip) # 60103c <pow@plt+0x200bfc>
4004f7: 75 17 jne 400510 <pow@plt+0xd0>
4004f9: 55 push %rbp
4004fa: 48 89 e5 mov %rsp,%rbp
4004fd: e8 7e ff ff ff callq 400480 <pow@plt+0x40>
400502: c6 05 33 0b 20 00 01 movb $0x1,0x200b33(%rip) # 60103c <pow@plt+0x200bfc>
400509: 5d pop %rbp
40050a: c3 retq
40050b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400510: f3 c3 repz retq
400512: 0f 1f 40 00 nopl 0x0(%rax)
400516: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40051d: 00 00 00
400520: 55 push %rbp
400521: 48 89 e5 mov %rsp,%rbp
400524: 5d pop %rbp
400525: eb 89 jmp 4004b0 <pow@plt+0x70>
400527: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
40052e: 00 00
400530: 55 push %rbp
400531: 48 89 e5 mov %rsp,%rbp
400534: 89 7d fc mov %edi,-0x4(%rbp)
400537: 8b 7d fc mov -0x4(%rbp),%edi
40053a: 83 ef 02 sub $0x2,%edi
40053d: 8b 45 fc mov -0x4(%rbp),%eax
400540: 83 e8 04 sub $0x4,%eax
400543: 0f af f8 imul %eax,%edi
400546: 8b 45 fc mov -0x4(%rbp),%eax
400549: 83 e8 0b sub $0xb,%eax
40054c: 0f af f8 imul %eax,%edi
40054f: 8b 45 fc mov -0x4(%rbp),%eax
400552: 83 e8 12 sub $0x12,%eax
400555: 0f af f8 imul %eax,%edi
400558: 89 f8 mov %edi,%eax
40055a: 5d pop %rbp
40055b: c3 retq
40055c: 0f 1f 40 00 nopl 0x0(%rax)
400560: 55 push %rbp
400561: 48 89 e5 mov %rsp,%rbp
400564: 48 83 ec 20 sub $0x20,%rsp
400568: f2 0f 10 0d c0 03 00 movsd 0x3c0(%rip),%xmm1 # 400930 <pow@plt+0x4f0>
40056f: 00
400570: 89 7d fc mov %edi,-0x4(%rbp)
400573: 8b 7d fc mov -0x4(%rbp),%edi
400576: f2 0f 2a c7 cvtsi2sd %edi,%xmm0
40057a: e8 c1 fe ff ff callq 400440 <pow@plt>
40057f: f2 0f 10 0d a1 03 00 movsd 0x3a1(%rip),%xmm1 # 400928 <pow@plt+0x4e8>
400586: 00
400587: 8b 7d fc mov -0x4(%rbp),%edi
40058a: f2 0f 2a d7 cvtsi2sd %edi,%xmm2
40058e: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp)
400593: 0f 28 c2 movaps %xmm2,%xmm0
400596: e8 a5 fe ff ff callq 400440 <pow@plt>
40059b: f2 0f 10 0d 7d 03 00 movsd 0x37d(%rip),%xmm1 # 400920 <pow@plt+0x4e0>
4005a2: 00
4005a3: f2 0f 10 15 6d 03 00 movsd 0x36d(%rip),%xmm2 # 400918 <pow@plt+0x4d8>
4005aa: 00
4005ab: f2 0f 59 d0 mulsd %xmm0,%xmm2
4005af: f2 0f 10 45 f0 movsd -0x10(%rbp),%xmm0
4005b4: f2 0f 5c c2 subsd %xmm2,%xmm0
4005b8: 8b 7d fc mov -0x4(%rbp),%edi
4005bb: f2 0f 2a d7 cvtsi2sd %edi,%xmm2
4005bf: f2 0f 11 45 e8 movsd %xmm0,-0x18(%rbp)
4005c4: 0f 28 c2 movaps %xmm2,%xmm0
4005c7: e8 74 fe ff ff callq 400440 <pow@plt>
4005cc: f2 0f 10 0d 44 03 00 movsd 0x344(%rip),%xmm1 # 400918 <pow@plt+0x4d8>
4005d3: 00
4005d4: f2 0f 10 55 e8 movsd -0x18(%rbp),%xmm2
4005d9: f2 0f 58 d0 addsd %xmm0,%xmm2
4005dd: f2 0f 58 d1 addsd %xmm1,%xmm2
4005e1: f2 0f 2c c2 cvttsd2si %xmm2,%eax
4005e5: 48 83 c4 20 add $0x20,%rsp
4005e9: 5d pop %rbp
4005ea: c3 retq
4005eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4005f0: 55 push %rbp
4005f1: 48 89 e5 mov %rsp,%rbp
4005f4: 48 83 ec 10 sub $0x10,%rsp
4005f8: 89 7d fc mov %edi,-0x4(%rbp)
4005fb: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
4005ff: 0f 8c 2b 00 00 00 jl 400630 <pow@plt+0x1f0>
400605: 8b 7d fc mov -0x4(%rbp),%edi
400608: e8 53 ff ff ff callq 400560 <pow@plt+0x120>
40060d: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi
400614: 00 00 00
400617: 89 c6 mov %eax,%esi
400619: b0 00 mov $0x0,%al
40061b: e8 10 fe ff ff callq 400430 <printf@plt>
400620: 8b 75 fc mov -0x4(%rbp),%esi
400623: 83 ee 01 sub $0x1,%esi
400626: 89 f7 mov %esi,%edi
400628: 89 45 f8 mov %eax,-0x8(%rbp)
40062b: e8 c0 ff ff ff callq 4005f0 <pow@plt+0x1b0>
400630: 48 83 c4 10 add $0x10,%rsp
400634: 5d pop %rbp
400635: c3 retq
400636: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40063d: 00 00 00
400640: 55 push %rbp
400641: 48 89 e5 mov %rsp,%rbp
400644: 48 83 ec 10 sub $0x10,%rsp
400648: 89 7d fc mov %edi,-0x4(%rbp)
40064b: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
40064f: 0f 8c 2b 00 00 00 jl 400680 <pow@plt+0x240>
400655: 8b 45 fc mov -0x4(%rbp),%eax
400658: 83 e8 01 sub $0x1,%eax
40065b: 89 c7 mov %eax,%edi
40065d: e8 8e ff ff ff callq 4005f0 <pow@plt+0x1b0>
400662: 8b 7d fc mov -0x4(%rbp),%edi
400665: e8 f6 fe ff ff callq 400560 <pow@plt+0x120>
40066a: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi
400671: 00 00 00
400674: 89 c6 mov %eax,%esi
400676: b0 00 mov $0x0,%al
400678: e8 b3 fd ff ff callq 400430 <printf@plt>
40067d: 89 45 f8 mov %eax,-0x8(%rbp)
400680: 48 83 c4 10 add $0x10,%rsp
400684: 5d pop %rbp
400685: c3 retq
400686: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40068d: 00 00 00
400690: 55 push %rbp
400691: 48 89 e5 mov %rsp,%rbp
400694: 89 7d fc mov %edi,-0x4(%rbp)
400697: 89 75 f8 mov %esi,-0x8(%rbp)
40069a: c7 45 f4 c3 01 00 00 movl $0x1c3,-0xc(%rbp)
4006a1: 8b 75 fc mov -0x4(%rbp),%esi
4006a4: 03 75 f8 add -0x8(%rbp),%esi
4006a7: 89 75 f4 mov %esi,-0xc(%rbp)
4006aa: 8b 45 f4 mov -0xc(%rbp),%eax
4006ad: 5d pop %rbp
4006ae: c3 retq
4006af: 90 nop
4006b0: 55 push %rbp
4006b1: 48 89 e5 mov %rsp,%rbp
4006b4: 48 83 ec 50 sub $0x50,%rsp
4006b8: 48 b8 3c 09 40 00 00 movabs $0x40093c,%rax
4006bf: 00 00 00
4006c2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
4006c9: 89 7d f8 mov %edi,-0x8(%rbp)
4006cc: 48 89 75 f0 mov %rsi,-0x10(%rbp)
4006d0: c7 45 ec 67 12 00 00 movl $0x1267,-0x14(%rbp)
4006d7: 8b 34 25 38 10 60 00 mov 0x601038,%esi
4006de: 8b 55 ec mov -0x14(%rbp),%edx
4006e1: 48 89 c7 mov %rax,%rdi
4006e4: b0 00 mov $0x0,%al
4006e6: e8 45 fd ff ff callq 400430 <printf@plt>
4006eb: bf 02 00 00 00 mov $0x2,%edi
4006f0: 89 45 d4 mov %eax,-0x2c(%rbp)
4006f3: e8 68 fe ff ff callq 400560 <pow@plt+0x120>
4006f8: 48 bf 5e 09 40 00 00 movabs $0x40095e,%rdi
4006ff: 00 00 00
400702: 89 c6 mov %eax,%esi
400704: b0 00 mov $0x0,%al
400706: e8 25 fd ff ff callq 400430 <printf@plt>
40070b: bf 02 00 00 00 mov $0x2,%edi
400710: 89 45 d0 mov %eax,-0x30(%rbp)
400713: e8 18 fe ff ff callq 400530 <pow@plt+0xf0>
400718: 48 bf 6e 09 40 00 00 movabs $0x40096e,%rdi
40071f: 00 00 00
400722: 89 c6 mov %eax,%esi
400724: b0 00 mov $0x0,%al
400726: e8 05 fd ff ff callq 400430 <printf@plt>
40072b: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
400732: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%rbp)
400739: 89 45 cc mov %eax,-0x34(%rbp)
40073c: 83 7d e4 05 cmpl $0x5,-0x1c(%rbp)
400740: 0f 8f 1c 00 00 00 jg 400762 <pow@plt+0x322>
400746: 8b 7d e4 mov -0x1c(%rbp),%edi
400749: e8 e2 fd ff ff callq 400530 <pow@plt+0xf0>
40074e: 03 45 e8 add -0x18(%rbp),%eax
400751: 89 45 e8 mov %eax,-0x18(%rbp)
400754: 8b 45 e4 mov -0x1c(%rbp),%eax
400757: 83 c0 01 add $0x1,%eax
40075a: 89 45 e4 mov %eax,-0x1c(%rbp)
40075d: e9 da ff ff ff jmpq 40073c <pow@plt+0x2fc>
400762: 48 bf 7e 09 40 00 00 movabs $0x40097e,%rdi
400769: 00 00 00
40076c: 8b 75 e8 mov -0x18(%rbp),%esi
40076f: b0 00 mov $0x0,%al
400771: e8 ba fc ff ff callq 400430 <printf@plt>
400776: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
40077d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%rbp)
400784: 89 45 c8 mov %eax,-0x38(%rbp)
400787: 83 7d e0 05 cmpl $0x5,-0x20(%rbp)
40078b: 0f 8f 1c 00 00 00 jg 4007ad <pow@plt+0x36d>
400791: 8b 7d e0 mov -0x20(%rbp),%edi
400794: e8 97 fd ff ff callq 400530 <pow@plt+0xf0>
400799: 03 45 e8 add -0x18(%rbp),%eax
40079c: 89 45 e8 mov %eax,-0x18(%rbp)
40079f: 8b 45 e0 mov -0x20(%rbp),%eax
4007a2: 83 c0 01 add $0x1,%eax
4007a5: 89 45 e0 mov %eax,-0x20(%rbp)
4007a8: e9 da ff ff ff jmpq 400787 <pow@plt+0x347>
4007ad: 48 bf 87 09 40 00 00 movabs $0x400987,%rdi
4007b4: 00 00 00
4007b7: 8b 75 e8 mov -0x18(%rbp),%esi
4007ba: b0 00 mov $0x0,%al
4007bc: e8 6f fc ff ff callq 400430 <printf@plt>
4007c1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
4007c8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%rbp)
4007cf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp)
4007d6: 89 45 c4 mov %eax,-0x3c(%rbp)
4007d9: 83 7d d8 14 cmpl $0x14,-0x28(%rbp)
4007dd: 0f 8f 2d 00 00 00 jg 400810 <pow@plt+0x3d0>
4007e3: 8b 7d d8 mov -0x28(%rbp),%edi
4007e6: e8 45 fd ff ff callq 400530 <pow@plt+0xf0>
4007eb: 83 f8 00 cmp $0x0,%eax
4007ee: 0f 85 09 00 00 00 jne 4007fd <pow@plt+0x3bd>
4007f4: 8b 45 dc mov -0x24(%rbp),%eax
4007f7: 83 c0 01 add $0x1,%eax
4007fa: 89 45 dc mov %eax,-0x24(%rbp)
4007fd: e9 00 00 00 00 jmpq 400802 <pow@plt+0x3c2>
400802: 8b 45 d8 mov -0x28(%rbp),%eax
400805: 83 c0 01 add $0x1,%eax
400808: 89 45 d8 mov %eax,-0x28(%rbp)
40080b: e9 c9 ff ff ff jmpq 4007d9 <pow@plt+0x399>
400810: 48 bf 92 09 40 00 00 movabs $0x400992,%rdi
400817: 00 00 00
40081a: 8b 75 dc mov -0x24(%rbp),%esi
40081d: b0 00 mov $0x0,%al
40081f: e8 0c fc ff ff callq 400430 <printf@plt>
400824: bf 14 00 00 00 mov $0x14,%edi
400829: 89 45 c0 mov %eax,-0x40(%rbp)
40082c: e8 bf fd ff ff callq 4005f0 <pow@plt+0x1b0>
400831: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi
400838: 00 00 00
40083b: 89 45 bc mov %eax,-0x44(%rbp)
40083e: b0 00 mov $0x0,%al
400840: e8 eb fb ff ff callq 400430 <printf@plt>
400845: bf 14 00 00 00 mov $0x14,%edi
40084a: 89 45 b8 mov %eax,-0x48(%rbp)
40084d: e8 ee fd ff ff callq 400640 <pow@plt+0x200>
400852: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi
400859: 00 00 00
40085c: 89 45 b4 mov %eax,-0x4c(%rbp)
40085f: b0 00 mov $0x0,%al
400861: e8 ca fb ff ff callq 400430 <printf@plt>
400866: 8b 3c 25 38 10 60 00 mov 0x601038,%edi
40086d: 8b 75 ec mov -0x14(%rbp),%esi
400870: 89 45 b0 mov %eax,-0x50(%rbp)
400873: e8 18 fe ff ff callq 400690 <pow@plt+0x250>
400878: 89 45 ec mov %eax,-0x14(%rbp)
40087b: 8b 45 ec mov -0x14(%rbp),%eax
40087e: 48 83 c4 50 add $0x50,%rsp
400882: 5d pop %rbp
400883: c3 retq
400884: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40088b: 00 00 00
40088e: 66 90 xchg %ax,%ax
400890: 41 57 push %r15
400892: 41 56 push %r14
400894: 41 89 ff mov %edi,%r15d
400897: 41 55 push %r13
400899: 41 54 push %r12
40089b: 4c 8d 25 5e 05 20 00 lea 0x20055e(%rip),%r12 # 600e00 <pow@plt+0x2009c0>
4008a2: 55 push %rbp
4008a3: 48 8d 2d 5e 05 20 00 lea 0x20055e(%rip),%rbp # 600e08 <pow@plt+0x2009c8>
4008aa: 53 push %rbx
4008ab: 49 89 f6 mov %rsi,%r14
4008ae: 49 89 d5 mov %rdx,%r13
4008b1: 4c 29 e5 sub %r12,%rbp
4008b4: 48 83 ec 08 sub $0x8,%rsp
4008b8: 48 c1 fd 03 sar $0x3,%rbp
4008bc: e8 47 fb ff ff callq 400408 <printf@plt-0x28>
4008c1: 48 85 ed test %rbp,%rbp
4008c4: 74 20 je 4008e6 <pow@plt+0x4a6>
4008c6: 31 db xor %ebx,%ebx
4008c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
4008cf: 00
4008d0: 4c 89 ea mov %r13,%rdx
4008d3: 4c 89 f6 mov %r14,%rsi
4008d6: 44 89 ff mov %r15d,%edi
4008d9: 41 ff 14 dc callq *(%r12,%rbx,8)
4008dd: 48 83 c3 01 add $0x1,%rbx
4008e1: 48 39 dd cmp %rbx,%rbp
4008e4: 75 ea jne 4008d0 <pow@plt+0x490>
4008e6: 48 83 c4 08 add $0x8,%rsp
4008ea: 5b pop %rbx
4008eb: 5d pop %rbp
4008ec: 41 5c pop %r12
4008ee: 41 5d pop %r13
4008f0: 41 5e pop %r14
4008f2: 41 5f pop %r15
4008f4: c3 retq
4008f5: 90 nop
4008f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
4008fd: 00 00 00
400900: f3 c3 repz retq
Disassembly of section .fini:
0000000000400904 <.fini>:
400904: 48 83 ec 08 sub $0x8,%rsp
400908: 48 83 c4 08 add $0x8,%rsp
40090c: c3 retq

View File

@ -1,379 +0,0 @@
a.out: Dateiformat elf64-x86-64
Disassembly of section .init:
0000000000400408 <.init>:
400408: 48 83 ec 08 sub $0x8,%rsp
40040c: 48 8b 05 e5 0b 20 00 mov 0x200be5(%rip),%rax # 600ff8 <pow@plt+0x200bb8>
400413: 48 85 c0 test %rax,%rax
400416: 74 02 je 40041a <printf@plt-0x16>
400418: ff d0 callq *%rax
40041a: 48 83 c4 08 add $0x8,%rsp
40041e: c3 retq
Disassembly of section .plt:
0000000000400420 <printf@plt-0x10>:
400420: ff 35 e2 0b 20 00 pushq 0x200be2(%rip) # 601008 <pow@plt+0x200bc8>
400426: ff 25 e4 0b 20 00 jmpq *0x200be4(%rip) # 601010 <pow@plt+0x200bd0>
40042c: 0f 1f 40 00 nopl 0x0(%rax)
0000000000400430 <printf@plt>:
400430: ff 25 e2 0b 20 00 jmpq *0x200be2(%rip) # 601018 <pow@plt+0x200bd8>
400436: 68 00 00 00 00 pushq $0x0
40043b: e9 e0 ff ff ff jmpq 400420 <printf@plt-0x10>
0000000000400440 <pow@plt>:
400440: ff 25 da 0b 20 00 jmpq *0x200bda(%rip) # 601020 <pow@plt+0x200be0>
400446: 68 01 00 00 00 pushq $0x1
40044b: e9 d0 ff ff ff jmpq 400420 <printf@plt-0x10>
Disassembly of section .text:
0000000000400450 <.text>:
400450: 31 ed xor %ebp,%ebp
400452: 49 89 d1 mov %rdx,%r9
400455: 5e pop %rsi
400456: 48 89 e2 mov %rsp,%rdx
400459: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
40045d: 50 push %rax
40045e: 54 push %rsp
40045f: 49 c7 c0 00 09 40 00 mov $0x400900,%r8
400466: 48 c7 c1 90 08 40 00 mov $0x400890,%rcx
40046d: 48 c7 c7 b0 06 40 00 mov $0x4006b0,%rdi
400474: ff 15 76 0b 20 00 callq *0x200b76(%rip) # 600ff0 <pow@plt+0x200bb0>
40047a: f4 hlt
40047b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400480: 55 push %rbp
400481: b8 40 10 60 00 mov $0x601040,%eax
400486: 48 3d 40 10 60 00 cmp $0x601040,%rax
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 74 17 je 4004a8 <pow@plt+0x68>
400491: b8 00 00 00 00 mov $0x0,%eax
400496: 48 85 c0 test %rax,%rax
400499: 74 0d je 4004a8 <pow@plt+0x68>
40049b: 5d pop %rbp
40049c: bf 40 10 60 00 mov $0x601040,%edi
4004a1: ff e0 jmpq *%rax
4004a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4004a8: 5d pop %rbp
4004a9: c3 retq
4004aa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004b0: be 40 10 60 00 mov $0x601040,%esi
4004b5: 55 push %rbp
4004b6: 48 81 ee 40 10 60 00 sub $0x601040,%rsi
4004bd: 48 89 e5 mov %rsp,%rbp
4004c0: 48 c1 fe 03 sar $0x3,%rsi
4004c4: 48 89 f0 mov %rsi,%rax
4004c7: 48 c1 e8 3f shr $0x3f,%rax
4004cb: 48 01 c6 add %rax,%rsi
4004ce: 48 d1 fe sar %rsi
4004d1: 74 15 je 4004e8 <pow@plt+0xa8>
4004d3: b8 00 00 00 00 mov $0x0,%eax
4004d8: 48 85 c0 test %rax,%rax
4004db: 74 0b je 4004e8 <pow@plt+0xa8>
4004dd: 5d pop %rbp
4004de: bf 40 10 60 00 mov $0x601040,%edi
4004e3: ff e0 jmpq *%rax
4004e5: 0f 1f 00 nopl (%rax)
4004e8: 5d pop %rbp
4004e9: c3 retq
4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004f0: 80 3d 45 0b 20 00 00 cmpb $0x0,0x200b45(%rip) # 60103c <pow@plt+0x200bfc>
4004f7: 75 17 jne 400510 <pow@plt+0xd0>
4004f9: 55 push %rbp
4004fa: 48 89 e5 mov %rsp,%rbp
4004fd: e8 7e ff ff ff callq 400480 <pow@plt+0x40>
400502: c6 05 33 0b 20 00 01 movb $0x1,0x200b33(%rip) # 60103c <pow@plt+0x200bfc>
400509: 5d pop %rbp
40050a: c3 retq
40050b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400510: f3 c3 repz retq
400512: 0f 1f 40 00 nopl 0x0(%rax)
400516: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40051d: 00 00 00
400520: 55 push %rbp
400521: 48 89 e5 mov %rsp,%rbp
400524: 5d pop %rbp
400525: eb 89 jmp 4004b0 <pow@plt+0x70>
400527: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
40052e: 00 00
400530: 55 push %rbp
400531: 48 89 e5 mov %rsp,%rbp
400534: 89 7d fc mov %edi,-0x4(%rbp)
400537: 8b 7d fc mov -0x4(%rbp),%edi
40053a: 83 ef 02 sub $0x2,%edi
40053d: 8b 45 fc mov -0x4(%rbp),%eax
400540: 83 e8 04 sub $0x4,%eax
400543: 0f af f8 imul %eax,%edi
400546: 8b 45 fc mov -0x4(%rbp),%eax
400549: 83 e8 0b sub $0xb,%eax
40054c: 0f af f8 imul %eax,%edi
40054f: 8b 45 fc mov -0x4(%rbp),%eax
400552: 83 e8 12 sub $0x12,%eax
400555: 0f af f8 imul %eax,%edi
400558: 89 f8 mov %edi,%eax
40055a: 5d pop %rbp
40055b: c3 retq
40055c: 0f 1f 40 00 nopl 0x0(%rax)
400560: 55 push %rbp
400561: 48 89 e5 mov %rsp,%rbp
400564: 48 83 ec 20 sub $0x20,%rsp
400568: f2 0f 10 0d c0 03 00 movsd 0x3c0(%rip),%xmm1 # 400930 <pow@plt+0x4f0>
40056f: 00
400570: 89 7d fc mov %edi,-0x4(%rbp)
400573: 8b 7d fc mov -0x4(%rbp),%edi
400576: f2 0f 2a c7 cvtsi2sd %edi,%xmm0
40057a: e8 c1 fe ff ff callq 400440 <pow@plt>
40057f: f2 0f 10 0d a1 03 00 movsd 0x3a1(%rip),%xmm1 # 400928 <pow@plt+0x4e8>
400586: 00
400587: 8b 7d fc mov -0x4(%rbp),%edi
40058a: f2 0f 2a d7 cvtsi2sd %edi,%xmm2
40058e: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp)
400593: 0f 28 c2 movaps %xmm2,%xmm0
400596: e8 a5 fe ff ff callq 400440 <pow@plt>
40059b: f2 0f 10 0d 7d 03 00 movsd 0x37d(%rip),%xmm1 # 400920 <pow@plt+0x4e0>
4005a2: 00
4005a3: f2 0f 10 15 6d 03 00 movsd 0x36d(%rip),%xmm2 # 400918 <pow@plt+0x4d8>
4005aa: 00
4005ab: f2 0f 59 d0 mulsd %xmm0,%xmm2
4005af: f2 0f 10 45 f0 movsd -0x10(%rbp),%xmm0
4005b4: f2 0f 5c c2 subsd %xmm2,%xmm0
4005b8: 8b 7d fc mov -0x4(%rbp),%edi
4005bb: f2 0f 2a d7 cvtsi2sd %edi,%xmm2
4005bf: f2 0f 11 45 e8 movsd %xmm0,-0x18(%rbp)
4005c4: 0f 28 c2 movaps %xmm2,%xmm0
4005c7: e8 74 fe ff ff callq 400440 <pow@plt>
4005cc: f2 0f 10 0d 44 03 00 movsd 0x344(%rip),%xmm1 # 400918 <pow@plt+0x4d8>
4005d3: 00
4005d4: f2 0f 10 55 e8 movsd -0x18(%rbp),%xmm2
4005d9: f2 0f 58 d0 addsd %xmm0,%xmm2
4005dd: f2 0f 58 d1 addsd %xmm1,%xmm2
4005e1: f2 0f 2c c2 cvttsd2si %xmm2,%eax
4005e5: 48 83 c4 20 add $0x20,%rsp
4005e9: 5d pop %rbp
4005ea: c3 retq
4005eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4005f0: 55 push %rbp
4005f1: 48 89 e5 mov %rsp,%rbp
4005f4: 48 83 ec 10 sub $0x10,%rsp
4005f8: 89 7d fc mov %edi,-0x4(%rbp)
4005fb: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
4005ff: 0f 8c 2b 00 00 00 jl 400630 <pow@plt+0x1f0>
400605: 8b 7d fc mov -0x4(%rbp),%edi
400608: e8 53 ff ff ff callq 400560 <pow@plt+0x120>
40060d: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi
400614: 00 00 00
400617: 89 c6 mov %eax,%esi
400619: b0 00 mov $0x0,%al
40061b: e8 10 fe ff ff callq 400430 <printf@plt>
400620: 8b 75 fc mov -0x4(%rbp),%esi
400623: 83 ee 01 sub $0x1,%esi
400626: 89 f7 mov %esi,%edi
400628: 89 45 f8 mov %eax,-0x8(%rbp)
40062b: e8 c0 ff ff ff callq 4005f0 <pow@plt+0x1b0>
400630: 48 83 c4 10 add $0x10,%rsp
400634: 5d pop %rbp
400635: c3 retq
400636: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40063d: 00 00 00
400640: 55 push %rbp
400641: 48 89 e5 mov %rsp,%rbp
400644: 48 83 ec 10 sub $0x10,%rsp
400648: 89 7d fc mov %edi,-0x4(%rbp)
40064b: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
40064f: 0f 8c 2b 00 00 00 jl 400680 <pow@plt+0x240>
400655: 8b 45 fc mov -0x4(%rbp),%eax
400658: 83 e8 01 sub $0x1,%eax
40065b: 89 c7 mov %eax,%edi
40065d: e8 8e ff ff ff callq 4005f0 <pow@plt+0x1b0>
400662: 8b 7d fc mov -0x4(%rbp),%edi
400665: e8 f6 fe ff ff callq 400560 <pow@plt+0x120>
40066a: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi
400671: 00 00 00
400674: 89 c6 mov %eax,%esi
400676: b0 00 mov $0x0,%al
400678: e8 b3 fd ff ff callq 400430 <printf@plt>
40067d: 89 45 f8 mov %eax,-0x8(%rbp)
400680: 48 83 c4 10 add $0x10,%rsp
400684: 5d pop %rbp
400685: c3 retq
400686: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40068d: 00 00 00
400690: 55 push %rbp
400691: 48 89 e5 mov %rsp,%rbp
400694: 89 7d fc mov %edi,-0x4(%rbp)
400697: 89 75 f8 mov %esi,-0x8(%rbp)
40069a: c7 45 f4 c3 01 00 00 movl $0x1c3,-0xc(%rbp)
4006a1: 8b 75 fc mov -0x4(%rbp),%esi
4006a4: 03 75 f8 add -0x8(%rbp),%esi
4006a7: 89 75 f4 mov %esi,-0xc(%rbp)
4006aa: 8b 45 f4 mov -0xc(%rbp),%eax
4006ad: 5d pop %rbp
4006ae: c3 retq
4006af: 90 nop
4006b0: 55 push %rbp
4006b1: 48 89 e5 mov %rsp,%rbp
4006b4: 48 83 ec 50 sub $0x50,%rsp
4006b8: 48 b8 3c 09 40 00 00 movabs $0x40093c,%rax
4006bf: 00 00 00
4006c2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
4006c9: 89 7d f8 mov %edi,-0x8(%rbp)
4006cc: 48 89 75 f0 mov %rsi,-0x10(%rbp)
4006d0: c7 45 ec 67 12 00 00 movl $0x1267,-0x14(%rbp)
4006d7: 8b 34 25 38 10 60 00 mov 0x601038,%esi
4006de: 8b 55 ec mov -0x14(%rbp),%edx
4006e1: 48 89 c7 mov %rax,%rdi
4006e4: b0 00 mov $0x0,%al
4006e6: e8 45 fd ff ff callq 400430 <printf@plt>
4006eb: bf 02 00 00 00 mov $0x2,%edi
4006f0: 89 45 d4 mov %eax,-0x2c(%rbp)
4006f3: e8 38 fe ff ff callq 400530 <pow@plt+0xf0>
4006f8: 48 bf 5e 09 40 00 00 movabs $0x40095e,%rdi
4006ff: 00 00 00
400702: 89 c6 mov %eax,%esi
400704: b0 00 mov $0x0,%al
400706: e8 25 fd ff ff callq 400430 <printf@plt>
40070b: bf 02 00 00 00 mov $0x2,%edi
400710: 89 45 d0 mov %eax,-0x30(%rbp)
400713: e8 48 fe ff ff callq 400560 <pow@plt+0x120>
400718: 48 bf 6e 09 40 00 00 movabs $0x40096e,%rdi
40071f: 00 00 00
400722: 89 c6 mov %eax,%esi
400724: b0 00 mov $0x0,%al
400726: e8 05 fd ff ff callq 400430 <printf@plt>
40072b: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
400732: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%rbp)
400739: 89 45 cc mov %eax,-0x34(%rbp)
40073c: 83 7d e4 05 cmpl $0x5,-0x1c(%rbp)
400740: 0f 8f 1c 00 00 00 jg 400762 <pow@plt+0x322>
400746: 8b 7d e4 mov -0x1c(%rbp),%edi
400749: e8 e2 fd ff ff callq 400530 <pow@plt+0xf0>
40074e: 03 45 e8 add -0x18(%rbp),%eax
400751: 89 45 e8 mov %eax,-0x18(%rbp)
400754: 8b 45 e4 mov -0x1c(%rbp),%eax
400757: 83 c0 01 add $0x1,%eax
40075a: 89 45 e4 mov %eax,-0x1c(%rbp)
40075d: e9 da ff ff ff jmpq 40073c <pow@plt+0x2fc>
400762: 48 bf 7e 09 40 00 00 movabs $0x40097e,%rdi
400769: 00 00 00
40076c: 8b 75 e8 mov -0x18(%rbp),%esi
40076f: b0 00 mov $0x0,%al
400771: e8 ba fc ff ff callq 400430 <printf@plt>
400776: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
40077d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%rbp)
400784: 89 45 c8 mov %eax,-0x38(%rbp)
400787: 83 7d e0 05 cmpl $0x5,-0x20(%rbp)
40078b: 0f 8f 1c 00 00 00 jg 4007ad <pow@plt+0x36d>
400791: 8b 7d e0 mov -0x20(%rbp),%edi
400794: e8 97 fd ff ff callq 400530 <pow@plt+0xf0>
400799: 03 45 e8 add -0x18(%rbp),%eax
40079c: 89 45 e8 mov %eax,-0x18(%rbp)
40079f: 8b 45 e0 mov -0x20(%rbp),%eax
4007a2: 83 c0 01 add $0x1,%eax
4007a5: 89 45 e0 mov %eax,-0x20(%rbp)
4007a8: e9 da ff ff ff jmpq 400787 <pow@plt+0x347>
4007ad: 48 bf 87 09 40 00 00 movabs $0x400987,%rdi
4007b4: 00 00 00
4007b7: 8b 75 e8 mov -0x18(%rbp),%esi
4007ba: b0 00 mov $0x0,%al
4007bc: e8 6f fc ff ff callq 400430 <printf@plt>
4007c1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
4007c8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%rbp)
4007cf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp)
4007d6: 89 45 c4 mov %eax,-0x3c(%rbp)
4007d9: 83 7d d8 14 cmpl $0x14,-0x28(%rbp)
4007dd: 0f 8f 2d 00 00 00 jg 400810 <pow@plt+0x3d0>
4007e3: 8b 7d d8 mov -0x28(%rbp),%edi
4007e6: e8 45 fd ff ff callq 400530 <pow@plt+0xf0>
4007eb: 83 f8 00 cmp $0x0,%eax
4007ee: 0f 85 09 00 00 00 jne 4007fd <pow@plt+0x3bd>
4007f4: 8b 45 dc mov -0x24(%rbp),%eax
4007f7: 83 c0 01 add $0x1,%eax
4007fa: 89 45 dc mov %eax,-0x24(%rbp)
4007fd: e9 00 00 00 00 jmpq 400802 <pow@plt+0x3c2>
400802: 8b 45 d8 mov -0x28(%rbp),%eax
400805: 83 c0 01 add $0x1,%eax
400808: 89 45 d8 mov %eax,-0x28(%rbp)
40080b: e9 c9 ff ff ff jmpq 4007d9 <pow@plt+0x399>
400810: 48 bf 92 09 40 00 00 movabs $0x400992,%rdi
400817: 00 00 00
40081a: 8b 75 dc mov -0x24(%rbp),%esi
40081d: b0 00 mov $0x0,%al
40081f: e8 0c fc ff ff callq 400430 <printf@plt>
400824: bf 14 00 00 00 mov $0x14,%edi
400829: 89 45 c0 mov %eax,-0x40(%rbp)
40082c: e8 bf fd ff ff callq 4005f0 <pow@plt+0x1b0>
400831: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi
400838: 00 00 00
40083b: 89 45 bc mov %eax,-0x44(%rbp)
40083e: b0 00 mov $0x0,%al
400840: e8 eb fb ff ff callq 400430 <printf@plt>
400845: bf 14 00 00 00 mov $0x14,%edi
40084a: 89 45 b8 mov %eax,-0x48(%rbp)
40084d: e8 ee fd ff ff callq 400640 <pow@plt+0x200>
400852: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi
400859: 00 00 00
40085c: 89 45 b4 mov %eax,-0x4c(%rbp)
40085f: b0 00 mov $0x0,%al
400861: e8 ca fb ff ff callq 400430 <printf@plt>
400866: 8b 3c 25 38 10 60 00 mov 0x601038,%edi
40086d: 8b 75 ec mov -0x14(%rbp),%esi
400870: 89 45 b0 mov %eax,-0x50(%rbp)
400873: e8 18 fe ff ff callq 400690 <pow@plt+0x250>
400878: 89 45 ec mov %eax,-0x14(%rbp)
40087b: 8b 45 ec mov -0x14(%rbp),%eax
40087e: 48 83 c4 50 add $0x50,%rsp
400882: 5d pop %rbp
400883: c3 retq
400884: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40088b: 00 00 00
40088e: 66 90 xchg %ax,%ax
400890: 41 57 push %r15
400892: 41 56 push %r14
400894: 41 89 ff mov %edi,%r15d
400897: 41 55 push %r13
400899: 41 54 push %r12
40089b: 4c 8d 25 5e 05 20 00 lea 0x20055e(%rip),%r12 # 600e00 <pow@plt+0x2009c0>
4008a2: 55 push %rbp
4008a3: 48 8d 2d 5e 05 20 00 lea 0x20055e(%rip),%rbp # 600e08 <pow@plt+0x2009c8>
4008aa: 53 push %rbx
4008ab: 49 89 f6 mov %rsi,%r14
4008ae: 49 89 d5 mov %rdx,%r13
4008b1: 4c 29 e5 sub %r12,%rbp
4008b4: 48 83 ec 08 sub $0x8,%rsp
4008b8: 48 c1 fd 03 sar $0x3,%rbp
4008bc: e8 47 fb ff ff callq 400408 <printf@plt-0x28>
4008c1: 48 85 ed test %rbp,%rbp
4008c4: 74 20 je 4008e6 <pow@plt+0x4a6>
4008c6: 31 db xor %ebx,%ebx
4008c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
4008cf: 00
4008d0: 4c 89 ea mov %r13,%rdx
4008d3: 4c 89 f6 mov %r14,%rsi
4008d6: 44 89 ff mov %r15d,%edi
4008d9: 41 ff 14 dc callq *(%r12,%rbx,8)
4008dd: 48 83 c3 01 add $0x1,%rbx
4008e1: 48 39 dd cmp %rbx,%rbp
4008e4: 75 ea jne 4008d0 <pow@plt+0x490>
4008e6: 48 83 c4 08 add $0x8,%rsp
4008ea: 5b pop %rbx
4008eb: 5d pop %rbp
4008ec: 41 5c pop %r12
4008ee: 41 5d pop %r13
4008f0: 41 5e pop %r14
4008f2: 41 5f pop %r15
4008f4: c3 retq
4008f5: 90 nop
4008f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
4008fd: 00 00 00
400900: f3 c3 repz retq
Disassembly of section .fini:
0000000000400904 <.fini>:
400904: 48 83 ec 08 sub $0x8,%rsp
400908: 48 83 c4 08 add $0x8,%rsp
40090c: c3 retq

View File

@ -1,378 +0,0 @@
a.out: Dateiformat elf64-x86-64
Disassembly of section .init:
0000000000400408 <.init>:
400408: 48 83 ec 08 sub $0x8,%rsp
40040c: 48 8b 05 e5 0b 20 00 mov 0x200be5(%rip),%rax # 600ff8 <pow@plt+0x200bb8>
400413: 48 85 c0 test %rax,%rax
400416: 74 02 je 40041a <printf@plt-0x16>
400418: ff d0 callq *%rax
40041a: 48 83 c4 08 add $0x8,%rsp
40041e: c3 retq
Disassembly of section .plt:
0000000000400420 <printf@plt-0x10>:
400420: ff 35 e2 0b 20 00 pushq 0x200be2(%rip) # 601008 <pow@plt+0x200bc8>
400426: ff 25 e4 0b 20 00 jmpq *0x200be4(%rip) # 601010 <pow@plt+0x200bd0>
40042c: 0f 1f 40 00 nopl 0x0(%rax)
0000000000400430 <printf@plt>:
400430: ff 25 e2 0b 20 00 jmpq *0x200be2(%rip) # 601018 <pow@plt+0x200bd8>
400436: 68 00 00 00 00 pushq $0x0
40043b: e9 e0 ff ff ff jmpq 400420 <printf@plt-0x10>
0000000000400440 <pow@plt>:
400440: ff 25 da 0b 20 00 jmpq *0x200bda(%rip) # 601020 <pow@plt+0x200be0>
400446: 68 01 00 00 00 pushq $0x1
40044b: e9 d0 ff ff ff jmpq 400420 <printf@plt-0x10>
Disassembly of section .text:
0000000000400450 <.text>:
400450: 31 ed xor %ebp,%ebp
400452: 49 89 d1 mov %rdx,%r9
400455: 5e pop %rsi
400456: 48 89 e2 mov %rsp,%rdx
400459: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
40045d: 50 push %rax
40045e: 54 push %rsp
40045f: 49 c7 c0 00 09 40 00 mov $0x400900,%r8
400466: 48 c7 c1 90 08 40 00 mov $0x400890,%rcx
40046d: 48 c7 c7 b0 06 40 00 mov $0x4006b0,%rdi
400474: ff 15 76 0b 20 00 callq *0x200b76(%rip) # 600ff0 <pow@plt+0x200bb0>
40047a: f4 hlt
40047b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400480: 55 push %rbp
400481: b8 40 10 60 00 mov $0x601040,%eax
400486: 48 3d 40 10 60 00 cmp $0x601040,%rax
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 74 17 je 4004a8 <pow@plt+0x68>
400491: b8 00 00 00 00 mov $0x0,%eax
400496: 48 85 c0 test %rax,%rax
400499: 74 0d je 4004a8 <pow@plt+0x68>
40049b: 5d pop %rbp
40049c: bf 40 10 60 00 mov $0x601040,%edi
4004a1: ff e0 jmpq *%rax
4004a3: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4004a8: 5d pop %rbp
4004a9: c3 retq
4004aa: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004b0: be 40 10 60 00 mov $0x601040,%esi
4004b5: 55 push %rbp
4004b6: 48 81 ee 40 10 60 00 sub $0x601040,%rsi
4004bd: 48 89 e5 mov %rsp,%rbp
4004c0: 48 c1 fe 03 sar $0x3,%rsi
4004c4: 48 89 f0 mov %rsi,%rax
4004c7: 48 c1 e8 3f shr $0x3f,%rax
4004cb: 48 01 c6 add %rax,%rsi
4004ce: 48 d1 fe sar %rsi
4004d1: 74 15 je 4004e8 <pow@plt+0xa8>
4004d3: b8 00 00 00 00 mov $0x0,%eax
4004d8: 48 85 c0 test %rax,%rax
4004db: 74 0b je 4004e8 <pow@plt+0xa8>
4004dd: 5d pop %rbp
4004de: bf 40 10 60 00 mov $0x601040,%edi
4004e3: ff e0 jmpq *%rax
4004e5: 0f 1f 00 nopl (%rax)
4004e8: 5d pop %rbp
4004e9: c3 retq
4004ea: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
4004f0: 80 3d 45 0b 20 00 00 cmpb $0x0,0x200b45(%rip) # 60103c <pow@plt+0x200bfc>
4004f7: 75 17 jne 400510 <pow@plt+0xd0>
4004f9: 55 push %rbp
4004fa: 48 89 e5 mov %rsp,%rbp
4004fd: e8 7e ff ff ff callq 400480 <pow@plt+0x40>
400502: c6 05 33 0b 20 00 01 movb $0x1,0x200b33(%rip) # 60103c <pow@plt+0x200bfc>
400509: 5d pop %rbp
40050a: c3 retq
40050b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400510: f3 c3 repz retq
400512: 0f 1f 40 00 nopl 0x0(%rax)
400516: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40051d: 00 00 00
400520: 55 push %rbp
400521: 48 89 e5 mov %rsp,%rbp
400524: 5d pop %rbp
400525: eb 89 jmp 4004b0 <pow@plt+0x70>
400527: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
40052e: 00 00
400530: 55 push %rbp
400531: 48 89 e5 mov %rsp,%rbp
400534: 89 7d fc mov %edi,-0x4(%rbp)
400537: 8b 7d fc mov -0x4(%rbp),%edi
40053a: 83 ef 02 sub $0x2,%edi
40053d: 8b 45 fc mov -0x4(%rbp),%eax
400540: 83 e8 04 sub $0x4,%eax
400543: 0f af f8 imul %eax,%edi
400546: 8b 45 fc mov -0x4(%rbp),%eax
400549: 83 e8 0b sub $0xb,%eax
40054c: 0f af f8 imul %eax,%edi
40054f: 8b 45 fc mov -0x4(%rbp),%eax
400552: 83 e8 12 sub $0x12,%eax
400555: 0f af f8 imul %eax,%edi
400558: 89 f8 mov %edi,%eax
40055a: 5d pop %rbp
40055b: c3 retq
40055c: 0f 1f 40 00 nopl 0x0(%rax)
400560: 55 push %rbp
400561: 48 89 e5 mov %rsp,%rbp
400564: 48 83 ec 20 sub $0x20,%rsp
400568: f2 0f 10 0d c0 03 00 movsd 0x3c0(%rip),%xmm1 # 400930 <pow@plt+0x4f0>
40056f: 00
400570: 89 7d fc mov %edi,-0x4(%rbp)
400573: 8b 7d fc mov -0x4(%rbp),%edi
400576: f2 0f 2a c7 cvtsi2sd %edi,%xmm0
40057a: e8 c1 fe ff ff callq 400440 <pow@plt>
40057f: f2 0f 10 0d a1 03 00 movsd 0x3a1(%rip),%xmm1 # 400928 <pow@plt+0x4e8>
400586: 00
400587: 8b 7d fc mov -0x4(%rbp),%edi
40058a: f2 0f 2a d7 cvtsi2sd %edi,%xmm2
40058e: f2 0f 11 45 f0 movsd %xmm0,-0x10(%rbp)
400593: 0f 28 c2 movaps %xmm2,%xmm0
400596: e8 a5 fe ff ff callq 400440 <pow@plt>
40059b: f2 0f 10 0d 7d 03 00 movsd 0x37d(%rip),%xmm1 # 400920 <pow@plt+0x4e0>
4005a2: 00
4005a3: f2 0f 10 15 6d 03 00 movsd 0x36d(%rip),%xmm2 # 400918 <pow@plt+0x4d8>
4005aa: 00
4005ab: f2 0f 59 d0 mulsd %xmm0,%xmm2
4005af: f2 0f 10 45 f0 movsd -0x10(%rbp),%xmm0
4005b4: f2 0f 5c c2 subsd %xmm2,%xmm0
4005b8: 8b 7d fc mov -0x4(%rbp),%edi
4005bb: f2 0f 2a d7 cvtsi2sd %edi,%xmm2
4005bf: f2 0f 11 45 e8 movsd %xmm0,-0x18(%rbp)
4005c4: 0f 28 c2 movaps %xmm2,%xmm0
4005c7: e8 74 fe ff ff callq 400440 <pow@plt>
4005cc: f2 0f 10 0d 44 03 00 movsd 0x344(%rip),%xmm1 # 400918 <pow@plt+0x4d8>
4005d3: 00
4005d4: f2 0f 10 55 e8 movsd -0x18(%rbp),%xmm2
4005d9: f2 0f 58 d0 addsd %xmm0,%xmm2
4005dd: f2 0f 58 d1 addsd %xmm1,%xmm2
4005e1: f2 0f 2c c2 cvttsd2si %xmm2,%eax
4005e5: 48 83 c4 20 add $0x20,%rsp
4005e9: 5d pop %rbp
4005ea: c3 retq
4005eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
4005f0: 55 push %rbp
4005f1: 48 89 e5 mov %rsp,%rbp
4005f4: 48 83 ec 10 sub $0x10,%rsp
4005f8: 89 7d fc mov %edi,-0x4(%rbp)
4005fb: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
4005ff: 0f 8c 2b 00 00 00 jl 400630 <pow@plt+0x1f0>
400605: 8b 7d fc mov -0x4(%rbp),%edi
400608: e8 53 ff ff ff callq 400560 <pow@plt+0x120>
40060d: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi
400614: 00 00 00
400617: 89 c6 mov %eax,%esi
400619: b0 00 mov $0x0,%al
40061b: e8 10 fe ff ff callq 400430 <printf@plt>
400620: 8b 75 fc mov -0x4(%rbp),%esi
400623: 83 ee 01 sub $0x1,%esi
400626: 89 f7 mov %esi,%edi
400628: 89 45 f8 mov %eax,-0x8(%rbp)
40062b: e8 c0 ff ff ff callq 4005f0 <pow@plt+0x1b0>
400630: 48 83 c4 10 add $0x10,%rsp
400634: 5d pop %rbp
400635: c3 retq
400636: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40063d: 00 00 00
400640: 55 push %rbp
400641: 48 89 e5 mov %rsp,%rbp
400644: 48 83 ec 10 sub $0x10,%rsp
400648: 89 7d fc mov %edi,-0x4(%rbp)
40064b: 83 7d fc 00 cmpl $0x0,-0x4(%rbp)
40064f: 0f 8c 2b 00 00 00 jl 400680 <pow@plt+0x240>
400655: 8b 45 fc mov -0x4(%rbp),%eax
400658: 83 e8 01 sub $0x1,%eax
40065b: 89 c7 mov %eax,%edi
40065d: e8 8e ff ff ff callq 4005f0 <pow@plt+0x1b0>
400662: 8b 7d fc mov -0x4(%rbp),%edi
400665: e8 f6 fe ff ff callq 400560 <pow@plt+0x120>
40066a: 48 bf 38 09 40 00 00 movabs $0x400938,%rdi
400671: 00 00 00
400674: 89 c6 mov %eax,%esi
400676: b0 00 mov $0x0,%al
400678: e8 b3 fd ff ff callq 400430 <printf@plt>
40067d: 89 45 f8 mov %eax,-0x8(%rbp)
400680: 48 83 c4 10 add $0x10,%rsp
400684: 5d pop %rbp
400685: c3 retq
400686: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
40068d: 00 00 00
400690: 55 push %rbp
400691: 48 89 e5 mov %rsp,%rbp
400694: 89 7d fc mov %edi,-0x4(%rbp)
400697: 89 75 f8 mov %esi,-0x8(%rbp)
40069a: c7 45 f4 c3 01 00 00 movl $0x1c3,-0xc(%rbp)
4006a1: 8b 75 fc mov -0x4(%rbp),%esi
4006a4: 03 75 f8 add -0x8(%rbp),%esi
4006a7: 89 75 f4 mov %esi,-0xc(%rbp)
4006aa: 8b 45 f4 mov -0xc(%rbp),%eax
4006ad: 5d pop %rbp
4006ae: c3 retq
4006af: 90 nop
4006b0: 55 push %rbp
4006b1: 48 89 e5 mov %rsp,%rbp
4006b4: 48 83 ec 60 sub $0x60,%rsp
4006b8: 48 b8 3c 09 40 00 00 movabs $0x40093c,%rax
4006bf: 00 00 00
4006c2: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
4006c9: 89 7d f8 mov %edi,-0x8(%rbp)
4006cc: 48 89 75 f0 mov %rsi,-0x10(%rbp)
4006d0: c7 45 ec 67 12 00 00 movl $0x1267,-0x14(%rbp)
4006d7: 8b 34 25 38 10 60 00 mov 0x601038,%esi
4006de: 8b 55 ec mov -0x14(%rbp),%edx
4006e1: 48 89 c7 mov %rax,%rdi
4006e4: b0 00 mov $0x0,%al
4006e6: e8 45 fd ff ff callq 400430 <printf@plt>
4006eb: bf 02 00 00 00 mov $0x2,%edi
4006f0: 89 45 d0 mov %eax,-0x30(%rbp)
4006f3: e8 38 fe ff ff callq 400530 <pow@plt+0xf0>
4006f8: 48 bf 5e 09 40 00 00 movabs $0x40095e,%rdi
4006ff: 00 00 00
400702: 89 c6 mov %eax,%esi
400704: b0 00 mov $0x0,%al
400706: e8 25 fd ff ff callq 400430 <printf@plt>
40070b: bf 02 00 00 00 mov $0x2,%edi
400710: 89 45 cc mov %eax,-0x34(%rbp)
400713: e8 48 fe ff ff callq 400560 <pow@plt+0x120>
400718: 48 bf 6e 09 40 00 00 movabs $0x40096e,%rdi
40071f: 00 00 00
400722: 89 c6 mov %eax,%esi
400724: b0 00 mov $0x0,%al
400726: e8 05 fd ff ff callq 400430 <printf@plt>
40072b: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
400732: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%rbp)
400739: 89 45 c8 mov %eax,-0x38(%rbp)
40073c: 83 7d e4 05 cmpl $0x5,-0x1c(%rbp)
400740: 0f 8f 1c 00 00 00 jg 400762 <pow@plt+0x322>
400746: 8b 7d e4 mov -0x1c(%rbp),%edi
400749: e8 e2 fd ff ff callq 400530 <pow@plt+0xf0>
40074e: 03 45 e8 add -0x18(%rbp),%eax
400751: 89 45 e8 mov %eax,-0x18(%rbp)
400754: 8b 45 e4 mov -0x1c(%rbp),%eax
400757: 83 c0 01 add $0x1,%eax
40075a: 89 45 e4 mov %eax,-0x1c(%rbp)
40075d: e9 da ff ff ff jmpq 40073c <pow@plt+0x2fc>
400762: 48 bf 7e 09 40 00 00 movabs $0x40097e,%rdi
400769: 00 00 00
40076c: 8b 75 e8 mov -0x18(%rbp),%esi
40076f: b0 00 mov $0x0,%al
400771: e8 ba fc ff ff callq 400430 <printf@plt>
400776: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
40077d: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%rbp)
400784: 89 45 c4 mov %eax,-0x3c(%rbp)
400787: 83 7d e0 05 cmpl $0x5,-0x20(%rbp)
40078b: 0f 8f 1c 00 00 00 jg 4007ad <pow@plt+0x36d>
400791: 8b 7d e0 mov -0x20(%rbp),%edi
400794: e8 97 fd ff ff callq 400530 <pow@plt+0xf0>
400799: 03 45 e8 add -0x18(%rbp),%eax
40079c: 89 45 e8 mov %eax,-0x18(%rbp)
40079f: 8b 45 e0 mov -0x20(%rbp),%eax
4007a2: 83 c0 01 add $0x1,%eax
4007a5: 89 45 e0 mov %eax,-0x20(%rbp)
4007a8: e9 da ff ff ff jmpq 400787 <pow@plt+0x347>
4007ad: 48 bf 87 09 40 00 00 movabs $0x400987,%rdi
4007b4: 00 00 00
4007b7: 8b 75 e8 mov -0x18(%rbp),%esi
4007ba: b0 00 mov $0x0,%al
4007bc: e8 6f fc ff ff callq 400430 <printf@plt>
4007c1: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%rbp)
4007c8: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%rbp)
4007cf: c7 45 d8 00 00 00 00 movl $0x0,-0x28(%rbp)
4007d6: 89 45 c0 mov %eax,-0x40(%rbp)
4007d9: 83 7d d8 14 cmpl $0x14,-0x28(%rbp)
4007dd: 0f 8f 2d 00 00 00 jg 400810 <pow@plt+0x3d0>
4007e3: 8b 7d d8 mov -0x28(%rbp),%edi
4007e6: e8 45 fd ff ff callq 400530 <pow@plt+0xf0>
4007eb: 83 f8 00 cmp $0x0,%eax
4007ee: 0f 85 09 00 00 00 jne 4007fd <pow@plt+0x3bd>
4007f4: 8b 45 dc mov -0x24(%rbp),%eax
4007f7: 83 c0 01 add $0x1,%eax
4007fa: 89 45 dc mov %eax,-0x24(%rbp)
4007fd: e9 00 00 00 00 jmpq 400802 <pow@plt+0x3c2>
400802: 8b 45 d8 mov -0x28(%rbp),%eax
400805: 83 c0 01 add $0x1,%eax
400808: 89 45 d8 mov %eax,-0x28(%rbp)
40080b: e9 c9 ff ff ff jmpq 4007d9 <pow@plt+0x399>
400810: 48 bf 92 09 40 00 00 movabs $0x400992,%rdi
400817: 00 00 00
40081a: 8b 75 dc mov -0x24(%rbp),%esi
40081d: b0 00 mov $0x0,%al
40081f: e8 0c fc ff ff callq 400430 <printf@plt>
400824: bf 14 00 00 00 mov $0x14,%edi
400829: c7 45 d4 05 00 00 00 movl $0x5,-0x2c(%rbp)
400830: 89 45 bc mov %eax,-0x44(%rbp)
400833: e8 b8 fd ff ff callq 4005f0 <pow@plt+0x1b0>
400838: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi
40083f: 00 00 00
400842: 89 45 b8 mov %eax,-0x48(%rbp)
400845: b0 00 mov $0x0,%al
400847: e8 e4 fb ff ff callq 400430 <printf@plt>
40084c: bf 14 00 00 00 mov $0x14,%edi
400851: 89 45 b4 mov %eax,-0x4c(%rbp)
400854: e8 e7 fd ff ff callq 400640 <pow@plt+0x200>
400859: 48 bf 6c 09 40 00 00 movabs $0x40096c,%rdi
400860: 00 00 00
400863: 89 45 b0 mov %eax,-0x50(%rbp)
400866: b0 00 mov $0x0,%al
400868: e8 c3 fb ff ff callq 400430 <printf@plt>
40086d: 8b 3c 25 38 10 60 00 mov 0x601038,%edi
400874: 8b 75 ec mov -0x14(%rbp),%esi
400877: 89 45 ac mov %eax,-0x54(%rbp)
40087a: e8 11 fe ff ff callq 400690 <pow@plt+0x250>
40087f: 89 45 ec mov %eax,-0x14(%rbp)
400882: 8b 45 ec mov -0x14(%rbp),%eax
400885: 48 83 c4 60 add $0x60,%rsp
400889: 5d pop %rbp
40088a: c3 retq
40088b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
400890: 41 57 push %r15
400892: 41 56 push %r14
400894: 41 89 ff mov %edi,%r15d
400897: 41 55 push %r13
400899: 41 54 push %r12
40089b: 4c 8d 25 5e 05 20 00 lea 0x20055e(%rip),%r12 # 600e00 <pow@plt+0x2009c0>
4008a2: 55 push %rbp
4008a3: 48 8d 2d 5e 05 20 00 lea 0x20055e(%rip),%rbp # 600e08 <pow@plt+0x2009c8>
4008aa: 53 push %rbx
4008ab: 49 89 f6 mov %rsi,%r14
4008ae: 49 89 d5 mov %rdx,%r13
4008b1: 4c 29 e5 sub %r12,%rbp
4008b4: 48 83 ec 08 sub $0x8,%rsp
4008b8: 48 c1 fd 03 sar $0x3,%rbp
4008bc: e8 47 fb ff ff callq 400408 <printf@plt-0x28>
4008c1: 48 85 ed test %rbp,%rbp
4008c4: 74 20 je 4008e6 <pow@plt+0x4a6>
4008c6: 31 db xor %ebx,%ebx
4008c8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
4008cf: 00
4008d0: 4c 89 ea mov %r13,%rdx
4008d3: 4c 89 f6 mov %r14,%rsi
4008d6: 44 89 ff mov %r15d,%edi
4008d9: 41 ff 14 dc callq *(%r12,%rbx,8)
4008dd: 48 83 c3 01 add $0x1,%rbx
4008e1: 48 39 dd cmp %rbx,%rbp
4008e4: 75 ea jne 4008d0 <pow@plt+0x490>
4008e6: 48 83 c4 08 add $0x8,%rsp
4008ea: 5b pop %rbx
4008eb: 5d pop %rbp
4008ec: 41 5c pop %r12
4008ee: 41 5d pop %r13
4008f0: 41 5e pop %r14
4008f2: 41 5f pop %r15
4008f4: c3 retq
4008f5: 90 nop
4008f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
4008fd: 00 00 00
400900: f3 c3 repz retq
Disassembly of section .fini:
0000000000400904 <.fini>:
400904: 48 83 ec 08 sub $0x8,%rsp
400908: 48 83 c4 08 add $0x8,%rsp
40090c: c3 retq

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,164 +0,0 @@
// file: main_02_MENT.cpp
// THIS IS C++, use clang++
#include <iostream>
#include "../helpers/println.hpp"
struct PascalString{
int length; // number of chars used
char characters[256]; // chars of some character string
};
char cStringArea[1024];
int hexDigitToInt(char hexDigit) {
int value = 0;
if(hexDigit > 47 && hexDigit < 58)
value = hexDigit - 48;
if(hexDigit > 96 && hexDigit < 103)
value = hexDigit - 97 + 10;
return value;
}
int hexStringToInt(PascalString binaryDigits) {
int returnValue = 0;
for(int i = 0; i <= binaryDigits.length; ++i) {
returnValue += binaryDigits.characters[i];
}
return returnValue;
}
void printPascalString(PascalString s) {
for(int i = 0; i <= s.length; i++) {
print(s.characters[i]);
}
println(""
);
}
PascalString intToDual(int n) {
int i = std::to_string(n).length() * 4;
PascalString string = {i};
while(n >= 1) {
string.characters[i] = (n % 2) + '0';
n = n / 2;
i--;
}
return string;
}
char intToHexChar(int n) {
if(n > 9) {
switch(n) {
case 10: return 'A';
case 11: return 'B';
case 12: return 'C';
case 13: return 'D';
case 14: return 'E';
case 15: return 'F';
default: return 'X';
}
}
else return n + '0';
}
PascalString intToHex(int n) {
int i = std::to_string(n).length();
PascalString string = {i};
while(n >= 1) {
string.characters[i] = intToHexChar(n % 16);
n = n / 16;
i--;
}
return string;
}
PascalString bitwiseDualAnd(PascalString a, PascalString b) {
PascalString shortString = a.length < b.length ? a : b;
PascalString longString = a.length > b.length ? a : b;
PascalString result = {longString.length, '0'};
for(int i = longString.length; i >= 0; --i) {
if(shortString.length < i) result.characters[i] = longString.characters[i];
result.characters[i] = longString.characters[i] & shortString.characters[i];
}
return result;
}
PascalString bitwiseHexAnd(PascalString a, PascalString b) {
PascalString shortString = a.length < b.length ? a : b;
PascalString longString = a.length > b.length ? a : b;
PascalString result = {longString.length, '0'};
for(int i = longString.length; i >= 0; --i) {
if(shortString.length < i) result.characters[i] = longString.characters[i];
result.characters[i] = longString.characters[i] & shortString.characters[i];
}
return result;
}
int to_c_string(PascalString s) {
}
void line() {
println("===================================");
}
int main(int argc, char** argv, char** envp) {
PascalString s = {3, '1', '0', '0'};
PascalString s2 = {4, 'f', 'f', 'f', 'f'};
println(hexStringToInt(s));
line();
println(hexStringToInt(s2));
line();
println(hexDigitToInt('d'));
line();
println(hexDigitToInt('9'));
line();
println(hexDigitToInt('2'));
printPascalString(s2);
line();
int controlRegister = 128;
controlRegister |= 64+32;
controlRegister ^=16;
controlRegister &= 128+64;
controlRegister <<= 1;
println(controlRegister);
line();
println(intToHexChar(6));
line();
println(intToHexChar(10));
line();
printPascalString(intToDual(4106));
line();
printPascalString(intToHex(965));
line();
printPascalString(intToHex(1956));
line();
printPascalString(bitwiseDualAnd({3, '1', '1', '0'}, {4, '1', '1', '1', '0'}));
line();
printPascalString(bitwiseDualAnd({3, '1', '1', '1'}, {4, '1', '1', '1', '0'}));
line();
printPascalString(bitwiseDualAnd({3, '1', '1', '0'}, {4, '1', '1', '1', '1'}));
line();
printPascalString(bitwiseDualAnd({3, '0', '1', '0'}, {4, '1', '0', '1', '1'}));
return 0;
}

Binary file not shown.

View File

@ -1,259 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
654370B41E9788E30085F153 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 654370B31E9788E30085F153 /* main.cpp */; };
654371471E9ED16D0085F153 /* typedMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 654371451E9ED16D0085F153 /* typedMemory.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
654370AE1E9788E30085F153 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
654370B01E9788E30085F153 /* typedMemory */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = typedMemory; sourceTree = BUILT_PRODUCTS_DIR; };
654370B31E9788E30085F153 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
654371451E9ED16D0085F153 /* typedMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = typedMemory.cpp; sourceTree = "<group>"; };
654371461E9ED16D0085F153 /* typedMemory.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = typedMemory.hpp; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
654370AD1E9788E30085F153 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
654370A71E9788E30085F153 = {
isa = PBXGroup;
children = (
654370B21E9788E30085F153 /* typedMemory */,
654370B11E9788E30085F153 /* Products */,
);
sourceTree = "<group>";
};
654370B11E9788E30085F153 /* Products */ = {
isa = PBXGroup;
children = (
654370B01E9788E30085F153 /* typedMemory */,
);
name = Products;
sourceTree = "<group>";
};
654370B21E9788E30085F153 /* typedMemory */ = {
isa = PBXGroup;
children = (
654370B31E9788E30085F153 /* main.cpp */,
654371451E9ED16D0085F153 /* typedMemory.cpp */,
654371461E9ED16D0085F153 /* typedMemory.hpp */,
);
path = typedMemory;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
654370AF1E9788E30085F153 /* typedMemory */ = {
isa = PBXNativeTarget;
buildConfigurationList = 654370B71E9788E30085F153 /* Build configuration list for PBXNativeTarget "typedMemory" */;
buildPhases = (
654370AC1E9788E30085F153 /* Sources */,
654370AD1E9788E30085F153 /* Frameworks */,
654370AE1E9788E30085F153 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = typedMemory;
productName = typedMemory;
productReference = 654370B01E9788E30085F153 /* typedMemory */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
654370A81E9788E30085F153 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = HSEL;
TargetAttributes = {
654370AF1E9788E30085F153 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 654370AB1E9788E30085F153 /* Build configuration list for PBXProject "typedMemory" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 654370A71E9788E30085F153;
productRefGroup = 654370B11E9788E30085F153 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
654370AF1E9788E30085F153 /* typedMemory */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
654370AC1E9788E30085F153 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
654370B41E9788E30085F153 /* main.cpp in Sources */,
654371471E9ED16D0085F153 /* typedMemory.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
654370B51E9788E30085F153 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
654370B61E9788E30085F153 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
654370B81E9788E30085F153 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
654370B91E9788E30085F153 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
654370AB1E9788E30085F153 /* Build configuration list for PBXProject "typedMemory" */ = {
isa = XCConfigurationList;
buildConfigurations = (
654370B51E9788E30085F153 /* Debug */,
654370B61E9788E30085F153 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
654370B71E9788E30085F153 /* Build configuration list for PBXNativeTarget "typedMemory" */ = {
isa = XCConfigurationList;
buildConfigurations = (
654370B81E9788E30085F153 /* Debug */,
654370B91E9788E30085F153 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 654370A81E9788E30085F153 /* Project object */;
}

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:typedMemory.xcodeproj">
</FileRef>
</Workspace>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

View File

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "654370AF1E9788E30085F153"
BuildableName = "typedMemory"
BlueprintName = "typedMemory"
ReferencedContainer = "container:typedMemory.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "654370AF1E9788E30085F153"
BuildableName = "typedMemory"
BlueprintName = "typedMemory"
ReferencedContainer = "container:typedMemory.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "654370AF1E9788E30085F153"
BuildableName = "typedMemory"
BlueprintName = "typedMemory"
ReferencedContainer = "container:typedMemory.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "654370AF1E9788E30085F153"
BuildableName = "typedMemory"
BlueprintName = "typedMemory"
ReferencedContainer = "container:typedMemory.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>typedMemory.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>654370AF1E9788E30085F153</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

View File

@ -117,7 +117,7 @@ void Derived_2::virtualMethod(void){
compile time vs. run time binding compile time vs. run time binding
*/ */
void foobar(void){ void foobar(){
std::cout << "6a) "; std::cout << "6a) ";
Derived_2* pR = new Derived_2(); Derived_2* pR = new Derived_2();

View File

@ -1,7 +1,7 @@
#include <iostream> #include <iostream>
#include <cassert> #include <cassert>
#include <vector> #include <vector>
#include "println.hpp" #include "../helpers/println.hpp"
struct StackObject { struct StackObject {
@ -67,7 +67,7 @@ Wallet consumerWallet_A;
Wallet consumerWallet_B; Wallet consumerWallet_B;
Cash * createCashFor(int i){ Cash * createCashFor(int i){
return new Cash(static_cast<MoneyUnitType>(i)); return new Cash(i);
} }
void flushWallet(Wallet& toBeEmptied){ // should be in dtor of sorrounding class void flushWallet(Wallet& toBeEmptied){ // should be in dtor of sorrounding class

View File

@ -1,16 +1,36 @@
// #include <algorithm>
// Created by JThei on 17.06.2018. #include <vector>
// #include <iostream>
#include <list>
#include "Test.h" #include "Test.h"
int main() { int main() {
Derived * derived = new Derived(); Derived * derived = new Derived();
bar(derived); bar(derived);
delete derived; delete derived;
std::vector<int> v(100);
for (int j = 0; j < 10; ++j) {
v[j*j] = j;
}
v.push_back(17);
printVector(v);
std::sort(v.begin(), v.end());
printVector(v);
std::transform(v.begin(), v.end(), v.begin(), [] (int i) {return i * 10;});
printVector(v);
}
void printVector(std::vector<int> vector) {
if(!vector.empty()) {
std::cout << "Neuer Vector" << std::endl;
for(int i = 0; i < vector.size(); i++) {
std::cout <<"i=" << i << "|" << vector[i] << std::endl;
}
}
} }

View File

@ -21,5 +21,7 @@ void bar(Derived* derived) {
} }
void printVector(std::vector<int> vector);
#endif //TEST_BUILD_TEST_H #endif //TEST_BUILD_TEST_H

View File

@ -3,6 +3,8 @@ project(test_build)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
add_executable(MentalModel 02_MENT/main_02_MENT.cpp)
add_executable(UDEF_1 04_UDEF/main_04_UDEF_e.cpp) add_executable(UDEF_1 04_UDEF/main_04_UDEF_e.cpp)
#add_executable(UDEF_2 04_UDEF/main_04_UDEF_a.cpp) #add_executable(UDEF_2 04_UDEF/main_04_UDEF_a.cpp)
add_executable(UDEF_Testat 04_UDEF/Testat/Testat.cpp) add_executable(UDEF_Testat 04_UDEF/Testat/Testat.cpp)
@ -13,10 +15,14 @@ add_executable(OO_A 05_OO/main_mp4_OO_a_vehicles.cpp)
#add_executable(OO_Shapes 05_OO/shapes_main.cpp) #add_executable(OO_Shapes 05_OO/shapes_main.cpp)
add_executable(Poly 06_POLY/main_mp5_POLY.cpp)
add_executable(SequenceDiagram 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp 11_PUTT/05_OO_b/main.cpp) add_executable(SequenceDiagram 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp 11_PUTT/05_OO_b/main.cpp)
add_executable(LCDDisplay 11_PUTT/02_Ment/LCDDisplay.cpp) add_executable(LCDDisplay 11_PUTT/02_Ment/LCDDisplay.cpp)
add_executable(CopyOnWrite 11_PUTT/CopyOnWrite/OneByOneMatrix.cpp 11_PUTT/CopyOnWrite/LargeCowMatrix.cpp 11_PUTT/CopyOnWrite/main.cpp) add_executable(CopyOnWrite 11_PUTT/CopyOnWrite/OneByOneMatrix.cpp 11_PUTT/CopyOnWrite/LargeCowMatrix.cpp 11_PUTT/CopyOnWrite/main.cpp)
#add_executable(Test 11_PUTT/Test.cpp) add_executable(Banking 10_PITF/banking_base_rawptr.cpp)
add_executable(Test 11_PUTT/Test.cpp)