// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, -0xe8(%rbp)
leaq -0x34(%rip), %rax       # 0x226c
movq %rax, -0xf0(%rbp)
leaq 0xaba(%rip), %rax       # 0x2d68
movq %rax, -0xd8(%rbp)
leaq 0xab4(%rip), %rax       # 0x2d70
movq %rax, -0xe0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x190(%rbp)
leaq 0x4d4(%rip), %rax       # 0x27a8
movq %rax, -0x178(%rbp)
leaq 0x4d8(%rip), %rax       # 0x27ba
movq %rax, -0x180(%rbp)
movaps %xmm0, -0x170(%rbp)
leaq 0x4e1(%rip), %rax       # 0x27d8
movq %rax, -0x158(%rbp)
leaq 0x4e5(%rip), %rax       # 0x27ea
movq %rax, -0x160(%rbp)
leaq 0x985(%rip), %rax       # 0x2c98
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
leaq -0x240(%rbp), %rdi
callq 0x2d98
leaq 0x978(%rip), %rax       # 0x2caa
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
andq $0x0, 0x8(%rsi)
leaq -0x220(%rbp), %rdi
callq 0x2d98
movq 0x4c7f(%rip), %rax      # 0x6fd0
leaq -0x70(%rbp), %rsi
movq %rax, (%rsi)
movl $0x7df, 0x8(%rsi)       # imm = 0x7DF
leaq 0x1ccc(%rip), %rax      # 0x4032
movq %rax, 0x10(%rsi)
leaq 0x1cb3(%rip), %rax      # 0x4024
movq %rax, 0x18(%rsi)
leaq -0x200(%rbp), %rdi
callq 0x2ebc
leaq 0x1cb6(%rip), %rdi      # 0x403e
leaq 0x1d1d(%rip), %rsi      # 0x40ac
callq 0x2110
movq %rax, -0x78(%rbp)
testq %rax, %rax
je 0x2645
andq $0x0, -0xc8(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq 0x44d(%rip), %rax       # 0x2808
movq %rax, -0xb8(%rbp)
leaq 0x465(%rip), %rax       # 0x282e
movq %rax, -0xc0(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x2030
andq $0x0, -0xa8(%rbp)
leaq -0x198(%rbp), %rcx
movq %rax, (%rcx)
movq %rcx, -0xb0(%rbp)
leaq 0x45e(%rip), %rax       # 0x2858
movq %rax, -0x98(%rbp)
leaq 0x47e(%rip), %rax       # 0x2886
movq %rax, -0xa0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x150(%rbp)
leaq 0x490(%rip), %rax       # 0x28b0
movq %rax, -0x138(%rbp)
leaq 0x49a(%rip), %rax       # 0x28c8
movq %rax, -0x140(%rbp)
movaps %xmm0, -0x130(%rbp)
leaq 0x4a3(%rip), %rax       # 0x28e6
movq %rax, -0x118(%rbp)
leaq 0x4ad(%rip), %rax       # 0x28fe
movq %rax, -0x120(%rbp)
movaps %xmm0, -0x110(%rbp)
leaq 0x4b6(%rip), %rax       # 0x291c
movq %rax, -0xf8(%rbp)
leaq 0x4c0(%rip), %rax       # 0x2934
movq %rax, -0x100(%rbp)
movaps %xmm0, -0x70(%rbp)
leaq 0x4cc(%rip), %rax       # 0x2952
movq %rax, -0x58(%rbp)
leaq 0x4d9(%rip), %rax       # 0x296a
movq %rax, -0x60(%rbp)
leaq -0x1e0(%rbp), %r15
movaps %xmm0, (%r15)
leaq 0x4e1(%rip), %rax       # 0x2988
movq %rax, 0x18(%r15)
leaq 0x4ee(%rip), %rax       # 0x29a0
movq %rax, 0x10(%r15)
leaq -0x1c0(%rbp), %r14
movaps %xmm0, (%r14)
leaq 0x4f6(%rip), %rax       # 0x29be
movq %rax, 0x18(%r14)
leaq 0x503(%rip), %rax       # 0x29d6
movq %rax, 0x10(%r14)
movq %r14, %rdi
callq 0x2cbc
movq %r15, %rdi
callq 0x2cbc
leaq -0x70(%rbp), %rdi
callq 0x2cbc
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
leaq 0x4f6(%rip), %rax       # 0x29f4
movq %rax, 0x18(%r15)
leaq 0x553(%rip), %rax       # 0x2a5c
movq %rax, 0x10(%r15)
andq $0x0, -0x50(%rbp)
leaq -0x34(%rbp), %rax
andl $0x0, (%rax)
movaps %xmm0, -0x60(%rbp)
andq $0x0, 0x8(%r14)
movaps %xmm0, -0x70(%rbp)
movq %rax, (%r14)
leaq 0x67c(%rip), %rax       # 0x2bac
movq %rax, 0x18(%r14)
leaq 0x689(%rip), %rax       # 0x2bc4
movq %rax, 0x10(%r14)
leaq -0x90(%rbp), %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
pushq $0x1
popq %rbx
leaq 0x478f(%rip), %r15      # 0x6ce8
leaq -0x40(%rbp), %r12
leaq -0x30(%rbp), %r13
cmpl $0x65, %ebx
je 0x25c0
andq $0x0, -0x40(%rbp)
pushq $0x20
popq %rdi
callq 0x2100
movq %r15, (%rax)
movl %ebx, 0x8(%rax)
leaq -0x70(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq -0x34(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq %rax, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x20d0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x25a9
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x301e
movq %r12, %rdi
callq 0x2cea
incl %ebx
jmp 0x2561
movq -0x90(%rbp), %rbx
movq -0x88(%rbp), %r14
cmpq %r14, %rbx
je 0x25e1
movq %rbx, %rdi
callq 0x2150
addq $0x8, %rbx
jmp 0x25ce
leaq -0x90(%rbp), %rdi
callq 0x2cfa
leaq -0x1c0(%rbp), %rdi
callq 0x2cbc
leaq -0x1e0(%rbp), %rdi
callq 0x2cbc
leaq -0x110(%rbp), %rdi
callq 0x2cbc
leaq -0x130(%rbp), %rdi
callq 0x2cbc
leaq -0x150(%rbp), %rdi
callq 0x2cbc
leaq -0xb0(%rbp), %rdi
callq 0x2cbc
leaq -0xd0(%rbp), %rdi
callq 0x2cbc
xorl %ebx, %ebx
jmp 0x2654
leaq 0x1a68(%rip), %rdi      # 0x40b4
callq 0x2140
pushq $-0x1
popq %rbx
leaq -0x200(%rbp), %rdi
callq 0x2cbc
leaq -0x220(%rbp), %rdi
callq 0x2cbc
leaq -0x240(%rbp), %rdi
callq 0x2cbc
leaq -0x170(%rbp), %rdi
callq 0x2cbc
leaq -0x190(%rbp), %rdi
callq 0x2cbc
leaq -0xf0(%rbp), %rdi
callq 0x2cbc
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 0x274b
movq %rax, %rbx
jmp 0x2763
movq %rax, %rbx
jmp 0x276f
movq %rax, %rbx
jmp 0x277b
jmp 0x26d2
movq %rax, %rbx
jmp 0x26f7
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x26f7
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x26f7
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2cea
leaq -0x90(%rbp), %rdi
callq 0x2cfa
leaq -0x1c0(%rbp), %rdi
callq 0x2cbc
leaq -0x1e0(%rbp), %rdi
callq 0x2cbc
leaq -0x110(%rbp), %rdi
callq 0x2cbc
leaq -0x130(%rbp), %rdi
callq 0x2cbc
leaq -0x150(%rbp), %rdi
callq 0x2cbc
leaq -0xb0(%rbp), %rdi
callq 0x2cbc
leaq -0xd0(%rbp), %rdi
callq 0x2cbc
leaq -0x200(%rbp), %rdi
callq 0x2cbc
leaq -0x220(%rbp), %rdi
callq 0x2cbc
leaq -0x240(%rbp), %rdi
callq 0x2cbc
leaq -0x170(%rbp), %rdi
callq 0x2cbc
leaq -0x190(%rbp), %rdi
callq 0x2cbc
leaq -0xf0(%rbp), %rdi
callq 0x2cbc
movq %rbx, %rdi
callq 0x2160
nop