LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/draw.cpp
// Function: draw_block(block_t*, int, int)
void draw_block(block_t * block, int tile_x, int tile_y)
{
    extern int block_width;
    extern int block_height;
    extern SDL_Renderer* renderer;

    for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
    {
        for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
        {
            if (block->structure.tile[y][x] == FILLED)
            {
                draw_box(
                    (tile_x + x) * block_width,
                    (tile_y + y) * block_width,
                    block_width,
                    block_height,
                    block->color,
                    COLOR_BLOCK_BACKGROUND,
                    renderer
                );
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, %r14
leaq 0x10(%rdi), %r15
movl %esi, %r12d
xorl %ecx, %ecx
leaq 0x4536(%rip), %r13      # 0x6b70
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
leal (%rcx,%rax), %ebp
xorl %ebx, %ebx
cmpl $0x1, (%r15,%rbx,4)
jne 0x2686
leaq 0x4529(%rip), %rax      # 0x6b80
movl (%rax), %edx
leal (%r12,%rbx), %edi
imull %edx, %edi
movl %edx, %esi
imull %ebp, %esi
leaq 0x4518(%rip), %rax      # 0x6b84
movl (%rax), %ecx
movl (%r14), %r8d
movl $0x8, %r9d
pushq $0x2
pushq (%r13)
callq 0x243c
addq $0x10, %rsp
incq %rbx
cmpq $0x4, %rbx
jne 0x2649
movq 0x10(%rsp), %rcx
incq %rcx
addq $0x10, %r15
cmpq $0x4, %rcx
jne 0x263a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/exit_game.cpp
// Function: exit_game(SDL_Window*, SDL_Renderer*)
void exit_game(SDL_Window* window, SDL_Renderer* renderer)
{
    if (window != NULL)
    {
        SDL_DestroyWindow(window);
    }
    if (renderer != NULL)
    {
        SDL_DestroyRenderer(renderer);
    }
    SDL_Quit();
    std::cout << "SDL-resources returned to system." << std::endl;
    
    #ifdef _WIN32
    system("pause");
    #endif
    
    exit(0);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x26be
callq 0x2030
testq %rbx, %rbx
je 0x26cb
movq %rbx, %rdi
callq 0x20b0
callq 0x2080
movq 0x3901(%rip), %rdi      # 0x5fd8
leaq 0x194a(%rip), %rsi      # 0x4028
callq 0x21c0
movq %rax, %rdi
callq 0x20c0
xorl %edi, %edi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: setup_game()
void setup_game()
{
    /* Set random seed. */
    srand((unsigned int)time(NULL));

    /* Setup a 'fresh' gamefield. */
	for (int width = 0; width < GRID_WIDTH; width++)
	{
		for (int height = 0; height < GRID_HEIGHT; height++)
		{
			field[height][width].tile      = EMPTY;
			field[height][width].color_f   = COLOR_BACKGROUND_FORTH;
			field[height][width].color_b   = COLOR_BACKGROUND_BACK;
		}
	}

    /* Set variables. */
    game_over     = false;
    current_block = block_spawn();
    next_block    = block_spawn();
    set_iteration_timer(800);
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x2170
movl %eax, %edi
callq 0x21a0
leaq 0x39fb(%rip), %rax      # 0x6170
movabsq $0x600000007, %rcx      # imm = 0x600000007
movl $0x8, %edx
movl $0x0, (%rax,%rdx)
movq %rcx, -0x8(%rax,%rdx)
addq $0x78, %rdx
cmpq $0x968, %rdx            # imm = 0x968
jne 0x2784
incq %rbx
addq $0xc, %rax
cmpq $0xa, %rbx
jne 0x277f
movl $0x7, %edi
movl $0x4, %esi
xorl %edx, %edx
movl $0x3, %ecx
callq 0x27f7
movq %rax, 0x4309(%rip)      # 0x6ad0
movl $0x7, %edi
movl $0x4, %esi
xorl %edx, %edx
movl $0x3, %ecx
callq 0x27f7
movq %rax, 0x42f4(%rip)      # 0x6ad8
movl $0x320, %eax            # imm = 0x320
movl %eax, 0x42fd(%rip)      # 0x6aec
movl %eax, 0x42f3(%rip)      # 0x6ae8
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: block_move(block_t*, int)
void block_move(block_t* block, direction_t direction)
{
	switch (direction)
	{
	case DIRECTION_LEFT:
		block->position.x += -1;
		break;

	case DIRECTION_RIGHT:
		block->position.x += 1;
		break;

	case DIRECTION_UP:
		block->position.y += -1;
		break;

	case DIRECTION_DOWN:
		block->position.y += 1;
		break;

	default:
		std::cout << "Error, tried to move block in non defined direction. " << std::endl;
		break;
	}
}

// Assembly:
cmpl $0x3, %esi
ja 0x29fd
movl %esi, %eax
leaq 0x1684(%rip), %rcx      # 0x4068
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
decl 0x8(%rdi)
retq
decl 0xc(%rdi)
retq
incl 0xc(%rdi)
retq
incl 0x8(%rdi)
retq
pushq %rbx
movq 0x35d3(%rip), %rbx      # 0x5fd8
leaq 0x18d1(%rip), %rsi      # 0x42dd
movl $0x35, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: rotate_block_matrix(block_t*, bool, int)
static void rotate_block_matrix(block_t* block, bool counter_clockwise, int matrix_size)
{
    /* Create a new block structure and initialize it to EMPTY. */
    block_struct_t rotated_block_structure;
    for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
    {
        for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
        {
            rotated_block_structure.tile[y][x] = EMPTY;
        }
    }
	
	if (counter_clockwise) 
	{
		/* Counter closewise rotation. */
		for (int y = 0; y < (matrix_size); y++)
		{
			for (int x = 0; x < (matrix_size); x++)
			{
				rotated_block_structure.tile[(matrix_size-1) - x][y] = block->structure.tile[y][x];
			}
		}
	}
	else
	{
		/* Clockwise rotation. */
		for (int y = 0; y < (matrix_size); y++)
		{
			for (int x = 0; x < (matrix_size); x++)
			{
				rotated_block_structure.tile[x][(matrix_size-1) - y] = block->structure.tile[y][x];
			}
		}
	}

	/* Give the rotated structure to the block. */
	block->structure = rotated_block_structure;
}

// Assembly:
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%rsp)
movaps %xmm0, -0x28(%rsp)
movaps %xmm0, -0x38(%rsp)
movaps %xmm0, -0x48(%rsp)
testl %esi, %esi
je 0x2ac2
testl %edx, %edx
jle 0x2b03
leaq 0x10(%rdi), %rax
movl %edx, %ecx
leaq -0x58(%rsp), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
xorl %r8d, %r8d
movq %rsi, %r9
movq %rax, %r10
movl (%r10), %r11d
movl %r11d, (%rdx,%r9)
addq $0x4, %r10
addq $-0x10, %r9
jne 0x2a9f
incq %r8
addq $0x10, %rax
addq $0x4, %rdx
cmpq %rcx, %r8
jne 0x2a99
jmp 0x2b03
testl %edx, %edx
jle 0x2b03
leaq 0x10(%rdi), %rax
movl %edx, %ecx
leaq (,%rcx,4), %rdx
leaq (%rsp,%rcx,4), %rsi
addq $-0x4c, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rax,%r9), %r10d
movl %r10d, (%rsi,%r9,4)
addq $0x4, %r9
cmpq %r9, %rdx
jne 0x2ae2
incq %r8
addq $0x10, %rax
addq $-0x4, %rsi
cmpq %rcx, %r8
jne 0x2adf
movaps -0x48(%rsp), %xmm0
movaps -0x38(%rsp), %xmm1
movaps -0x28(%rsp), %xmm2
movaps -0x18(%rsp), %xmm3
movups %xmm3, 0x40(%rdi)
movups %xmm2, 0x30(%rdi)
movups %xmm1, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: test_rotation(block_t*, bool)
collision_t test_rotation(block_t* block, rotation_t counter_clockwise)
{
	/* Make a copy of the block and rotate the copy. */
	block_t block_copy = *block;
	block_rotate(&block_copy, counter_clockwise);

	/* Test if any part of the copied block interfears with the taken boxes on the field. 
	 * Also test if the copied block interfears with the wall. Return accordingly. */
	collision_t collision = NO_COLLISION;
	
	/* Test for collision with other boxes. */
	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block_copy.structure.tile[y][x] == FILLED   &&
				field[y + block_copy.position.y][x + block_copy.position.x].tile == TAKEN)
			{
				collision = COLLISION_BLOCK;
			}
		}
	}

	/* Test for collision with left side wall. */
	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block_copy.structure.tile[y][x] == FILLED   &&
				x + block_copy.position.x < 0)
			{
				collision = COLLISION_WALL_R;
			}
		}
	}

	/* Test for collision with the right side wall. */
	for (int y = 0; y < MAX_BLOCK_HEIGHT; y++)
	{
		for (int x = 0; x < MAX_BLOCK_WIDTH; x++)
		{
			if (block_copy.structure.tile[y][x] == FILLED   &&
				x + block_copy.position.x > GRID_WIDTH - 1)
			{
				collision = COLLISION_WALL_R;
			}
		}
	}
	return collision;
}

// Assembly:
subq $0x58, %rsp
movl %esi, %eax
movq %rdi, %rsi
leaq 0x8(%rsp), %rdx
movl $0x14, %ecx
movq %rdx, %rdi
rep  movsl (%rsi), %es:(%rdi)
movq %rdx, %rdi
movl %eax, %esi
callq 0x2a41
leaq 0x18(%rsp), %rcx
movslq -0x4(%rcx), %rax
movslq -0x8(%rcx), %rdx
imulq $0x78, %rax, %rax
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,4), %rax
leaq 0x3606(%rip), %rdx      # 0x6170
addq %rax, %rdx
addq $0x8, %rdx
xorl %esi, %esi
movl $0x5, %edi
xorl %eax, %eax
movq %rdx, %r8
xorl %r9d, %r9d
cmpl $0x1, (%rcx,%r9,4)
jne 0x2b8e
cmpl $0x1, (%r8)
cmovel %edi, %eax
incq %r9
addq $0xc, %r8
cmpq $0x4, %r9
jne 0x2b80
incq %rsi
addq $0x78, %rdx
addq $0x10, %rcx
cmpq $0x4, %rsi
jne 0x2b7a
leaq 0x18(%rsp), %rcx
movslq -0x8(%rcx), %rdx
negq %rdx
xorl %esi, %esi
movl $0x2, %edi
xorl %r8d, %r8d
movl %eax, %r9d
cmpq %rdx, %r8
cmovll %edi, %eax
cmpl $0x1, (%rcx,%r8,4)
cmovnel %r9d, %eax
incq %r8
cmpq $0x4, %r8
jne 0x2bc2
incq %rsi
addq $0x10, %rcx
cmpq $0x4, %rsi
jne 0x2bbf
leaq 0x18(%rsp), %rcx
movslq -0x8(%rcx), %rsi
movl $0x9, %edx
subq %rsi, %rdx
xorl %esi, %esi
movl $0x2, %edi
xorl %r8d, %r8d
movl %eax, %r9d
cmpq %rdx, %r8
cmovgl %edi, %eax
cmpl $0x1, (%rcx,%r8,4)
cmovnel %r9d, %eax
incq %r8
cmpq $0x4, %r8
jne 0x2c05
incq %rsi
addq $0x10, %rcx
cmpq $0x4, %rsi
jne 0x2c02
addq $0x58, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: remove_row(int)
void remove_row(int row)
{
    for (int x = 0; x < GRID_WIDTH; x++)
    {
        field[row][x].tile     = EMPTY;
        field[row][x].color_f  = COLOR_BACKGROUND_FORTH;
        field[row][x].color_b  = COLOR_BACKGROUND_BACK;
    }
}

// Assembly:
movslq %edi, %rax
imulq $0x78, %rax, %rcx
leaq 0x337e(%rip), %rax      # 0x6170
addq %rcx, %rax
movl $0x8, %ecx
movabsq $0x600000007, %rdx      # imm = 0x600000007
movl $0x0, (%rax,%rcx)
movq %rdx, -0x8(%rax,%rcx)
addq $0xc, %rcx
cmpq $0x80, %rcx
jne 0x2e04
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: move_field_down(int, int)
void move_field_down(int row, int n)
{
    for (int y = row - 1; y >= 0; y--)
    {
        for (int x = 0; x < GRID_WIDTH; x++)
        {
            field[y + n][x].tile = field[y][x].tile;
            field[y + n][x].color_f = field[y][x].color_f;
            field[y + n][x].color_b = field[y][x].color_b;
        }
    }
}

// Assembly:
testl %edi, %edi
jle 0x2e85
movl %edi, %eax
movslq %esi, %rdx
imulq $0x78, %rax, %rcx
leaq 0x333e(%rip), %rsi      # 0x6170
leaq (%rcx,%rsi), %rdi
addq %rsi, %rcx
addq $-0x70, %rcx
imulq $0x78, %rdx, %rdx
addq %rdi, %rdx
movq %rax, %rsi
decq %rax
movq $-0x78, %rdi
movq %rcx, %r8
movl (%r8), %r9d
movl %r9d, 0x8(%rdx,%rdi)
movl -0x8(%r8), %r9d
movl %r9d, (%rdx,%rdi)
movl -0x4(%r8), %r9d
movl %r9d, 0x4(%rdx,%rdi)
addq $0xc, %r8
addq $0xc, %rdi
jne 0x2e54
addq $-0x78, %rcx
addq $-0x78, %rdx
cmpq $0x2, %rsi
jge 0x2e44
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: test_row_full(int)
bool test_row_full(int row)
{
    bool res = true;
    for (int x = 0; x < GRID_WIDTH; x++)
    {
        if (field[row][x].tile == EMPTY)
        {
            res = false;
            break;
        }
    }
    return res;
}

// Assembly:
movslq %edi, %rax
imulq $0x78, %rax, %rax
leaq 0x32dc(%rip), %rcx      # 0x6170
cmpl $0x0, 0x8(%rax,%rcx)
je 0x2ec2
addq %rcx, %rax
addq $0x14, %rax
xorl %edx, %edx
movq %rdx, %rcx
cmpq $0x9, %rdx
je 0x2eba
cmpl $0x0, (%rax)
leaq 0xc(%rax), %rax
leaq 0x1(%rcx), %rdx
jne 0x2ea4
cmpq $0x9, %rcx
setae %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: game_draw_field()
void game_draw_field()
{
    extern SDL_Renderer* renderer;
    extern int block_width;
    extern int block_height;
    for (int y = 0; y < GRID_HEIGHT; y++)
    {
        for (int x = 0; x < GRID_WIDTH; x++)
        {
            draw_box(
                x * block_width, y * block_height,  // Position.
                block_width, block_height,          // Size.
                field[y][x].color_f,                // Foreground color.
                field[y][x].color_b,                // Background color.
                renderer,                           // Renderer to draw to.
                GLOBAL_MARGIN                       // Margin level (px).
            );
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x328b(%rip), %rbp      # 0x6174
xorl %r14d, %r14d
leaq 0x3c8d(%rip), %r15      # 0x6b80
leaq 0x3c8a(%rip), %r12      # 0x6b84
leaq 0x3c6f(%rip), %r13      # 0x6b70
movq %rbp, (%rsp)
xorl %ebx, %ebx
movl (%r15), %edx
movl %ebx, %edi
imull %edx, %edi
movl (%r12), %ecx
movl %ecx, %esi
imull %r14d, %esi
movl -0x4(%rbp), %r8d
movl (%rbp), %r9d
pushq $0x1
pushq (%r13)
callq 0x243c
addq $0x10, %rsp
incq %rbx
addq $0xc, %rbp
cmpq $0xa, %rbx
jne 0x2f07
incq %r14
movq (%rsp), %rbp
addq $0x78, %rbp
cmpq $0x14, %r14
jne 0x2f01
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/game.cpp
// Function: iteration_timer()
bool iteration_timer()
{
    using namespace std::chrono;
    static time_point<high_resolution_clock>  last_timestamp;
    time_point<high_resolution_clock>         current_timestamp         = high_resolution_clock::now();
    milliseconds                              time_since_last_call      = duration_cast<milliseconds>(current_timestamp - last_timestamp);

    if (current_iteration_wait_time_ms < time_since_last_call.count())
    {
        last_timestamp = current_timestamp;
        return true;
    }
    else return false;

}

// Assembly:
pushq %rax
callq 0x2070
movq %rax, %rcx
subq 0x393b(%rip), %rax      # 0x6ae0
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
movslq 0x3921(%rip), %rax      # 0x6ae8
cmpq %rax, %rdx
jle 0x31d3
movq %rcx, 0x390d(%rip)      # 0x6ae0
cmpq %rax, %rdx
setg %al
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/miklhh[P]tetris/src/input.cpp
// Function: handle_keyboard_input(unsigned char const*)
void handle_keyboard_input(keyboard_state_t* keyboard_state)
{
    if (keyboard_key_timer(SDL_SCANCODE_LEFT, keyboard_state))
        current_block_move(DIRECTION_LEFT);

    if (keyboard_key_timer(SDL_SCANCODE_RIGHT, keyboard_state))
        current_block_move(DIRECTION_RIGHT);

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x50, %edi
movq %rbx, %rsi
callq 0x3420
testb %al, %al
je 0x3402
xorl %edi, %edi
callq 0x31e2
movl $0x4f, %edi
movq %rbx, %rsi
callq 0x3420
testb %al, %al
je 0x341e
movl $0x1, %edi
popq %rbx
jmp 0x31e2
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]optimal-seed-solver/hobbesSolver.cc
// Function: HobbesSolver::~HobbesSolver()
HobbesSolver::~HobbesSolver() {
	if  (invertedList != NULL) {
		delete [] invertedList;
		invertedList = NULL;
	}
	if  (defaultInvertedList != NULL) {
		delete [] defaultInvertedList;
		defaultInvertedList = NULL;
	}
		if  (dynamicMatrix != NULL) {
		delete [] dynamicMatrix;
		dynamicMatrix = NULL;
	}
	if  (defaultDynamicMatrix != NULL) {
		delete [] defaultDynamicMatrix;
		defaultDynamicMatrix = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x358(%rdi), %rdi
testq %rdi, %rdi
je 0x457a
callq 0x3330
movq $0x0, 0x358(%rbx)
movq 0x378(%rbx), %rdi
testq %rdi, %rdi
je 0x4596
callq 0x3330
movq $0x0, 0x378(%rbx)
movq 0x360(%rbx), %rdi
testq %rdi, %rdi
je 0x45b2
callq 0x3330
movq $0x0, 0x360(%rbx)
movq 0x380(%rbx), %rdi
testq %rdi, %rdi
je 0x45ce
callq 0x3330
movq $0x0, 0x380(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x5140
nop
// File: /workspace/github_cpp_makefile_star2_O1/c2-d2[P]disty/src/main.cpp
// Function: void compute_consensus<std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>>(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void compute_consensus(const T &pileup, string &consensus) {
    assert(pileup.size()==consensus.size());
    assert(pileup[0].size()==128);

    for(int i=0; i<static_cast<int>(pileup.size()); i++){
        char c='N';
        int max_freq=-1;
        const auto &column=pileup[i];

        for(int d=0;d<128;d++){
            if(d!='N'){
                if(column[d]>max_freq){
                    max_freq=column[d];
                    c=(char)d;
                }
            }
        }

        consensus[i]=c;
    }
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq 0x8(%rsi), %rdx
jne 0x3c26
movq 0x8(%rax), %rcx
subq (%rax), %rcx
cmpq $0x200, %rcx            # imm = 0x200
jne 0x3c45
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
testl %eax, %eax
jle 0x3c24
xorl %eax, %eax
leaq (%rax,%rax,2), %rdx
leaq (%rcx,%rdx,8), %rdx
movb $0x4e, %cl
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
cmpq $0x4e, %r9
je 0x3bf3
movq (%rdx), %r10
movl (%r10,%r9,4), %r10d
cmpl %r8d, %r10d
movzbl %cl, %ecx
cmovgl %r9d, %ecx
cmovgl %r10d, %r8d
incq %r9
cmpq $0x80, %r9
jne 0x3bd8
movq (%rsi), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
imull $0xaaaaaaab, %edx, %edx # imm = 0xAAAAAAAB
movslq %edx, %rdx
cmpq %rdx, %rax
jl 0x3bc5
popq %rax
retq
leaq 0x19e9(%rip), %rdi      # 0x5616
leaq 0x16b2(%rip), %rsi      # 0x52e6
leaq 0x19fb(%rip), %rcx      # 0x5636
movl $0x13f, %edx            # imm = 0x13F
callq 0x20e0
leaq 0x19b4(%rip), %rdi      # 0x5600
leaq 0x1693(%rip), %rsi      # 0x52e6
leaq 0x19dc(%rip), %rcx      # 0x5636
movl $0x140, %edx            # imm = 0x140
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O1/p-ranav[P]video_device_discovery/src/helpers.cpp
// Function: xioctl(int, int, void*)
int xioctl(int fd, int request, void *arg) {
  int r;
  do {
    r = ioctl (fd, request, arg);
  } while (-1 == r && EINTR == errno);
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %edi, %r14d
movslq %esi, %r15
movl %r14d, %edi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4460
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0xaa9e
callq 0x4030
cmpl $0x4, (%rax)
je 0xaa7c
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/test.c
// Function: test_int
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0, size = 0;
	stb_idict *h;
	h = stb_idict_create();
	for (i = 0, x = x0; i < n; ++i) {
		uint32_t key, val = 1;
		x = hash32(x);
		key = get_key(n, x);
		if (stb_idict_get_flag(h, key, &val)) {
			stb_idict_set(h, key, val + 1);
		} else {
			stb_idict_set(h, key, 1);
			++size;
		}
		z += val;
	}
	fprintf(stderr, "# unique keys: %d; checksum: %u\n", size, z);
	stb_idict_destroy(h);
	return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r12d
movl %edi, %r14d
callq 0x6fe0
movq %rax, %rbx
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
testl %r14d, %r14d
je 0x27ce
movl %r14d, %eax
shrl $0x2, %eax
movl %eax, 0x14(%rsp)
movl $0x0, 0xc(%rsp)
pushq $0x1
popq %r13
xorl %r15d, %r15d
movl $0x1, 0x10(%rsp)
movl %r12d, %eax
shll $0xf, %eax
notl %eax
addl %r12d, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %r12d
shrl $0x10, %r12d
xorl %eax, %r12d
movl %r12d, %eax
xorl %edx, %edx
divl 0x14(%rsp)
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ebp
shrl $0x10, %ebp
xorl %eax, %ebp
movq %rbx, %rdi
movl %ebp, %esi
leaq 0x10(%rsp), %rdx
callq 0x7037
testl %eax, %eax
je 0x27a9
movl 0x10(%rsp), %edx
incl %edx
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %ecx
movl %r13d, %r8d
callq 0x71ed
jmp 0x27c0
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
movl %r13d, %ecx
movl %r13d, %r8d
callq 0x71ed
incl 0xc(%rsp)
addl 0x10(%rsp), %r15d
decl %r14d
jne 0x2714
movq 0x17823(%rip), %rax     # 0x19ff8
movq (%rax), %rdi
leaq 0x1079c(%rip), %rsi     # 0x12f7b
movl 0xc(%rsp), %ebp
movl %ebp, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x21f0
movq %rbx, %rdi
callq 0x7019
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_snprintf
int stb_snprintf(char *s, size_t n, const char *fmt, ...)
{
   int res;
   va_list v;
   va_start(v,fmt);
   res = stb_vsnprintf(s, n, fmt, v);
   va_end(v);
   return res;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2a04
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movq %rbx, %rsi
callq 0x20c0
testq %rbx, %rbx
je 0x2a37
movb $0x0, -0x1(%r14,%rbx)
testl %eax, %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
cmovsl %edx, %ecx
cmpl %ebx, %eax
cmovgel %edx, %ecx
movl %ecx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_sprintf
char *stb_sprintf(const char *fmt, ...)
{
   static char buffer[1024];
   va_list v;
   va_start(v,fmt);
   stb_vsnprintf(buffer,1024,fmt,v);
   va_end(v);
   return buffer;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2ab4
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x177a5(%rip), %rbx     # 0x1a280
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x20c0
movb $0x0, 0x17b8d(%rip)     # 0x1a67f
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_mprintf
char *stb_mprintf(const char *fmt, ...)
{
   static char buffer[1024];
   va_list v;
   va_start(v,fmt);
   stb_vsnprintf(buffer,1024,fmt,v);
   va_end(v);
   return strdup(buffer);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2b5d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x17afc(%rip), %rbx     # 0x1a680
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x20c0
movb $0x0, 0x17ee4(%rip)     # 0x1aa7f
movq %rbx, %rdi
callq 0x2390
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_to_utf8
char * stb_to_utf8(char *buffer, stb__wchar *str, int n)
{
   int i=0;
   --n;
   while (*str) {
      if (*str < 0x80) {
         if (i+1 > n) return NULL;
         buffer[i++] = (char) *str++;
      } else if (*str < 0x800) {
         if (i+2 > n) return NULL;
         buffer[i++] = 0xc0 + (*str >> 6);
         buffer[i++] = 0x80 + (*str & 0x3f);
         str += 1;
      } else if (*str >= 0xd800 && *str < 0xdc00) {
         stb_uint32 c;
         if (i+4 > n) return NULL;
         c = ((str[0] - 0xd800) << 10) + ((str[1]) - 0xdc00) + 0x10000;
         buffer[i++] = 0xf0 + (c >> 18);
         buffer[i++] = 0x80 + ((c >> 12) & 0x3f);
         buffer[i++] = 0x80 + ((c >>  6) & 0x3f);
         buffer[i++] = 0x80 + ((c      ) & 0x3f);
         str += 2;
      } else if (*str >= 0xdc00 && *str < 0xe000) {
         return NULL;
      } else {
         if (i+3 > n) return NULL;
         buffer[i++] = 0xe0 + (*str >> 12);
         buffer[i++] = 0x80 + ((*str >> 6) & 0x3f);
         buffer[i++] = 0x80 + ((*str     ) & 0x3f);
         str += 1;
      }
   }
   buffer[i] = 0;
   return buffer;
}

// Assembly:
pushq %rbx
movzwl (%rsi), %r9d
xorl %eax, %eax
testw %r9w, %r9w
je 0x2ff3
leal -0x1(%rdx), %ecx
xorl %r8d, %r8d
movzwl %r9w, %r9d
cmpw $0x7f, %r9w
ja 0x2edf
cmpl %ecx, %r8d
jge 0x2ffa
addq $0x2, %rsi
movslq %r8d, %r10
incl %r8d
movb %r9b, (%rdi,%r10)
jmp 0x2fe2
cmpl $0x7ff, %r9d            # imm = 0x7FF
ja 0x2f19
leal 0x2(%r8), %r10d
cmpl %edx, %r10d
jge 0x2ffa
shrl $0x6, %r9d
orb $-0x40, %r9b
movslq %r8d, %r8
movb %r9b, (%rdi,%r8)
movb (%rsi), %r9b
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, 0x1(%rdi,%r8)
jmp 0x2fdb
movl %r9d, %r10d
andl $0xfc00, %r10d          # imm = 0xFC00
cmpl $0xd800, %r10d          # imm = 0xD800
jne 0x2f95
leal 0x4(%r8), %r10d
cmpl %edx, %r10d
jge 0x2f8e
shll $0xa, %r9d
movzwl 0x2(%rsi), %r11d
addl %r11d, %r9d
addl $0xfca02400, %r9d       # imm = 0xFCA02400
movl %r9d, %ebx
shrl $0x12, %ebx
addb $-0x10, %bl
movslq %r8d, %r8
movb %bl, (%rdi,%r8)
movl %r9d, %ebx
shrl $0xc, %ebx
andb $0x3f, %bl
orb $-0x80, %bl
movb %bl, 0x1(%rdi,%r8)
shrl $0x6, %r9d
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, 0x2(%rdi,%r8)
andb $0x3f, %r11b
orb $-0x80, %r11b
movb %r11b, 0x3(%rdi,%r8)
addq $0x4, %rsi
movl %r10d, %r8d
cmpl %edx, %r10d
jl 0x2fe2
jmp 0x2ffa
cmpl $0xdc00, %r10d          # imm = 0xDC00
je 0x2ffa
leal 0x3(%r8), %r10d
cmpl %edx, %r10d
jge 0x2ffa
shrl $0xc, %r9d
orb $-0x20, %r9b
movslq %r8d, %r8
movb %r9b, (%rdi,%r8)
movzwl (%rsi), %r9d
shrl $0x6, %r9d
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, 0x1(%rdi,%r8)
movb (%rsi), %r9b
andb $0x3f, %r9b
orb $-0x80, %r9b
movb %r9b, 0x2(%rdi,%r8)
addq $0x2, %rsi
movl %r10d, %r8d
movzwl (%rsi), %r9d
testw %r9w, %r9w
jne 0x2eb8
movslq %r8d, %rax
movb $0x0, (%rdi,%rax)
movq %rdi, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fatal
void stb_fatal(char *s, ...)
{
   va_list a;
   if (stb__file)
      fprintf(stderr, "[%s:%d] ", stb__file, stb__line);
   va_start(a,s);
   fputs("Fatal error: ", stderr);
   vfprintf(stderr, s, a);
   va_end(a);
   fputs("\n", stderr);
   #ifdef STB_DEBUG
   #ifdef _MSC_VER
   #ifndef STB_PTR64
   __asm int 3;   // trap to debugger!
   #else
   __debugbreak();
   #endif
   #else
   __builtin_trap();
   #endif
   #endif
   exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x30ab
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x1aa4e(%rip), %rdx     # 0x1db00
testq %rdx, %rdx
je 0x30d5
movq 0x16f3a(%rip), %rax     # 0x19ff8
movq (%rax), %rdi
movl 0x1aa41(%rip), %ecx     # 0x1db08
leaq 0xf3e4(%rip), %rsi      # 0x124b2
xorl %eax, %eax
callq 0x21f0
leaq 0x20(%rsp), %rax
movq %rsp, %r14
movq %rax, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x16ef7(%rip), %r15     # 0x19ff8
movq (%r15), %rsi
leaq 0xf3b0(%rip), %rdi      # 0x124bb
callq 0x2150
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2330
movq (%r15), %rsi
leaq 0xf388(%rip), %rdi      # 0x124b0
callq 0x2150
movl $0x1, %edi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_
void stb_(char *s, ...)
{
   if (stb__log_active) {
      FILE *f = fopen(stb__log_filename, "a");
      if (f) {
         va_list a;
         if (stb__log_fileline && stb__file)
            fprintf(f, "[%s:%4d] ", stb__file, stb__line);
         va_start(a,s);
         vfprintf(f, s, a);
         va_end(a);
         fputs("\n", f);
         fclose(f);
      }
   }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
testb %al, %al
je 0x3192
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpl $0x0, 0x1704e(%rip)     # 0x1a200
je 0x3252
movq %rdi, %rbx
movq 0x17046(%rip), %rdi     # 0x1a208
leaq 0xf308(%rip), %rsi      # 0x124d1
callq 0x22f0
testq %rax, %rax
je 0x3252
movq %rax, %r14
cmpl $0x0, 0x17027(%rip)     # 0x1a204
setne %al
movq 0x1a919(%rip), %rdx     # 0x1db00
testq %rdx, %rdx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x320b
movl 0x1a90e(%rip), %ecx     # 0x1db08
leaq 0xf2d2(%rip), %rsi      # 0x124d3
movq %r14, %rdi
xorl %eax, %eax
callq 0x21f0
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2330
leaq 0xf26e(%rip), %rdi      # 0x124b0
movq %r14, %rsi
callq 0x2150
movq %r14, %rdi
callq 0x20d0
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_append_to_file
void stb_append_to_file(char *filename, char *s, ...)
{
   FILE *f = fopen(filename, "a");
   if (f) {
      va_list a;
      va_start(a,s);
      vfprintf(f, s, a);
      va_end(a);
      fputs("\n", f);
      fclose(f);
   }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x32b9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0xf211(%rip), %rsi      # 0x124d1
callq 0x22f0
testq %rax, %rax
je 0x3314
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2330
leaq 0xf1ac(%rip), %rdi      # 0x124b0
movq %r14, %rsi
callq 0x2150
movq %r14, %rdi
callq 0x20d0
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_swap
void stb_swap(void *p, void *q, size_t sz)
{
   char buffer[256];
   if (p == q) return;
   if (sz == 4) {
      stb__4 temp    = * ( stb__4 *) p;
      * (stb__4 *) p = * ( stb__4 *) q;
      * (stb__4 *) q = temp;
      return;
   } else if (sz == 8) {
      stb__8 temp    = * ( stb__8 *) p;
      * (stb__8 *) p = * ( stb__8 *) q;
      * (stb__8 *) q = temp;
      return;
   }

   while (sz > sizeof(buffer)) {
      stb_swap(p, q, sizeof(buffer));
      p = (char *) p + sizeof(buffer);
      q = (char *) q + sizeof(buffer);
      sz -= sizeof(buffer);
   }

   memcpy(buffer, p     , sz);
   memcpy(p     , q     , sz);
   memcpy(q     , buffer, sz);
}

// Assembly:
cmpq %rsi, %rdi
je 0x33d1
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpq $0x4, %rdx
je 0x3359
cmpq $0x8, %r14
jne 0x3365
movq (%r15), %rax
movq (%rbx), %rcx
movq %rcx, (%r15)
movq %rax, (%rbx)
jmp 0x33c3
movl (%r15), %eax
movl (%rbx), %ecx
movl %ecx, (%r15)
movl %eax, (%rbx)
jmp 0x33c3
cmpq $0x101, %r14            # imm = 0x101
jb 0x3396
movl $0x100, %r12d           # imm = 0x100
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
movq %rbx, %rsi
callq 0x331f
addq %r12, %r15
addq %r12, %rbx
addq $-0x100, %r14
cmpq %r12, %r14
ja 0x3374
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2230
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2230
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2230
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_array_block_alloc
void **stb_array_block_alloc(int count, int blocksize)
{
   int i;
   char *p = (char *) malloc(sizeof(void *) * count + count * blocksize);
   void **q;
   if (p == NULL) return NULL;
   q = (void **) p;
   p += sizeof(void *) * count;
   for (i=0; i < count; ++i)
      q[i] = p + i * blocksize;
   return q;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
movslq %edi, %r14
movl %esi, %eax
imull %edi, %eax
cltq
leaq (%rax,%r14,8), %rdi
callq 0x2250
testq %rax, %rax
je 0x3468
testl %ebx, %ebx
jle 0x346a
shlq $0x3, %r14
movq %rax, %rcx
addq %r14, %rcx
movslq %ebp, %rdx
movl %ebx, %esi
xorl %edi, %edi
movq %rcx, (%rax,%rdi,8)
incq %rdi
addq %rdx, %rcx
cmpq %rdi, %rsi
jne 0x3457
jmp 0x346a
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_newell_normal
void stb_newell_normal(float *normal, int num_vert, float **vert, int normalize)
{
   int i,j;
   float p;
   normal[0] = normal[1] = normal[2] = 0;
   for (i=num_vert-1,j=0; j < num_vert; i=j++) {
      float *u = vert[i];
      float *v = vert[j];
      normal[0] += (u[1] - v[1]) * (u[2] + v[2]);
      normal[1] += (u[2] - v[2]) * (u[0] + v[0]);
      normal[2] += (u[0] - v[0]) * (u[1] + v[1]);
   }
   if (normalize) {
      p = normal[0]*normal[0] + normal[1]*normal[1] + normal[2]*normal[2];
      p = (float) (1.0 / sqrt(p));
      normal[0] *= p;
      normal[1] *= p;
      normal[2] *= p;
   }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
movq $0x0, (%rdi)
testl %esi, %esi
jle 0x35af
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
movss 0x8(%rbx), %xmm2
movl %esi, %eax
decl %esi
xorl %edi, %edi
movslq %esi, %rsi
movq (%rdx,%rsi,8), %rsi
movq (%rdx,%rdi,8), %r8
movss 0x4(%rsi), %xmm3
movss 0x8(%rsi), %xmm4
subss 0x4(%r8), %xmm3
addss 0x8(%r8), %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm0
movss %xmm0, (%rbx)
movss 0x8(%rsi), %xmm3
subss 0x8(%r8), %xmm3
movss (%rsi), %xmm4
addss (%r8), %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm1
movss %xmm1, 0x4(%rbx)
movss (%rsi), %xmm3
movss 0x4(%rsi), %xmm4
subss (%r8), %xmm3
addss 0x4(%r8), %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm2
movss %xmm2, 0x8(%rbx)
movl %edi, %esi
leaq 0x1(%rdi), %r8
movq %r8, %rdi
cmpq %r8, %rax
jne 0x3532
testl %ecx, %ecx
je 0x361d
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
movss 0x8(%rbx), %xmm1
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x35eb
sqrtsd %xmm0, %xmm0
jmp 0x35f0
callq 0x2380
movsd 0xea28(%rip), %xmm1     # 0x12020
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movsd (%rbx), %xmm1
movaps %xmm0, %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
mulps %xmm1, %xmm2
movlps %xmm2, (%rbx)
mulss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_box_face_vertex_axis_side
int stb_box_face_vertex_axis_side(int face_number, int vertex_number, int axis)
{
   static int box_vertices[6][4][3] =
   {
      { { 1,1,1 }, { 1,0,1 }, { 1,0,0 }, { 1,1,0 } },
      { { 0,0,0 }, { 0,0,1 }, { 0,1,1 }, { 0,1,0 } },
      { { 0,0,0 }, { 0,1,0 }, { 1,1,0 }, { 1,0,0 } },
      { { 0,0,0 }, { 1,0,0 }, { 1,0,1 }, { 0,0,1 } },
      { { 1,1,1 }, { 0,1,1 }, { 0,0,1 }, { 1,0,1 } },
      { { 1,1,1 }, { 1,1,0 }, { 0,1,0 }, { 0,1,1 } },
   };
   assert(face_number >= 0 && face_number < 6);
   assert(vertex_number >= 0 && vertex_number < 4);
   assert(axis >= 0 && axis < 3);
   return box_vertices[face_number][vertex_number][axis];
}

// Assembly:
pushq %rax
cmpl $0x6, %edi
jae 0x3654
cmpl $0x4, %esi
jae 0x3673
cmpl $0x3, %edx
jae 0x3692
movl %edi, %eax
movl %esi, %ecx
movl %edx, %edx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq 0xecec(%rip), %rsi      # 0x12330
addq %rax, %rsi
leaq (%rcx,%rcx,2), %rax
leaq (%rsi,%rax,4), %rax
movl (%rax,%rdx,4), %eax
popq %rcx
retq
leaq 0xee82(%rip), %rdi      # 0x124dd
leaq 0xee9f(%rip), %rsi      # 0x12501
leaq 0xeea0(%rip), %rcx      # 0x12509
movl $0x52e, %edx            # imm = 0x52E
callq 0x2140
leaq 0xeec0(%rip), %rdi      # 0x1253a
leaq 0xee80(%rip), %rsi      # 0x12501
leaq 0xee81(%rip), %rcx      # 0x12509
movl $0x52f, %edx            # imm = 0x52F
callq 0x2140
leaq 0xeec9(%rip), %rdi      # 0x12562
leaq 0xee61(%rip), %rsi      # 0x12501
leaq 0xee62(%rip), %rcx      # 0x12509
movl $0x530, %edx            # imm = 0x530
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_linear_controller
void stb_linear_controller(float *curpos, float target_pos, float acc, float deacc, float dt)
{
   float sign = 1, p, cp = *curpos;
   if (cp == target_pos) return;
   if (target_pos < cp) {
      target_pos = -target_pos;
      cp = -cp;
      sign = -1;
   }
   // first decelerate
   if (cp < 0) {
      p = cp + deacc * dt;
      if (p > 0) {
         p = 0;
         dt = dt - cp / deacc;
         if (dt < 0) dt = 0;
      } else {
         dt = 0;
      }
      cp = p;
   }
   // now accelerate
   p = cp + acc*dt;
   if (p > target_pos) p = target_pos;
   *curpos = p * sign;
   // @TODO: testing
}

// Assembly:
movss (%rdi), %xmm5
ucomiss %xmm0, %xmm5
jne 0x36bd
jp 0x36bd
retq
movaps 0xe99c(%rip), %xmm4     # 0x12060
movaps %xmm5, %xmm7
xorps %xmm4, %xmm7
ja 0x36d1
movaps %xmm0, %xmm4
jmp 0x36d4
xorps %xmm0, %xmm4
cmpltss %xmm5, %xmm0
andps %xmm0, %xmm7
movaps %xmm0, %xmm6
andnps %xmm5, %xmm6
orps %xmm7, %xmm6
xorps %xmm5, %xmm5
ucomiss %xmm6, %xmm5
jbe 0x3715
movaps %xmm2, %xmm7
mulss %xmm3, %xmm7
addss %xmm6, %xmm7
ucomiss %xmm5, %xmm7
jbe 0x371b
divss %xmm2, %xmm6
subss %xmm6, %xmm3
xorps %xmm7, %xmm7
ucomiss %xmm3, %xmm7
movaps %xmm3, %xmm5
jbe 0x371b
xorps %xmm5, %xmm5
jmp 0x371b
movaps %xmm3, %xmm5
movaps %xmm6, %xmm7
mulss %xmm5, %xmm1
addss %xmm7, %xmm1
minss %xmm1, %xmm4
movaps %xmm0, %xmm1
andnps %xmm4, %xmm1
xorps 0xe92c(%rip), %xmm4     # 0x12060
andps %xmm0, %xmm4
orps %xmm1, %xmm4
movss %xmm4, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_is_prime
int stb_is_prime(unsigned int m)
{
   unsigned int i,j;
   if (m < 2) return 0;
   if (m == 2) return 1;
   if (!(m & 1)) return 0;
   if (m % 3 == 0) return (m == 3);
   for (i=5; (j=i*i), j <= m && j > i; i += 6) {
      if (m %   i   == 0) return 0;
      if (m % (i+2) == 0) return 0;
   }
   return 1;
}

// Assembly:
xorl %ecx, %ecx
cmpl $0x2, %edi
jb 0x37df
jne 0x3784
movl $0x1, %ecx
jmp 0x37df
testb $0x1, %dil
je 0x37df
imull $0xaaaaaaab, %edi, %eax # imm = 0xAAAAAAAB
cmpl $0x55555556, %eax       # imm = 0x55555556
jb 0x37d7
cmpl $0x19, %edi
jb 0x377d
movl $0xb, %esi
leal -0x6(%rsi), %r8d
xorl %ecx, %ecx
movl %edi, %eax
xorl %edx, %edx
divl %r8d
testl %edx, %edx
je 0x37df
leal -0x4(%rsi), %r8d
xorl %ecx, %ecx
movl %edi, %eax
xorl %edx, %edx
divl %r8d
testl %edx, %edx
je 0x37df
movl %esi, %eax
imull %esi, %eax
cmpl %edi, %eax
ja 0x377d
leal 0x6(%rsi), %ecx
cmpl %esi, %eax
movl %ecx, %esi
ja 0x37a1
jmp 0x377d
xorl %ecx, %ecx
cmpl $0x3, %edi
sete %cl
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_power_of_two_nearest_prime
unsigned int stb_power_of_two_nearest_prime(int n)
{
   static signed char tab[32] = { 0,0,0,0,1,0,-1,0,1,-1,-1,3,-1,0,-1,2,1,
                                   0,2,0,-1,-4,-1,5,-1,18,-2,15,2,-1,2,0 };
   if (!tab[0]) {
      int i;
      for (i=0; i < 32; ++i)
         tab[i] = (1 << i) + 2*tab[i] - 1;
      tab[1] = 2;
      tab[0] = 1;
   }
   if (n >= 32) return 0xfffffffb;
   return tab[n];
}

// Assembly:
cmpb $0x0, 0x16a27(%rip)     # 0x1a210
jne 0x3938
movdqa 0xe889(%rip), %xmm0     # 0x12080
movdqa 0xe891(%rip), %xmm1     # 0x12090
movdqa 0xe899(%rip), %xmm2     # 0x120a0
movdqa 0xe8a1(%rip), %xmm3     # 0x120b0
xorl %eax, %eax
movdqa 0xe8a7(%rip), %xmm4     # 0x120c0
leaq 0x169f0(%rip), %rcx     # 0x1a210
movdqa 0xe8a8(%rip), %xmm5     # 0x120d0
pcmpeqd %xmm6, %xmm6
movdqa 0xe8ac(%rip), %xmm7     # 0x120e0
movdqa %xmm2, %xmm8
pslld $0x17, %xmm8
paddd %xmm4, %xmm8
cvttps2dq %xmm8, %xmm12
movdqa %xmm3, %xmm8
pslld $0x17, %xmm8
paddd %xmm4, %xmm8
cvttps2dq %xmm8, %xmm13
movdqa %xmm1, %xmm8
pslld $0x17, %xmm8
paddd %xmm4, %xmm8
cvttps2dq %xmm8, %xmm14
movdqa %xmm0, %xmm8
pslld $0x17, %xmm8
paddd %xmm4, %xmm8
cvttps2dq %xmm8, %xmm15
movdqa (%rax,%rcx), %xmm11
movdqa %xmm11, %xmm8
punpckhbw %xmm8, %xmm8    # xmm8 = xmm8[8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15]
movdqa %xmm8, %xmm9
punpckhwd %xmm9, %xmm9    # xmm9 = xmm9[4,4,5,5,6,6,7,7]
punpcklwd %xmm8, %xmm8    # xmm8 = xmm8[0,0,1,1,2,2,3,3]
punpcklbw %xmm11, %xmm11  # xmm11 = xmm11[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
movdqa %xmm11, %xmm10
punpcklwd %xmm10, %xmm10  # xmm10 = xmm10[0,0,1,1,2,2,3,3]
punpckhwd %xmm11, %xmm11  # xmm11 = xmm11[4,4,5,5,6,6,7,7]
paddd %xmm11, %xmm11
paddd %xmm12, %xmm11
paddd %xmm10, %xmm10
paddd %xmm13, %xmm10
paddd %xmm8, %xmm8
paddd %xmm14, %xmm8
paddd %xmm9, %xmm9
paddd %xmm15, %xmm9
pand %xmm5, %xmm11
pand %xmm5, %xmm10
packuswb %xmm11, %xmm10
pand %xmm5, %xmm8
pand %xmm5, %xmm9
packuswb %xmm9, %xmm8
packuswb %xmm8, %xmm10
paddb %xmm6, %xmm10
movdqa %xmm10, (%rax,%rcx)
addq $0x10, %rax
paddd %xmm7, %xmm3
paddd %xmm7, %xmm2
paddd %xmm7, %xmm1
paddd %xmm7, %xmm0
cmpq $0x20, %rax
jne 0x3834
movw $0x201, 0x168d8(%rip)   # imm = 0x201
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
cmpl $0x1f, %edi
jg 0x3950
movslq %edi, %rax
leaq 0x168c4(%rip), %rcx     # 0x1a210
movsbl (%rax,%rcx), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_bitcount
int stb_bitcount(unsigned int a)
{
   a = (a & 0x55555555) + ((a >>  1) & 0x55555555); // max 2
   a = (a & 0x33333333) + ((a >>  2) & 0x33333333); // max 4
   a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
   a = (a + (a >> 8)); // max 16 per 8 bits
   a = (a + (a >> 16)); // max 32 per 8 bits
   return a & 0xff;
}

// Assembly:
movl $0x55555555, %eax       # imm = 0x55555555
movl %edi, %ecx
andl %eax, %ecx
shrl %edi
andl %eax, %edi
addl %ecx, %edi
movl $0x33333333, %eax       # imm = 0x33333333
movl %edi, %ecx
andl %eax, %ecx
shrl $0x2, %edi
andl %eax, %edi
addl %ecx, %edi
movl %edi, %eax
shrl $0x4, %eax
addl %edi, %eax
andl $0xf0f0f0f, %eax        # imm = 0xF0F0F0F
movl %eax, %ecx
shrl $0x8, %ecx
addl %eax, %ecx
movl %ecx, %eax
shrl $0x10, %eax
addl %ecx, %eax
movzbl %al, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_log2_floor
int stb_log2_floor(unsigned int n)
{
   static signed char log2_4[16] = { -1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3 };

   // 2 compares if n < 16, 3 compares otherwise
   if (n < (1U << 14))
        if (n < (1U <<  4))        return     0 + log2_4[n      ];
        else if (n < (1U <<  9))      return  5 + log2_4[n >>  5];
             else                     return 10 + log2_4[n >> 10];
   else if (n < (1U << 24))
             if (n < (1U << 19))      return 15 + log2_4[n >> 15];
             else                     return 20 + log2_4[n >> 20];
        else if (n < (1U << 29))      return 25 + log2_4[n >> 25];
             else                     return 30 + log2_4[n >> 30];
}

// Assembly:
cmpl $0x3fff, %edi           # imm = 0x3FFF
ja 0x3a45
cmpl $0xf, %edi
ja 0x3a67
movl %edi, %eax
leaq 0xe7b0(%rip), %rcx      # 0x121f0
movsbl (%rax,%rcx), %eax
retq
cmpl $0xffffff, %edi         # imm = 0xFFFFFF
ja 0x3a81
cmpl $0x7ffff, %edi          # imm = 0x7FFFF
ja 0x3a9b
shrl $0xf, %edi
leaq 0xe791(%rip), %rax      # 0x121f0
movsbl (%rdi,%rax), %eax
addl $0xf, %eax
retq
cmpl $0x1ff, %edi            # imm = 0x1FF
ja 0x3aad
shrl $0x5, %edi
leaq 0xe777(%rip), %rax      # 0x121f0
movsbl (%rdi,%rax), %eax
addl $0x5, %eax
retq
cmpl $0x1fffffff, %edi       # imm = 0x1FFFFFFF
ja 0x3abf
shrl $0x19, %edi
leaq 0xe75d(%rip), %rax      # 0x121f0
movsbl (%rdi,%rax), %eax
addl $0x19, %eax
retq
shrl $0x14, %edi
leaq 0xe74b(%rip), %rax      # 0x121f0
movsbl (%rdi,%rax), %eax
addl $0x14, %eax
retq
shrl $0xa, %edi
leaq 0xe739(%rip), %rax      # 0x121f0
movsbl (%rdi,%rax), %eax
addl $0xa, %eax
retq
shrl $0x1e, %edi
leaq 0xe727(%rip), %rax      # 0x121f0
movsbl (%rdi,%rax), %eax
addl $0x1e, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_lowbit8
int stb_lowbit8(unsigned int n)
{
   static signed char lowbit4[16] = { -1,0,1,0, 2,0,1,0, 3,0,1,0, 2,0,1,0 };
   int k = lowbit4[n & 15];
   if (k >= 0) return k;
   k = lowbit4[(n >> 4) & 15];
   if (k >= 0) return k+4;
   return k;
}

// Assembly:
movl %edi, %eax
andl $0xf, %eax
je 0x3b00
leaq 0xe705(%rip), %rcx      # 0x12200
movsbl (%rax,%rcx), %eax
retq
shrl $0x4, %edi
andl $0xf, %edi
leaq 0xe6f3(%rip), %rax      # 0x12200
movsbl (%rdi,%rax), %ecx
leal 0x4(%rcx), %eax
testl %edi, %edi
cmovel %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/stb/./stb.h
// Function: stb_probe_guess
static int stb_probe_guess(stb_search *s, int *result)
{
   switch(s->mode) {
      case STB_probe_binary_largest:
         if (s->minval == s->maxval) {
            *result = s->minval;
            return 0;
         }
         assert(s->minval < s->maxval);
         // if a < b, then a < p <= b
         s->guess = s->minval + (((unsigned) s->maxval - s->minval + 1) >> 1);
         break;

      case STB_probe_binary_smallest:
         if (s->minval == s->maxval) {
            *result = s->minval;
            return 0;
         }
         assert(s->minval < s->maxval);
         // if a < b, then a <= p < b
         s->guess = s->minval + (((unsigned) s->maxval - s->minval) >> 1);
         break;
      case STB_probe_open_smallest:
      case STB_probe_open_largest:
         s->guess = s->maxval;  // guess the current maxval
         break;
   }
   *result = s->guess;
   return 1;
}

// Assembly:
pushq %rax
movl 0xc(%rdi), %eax
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jb 0x3ca4
testl %eax, %eax
je 0x3ca9
cmpl $0x1, %eax
jne 0x3cbf
movl (%rdi), %ecx
movl 0x4(%rdi), %eax
subl %ecx, %eax
je 0x3cb2
jle 0x3ccb
incl %eax
jmp 0x3cb8
movl 0x4(%rdi), %eax
jmp 0x3cbc
movl (%rdi), %ecx
movl 0x4(%rdi), %eax
subl %ecx, %eax
jne 0x3cb6
xorl %eax, %eax
jmp 0x3cc7
jle 0x3cea
shrl %eax
addl %ecx, %eax
movl %eax, 0x8(%rdi)
movl 0x8(%rdi), %ecx
movl $0x1, %eax
movl %ecx, (%rsi)
popq %rcx
retq
leaq 0xf2ca(%rip), %rdi      # 0x12f9c
leaq 0xe828(%rip), %rsi      # 0x12501
leaq 0xf2d2(%rip), %rcx      # 0x12fb2
movl $0x682, %edx            # imm = 0x682
callq 0x2140
leaq 0xf2ab(%rip), %rdi      # 0x12f9c
leaq 0xe809(%rip), %rsi      # 0x12501
leaq 0xf2b3(%rip), %rcx      # 0x12fb2
movl $0x68c, %edx            # imm = 0x68C
callq 0x2140