// File: /workspace/github_cpp_makefile_star2_O1/chai2010[P]defer/hello.cc
// Function: main
int main() {
	defer done;

	defer []{ printf("lambda 1\n"); };
	defer []{ printf("lambda 2\n"); };

	defer std::bind(&MyStruct::MethodA, MyStruct());
	defer std::bind(&MyStruct::MethodB, MyStruct());
	defer std::bind(printf, "printf %s %d\n", "hello world", 2015);

	FILE* fp = fopen("defer.h", "rt");
	if(fp == NULL) {
		printf("open \"defer.h\" failed!\n");
		return -1;
	}
	defer [&]{ printf("fclose(\"defer.h\")\n"); fclose(fp); }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
xorps %xmm0, %xmm0
movaps %xmm0, -0x110(%rbp)
movaps %xmm0, -0x100(%rbp)
leaq -0x3d(%rip), %rax       # 0x227c
movq %rax, -0x110(%rbp)
leaq 0xb47(%rip), %rax       # 0x2e0e
movq %rax, -0xf8(%rbp)
leaq 0xb41(%rip), %rax       # 0x2e16
movq %rax, -0x100(%rbp)
movaps %xmm0, -0x1d0(%rbp)
leaq 0x568(%rip), %rax       # 0x2852
movq %rax, -0x1b8(%rbp)
leaq 0x56c(%rip), %rax       # 0x2864
movq %rax, -0x1c0(%rbp)
movaps %xmm0, -0x1b0(%rbp)
leaq 0x575(%rip), %rax       # 0x2882
movq %rax, -0x198(%rbp)
leaq 0x579(%rip), %rax       # 0x2894
movq %rax, -0x1a0(%rbp)
movaps %xmm0, -0xe0(%rbp)
movaps %xmm0, -0xf0(%rbp)
movl $0x18, %edi
callq 0x20f0
leaq 0xa25(%rip), %rcx       # 0x2d66
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, -0xf0(%rbp)
leaq 0xae4(%rip), %rbx       # 0x2e3e
movq %rbx, -0xd8(%rbp)
leaq 0xafc(%rip), %r14       # 0x2e64
movq %r14, -0xe0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movl $0x18, %edi
callq 0x20f0
leaq 0x9e7(%rip), %rcx       # 0x2d78
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, -0xd0(%rbp)
movq %rbx, -0xb8(%rbp)
movq %r14, -0xc0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movl $0x20, %edi
callq 0x20f0
movq 0x4bfd(%rip), %rcx      # 0x6fd0
movq %rcx, (%rax)
movl $0x7df, 0x8(%rax)       # imm = 0x7DF
leaq 0x1c4e(%rip), %rcx      # 0x4032
movq %rcx, 0x10(%rax)
leaq 0x1c35(%rip), %rcx      # 0x4024
movq %rcx, 0x18(%rax)
movq %rax, -0xb0(%rbp)
leaq 0xaef(%rip), %rax       # 0x2ef0
movq %rax, -0x98(%rbp)
leaq 0xafb(%rip), %rax       # 0x2f0a
movq %rax, -0xa0(%rbp)
leaq 0x1c21(%rip), %rdi      # 0x403e
leaq 0x1c88(%rip), %rsi      # 0x40ac
callq 0x2100
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x26e4
xorps %xmm0, %xmm0
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x80(%rbp)
leaq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x45c(%rip), %rax       # 0x28b2
movq %rax, -0x78(%rbp)
leaq 0x477(%rip), %rax       # 0x28d8
movq %rax, -0x80(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x2030
leaq -0x1d8(%rbp), %rcx
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x60(%rbp)
movq %rcx, -0x70(%rbp)
leaq 0x473(%rip), %rax       # 0x2902
movq %rax, -0x58(%rbp)
leaq 0x496(%rip), %rax       # 0x2930
movq %rax, -0x60(%rbp)
movaps %xmm0, -0x190(%rbp)
leaq 0x4ae(%rip), %rax       # 0x295a
movq %rax, -0x178(%rbp)
leaq 0x4b8(%rip), %rax       # 0x2972
movq %rax, -0x180(%rbp)
movaps %xmm0, -0x170(%rbp)
leaq 0x4c1(%rip), %rax       # 0x2990
movq %rax, -0x158(%rbp)
leaq 0x4cb(%rip), %rax       # 0x29a8
movq %rax, -0x160(%rbp)
movaps %xmm0, -0x150(%rbp)
leaq 0x4d4(%rip), %rax       # 0x29c6
movq %rax, -0x138(%rbp)
leaq 0x4de(%rip), %rax       # 0x29de
movq %rax, -0x140(%rbp)
leaq -0x250(%rbp), %rbx
movaps %xmm0, (%rbx)
leaq 0x4e4(%rip), %rax       # 0x29fc
movq %rax, 0x18(%rbx)
leaq 0x4f1(%rip), %rax       # 0x2a14
movq %rax, 0x10(%rbx)
leaq -0x220(%rbp), %r15
movaps %xmm0, (%r15)
leaq 0x4f9(%rip), %rax       # 0x2a32
movq %rax, 0x18(%r15)
leaq 0x506(%rip), %rax       # 0x2a4a
movq %rax, 0x10(%r15)
leaq -0x200(%rbp), %r14
movaps %xmm0, (%r14)
leaq 0x50e(%rip), %rax       # 0x2a68
movq %rax, 0x18(%r14)
leaq 0x51b(%rip), %rax       # 0x2a80
movq %rax, 0x10(%r14)
movq %r14, %rdi
callq 0x2d8a
movq %r15, %rdi
callq 0x2d8a
movq %rbx, %rdi
callq 0x2d8a
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
leaq 0x50f(%rip), %rax       # 0x2a9e
movq %rax, 0x18(%r15)
leaq 0x576(%rip), %rax       # 0x2b10
movq %rax, 0x10(%r15)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
leaq -0x3c(%rbp), %rcx
movl $0x0, (%rcx)
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movq %rcx, (%r14)
leaq 0x6a2(%rip), %rcx       # 0x2c6a
movq %rcx, 0x18(%r14)
leaq 0x6af(%rip), %rcx       # 0x2c82
movq %rcx, 0x10(%r14)
leaq -0x130(%rbp), %r14
movq %rax, 0x10(%r14)
movaps %xmm0, (%r14)
movl $0x1, %ebx
leaq 0x46f6(%rip), %r13      # 0x6ce8
leaq -0x38(%rbp), %r15
leaq -0x30(%rbp), %r12
movq $0x0, -0x38(%rbp)
movl $0x20, %edi
callq 0x20f0
movq %r13, (%rax)
movl %ebx, 0x8(%rax)
leaq -0x250(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq -0x3c(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq %rax, -0x30(%rbp)
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x20c0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2645
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f98
cmpq $0x0, -0x38(%rbp)
jne 0x284c
incl %ebx
cmpl $0x65, %ebx
jne 0x25fa
movq -0x130(%rbp), %rbx
movq -0x128(%rbp), %r14
cmpq %r14, %rbx
je 0x2683
movq %rbx, %rdi
callq 0x2140
addq $0x8, %rbx
jmp 0x2670
leaq -0x130(%rbp), %rdi
callq 0x2dc8
leaq -0x200(%rbp), %rdi
callq 0x2d8a
leaq -0x220(%rbp), %rdi
callq 0x2d8a
leaq -0x150(%rbp), %rdi
callq 0x2d8a
leaq -0x170(%rbp), %rdi
callq 0x2d8a
leaq -0x190(%rbp), %rdi
callq 0x2d8a
leaq -0x70(%rbp), %rdi
callq 0x2d8a
leaq -0x90(%rbp), %rdi
callq 0x2d8a
xorl %ebx, %ebx
jmp 0x26f5
leaq 0x19c9(%rip), %rdi      # 0x40b4
callq 0x2130
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq -0xb0(%rbp), %rdi
callq 0x2d8a
leaq -0xd0(%rbp), %rdi
callq 0x2d8a
leaq -0xf0(%rbp), %rdi
callq 0x2d8a
leaq -0x1b0(%rbp), %rdi
callq 0x2d8a
leaq -0x1d0(%rbp), %rdi
callq 0x2d8a
leaq -0x110(%rbp), %rdi
callq 0x2d8a
movl %ebx, %eax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x27f0
movq %rax, %rbx
jmp 0x2808
movq %rax, %rbx
jmp 0x2814
movq %rax, %rbx
jmp 0x2820
jmp 0x279c
jmp 0x279c
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2787
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, -0x30(%rbp)
jmp 0x279f
cmpq $0x0, -0x38(%rbp)
jne 0x284c
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x2dc8
leaq -0x200(%rbp), %rdi
callq 0x2d8a
leaq -0x220(%rbp), %rdi
callq 0x2d8a
leaq -0x150(%rbp), %rdi
callq 0x2d8a
leaq -0x170(%rbp), %rdi
callq 0x2d8a
leaq -0x190(%rbp), %rdi
callq 0x2d8a
leaq -0x70(%rbp), %rdi
callq 0x2d8a
leaq -0x90(%rbp), %rdi
callq 0x2d8a
leaq -0xb0(%rbp), %rdi
callq 0x2d8a
leaq -0xd0(%rbp), %rdi
callq 0x2d8a
leaq -0xf0(%rbp), %rdi
callq 0x2d8a
leaq -0x1b0(%rbp), %rdi
callq 0x2d8a
leaq -0x1d0(%rbp), %rdi
callq 0x2d8a
leaq -0x110(%rbp), %rdi
callq 0x2d8a
movq %rbx, %rdi
callq 0x2150
callq 0x2040
nop