LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/main.c
// Function: readRom
uint8_t* readRom(const char* filename, int print)
{
    FILE* romfile = fopen(filename, "rb");
    if (romfile == NULL)
    {
        printf("Error reading file %s\n", filename);
        exit(1);
    }
    uint8_t* rom = malloc(sizeof(uint8_t) * 128 * MEMORY_SEGMENT_SIZE);
    memset(rom, 0, sizeof(uint8_t) * 128 * MEMORY_SEGMENT_SIZE);
    size_t bytesRead = fread(rom, sizeof(uint8_t), 128 * MEMORY_SEGMENT_SIZE, romfile);
    printf("Read %Id bytes from the rom\n", bytesRead);
    if (print)
    {
        printf("Rom:\n");
        int i;
        for (i = 0; i < bytesRead; i++)
            printf("%2X\n", rom[i]);
    }
    fclose(romfile);
    return rom;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r14
leaq 0x19cb(%rip), %rsi      # 0x3004
callq 0x1160
testq %rax, %rax
je 0x16d6
movq %rax, %rbx
movl $0x1, %edi
movl $0x8000, %esi           # imm = 0x8000
callq 0x10c0
movq %rax, %r14
movl $0x1, %esi
movl $0x8000, %edx           # imm = 0x8000
movq %rax, %rdi
movq %rbx, %rcx
callq 0x11c0
movq %rax, %r15
leaq 0x19ec(%rip), %rdi      # 0x3067
movq %rax, %rsi
xorl %eax, %eax
callq 0x1040
testl %r12d, %r12d
je 0x16bc
leaq 0x1a23(%rip), %rdi      # 0x30b4
callq 0x11d0
testq %r15, %r15
je 0x16bc
leaq 0x19c0(%rip), %r12      # 0x3062
xorl %r13d, %r13d
movzbl (%r14,%r13), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1040
incq %r13
cmpq %r13, %r15
jne 0x16a5
movq %rbx, %rdi
callq 0x1130
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x192a(%rip), %rdi      # 0x3007
movq %r14, %rsi
xorl %eax, %eax
callq 0x1040
movl $0x1, %edi
callq 0x1180
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/vm.c
// Function: createVM
VM* createVM(uint16_t* code, uint8_t* rom, Display* display, int debugMode)
{
    VM* vm = (VM*)malloc(sizeof(VM));
    vm->cpu.code = code;
    vm->cpu.pc = code;
    vm->cpu.debugMode = debugMode;
    vm->cpu.breakState = 0;
    vm->cpu.step = 0;
    vm->display = display;
    vm->gpu = createGPU();
    vm->ipu = createIPU();
    memset(vm->memory, 0, sizeof(vm->memory[0][0]) * MEMORY_SEGMENT_COUNT * MEMORY_SEGMENT_SIZE);
    memset(vm->cpu.regs, 0, sizeof(vm->cpu.regs[0]) * REGISTER_COUNT);
    if (rom != NULL) // ROM is optional
        memcpy(vm->memory[128], rom, 128 * MEMORY_SEGMENT_SIZE);
    return vm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
movl $0x10048, %edi          # imm = 0x10048
callq 0x1190
movq %rax, %r14
movq %r13, 0x18(%rax)
movq %r13, 0x10(%rax)
movl %r15d, 0x20(%rax)
movq $0x0, 0x24(%rax)
movq %r12, 0x10040(%rax)
callq 0x1c84
movq %rax, 0x10030(%r14)
xorl %eax, %eax
callq 0x231c
movq %rax, 0x10038(%r14)
leaq 0x30(%r14), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x10a0
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
testq %rbx, %rbx
je 0x1783
movq %r14, %rdi
addq $0x8030, %rdi           # imm = 0x8030
movl $0x8000, %edx           # imm = 0x8000
movq %rbx, %rsi
callq 0x10f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/vm.c
// Function: destroyVM
void destroyVM(VM* vm)
{
    destroyGPU(vm->gpu);
    vm->gpu = NULL;
    destroyIPU(vm->ipu);
    vm->ipu = NULL;
    free(vm);
    vm = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10030(%rdi), %rdi
callq 0x1cca
movq $0x0, 0x10030(%rbx)
movq 0x10038(%rbx), %rdi
callq 0x2388
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1170
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/display.c
// Function: createDisplay
Display* createDisplay(int width, int height, int scale, int pitch)
{
    SDL_Init(SDL_INIT_VIDEO);

    Display* display = (Display*)malloc(sizeof(Display));
    display->width = width;
    display->height = height;
    display->scale = scale;
    display->pitch = pitch;
    display->window = SDL_CreateWindow("Vapor Spec", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 
            width * scale, height * scale, 0);
    display->renderer = SDL_CreateRenderer(display->window, -1, 0);
    display->back = SDL_CreateTexture(display->renderer, 
            SDL_PIXELFORMAT_RGB24, SDL_TEXTUREACCESS_STREAMING, width, height);
    SDL_Surface* splash = SDL_LoadBMP("title.bmp");
    SDL_Texture* splashTex = SDL_CreateTextureFromSurface(display->renderer, splash);
    SDL_RenderCopy(display->renderer, splashTex, NULL, NULL);
    SDL_RenderPresent(display->renderer);
    SDL_Delay(2000); // Show splash screen for 2 seconds
    return display;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %r14d
movl %edi, %r15d
movl $0x20, %edi
callq 0x1100
movl $0x28, %edi
callq 0x1190
movq %rax, %rbx
movl %r15d, 0x18(%rax)
movl %r14d, 0x1c(%rax)
movl %r13d, 0x20(%rax)
movl %r12d, 0x24(%rax)
movl %r13d, %ecx
imull %r15d, %ecx
imull %r14d, %r13d
leaq 0x15c5(%rip), %rdi      # 0x3148
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
movl %r13d, %r8d
xorl %r9d, %r9d
callq 0x1050
movq %rax, (%rbx)
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x1030
movq %rax, %r12
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movl $0x17101803, %esi       # imm = 0x17101803
movl $0x1, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0x11f0
movq %rax, 0x10(%rbx)
leaq 0x157f(%rip), %rdi      # 0x3153
leaq 0x1429(%rip), %rsi      # 0x3004
callq 0x1090
movq %rax, %rdi
movl $0x1, %esi
callq 0x1110
movq %r12, %rdi
movq %rax, %rsi
callq 0x11a0
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1150
movq %r12, %rdi
callq 0x1070
movl $0x7d0, %edi            # imm = 0x7D0
callq 0x10d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/ipu.c
// Function: createIPU
IPU* createIPU()
{
    IPU* ipu = (IPU*)malloc(sizeof(IPU));
    JOYSTICK* js1 = (JOYSTICK*)malloc(sizeof(JOYSTICK));
    js1->buttons[0] = SDLK_UP;
    js1->buttons[1] = SDLK_DOWN;
    js1->buttons[2] = SDLK_LEFT;
    js1->buttons[3] = SDLK_RIGHT;
    js1->buttons[4] = SDLK_o;
    js1->buttons[5] = SDLK_u;
    js1->buttons[6] = SDLK_y;
    js1->buttons[7] = SDLK_h;
    js1->keysAsBits = 0;
    ipu->js1 = js1;

    JOYSTICK* js2 = (JOYSTICK*)malloc(sizeof(JOYSTICK));
    js2->buttons[0] = SDLK_w;
    js2->buttons[1] = SDLK_s;
    js2->buttons[2] = SDLK_a;
    js2->buttons[3] = SDLK_d;
    js2->buttons[4] = SDLK_q;
    js2->buttons[5] = SDLK_e;
    js2->buttons[6] = SDLK_r;
    js2->buttons[7] = SDLK_f;
    js2->keysAsBits = 0;
    ipu->js2 = js2;

    return ipu;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x10, %edi
callq 0x1190
movq %rax, %rbx
movl $0x24, %edi
callq 0x1190
movaps 0xe1f(%rip), %xmm0      # 0x3160
movups %xmm0, (%rax)
movaps 0xe25(%rip), %xmm0      # 0x3170
movups %xmm0, 0x10(%rax)
xorl %r14d, %r14d
movb %r14b, 0x20(%rax)
movq %rax, (%rbx)
movl $0x24, %edi
callq 0x1190
movaps 0xe16(%rip), %xmm0      # 0x3180
movups %xmm0, (%rax)
movaps 0xe1c(%rip), %xmm0      # 0x3190
movups %xmm0, 0x10(%rax)
movb %r14b, 0x20(%rax)
movq %rax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/ipu.c
// Function: destroyIPU
void destroyIPU(IPU* ipu)
{
    free(ipu->js1);
    ipu->js1 = NULL;
    free(ipu->js2);
    ipu->js2 = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1170
xorl %r14d, %r14d
movq %r14, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x1170
movq %r14, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/ipu.c
// Function: updateIPU
void updateIPU(IPU* ipu, SDL_KeyboardEvent kEvent, 
        uint8_t memory[MEMORY_SEGMENT_COUNT][MEMORY_SEGMENT_SIZE])
{
    updateJoystick(ipu->js1, kEvent);
    updateJoystick(ipu->js2, kEvent);
    memory[JOYSTICK_SEG][JOYSTICK_1_OFFSET] = ipu->js1->keysAsBits;
    memory[JOYSTICK_SEG][JOYSTICK_2_OFFSET] = ipu->js2->keysAsBits;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movl 0x10(%rbp), %edx
movl 0x24(%rbp), %r8d
xorl %ecx, %ecx
cmpl (%rax,%rcx,4), %r8d
jne 0x23fb
cmpl $0x301, %edx            # imm = 0x301
je 0x23e7
cmpl $0x300, %edx            # imm = 0x300
jne 0x23fb
movl $0x1, %r9d
shll %cl, %r9d
orb 0x20(%rax), %r9b
jmp 0x23f7
movl $0x1, %r9d
shll %cl, %r9d
notb %r9b
andb 0x20(%rax), %r9b
movb %r9b, 0x20(%rax)
incq %rcx
cmpq $0x8, %rcx
jne 0x23c2
movq 0x8(%rdi), %r9
xorl %ecx, %ecx
cmpl (%r9,%rcx,4), %r8d
jne 0x2443
cmpl $0x301, %edx            # imm = 0x301
je 0x242f
cmpl $0x300, %edx            # imm = 0x300
jne 0x2443
movl $0x1, %r10d
shll %cl, %r10d
orb 0x20(%r9), %r10b
jmp 0x243f
movl $0x1, %r10d
shll %cl, %r10d
notb %r10b
andb 0x20(%r9), %r10b
movb %r10b, 0x20(%r9)
incq %rcx
cmpq $0x8, %rcx
jne 0x240a
movb 0x20(%rax), %al
movb %al, 0x7f00(%rsi)
movq 0x8(%rdi), %rax
movb 0x20(%rax), %al
movb %al, 0x7f01(%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/ipu.c
// Function: updateJoystick
void updateJoystick(JOYSTICK* js, SDL_KeyboardEvent kEvent)
{
    int i;
    uint8_t bit = 1;
    for (i = 0; i < NUM_JOYSTICK_BUTTONS; i++)
    {
        if (kEvent.keysym.sym == js->buttons[i])
        {
            if (kEvent.type == SDL_KEYDOWN)
            {
                // Leave the other bits but ensure the ith bit is 1
                js->keysAsBits |= (bit << i);
            }
            else if (kEvent.type == SDL_KEYUP)
            {
                // Leave the other bits but ensure the ith bit is 0
                js->keysAsBits &= (~(bit << i)); // Bitwise inversion
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rbp), %eax
movl 0x24(%rbp), %edx
xorl %ecx, %ecx
cmpl (%rdi,%rcx,4), %edx
jne 0x24a2
cmpl $0x301, %eax            # imm = 0x301
je 0x2490
cmpl $0x300, %eax            # imm = 0x300
jne 0x24a2
movl $0x1, %esi
shll %cl, %esi
orb 0x20(%rdi), %sil
jmp 0x249e
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb 0x20(%rdi), %sil
movb %sil, 0x20(%rdi)
incq %rcx
cmpq $0x8, %rcx
jne 0x2470
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/cpu.c
// Function: print_disasm_block
void print_disasm_block(CPU *cpu) {
    // Disassemble next 16 instructions
    int i;
    for (i = 0; i < 16; i++)
    {
	int instructionCount = cpu->pc - cpu->code + i;
	if (instructionCount > JUMP_SEGMENT_SIZE * JUMP_SEGMENT_SIZE)
	  continue; // End of program, can't keep reading instructions.
	int instructionSegment = instructionCount / JUMP_SEGMENT_SIZE;
	int instructionOffset = instructionCount % JUMP_SEGMENT_SIZE;
	char assembly[256];
	memset(assembly, 0, sizeof(char) * 256);
	Instruction decoded;
	decode(*(cpu->pc + i), &decoded);
	disassemble(&decoded, assembly);
	// Print star for current instruction
	if (i == 0)
	  printf("*");
	else
	  printf(" ");

	// Print disassembly with segment.offset address
	printf(" %-30s ; %03d.%03d 0x%02X.0x%02X\n", assembly,
	       instructionSegment, instructionOffset,
	       instructionSegment, instructionOffset);
      }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0x10(%rbx), %r14
movq %r14, %r13
subq 0x18(%rbx), %r13
shrq %r13
addq %r12, %r13
cmpl $0x10000, %r13d         # imm = 0x10000
jg 0x2a18
leal 0xff(%r13), %r15d
testl %r13d, %r13d
cmovnsl %r13d, %r15d
movl %r15d, %eax
andl $0xffffff00, %eax       # imm = 0xFFFFFF00
subl %eax, %r13d
sarl $0x8, %r15d
movl $0x100, %edx            # imm = 0x100
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
callq 0x10a0
movzwl (%r14,%r12,2), %eax
movl %eax, %ecx
shrl $0xc, %ecx
movl %eax, %edx
shrl $0x4, %edx
andl $0xf0, %edx
movl %eax, %esi
shll $0x4, %esi
andl $0xf00, %esi            # imm = 0xF00
shll $0xc, %eax
orl %ecx, %eax
orl %edx, %eax
orl %esi, %eax
movw %ax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x130(%rbp), %r14
movq %r14, %rsi
callq 0x24b0
testq %r12, %r12
movl $0x20, %edi
movl $0x2a, %eax
cmovel %eax, %edi
callq 0x11b0
leaq 0xa14(%rip), %rdi       # 0x3416
movq %r14, %rsi
movl %r15d, %edx
movl %r13d, %ecx
movl %r15d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x1040
incq %r12
cmpq $0x10, %r12
jne 0x2958
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/minkcv[P]vm/machine/cpu.c
// Function: print_cpu_state
void print_cpu_state(CPU *cpu)
{
    // Print program counter as segment.offset, disassembly of current instruction, and registers
    int instructionCount = cpu->pc - cpu->code;
    int instructionSegment = instructionCount / JUMP_SEGMENT_SIZE;
    int instructionOffset = instructionCount % JUMP_SEGMENT_SIZE;
    printf("PC:  %03d.%03d 0x%02X.0x%02X\n", 
	   instructionSegment, instructionOffset,
	   instructionSegment, instructionOffset);
    char assembly[256];
    memset(assembly, 0, sizeof(char) * 256);
    Instruction decoded;
    decode(*(cpu->pc), &decoded);
    disassemble(&decoded, assembly);
    printf("ASM: %s\n", assembly);
    int i;
    for (i = 0; i < REGISTER_COUNT; i++)
	printf("r%02d: %03d (0x%02X)\n", i, cpu->regs[i], cpu->regs[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movq 0x10(%rdi), %rdx
subq 0x18(%rdi), %rdx
shrq %rdx
leal 0xff(%rdx), %ecx
testl %edx, %edx
cmovnsl %edx, %ecx
movl %ecx, %eax
andl $0xffffff00, %eax       # imm = 0xFFFFFF00
subl %eax, %edx
sarl $0x8, %ecx
leaq 0x9c5(%rip), %rdi       # 0x3438
movl %ecx, %esi
movl %edx, %r8d
xorl %eax, %eax
callq 0x1040
leaq -0x120(%rbp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x10a0
movq 0x10(%rbx), %rax
movzwl (%rax), %eax
movl %eax, %ecx
shrl $0xc, %ecx
movl %eax, %edx
shrl $0x4, %edx
andl $0xf0, %edx
movl %eax, %esi
shll $0x4, %esi
andl $0xf00, %esi            # imm = 0xF00
shll $0xc, %eax
orl %ecx, %eax
orl %edx, %eax
orl %esi, %eax
leaq -0x1c(%rbp), %rdi
movw %ax, (%rdi)
movq %r14, %rsi
callq 0x24b0
leaq 0x980(%rip), %rdi       # 0x3456
movq %r14, %rsi
xorl %eax, %eax
callq 0x1040
leaq 0x978(%rip), %r14       # 0x345f
xorl %r15d, %r15d
movzbl (%rbx,%r15), %ecx
movq %r14, %rdi
movl %r15d, %esi
movl %ecx, %edx
xorl %eax, %eax
callq 0x1040
incq %r15
cmpq $0x10, %r15
jne 0x2aea
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/driver.c
// Function: usage
static void
usage(const char *fmt, ...)
{
	va_list ap;

	if (fmt) {
		fprintf(stderr, "%s: ", argv0);
		va_start(ap, fmt);
		vfprintf(stderr, fmt, ap);
		va_end(ap);
		fputc('\n', stderr);
	}
	fprintf(stderr, "usage: %s [-c|-S|-E] [-D name[=value]] [-U name] [-s] [-g] [-o output] input...\n", argv0);
	exit(2);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x34db
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)
testq %rdi, %rdi
je 0x3542
movq %rdi, %rbx
movq 0x2b06(%rip), %r14      # 0x5ff0
movq (%r14), %rdi
leaq 0x2d44(%rip), %rax      # 0x6238
movq (%rax), %rdx
leaq 0xeb1(%rip), %rsi       # 0x43af
xorl %eax, %eax
callq 0x2150
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x21f0
movq (%r14), %rsi
movl $0xa, %edi
callq 0x2120
movq 0x2aa7(%rip), %rax      # 0x5ff0
movq (%rax), %rdi
leaq 0x2ce5(%rip), %rax      # 0x6238
movq (%rax), %rdx
leaq 0xe57(%rip), %rsi       # 0x43b4
xorl %eax, %eax
callq 0x2150
movl $0x2, %edi
callq 0x2200
// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/driver.c
// Function: nextarg
static char *
nextarg(char ***argv)
{
	if ((**argv)[2] != '\0')
		return &(**argv)[2];
	++*argv;
	if (!**argv)
		usage(NULL);
	return **argv;
}

// Assembly:
movq (%rdi), %rcx
movq (%rcx), %rax
cmpb $0x0, 0x2(%rax)
je 0x357f
addq $0x2, %rax
retq
leaq 0x8(%rcx), %rax
movq %rax, (%rdi)
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x3590
retq
pushq %rax
callq 0x22b6
// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/driver.c
// Function: changeext
static char *
changeext(const char *name, const char *ext)
{
	const char *slash, *dot;
	char *result;
	size_t baselen;

	slash = strrchr(name, '/');
	if (slash)
		name = slash + 1;
	dot = strrchr(name, '.');
	baselen = dot ? (size_t)(--dot - name + 1) : strlen(name);
	result = xmalloc(baselen + strlen(ext) + 2);
	memcpy(result, name, baselen);
	result[baselen] = '.';
	strcpy(result + baselen + 1, ext);

	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movl $0x2f, %esi
callq 0x20e0
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %r15, %r14
movq %r14, %rdi
movl $0x2e, %esi
callq 0x20e0
testq %rax, %rax
je 0x35d3
movq %rax, %r15
subq %r14, %r15
jmp 0x35de
movq %r14, %rdi
callq 0x20c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x20c0
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
callq 0x385e
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2160
leaq (%r12,%r15), %rdi
incq %rdi
movb $0x2e, -0x1(%rdi)
movq %rbx, %rsi
callq 0x2070
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/driver.c
// Function: succeeded
static bool
succeeded(const char *phase, pid_t pid, int status)
{
	if (WIFEXITED(status)) {
		if (WEXITSTATUS(status) == 0)
			return true;
		warn("%s: process %ju exited with status %d", phase, (uintmax_t)pid, WEXITSTATUS(status));
	} else if (WIFSIGNALED(status)) {
		warn("%s: process signaled: %s", phase, strsignal(WTERMSIG(status)));
	} else {
		warn("%s: process failed", phase);
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, %edi
andl $0x7f, %edi
je 0x3661
movl %edi, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x3686
callq 0x21b0
leaq 0xe22(%rip), %rdi       # 0x4472
xorl %ebp, %ebp
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x36ec
jmp 0x369e
movl %edx, %ecx
shrl $0x8, %ecx
andl $0xff, %ecx
je 0x369b
movslq %esi, %rdx
leaq 0xdd4(%rip), %rdi       # 0x444c
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x36ec
jmp 0x369e
leaq 0xdfe(%rip), %rdi       # 0x448b
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x36ec
jmp 0x369e
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: clear
void clear(Queue q)
{
    assert(q!=NULL);
    while(q->front!=NULL)
    {
        Node *cur=q->front;
        q->front=q->front->next;
        free(cur);
    }
    q->rear=NULL;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1226
movq %rdi, %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x121c
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
callq 0x1030
jmp 0x1206
movq $0x0, 0x8(%rbx)
popq %rbx
retq
leaq 0xdd7(%rip), %rdi       # 0x2004
leaq 0xdd8(%rip), %rsi       # 0x200c
leaq 0xded(%rip), %rcx       # 0x2028
movl $0x30, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: create
Queue create()
{
    Queue q;
    q=(Queue)malloc(sizeof(struct Node));
    if(q==NULL)
    {
        fatal("queue malloc failed");
    }
    q->front=NULL;
    q->rear=NULL;
    return q;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x10, %esi
callq 0x1080
testq %rax, %rax
je 0x125c
popq %rcx
retq
leaq 0xdd7(%rip), %rdi       # 0x203a
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: print
void print(Queue q)
{
    assert(q!=NULL);
    if(isEmpty(q))
    {
        printf("queue is empty.");
    }
    else
    {
    	Node *cur;
        for(cur=q->front; cur!=NULL; cur=cur->next)
        {
            printf("%d ",cur->value);
        }
    }
    printf("\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1311
movq (%rdi), %r14
testq %r14, %r14
je 0x12f2
cmpq $0x0, 0x8(%rdi)
je 0x12f2
leaq 0xd9a(%rip), %rbx       # 0x2074
movl (%r14), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x12da
jmp 0x1300
leaq 0xe8a(%rip), %rdi       # 0x2183
xorl %eax, %eax
callq 0x1060
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
leaq 0xcec(%rip), %rdi       # 0x2004
leaq 0xced(%rip), %rsi       # 0x200c
leaq 0xd3c(%rip), %rcx       # 0x2062
movl $0x4e, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: enqueue
void enqueue(int value, Queue q)
{
    assert(q!=NULL);
    Node *node=makeNode(value);
    if(isEmpty(q))
    {
        q->front=node;
        q->rear=node;
    }
    else
    {
        q->rear->next=node;
        q->rear=node;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1380
movq %rsi, %rbx
movl %edi, %ebp
movl $0x10, %edi
callq 0x1090
testq %rax, %rax
je 0x139f
movl %ebp, (%rax)
movq $0x0, 0x8(%rax)
cmpq $0x0, (%rbx)
je 0x136f
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x136f
addq $0x8, %rbx
movq %rax, 0x8(%rcx)
jmp 0x1376
movq %rax, (%rbx)
addq $0x8, %rbx
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xc7d(%rip), %rdi       # 0x2004
leaq 0xc7e(%rip), %rsi       # 0x200c
leaq 0xce3(%rip), %rcx       # 0x2078
movl $0x5f, %edx
callq 0x1070
leaq 0xdbd(%rip), %rdi       # 0x2163
callq 0x1050
movl $0x1, %edi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: dequeue
int dequeue(Queue q)
{
    assert(q!=NULL);
    if(isEmpty(q))
    {
        fatal("queue is empty.\n");
    }
    int value=q->front->value;
    q->front=q->front->next;
    return value;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x13eb
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x13d5
cmpq $0x0, 0x8(%rdi)
je 0x13d5
movl (%rcx), %eax
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
popq %rcx
retq
leaq 0xda7(%rip), %rdi       # 0x2183
callq 0x1050
movl $0x1, %edi
callq 0x10a0
leaq 0xc12(%rip), %rdi       # 0x2004
leaq 0xc13(%rip), %rsi       # 0x200c
leaq 0xc91(%rip), %rcx       # 0x2091
movl $0x6e, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: front
int front(Queue q)
{
    assert(q!=NULL);
    if(isEmpty(q))
    {
        fatal("queue is empty");
    }
    return q->front->value;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x143b
movq (%rdi), %rax
testq %rax, %rax
je 0x1423
cmpq $0x0, 0x8(%rdi)
je 0x1423
movl (%rax), %eax
popq %rcx
retq
leaq 0xc8b(%rip), %rdi       # 0x20b5
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x10a0
leaq 0xbc2(%rip), %rdi       # 0x2004
leaq 0xbc3(%rip), %rsi       # 0x200c
leaq 0xc54(%rip), %rcx       # 0x20a4
movl $0x79, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/mcxiaoke[P]dsaac/ch3/queue_list/queue2.c
// Function: main
int main(int argc, char **argv)
{
    printf("===========================A\n");
    Queue q=create();
    int i;
    for(i=0; i<10; i++)
    {
        enqueue(i, q);
        print(q);
    }
    printf("===========================B\n");
    i=0;
    for(int i=0; i<8; i++)
    {
        dequeue(q);
        print(q);
    }
    printf("===========================C\n");
    i=0;
    for(int i=0; i<7; i++)
    {
        enqueue(-i,q);
        print(q);
    }
    printf("===========================D\n");
    i=0;
    for(int i=0; i<6; i++)
    {
        dequeue(q);
        print(q);
    }
    printf("===========================E\n");
    clear(q);
    print(q);
    printf("hello, world!");
    exit(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0xc6e(%rip), %rdi       # 0x20d2
callq 0x1050
xorl %ebp, %ebp
callq 0x1245
movq %rax, %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1330
movq %rbx, %rdi
callq 0x12bb
incl %ebp
cmpl $0xa, %ebp
jne 0x1473
leaq 0xc5c(%rip), %rdi       # 0x20ef
callq 0x1050
movl $0x8, %ebp
movq %rbx, %rdi
callq 0x13b5
movq %rbx, %rdi
callq 0x12bb
decl %ebp
jne 0x149d
leaq 0xc54(%rip), %rdi       # 0x210c
callq 0x1050
xorl %ebp, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1330
movq %rbx, %rdi
callq 0x12bb
decl %ebp
cmpl $-0x7, %ebp
jne 0x14bf
leaq 0xc4a(%rip), %rdi       # 0x2129
callq 0x1050
movl $0x6, %ebp
movq %rbx, %rdi
callq 0x13b5
movq %rbx, %rdi
callq 0x12bb
decl %ebp
jne 0x14e9
leaq 0xc42(%rip), %rdi       # 0x2146
callq 0x1050
movq %rbx, %rdi
callq 0x11fd
movq %rbx, %rdi
callq 0x12bb
leaq 0xba4(%rip), %rdi       # 0x20c4
xorl %eax, %eax
callq 0x1060
xorl %edi, %edi
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/simh[P]simtools/converters/gt7cvt/gt7cvt.c
// Function: dump_rec
int dump_rec (FILE *of, int bc, char *buf)
{
unsigned char buc[4];

if (((bc == 1) && (buf[0] == 0xF)) ||
    ((bc == 2) && (buf[0] == 0xF) && (buf[1] == 0xF))) {
	fwrite (fzero, sizeof (char), 4, of);
	return 1;  }
buc[0] = bc & 0xFF;
buc[1] = (bc >> 8) & 0xFF;
buc[2] = (bc >> 16) & 0xFF;
buc[3] = (bc >> 24) & 0xFF;
fwrite (buc, sizeof (char), 4, of);
fwrite (buf, sizeof (char), (bc + 1) & ~1, of);
fwrite (buc, sizeof (char), 4, of);
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x2, %esi
je 0x11ed
cmpl $0x1, %ebp
jne 0x121a
cmpb $0xf, (%r14)
je 0x11fa
jmp 0x121a
cmpb $0xf, (%r14)
jne 0x121a
cmpb $0xf, 0x1(%r14)
jne 0x121a
leaq 0x2e78(%rip), %rdi      # 0x4079
movl $0x1, %esi
movl $0x4, %edx
movq %rbx, %rcx
callq 0x10c0
movl $0x1, %eax
jmp 0x1266
leaq 0x4(%rsp), %r15
movl %ebp, (%r15)
movl $0x1, %esi
movl $0x4, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x10c0
incl %ebp
andl $-0x2, %ebp
movslq %ebp, %rdx
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rcx
callq 0x10c0
movl $0x1, %esi
movl $0x4, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x10c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sushant8421[P]create_your_own_shell/my_shell.c
// Function: get_input
char **get_input(char *input) {

	if (strlen(input) != 0) 
		add_history(input);

    char **command = malloc(8 * sizeof(char *));
    if (command == NULL) {
        printf("malloc failed\n");
        exit(1);
    }

    char *separator = " ";
    char *parsed;
    int index = 0;

    parsed = strtok(input, separator);
    while (parsed != NULL) {
        command[index] = parsed;
        index++;

        parsed = strtok(NULL, separator);
    }

    command[index] = NULL;
    return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x1236
movq %r14, %rdi
callq 0x1050
movl $0x40, %edi
callq 0x10b0
testq %rax, %rax
je 0x1299
movq %rax, %rbx
leaq 0xe45(%rip), %rsi       # 0x2094
movq %r14, %rdi
callq 0x10e0
testq %rax, %rax
je 0x1281
xorl %r15d, %r15d
leaq 0xe2e(%rip), %r14       # 0x2094
movq %rax, (%rbx,%r15,8)
incq %r15
xorl %edi, %edi
movq %r14, %rsi
callq 0x10e0
testq %rax, %rax
jne 0x1266
movl %r15d, %eax
jmp 0x1283
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xed3(%rip), %rdi       # 0x2173
callq 0x1040
movl $0x1, %edi
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: help_information
static char help_information(void)
{
    static const char name[] = "C";
    static const char subject[] = "Proxy Server";
    static const struct {
        const char *email;
    } author = {
        "AIXIAO@AIXIAO.ME",
    };

    static const char usage[] = "Usage: [-?h] [-s signal] [-c filename]";
    static const char *s_help[] = {
        "",
        "Options:",
        "    -s --signal            : send signal to a master process: stop, quit, restart, reload, status",
        "    -c --config            : set configuration file, default: CProxy.conf",
        "    -? -h --? --help       : help information",
        "",
        0
    };

    fprintf(stderr, "%s %s\n", name, subject);
    fprintf(stderr, "Author: %s\n", author.email);
    fprintf(stderr, "%s\n", usage);

    int l;
    for (l = 0; s_help[l]; l++) {
        fprintf(stderr, "%s\n", s_help[l]);
    }

    BUILD("Compile、link.\n");

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x9a61(%rip), %r14      # 0xbff0
movq (%r14), %rdi
leaq 0x6cf9(%rip), %rsi      # 0x9292
leaq 0x6ab8(%rip), %rdx      # 0x9058
leaq 0x6ab3(%rip), %rcx      # 0x905a
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rdi
leaq 0x6ce1(%rip), %rsi      # 0x9299
leaq 0x6bdf(%rip), %rdx      # 0x919e
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rdi
leaq 0x6cd1(%rip), %rbx      # 0x92a1
leaq 0x6a99(%rip), %rdx      # 0x9070
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22b0
leaq 0x9768(%rip), %r15      # 0xbd50
xorl %r12d, %r12d
movq (%r12,%r15), %rdx
movq (%r14), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22b0
addq $0x8, %r12
cmpq $0x30, %r12
jne 0x25eb
movq (%r14), %rdi
leaq 0x6c95(%rip), %rsi      # 0x92a5
leaq 0x6c95(%rip), %rdx      # 0x92ac
leaq 0x6c9a(%rip), %rcx      # 0x92b8
xorl %eax, %eax
callq 0x22b0
movq (%r14), %rcx
leaq 0x6c92(%rip), %rdi      # 0x92c1
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x24d0
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: create_server_socket
int create_server_socket(int port)
{
    int server_sock;
    int optval = 1;
    struct sockaddr_in server_addr;
    if ((server_sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
        perror("socket");
        return -1;
    }
    if (setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) {
        perror("setsockopt");
        return -1;
    }
    memset(&server_addr, 0, sizeof(server_addr));
    server_addr.sin_family = AF_INET;
    server_addr.sin_port = htons(port);
    server_addr.sin_addr.s_addr = INADDR_ANY;
    if (bind(server_sock, (struct sockaddr *)&server_addr, sizeof(server_addr)) != 0) {
        perror("bind");
        return -1;
    }
    if (listen(server_sock, 500) < 0) {
        perror("listen");
        return -1;
    }
    return server_sock;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
movl $0x1, 0x4(%rsp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2550
testl %eax, %eax
js 0x286d
movl %eax, %ebx
leaq 0x4(%rsp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x20b0
testl %eax, %eax
js 0x2876
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movw $0x2, (%rsi)
rolw $0x8, %bp
movw %bp, 0x2(%rsi)
movl $0x0, 0x4(%rsi)
movl %ebx, %edi
movl $0x10, %edx
callq 0x2410
testl %eax, %eax
jne 0x287f
movl %ebx, %edi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x2360
testl %eax, %eax
jns 0x2890
leaq 0x6ca5(%rip), %rdi      # 0x9510
jmp 0x2886
leaq 0x6864(%rip), %rdi      # 0x90d8
jmp 0x2886
leaq 0x681a(%rip), %rdi      # 0x9097
jmp 0x2886
leaq 0x685d(%rip), %rdi      # 0x90e3
callq 0x2460
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: create_server_socket6
int create_server_socket6(int port)
{
    int server_sock;
    int optval = SO_REUSEADDR;
    struct sockaddr_in6 server_addr;
    if ((server_sock = socket(AF_INET6, SOCK_STREAM, 0)) < 0) {
        perror("socket");
        return -1;
    }

    if (setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) {
        perror("setsockopt");
        return -1;
    }

    if (setsockopt(server_sock, IPPROTO_IPV6, IPV6_V6ONLY, &optval, sizeof(optval)) < 0) {
        perror("setsockopt");
        return -1;
    }

    memset(&server_addr, 0, sizeof(server_addr));
    server_addr.sin6_family = AF_INET6;
    server_addr.sin6_port = htons(port);
    server_addr.sin6_addr = in6addr_any;

    if (bind(server_sock, (struct sockaddr *)&server_addr, sizeof(struct sockaddr_in6)) != 0) {
        perror("bind");
        return -1;
    }

    if (listen(server_sock, 500) < 0) {
        perror("listen");
        return -1;
    }

    return server_sock;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebp
movl $0x2, 0x8(%rsp)
movl $0xa, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2550
testl %eax, %eax
js 0x2965
movl %eax, %ebx
leaq 0x8(%rsp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x20b0
testl %eax, %eax
js 0x295c
leaq 0x8(%rsp), %rcx
movl %ebx, %edi
movl $0x29, %esi
movl $0x1a, %edx
movl $0x4, %r8d
callq 0x20b0
testl %eax, %eax
js 0x295c
xorps %xmm0, %xmm0
leaq 0xc(%rsp), %rsi
movups %xmm0, 0x4(%rsi)
movq $0x0, 0x14(%rsi)
movw $0xa, (%rsi)
rolw $0x8, %bp
movw %bp, 0x2(%rsi)
movq 0x969c(%rip), %rax      # 0xbfc8
movups (%rax), %xmm0
movups %xmm0, 0x8(%rsi)
movl %ebx, %edi
movl $0x1c, %edx
callq 0x2410
testl %eax, %eax
jne 0x296e
movl %ebx, %edi
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x2360
testl %eax, %eax
jns 0x297f
leaq 0x6bb6(%rip), %rdi      # 0x9510
jmp 0x2975
leaq 0x6734(%rip), %rdi      # 0x9097
jmp 0x2975
leaq 0x676c(%rip), %rdi      # 0x90d8
jmp 0x2975
leaq 0x676e(%rip), %rdi      # 0x90e3
callq 0x2460
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: accept_client
void accept_client()
{
    struct epoll_event epollEvent;
    struct sockaddr_in addr;
    conn_t *client;
    socklen_t addr_len = sizeof(addr);

    // 偶数为客户端,奇数为服务端
    for (client = cts; client - cts < MAX_CONNECTION; client += 2)
        if (client->fd < 0)
            break;
    if (client - cts >= MAX_CONNECTION)
        return;
    client->timer = (client + 1)->timer = 0;
    client->fd = accept(server_sock, (struct sockaddr *)&addr, &addr_len);
    if (client->fd < 0)
        return;
    fcntl(client->fd, F_SETFL, O_NONBLOCK);
    epollEvent.events = EPOLLIN | EPOLLET;
    epollEvent.data.ptr = client;
    epoll_ctl(epollfd, EPOLL_CTL_ADD, client->fd, &epollEvent);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl $0x10, (%rsp)
cmpl $0x0, 0x9a95(%rip)      # 0xc430
js 0x29cc
xorl %eax, %eax
leaq 0x9a7a(%rip), %rbx      # 0xc420
leaq 0x50(%rax), %rcx
cmpq $0x9f60, %rcx           # imm = 0x9F60
jge 0x2a30
cmpl $0x0, 0x60(%rax,%rbx)
movq %rcx, %rax
jns 0x29a6
cmpq $0x9f39, %rcx           # imm = 0x9F39
setge %al
addq %rcx, %rbx
jmp 0x29d5
leaq 0x9a4d(%rip), %rbx      # 0xc420
xorl %eax, %eax
testb %al, %al
jne 0x2a30
xorl %eax, %eax
movl %eax, 0x48(%rbx)
movl %eax, 0x20(%rbx)
movl 0x13999(%rip), %edi     # 0x16380
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
callq 0x2470
movl %eax, 0x10(%rbx)
testl %eax, %eax
js 0x2a30
movl %eax, %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x20d0
leaq 0x4(%rsp), %rcx
movl $0x80000001, (%rcx)     # imm = 0x80000001
movq %rbx, 0x4(%rcx)
movl 0x13961(%rip), %edi     # 0x16384
movl 0x10(%rbx), %edx
movl $0x1, %esi
callq 0x2220
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: accept_client6
void accept_client6()
{
    struct epoll_event epollEvent;
    struct sockaddr_in6 addr;
    conn_t *client;
    socklen_t addr_len = sizeof(addr);

    // 偶数为客户端,奇数为服务端
    for (client = cts; client - cts < MAX_CONNECTION; client += 2)
        if (client->fd < 0)
            break;
    if (client - cts >= MAX_CONNECTION)
        return;
    client->timer = (client + 1)->timer = 0;
    client->fd = accept(server_sock6, (struct sockaddr *)&addr, &addr_len);
    if (client->fd < 0)
        return;
    fcntl(client->fd, F_SETFL, O_NONBLOCK);
    epollEvent.events = EPOLLIN | EPOLLET;
    epollEvent.data.ptr = client;
    epoll_ctl(epollfd, EPOLL_CTL_ADD, client->fd, &epollEvent);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movl $0x1c, 0x4(%rsp)
cmpl $0x0, 0x99e6(%rip)      # 0xc430
js 0x2a7b
xorl %eax, %eax
leaq 0x99cb(%rip), %rbx      # 0xc420
leaq 0x50(%rax), %rcx
cmpq $0x9f60, %rcx           # imm = 0x9F60
jge 0x2ae1
cmpl $0x0, 0x60(%rax,%rbx)
movq %rcx, %rax
jns 0x2a55
cmpq $0x9f39, %rcx           # imm = 0x9F39
setge %al
addq %rcx, %rbx
jmp 0x2a84
leaq 0x999e(%rip), %rbx      # 0xc420
xorl %eax, %eax
testb %al, %al
jne 0x2ae1
xorl %eax, %eax
movl %eax, 0x48(%rbx)
movl %eax, 0x20(%rbx)
movl 0x138f2(%rip), %edi     # 0x16388
leaq 0x14(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x2470
movl %eax, 0x10(%rbx)
testl %eax, %eax
js 0x2ae1
movl %eax, %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x20d0
leaq 0x8(%rsp), %rcx
movl $0x80000001, (%rcx)     # imm = 0x80000001
movq %rbx, 0x4(%rcx)
movl 0x138b0(%rip), %edi     # 0x16384
movl 0x10(%rbx), %edx
movl $0x1, %esi
callq 0x2220
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: tcp_loop
void *tcp_loop(void *p)
{
    conf *configure = (conf *) p;
    int n;

    ev.events = EPOLLIN;
    ev.data.fd = server_sock;
    if (-1 == epoll_ctl(epollfd, EPOLL_CTL_ADD, server_sock, &ev)) {
        exit(1);
    }

    ev.events = EPOLLIN;
    ev.data.fd = server_sock6;
    if (-1 == epoll_ctl(epollfd, EPOLL_CTL_ADD, server_sock6, &ev)) {
        exit(1);
    }

    while (1) {
        n = epoll_wait(epollfd, events, MAX_CONNECTION, -1);
        while (n-- > 0) {
            if (events[n].data.fd == server_sock6) {
                accept_client6();
            } else if (events[n].data.fd == server_sock) {
                accept_client();
            } else {
                if (events[n].events & EPOLLIN) {
                    tcp_in((conn_t *) events[n].data.ptr, configure);
                }
                if (events[n].events & EPOLLOUT) {
                    tcp_out((conn_t *) events[n].data.ptr);
                }
            }
        }
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x13890(%rip)     # 0x1638c
leaq 0x13889(%rip), %rcx     # 0x1638c
movl 0x13877(%rip), %edx     # 0x16380
movl %edx, 0x13881(%rip)     # 0x16390
movl 0x1386f(%rip), %edi     # 0x16384
movl $0x1, %esi
callq 0x2220
cmpl $-0x1, %eax
je 0x2bee
movl $0x1, 0x1385a(%rip)     # 0x1638c
leaq 0x13853(%rip), %rcx     # 0x1638c
movl 0x13849(%rip), %edx     # 0x16388
movl %edx, 0x1384b(%rip)     # 0x16390
movl 0x13839(%rip), %edi     # 0x16384
movl $0x1, %esi
callq 0x2220
cmpl $-0x1, %eax
je 0x2bee
leaq 0x1383b(%rip), %r14     # 0x163a0
movl 0x13819(%rip), %edi     # 0x16384
movq %r14, %rsi
movl $0x3fc, %edx            # imm = 0x3FC
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x23f0
testl %eax, %eax
jle 0x2b65
movl %eax, %r15d
leaq (%r15,%r15,2), %rax
incq %r15
leaq (%r14,%rax,4), %r12
addq $-0x8, %r12
movl (%r12), %eax
cmpl 0x137eb(%rip), %eax     # 0x16388
jne 0x2ba6
callq 0x2a36
jmp 0x2bdc
cmpl 0x137d4(%rip), %eax     # 0x16380
jne 0x2bb5
callq 0x2988
jmp 0x2bdc
movl -0x4(%r12), %eax
testb $0x1, %al
je 0x2bcf
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x3a05
movl -0x4(%r12), %eax
testb $0x4, %al
je 0x2bdc
movq (%r12), %rdi
callq 0x3f22
decq %r15
addq $-0xc, %r12
cmpq $0x1, %r15
ja 0x2b93
jmp 0x2b65
movl $0x1, %edi
callq 0x24b0
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: get_executable_path
int get_executable_path(char *processdir, char *processname, int len)
{
    char *filename;
    if (readlink("/proc/self/exe", processdir, len) <= 0)
        return -1;
    filename = strrchr(processdir, '/');
    if (filename == NULL)
        return -1;
    ++filename;
    strcpy(processname, filename);
    *filename = '\0';
    return (int)(filename - processdir);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movslq %edx, %rdx
leaq 0x6304(%rip), %rdi      # 0x90be
movq %rbx, %rsi
callq 0x20c0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rax, %rax
jle 0x2dfc
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x2190
testq %rax, %rax
je 0x2dfc
movq %rax, %r12
movq %rax, %r14
incq %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2080
movb $0x0, 0x1(%r12)
subl %ebx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: server_ini
void server_ini()
{
    signal(SIGPIPE, SIG_IGN);   // 忽略PIPE信号

    if (daemon(1, 1)) {
        perror("daemon");
        return;
    }

    while (process-- > 1 && fork() == 0);
}

// Assembly:
pushq %rax
movl $0x1, %esi
movl $0xd, %edi
callq 0x22a0
movl $0x1, %edi
movl $0x1, %esi
callq 0x23a0
testl %eax, %eax
jne 0x2e4d
movl 0x16548(%rip), %eax     # 0x1937c
leal -0x1(%rax), %ecx
movl %ecx, 0x1653f(%rip)     # 0x1937c
cmpl $0x2, %eax
jl 0x2e4b
callq 0x2530
testl %eax, %eax
je 0x2e2e
popq %rax
retq
leaq 0x6279(%rip), %rdi      # 0x90cd
popq %rax
jmp 0x2460
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: udp_listen
int udp_listen(char *ip, int port)
{
    struct sockaddr_in addr;
    int fd, opt = 1;

    if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
        perror("udp socket");
        exit(1);
    }
    setsockopt(fd, SOL_IP, IP_TRANSPARENT, &opt, sizeof(opt));
    setsockopt(fd, SOL_IP, IP_RECVORIGDSTADDR, &opt, sizeof(opt));
    memset(&addr, 0, sizeof(addr));
    addr.sin_addr.s_addr = inet_addr(ip);
    addr.sin_port = htons(port);
    addr.sin_family = AF_INET;
    if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
        perror("udp bind");
        exit(1);
    }

    return fd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, 0x4(%rsp)
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x2550
testl %eax, %eax
js 0x2f03
movl %eax, %ebx
leaq 0x4(%rsp), %r15
movl %eax, %edi
xorl %esi, %esi
movl $0x13, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20b0
movl %ebx, %edi
xorl %esi, %esi
movl $0x14, %edx
movq %r15, %rcx
movl $0x4, %r8d
callq 0x20b0
leaq 0x8(%rsp), %r15
movq $0x0, 0x8(%r15)
movq %r14, %rdi
callq 0x2280
movl %eax, 0x4(%r15)
rolw $0x8, %bp
movw %bp, 0x2(%r15)
movw $0x2, (%r15)
movl %ebx, %edi
movq %r15, %rsi
movl $0x10, %edx
callq 0x2410
testl %eax, %eax
jne 0x2f08
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x265a
callq 0x2645
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: timeout_check
void *timeout_check(void *nullPtr)
{
    while (1) {
        sleep(60);
        if (server_sock >= 0 || server_sock6 >= 0)
            tcp_timeout_check(NULL);
        if (global.dns_listen_fd >= 0)
            dns_timeout_check();
        if (global.udp_listen_fd >= 0)
            udp_timeout_check();
    }

    return NULL;
}

// Assembly:
pushq %rax
movl $0x3c, %edi
callq 0x2500
cmpl $0x0, 0x13461(%rip)     # 0x16380
jns 0x2f2a
cmpl $0x0, 0x13460(%rip)     # 0x16388
js 0x2f31
xorl %edi, %edi
callq 0x37ab
cmpl $0x0, 0x1644c(%rip)     # 0x19384
js 0x2f41
xorl %eax, %eax
callq 0x5a2d
cmpl $0x0, 0x16440(%rip)     # 0x19388
js 0x2f0e
xorl %eax, %eax
callq 0x6a28
jmp 0x2f0e
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/main.c
// Function: thread_loop
void thread_loop(conf * configure)
{
    pthread_t thread_id = 0;
    /*
    sigset_t signal_mask;
    sigemptyset(&signal_mask);
    sigaddset(&signal_mask, SIGPIPE); // 忽略PIPE信号
    if (pthread_sigmask(SIG_BLOCK, &signal_mask, NULL) != 0) {
        printf("block sigpipe error\n");
    }
    */
    
    if (global.timeout_m)
        pthread_create(&thread_id, NULL, &timeout_check, NULL);
    
    if (server_sock >= 0)
    {
        if (global.dns_listen_fd >= 0) {
            dns_init();
            pthread_create(&thread_id, NULL, &dns_loop, NULL);
        }
        if (global.udp_listen_fd >= 0) {
            udp_init();
            //udp_loop(NULL);
            pthread_create(&thread_id, NULL, &udp_loop, NULL);
        }
        
        if (pthread_create(&thread_id, NULL, &tcp_loop, (void *)configure) != 0)
            perror("pthread_create");
    }
    
    if (global.dns_listen_fd >= 0)
    {
        dns_init();
        if (global.udp_listen_fd >= 0)
        {
            udp_init();
            pthread_create(&thread_id, NULL, &udp_loop, NULL);
        }
        dns_loop(NULL);
    }

    udp_init();
    udp_loop(NULL);

    //pthread_join(thread_id, NULL);
    //pthread_exit(NULL);

    /*  线程分离
       pthread_attr_t attr;
       pthread_attr_init(&attr);
       pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
       pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
       pthread_create(&thread_id, &attr, &tcp_timeout_check, NULL);
       pthread_create(&thread_id, &attr, &tcp_loop, (void *)configure);
       pthread_exit(NULL);
     */
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x16210(%rip)     # 0x19394
je 0x319b
leaq -0x280(%rip), %rdx      # 0x2f0d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x2420
cmpl $0x0, 0x131de(%rip)     # 0x16380
js 0x3208
cmpl $0x0, 0x161d9(%rip)     # 0x19384
js 0x31c9
xorl %eax, %eax
callq 0x5aef
leaq 0x2d2d(%rip), %rdx      # 0x5ee8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x2420
cmpl $0x0, 0x161b8(%rip)     # 0x19388
js 0x31ee
xorl %eax, %eax
callq 0x6b07
leaq 0x3c6a(%rip), %rdx      # 0x6e4a
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x2420
leaq -0x70e(%rip), %rdx      # 0x2ae7
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2420
testl %eax, %eax
jne 0x3258
cmpl $0x0, 0x16175(%rip)     # 0x19384
js 0x3244
xorl %eax, %eax
callq 0x5aef
cmpl $0x0, 0x16169(%rip)     # 0x19388
js 0x323d
xorl %eax, %eax
callq 0x6b07
leaq 0x3c1b(%rip), %rdx      # 0x6e4a
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x2420
xorl %edi, %edi
callq 0x5ee8
xorl %eax, %eax
callq 0x6b07
xorl %edi, %edi
callq 0x6e4a
addq $0x10, %rsp
popq %rbx
retq
leaq 0x5eaa(%rip), %rdi      # 0x9109
callq 0x2460
jmp 0x3208
// File: /workspace/github_c_makefile_star2_O3/niuyuling[P]CProxy/http_proxy.c
// Function: tcp_timeout_check
void *tcp_timeout_check(void *nullPtr)
{
    int i;

    for (i = 0; i < MAX_CONNECTION; i += 2) {
        if (cts[i].fd > -1) {
            if (cts[i].timer >= timeout_minute) {
                printf("关闭连接\n");
                close_connection(cts + i);
            } else
                cts[i].timer++;
        }
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq $-0x2, %r15
leaq 0x8c62(%rip), %rbx      # 0xc420
leaq 0x5b81(%rip), %r14      # 0x9346
cmpl $0x0, 0x10(%rbx)
js 0x37ed
movl 0x20(%rbx), %eax
cmpl 0x15d6c(%rip), %eax     # 0x19540
jge 0x37dd
incl %eax
movl %eax, 0x20(%rbx)
jmp 0x37ed
movq %r14, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x3806
addq $0x2, %r15
addq $0x50, %rbx
cmpq $0x3fa, %r15            # imm = 0x3FA
jb 0x37c5
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq