LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/chen3feng[P]error-handling/result.cpp
// Function: ParseInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Result<int, ErrnoError> ParseInt(const std::string& s) {
    errno = 0;
    char* end = const_cast<char*>(s.c_str());
    long n = strtol(s.c_str(), &end, 0);
    if (errno == 0) {
        if (*end != '\0') {
            errno = EINVAL;
        } else if (n > INT_MAX || n < INT_MIN) {
            errno = ERANGE;
        } else {
            return static_cast<int>(n);
        }
    }
    return ErrnoError(ErrnoType(errno));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2040
movq %rax, %r14
andl $0x0, (%rax)
movq (%r15), %rdi
leaq -0x20(%rbp), %rsi
movq %rdi, (%rsi)
xorl %edx, %edx
callq 0x2180
movl (%r14), %esi
testl %esi, %esi
jne 0x2589
movq -0x20(%rbp), %rcx
cmpb $0x0, (%rcx)
je 0x257b
pushq $0x16
jmp 0x2585
movslq %eax, %rcx
cmpq %rax, %rcx
je 0x25d6
pushq $0x22
popq %rsi
movl %esi, (%r14)
leaq 0x1a89(%rip), %rdx      # 0x4019
leaq 0x1a96(%rip), %r8       # 0x402d
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movl $0x11a, %ecx            # imm = 0x11A
callq 0x3368
movq (%r14), %rax
movq %rax, 0x8(%rbx)
leaq -0x28(%rbp), %rdi
movq (%rdi), %rax
andq $0x0, (%rdi)
movq %rax, 0x10(%rbx)
andq $0x0, -0x8(%rdi)
callq 0x2d2a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
jmp 0x25c8
// File: /workspace/github_cpp_makefile_star2_O2/chen3feng[P]error-handling/result.cpp
// Function: GetIntFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Result<int> GetIntFromFile(const std::string& filename) {
    // 下面每一步的都依赖上一步操作的结果。
    // TRY 遇到错误就会自动从当前函数返回，否则提取出真正的返回值。
    // 和错误码比，错误不能被无意中忽略；
    // 和异常比，代码更显式看出可能会出错，也一样能自动传播错误，但是代价较低，可控。
    auto&& f = TRY(OpenFile(filename));
    auto&& s = TRY(f.Read());
    auto&& n = TRY(ParseInt(s));
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x243b
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2643
cmpl $0x0, 0x8(%rax)
je 0x2643
leaq -0x28(%rbp), %rsi
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x2dba
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2b66
leaq -0x70(%rbp), %rdi
callq 0x2d2a
leaq -0x48(%rbp), %rdi
callq 0x2ba2
jmp 0x2749
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2160
leaq -0x48(%rbp), %rdi
callq 0x2ba2
leaq -0x48(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x2bd4
movq -0x28(%rbp), %rax
testq %rax, %rax
je 0x26af
cmpl $0x0, 0x8(%rax)
je 0x26af
leaq -0x28(%rbp), %rsi
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x2dba
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2b66
leaq -0x60(%rbp), %rdi
callq 0x2d2a
leaq -0x48(%rbp), %rdi
callq 0x2c32
jmp 0x273d
leaq -0x98(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2160
leaq -0x48(%rbp), %rdi
callq 0x2c32
leaq -0x48(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2538
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x2712
cmpl $0x0, 0x8(%rax)
je 0x2712
leaq -0x40(%rbp), %rsi
leaq -0x58(%rbp), %r14
movq %r14, %rdi
callq 0x2dba
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2b66
leaq -0x50(%rbp), %rdi
callq 0x2d2a
xorl %r14d, %r14d
jmp 0x2719
movb $0x1, %r14b
movl -0x48(%rbp), %r15d
leaq -0x38(%rbp), %rdi
callq 0x2d2a
testb %r14b, %r14b
je 0x2731
movl %r15d, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
leaq -0x98(%rbp), %rdi
callq 0x20a0
leaq -0xb8(%rbp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2d2a
leaq -0x38(%rbp), %rdi
callq 0x2d2a
jmp 0x2782
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2d2a
jmp 0x2793
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x20a0
jmp 0x27af
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2c32
jmp 0x27af
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2d2a
jmp 0x27c0
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x20a0
jmp 0x27c9
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2ba2
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/chen3feng[P]error-handling/result.cpp
// Function: main
int main() {
    auto r = GetIntFromFile("bad");
    if (r.Error()) {
        std::cout
            << "In " << r.Error().File() << ":" << r.Error().Line() << ":" << r.Error().Function()
            << " Code: " << r.Error().Code() << '\n';
    }
    std::cout << r.ValueOr(-1) << '\n';
    std::cout << GetIntFromFile("number").Value() << '\n';

    // 可以显式地忽略错误，如果不加这个，Result 定义上的 [[nodiscard]] 属性会导致编译器警告，提醒开发者。
    FlushAll().IgnoreError();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
leaq 0x17dd(%rip), %rsi      # 0x400f
leaq -0x50(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x2c64
leaq -0x28(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x25e1
leaq -0x50(%rbp), %rdi
callq 0x20a0
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x2912
cmpl $0x0, 0x8(%rax)
je 0x2907
movq 0x4765(%rip), %rdi      # 0x6fd8
leaq 0x17bc(%rip), %rsi      # 0x4036
callq 0x2100
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rsi
movq %rax, %rdi
callq 0x2100
leaq 0x17a4(%rip), %rsi      # 0x403a
movq %rax, %rdi
callq 0x2100
movq -0x20(%rbp), %rcx
movl 0x18(%rcx), %esi
movq %rax, %rdi
callq 0x21d0
leaq 0x1786(%rip), %rsi      # 0x403a
movq %rax, %rdi
callq 0x2100
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rsi
movq %rax, %rdi
callq 0x2100
leaq 0x1769(%rip), %rsi      # 0x403c
movq %rax, %rdi
callq 0x2100
movq -0x20(%rbp), %rcx
testq %rcx, %rcx
je 0x28e9
movl 0x8(%rcx), %esi
jmp 0x28eb
xorl %esi, %esi
movq %rax, %rdi
callq 0x21d0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x2140
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x2912
cmpl $0x0, 0x8(%rax)
je 0x2912
pushq $-0x1
popq %rsi
jmp 0x2915
movl -0x28(%rbp), %esi
movq 0x46bc(%rip), %rdi      # 0x6fd8
callq 0x21d0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x2140
leaq 0x16d1(%rip), %rsi      # 0x4004
leaq -0x50(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x2c64
leaq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x25e1
movl -0x68(%rbp), %esi
movq 0x4681(%rip), %rdi      # 0x6fd8
callq 0x21d0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x2140
leaq -0x58(%rbp), %rdi
callq 0x2d2a
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x20a0
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
leaq -0x48(%rbp), %rdi
callq 0x2d2a
leaq -0x18(%rbp), %rdi
callq 0x2d2a
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
jmp 0x29c3
jmp 0x29ce
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20a0
jmp 0x29da
movq %rax, %rbx
jmp 0x29da
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2d2a
leaq -0x50(%rbp), %rdi
callq 0x20a0
jmp 0x29d1
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x2d2a
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/aempirei[P]Chat-Art/pgmtobraile.c
// Function: dither
void dither(uint8_t *data, size_t width, size_t height) {

	int *front;
	int *error;

	size_t sz = width * height;

	front = malloc(sizeof(int) * sz);
	error = malloc(sizeof(int) * sz);

	memset(error, 0, sizeof(int) * sz);

	for(size_t z = 0; z < sz; z++)
		front[z] = ((data[z] > 40) ? 128 : 32) - data[z];

	for(size_t y = 1; y < height - 1; y++) {
		for(size_t x = 1; x < width - 1; x++) {

			int d = BIT(front,x,y,width) / 6;

			BIT(error,x,y-1,width) += d;
			BIT(error,x-1,y,width) += d;
			BIT(error,x+1,y,width) += d;
			BIT(error,x,y+1,width) += d;

			BIT(error,x,y,width) -= d * 6;
		}
	}

	for(size_t z = 0; z < sz; z++) {
		int x = (int)data[z] + error[z];
		data[z] = (uint8_t)((x < 0) ? 0 : (x > 255) ? 255 : x);
	}

	free(front);
	free(error);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq %rdx, %r12
imulq %rsi, %r12
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x10b0
movq %rax, %r14
pushq $0x1
popq %rdi
movq %r15, %rsi
callq 0x1080
movq %rax, %r15
xorl %eax, %eax
movl $0x80, %ecx
pushq $0x20
popq %rdx
cmpq %rax, %r12
je 0x126e
movzbl (%rbx,%rax), %esi
cmpl $0x29, %esi
movl %edx, %edi
cmovael %ecx, %edi
subl %esi, %edi
movl %edi, (%r14,%rax,4)
incq %rax
jmp 0x1252
decq %rbp
leaq -0x1(%r13), %rcx
leaq (%r15,%r13,8), %rsi
leaq (,%r13,4), %rdi
leaq (%r15,%r13,4), %r8
movq %r14, (%rsp)
leaq (%r14,%r13,4), %r9
pushq $0x6
popq %r10
movq %r15, %r11
pushq $0x1
popq %r13
cmpq %rbp, %r13
jae 0x12dd
incq %r13
pushq $0x1
popq %r14
cmpq %rcx, %r14
jae 0x12cf
movl (%r9,%r14,4), %eax
cltd
idivl %r10d
addl %eax, (%r11,%r14,4)
addl %eax, -0x4(%r8,%r14,4)
addl %eax, 0x4(%r8,%r14,4)
addl %eax, (%rsi,%r14,4)
imull $-0x6, %eax, %eax
addl %eax, (%r8,%r14,4)
incq %r14
jmp 0x12a4
addq %rdi, %rsi
addq %rdi, %r8
addq %rdi, %r11
addq %rdi, %r9
jmp 0x1298
xorl %eax, %eax
movl $0xff, %ecx
movq (%rsp), %rdi
cmpq %rax, %r12
je 0x1308
movzbl (%rbx,%rax), %edx
addl (%r15,%rax,4), %edx
cmpl %ecx, %edx
cmovgel %ecx, %edx
testl %edx, %edx
jg 0x1300
xorl %edx, %edx
movb %dl, (%rbx,%rax)
incq %rax
jmp 0x12e8
callq 0x1030
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_cpp_makefile_star2_O2/aempirei[P]Chat-Art/pgmtobraile.c
// Function: braileencode
void braileencode(FILE *fpout, uint8_t *data, size_t width, size_t height) {
	for(size_t y = 0; y < height; y += 4) {
		for(size_t x = 0; x < width; x += 2) {
			wint_t wch = 0x2800;
			if(BIT0(data,x,y,width) > 0x80) wch |= 0x01;
			if(BIT1(data,x,y,width) > 0x80) wch |= 0x02;
			if(BIT2(data,x,y,width) > 0x80) wch |= 0x04;
			if(BIT3(data,x,y,width) > 0x80) wch |= 0x08;
			if(BIT4(data,x,y,width) > 0x80) wch |= 0x10;
			if(BIT5(data,x,y,width) > 0x80) wch |= 0x20;
			if(BIT6(data,x,y,width) > 0x80) wch |= 0x40;
			if(BIT7(data,x,y,width) > 0x80) wch |= 0x80;
			fputwc(wch, fpout);
		}
		fputwc(L'\n', fpout);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x18(%rsp)
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq (%rdx,%rdx,2), %rax
leaq 0x1(%rsi,%rax), %r13
leaq (,%rdx,4), %rax
movq %rax, 0x10(%rsp)
leaq (%rsi,%rdx,2), %rbx
incq %rbx
movq %rdx, %r12
leaq (%rsi,%rdx), %rbp
incq %rbp
incq %r15
xorl %ecx, %ecx
cmpq 0x18(%rsp), %rcx
jae 0x143f
movq %rcx, 0x20(%rsp)
xorl %r14d, %r14d
cmpq %r12, %r14
jae 0x1413
xorl %eax, %eax
cmpb $-0x7f, -0x1(%r15,%r14)
setae %al
xorl %ecx, %ecx
cmpb $-0x7f, -0x1(%rbp,%r14)
setae %cl
leal (%rax,%rcx,2), %eax
xorl %ecx, %ecx
cmpb $-0x7f, -0x1(%rbx,%r14)
setae %cl
leal (%rax,%rcx,4), %ecx
xorl %edx, %edx
cmpb $-0x7f, (%r15,%r14)
setae %dl
xorl %eax, %eax
cmpb $-0x7f, (%rbp,%r14)
leal (%rcx,%rdx,8), %ecx
setae %al
shll $0x4, %eax
orl %ecx, %eax
xorl %ecx, %ecx
cmpb $-0x7f, (%rbx,%r14)
setae %cl
shll $0x5, %ecx
xorl %edx, %edx
cmpb $-0x7f, -0x1(%r13,%r14)
setae %dl
shll $0x6, %edx
orl %ecx, %edx
xorl %edi, %edi
cmpb $-0x7f, (%r13,%r14)
setae %dil
shll $0x7, %edi
orl %edx, %edi
orl %eax, %edi
orl $0x2800, %edi           # imm = 0x2800
movq 0x8(%rsp), %rsi
callq 0x1060
addq $0x2, %r14
jmp 0x137d
pushq $0xa
popq %rdi
movq 0x8(%rsp), %rsi
callq 0x1060
movq 0x20(%rsp), %rcx
addq $0x4, %rcx
movq 0x10(%rsp), %rax
addq %rax, %r13
addq %rax, %rbx
addq %rax, %rbp
addq %rax, %r15
jmp 0x136a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ps-george[P]ansi_c_compiler/src/lexer/lexer_main.cpp
// Function: escape_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string escape_chars(const std::string &before){
    std::string after;
    after.reserve(before.length() + 4);
    for (std::string::size_type i = 0; i < before.length(); ++i) {
        switch (before[i]) {
            // Replace tab character with \t
            case '\t':
              after += '\\';
              after += 't';
              break;
            // Replace newline character with \n - not sure if I need this for ANSI C
            case '\n':
              after += '\\';
              after += 'n';
              break;
            case '\r':
              after += '\\';
              after += 'r';
              break;
            case '\v':
              after += '\\';
              after += 'v';
              break;
            case '\f':
              after += '\\';
              after += 'f';
              break;
            case '\\': // If the next character is an n or t
              if (i+1 < before.length() && (before[i+1]=='n' || before[i+1]=='t' || before[i+1]=='r' || before[i+1]=='v' || before[i+1]=='f')){
                after += before[i];
                break;
              }
            case '\"':
                after += '\\';
                // Fall through.
            default:
                after += before[i];
        }
    }
    return after;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
addq $0x4, %rsi
callq 0x21d0
xorl %r15d, %r15d
pushq $0x5c
popq %rbp
leaq 0x3af1(%rip), %r13      # 0x6004
movq 0x8(%r14), %rax
cmpq %rax, %r15
jae 0x25dd
movq (%r14), %rcx
movb (%rcx,%r15), %r12b
movzbl %r12b, %edx
leal -0x9(%rdx), %esi
cmpl $0x4, %esi
ja 0x254c
movslq (%r13,%rsi,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x74, %r12b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
jmp 0x25c9
cmpl $0x22, %edx
je 0x257c
cmpl $0x5c, %edx
jne 0x25c9
leaq 0x1(%r15), %rdx
cmpq %rax, %rdx
jae 0x257c
movb 0x1(%rcx,%r15), %al
addb $-0x66, %al
rorb %al
cmpb $0x9, %al
jae 0x257c
movb $0x5c, %r12b
movzbl %al, %eax
movl $0x1d1, %ecx            # imm = 0x1D1
btl %eax, %ecx
jb 0x25c9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
movq (%r14), %rax
movb (%rax,%r15), %r12b
jmp 0x25c9
movb $0x72, %r12b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
jmp 0x25c9
movb $0x76, %r12b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
jmp 0x25c9
movb $0x66, %r12b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
jmp 0x25c9
movb $0x6e, %r12b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x20b0
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x20b0
incq %r15
jmp 0x2513
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x25f1
movq %rax, %r14
movq %rbx, %rdi
callq 0x2278
movq %r14, %rdi
callq 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook_direct.c
// Function: hookdemo_dataset_cmd
scdcint_t hookdemo_dataset_cmd(void *dataprov, void *dataset, const char *cmd, const char *params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result_t *result)
{
  printf(PREFIX "dataset_cmd:\n");
  printf(PREFIX "  dataprov: '%p'\n", dataprov);
  printf(PREFIX "  dataset: '%p'\n", dataset);
  printf(PREFIX "  cmd: '%s'\n", cmd);
  printf(PREFIX "  params: '%s'\n", params);

  printf(PREFIX "  "); scdc_dataset_input_print(input); printf("\n");

  printf(PREFIX "  "); scdc_dataset_output_print(output); printf("\n");

  printf(PREFIX "\n");

  return SCDC_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x37eb9(%rip), %rdi     # 0x440b9
callq 0xb860
leaq 0x37df8(%rip), %rdi     # 0x44004
movq %rbp, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37e06(%rip), %rdi     # 0x44023
movq %r13, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37e13(%rip), %rdi     # 0x44041
movq %r12, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37e1c(%rip), %rdi     # 0x4405b
movq %r15, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37e28(%rip), %r15     # 0x44078
movq %r15, %rdi
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
callq 0x197dc
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0xb770
movq %r15, %rdi
xorl %eax, %eax
callq 0xb070
movq %rbx, %rdi
callq 0x19902
movl %ebp, %edi
callq 0xb770
leaq 0x37e8e(%rip), %rdi     # 0x4411a
callq 0xb860
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook_direct.c
// Function: main
int main(int argc, char *argv[])
{
  scdc_dataprov_t dp_hook = SCDC_DATAPROV_NULL;


  printf(PREFIX "start hook demo direct\n");
  printf(PREFIX "\n");

  scdc_init(SCDC_INIT_DEFAULT);

  dp_hook = scdc_dataprov_open("hookdemo", "hook", &hookdemo);

  scdc_dataset_input_t input;
  scdc_dataset_output_t output;

  scdc_dataset_input_unset(&input);
  scdc_dataset_output_unset(&output);

/*
  char format[SCDC_FORMAT_MAX_SIZE];
  scdcint_t buf_size;
  void *buf;
  scdcint_t total_size, current_size;
  char total_size_given;
  scdc_dataset_inout_next_f *next;
  void *data;
*/

  scdc_dataset_cmd(SCDC_DATASET_NULL, "scdc:/hookdemo CMD PARAM1 PARAM2 PARAM3", &input, &output);

  scdc_dataprov_close(dp_hook);

  scdc_release();

  printf(PREFIX "quit hook demo direct\n");
  printf(PREFIX "\n");

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq 0x37e1b(%rip), %rdi     # 0x440d3
callq 0xb860
leaq 0x37e56(%rip), %rbx     # 0x4411a
movq %rbx, %rdi
callq 0xb860
leaq 0x396df(%rip), %rdi     # 0x459b2
xorl %eax, %eax
callq 0xca21
leaq 0x37da7(%rip), %rdi     # 0x44088
leaq 0x3a9a6(%rip), %rsi     # 0x46c8e
leaq 0x54841(%rip), %rdx     # 0x60b30
xorl %eax, %eax
callq 0xcd7c
movq %rax, %r14
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x19a78
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x19a98
leaq 0x37d77(%rip), %rsi     # 0x44091
xorl %edi, %edi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xde5c
movq %r14, %rdi
callq 0xce3a
callq 0xcb36
leaq 0x37dba(%rip), %rdi     # 0x440f7
callq 0xb860
movq %rbx, %rdi
callq 0xb860
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: hook_config
scdcint_t hook_config(void *dataprov, const char *cmd, const char *param, const char *input, scdcint_t input_size, scdc_result_t *result)
{
  if (strncmp(cmd, "ls", 2) == 0)
  {
    printf("hook_config: listing parameters\n");

    SCDC_RESULT_SET_STR(result, "param0,param1,param2");

  } else if (strncmp(cmd, "put", 3) == 0)
  {
    printf("hook_config: setting '%s' to '%.*s'\n", param, (int) input_size, input);

  } else if (strncmp(cmd, "get", 3) == 0)
  {
    printf("hook_config: getting '%s'\n", param);

    snprintf(SCDC_RESULT_STR(result), SCDC_RESULT_SIZE(result), "%s_VAL", param);

  } else
  {
    return SCDC_FAILURE;
  }

  printf("%s: return %" scdcint_fmt ", result: '%s'\n", __func__, SCDC_SUCCESS, SCDC_RESULT_STR(result));

  return SCDC_SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rdx, %r14
movzbl (%rsi), %eax
cmpl $0x67, %eax
je 0xc424
cmpl $0x70, %eax
je 0xc402
cmpl $0x6c, %eax
jne 0xc47e
cmpb $0x73, 0x1(%rsi)
jne 0xc47e
leaq 0x38205(%rip), %rdi     # 0x445ea
callq 0xb860
leaq 0x8(%rbx), %rdi
movq (%rbx), %rdx
decq %rdx
leaq 0x37d6c(%rip), %rsi     # 0x44167
callq 0xb2c0
jmp 0xc459
cmpb $0x75, 0x1(%rsi)
jne 0xc47e
cmpb $0x74, 0x2(%rsi)
jne 0xc47e
leaq 0x37d67(%rip), %rdi     # 0x4417c
movq %r14, %rsi
movl %r8d, %edx
xorl %eax, %eax
callq 0xb070
jmp 0xc459
cmpb $0x65, 0x1(%rsi)
jne 0xc47e
cmpb $0x74, 0x2(%rsi)
jne 0xc47e
leaq 0x37d6a(%rip), %rdi     # 0x441a1
movq %r14, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x8(%rbx), %rdi
movq (%rbx), %rsi
leaq 0x37d6d(%rip), %rdx     # 0x441bc
movq %r14, %rcx
xorl %eax, %eax
callq 0xb8e0
addq $0x8, %rbx
leaq 0x37d5f(%rip), %rdi     # 0x441c3
leaq 0x38354(%rip), %rsi     # 0x447bf
pushq $0x1
popq %r14
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xb070
jmp 0xc481
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: hook_dataset_open
void *hook_dataset_open(void *dataprov, const char *path, scdc_result_t *result)
{
  hook_dataset_t *dataset_hook;
  
  union { void *dataprov; hook_dataset_t dataset_hook; } z;


  printf("hook_dataset_open: dataprov: '%p', path: '%s'\n", dataprov, path);

  dataset_hook = (hook_dataset_t *) malloc(sizeof(hook_dataset_t));

  z.dataprov = dataprov;

  *dataset_hook = ((char *) z.dataset_hook) + 1;

  SCDC_RESULT_SET_STR(result, "result of hook_dataset_open");

  printf("hook_dataset_open: return '%p' (%p), result: '%s'\n", dataset_hook, *dataset_hook, SCDC_RESULT_STR(result));

  return dataset_hook;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x37d41(%rip), %rdi     # 0x441e2
movq %r14, %rsi
xorl %eax, %eax
callq 0xb070
pushq $0x8
popq %rdi
callq 0xb700
movq %rax, %r15
incq %r14
movq %r14, (%rax)
movq (%rbx), %rdx
addq $0x8, %rbx
decq %rdx
leaq 0x37d44(%rip), %rsi     # 0x44211
movq %rbx, %rdi
callq 0xb2c0
leaq 0x37d51(%rip), %rdi     # 0x4422d
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xb070
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: hook_dataset_close
scdcint_t hook_dataset_close(void *dataprov, void *dataset, scdc_result_t *result)
{
  hook_dataset_t *dataset_hook = (hook_dataset_t *) dataset;


  printf("hook_dataset_close: dataprov: '%p', dataset: '%p' (%p)\n", dataprov, dataset_hook, *dataset_hook);

  free(dataset_hook);

  SCDC_RESULT_SET_STR(result, "result of hook_dataset_close");

  printf("hook_dataset_close: return '%" scdcint_fmt "', result: '%s'\n", SCDC_SUCCESS, SCDC_RESULT_STR(result));
  
  return SCDC_SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq (%r14), %rcx
leaq 0x37d54(%rip), %rdi     # 0x44260
movq %r14, %rdx
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
callq 0xb660
movq (%rbx), %rdx
addq $0x8, %rbx
decq %rdx
leaq 0x37d69(%rip), %rsi     # 0x44298
movq %rbx, %rdi
callq 0xb2c0
leaq 0x37d77(%rip), %rdi     # 0x442b5
pushq $0x1
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xb070
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: hook_dataset_open_read_state
void *hook_dataset_open_read_state(void *dataprov, const void *state, scdcint_t state_size, scdc_result_t *result)
{
  hook_dataset_t *dataset_hook;


  printf("hook_dataset_open_read_state: dataprov: '%p', state: '%.*s'\n", dataprov, (int) state_size, (const char *) state);

  dataset_hook = (hook_dataset_t *) malloc(sizeof(hook_dataset_t));

  z_snscanf(state, state_size, "%p", dataset_hook);

  SCDC_RESULT_SET_STR(result, "result of hook_dataset_open_read_state");

  printf("hook_dataset_open_read_state: return: '%p' (%p), result: '%s'\n", dataset_hook, *dataset_hook, SCDC_RESULT_STR(result));

  return dataset_hook;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rsi
leaq 0x37d71(%rip), %rdi     # 0x442e6
movq %r12, %rcx
xorl %eax, %eax
callq 0xb070
pushq $0x8
popq %rdi
callq 0xb700
movq %rax, %r14
leaq 0x39164(%rip), %rdx     # 0x456f5
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x21af3
movq (%rbx), %rdx
addq $0x8, %rbx
decq %rdx
leaq 0x37d71(%rip), %rsi     # 0x44323
movq %rbx, %rdi
callq 0xb2c0
movq (%r14), %rdx
leaq 0x37d86(%rip), %rdi     # 0x4434a
movq %r14, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xb070
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: hook_dataset_close_write_state
scdcint_t hook_dataset_close_write_state(void *dataprov, void *dataset, void *state, scdcint_t state_size, scdc_result_t *result)
{
  scdcint_t n;
  hook_dataset_t *dataset_hook = (hook_dataset_t *) dataset;


  printf("hook_dataset_close_write_state: dataset: '%p' (%p)\n", dataset_hook, *dataset_hook);

  n = snprintf(state, state_size, "%p", *dataset_hook);

  free(dataset_hook);

  SCDC_RESULT_SET_STR(result, "result of hook_dataset_close_write_state");

  printf("hook_dataset_close_write_state: return: '%" scdcint_fmt "', result: '%s', state: '%.*s'\n", n, SCDC_RESULT_STR(result), (int) state_size, (const char *) state);

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq (%rsi), %rdx
leaq 0x37d8a(%rip), %rdi     # 0x44389
xorl %eax, %eax
callq 0xb070
movq (%r12), %rcx
leaq 0x390e4(%rip), %rdx     # 0x456f5
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xb8e0
movslq %eax, %r13
movq %r12, %rdi
callq 0xb660
movq (%r15), %rdx
addq $0x8, %r15
decq %rdx
leaq 0x37d83(%rip), %rsi     # 0x443bd
movq %r15, %rdi
callq 0xb2c0
leaq 0x37d9d(%rip), %rdi     # 0x443e6
movq %r13, %rsi
movq %r15, %rdx
movl %r14d, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0xb070
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: hook_dataset_get_next
scdcint_t hook_dataset_get_next(scdc_dataset_output_t *output, scdc_result_t *result)
{
  ptrdiff_t x;


  printf("hook_dataset_get_next: output: '%p'\n", output);
  print_dataset_output("hook_dataset_get_next: ", output);

  x = (ptrdiff_t) output->data;

  SCDC_DATASET_INOUT_BUF_CURRENT(output) = z_min(SCDC_DATASET_INOUT_BUF_SIZE(output), DEFAULT_GET_SIZE);

#if 0
  memset(SCDC_DATASET_INOUT_BUF_PTR(output), 'x', SCDC_DATASET_INOUT_BUF_CURRENT(output) - 1);
  ((char *) SCDC_DATASET_INOUT_BUF_PTR(output))[SCDC_DATASET_INOUT_BUF_CURRENT(output) - 1] = '\0';
#else
  memset(SCDC_DATASET_INOUT_BUF_PTR(output), 'x', SCDC_DATASET_INOUT_BUF_CURRENT(output));
#endif

  --x;

  output->next = (x > 0)?hook_dataset_get_next:NULL;
  output->data = (void *) x;

  return SCDC_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x37d70(%rip), %rdi     # 0x44448
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb070
leaq 0x37d81(%rip), %rdi     # 0x4446d
movq %rbx, %rsi
callq 0xc699
movq 0x40(%rbx), %r15
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rax
cmpq $0xd, %rax
pushq $0xd
popq %rdx
cmovlq %rax, %rdx
movq %rdx, 0x20(%rbx)
pushq $0x78
popq %rsi
callq 0xb2f0
leaq -0x1(%r15), %rax
cmpq $0x2, %r15
leaq -0x5d(%rip), %rcx       # 0xc6c9
cmovgeq %rcx, %r14
movq %r14, 0x38(%rbx)
movq %rax, 0x40(%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/dataprov_hook/hook.c
// Function: consume_input
static void consume_input(const char *prefix, scdc_dataset_input_t *input)
{
  while (input)
  {
    printf("%sinput content: '%.*s'\n", prefix, (int) SCDC_DATASET_INOUT_BUF_CURRENT(input), (char *) SCDC_DATASET_INOUT_BUF_PTR(input));
    if (!input->next) break;
    printf("%snext input\n", prefix);
    input->next(input, 0);
    print_dataset_input(prefix, input);
  }
}

// Assembly:
testq %rdi, %rdi
je 0xca06
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x37c13(%rip), %r14     # 0x445c3
leaq 0x37b37(%rip), %r15     # 0x444ee
leaq 0x37c1e(%rip), %r12     # 0x445dc
movl 0x20(%rbx), %edx
movq 0x10(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xb070
cmpq $0x0, 0x38(%rbx)
je 0xc9fb
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xb070
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc669
jmp 0xc9be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: with_transpose(int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, std::function<std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>> (int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)>)
vector<array<int, 4> > with_transpose(int H, int W, int C, vector<vector<int> > const & original_board, function<vector<array<int, 4> > (int, int, int, vector<vector<int> > const &)> cont) {
    vector<vector<int> > board(W, vector<int>(H));
    REP (x, W) REP (y, H) {
        board[x][y] = original_board[y][x];
        if (board[x][y] < 0) board[x][y] = -1;
    }
    vector<array<int, 4> > rects = cont(W, H, C, board);
    for (auto & rect : rects) {
        swap(rect[0], rect[1]);
        swap(rect[2], rect[3]);
    }
    return rects;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r14
movq %r8, %r13
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
movslq %esi, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3bba
movslq %r12d, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x6(%rsp), %rcx
callq 0x3c0c
leaq 0x20(%rsp), %rdi
callq 0x4908
xorl %eax, %eax
testl %r15d, %r15d
movl $0x0, %ecx
cmovgl %r15d, %ecx
testl %r12d, %r12d
movl $0x0, %edx
cmovgl %r12d, %edx
pushq $-0x1
popq %rsi
cmpq %rdx, %rax
je 0x2835
imulq $0x18, %rax, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x2830
movq (%r13), %r10
movq (%r10,%r8), %r10
movl (%r10,%rax,4), %r10d
movq 0x8(%rsp), %r11
testl %r10d, %r10d
cmovsl %esi, %r10d
movq (%r11,%rdi), %r11
movl %r10d, (%r11,%r9,4)
incq %r9
addq $0x18, %r8
jmp 0x2802
incq %rax
jmp 0x27f3
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
callq 0x3c62
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x286d
movdqu (%rax), %xmm0
pshufd $0xb1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,3,2]
movdqu %xmm0, (%rax)
addq $0x10, %rax
jmp 0x2855
leaq 0x8(%rsp), %rdi
callq 0x3c9e
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3c9e
jmp 0x28aa
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4908
jmp 0x28aa
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: with_landscape(int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, std::function<std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>> (int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)>)
vector<array<int, 4> > with_landscape(int H, int W, int C, vector<vector<int> > const & board, function<vector<array<int, 4> > (int, int, int, vector<vector<int> > const &)> cont) {
    if (H > W) {
        return with_transpose(H, W, C, board, cont);
    } else {
        return cont(H, W, C, board);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
cmpl %edx, %esi
jle 0x2904
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r9, %rsi
callq 0x3cd0
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %ebp, %ecx
movq %r14, %r8
movq %r13, %r9
callq 0x2784
leaq 0x8(%rsp), %rdi
callq 0x3d16
jmp 0x291b
movq %rbx, %rdi
movq %r9, %rsi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movq %r14, %r9
callq 0x3c62
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d16
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: with_crop(int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, int, int, int, int, std::function<std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>> (int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)>)
vector<array<int, 4> > with_crop(int H, int W, int C, vector<vector<int> > const & original_board, int ly, int lx, int ry, int rx, function<vector<array<int, 4> > (int, int, int, vector<vector<int> > const &)> cont) {
    int h = ry - ly;
    int w = rx - lx;
    vector<vector<int> > board(h, vector<int>(w));
    REP (y, h) REP (x, w) {
        board[y][x] = original_board[ly + y][lx + x];
    }
    vector<array<int, 4> > rects = cont(h, w, C, board);
    for (auto & rect : rects) {
        rect[0] += ly;
        rect[1] += lx;
        rect[2] += ly;
        rect[3] += lx;
    }
    return rects;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movq %r8, %r12
movl %ecx, 0x4(%rsp)
movq %rdi, %rbx
movl 0x80(%rsp), %r15d
subl 0x70(%rsp), %r15d
movslq %r15d, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x3bba
movl 0x78(%rsp), %r13d
subl %ebp, %r13d
movslq %r13d, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
leaq 0x2(%rsp), %rcx
callq 0x3c0c
leaq 0x20(%rsp), %rdi
callq 0x4908
xorl %eax, %eax
testl %r15d, %r15d
movl $0x0, %ecx
cmovgl %r15d, %ecx
movslq 0x70(%rsp), %rdx
movslq %ebp, %rdi
testl %r13d, %r13d
movl $0x0, %esi
cmovgl %r13d, %esi
shlq $0x2, %rdx
imulq $0x18, %rdi, %rdi
cmpq %rsi, %rax
je 0x2a0a
imulq $0x18, %rax, %r8
movq (%r12), %r9
addq %r8, %r9
addq %rdi, %r9
addq 0x8(%rsp), %r8
xorl %r10d, %r10d
cmpq %r10, %rcx
je 0x2a05
movq (%r9), %r11
addq %rdx, %r11
movl (%r11,%r10,4), %r11d
movq (%r8), %r14
movl %r11d, (%r14,%r10,4)
incq %r10
jmp 0x29ea
incq %rax
jmp 0x29cf
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movq 0x88(%rsp), %rsi
movl %r13d, %edx
movl %r15d, %ecx
movl 0x4(%rsp), %r8d
callq 0x3c62
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movd 0x70(%rsp), %xmm0
movd %ebp, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pshufd $0x44, %xmm1, %xmm0     # xmm0 = xmm1[0,1,0,1]
cmpq %rcx, %rax
je 0x2a5b
movdqu (%rax), %xmm1
paddd %xmm0, %xmm1
movdqu %xmm1, (%rax)
addq $0x10, %rax
jmp 0x2a44
leaq 0x8(%rsp), %rdi
callq 0x3c9e
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3c9e
jmp 0x2a98
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4908
jmp 0x2a98
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: update_compression(int, int, std::array<signed char, 10000ul>&)
void update_compression(int H, int W, array<int8_t, MAX_H * MAX_W> & board) {
    vector<int> stk;
    REP (y, H) {
        for (int x = 0; x < W; ) {
            if (board[y * W + x] < 0) {
                int nx = x - board[y * W + x];
                if (nx < W and board[y * W + nx] < 0) {
                    while (x < W and board[y * W + x] < 0) {
                        stk.push_back(x);
                        x -= board[y * W + x];
                    }
                    while (not stk.empty()) {
                        int px = stk.back();
                        stk.pop_back();
                        board[y * W + px] = px - x;
                    }
                } else {
                    x = nx;
                }
            } else {
                ++ x;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %ebp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %r13d, %r13d
testl %edi, %edi
cmovlel %r13d, %edi
movl %edi, 0xc(%rsp)
leaq 0x8(%rsp), %r12
cmpl 0xc(%rsp), %r13d
je 0x2be4
andl $0x0, 0x8(%rsp)
movl %r13d, %r14d
imull %ebp, %r14d
xorl %eax, %eax
cmpl %ebp, %eax
jge 0x2bdc
leal (%rax,%r14), %ecx
movslq %ecx, %rcx
movsbl (%rbx,%rcx), %edx
testl %edx, %edx
js 0x2b5c
incl %eax
movl %eax, 0x8(%rsp)
jmp 0x2b3d
movl %eax, %ecx
subl %edx, %ecx
cmpl %ebp, %ecx
jge 0x2b71
leal (%rcx,%r14), %edx
movslq %edx, %rdx
cmpb $0x0, (%rbx,%rdx)
js 0x2b99
movl %ecx, 0x8(%rsp)
movl %ecx, %eax
jmp 0x2b3d
movq %r15, %rdi
movq %r12, %rsi
callq 0x3b9c
movl 0x8(%rsp), %eax
leal (%rax,%r14), %ecx
movslq %ecx, %rcx
movsbl (%rbx,%rcx), %ecx
subl %ecx, %eax
movl %eax, 0x8(%rsp)
cmpl %ebp, %eax
jge 0x2baa
leal (%rax,%r14), %ecx
movslq %ecx, %rcx
cmpb $0x0, (%rbx,%rcx)
js 0x2b79
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
addq $-0x4, %rdx
leaq 0x4(%rdx), %rsi
cmpq %rcx, %rsi
je 0x2b3d
movl (%rdx), %esi
movq %rdx, 0x18(%rsp)
movl %esi, %edi
subl %eax, %edi
addl %r14d, %esi
movslq %esi, %rsi
movb %dil, (%rbx,%rsi)
jmp 0x2bb4
incl %r13d
jmp 0x2b24
leaq 0x10(%rsp), %rdi
callq 0x4908
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4908
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: split_to_chunks(int, int)
vector<int> split_to_chunks(int w, int k) {
    vector<int> ws(k + 1);
    REP (i, k) {
        ws[i + 1] = w * (i + 1) / k;
    }
    return ws;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leal 0x1(%rbx), %eax
movslq %eax, %rsi
leaq 0xf(%rsp), %rdx
callq 0x3bba
movq (%r14), %rsi
xorl %r8d, %r8d
testl %ebx, %ebx
movl $0x0, %edi
cmovgl %ebx, %edi
movl %ebp, %ecx
cmpq %r8, %rdi
je 0x2cce
movl %ecx, %eax
cltd
idivl %ebx
movl %eax, 0x4(%rsi,%r8,4)
incq %r8
addl %ebp, %ecx
jmp 0x2cb8
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/main.cpp
// Function: main
int main() {
    SameColorPairs scp;
    int H;
    cin >> H;
    vector<string> board(H);
    getVector(board);

    vector<string> ret = scp.removePairs(board);
    cout << ret.size() << endl;
    for (int i = 0; i < (int)ret.size(); ++i)
        cout << ret[i] << endl;
    cout.flush();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq 0x9a60(%rip), %rdi      # 0xcfd8
leaq 0x2c(%rsp), %rbx
movq %rbx, %rsi
callq 0x20e0
movslq (%rbx), %rsi
leaq 0x48(%rsp), %rbx
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3f04
movq %rbx, %rdi
callq 0x3f55
leaq 0x30(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x445e
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x3fa2
leaq 0x30(%rsp), %rdi
callq 0x44b2
movq 0x18(%rsp), %rsi
subq 0x10(%rsp), %rsi
sarq $0x5, %rsi
movq 0x99e4(%rip), %rdi      # 0xcfc8
callq 0x2100
movq %rax, %rdi
callq 0x20a0
xorl %r14d, %r14d
movq 0x99cd(%rip), %rbx      # 0xcfc8
xorl %r15d, %r15d
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
shrq $0x5, %rax
cltq
cmpq %rax, %r15
jge 0x3632
addq %r14, %rsi
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x20a0
incq %r15
addq $0x20, %r14
jmp 0x35fe
movq 0x998f(%rip), %rdi      # 0xcfc8
callq 0x2110
leaq 0x10(%rsp), %rdi
callq 0x44b2
leaq 0x48(%rsp), %rdi
callq 0x44b2
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x3679
jmp 0x366a
movq %rax, %rbx
jmp 0x367e
jmp 0x3671
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x44b2
leaq 0x48(%rsp), %rdi
callq 0x44b2
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: void apply_rects<__gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>>(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, __gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>, __gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>)
void apply_rects(vector<vector<int> > & board, InputIterator first, InputIterator last) {
    for (; first != last; ++ first) {
        int y1 = (*first)[0];
        int x1 = (*first)[1];
        int y2 = (*first)[2];
        int x2 = (*first)[3];
        board[y1][x1] = -1;
        board[y2][x2] = -1;
    }
}

// Assembly:
movq (%rdi), %rax
cmpq %rdx, %rsi
je 0x3ed0
movslq (%rsi), %rcx
movslq 0x4(%rsi), %rdi
movslq 0x8(%rsi), %r8
movslq 0xc(%rsi), %r9
imulq $0x18, %rcx, %rcx
movq (%rax,%rcx), %rcx
orl $-0x1, (%rcx,%rdi,4)
imulq $0x18, %r8, %rcx
movq (%rax,%rcx), %rcx
orl $-0x1, (%rcx,%r9,4)
addq $0x10, %rsi
jmp 0x3e9d
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: xor_shift_128::set_seed(unsigned int)
void set_seed(uint32_t seed) {
        a = seed = 1812433253u * (seed ^ (seed >> 30));
        b = seed = 1812433253u * (seed ^ (seed >> 30)) + 1;
        c = seed = 1812433253u * (seed ^ (seed >> 30)) + 2;
        d = seed = 1812433253u * (seed ^ (seed >> 30)) + 3;
    }

// Assembly:
movl %esi, %eax
shrl $0x1e, %eax
xorl %esi, %eax
imull $0x6c078965, %eax, %eax # imm = 0x6C078965
movl %eax, (%rdi)
movl %eax, %ecx
shrl $0x1e, %ecx
xorl %eax, %ecx
imull $0x6c078965, %ecx, %eax # imm = 0x6C078965
incl %eax
movl %eax, 0x4(%rdi)
movl %eax, %ecx
shrl $0x1e, %ecx
xorl %eax, %ecx
imull $0x6c078965, %ecx, %eax # imm = 0x6C078965
addl $0x2, %eax
movl %eax, 0x8(%rdi)
movl %eax, %ecx
shrl $0x1e, %ecx
xorl %eax, %ecx
imull $0x6c078965, %ecx, %eax # imm = 0x6C078965
addl $0x3, %eax
movl %eax, 0xc(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: void apply_rects<__gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>>(int, std::array<signed char, 10000ul>&, __gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>, __gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>)
void apply_rects(int W, array<int8_t, MAX_H * MAX_W> & board, InputIterator first, InputIterator last) {
    for (; first != last; ++ first) {
        int y1 = (*first)[0];
        int x1 = (*first)[1];
        int y2 = (*first)[2];
        int x2 = (*first)[3];
        board[y1 * W + x1] = -1;
        board[y2 * W + x2] = -1;
    }
}

// Assembly:
movslq %edi, %rax
movb $-0x1, %dil
cmpq %rcx, %rdx
je 0x65f6
movslq (%rdx), %r8
movslq 0x4(%rdx), %r9
movslq 0x8(%rdx), %r10
movslq 0xc(%rdx), %r11
imulq %rax, %r8
addq %r9, %r8
movb %dil, (%rsi,%r8)
imulq %rax, %r10
addq %r11, %r10
movb %dil, (%rsi,%r10)
addq $0x10, %rdx
jmp 0x65c6
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: _gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>> apply_unreliable_rects<__gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>>(int, std::array<signed char, 10000ul>&, __gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>, __gnu_cxx::__normal_iterator<std::array<int, 4ul>*, std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>>>)
InputIterator apply_unreliable_rects(int W, array<int8_t, MAX_H * MAX_W> & board, InputIterator first, InputIterator last) {
    InputIterator it = first;
    for (; first != last; ++ first) {
        int y1 = (*first)[0];
        int x1 = (*first)[1];
        int y2 = (*first)[2];
        int x2 = (*first)[3];
        // assume all conditions except is_valid_pair()
        if (not is_valid_pair(W, board, make_pair(y1, x1), make_pair(y2, x2))) continue;
        board[y1 * W + x1] = -1;
        board[y2 * W + x2] = -1;
        *(it ++) = *first;
    }
    return it;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %rbp
movl %edi, %r12d
movq %rdx, (%rsp)
cmpq 0x8(%rsp), %r14
je 0x66af
movl (%r14), %ebx
movl 0x4(%r14), %r15d
movl 0x8(%r14), %r13d
movl 0xc(%r14), %ecx
movq %r15, %rax
shlq $0x20, %rax
orq %rbx, %rax
movq %rax, 0x20(%rsp)
movq %rcx, 0x10(%rsp)
movq %rcx, %rax
shlq $0x20, %rax
orq %r13, %rax
movq %rax, 0x18(%rsp)
movl %r12d, %edi
movq %rbp, %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x2c12
testb %al, %al
je 0x66a6
imull %r12d, %ebx
addl %r15d, %ebx
movslq %ebx, %rax
movb $-0x1, %cl
movb %cl, (%rbp,%rax)
imull %r12d, %r13d
addl 0x10(%rsp), %r13d
movslq %r13d, %rax
movb %cl, (%rbp,%rax)
movups (%r14), %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
addq $0x10, %rax
movq %rax, (%rsp)
addq $0x10, %r14
jmp 0x661d
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/argparse.cpp
// Function: argparse::single_arg(argparse::arg_base&, char const*, argparse::arglevel_t, bool*)
void argparse::single_arg(arg_base& arg, const char * value, arglevel_t arglevel, bool* used_value)
{
	if (!arg.can_use)
	{
		if (arg.name) error("can't use --"+arg.name+" more than once");
		else error("can't use more than one non-argument");
	}
	if (!arg.can_use_multi) arg.can_use = false;
	arg.must_use = false;
	
	if (used_value) *used_value = false;
	
	if (!value && !arg.accept_no_value) error("missing argument for --"+arg.name);
	if (arglevel == al_mandatory && !arg.accept_value) error("--"+arg.name+" doesn't allow an argument");
	
	if (value && arg.accept_value && (!arg.accept_no_value || arglevel > al_loose))
	{
		if (!arg.parse(true, value)) error("invalid value for --"+arg.name);
		if (used_value) *used_value = true;
	}
	else
	{
		arg.parse(false, "");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x1c(%rsi)
je 0x3c5a
movq %r8, %r15
cmpb $0x0, 0x1d(%r14)
jne 0x3bac
movb $0x0, 0x1c(%r14)
movb $0x0, 0x1b(%r14)
testq %r15, %r15
je 0x3bba
movb $0x0, (%r15)
testq %rdx, %rdx
jne 0x3bca
cmpb $0x0, 0x19(%r14)
je 0x3cea
cmpl $0x3, %ecx
jne 0x3bda
cmpb $0x0, 0x1a(%r14)
je 0x3cae
testq %rdx, %rdx
je 0x3bf2
cmpb $0x1, 0x1a(%r14)
jne 0x3bf2
cmpl $0x1, %ecx
jg 0x3c23
cmpb $0x0, 0x19(%r14)
je 0x3c23
leaq 0x277e0(%rip), %rsi     # 0x2b3d9
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x42ce
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x42ce
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq (%r14), %rax
pushq $0x1
popq %rsi
movq %r14, %rdi
callq *(%rax)
testb %al, %al
je 0x3cfb
testq %r15, %r15
je 0x3c17
movb $0x1, (%r15)
jmp 0x3c17
movzbl 0x17(%r14), %eax
testb %al, %al
jns 0x3c69
movl 0x10(%r14), %eax
jmp 0x3c6c
xorl $0xf, %eax
testl %eax, %eax
jne 0x3c89
leaq 0x243b7(%rip), %rsi     # 0x2802e
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x41e2
jmp 0x3d17
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x24379(%rip), %rsi     # 0x28011
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x41b8
leaq 0x24372(%rip), %rdx     # 0x2801e
jmp 0x3cd1
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x243f0(%rip), %rsi     # 0x280ad
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x41b8
leaq 0x2439a(%rip), %rdx     # 0x2806b
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x418a
movq (%r15), %rsi
movq 0x8(%r15), %rdx
jmp 0x3d1e
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x2435a(%rip), %rsi     # 0x28053
jmp 0x3d0a
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
leaq 0x2437c(%rip), %rsi     # 0x28086
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x41b8
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x3b2a