// File: /workspace/github_cpp_makefile_star2_O3/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 $0x218, %rsp            # imm = 0x218
xorl %eax, %eax
movq %rax, -0x118(%rbp)
leaq -0x35(%rip), %rcx       # 0x227c
movq %rcx, -0x120(%rbp)
leaq 0xb03(%rip), %rcx       # 0x2dc2
movq %rcx, -0x108(%rbp)
leaq 0xafd(%rip), %rcx       # 0x2dca
movq %rcx, -0x110(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x1c0(%rbp)
leaq 0x52d(%rip), %rcx       # 0x2812
movq %rcx, -0x1a8(%rbp)
leaq 0x531(%rip), %rcx       # 0x2824
movq %rcx, -0x1b0(%rbp)
movaps %xmm0, -0x1a0(%rbp)
leaq 0x53a(%rip), %rcx       # 0x2842
movq %rcx, -0x188(%rbp)
leaq 0x53e(%rip), %rcx       # 0x2854
movq %rcx, -0x190(%rbp)
movq %rax, -0xf8(%rbp)
movl $0x18, %edi
callq 0x20f0
leaq 0x9e9(%rip), %rcx       # 0x2d1e
movq %rcx, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, -0x100(%rbp)
leaq 0xaa6(%rip), %rbx       # 0x2df2
movq %rbx, -0xe8(%rbp)
leaq 0xabe(%rip), %r14       # 0x2e18
movq %r14, -0xf0(%rbp)
movq %rcx, -0xd8(%rbp)
movl $0x18, %edi
callq 0x20f0
leaq 0x9b7(%rip), %rcx       # 0x2d30
movq %rcx, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, -0xe0(%rbp)
movq %rbx, -0xc8(%rbp)
movq %r14, -0xd0(%rbp)
movq %rcx, -0xb8(%rbp)
movl $0x20, %edi
callq 0x20f0
movq 0x4c21(%rip), %rcx      # 0x6fd0
movq %rcx, (%rax)
movl $0x7df, 0x8(%rax)       # imm = 0x7DF
leaq 0x1c72(%rip), %rcx      # 0x4032
movq %rcx, 0x10(%rax)
leaq 0x1c59(%rip), %rcx      # 0x4024
movq %rcx, 0x18(%rax)
movq %rax, -0xc0(%rbp)
leaq 0xac3(%rip), %rax       # 0x2ea0
movq %rax, -0xa8(%rbp)
leaq 0xacf(%rip), %rax       # 0x2eba
movq %rax, -0xb0(%rbp)
leaq 0x1c45(%rip), %rdi      # 0x403e
leaq 0x1cac(%rip), %rsi      # 0x40ac
callq 0x2100
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x26af
movq $0x0, -0x98(%rbp)
leaq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0x443(%rip), %rax       # 0x2872
movq %rax, -0x88(%rbp)
leaq 0x45b(%rip), %rax       # 0x2898
movq %rax, -0x90(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x2030
leaq -0x1c8(%rbp), %rcx
movq %rax, (%rcx)
xorl %r12d, %r12d
movq %r12, -0x78(%rbp)
movq %rcx, -0x80(%rbp)
leaq 0x458(%rip), %rax       # 0x28c2
movq %rax, -0x68(%rbp)
leaq 0x47b(%rip), %rax       # 0x28f0
movq %rax, -0x70(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x180(%rbp)
leaq 0x490(%rip), %rax       # 0x291a
movq %rax, -0x168(%rbp)
leaq 0x49a(%rip), %rax       # 0x2932
movq %rax, -0x170(%rbp)
movaps %xmm0, -0x160(%rbp)
leaq 0x4a3(%rip), %rax       # 0x2950
movq %rax, -0x148(%rbp)
leaq 0x4ad(%rip), %rax       # 0x2968
movq %rax, -0x150(%rbp)
movaps %xmm0, -0x140(%rbp)
leaq 0x4b6(%rip), %rax       # 0x2986
movq %rax, -0x128(%rbp)
leaq 0x4c0(%rip), %rax       # 0x299e
movq %rax, -0x130(%rbp)
leaq -0x240(%rbp), %rbx
movaps %xmm0, (%rbx)
leaq 0x4c6(%rip), %rax       # 0x29bc
movq %rax, 0x18(%rbx)
leaq 0x4d3(%rip), %rax       # 0x29d4
movq %rax, 0x10(%rbx)
leaq -0x210(%rbp), %r15
movaps %xmm0, (%r15)
leaq 0x4db(%rip), %rax       # 0x29f2
movq %rax, 0x18(%r15)
leaq 0x4e8(%rip), %rax       # 0x2a0a
movq %rax, 0x10(%r15)
leaq -0x1f0(%rbp), %r14
movaps %xmm0, (%r14)
leaq 0x4f0(%rip), %rax       # 0x2a28
movq %rax, 0x18(%r14)
leaq 0x4fd(%rip), %rax       # 0x2a40
movq %rax, 0x10(%r14)
movq %r14, %rdi
callq 0x2d42
movq %r15, %rdi
callq 0x2d42
movq %rbx, %rdi
callq 0x2d42
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
leaq 0x4f1(%rip), %rax       # 0x2a5e
movq %rax, 0x18(%r15)
leaq 0x556(%rip), %rax       # 0x2ace
movq %rax, 0x10(%r15)
movq %r12, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
leaq -0x3c(%rbp), %rax
movl $0x0, (%rax)
movq %r12, 0x8(%r14)
movq %rax, (%r14)
leaq 0x685(%rip), %rax       # 0x2c24
movq %rax, 0x18(%r14)
leaq 0x692(%rip), %rax       # 0x2c3c
movq %rax, 0x10(%r14)
leaq -0x60(%rbp), %r14
movq %r12, 0x10(%r14)
movaps %xmm0, (%r14)
movl $0x1, %ebx
leaq 0x4722(%rip), %r13      # 0x6ce8
leaq -0x30(%rbp), %r15
leaq -0x38(%rbp), %r12
movq $0x0, -0x30(%rbp)
movl $0x20, %edi
callq 0x20f0
movq %r13, (%rax)
movl %ebx, 0x8(%rax)
leaq -0x240(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq -0x3c(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq %rax, -0x38(%rbp)
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x20c0
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2619
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f42
cmpq $0x0, -0x30(%rbp)
jne 0x280c
incl %ebx
cmpl $0x65, %ebx
jne 0x25ce
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %r14
cmpq %r14, %rbx
je 0x2651
movq %rbx, %rdi
callq 0x2140
addq $0x8, %rbx
jmp 0x263e
leaq -0x60(%rbp), %rdi
callq 0x2d7c
leaq -0x1f0(%rbp), %rdi
callq 0x2d42
leaq -0x210(%rbp), %rdi
callq 0x2d42
leaq -0x140(%rbp), %rdi
callq 0x2d42
leaq -0x160(%rbp), %rdi
callq 0x2d42
leaq -0x180(%rbp), %rdi
callq 0x2d42
leaq -0x80(%rbp), %rdi
callq 0x2d42
leaq -0xa0(%rbp), %rdi
callq 0x2d42
xorl %ebx, %ebx
jmp 0x26c0
leaq 0x19fe(%rip), %rdi      # 0x40b4
callq 0x2130
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq -0xc0(%rbp), %rdi
callq 0x2d42
leaq -0xe0(%rbp), %rdi
callq 0x2d42
leaq -0x100(%rbp), %rdi
callq 0x2d42
leaq -0x1a0(%rbp), %rdi
callq 0x2d42
leaq -0x1c0(%rbp), %rdi
callq 0x2d42
leaq -0x120(%rbp), %rdi
callq 0x2d42
movl %ebx, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x27b0
movq %rax, %rbx
jmp 0x27c8
movq %rax, %rbx
jmp 0x27d4
movq %rax, %rbx
jmp 0x27e0
jmp 0x275f
jmp 0x275f
movq %rax, %rbx
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2762
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2762
cmpq $0x0, -0x30(%rbp)
jne 0x280c
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2d7c
leaq -0x1f0(%rbp), %rdi
callq 0x2d42
leaq -0x210(%rbp), %rdi
callq 0x2d42
leaq -0x140(%rbp), %rdi
callq 0x2d42
leaq -0x160(%rbp), %rdi
callq 0x2d42
leaq -0x180(%rbp), %rdi
callq 0x2d42
leaq -0x80(%rbp), %rdi
callq 0x2d42
leaq -0xa0(%rbp), %rdi
callq 0x2d42
leaq -0xc0(%rbp), %rdi
callq 0x2d42
leaq -0xe0(%rbp), %rdi
callq 0x2d42
leaq -0x100(%rbp), %rdi
callq 0x2d42
leaq -0x1a0(%rbp), %rdi
callq 0x2d42
leaq -0x1c0(%rbp), %rdi
callq 0x2d42
leaq -0x120(%rbp), %rdi
callq 0x2d42
movq %rbx, %rdi
callq 0x2150
callq 0x2040
nop