LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/michalfapso[P]enum_strings/./enum_conversions.h
// Function: EnumManager<Day>::initializeStringToEnumMap[abi:cxx11]()
std::map<std::string, Enum> EnumManager<Enum>::initializeStringToEnumMap() {
    std::map<std::string, Enum> m;
    //for (const auto& x: EnumConversions<Enum>::enumToStringVector)
	for (const auto& x: splitStringToVector(EnumConversions<Enum>::enumToStringStr))
		m[x.second] = x.first;
    return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2656(%rip), %rsi      # 0x5010
leaq 0x268d(%rip), %rdx      # 0x504e
movq %rsp, %rdi
callq 0x2da8
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x2a7a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x29ec
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
cmpq %r15, %r14
je 0x2a15
movl (%r14), %ebp
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34a0
movl %ebp, (%rax)
addq $0x20, %r14
jmp 0x29f6
leaq 0x20(%rsp), %rdi
callq 0x2cdc
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2a5a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2a5a
movq %rax, %r14
jmp 0x2a5a
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x2cdc
movq %rbx, %rdi
callq 0x389c
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/michalfapso[P]enum_strings/./enum_conversions.h
// Function: EnumManager<Day>::splitStringToVector(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static EnumToStringVector splitStringToVector(const std::string& str) {
		const char delim = ',';
		EnumToStringVector tokens;
		std::stringstream ss(str);
		std::string item;
		while (std::getline(ss, item, delim)) {
			tokens.push_back(std::make_pair(static_cast<Enum>(tokens.size()), trim(item)));
		}
		return tokens;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x70(%rsp), %rdi
movl $0x18, %edx
callq 0x21f0
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %r12
leaq 0x18(%rsp), %rbp
leaq 0x50(%rsp), %r15
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
movl $0x2c, %edx
callq 0x2240
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2ba2
movq (%rbx), %r13
movq 0x8(%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2d38
subq %r13, %r14
shrq $0x3, %r14
imull $0xcccccccd, %r14d, %eax # imm = 0xCCCCCCCD
movl %eax, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movq 0x8(%rsp), %rax
cmpq %rbp, %rax
je 0x2b38
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x2b41
movups (%rbp), %xmm0
movups %xmm0, (%r12)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rbp, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0x2e38
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b82
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2ace
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2ace
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2bbe
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x53f3(%rip), %rsi      # 0x7fb8
leaq 0x70(%rsp), %rdi
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2c68
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c10
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2c2e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2180
jmp 0x2c2e
jmp 0x2c2b
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2c4a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x5367(%rip), %rsi      # 0x7fb8
leaq 0x70(%rsp), %rdi
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2cdc
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/michalfapso[P]enum_strings/./enum_conversions.h
// Function: EnumManager<Day>::trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static std::string trim(std::string const& str)
	{
		if(str.empty())
			return str;

		std::size_t first = str.find_first_not_of(' ');
		std::size_t last  = str.find_last_not_of(' ');
		return str.substr(first, last-first+1);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x2d89
movq %r14, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x2150
movq %rax, %r15
movq %r14, %rdi
movl $0x20, %esi
movq $-0x1, %rdx
callq 0x20e0
subq %r15, %rax
leaq 0x1(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2190
jmp 0x2d9e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x30fe
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tobias93[P]piano/rtaudio/tests/record.cpp
// Function: usage()
void usage( void ) {
  // Error function in case of incorrect command-line
  // argument specifications
  std::cout << "\nuseage: record N fs <duration> <device> <channelOffset>\n";
  std::cout << "    where N = number of channels,\n";
  std::cout << "    fs = the sample rate,\n";
  std::cout << "    duration = optional time in seconds to record (default = 2.0),\n";
  std::cout << "    device = optional device to use (default = 0),\n";
  std::cout << "    and channelOffset = an optional channel offset on the device (default = 0).\n\n";
  exit( 0 );
}

// Assembly:
pushq %rbx
movq 0x79cc(%rip), %rbx      # 0xbfd0
leaq 0x4a0d(%rip), %rsi      # 0x9018
movq %rbx, %rdi
callq 0x41f0
leaq 0x4a38(%rip), %rsi      # 0x9052
movq %rbx, %rdi
callq 0x41f0
leaq 0x4a4c(%rip), %rsi      # 0x9075
movq %rbx, %rdi
callq 0x41f0
leaq 0x4a58(%rip), %rsi      # 0x9090
movq %rbx, %rdi
callq 0x41f0
leaq 0x4a8d(%rip), %rsi      # 0x90d4
movq %rbx, %rdi
callq 0x41f0
leaq 0x4ab2(%rip), %rsi      # 0x9108
movq %rbx, %rdi
callq 0x41f0
xorl %edi, %edi
callq 0x4280
// File: /workspace/github_cpp_makefile_star2_O1/tobias93[P]piano/rtaudio/tests/record.cpp
// Function: input(void*, void*, unsigned int, double, unsigned int, void*)
int input( void * /*outputBuffer*/, void *inputBuffer, unsigned int nBufferFrames,
           double /*streamTime*/, RtAudioStreamStatus /*status*/, void *data )
{
  InputData *iData = (InputData *) data;

  // Simply copy the data to our allocated buffer.
  unsigned int frames = nBufferFrames;
  if ( iData->frameCounter + nBufferFrames > iData->totalFrames ) {
    frames = iData->totalFrames - iData->frameCounter;
    iData->bufferBytes = frames * iData->channels * sizeof( MY_TYPE );
  }

  unsigned long offset = iData->frameCounter * iData->channels;
  memcpy( iData->buffer+offset, inputBuffer, iData->bufferBytes );
  iData->frameCounter += frames;

  if ( iData->frameCounter >= iData->totalFrames ) return 2;
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %edx, %ebp
movq 0x10(%r8), %rax
movq 0x18(%r8), %rdi
movl %edx, %ecx
addq %rdi, %rcx
cmpq %rax, %rcx
jbe 0x4690
subl %edi, %eax
movl 0x20(%rbx), %ecx
imull %eax, %ecx
addq %rcx, %rcx
movq %rcx, 0x8(%rbx)
movl %eax, %ebp
movl 0x20(%rbx), %eax
imulq %rax, %rdi
addq %rdi, %rdi
addq (%rbx), %rdi
movq 0x8(%rbx), %rdx
callq 0x41a0
movl %ebp, %ecx
addq 0x18(%rbx), %rcx
xorl %eax, %eax
cmpq 0x10(%rbx), %rcx
setae %al
movq %rcx, 0x18(%rbx)
addl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: primitive::operator>>(std::istream&, primitive::config_t&)
istream & operator >> (istream & in, config_t & a) {
        int w, h, t, s, n; in >> w >> h >> t >> s >> n;
        assert (w == width);
        assert (h == height);
        assert (t == pack_size);
        assert (s == erasing_sum);
        assert (n == turn_number);
        a.packs.resize(turn_number);
        repeat (i,n) in >> a.packs[i];
        return in;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14(%rsp), %rsi
callq 0x20e0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x4(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
movl $0x1f4, %esi            # imm = 0x1F4
movq %r14, %rdi
callq 0x4524
cmpl $0x0, (%r15)
jle 0x2666
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x4562
incq %r12
movslq 0x4(%rsp), %rax
addq $0x9, %r15
cmpq %rax, %r12
jl 0x2647
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: primitive::operator>>(std::istream&, primitive::input_t&)
istream & operator >> (istream & in, input_t & a) {
        in >> a.turn >> a.remaining_time;
        in >>     a.self_obstacles >>     a.self_field;
        in >> a.opponent_obstacles >> a.opponent_field;
        assert (a.self_obstacles == 0 or a.opponent_obstacles == 0);
        return in;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x20e0
leaq 0x4(%r14), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x20e0
leaq 0xc(%r14), %rsi
movq %rax, %rdi
callq 0x4611
leaq 0xac(%r14), %rsi
movq %rbx, %rdi
callq 0x20e0
addq $0xb0, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x4611
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: primitive::rotate(primitive::blocks_t<3ul, 3ul>, int)
pack_t rotate(pack_t a, rotate_t r) {
        assert (pack_size == 3);
        pack_t b;
        switch (r % 4 + (r < 0 ? 4 : 0)) {
            case 0: b = a; break;
            case 1: repeat (x, pack_size) repeat (y, pack_size) b.at[x][y] = a.at[2-y][  x]; break;
            case 2: repeat (x, pack_size) repeat (y, pack_size) b.at[x][y] = a.at[2-x][2-y]; break;
            case 3: repeat (x, pack_size) repeat (y, pack_size) b.at[x][y] = a.at[  y][2-x]; break;
        }
        return b;
    }

// Assembly:
movq %rdi, -0x20(%rsp)
movb %sil, -0x18(%rsp)
leal 0x3(%rdx), %eax
testl %edx, %edx
cmovnsl %edx, %eax
andl $-0x4, %eax
movl %edx, %ecx
subl %eax, %ecx
shrl $0x1f, %edx
leal (%rcx,%rdx,4), %eax
cmpl $0x3, %eax
ja 0x2843
leaq 0xc895(%rip), %rcx      # 0xf010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb -0x18(%rsp), %al
movb %al, -0x8(%rsp)
movq -0x20(%rsp), %rax
movq %rax, -0x10(%rsp)
jmp 0x2843
leaq -0x10(%rsp), %rax
leaq -0x18(%rsp), %rcx
xorl %edx, %edx
movq %rax, %rsi
xorl %edi, %edi
movb (%rcx,%rdi), %r8b
movb %r8b, (%rsi)
decq %rdi
incq %rsi
cmpq $-0x3, %rdi
jne 0x27ac
incq %rdx
addq $-0x3, %rcx
addq $0x3, %rax
cmpq $0x3, %rdx
jne 0x27a7
jmp 0x2843
leaq -0x10(%rsp), %rax
leaq -0x1e(%rsp), %rcx
xorl %edx, %edx
movq $-0x3, %rsi
movq %rcx, %rdi
movb (%rdi), %r8b
movb %r8b, 0x3(%rax,%rsi)
addq $0x3, %rdi
incq %rsi
jne 0x27e8
incq %rdx
addq $0x3, %rax
decq %rcx
cmpq $0x3, %rdx
jne 0x27de
jmp 0x2843
leaq -0x20(%rsp), %rax
leaq -0x10(%rsp), %rcx
xorl %edx, %edx
movl $0x6, %esi
movq %rcx, %rdi
movb (%rax,%rsi), %r8b
movb %r8b, (%rdi)
addq $-0x3, %rsi
incq %rdi
cmpq $-0x3, %rsi
jne 0x281f
incq %rdx
incq %rax
addq $0x3, %rcx
cmpq $0x3, %rdx
jne 0x2817
movq -0x10(%rsp), %rax
movb -0x8(%rsp), %dl
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: primitive::fill_obstacles(primitive::blocks_t<3ul, 3ul>, int)
pack_t fill_obstacles(pack_t a, int obstacles) {
        repeat_reverse (y, pack_size) { // yが先
            repeat (x, pack_size) {
                if (obstacles and a.at[x][y] == empty_block) {
                    a.at[x][y] = obstacle_block;
                    obstacles -= 1;
                }
            }
        }
        return a;
    }

// Assembly:
leaq -0xe(%rsp), %rax
movq %rdi, -0x2(%rax)
movb %sil, 0x6(%rax)
movl $0x2, %ecx
xorl %esi, %esi
testl %edx, %edx
je 0x2873
cmpb $0x0, (%rax,%rsi)
jne 0x2875
movb $0xb, (%rax,%rsi)
decl %edx
jmp 0x2875
xorl %edx, %edx
addq $0x3, %rsi
cmpq $0x9, %rsi
jne 0x2861
decq %rax
subq $0x1, %rcx
jae 0x285f
movq -0x10(%rsp), %rax
movb -0x8(%rsp), %dl
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: primitive::is_valid_output(primitive::blocks_t<16ul, 10ul> const&, primitive::blocks_t<3ul, 3ul> const&, primitive::output_t const&)
bool is_valid_output(field_t const & field, pack_t const & a_pack, output_t const & output) {
        if (0 <= output.x and output.x + pack_size <= width) return true;
        pack_t pack = rotate(a_pack, output.rotate); // お邪魔ブロックは既に置かれているとする
        repeat (dy, pack_size) repeat (dx, pack_size) if (pack.at[dx][dy] != empty_block) {
            int x = output.x + dx;
            if (x < 0 or width <= x) return false;
        }
        return true;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl (%rdx), %ebx
movb $0x1, %al
cmpl $0x8, %ebx
jae 0x2947
andb $0x1, %al
addq $0x10, %rsp
popq %rbx
retq
movq (%rsi), %rdi
movl 0x4(%rdx), %edx
movzbl 0x8(%rsi), %esi
callq 0x274c
movq %rsp, %rcx
movq %rax, (%rcx)
movb %dl, 0x8(%rcx)
xorl %edx, %edx
xorl %eax, %eax
movq $-0x9, %rsi
movl %ebx, %edi
cmpb $0x0, 0x9(%rcx,%rsi)
sete %r8b
cmpl $0xa, %edi
setb %r9b
orb %r8b, %r9b
je 0x293f
incl %edi
addq $0x3, %rsi
jne 0x296c
cmpq $0x2, %rdx
leaq 0x1(%rdx), %rsi
setae %al
incq %rcx
movq %rsi, %rdx
cmpq $0x3, %rsi
jne 0x2963
jmp 0x293f
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: simulation::drop_pack(primitive::blocks_t<19ul, 10ul>&, std::array<int, 10ul>&, primitive::blocks_t<3ul, 3ul> const&, primitive::output_t const&)
vector<point_t> drop_pack(blocks_t<height + pack_size, width> & field, array<int,width> & height_map, pack_t const & a_pack, output_t const & output) {
        vector<point_t> modified_blocks;
        pack_t pack = rotate(a_pack, output.rotate); // お邪魔ブロックは既に置かれているとする
        repeat (dy, 3) repeat (dx, 3) {
            if (pack.at[dx][dy] != empty_block) {
                int nx = output.x + dx;
                assert (0 <= nx and nx < width);
                field.at[nx][height_map[nx]] = pack.at[dx][dy];
                if (field.at[nx][height_map[nx]] != obstacle_block) {
                    modified_blocks.push_back(point(height_map[nx], nx));
                }
                ++ height_map[nx];
            }
        }
        return modified_blocks;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
movq $0x0, 0x10(%rdi)
movq (%rcx), %rdi
movl 0x4(%r8), %edx
movzbl 0x8(%rcx), %esi
callq 0x274c
leaq 0x28(%rsp), %rbp
movq %rax, (%rbp)
movb %dl, 0x8(%rbp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rbp, 0x18(%rsp)
xorl %r13d, %r13d
movb (%rbp), %cl
testb %cl, %cl
je 0x2a47
movslq (%r14), %rax
leaq (%rax,%r13), %rbx
leaq (%rbx,%rbx,8), %rdx
leaq (%rbx,%rdx,2), %rdx
addq %r12, %rdx
movslq (%r15,%rbx,4), %rsi
movb %cl, (%rsi,%rdx)
movslq (%r15,%rbx,4), %rcx
cmpb $0xb, (%rcx,%rdx)
je 0x2a43
movl %eax, %eax
addq %r13, %rax
movl %ecx, %ecx
shlq $0x20, %rax
orq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xbf8e
incl (%r15,%rbx,4)
incq %r13
addq $0x3, %rbp
cmpq $0x3, %r13
jne 0x29f7
movq 0x10(%rsp), %rax
incq %rax
movq 0x18(%rsp), %rbp
incq %rbp
cmpq $0x3, %rax
jne 0x29ea
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2a9a
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: simulation::estimate_with_erasing(primitive::blocks_t<16ul, 10ul> const&)
result_t estimate_with_erasing(field_t const & field) {
        vector<pair<result_t, int> > acc = estimate_with_erasing_all(field);
        return whole(max_element, acc, [&](pair<result_t, int> const & a, pair<result_t, int> const & b) {
            return make_tuple(a.first.chain, - a.second, a.first.score) < make_tuple(b.first.chain, - b.second, b.first.score);
        })->first;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2d4f
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
cmpq %rax, %rdi
sete %dl
leaq 0xc(%rdi), %rcx
cmpq %rax, %rcx
sete %sil
orb %dl, %sil
movq %rdi, %rsi
jne 0x3135
movq %rdi, %rdx
movl 0x4(%rdx), %r8d
movl 0x4(%rcx), %r9d
movq %rcx, %rsi
cmpl %r9d, %r8d
jl 0x3129
jg 0x3126
movl 0x8(%rdx), %r8d
movl 0x8(%rcx), %r9d
movq %rcx, %rsi
cmpl %r8d, %r9d
jl 0x3129
movl (%rcx), %r10d
movq %rcx, %rsi
cmpl %r10d, (%rdx)
jl 0x311f
movq %rdx, %rsi
cmpl %r9d, %r8d
cmovgeq %rsi, %rdx
movq %rdx, %rsi
addq $0xc, %rcx
movq %rsi, %rdx
cmpq %rax, %rcx
jne 0x30ef
movq (%rsi), %rbx
testq %rdi, %rdi
je 0x314a
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: step_photon(std::shared_ptr<photon_t> const&, primitive::blocks_t<3ul, 3ul> const&, primitive::output_t)
shared_ptr<photon_t> step_photon(shared_ptr<photon_t> const & pho, pack_t const & pack, output_t output) {
    if (not pho->cached[output.x+pack_size-1][output.rotate]) {
        int numbers = count_number_blocks(pack);
        int consumed = count_consumed_obstacles(pack, pho->obstacles);
        pack_t filled_pack = fill_obstacles(pack, consumed);
        step_photon_inner(pho, numbers, consumed, filled_pack, output.x, output.rotate);
    }
    return pho->next[output.x+pack_size-1][output.rotate];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rsi, %rbx
movq (%rsi), %rax
shlq $0x20, %rcx
movabsq $0x200000000, %r12      # imm = 0x200000000
addq %rcx, %r12
movq %r12, %rcx
sarq $0x1e, %rcx
addq %rax, %rcx
sarq $0x20, %r12
movq %r14, %r15
sarq $0x20, %r15
cmpb $0x0, 0x104(%r15,%rcx)
jne 0x3bbe
movq %rdi, 0x10(%rsp)
movq %r14, %rcx
shrq $0x20, %rcx
movq %rcx, 0x8(%rsp)
xorl %ecx, %ecx
movq %rdx, %rsi
xorl %ebp, %ebp
xorl %edi, %edi
movb (%rsi,%rdi), %r8b
testb %r8b, %r8b
setne %r9b
cmpb $0xb, %r8b
setne %r8b
andb %r9b, %r8b
movzbl %r8b, %r8d
addl %r8d, %ebp
incq %rdi
cmpq $0x3, %rdi
jne 0x3b1e
incq %rcx
addq $0x3, %rsi
cmpq $0x3, %rcx
jne 0x3b1c
movl 0x8(%rax), %eax
xorl %esi, %esi
movq %rdx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpb $0x1, (%rdi,%r8)
adcl $0x0, %ecx
incq %r8
cmpq $0x3, %r8
jne 0x3b5e
incq %rsi
addq $0x3, %rdi
cmpq $0x3, %rsi
jne 0x3b5b
cmpl %eax, %ecx
cmovll %ecx, %eax
xorl %r13d, %r13d
testl %eax, %eax
cmovgl %eax, %r13d
movq (%rdx), %rdi
movzbl 0x8(%rdx), %esi
movl %r13d, %edx
callq 0x284d
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movb %dl, 0x8(%rcx)
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
movl %r14d, %r8d
movq 0x8(%rsp), %r9
callq 0x3880
movq 0x10(%rsp), %rdi
shlq $0x6, %r12
addq (%rbx), %r12
shlq $0x4, %r15
movq 0x138(%r15,%r12), %rax
movq %rax, (%rdi)
movq 0x140(%r15,%r12), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x3bfa
movq 0x113d4(%rip), %rcx     # 0x14fc0
cmpb $0x0, (%rcx)
je 0x3bf6
incl 0x8(%rax)
jmp 0x3bfa
lock
incl 0x8(%rax)
movq %rdi, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: step_photon_all(std::shared_ptr<photon_t> const&, primitive::blocks_t<3ul, 3ul> const&)
void step_photon_all(shared_ptr<photon_t> const & pho, pack_t const & pack) {
    int numbers = count_number_blocks(pack);
    int consumed = count_consumed_obstacles(pack, pho->obstacles);
    pack_t filled_pack = fill_obstacles(pack, consumed);
    repeat_from (x, - pack_size + 1, width) repeat (r, 4) {
        step_photon_inner(pho, numbers, consumed, filled_pack, x, r);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rsi, %rcx
xorl %ebp, %ebp
xorl %edx, %edx
movb (%rcx,%rdx), %dil
testb %dil, %dil
setne %r8b
cmpb $0xb, %dil
setne %dil
andb %r8b, %dil
movzbl %dil, %edi
addl %edi, %ebp
incq %rdx
cmpq $0x3, %rdx
jne 0x3c26
incq %rax
addq $0x3, %rcx
cmpq $0x3, %rax
jne 0x3c24
movq (%rbx), %rax
movl 0x8(%rax), %r14d
xorl %eax, %eax
movq %rsi, %rdx
xorl %ecx, %ecx
xorl %edi, %edi
cmpb $0x1, (%rdx,%rdi)
adcl $0x0, %ecx
incq %rdi
cmpq $0x3, %rdi
jne 0x3c68
incq %rax
addq $0x3, %rdx
cmpq $0x3, %rax
jne 0x3c66
cmpl %r14d, %ecx
cmovll %ecx, %r14d
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
movq (%rsi), %rdi
movzbl 0x8(%rsi), %esi
movl %r14d, %edx
callq 0x284d
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movb %dl, 0x8(%r15)
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
xorl %r13d, %r13d
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x3880
incl %r13d
cmpl $0x4, %r13d
jne 0x3cb9
incl %r12d
cmpl $0xa, %r12d
jne 0x3cb6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: evaluate_photon_for_output(std::shared_ptr<photon_t> const&, int, opponent_info_t const&)
double evaluate_photon_for_output(shared_ptr<photon_t> const & pho, int base_turn, opponent_info_t const & oppo) {
    int age = pho->turn - base_turn;
    double acc = 0;
    if (is_effective_firing(pho->result.score, pho->obstacles, age, oppo)) {
        if (pho->obstacles < 40) {
            double k = pow(1 + 0.18, -age+1);
            acc += 400 + k * (1.2 * pho->result.score); // 発火した それが可能でしかも勝てるというのは大きい
            acc -= 5 * pho->dropped_obstacles;
            acc -= 3 * max(0, pho->obstacles);
        } else {
            acc = pho->result.score; // 負けてる時はもう全力で
        }
    } else {
        if (pho->result.chain >= chain_of_fire) {
            double k = pow(1 + 0.18, -age+1);
            acc += k * pho->result.score;
            acc -= 3 * max(0, min(30, pho->obstacles));
        } else {
            acc += max(0.1, 1 - 0.03 * (age - 1)) * pho->evaluation.score;
        }
    }
    return acc;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movl (%rcx), %eax
movl 0x8(%rcx), %edi
subl %esi, %eax
movl 0xbc(%rcx), %esi
movl 0x24(%rdx), %r8d
movl %r8d, %r9d
shrl $0x1f, %r9d
addl %r8d, %r9d
sarl %r9d
movl $0x3c, %r10d
subl %r9d, %r10d
cmpl $0x50, %r8d
movl $0x14, %r8d
cmovll %r10d, %r8d
leal 0x14(%rdi), %r9d
cmpl %r8d, %r9d
cmovgl %r9d, %r8d
leal (%r8,%r8,4), %r8d
addl 0x20(%rdx), %r8d
cmpl %esi, %r8d
jge 0x3de8
cmpl $0x27, %edi
jg 0x3e48
movl $0x1, %ecx
subl %eax, %ecx
cvtsi2sd %ecx, %xmm1
movsd 0xb415(%rip), %xmm0     # 0xf1b8
callq 0x2220
movq (%rbx), %rax
xorps %xmm1, %xmm1
cvtsi2sdl 0xbc(%rax), %xmm1
mulsd 0xb402(%rip), %xmm1     # 0xf1c0
mulsd %xmm0, %xmm1
addsd 0xb3fe(%rip), %xmm1     # 0xf1c8
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
movl 0x8(%rax), %ecx
movl 0xc(%rax), %eax
leal (%rax,%rax,4), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
jmp 0x3e31
cmpl $0x6, 0xc0(%rcx)
jl 0x3e4e
movl $0x1, %ecx
subl %eax, %ecx
cvtsi2sd %ecx, %xmm1
movsd 0xb3b4(%rip), %xmm0     # 0xf1b8
callq 0x2220
movq (%rbx), %rax
xorps %xmm1, %xmm1
cvtsi2sdl 0xbc(%rax), %xmm1
mulsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
movl 0x8(%rax), %eax
cmpl $0x1e, %eax
movl $0x1e, %ecx
cmovll %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
leal (%rax,%rax,2), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
jmp 0x3e7c
cvtsi2sd %esi, %xmm0
jmp 0x3e7c
decl %eax
cvtsi2sd %eax, %xmm1
mulsd 0xb344(%rip), %xmm1     # 0xf1a0
addsd 0xb344(%rip), %xmm1     # 0xf1a8
maxsd 0xb344(%rip), %xmm1     # 0xf1b0
mulsd 0xc8(%rcx), %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: outputs_photon_from(std::shared_ptr<photon_t>, int)
vector<output_t> outputs_photon_from(shared_ptr<photon_t> pho, int turn) {
    vector<output_t> outputs;
    while (pho and pho->turn > turn) {
        outputs.push_back(pho->output);
        pho = pho->parent.lock();
    }
    if (not pho or pho->turn != turn) outputs.clear();
    whole(reverse, outputs);
    return outputs;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rdx
testq %rdx, %rdx
sete %al
je 0x3ffb
cmpl %ebp, (%rdx)
jle 0x3ff3
movq %rsi, %r14
addq $0xb4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3f7f
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x3f87
movq %rbx, %rdi
callq 0xe3cc
movq (%r14), %rdx
movq 0xf8(%rdx), %rcx
testq %rcx, %rcx
je 0x3fab
movl 0x8(%rcx), %eax
testl %eax, %eax
je 0x3fa9
leal 0x1(%rax), %esi
lock
cmpxchgl %esi, 0x8(%rcx)
jne 0x3f99
jmp 0x3fab
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x3fba
movl 0x8(%rcx), %eax
testl %eax, %eax
sete %al
jmp 0x3fbc
movb $0x1, %al
testb %al, %al
jne 0x3fc9
movq 0xf0(%rdx), %rax
jmp 0x3fcb
xorl %eax, %eax
movq %rax, (%r14)
movq 0x8(%r14), %rdi
movq %rcx, 0x8(%r14)
testq %rdi, %rdi
je 0x3fe0
callq 0x7136
movq (%r14), %rdx
testq %rdx, %rdx
sete %al
je 0x3ffb
cmpl %ebp, (%rdx)
jg 0x3f61
testb %al, %al
jne 0x3ffb
cmpl %ebp, (%rdx)
je 0x4008
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4008
movq %rax, 0x8(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x8, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x404b
addq $0x8, %rax
movq -0x8(%rax), %rdx
movq (%rcx), %rsi
movq %rsi, -0x8(%rax)
movq %rdx, (%rcx)
addq $-0x8, %rcx
leaq 0x8(%rax), %rdx
cmpq %rcx, %rax
movq %rdx, %rax
jb 0x402d
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x406a
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r14, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: prune_photon(std::shared_ptr<photon_t> const&, primitive::output_t)
void prune_photon(shared_ptr<photon_t> const & pho, output_t output) {
    assert (pho);
    repeat_from (x, - pack_size + 1, width) repeat (r, 4) {
        if (x == output.x and r == output.rotate) continue;
        pho->cached[x+pack_size-1][r] = false;
        pho->next[x+pack_size-1][r] = nullptr;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq %esi, %rax
movq %rax, (%rsp)
movq %rsi, %r15
shrq $0x20, %r15
movq $-0x2, %r12
movl $0x104, %r13d           # imm = 0x104
movl $0x140, %ebp            # imm = 0x140
movq %r12, 0x10(%rsp)
xorq (%rsp), %r12
movq %rbp, 0x8(%rsp)
xorl %r14d, %r14d
movq %r15, %rax
xorq %r14, %rax
orq %r12, %rax
je 0x40e1
movq (%rbx), %rax
leaq (%rax,%r13), %rcx
movb $0x0, (%r14,%rcx)
movq (%rax,%rbp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, -0x8(%rax,%rbp)
testq %rdi, %rdi
je 0x40e1
callq 0x7136
incq %r14
addq $0x10, %rbp
cmpq $0x4, %r14
jne 0x40b4
movq 0x10(%rsp), %r12
incq %r12
addq $0x4, %r13
movq 0x8(%rsp), %rbp
addq $0x40, %rbp
cmpq $0xa, %r12
jne 0x40a3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: main
int main() {
    cout << ai_name << endl;
    cout.flush();
    config_t config; cin >> config;
    AI ai(config);
    repeat (i, config.packs.size()) {
        input_t input; cin >> input;
        if (not cin) {
#ifndef RELEASE
            cerr << "error: input failed" << endl;
#endif
            break;
        }
        output_t output = ai.think(input);
        cout << output << endl;
        cout.flush();
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movq 0x10f4e(%rip), %rsi     # 0x15160
movq 0x10f4f(%rip), %rdx     # 0x15168
movq 0x10da8(%rip), %rbx     # 0x14fc8
movq %rbx, %rdi
callq 0x2180
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2100
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq 0x10d66(%rip), %rbx     # 0x14fd8
movq %rbx, %rdi
callq 0x25dc
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x4e1e
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
je 0x4385
xorl %r15d, %r15d
leaq 0x178(%rsp), %r14
movq 0x10d48(%rip), %rbp     # 0x14ff0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2675
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x20(%rbx,%rax), %r12d
testb $0x5, %r12b
je 0x4303
movl $0x13, %edx
movq %rbp, %rdi
leaq 0xaf6f(%rip), %rsi      # 0xf243
callq 0x2180
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
jmp 0x435c
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x4f3c
movq %rax, 0x20(%rsp)
movq 0x10cac(%rip), %rdi     # 0x14fc8
leaq 0x20(%rsp), %rsi
callq 0x26d4
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq 0x10c71(%rip), %rdi     # 0x14fc8
callq 0x2100
testb $0x5, %r12b
jne 0x4385
incq %r15
movq 0x8(%rsp), %rax
subq (%rsp), %rax
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rax
cmpq %r15, %rax
ja 0x42a8
leaq 0x28(%rsp), %rdi
callq 0x708e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x43a5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
xorl %eax, %eax
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43bb
movq %rax, %rbx
jmp 0x43cf
jmp 0x43c2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x708e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x43e5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: simulation::result_t simulation::simulate<19ul, 10ul>(primitive::blocks_t<19ul, 10ul>&, std::array<int, 10ul>&, std::vector<point_t, std::allocator<point_t>>, int)
result_t simulate(blocks_t<H,W> & field, array<int,W> & height_map, vector<point_t> modified_blocks, int initial_chain) {
        // 2. ブロックの消滅&落下処理
        int score = 0;
        int chain = initial_chain;
        while (not modified_blocks.empty()) {
            // 検査
            vector<pair<point_t,int> > erases = collect_erases(field, modified_blocks);
            if (erases.empty()) break; // 消滅なし
            ++ chain; // ここでincrement
            // 消滅&落下
            int erase_count; tie(erase_count, modified_blocks) = apply_erases(field, erases);
            modified_blocks = erase_blocks(field, height_map, modified_blocks);
            score += calculate_score(chain, erase_count);
        }
        // 3. 4. 5. 6. お邪魔ブロック関連処理
        // nop
        // 7. ターン終了
        result_t result;
        result.score = score;
        result.chain = chain;
        return result;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, 0x30(%rsp)
movq %rdi, %r12
xorl %ebx, %ebx
leaq 0x18(%rsp), %r15
leaq 0x48(%rsp), %rbp
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x47f8
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xc0f9
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rax, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
cmpq %rcx, %rax
je 0x47d1
movq %rbp, %r13
movq %rbp, %rdi
movq %r12, %rbp
movq %r12, %rsi
movq %r15, %r12
movq %r15, %rdx
callq 0xc396
movl 0x48(%rsp), %eax
movl %eax, 0x14(%rsp)
movq %r14, %rdi
leaq 0x50(%rsp), %rsi
callq 0xd5bc
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4768
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r13, %r15
movq %r13, %rdi
movq %rbp, %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rcx
callq 0xc540
movq %r14, %rdi
movq %r15, %rsi
callq 0xd5bc
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x47a0
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
cltq
movl 0x14(%rsp), %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
leaq 0xa85e(%rip), %rdx      # 0xf020
imull (%rdx,%rax,4), %ecx
addl %ecx, %ebx
movq %r12, %r15
movq %rbp, %r12
movq %r13, %rbp
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x47e8
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x38(%rsp), %rax
cmpq %rax, 0x40(%rsp)
jne 0x46ed
movq 0x8(%rsp), %rcx
shlq $0x20, %rcx
movl %ebx, %eax
orq %rcx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4817
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x4831
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: std::vector<point_t, std::allocator<point_t>> simulation::erase_blocks<16ul, 10ul>(primitive::blocks_t<16ul, 10ul>&, std::array<int, 10ul>&, std::vector<point_t, std::allocator<point_t>> const&)
vector<point_t> erase_blocks(blocks_t<H,W> & field, array<int,W> & height_map, vector<point_t> const & points_to_erase) {
        auto & at = field.at;
        array<int,W> old_height_map = height_map;
        for (point_t p : points_to_erase) {
            at[p.x][p.y] = empty_block;
            setmin(height_map[p.x], p.y);
        }
        vector<point_t> modified_blocks;
        repeat (x,W) {
            for (int y = height_map[x] + 1; y < old_height_map[x]; ++ y) {
                if (at[x][y] != empty_block) {
                    at[x][height_map[x]] = at[x][y];
                    if (at[x][height_map[x]] != obstacle_block) {
                        modified_blocks.push_back(point(height_map[x], x));
                    }
                    ++ height_map[x];
                    at[x][y] = empty_block;
                }
            }
        }
        return modified_blocks;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r12
movq 0x20(%rdx), %rax
movq %rax, 0x40(%rsp)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
cmpq %rcx, %rax
je 0x4962
movq (%rax), %r10
movq %r10, %r11
sarq $0x20, %r11
movq %r11, %r9
shlq $0x4, %r9
addq %rsi, %r9
movslq %r10d, %r8
movb $0x0, (%r8,%r9)
cmpl %r8d, (%r12,%r11,4)
jle 0x495c
movl %r10d, (%r12,%r11,4)
addq $0x8, %rax
jmp 0x4931
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, (%rsp)
leaq 0x1(%rsi), %rbp
xorl %r10d, %r10d
movslq (%r12,%r10,4), %r15
movl 0x20(%rsp,%r10,4), %ebx
leal 0x1(%r15), %eax
cmpl %ebx, %eax
jge 0x49fb
movq %r10, %r13
shlq $0x4, %r13
addq (%rsp), %r13
movq %r10, %rax
shlq $0x20, %rax
movq %rax, 0x10(%rsp)
decl %ebx
movq %r10, 0x8(%rsp)
movb (%rbp,%r15), %al
testb %al, %al
je 0x49f3
movslq (%r12,%r10,4), %rcx
movb %al, (%r13,%rcx)
movslq (%r12,%r10,4), %rax
cmpb $0xb, (%r13,%rax)
je 0x49e9
movl %eax, %eax
orq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rdi, %r14
leaq 0x18(%rsp), %rsi
callq 0xbf8e
movq %r14, %rdi
movq 0x8(%rsp), %r10
incl (%r12,%r10,4)
movb $0x0, (%rbp,%r15)
incq %r15
cmpl %r15d, %ebx
jne 0x49aa
incq %r10
addq $0x10, %rbp
cmpq $0xa, %r10
jne 0x497b
movq %rdi, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4a35
movq 0x10(%r14), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: std::ostream& primitive::operator<<<16ul, 10ul>(std::ostream&, primitive::blocks_t<16ul, 10ul> const&)
ostream & operator << (ostream & out, blocks_t<H, W> const & a) {
        repeat_reverse (y, H) {
            if (y != H-1) out << endl;
            repeat (x, W) {
                switch (a.at[x][y]) {
                    case empty_block: out << ' '; break;
                    case obstacle_block: out << '#'; break;
                    default: out << int(a.at[x][y]); break;
                }
            }
        }
        return out;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0xf, %r13d
leaq 0x7(%rsp), %r15
leaq 0x6(%rsp), %r12
cmpq $0xf, %r13
je 0x772f
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl $0xf, %ebp
movzbl (%r14,%rbp), %eax
cmpl $0xb, %eax
je 0x7754
testl %eax, %eax
jne 0x776b
movb $0x20, 0x6(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x7764
movb $0x23, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2180
jmp 0x7776
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2210
addq $0x10, %rbp
cmpq $0xaf, %rbp
jne 0x7734
decq %r14
subq $0x1, %r13
jae 0x7702
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: std::pair<int, std::vector<point_t, std::allocator<point_t>>> simulation::apply_erases<19ul, 10ul>(primitive::blocks_t<19ul, 10ul> const&, std::vector<std::pair<point_t, int>, std::allocator<std::pair<point_t, int>>> const&)
pair<int, vector<point_t> > apply_erases(blocks_t<H,W> const & field, vector<pair<point_t,int> > const & erases) {
        static const int dy[] = { -1, -1, 0, 1 }; // 下 右下 右 右上
        static const int dx[] = {  0,  1, 1, 1 };
        int erase_count = 0;
        vector<point_t> used;
        for (auto && it : erases) {
            point_t p; int j; tie(p, j) = it;
            int cnt = 0, acc = 0;
            for (; acc != erasing_sum; ++ cnt) {
                acc += field.at[p.x][p.y];
                used.push_back(p);
                p.y += dy[j];
                p.x += dx[j];
            }
            erase_count += cnt;
        }
        whole(sort, used);
        used.erase(whole(unique, used), used.end());
        return { erase_count, used };
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq (%rdx), %rcx
movq 0x8(%rdx), %rax
movq %rax, 0x38(%rsp)
cmpq %rax, %rcx
je 0xc46b
movq %rsi, %r14
xorl %ebp, %ebp
leaq 0x3235(%rip), %r15      # 0xf610
movq (%rcx), %rax
movq %rax, 0x8(%rsp)
movq %rcx, 0x40(%rsp)
movslq 0x8(%rcx), %r12
xorl %r13d, %r13d
movslq 0xc(%rsp), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rax,%rcx,2), %rax
addq %r14, %rax
movslq 0x8(%rsp), %rcx
movsbl (%rcx,%rax), %ebx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0xc424
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x18(%rsp)
jmp 0xc433
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xcf74
leaq 0x31c6(%rip), %rax      # 0xf600
movl (%rax,%r12,4), %eax
addl %eax, 0x8(%rsp)
movl (%r15,%r12,4), %eax
addl %eax, 0xc(%rsp)
addl %ebx, %r13d
incl %ebp
cmpl $0xa, %r13d
jne 0xc3ef
movq 0x40(%rsp), %rcx
addq $0xc, %rcx
cmpq 0x38(%rsp), %rcx
jne 0xc3db
jmp 0xc46d
xorl %ebp, %ebp
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
cmpq %r15, %r14
je 0xc4a9
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xd050
movq %r14, %rdi
movq %r15, %rsi
callq 0xd103
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xd4d9
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
je 0xc4da
movq 0x18(%rsp), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
addq %rsi, %rax
cmpq %rax, %rdx
je 0xc4da
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rbx
movl %ebp, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0x483a
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc506
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc51e
jmp 0xc51e
jmp 0xc51e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc538
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH09_SequentialContainers/examples/refreshIter.cc
// Function: printVec(std::vector<int, std::allocator<int>> const&)
void printVec(const vector<int>& vi)
{
    // print the vector's elements
    auto iter = vi.begin();
    while (iter != vi.end())
        cout << *iter++ << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r12
cmpq 0x8(%rdi), %r12
je 0x12aa
movq %rdi, %rbx
movq 0x2d6e(%rip), %r14      # 0x3fd8
movl (%r12), %esi
addq $0x4, %r12
movq %r14, %rdi
callq 0x10e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
cmpq 0x8(%rbx), %r12
jne 0x126a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH09_SequentialContainers/examples/refreshIter.cc
// Function: main
int main()
{
    // silly loop to remove even-valued elements
    // and insert a duplicate of odd-valued elements
    vector<int> vi = {0,1,2,3,4,5,6,7,8,9};
    printVec(vi);

    // we call begin, not cbegin because we're changing vi
    auto iter = vi.begin();
    while (iter != vi.end()) {
        if (*iter % 2) {    // if the element is odd
            iter = vi.insert(iter, *iter);  // duplicate  it
            iter += 2; // advance past this element and the new one
        } else
            iter = vi.erase(iter);          // remove even elements
            // don't advance the iterator;
            // iter denotes the element after the one we erased
    }
    printVec(vi);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movups 0xd4f(%rip), %xmm0      # 0x2014
leaq -0x60(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0xd30(%rip), %xmm0      # 0x2004
movaps %xmm0, (%rsi)
movabsq $0x900000008, %rax      # imm = 0x900000008
movq %rax, 0x20(%rsi)
leaq -0x30(%rbp), %rbx
leaq -0x11(%rbp), %rcx
movl $0xa, %edx
movq %rbx, %rdi
callq 0x13a2
movq %rbx, %rdi
callq 0x124c
movq -0x30(%rbp), %rbx
movq -0x28(%rbp), %rdx
cmpq %rdx, %rbx
je 0x1354
leaq -0x30(%rbp), %r14
testb $0x1, (%rbx)
jne 0x1336
movq %rbx, %rsi
addq $0x4, %rsi
cmpq %rdx, %rsi
je 0x132f
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x10d0
addq $-0x4, -0x28(%rbp)
jmp 0x134b
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x13e8
movq %rax, %rbx
addq $0x8, %rbx
movq -0x28(%rbp), %rdx
cmpq %rdx, %rbx
jne 0x1313
leaq -0x30(%rbp), %rdi
callq 0x124c
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1372
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x10b0
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x1381
jmp 0x1381
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1399
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x10f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/romkatv[P]hcproxy/src/logging.cc
// Function: hcproxy::internal_logging::LogStreamBase::Flush()
void LogStreamBase::Flush() {
  std::time_t time = std::time(nullptr);
  char time_str[64];
  if (std::strftime(time_str, sizeof(time_str), "%F %T", std::localtime(&time)) == 0) {
    std::strcpy(time_str, "undef");
  }
  std::string msg = strm_->str();
  std::fprintf(stderr, "[%s %s %s:%d] %s\n", time_str, Str(severity_), file_, line_, msg.c_str());
  strm_.reset();
  errno = errno_;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x15930
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
callq 0x15880
leaq 0xba921(%rip), %rdx     # 0xd030e
leaq 0x30(%rsp), %rdi
pushq $0x40
popq %rsi
movq %rax, %rcx
callq 0x158c0
testq %rax, %rax
jne 0x15a11
movw $0x66, 0x34(%rsp)
movl $0x65646e75, 0x30(%rsp) # imm = 0x65646E75
movq 0x18(%rbx), %rsi
addq $0x8, %rsi
leaq 0x8(%rsp), %rdi
callq 0x91bf0
movq 0xfb45e(%rip), %rax     # 0x110e88
movq (%rax), %rdi
movl 0x14(%rbx), %eax
cmpq $0x3, %rax
ja 0x15a46
leaq 0xba90f(%rip), %rdx     # 0xd034c
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
jmp 0x15a4d
leaq 0xba8f5(%rip), %rcx     # 0xd0342
movq 0x8(%rbx), %r8
movl 0x10(%rbx), %r9d
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
leaq 0xba8b5(%rip), %rsi     # 0xd031a
leaq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x15870
movq 0x18(%rbx), %rdi
andq $0x0, 0x18(%rbx)
testq %rdi, %rdi
je 0x15a85
movq (%rdi), %rax
callq *0x8(%rax)
movl (%rbx), %ebx
callq 0x15640
movl %ebx, (%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x15aa9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21280
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/romkatv[P]hcproxy/src/connector.cc
// Function: hcproxy::(anonymous namespace)::ConnectEventHandler::Finish(hcproxy::EventLoop*, int)
void Finish(EventLoop* loop, int err) {
    loop->Remove(this);
    if (err == 0) {
      LOG(INFO) << "[" << fd() << "] connected";
      cb_(fd());
    } else {
      LOG(WARN) << "[" << fd() << "] unable to connect: " << Errno(err);
      CHECK(close(fd()) == 0) << Errno();
      cb_(-1);
    }
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x20850
leaq 0xb5104(%rip), %rsi     # 0xcf619
movq %rsp, %r14
movq %r14, %rdi
testl %ebp, %ebp
je 0x1a58f
movl $0x47, %edx
movl $0x1, %ecx
callq 0x2019c
movq 0x18(%r14), %rdi
leaq 0xb4c09(%rip), %rsi     # 0xcf142
movl $0x1, %edx
callq 0x8bab0
movl 0x18(%rbx), %esi
movq 0x18(%rsp), %rdi
callq 0x8c380
movq 0x18(%rsp), %rdi
leaq 0xb5162(%rip), %rsi     # 0xcf6be
movl $0x15, %edx
callq 0x8bab0
movq 0x18(%rsp), %rdi
movl %ebp, %esi
callq 0x2023b
movq %rsp, %rdi
callq 0x1965e
movl 0x18(%rbx), %edi
callq 0x15140
testl %eax, %eax
jne 0x1a603
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x1a5e4
movl $0x44, %edx
xorl %ecx, %ecx
callq 0x2019c
movq 0x18(%r14), %rdi
leaq 0xb4b9c(%rip), %rsi     # 0xcf142
movl $0x1, %edx
callq 0x8bab0
movl 0x18(%rbx), %esi
movq 0x18(%rsp), %rdi
callq 0x8c380
movq 0x18(%rsp), %rdi
leaq 0xb50e9(%rip), %rsi     # 0xcf6b2
movl $0xb, %edx
callq 0x8bab0
movq %rsp, %r14
movq %r14, %rdi
callq 0x19688
movl 0x18(%rbx), %eax
movl %eax, (%r14)
cmpq $0x0, 0x48(%rbx)
je 0x1a5fe
leaq 0x38(%rbx), %rdi
movq %rsp, %rsi
callq *0x50(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x17320
leaq 0xb500f(%rip), %rsi     # 0xcf619
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x48, %edx
movl $0x3, %ecx
callq 0x2019c
movq 0x18(%rbx), %rdi
leaq 0xb50aa(%rip), %rsi     # 0xcf6d4
movl $0x10, %edx
callq 0x8bab0
movq 0x18(%rsp), %rdi
leaq 0xb9ccb(%rip), %rsi     # 0xd430b
movl $0x2, %edx
callq 0x8bab0
movl (%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0x2023b
jmp 0x1a65b
jmp 0x1a667
movq %rsp, %rdi
callq 0x18aaa
jmp 0x1a674
jmp 0x1a674
movq %rax, %rbx
movq %rsp, %rdi
callq 0x19688
jmp 0x1a67f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1965e
movq %rbx, %rdi
callq 0xcc900
nop