LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/qinguoyi[P]TinyWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::~sort_timer_lst()
sort_timer_lst::~sort_timer_lst()
{
    util_timer *tmp = head;
    while (tmp)
    {
        head = tmp->next;
        delete tmp;
        tmp = head;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x28
popq %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3cd4
movq 0x20(%rdi), %rax
movq %rax, (%rbx)
movq %r14, %rsi
callq 0x33d0
jmp 0x3cbb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/qinguoyi[P]TinyWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::del_timer(util_timer*)
void sort_timer_lst::del_timer(util_timer *timer)
{
    if (!timer)
    {
        return;
    }
    if ((timer == head) && (timer == tail))
    {
        delete timer;
        head = NULL;
        tail = NULL;
        return;
    }
    if (timer == head)
    {
        head = head->next;
        head->prev = NULL;
        delete timer;
        return;
    }
    if (timer == tail)
    {
        tail = tail->prev;
        tail->next = NULL;
        delete timer;
        return;
    }
    timer->prev->next = timer->next;
    timer->next->prev = timer->prev;
    delete timer;
}

// Assembly:
pushq %rbx
testq %rsi, %rsi
je 0x3df9
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
cmpq %rsi, %rcx
je 0x3db6
cmpq %rsi, %rax
je 0x3dc9
movq 0x18(%rsi), %rax
movq 0x20(%rsi), %rcx
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%rcx)
jmp 0x3dd6
cmpq %rsi, %rax
je 0x3de5
movq 0x20(%rcx), %rax
movq %rax, (%rbx)
andq $0x0, 0x18(%rax)
jmp 0x3dd6
movq 0x18(%rax), %rax
movq %rax, 0x8(%rbx)
andq $0x0, 0x20(%rax)
pushq $0x28
popq %rax
movq %rsi, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x33d0
pushq $0x28
popq %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x33d0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/qinguoyi[P]TinyWebServer/timer/lst_timer.cpp
// Function: sort_timer_lst::tick()
void sort_timer_lst::tick()
{
    if (!head)
    {
        return;
    }
    
    time_t cur = time(NULL);
    util_timer *tmp = head;
    while (tmp)
    {
        if (cur < tmp->expire)
        {
            break;
        }
        tmp->cb_func(tmp->user_data);
        head = tmp->next;
        if (head)
        {
            head->prev = NULL;
        }
        delete tmp;
        tmp = head;
    }
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x3e5d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x3390
movq %rax, %r14
pushq $0x28
popq %r15
movq (%rbx), %r12
testq %r12, %r12
je 0x3e52
cmpq (%r12), %r14
jl 0x3e52
movq 0x10(%r12), %rdi
callq *0x8(%r12)
movq 0x20(%r12), %rax
movq %rax, (%rbx)
testq %rax, %rax
je 0x3e45
andq $0x0, 0x18(%rax)
movq %r12, %rdi
movq %r15, %rsi
callq 0x33d0
jmp 0x3e1b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/qinguoyi[P]TinyWebServer/webserver.cpp
// Function: WebServer::sql_pool()
void WebServer::sql_pool()
{
    //初始化数据库连接池
    m_connPool = connection_pool::GetInstance();
    m_connPool->init("localhost", m_user, m_passWord, m_databaseName, 3306, m_sql_num, m_close_log);

    //初始化数据库读取表
    users->initmysql_result(m_connPool);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
callq 0x6570
movq %rax, %r14
movq %rax, 0x30(%rbx)
leaq 0x163c(%rip), %rsi      # 0x848e
leaq 0x68(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3bd4
leaq 0x38(%rbx), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3520
leaq 0x58(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x3520
leaq 0x78(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3520
movl 0x14(%rbx), %eax
movl 0x98(%rbx), %r10d
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %r14, %rdi
movl $0xcea, %r9d            # imm = 0xCEA
pushq %rax
pushq %r10
callq 0x65e0
popq %rax
popq %rcx
leaq 0x8(%rsp), %rdi
callq 0x3190
leaq 0x28(%rsp), %rdi
callq 0x3190
leaq 0x48(%rsp), %rdi
callq 0x3190
leaq 0x68(%rsp), %rdi
callq 0x3190
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rsi
callq 0x4000
addq $0x88, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3190
jmp 0x6f0e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3190
jmp 0x6f1d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3190
jmp 0x6f2c
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3190
movq %rbx, %rdi
callq 0x3630
// File: /workspace/github_cpp_makefile_star2_O2/qinguoyi[P]TinyWebServer/webserver.cpp
// Function: WebServer::adjust_timer(util_timer*)
void WebServer::adjust_timer(util_timer *timer)
{
    time_t cur = time(NULL);
    timer->expire = cur + 3 * TIMESLOT;
    utils.m_timer_lst.adjust_timer(timer);

    LOG_INFO("%s", "adjust timer once");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x3390
addq $0xf, %rax
movq %rax, (%rbx)
leaq 0x1d588(%r14), %rdi
movq %rbx, %rsi
callq 0x3d40
cmpl $0x0, 0x14(%r14)
je 0x73a2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x53a0
leaq 0xee6(%rip), %rdx       # 0x8294
leaq 0x1142(%rip), %rcx      # 0x84f7
pushq $0x1
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x5e3e
callq 0x53a0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6200
// File: /workspace/github_cpp_makefile_star2_O2/qinguoyi[P]TinyWebServer/webserver.cpp
// Function: WebServer::deal_timer(util_timer*, int)
void WebServer::deal_timer(util_timer *timer, int sockfd)
{
    timer->cb_func(&users_timer[sockfd]);
    if (timer)
    {
        utils.m_timer_lst.del_timer(timer);
    }

    LOG_INFO("close fd %d", users_timer[sockfd].sockfd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movslq %edx, %r15
shlq $0x5, %r15
movq 0x1d580(%rdi), %rdi
addq %r15, %rdi
callq *0x8(%rsi)
leaq 0x1d588(%rbx), %rdi
movq %r14, %rsi
callq 0x3d8a
cmpl $0x0, 0x14(%rbx)
je 0x7410
popq %rbx
popq %r14
popq %r15
retq
callq 0x53a0
movq 0x1d580(%rbx), %rcx
movl 0x10(%rcx,%r15), %ecx
leaq 0x10e1(%rip), %rdx      # 0x8509
pushq $0x1
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x5e3e
callq 0x53a0
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6200
nop
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/chip8.cpp
// Function: chip8::initialize()
void chip8::initialize(){

	// Clears the memory of the system
	for(int i = 0; i < 4096; i++){
		memory[i] = 0;
	}

	// Clears all registers and the stack
	for(int i = 0; i < 16; i++){
		v[i] = 0;
		stack[i] = 0;
        keyboard[i] = 0;
	}

	// Clears the display
	for(int i = 0; i < 2048; i++){
		display[i] = 0;
	}

	// Uploads the fontset to the Memory
	for(int i = 0; i < 80; i++){
		memory[i] = chip8_fontset[i];
	}

	opcode = 0;
	pc = 0x200;
	sp = 0;
	I = 0;

	soundTimer = 0;
	delayTimer = 0;

	drawFlag = 1;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movabsq $0x2, %rax
cmpq $0x1002, %rax           # imm = 0x1002
je 0x250b
movb $0x0, (%rdi,%rax)
incq %rax
jmp 0x24fa
movabsq $-0x10, %rax
xorl %ecx, %ecx
testq %rax, %rax
je 0x2538
movb %cl, 0x1012(%rdi,%rax)
andw $0x0, 0x303a(%rdi,%rax,2)
movb %cl, 0x304c(%rdi,%rax)
incq %rax
jmp 0x2517
movl $0x406, %eax            # imm = 0x406
cmpq $0xc06, %rax            # imm = 0xC06
je 0x254e
andl $0x0, (%rdi,%rax,4)
incq %rax
jmp 0x253d
xorl %eax, %eax
leaq 0x3c69(%rip), %rcx      # 0x61c0
cmpq $0x50, %rax
je 0x2569
movb (%rax,%rcx), %dl
movb %dl, 0x2(%rdi,%rax)
incq %rax
jmp 0x2557
andw $0x0, (%rdi)
andw $0x0, 0x303a(%rdi)
movl $0x2000000, 0x1012(%rdi) # imm = 0x2000000
andw $0x0, 0x3018(%rdi)
movb $0x1, 0x304c(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/chip8.cpp
// Function: chip8::loadGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool chip8::loadGame(std::string game){
    //printf("Loading the game....\n");
	FILE *gameP = fopen(game.c_str(), "rb");
	if(gameP == NULL){
        //printf("ERROR! Game file not found!\n");
		return false;
	}

	// Finds the size of the game
	fseek(gameP, 0, SEEK_END);
	long int gameSize = ftell(gameP);
	fseek(gameP, 0, SEEK_SET);

	// Reads the data from the game into the buffer
	char *buffer = (char*) malloc(sizeof(char)*gameSize);
	if(buffer == NULL){
		return false;
	}
	fread(buffer, 1, gameSize, gameP);

	// Writes the data on the memory
	for(int i = 0; i < gameSize; i++){
		memory[i + 512] = buffer[i];
        //printf("Memory[%d] = %d\n", i+512,memory[i+512]);
	}

	fclose(gameP);
	free(buffer);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x1ad5(%rip), %rsi      # 0x4080
callq 0x21f0
testq %rax, %rax
je 0x2634
movq %rax, %r14
xorl %r12d, %r12d
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x21c0
movq %r14, %rdi
callq 0x2030
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21c0
movq %r15, %rdi
callq 0x2250
testq %rax, %rax
je 0x2637
movq %rax, %r13
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2280
xorl %eax, %eax
testq %r15, %r15
cmovleq %rax, %r15
cmpq %rax, %r15
je 0x261f
movb (%r13,%rax), %cl
movb %cl, 0x202(%rbx,%rax)
incq %rax
jmp 0x2609
movq %r14, %rdi
callq 0x21b0
movq %r13, %rdi
callq 0x2200
movb $0x1, %r12b
jmp 0x2637
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/display.cpp
// Function: display::displayInit()
void display::displayInit(){

    if(SDL_Init(SDL_INIT_EVERYTHING) < 0)
		printf("Error! Unable to initialize the SDL!\n");

	// Creates the screen
	screen = SDL_CreateWindow("CHIP-8 Emulator", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1024, 512, SDL_WINDOW_SHOWN);
	if(screen == NULL)
		printf("Error! Unable to create the screen!\n");

	// Creates the render
	render = SDL_CreateRenderer(screen, -1, SDL_RENDERER_ACCELERATED);
	if(render == NULL)
		printf("Error! Unable to create the render!\n");

	SDL_SetRenderDrawColor(render, 0xFF, 0xFF, 0xFF, 0xFF);

	// Creates the Texture
	texture = SDL_CreateTexture(render, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, 64, 32);
	if(texture == NULL)
		printf("Error! Unable to create the texture!\n");

	// Delay to see possible errors
	SDL_Delay(1000);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xf231, %edi           # imm = 0xF231
callq 0x21a0
testl %eax, %eax
jns 0x2d17
leaq 0x1381(%rip), %rdi      # 0x4093
callq 0x22a0
leaq 0x1365(%rip), %rdi      # 0x4083
pushq $0x4
popq %r9
movl $0x1fff0000, %esi       # imm = 0x1FFF0000
movl $0x1fff0000, %edx       # imm = 0x1FFF0000
movl $0x400, %ecx            # imm = 0x400
movl $0x200, %r8d            # imm = 0x200
callq 0x2080
movq %rax, (%rbx)
testq %rax, %rax
jne 0x2d53
leaq 0x136d(%rip), %rdi      # 0x40b8
callq 0x22a0
movq (%rbx), %rax
pushq $-0x1
popq %rsi
pushq $0x2
popq %rdx
movq %rax, %rdi
callq 0x2050
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x2d7a
leaq 0x136b(%rip), %rdi      # 0x40dc
callq 0x22a0
movq 0x8(%rbx), %rax
movq %rax, %rdi
movl $0xff, %esi
movl $0xff, %edx
movl $0xff, %ecx
movl $0xff, %r8d
callq 0x2270
movq 0x8(%rbx), %rdi
pushq $0x40
popq %rcx
pushq $0x20
popq %r8
movl $0x16362004, %esi       # imm = 0x16362004
xorl %edx, %edx
callq 0x2300
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x2dc3
leaq 0x1342(%rip), %rdi      # 0x4100
callq 0x22a0
movl $0x3e8, %edi            # imm = 0x3E8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/display.cpp
// Function: display::displayDraw(unsigned int*)
void display::displayDraw(uint32_t *disp){
    // Saves the display pixels on the buffer
	uint32_t pixel;
    uint32_t pixels[32*64];

    for(int i = 0; i < 2048; i++){
        pixel = disp[i];
        pixels[i] = (0x00FFFFFF * pixel) | 0xFF000000;
    }

    // Updates the screen
    SDL_UpdateTexture(texture, NULL, pixels, 64 * sizeof(uint32_t));
    SDL_RenderCopy(render, texture, NULL, NULL);
    SDL_RenderPresent(render);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x800, %rax            # imm = 0x800
je 0x2e12
xorl %ecx, %ecx
subl (%rsi,%rax,4), %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movl %ecx, -0x2010(%rbp,%rax,4)
incq %rax
jmp 0x2df3
movq 0x10(%rbx), %rdi
leaq -0x2010(%rbp), %rdx
xorl %esi, %esi
movl $0x100, %ecx            # imm = 0x100
callq 0x2170
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x21d0
movq 0x8(%rbx), %rdi
callq 0x20a0
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/display.cpp
// Function: display::displayDestroy()
void display::displayDestroy(){
    SDL_DestroyTexture(texture);
    SDL_DestroyRenderer(render);
    SDL_DestroyWindow(screen);
    SDL_Quit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x2150
movq 0x8(%rbx), %rdi
callq 0x20e0
movq (%rbx), %rdi
callq 0x2040
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2090
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/emulator.cpp
// Function: emulator::saveGame(unsigned char, chip8*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void emulator::saveGame(uint8_t SaveStateSlot, chip8 *Chip8, std::string game){
	FILE* saveGame;

	std::string extension = std::string("_") + std::to_string(SaveStateSlot)
							+ std::string(".sav");
	game.append(extension);

	saveGame = fopen(game.c_str(),"wb");

	fwrite(Chip8, sizeof(chip8), 1, saveGame);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %r15d
leaq 0x1390(%rip), %rsi      # 0x422c
leaq -0x80(%rbp), %rdi
leaq -0x1a(%rbp), %rdx
callq 0x3830
movzbl %r15b, %esi
leaq -0x60(%rbp), %rdi
callq 0x386b
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x37bf
leaq 0x135d(%rip), %rsi      # 0x422e
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x3830
leaq -0xc0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x37bf
leaq -0x40(%rbp), %rdi
callq 0x2110
leaq -0xa0(%rbp), %rdi
callq 0x2110
leaq -0x60(%rbp), %rdi
callq 0x2110
leaq -0x80(%rbp), %rdi
callq 0x2110
leaq -0xc0(%rbp), %rsi
movq %r14, %rdi
callq 0x2340
movq (%r14), %rdi
leaq 0x12fe(%rip), %rsi      # 0x4233
callq 0x21f0
pushq $0x1
popq %rdx
movl $0x3050, %esi           # imm = 0x3050
movq %rbx, %rdi
movq %rax, %rcx
callq 0x2330
leaq -0xc0(%rbp), %rdi
callq 0x2110
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
jmp 0x2fa7
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2110
jmp 0x2f84
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x2110
jmp 0x2f95
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2110
jmp 0x2fa3
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x22e0
movq %rax, %rbx
jmp 0x2fac
nop
// File: /workspace/github_cpp_makefile_star2_O2/TNanukem[P]chip8-emulator/emulator.cpp
// Function: emulator::loadGame(unsigned char, chip8*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
chip8 emulator::loadGame(uint8_t SaveStateSlot, chip8 *Chip8, std::string game){
	FILE* loadGame;

	std::string extension = std::string("_") + std::to_string(SaveStateSlot)
							+ std::string(".sav");
	game.append(extension);

	loadGame = fopen(game.c_str(),"rb");

	if(loadGame == NULL){
		return *Chip8;
	}

	chip8 aux;

	fread(&aux, sizeof(chip8), 1, loadGame);
	return aux;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %r8, %r15
movq %rcx, %r14
movl %edx, %r12d
movq %rdi, %rbx
leaq 0x124d(%rip), %rsi      # 0x422c
leaq -0x88(%rbp), %rdi
leaq -0x22(%rbp), %rdx
callq 0x3830
movzbl %r12b, %esi
leaq -0x68(%rbp), %rdi
callq 0x386b
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x37bf
leaq 0x1214(%rip), %rsi      # 0x422e
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x3830
leaq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x37bf
leaq -0x48(%rbp), %rdi
callq 0x2110
leaq -0xa8(%rbp), %rdi
callq 0x2110
leaq -0x68(%rbp), %rdi
callq 0x2110
leaq -0x88(%rbp), %rdi
callq 0x2110
leaq -0xc8(%rbp), %rsi
movq %r15, %rdi
callq 0x2340
movq (%r15), %rdi
leaq 0xfff(%rip), %rsi       # 0x4080
callq 0x21f0
testq %rax, %rax
je 0x30a8
andw $0x0, 0x304c(%rbx)
pushq $0x1
popq %rdx
movl $0x3050, %esi           # imm = 0x3050
movq %rbx, %rdi
movq %rax, %rcx
callq 0x2280
jmp 0x30b8
movl $0x3050, %edx           # imm = 0x3050
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
leaq -0xc8(%rbp), %rdi
callq 0x2110
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
jmp 0x311a
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2110
jmp 0x30f4
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x2110
jmp 0x3105
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2110
jmp 0x3113
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x22e0
movq %rax, %rbx
jmp 0x311f
// File: /workspace/github_cpp_makefile_star2_O2/jp-myk[P]WAVUtil/src/wav_trim.cpp
// Function: main
int main(int argc, char *argv[]){
  if(argc<5){
    std::cout << argv[0] << " WAVFILE OUTWAVFLE START_TIME[sec] END_TIME[sec]" << std::endl;
    exit(0);
  }
  const char* wavFName=argv[1];
  const char* output_wavFName=argv[2];
  float start= 0.0;
  float end  = 1.0;
  start= atof(argv[3]);
  end  = atof(argv[4]);
  WAV wav,outwav;
  int res=0;
  res=wav.Read(wavFName);
  std::cout << "trim!" << std::endl;
  res=SimpleWAV::trim_wav(start, end, wav, outwav); // extra 0.0 - 1.00[sec]
  res=outwav.Write(output_wavFName);
  if(res==0) std::cout << "sucess" << std::endl;

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %r15
cmpl $0x4, %edi
jle 0x36ce
movq 0x8(%r15), %r14
movq 0x10(%r15), %rbx
movq 0x18(%r15), %rdi
callq 0x2150
movsd %xmm0, 0x8(%rsp)
movq 0x20(%r15), %rdi
callq 0x2150
movsd %xmm0, (%rsp)
leaq 0x68(%rsp), %rdi
callq 0x3244
leaq 0x10(%rsp), %rdi
callq 0x3244
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x2812
movq 0x297f(%rip), %rdi      # 0x5fd0
leaq 0xce2(%rip), %rsi       # 0x433a
callq 0x2100
movq %rax, %rdi
callq 0x20a0
cvtsd2ss 0x8(%rsp), %xmm0
cvtsd2ss (%rsp), %xmm1
leaq 0x68(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2cb8
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x265e
testl %eax, %eax
jne 0x36ab
movq 0x2939(%rip), %rdi      # 0x5fd0
leaq 0xca2(%rip), %rsi       # 0x4340
callq 0x2100
movq %rax, %rdi
callq 0x20a0
leaq 0x10(%rsp), %rdi
callq 0x3286
leaq 0x68(%rsp), %rdi
callq 0x3286
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq (%r15), %rsi
movq 0x28f8(%rip), %rdi      # 0x5fd0
callq 0x2100
leaq 0xc25(%rip), %rsi       # 0x4309
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x20a0
xorl %edi, %edi
callq 0x2140
movq %rax, %rbx
jmp 0x370d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3286
leaq 0x68(%rsp), %rdi
callq 0x3286
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_load_file(unsigned char**, unsigned long*, char const*)
unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename) {
  unsigned error;
  FILE* file = fopen(filename, "rb");
  if(!file) return 78;
  error = lodepng_load_file_(out, outsize, file);
  fclose(file);
  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x5c21c(%rip), %rsi     # 0x5e76d
movq %rdx, %rdi
callq 0x2250
testq %rax, %rax
je 0x2593
movq %rax, %rbx
movq %rax, %rdi
callq 0xbd0e
testq %rax, %rax
js 0x2598
movq %rax, %r12
movq %rax, (%r14)
movq %rax, %rdi
callq 0x2280
movq %rax, (%r15)
testq %rax, %rax
sete %cl
testq %r12, %r12
setne %dl
testb %cl, %dl
je 0x259d
pushq $0x53
jmp 0x259a
pushq $0x4e
popq %rbp
jmp 0x25c1
pushq $0x4e
popq %rbp
jmp 0x25b9
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x22c0
xorl %ecx, %ecx
cmpq (%r14), %rax
pushq $0x4e
popq %rbp
cmovel %ecx, %ebp
movq %rbx, %rdi
callq 0x2200
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_zlib_decompressv(ucvector*, unsigned char const*, unsigned long, LodePNGDecompressSettings const*)
static unsigned lodepng_zlib_decompressv(ucvector* out,
                                         const unsigned char* in, size_t insize,
                                         const LodePNGDecompressSettings* settings) {
  unsigned error = 0;
  unsigned CM, CINFO, FDICT;

  if(insize < 2) return 53; /*error, size of zlib data too small*/
  /*read information from zlib header*/
  if((in[0] * 256 + in[1]) % 31 != 0) {
    /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/
    return 24;
  }

  CM = in[0] & 15;
  CINFO = (in[0] >> 4) & 15;
  /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/
  FDICT = (in[1] >> 5) & 1;
  /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/

  if(CM != 8 || CINFO > 7) {
    /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/
    return 25;
  }
  if(FDICT != 0) {
    /*error: the specification of PNG says about the zlib stream:
      "The additional flags shall not specify a preset dictionary."*/
    return 26;
  }

  error = inflatev(out, in + 2, insize - 2, settings);
  if(error) return error;

  if(!settings->ignore_adler32) {
    unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]);
    unsigned checksum = adler32(out->data, (unsigned)(out->size));
    if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/
  }

  return 0; /*no error*/
}

// Assembly:
cmpq $0x2, %rdx
jae 0x4231
pushq $0x35
popq %rax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movzbl (%rsi), %esi
movl %esi, %eax
shll $0x8, %eax
movzbl 0x1(%r15), %ecx
orl %ecx, %eax
movw $0x1f, %di
xorl %edx, %edx
divw %di
testw %dx, %dx
je 0x4266
pushq $0x18
jmp 0x42c5
movl %esi, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %sil, %sil
sets %dl
orb %al, %dl
je 0x427f
pushq $0x19
jmp 0x42c5
testb $0x20, %cl
jne 0x42c3
leaq 0x2(%r15), %rdx
leaq -0x2(%r14), %rcx
movq 0x18(%r12), %rax
testq %rax, %rax
je 0x42cf
leaq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r12, %r8
callq *%rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%rbx)
testl %eax, %eax
je 0x42e4
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x430d
cmpq %rcx, %rax
pushq $0x6e
popq %rax
sbbl $0x0, %eax
jmp 0x42c6
pushq $0x1a
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r12, %rcx
callq 0x2c0e
testl %eax, %eax
jne 0x42c6
cmpl $0x0, (%r12)
jne 0x4309
leaq (%r15,%r14), %rdi
addq $-0x4, %rdi
callq 0x456f
movl %eax, %ebp
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0x43ef
cmpl %ebp, %eax
jne 0x4311
xorl %eax, %eax
jmp 0x42c6
pushq $0x6e
jmp 0x42c5
pushq $0x3a
jmp 0x42c5
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_crc32(unsigned char const*, unsigned long)
unsigned lodepng_crc32(const unsigned char* data, size_t length) {
  /*Using the Slicing by Eight algorithm*/
  unsigned r = 0xffffffffu;
  while(length >= 8) {
    r = lodepng_crc32_table7[(data[0] ^ (r & 0xffu))] ^
        lodepng_crc32_table6[(data[1] ^ ((r >> 8) & 0xffu))] ^
        lodepng_crc32_table5[(data[2] ^ ((r >> 16) & 0xffu))] ^
        lodepng_crc32_table4[(data[3] ^ ((r >> 24) & 0xffu))] ^
        lodepng_crc32_table3[data[4]] ^
        lodepng_crc32_table2[data[5]] ^
        lodepng_crc32_table1[data[6]] ^
        lodepng_crc32_table0[data[7]];
    data += 8;
    length -= 8;
  }
  while(length--) {
    r = lodepng_crc32_table0[(r ^ *data++) & 0xffu] ^ (r >> 8);
  }
  return r ^ 0xffffffffu;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0xff, %edx
leaq 0x57df9(%rip), %r8      # 0x5c290
leaq 0x581f2(%rip), %r9      # 0x5c690
leaq 0x585eb(%rip), %r10     # 0x5ca90
leaq 0x589e4(%rip), %r11     # 0x5ce90
leaq 0x58ddd(%rip), %rbx     # 0x5d290
leaq 0x591d6(%rip), %r14     # 0x5d690
leaq 0x595cf(%rip), %r15     # 0x5da90
leaq 0x599c8(%rip), %rcx     # 0x5de90
cmpq $0x7, %rsi
jbe 0x4542
movzbl (%rdi), %ebp
movl %eax, %r12d
andl %edx, %r12d
xorl %ebp, %r12d
movzbl 0x1(%rdi), %ebp
movl %eax, %r13d
shrl $0x8, %r13d
andl %edx, %r13d
xorl %ebp, %r13d
movl (%r9,%r13,4), %ebp
xorl (%r8,%r12,4), %ebp
movzbl 0x2(%rdi), %r12d
movl %eax, %r13d
shrl $0x10, %r13d
andl %edx, %r13d
xorl %r12d, %r13d
xorl (%r10,%r13,4), %ebp
movzbl 0x3(%rdi), %r12d
shrl $0x18, %eax
xorl %r12d, %eax
xorl (%r11,%rax,4), %ebp
movzbl 0x4(%rdi), %eax
xorl (%rbx,%rax,4), %ebp
movzbl 0x5(%rdi), %eax
xorl (%r14,%rax,4), %ebp
movzbl 0x6(%rdi), %eax
xorl (%r15,%rax,4), %ebp
movzbl 0x7(%rdi), %eax
xorl (%rcx,%rax,4), %ebp
addq $0x8, %rdi
addq $-0x8, %rsi
movl %ebp, %eax
jmp 0x44c8
xorl %edx, %edx
cmpq %rdx, %rsi
je 0x4560
movb (%rdi,%rdx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rcx,%r8,4), %eax
incq %rdx
jmp 0x4544
notl %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_next(unsigned char*, unsigned char*)
unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end) {
  size_t available_size = (size_t)(end - chunk);
  if(chunk >= end || available_size < 12) return end; /*too small to contain a chunk*/
  if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47
    && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) {
    /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */
    return chunk + 8;
  } else {
    size_t total_chunk_length;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    if(total_chunk_length > available_size) return end; /*outside of range*/
    return chunk + total_chunk_length;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rsi, %r15
subq %rdi, %r15
setbe %al
cmpq $0xc, %r15
setb %cl
orb %al, %cl
jne 0x46fc
movq %rdi, %r14
cmpb $-0x77, (%rdi)
jne 0x46e2
cmpb $0x50, 0x1(%r14)
jne 0x46e2
cmpb $0x4e, 0x2(%r14)
jne 0x46e2
cmpb $0x47, 0x3(%r14)
jne 0x46e2
cmpb $0xd, 0x4(%r14)
jne 0x46e2
cmpb $0xa, 0x5(%r14)
jne 0x46e2
cmpb $0x1a, 0x6(%r14)
jne 0x46e2
cmpb $0xa, 0x7(%r14)
jne 0x46e2
addq $0x8, %r14
movq %r14, %rbx
jmp 0x46fc
movq %r14, %rdi
callq 0x456f
movl %eax, %eax
leaq 0xc(%rax), %rcx
cmpq %r15, %rcx
leaq 0xc(%r14,%rax), %rax
cmovbeq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_next_const(unsigned char const*, unsigned char const*)
const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end) {
  size_t available_size = (size_t)(end - chunk);
  if(chunk >= end || available_size < 12) return end; /*too small to contain a chunk*/
  if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47
    && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) {
    /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */
    return chunk + 8;
  } else {
    size_t total_chunk_length;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    if(total_chunk_length > available_size) return end; /*outside of range*/
    return chunk + total_chunk_length;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rsi, %r15
subq %rdi, %r15
setbe %al
cmpq $0xc, %r15
setb %cl
orb %al, %cl
jne 0x477d
movq %rdi, %r14
cmpb $-0x77, (%rdi)
jne 0x4763
cmpb $0x50, 0x1(%r14)
jne 0x4763
cmpb $0x4e, 0x2(%r14)
jne 0x4763
cmpb $0x47, 0x3(%r14)
jne 0x4763
cmpb $0xd, 0x4(%r14)
jne 0x4763
cmpb $0xa, 0x5(%r14)
jne 0x4763
cmpb $0x1a, 0x6(%r14)
jne 0x4763
cmpb $0xa, 0x7(%r14)
jne 0x4763
addq $0x8, %r14
movq %r14, %rbx
jmp 0x477d
movq %r14, %rdi
callq 0x456f
movl %eax, %eax
leaq 0xc(%rax), %rcx
cmpq %r15, %rcx
leaq 0xc(%r14,%rax), %rax
cmovbeq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_append(unsigned char**, unsigned long*, unsigned char const*)
unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk) {
  unsigned i;
  size_t total_chunk_length, new_length;
  unsigned char *chunk_start, *new_buffer;

  if(!lodepng_chunk_type_name_valid(chunk)) {
    return 121; /* invalid chunk type name */
  }
  if(lodepng_chunk_reserved(chunk)) {
    return 122; /* invalid third lowercase character */
  }

  if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return 77;
  if(lodepng_addofl(*outsize, total_chunk_length, &new_length)) return 77;

  new_buffer = (unsigned char*)lodepng_realloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*out) = new_buffer;
  (*outsize) = new_length;
  chunk_start = &(*out)[new_length - total_chunk_length];

  for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i];

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x48b7
testb %al, %al
je 0x486e
testb $0x20, 0x6(%rbx)
jne 0x4872
movq %rbx, %rdi
callq 0x456f
movl %eax, %r13d
addq $0xc, %r13
movq (%r14), %rbp
movq %r13, %r12
addq %rbp, %r12
jae 0x4884
pushq $0x4d
jmp 0x4874
pushq $0x79
jmp 0x4874
pushq $0x7a
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rdi
movq %r12, %rsi
callq 0x2330
testq %rax, %rax
je 0x48b3
movq %rax, (%r15)
movq %r12, (%r14)
addq %rax, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
movl %ecx, %ecx
cmpq %rcx, %r13
je 0x4875
movb (%rbx,%rcx), %dl
movb %dl, (%rbp,%rcx)
incl %ecx
jmp 0x48a1
pushq $0x53
jmp 0x4874
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_type_name_valid(unsigned char const*)
static unsigned char lodepng_chunk_type_name_valid(const unsigned char* chunk) {
  unsigned i;
  for(i = 0; i != 4; ++i) {
    char c = (char)chunk[4 + i];
    if(!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) {
      return 0; /* not valid */
    }
  }
  return 1; /* valid */
}

// Assembly:
xorl %eax, %eax
cmpq $0x4, %rax
je 0x48d4
movb 0x4(%rdi,%rax), %cl
andb $-0x21, %cl
addb $-0x41, %cl
incq %rax
cmpb $0x1a, %cl
jb 0x48b9
xorl %eax, %eax
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_createv(ucvector*, unsigned long, char const*, unsigned char const*)
static unsigned lodepng_chunk_createv(ucvector* out,
                                      size_t length, const char* type, const unsigned char* data) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, length, type));

  /*3: the data*/
  lodepng_memcpy(chunk + 8, data, length);

  /*4: CRC (of the chunkname characters and the data)*/
  lodepng_chunk_generate_crc(chunk);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %rcx
movq %rsi, %r14
movq %rdi, %rsi
movq %rsp, %rdi
movq %r14, %rdx
callq 0xcdb2
movl %eax, %ebp
testl %eax, %eax
jne 0x4963
movq (%rsp), %r15
leaq 0x8(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4a08
movq %r15, %rdi
callq 0x4657
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_color_mode_copy(LodePNGColorMode*, LodePNGColorMode const*)
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) {
  lodepng_color_mode_cleanup(dest);
  lodepng_memcpy(dest, source, sizeof(LodePNGColorMode));
  if(source->palette) {
    dest->palette = (unsigned char*)lodepng_malloc(1024);
    if(!dest->palette && source->palettesize) return 83; /*alloc fail*/
    lodepng_memcpy(dest->palette, source->palette, source->palettesize * 4);
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x498e
pushq $0x28
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4a08
xorl %ebx, %ebx
cmpq $0x0, 0x8(%r14)
je 0x49fc
movl $0x400, %edi            # imm = 0x400
callq 0x2280
movq %rax, 0x8(%r15)
movq 0x10(%r14), %rdx
testq %rax, %rax
je 0x49f4
shlq $0x2, %rdx
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x4a08
jmp 0x49fc
testq %rdx, %rdx
je 0x4a04
pushq $0x53
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %edx, %edx
jmp 0x49e6
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_color_mode_alloc_palette(LodePNGColorMode*)
static void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) {
  size_t i;
  /*if the palette is already allocated, it will have size 1024 so no reallocation needed in that case*/
  /*the palette must have room for up to 256 colors with 4 bytes each.*/
  if(!info->palette) info->palette = (unsigned char*)lodepng_malloc(1024);
  if(!info->palette) return; /*alloc fail*/
  for(i = 0; i != 256; ++i) {
    /*Initialize all unused colors with black, the value used for invalid palette indices.
    This is an error according to the PNG spec, but common PNG decoders make it black instead.
    That makes color conversion slightly faster due to no error handling needed.*/
    info->palette[i * 4 + 0] = 0;
    info->palette[i * 4 + 1] = 0;
    info->palette[i * 4 + 2] = 0;
    info->palette[i * 4 + 3] = 255;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
jne 0x4acc
movl $0x400, %edi            # imm = 0x400
callq 0x2280
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4afe
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x100, %rcx            # imm = 0x100
je 0x4afe
movq 0x8(%rbx), %rdx
movb %al, (%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb %al, 0x1(%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb %al, 0x2(%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb $-0x1, 0x3(%rdx,%rcx,4)
incq %rcx
jmp 0x4ad0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_add_text_sized(LodePNGInfo*, char const*, char const*, unsigned long)
static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t size) {
  char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1)));

  if(new_keys) info->text_keys = new_keys;
  if(new_strings) info->text_strings = new_strings;

  if(!new_keys || !new_strings) return 83; /*alloc fail*/

  ++info->text_num;
  info->text_keys[info->text_num - 1] = alloc_string(key);
  info->text_strings[info->text_num - 1] = alloc_string_sized(str, size);
  if(!info->text_keys[info->text_num - 1] || !info->text_strings[info->text_num - 1]) return 83; /*alloc fail*/

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2330
movq %rax, %r13
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2330
testq %r13, %r13
je 0x4cb6
movq %r13, 0x50(%rbx)
pushq $0x53
popq %rbp
testq %rax, %rax
je 0x4cc2
movq %rax, 0x58(%rbx)
incq 0x48(%rbx)
movq %r12, %rdi
callq 0x4fdb
movq 0x48(%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq %r15, %rdi
movq %r14, %rsi
callq 0xce2d
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x50(%rbx), %rax
cmpq $0x0, -0x8(%rax,%rcx,8)
je 0x4cc2
movq 0x58(%rbx), %rax
xorl %edx, %edx
cmpq $0x0, -0x8(%rax,%rcx,8)
pushq $0x53
popq %rbp
cmovnel %edx, %ebp
jmp 0x4cc2
pushq $0x53
popq %rbp
testq %rax, %rax
je 0x4cc2
movq %rax, 0x58(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_add_itext_sized(LodePNGInfo*, char const*, char const*, char const*, char const*, unsigned long)
static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag,
                                        const char* transkey, const char* str, size_t size) {
  char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1)));
  char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1)));
  char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1)));

  if(new_keys) info->itext_keys = new_keys;
  if(new_langtags) info->itext_langtags = new_langtags;
  if(new_transkeys) info->itext_transkeys = new_transkeys;
  if(new_strings) info->itext_strings = new_strings;

  if(!new_keys || !new_langtags || !new_transkeys || !new_strings) return 83; /*alloc fail*/

  ++info->itext_num;

  info->itext_keys[info->itext_num - 1] = alloc_string(key);
  info->itext_langtags[info->itext_num - 1] = alloc_string(langtag);
  info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey);
  info->itext_strings[info->itext_num - 1] = alloc_string_sized(str, size);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2330
movq %rax, %r14
movq 0x60(%rbx), %rax
movq 0x70(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2330
movq %rax, %r15
movq 0x60(%rbx), %rax
movq 0x78(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2330
movq %rax, %r12
movq 0x60(%rbx), %rax
movq 0x80(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2330
movq %rax, %rcx
testq %r14, %r14
je 0x4e65
movq %r14, 0x68(%rbx)
testq %r15, %r15
je 0x4e6e
movq %r15, 0x70(%rbx)
testq %r12, %r12
je 0x4e77
movq %r12, 0x78(%rbx)
pushq $0x53
popq %rax
testq %rcx, %rcx
je 0x4efa
movq %rcx, 0x80(%rbx)
testq %r14, %r14
je 0x4efa
testq %r15, %r15
je 0x4efa
testq %r12, %r12
je 0x4efa
incq 0x60(%rbx)
movq %rbp, %rdi
callq 0x4fdb
movq 0x60(%rbx), %rcx
movq 0x68(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq %r13, %rdi
callq 0x4fdb
movq 0x60(%rbx), %rcx
movq 0x70(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq (%rsp), %rdi
callq 0x4fdb
movq 0x60(%rbx), %rcx
movq 0x78(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xce2d
movq 0x60(%rbx), %rcx
movq 0x80(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_set_icc(LodePNGInfo*, char const*, unsigned char const*, unsigned int)
unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) {
  if(info->iccp_defined) lodepng_clear_icc(info);

  if(profile_size == 0) return 100; /*invalid ICC profile size*/

  info->iccp_name = alloc_string(name);
  if(!info->iccp_name) return 83; /*alloc fail*/

  info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size);
  if(!info->iccp_profile) {
    lodepng_free(info->iccp_name);
    return 83; /*alloc fail*/
  }

  lodepng_memcpy(info->iccp_profile, profile, profile_size);
  info->iccp_profile_size = profile_size;
  info->iccp_defined = 1;

  return 0; /*ok*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
cmpl $0x0, 0xfc(%rdi)
je 0x4f30
movq %r14, %rdi
callq 0x4fa7
testl %ebx, %ebx
je 0x4f89
movq %r12, %rdi
callq 0x4fdb
movq %rax, 0x100(%r14)
pushq $0x53
popq %rbp
testq %rax, %rax
je 0x4f96
movq %rax, %r12
movl %ebx, %r13d
movq %r13, %rdi
callq 0x2280
movq %rax, 0x108(%r14)
testq %rax, %rax
je 0x4f8e
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x4a08
movl %ebx, 0x110(%r14)
movl $0x1, 0xfc(%r14)
xorl %ebp, %ebp
jmp 0x4f96
pushq $0x64
popq %rbp
jmp 0x4f96
movq %r12, %rdi
callq 0x2260
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_set_exif(LodePNGInfo*, unsigned char const*, unsigned int)
unsigned lodepng_set_exif(LodePNGInfo* info, const unsigned char* exif, unsigned exif_size) {
  if(info->exif_defined) lodepng_clear_exif(info);
  info->exif = (unsigned char*)lodepng_malloc(exif_size);

  if(!info->exif) return 83; /*alloc fail*/

  lodepng_memcpy(info->exif, exif, exif_size);
  info->exif_size = exif_size;
  info->exif_defined = 1;

  return 0; /*ok*/
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x0, 0x88(%rdi)
je 0x5023
movq %r14, %rdi
callq 0x506d
movl %ebx, %r12d
movq %r12, %rdi
callq 0x2280
movq %rax, 0x90(%r14)
testq %rax, %rax
je 0x505e
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4a08
movl %ebx, 0x98(%r14)
movl $0x1, 0x88(%r14)
xorl %eax, %eax
jmp 0x5061
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_clear_exif(LodePNGInfo*)
void lodepng_clear_exif(LodePNGInfo* info) {
  lodepng_free(info->exif);
  info->exif = NULL;
  info->exif_size = 0;
  info->exif_defined = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
callq 0x2260
andq $0x0, 0x90(%rbx)
andl $0x0, 0x98(%rbx)
andl $0x0, 0x88(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_info_cleanup(LodePNGInfo*)
void lodepng_info_cleanup(LodePNGInfo* info) {
  lodepng_color_mode_cleanup(&info->color);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  LodePNGText_cleanup(info);
  LodePNGIText_cleanup(info);

  lodepng_clear_icc(info);
  lodepng_clear_exif(info);

  LodePNGUnknownChunks_cleanup(info);
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x498e
movq %rbx, %rdi
callq 0x4cd5
movq %rbx, %rdi
callq 0x4d1f
movq %rbx, %rdi
callq 0x4fa7
movq %rbx, %rdi
callq 0x506d
movq %rbx, %rdi
popq %rbx
jmp 0x518e
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: color_tree_add(ColorTree*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)
static unsigned color_tree_add(ColorTree* tree,
                               unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) {
  int bit;
  for(bit = 0; bit < 8; ++bit) {
    int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1);
    if(!tree->children[i]) {
      tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree));
      if(!tree->children[i]) return 83; /*alloc fail*/
      color_tree_init(tree->children[i]);
    }
    tree = tree->children[i];
  }
  tree->index = (int)index;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, %r15d
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %r11
xorl %ebx, %ebx
cmpl $0x8, %ebx
je 0x5fbe
movl %r14d, %eax
movl %ebx, %ecx
shrl %cl, %eax
movl %r13d, %edi
shrl %cl, %edi
andl $0x1, %eax
andl $0x1, %edi
movl %r12d, %r10d
shrl %cl, %r10d
andl $0x1, %r10d
xorl %ecx, %ecx
btl %ebx, %r15d
setb %cl
leal (%rcx,%rdi,4), %ecx
leal (%rcx,%rax,8), %eax
leal (%rax,%r10,2), %ebp
movq (%r11,%rbp,8), %rax
testq %rax, %rax
jne 0x5fb7
movl $0x88, %edi
movq %r11, 0x10(%rsp)
callq 0x2280
movq 0x10(%rsp), %rcx
movq %rax, (%rcx,%rbp,8)
testq %rax, %rax
je 0x5fcd
movq %rax, %rdi
callq 0x5f0d
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rax
incl %ebx
movq %rax, %r11
jmp 0x5f4c
movl 0xc(%rsp), %eax
movl %eax, 0x80(%r11)
xorl %eax, %eax
jmp 0x5fd0
pushq $0x53
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_tEXt(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  unsigned error = 0;
  char *key = 0, *str = 0;

  while(!error) /*not really a while loop, only used to break on error*/ {
    unsigned length, string2_begin;

    length = 0;
    while(length < chunkLength && data[length] != 0) ++length;
    /*even though it's not allowed by the standard, no error is thrown if
    there's no null termination char, if the text is empty*/
    if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/

    key = (char*)lodepng_malloc(length + 1);
    if(!key) CERROR_BREAK(error, 83); /*alloc fail*/

    lodepng_memcpy(key, data, length);
    key[length] = 0;

    string2_begin = length + 1; /*skip keyword null terminator*/

    length = (unsigned)(chunkLength < string2_begin ? 0 : chunkLength - string2_begin);
    str = (char*)lodepng_malloc(length + 1);
    if(!str) CERROR_BREAK(error, 83); /*alloc fail*/

    lodepng_memcpy(str, data + string2_begin, length);
    str[length] = 0;

    error = lodepng_add_text(info, key, str);

    break;
  }

  lodepng_free(key);
  lodepng_free(str);

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbp
pushq $-0x50
popq %r13
leal 0x50(%r13), %r14d
cmpq %r12, %r14
jae 0x774f
cmpb $0x0, (%r15,%r14)
je 0x774f
incl %r13d
jmp 0x773a
cmpl $-0x4f, %r13d
jae 0x7763
pushq $0x59
popq %r15
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x77e4
addl $0x51, %r13d
movq %r13, %rdi
callq 0x2280
testq %rax, %rax
je 0x77db
movq %rax, %rbx
movq %rbp, (%rsp)
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4a08
movb $0x0, (%rbx,%r14)
xorl %r14d, %r14d
subq %r13, %r12
cmovbq %r14, %r12
leal 0x1(%r12), %edi
callq 0x2280
testq %rax, %rax
je 0x77e0
movq %rax, %rbp
addq %r13, %r15
movl %r12d, %r14d
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4a08
movb $0x0, (%rbp,%r14)
movq (%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x4be3
movl %eax, %r15d
movq %rbp, %r14
jmp 0x77e4
xorl %ebx, %ebx
xorl %r14d, %r14d
pushq $0x53
popq %r15
movq %rbx, %rdi
callq 0x2260
movq %r14, %rdi
callq 0x2260
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_cICP(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_cICP(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(chunkLength != 4) return 117; /*invalid cICP chunk size*/

  info->cicp_defined = 1;
  /* No error checking for value ranges is done here, that is up to a CICP
  handling library, not the PNG decoding. Just pass on the metadata. */
  info->cicp_color_primaries = data[0];
  info->cicp_transfer_function = data[1];
  info->cicp_matrix_coefficients = data[2];
  info->cicp_video_full_range_flag = data[3];

  return 0; /* OK */
}

// Assembly:
cmpq $0x4, %rdx
jne 0x7e95
movl $0x1, 0x114(%rdi)
movzbl (%rsi), %eax
movl %eax, 0x118(%rdi)
movzbl 0x1(%rsi), %eax
movl %eax, 0x11c(%rdi)
movzbl 0x2(%rsi), %eax
movl %eax, 0x120(%rdi)
movzbl 0x3(%rsi), %eax
movl %eax, 0x124(%rdi)
xorl %eax, %eax
retq
pushq $0x75
popq %rax
retq