LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha256
void sha256(const unsigned char *message, unsigned int len, unsigned char *digest)
{
    sha256_ctx ctx;

    sha256_init(&ctx);
    sha256_update(&ctx, message, len);
    sha256_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x9bd3(%rip), %xmm0     # 0x10690
movq %rsp, %r14
movups %xmm0, 0x98(%r14)
movaps 0x9bb1(%rip), %xmm0     # 0x10680
movups %xmm0, 0x88(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x6b21
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6bcb
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha256_update
void sha256_update(sha256_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA256_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA256_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA256_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha256_transf(ctx, ctx->block, 1);
    sha256_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA256_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 6],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 6;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl $0x40, %r12d
subl %eax, %r12d
cmpl %edx, %r12d
cmovael %edx, %r12d
addq %rax, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x2160
movl 0x4(%rbx), %eax
addl %r14d, %eax
cmpl $0x3f, %eax
ja 0x6b67
movl %eax, 0x4(%rbx)
jmp 0x6bbc
leaq 0x8(%rbx), %r13
subl %r12d, %r14d
movl %r14d, %ebp
shrl $0x6, %ebp
addq %r12, %r15
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x68bc
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x68bc
movl %r14d, %r12d
andl $0x3f, %r12d
andl $-0x40, %r14d
leaq (%r14,%r15), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x2160
movl %r12d, 0x4(%rbx)
movl (%rbx), %eax
addl %r14d, %eax
addl $0x40, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha256_final
void sha256_final(sha256_ctx *ctx, unsigned char *digest)
{
    unsigned int block_nb;
    unsigned int pm_len;
    unsigned int len_b;

#ifndef UNROLL_LOOPS
    int i;
#endif

    block_nb = (1 + ((SHA256_BLOCK_SIZE - 9)
                     < (ctx->len % SHA256_BLOCK_SIZE)));

    len_b = (ctx->tot_len + ctx->len) << 3;
    pm_len = block_nb << 6;

    memset(ctx->block + ctx->len, 0, pm_len - ctx->len);
    ctx->block[ctx->len] = 0x80;
    UNPACK32(len_b, ctx->block + pm_len - 4);

    sha256_transf(ctx, ctx->block, block_nb);

#ifndef UNROLL_LOOPS
    for (i = 0 ; i < 8; i++) {
        UNPACK32(ctx->h[i], &digest[i << 2]);
    }
#else
   UNPACK32(ctx->h[0], &digest[ 0]);
   UNPACK32(ctx->h[1], &digest[ 4]);
   UNPACK32(ctx->h[2], &digest[ 8]);
   UNPACK32(ctx->h[3], &digest[12]);
   UNPACK32(ctx->h[4], &digest[16]);
   UNPACK32(ctx->h[5], &digest[20]);
   UNPACK32(ctx->h[6], &digest[24]);
   UNPACK32(ctx->h[7], &digest[28]);
#endif /* !UNROLL_LOOPS */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
movl %eax, %ecx
notl %ecx
andl $0x38, %ecx
xorl %r12d, %r12d
cmpl $0x1, %ecx
movl $0x0, %ebp
adcl $0x1, %ebp
movl (%rdi), %r13d
addl %eax, %r13d
leal (,%r13,8), %ecx
movl %ecx, 0xc(%rsp)
movl %ebp, %r15d
shll $0x6, %r15d
leaq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rsp)
addq %rax, %rdi
addq $0x8, %rdi
movl %r15d, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x2100
movl 0x4(%r14), %eax
movb $-0x80, 0x8(%r14,%rax)
movl 0xc(%rsp), %eax
movb %al, 0x7(%r14,%r15)
movl %r13d, %eax
shrl $0x5, %eax
movb %al, 0x6(%r14,%r15)
movl %r13d, %eax
shrl $0xd, %eax
movb %al, 0x5(%r14,%r15)
shrl $0x15, %r13d
movb %r13b, 0x4(%r14,%r15)
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %edx
callq 0x68bc
movb 0x88(%r14,%r12,4), %al
movb %al, 0x3(%rbx,%r12,4)
movb 0x89(%r14,%r12,4), %al
movb %al, 0x2(%rbx,%r12,4)
movb 0x8a(%r14,%r12,4), %al
movb %al, 0x1(%rbx,%r12,4)
movb 0x8b(%r14,%r12,4), %al
movb %al, (%rbx,%r12,4)
incq %r12
cmpq $0x8, %r12
jne 0x6c6d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha512
void sha512(const unsigned char *message, unsigned int len,
            unsigned char *digest)
{
    sha512_ctx ctx;

    sha512_init(&ctx);
    sha512_update(&ctx, message, len);
    sha512_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x9829(%rip), %xmm0     # 0x10710
movq %rsp, %r14
movups %xmm0, 0x138(%r14)
movaps 0x9807(%rip), %xmm0     # 0x10700
movups %xmm0, 0x128(%r14)
movaps 0x97e8(%rip), %xmm0     # 0x106f0
movups %xmm0, 0x118(%r14)
movaps 0x97c9(%rip), %xmm0     # 0x106e0
movups %xmm0, 0x108(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x6f6b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7017
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha512_update
void sha512_update(sha512_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA512_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA512_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA512_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha512_transf(ctx, ctx->block, 1);
    sha512_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA512_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 7],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 7;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl $0x80, %r12d
subl %eax, %r12d
cmpl %edx, %r12d
cmovael %edx, %r12d
addq %rax, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x2160
movl 0x4(%rbx), %eax
addl %r14d, %eax
cmpl $0x7f, %eax
ja 0x6fb1
movl %eax, 0x4(%rbx)
jmp 0x7008
leaq 0x8(%rbx), %r13
subl %r12d, %r14d
movl %r14d, %ebp
shrl $0x7, %ebp
addq %r12, %r15
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x6cb8
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6cb8
movl %r14d, %r12d
andl $0x7f, %r12d
andl $-0x80, %r14d
leaq (%r14,%r15), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x2160
movl %r12d, 0x4(%rbx)
movl (%rbx), %eax
addl %r14d, %eax
addl $0x80, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha512_final
void sha512_final(sha512_ctx *ctx, unsigned char *digest)
{
    unsigned int block_nb;
    unsigned int pm_len;
    unsigned int len_b;

#ifndef UNROLL_LOOPS
    int i;
#endif

    block_nb = 1 + ((SHA512_BLOCK_SIZE - 17)
                     < (ctx->len % SHA512_BLOCK_SIZE));

    len_b = (ctx->tot_len + ctx->len) << 3;
    pm_len = block_nb << 7;

    memset(ctx->block + ctx->len, 0, pm_len - ctx->len);
    ctx->block[ctx->len] = 0x80;
    UNPACK32(len_b, ctx->block + pm_len - 4);

    sha512_transf(ctx, ctx->block, block_nb);

#ifndef UNROLL_LOOPS
    for (i = 0 ; i < 8; i++) {
        UNPACK64(ctx->h[i], &digest[i << 3]);
    }
#else
    UNPACK64(ctx->h[0], &digest[ 0]);
    UNPACK64(ctx->h[1], &digest[ 8]);
    UNPACK64(ctx->h[2], &digest[16]);
    UNPACK64(ctx->h[3], &digest[24]);
    UNPACK64(ctx->h[4], &digest[32]);
    UNPACK64(ctx->h[5], &digest[40]);
    UNPACK64(ctx->h[6], &digest[48]);
    UNPACK64(ctx->h[7], &digest[56]);
#endif /* !UNROLL_LOOPS */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
movl %eax, %ecx
notl %ecx
andl $0x70, %ecx
xorl %r12d, %r12d
cmpl $0x1, %ecx
movl $0x0, %ebp
adcl $0x1, %ebp
movl (%rdi), %r13d
addl %eax, %r13d
leal (,%r13,8), %ecx
movl %ecx, 0xc(%rsp)
movl %ebp, %r15d
shll $0x7, %r15d
leaq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rsp)
addq %rax, %rdi
addq $0x8, %rdi
movl %r15d, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x2100
movl 0x4(%r14), %eax
movb $-0x80, 0x8(%r14,%rax)
movl 0xc(%rsp), %eax
movb %al, 0x7(%r14,%r15)
movl %r13d, %eax
shrl $0x5, %eax
movb %al, 0x6(%r14,%r15)
movl %r13d, %eax
shrl $0xd, %eax
movb %al, 0x5(%r14,%r15)
shrl $0x15, %r13d
movb %r13b, 0x4(%r14,%r15)
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %ebp, %edx
callq 0x6cb8
movb 0x108(%r14,%r12,8), %al
movb %al, 0x7(%rbx,%r12,8)
movb 0x109(%r14,%r12,8), %al
movb %al, 0x6(%rbx,%r12,8)
movb 0x10a(%r14,%r12,8), %al
movb %al, 0x5(%rbx,%r12,8)
movb 0x10b(%r14,%r12,8), %al
movb %al, 0x4(%rbx,%r12,8)
movb 0x10c(%r14,%r12,8), %al
movb %al, 0x3(%rbx,%r12,8)
movb 0x10d(%r14,%r12,8), %al
movb %al, 0x2(%rbx,%r12,8)
movb 0x10e(%r14,%r12,8), %al
movb %al, 0x1(%rbx,%r12,8)
movb 0x10f(%r14,%r12,8), %al
movb %al, (%rbx,%r12,8)
incq %r12
cmpq $0x8, %r12
jne 0x70b9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha384
void sha384(const unsigned char *message, unsigned int len,
            unsigned char *digest)
{
    sha384_ctx ctx;

    sha384_init(&ctx);
    sha384_update(&ctx, message, len);
    sha384_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x957f(%rip), %xmm0     # 0x106d0
movq %rsp, %r14
movups %xmm0, 0x138(%r14)
movaps 0x955d(%rip), %xmm0     # 0x106c0
movups %xmm0, 0x128(%r14)
movaps 0x953e(%rip), %xmm0     # 0x106b0
movups %xmm0, 0x118(%r14)
movaps 0x951f(%rip), %xmm0     # 0x106a0
movups %xmm0, 0x108(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x71d5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7281
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha384_update
void sha384_update(sha384_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA384_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA384_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA384_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha512_transf(ctx, ctx->block, 1);
    sha512_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA384_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 7],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 7;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl $0x80, %r12d
subl %eax, %r12d
cmpl %edx, %r12d
cmovael %edx, %r12d
addq %rax, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x2160
movl 0x4(%rbx), %eax
addl %r14d, %eax
cmpl $0x7f, %eax
ja 0x721b
movl %eax, 0x4(%rbx)
jmp 0x7272
leaq 0x8(%rbx), %r13
subl %r12d, %r14d
movl %r14d, %ebp
shrl $0x7, %ebp
addq %r12, %r15
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x6cb8
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6cb8
movl %r14d, %r12d
andl $0x7f, %r12d
andl $-0x80, %r14d
leaq (%r14,%r15), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x2160
movl %r12d, 0x4(%rbx)
movl (%rbx), %eax
addl %r14d, %eax
addl $0x80, %eax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/sha2.c
// Function: sha224
void sha224(const unsigned char *message, unsigned int len,
            unsigned char *digest)
{
    sha224_ctx ctx;

    sha224_init(&ctx);
    sha224_update(&ctx, message, len);
    sha224_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x92b5(%rip), %xmm0     # 0x10670
movq %rsp, %r14
movups %xmm0, 0x98(%r14)
movaps 0x9293(%rip), %xmm0     # 0x10660
movups %xmm0, 0x88(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x741f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x74c9
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MartinDrab[P]netpipe/utils.c
// Function: UtilsSetTimeouts
int UtilsSetTimeouts(SOCKET Socket, uint32_t Miliseconds)
{
	int ret = 0;
#ifdef _WIN32
	uint32_t timeout;
#else
	struct timeval timeout;
#endif

	memset(&timeout, 0, sizeof(timeout));
#ifdef _WIN32
	timeout = Miliseconds;
#else
	timeout.tv_sec = Miliseconds / 1000;
	timeout.tv_usec = (Miliseconds * 1000) % 1000000;
#endif
	ret = setsockopt(Socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
	if (ret != 0) {
		ret = errno;
		goto Exit;
	}

	ret = setsockopt(Socket, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout));
	if (ret != 0) {
		ret = errno;
		goto Exit;
	}

Exit:
	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movl %esi, %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
movq %rax, (%rcx)
imull $0x3e8, %esi, %eax      # imm = 0x3E8
imulq $0x431bde83, %rax, %rdx # imm = 0x431BDE83
shrq $0x32, %rdx
imull $0xf4240, %edx, %edx    # imm = 0xF4240
subl %edx, %eax
movq %rax, 0x8(%rcx)
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2080
testl %eax, %eax
jne 0x762c
movq %rsp, %rcx
movl %ebx, %edi
movl $0x1, %esi
movl $0x15, %edx
movl $0x10, %r8d
callq 0x2080
testl %eax, %eax
je 0x7639
callq 0x2050
movl (%rax), %eax
addq $0x10, %rsp
popq %rbx
retq
xorl %eax, %eax
jmp 0x7633
// File: /workspace/github_c_makefile_star2_O1/adelciotto[P]plasma/src/rgb_plasma.c
// Function: InitSDL
int InitSDL(void) {
    SDL_Init(SDL_INIT_VIDEO);

    if (SDL_GetDesktopDisplayMode(0, &displayMode) != 0) {
        return -1;
    }

    window = SDL_CreateWindow(
        WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
        width * scale, height * scale, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
    if (window == NULL) {
        return -1;
    }
    LogInfo("window created with size %dx%d", width, height);

    if (fullscreen) {
        SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
    }

    if (!interactive) {
        SDL_ShowCursor(SDL_DISABLE);
    }

    renderer = SDL_CreateRenderer(
        window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (renderer == NULL) {
        return -1;
    }
    LogInfo("renderer created with logical size %dx%d", width, height);

    SDL_RenderSetLogicalSize(renderer, width, height);

    texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGB888,
                                SDL_TEXTUREACCESS_STREAMING, width, height);
    if (texture == NULL) {
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbx
movl $0x20, %edi
callq 0x1150
leaq 0x2ca9(%rip), %rsi      # 0x4188
xorl %edi, %edi
callq 0x1200
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x14f3
movl %ebx, %eax
popq %rbx
retq
movl 0x2c46(%rip), %r8d      # 0x4140
movl 0x2c38(%rip), %ecx      # 0x4138
imull %r8d, %ecx
imull 0x2c30(%rip), %r8d      # 0x413c
leaq 0xb85(%rip), %rdi       # 0x2098
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
movl $0x24, %r9d
callq 0x1060
movq %rax, 0x2c31(%rip)      # 0x4160
testq %rax, %rax
je 0x14ef
movl 0x2bfe(%rip), %edx      # 0x4138
movl 0x2bfc(%rip), %ecx      # 0x413c
leaq 0xb5c(%rip), %rsi       # 0x20a3
xorl %edi, %edi
xorl %eax, %eax
callq 0x1210
cmpl $0x0, 0x2c29(%rip)      # 0x4180
je 0x156a
movq 0x2c00(%rip), %rdi      # 0x4160
movl $0x1001, %esi           # imm = 0x1001
callq 0x1180
cmpl $0x0, 0x2c13(%rip)      # 0x4184
jne 0x157a
xorl %edi, %edi
callq 0x1240
movq 0x2bdf(%rip), %rdi      # 0x4160
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x6, %edx
callq 0x1040
movq %rax, 0x2bcc(%rip)      # 0x4168
testq %rax, %rax
je 0x14ef
movl 0x2b8d(%rip), %edx      # 0x4138
movl 0x2b8b(%rip), %ecx      # 0x413c
leaq 0xb0a(%rip), %rsi       # 0x20c2
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x1210
movq 0x2b9e(%rip), %rdi      # 0x4168
movl 0x2b68(%rip), %esi      # 0x4138
movl 0x2b66(%rip), %edx      # 0x413c
callq 0x10b0
movq 0x2b86(%rip), %rdi      # 0x4168
movl 0x2b50(%rip), %ecx      # 0x4138
movl 0x2b4d(%rip), %r8d      # 0x413c
movl $0x16161804, %esi       # imm = 0x16161804
movl $0x1, %edx
callq 0x1220
movq %rax, 0x2b6b(%rip)      # 0x4170
cmpq $0x1, %rax
sbbl %ebx, %ebx
jmp 0x14ef
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/main.c
// Function: run
int	run(char *file, char *payload, char *name)
{
  t_env		env;
  int		r;
  
  env.name_output = ft_strdup(name);
  if ((env.fd = open(file, O_RDWR)) < 0)
    return (1);
  if (fstat(env.fd, &env.buf) < 0)
    return (2);
  if ((env.ptr = mmap(0, env.buf.st_size, PROT_READ | PROT_WRITE,
  MAP_PRIVATE, env.fd, 0)) == MAP_FAILED)
    return (3);
  if (ft_strcmp(payload, ""))
    {
      if ((env.fd2 = open(payload, O_RDWR)) < 0)
	return (4);
      if (fstat(env.fd2, &env.buf_payload) < 0)
	return (5);
      if ((env.ptr_payload = mmap(0, env.buf_payload.st_size,
      PROT_READ | PROT_WRITE, MAP_PRIVATE, env.fd2, 0)) == MAP_FAILED)
	return (6);
    }
  r = woody(&env);
  if (munmap(env.ptr, env.buf.st_size) < 0)
    return (7);
  return (r);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x3f28
movq %rax, (%rsp)
movl $0x2, %ebp
movq %r14, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x10d0
movl %eax, 0x168(%rsp)
testl %eax, %eax
js 0x1319
leaq 0x8(%rsp), %rsi
movl %eax, %edi
callq 0x10e0
testl %eax, %eax
js 0x131e
movq 0x38(%rsp), %rsi
movl 0x168(%rsp), %r8d
movl $0x3, %ebp
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r9d, %r9d
callq 0x1060
movq %rax, 0x128(%rsp)
cmpq $-0x1, %rax
je 0x131e
leaq 0x3dda(%rip), %rsi      # 0x5059
movq %rbx, %rdi
callq 0x3f04
testl %eax, %eax
je 0x12ee
movq %rbx, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x10d0
movl %eax, 0x16c(%rsp)
testl %eax, %eax
js 0x132c
leaq 0x98(%rsp), %rsi
movl %eax, %edi
callq 0x10e0
testl %eax, %eax
js 0x1333
movq 0xc8(%rsp), %rsi
movl 0x16c(%rsp), %r8d
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r9d, %r9d
callq 0x1060
movq %rax, 0x130(%rsp)
cmpq $-0x1, %rax
je 0x133a
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x14ac
movl %eax, %r14d
movq 0x38(%rbx), %rsi
movq 0x128(%rbx), %rdi
callq 0x10c0
testl %eax, %eax
movl $0x7, %ebp
cmovnsl %r14d, %ebp
jmp 0x131e
movl $0x1, %ebp
movl %ebp, %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r14
popq %rbp
retq
movl $0x4, %ebp
jmp 0x131e
movl $0x5, %ebp
jmp 0x131e
movl $0x6, %ebp
jmp 0x131e
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/main.c
// Function: main
int	main(int ac, char **av)
{	
  if (ac < 2)
    {
      ft_printf("%s FILE [PAYLOAD] [NAME OUTPUT]", av[0]);
      return (1);
    }
  else if (ac > 3)
    return run(av[1], av[2], av[3]);
  else if (ac > 2)
    return run(av[1], av[2], "woody");
  else
    return run(av[1], "", "woody");
}

// Assembly:
cmpl $0x1, %edi
jg 0x135f
pushq %rax
movq (%rsi), %rsi
leaq 0x3cb3(%rip), %rdi      # 0x5004
xorl %eax, %eax
callq 0x1a3f
movl $0x1, %eax
popq %rcx
retq
cmpl $0x4, %edi
jl 0x1378
movq 0x8(%rsi), %rdi
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
movq %rax, %rsi
jmp 0x11ec
movq 0x8(%rsi), %rax
cmpl $0x2, %edi
jne 0x138a
leaq 0x3cd1(%rip), %rsi      # 0x5059
jmp 0x138e
movq 0x10(%rsi), %rsi
leaq 0x3c8f(%rip), %rdx      # 0x5024
movq %rax, %rdi
jmp 0x11ec
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/woody.c
// Function: find_section
Elf64_Shdr      *find_section(void *data, char *name)
{
  char		*sname;
  int		i;
  Elf64_Ehdr	*elf_hdr;
  Elf64_Shdr	*shdr;
  Elf64_Shdr	*sh_strtab;
  char		*sh_strtab_p;
  
  elf_hdr = (Elf64_Ehdr *)data;
  shdr = (Elf64_Shdr *)(data + elf_hdr->e_shoff);
  sh_strtab = &shdr[elf_hdr->e_shstrndx];
  sh_strtab_p = data + sh_strtab->sh_offset;
  ft_printf ("+ %d section in file. Looking for section '%s'\n", elf_hdr->e_shnum, name);
  for (i = 0; i < elf_hdr->e_shnum; i++)
    {
      sname = (char*) (sh_strtab_p + shdr[i].sh_name);
      if (!strcmp (sname, name))
	  return &shdr[i];
    }

  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %rbx
addq %rdi, %rbx
movzwl 0x3e(%rdi), %eax
shll $0x6, %eax
movq 0x18(%rax,%rbx), %r12
addq %rdi, %r12
movzwl 0x3c(%rdi), %esi
leaq 0x3c36(%rip), %rdi      # 0x502a
movq %r14, %rdx
xorl %eax, %eax
callq 0x1a3f
movzwl 0x3c(%r15), %r15d
testq %r15, %r15
je 0x1422
movl (%rbx), %edi
addq %r12, %rdi
movq %r14, %rsi
callq 0x1090
testl %eax, %eax
je 0x1424
addq $0x40, %rbx
decq %r15
jne 0x1408
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/woody.c
// Function: packing64
int	packing64(t_env *env)
{
  Elf64_Phdr    *seg;
  int           i;

  i = 0;
  seg = (Elf64_Phdr*)((char*)env->ptr + (unsigned int)env->elf64->e_phoff);
  env->old_vaddr64 = env->elf64->e_entry;
  while (i < env->elf64->e_phnum)
    {
      if (seg->p_type == PT_LOAD && seg->p_flags & PF_W)
	break;
      seg = (Elf64_Phdr*)((char*)seg + (unsigned int) env->elf64->e_phentsize);
      i++;
    }
  env->sec64 = find_section(env->ptr_payload, ".text");
  //  xor_block (env->ptr + env->sec64->sh_offset, env->sec64->sh_size);
  if ((i = inject(env)) != 0)
    return (i);
  ft_printf("++ FILE CREATED: %s\n++ KEY: %s\n", key, env->name_output);
  return (0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x130(%rdi), %rdi
movq 0x138(%rbx), %rax
movq 0x18(%rax), %rax
movq %rax, 0x148(%rbx)
leaq 0x3bfd(%rip), %rsi      # 0x506c
callq 0x13c5
movq %rax, 0x140(%rbx)
movq %rbx, %rdi
callq 0x171d
movl %eax, %ebp
testl %eax, %eax
jne 0x14a3
movq (%rbx), %rdx
leaq 0x3bdf(%rip), %rdi      # 0x5072
leaq 0x6bee(%rip), %rsi      # 0x8088
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1a3f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/woody.c
// Function: woody
int     woody(t_env *env)
{
  env->elf64 = (Elf64_Ehdr*)env->ptr;
  if (env->elf64->e_ident[0] == ELFMAG0 &&
      env->elf64->e_ident[1] == ELFMAG1 &&
      env->elf64->e_ident[2] == ELFMAG2 &&
      env->elf64->e_ident[3] == ELFMAG3 &&
      env->elf64->e_type == ET_EXEC)
    {
      if (env->elf64->e_ident[EI_CLASS] == ELFCLASS64)
	return packing64(env);
      else if (env->elf64->e_ident[EI_CLASS] == ELFCLASS32)
	return packing32(env);
    }
  else
    {
      ft_printf("%s\n", "Error: File is not ELF Executable or PIE activate");
      return (-1);
    }
  return (0);
}

// Assembly:
pushq %rbx
movq 0x128(%rdi), %rax
movq %rax, 0x138(%rdi)
cmpb $0x7f, (%rax)
jne 0x14f5
cmpb $0x45, 0x1(%rax)
jne 0x14f5
cmpb $0x4c, 0x2(%rax)
jne 0x14f5
cmpb $0x46, 0x3(%rax)
jne 0x14f5
cmpw $0x2, 0x10(%rax)
jne 0x14f5
movq %rdi, %rsi
movzbl 0x4(%rax), %eax
cmpl $0x1, %eax
je 0x1513
xorl %ebx, %ebx
cmpl $0x2, %eax
jne 0x150f
movq %rsi, %rdi
popq %rbx
jmp 0x1449
leaq 0x3b92(%rip), %rdi      # 0x508e
leaq 0x3b8f(%rip), %rsi      # 0x5092
xorl %eax, %eax
callq 0x1a3f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
leaq 0x3b40(%rip), %rdi      # 0x505a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1070
jmp 0x150f
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/inject.c
// Function: infect_section
void		infect_section(t_env *env, Elf64_Addr text_end,
			       Elf64_Addr payload_vaddr)
{
  Elf64_Shdr* shdr;
  int		payload_len;

  payload_len = env->sec64->sh_size;
  shdr = (Elf64_Shdr*) (env->ptr + env->elf64->e_shoff);
  env->elf64->e_shoff += PAGE_SZ64;
  for(int i=0; i < env->elf64->e_shnum; i++)
    {
      if(shdr[i].sh_offset > text_end)
	shdr[i].sh_offset += PAGE_SZ64;       
      else if(shdr[i].sh_addr + shdr[i].sh_size == payload_vaddr)
	shdr[i].sh_size += payload_len;
    }

}

// Assembly:
movq 0x140(%rdi), %rax
movq 0x20(%rax), %rcx
movq 0x128(%rdi), %r8
movq 0x138(%rdi), %rax
movq 0x28(%rax), %rdi
leaq 0x2000(%rdi), %r9
movq %r9, 0x28(%rax)
movzwl 0x3c(%rax), %eax
testq %rax, %rax
je 0x15a2
movslq %ecx, %rcx
addq %r8, %rdi
addq $0x20, %rdi
shll $0x6, %eax
xorl %r8d, %r8d
movq -0x8(%rdi,%r8), %r9
cmpq %rsi, %r9
jbe 0x1581
addq $0x2000, %r9            # imm = 0x2000
movq %r9, -0x8(%rdi,%r8)
jmp 0x1599
movq (%rdi,%r8), %r9
movq -0x10(%rdi,%r8), %r10
addq %r9, %r10
cmpq %rdx, %r10
jne 0x1599
addq %rcx, %r9
movq %r9, (%rdi,%r8)
addq $0x40, %r8
cmpq %r8, %rax
jne 0x1569
retq
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/inject.c
// Function: infect_segment
Elf64_Addr	infect_segment(t_env *env, Elf64_Addr *text_end)
{
  Elf64_Phdr	*phdr;
  Elf64_Addr	payload_vaddr;
  int		payload_len;

  payload_vaddr = 0;
  payload_len = env->sec64->sh_size;
  phdr = (Elf64_Phdr*) (env->ptr + env->elf64->e_phoff);
  for(int i=0; i < env->elf64->e_phnum; i++)
    {
      if(phdr[i].p_type == PT_LOAD && phdr[i].p_flags == (PF_R | PF_X))
	{
	  *text_end = phdr[i].p_offset + phdr[i].p_filesz;
	  payload_vaddr = phdr[i].p_vaddr + phdr[i].p_filesz;
	  env->elf64->e_entry = payload_vaddr;
	  phdr[i].p_filesz += payload_len;
	  phdr[i].p_memsz += payload_len;
	  for(int j=i+1; j < env->elf64->e_phnum; j++)
	    phdr[j].p_offset += PAGE_SZ64;
	  break;
	}
    }
  return (payload_vaddr);
}

// Assembly:
pushq %rbx
movq 0x138(%rdi), %r9
movzwl 0x38(%r9), %r8d
testl %r8d, %r8d
je 0x1604
movq 0x140(%rdi), %rax
movq 0x20(%rax), %r10
movq 0x128(%rdi), %rax
movq 0x20(%r9), %rdx
movl %r8d, %ecx
addq %rax, %rdx
addq $0x40, %rdx
movq %rcx, %r11
negq %r11
movl $0x1, %edi
xorl %eax, %eax
cmpl $0x1, -0x40(%rdx)
jne 0x15ee
cmpl $0x5, -0x3c(%rdx)
je 0x1608
addq $0x38, %rdx
leaq (%r11,%rdi), %rbx
incq %rbx
incq %rdi
cmpq $0x1, %rbx
jne 0x15e2
jmp 0x1648
xorl %eax, %eax
jmp 0x1648
movq -0x20(%rdx), %rax
addq -0x38(%rdx), %rax
movq %rax, (%rsi)
movq -0x20(%rdx), %rsi
movq -0x30(%rdx), %rax
addq %rsi, %rax
movq %rax, 0x18(%r9)
movslq %r10d, %r9
addq %r9, %rsi
movq %rsi, -0x20(%rdx)
addq %r9, -0x18(%rdx)
cmpl %r8d, %edi
jae 0x1648
addq $0x2000, (%rdx)         # imm = 0x2000
addq $0x38, %rdx
decq %rcx
cmpq %rcx, %rdi
jne 0x1635
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/inject.c
// Function: infect
char	*infect(t_env *env, int elf_len, char* payload, int payload_len)
{
  Elf64_Addr	entry;
  Elf64_Addr	payload_vaddr;
  Elf64_Addr	text_end;
  char		*new_file;
  int		jmp_len;

  char jmp_entry[] = "\x48\xb8\x41\x41\x41\x41\x41\x41\x41\x41" //mov rax,0x4141414141414141
    "\xff\xe0"; // jmp rax
  jmp_len = 12;
  new_file = malloc(elf_len + PAGE_SZ64);
  payload_len += jmp_len;
  entry = env->elf64->e_entry;
  payload_vaddr = infect_segment(env, &text_end);
  infect_section(env, text_end, payload_vaddr);
  memcpy(&jmp_entry[2], (char*)&entry, 8);
  memcpy(new_file, env->ptr, (size_t) text_end);
  memcpy(new_file + text_end, payload, payload_len - jmp_len);
  memcpy(new_file + text_end + payload_len - jmp_len, jmp_entry, jmp_len);
  memcpy(new_file + text_end + PAGE_SZ64, env->ptr + text_end, elf_len - text_end);

  return new_file;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, 0x8(%rsp)
movl %esi, %r14d
movq %rdi, %r12
leal 0x2000(%r14), %eax
movslq %eax, %rdi
callq 0x10b0
movq %rax, %rbx
movq 0x138(%r12), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x15a3
movq (%r13), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x1528
movq 0x128(%r12), %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10a0
leaq (%rbx,%r13), %r15
movslq %ebp, %rbp
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x10a0
movw $0xb848, (%rbp,%r15)    # imm = 0xB848
movq (%rsp), %rax
movq %rax, 0x2(%rbp,%r15)
movw $0xe0ff, 0xa(%rbp,%r15) # imm = 0xE0FF
leaq (%rbx,%r13), %rdi
addq $0x2000, %rdi           # imm = 0x2000
addq %r13, %r12
movslq %r14d, %rdx
subq %r13, %rdx
movq %r12, %rsi
callq 0x10a0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/inject.c
// Function: inject
int	inject(t_env *env)
{
  char	*new_file;
  int	fd;

  new_file = infect(env, env->buf.st_size,
  env->ptr_payload + env->sec64->sh_offset, env->sec64->sh_size);
  if ((fd = open(env->name_output, O_RDWR | O_CREAT,
  S_IRWXU | S_IRWXG | S_IRWXO)) < 0)
    return (2);
  write(fd, new_file, env->buf.st_size + PAGE_SZ64);
  return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %esi
movq 0x130(%rdi), %rdx
movq 0x140(%rdi), %rax
addq 0x18(%rax), %rdx
movl 0x20(%rax), %ecx
callq 0x164a
movq %rax, %r14
movq (%rbx), %rdi
xorl %ebp, %ebp
movl $0x42, %esi
movl $0x1ff, %edx            # imm = 0x1FF
xorl %eax, %eax
callq 0x10d0
testl %eax, %eax
js 0x1773
movl $0x2000, %edx           # imm = 0x2000
addq 0x38(%rbx), %rdx
movl %eax, %edi
movq %r14, %rsi
callq 0x1040
jmp 0x1778
movl $0x2, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_printf.c
// Function: ft_printf
int					ft_printf(const char *format, ...)
{
	t_var			var;
	va_list			ap;

	ft_init_var(&var);
	va_start(ap, format);
	if (ft_return_printf2(format, ap, &var))
		return (-1);
	if (ft_verif_wchar_nb(&var))
		return (-1);
	else if (var.type == TYPE_WCHAR && var.nb_conv && var.nb.u_i > 1114111)
	{
		var.ret = var.ret - 1 - ft_strlen(var.flags_stock) - 1;
		while (format[var.ret--] != '%')
			var.i_buf--;
		var.i_buf++;
		write(var.fd, var.buf, var.i_buf);
		ft_free(&var);
		return (-1);
	}
	va_end(ap);
	write(var.fd, var.buf, var.i_buf);
	ft_free(&var);
	return (var.i_buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdi, %r14
leaq 0xc0(%rsp), %r15
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x1ab0
movaps %xmm0, 0xf0(%rsp)
movaps %xmm1, 0x100(%rsp)
movaps %xmm2, 0x110(%rsp)
movaps %xmm3, 0x120(%rsp)
movaps %xmm4, 0x130(%rsp)
movaps %xmm5, 0x140(%rsp)
movaps %xmm6, 0x150(%rsp)
movaps %xmm7, 0x160(%rsp)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x3e58
leaq 0xa0(%rsp), %rsi
movq %r15, 0x10(%rsi)
leaq 0x1a0(%rsp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ecc
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1bbd
movq %rsp, %rdi
callq 0x3e9e
testl %eax, %eax
jne 0x1bbd
cmpl $0x3, 0x78(%rsp)
jne 0x1b9c
cmpl $0x0, 0x98(%rsp)
je 0x1b9c
cmpl $0x110000, 0x70(%rsp)   # imm = 0x110000
jb 0x1b9c
leaq 0x18(%rsp), %r15
movl 0x44(%r15), %r12d
movq %r15, %rdi
callq 0x3ef0
notl %eax
leal (%r12,%rax), %ecx
decl %ecx
movl %ecx, 0x44(%r15)
addl %r12d, %eax
addl $-0x2, %eax
movslq %ecx, %rcx
cmpb $0x25, (%r14,%rcx)
je 0x1b70
movl 0x60(%rsp), %ecx
movslq %eax, %rdx
addq %rdx, %r14
decl %ecx
decl %eax
cmpb $0x25, (%r14)
leaq -0x1(%r14), %r14
jne 0x1b5e
movl %ecx, 0x60(%rsp)
movq %rsp, %r14
movl %eax, 0x5c(%r14)
movslq 0x60(%r14), %rdx
incq %rdx
movl %edx, 0x60(%r14)
movl 0x94(%r14), %edi
movq 0x8(%r14), %rsi
callq 0x1040
movq %r14, %rdi
callq 0x3e40
jmp 0x1bbd
movq %rsp, %rbx
movl 0x94(%rbx), %edi
movq 0x8(%rbx), %rsi
movslq 0x60(%rbx), %rdx
callq 0x1040
movq %rbx, %rdi
callq 0x3e40
movl 0x60(%rbx), %ebx
movl %ebx, %eax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_flags.c
// Function: ft_flags
int					ft_flags(char *flags, t_flags *s_flags)
{
	int				i;

	i = 0;
	if (flags[0] == 0)
		return (0);
	s_flags->c = 0;
	while (flags[i] && (!(flags[i] >= '1' && flags[i] <= '9')) &&
		flags[i] != '.' && ft_verif_mod(flags[i]))
	{
		if (flags[i] == '0')
			s_flags->c = s_flags->c | (1 << 0);
		if (flags[i] == '+')
			s_flags->c = s_flags->c | (1 << 1);
		if (flags[i] == '-')
			s_flags->c = s_flags->c | (1 << 2);
		if (flags[i] == ' ')
			s_flags->c = s_flags->c | (1 << 3);
		if (flags[i] == '#')
			s_flags->c = s_flags->c | (1 << 4);
		i++;
	}
	ft_flags2(flags, s_flags, &i);
	return (1);
}

// Assembly:
cmpb $0x0, (%rdi)
je 0x2090
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, (%rsi)
movb (%rdi), %cl
xorl %ebp, %ebp
movl $0x0, %r12d
movq %rdi, %r15
testb %cl, %cl
je 0x2099
xorl %r12d, %r12d
movl $0x207, %eax            # imm = 0x207
cmpb $0x2e, %cl
je 0x2093
leal -0x31(%rcx), %edx
cmpb $0x9, %dl
jb 0x2093
leal -0x68(%rcx), %edx
rorb %dl
cmpb $0x9, %dl
ja 0x204e
movzbl %dl, %edx
btl %edx, %eax
jb 0x2093
cmpb $0x30, %cl
jne 0x2056
orb $0x1, (%rbx)
cmpb $0x2b, (%r14,%r12)
jne 0x2060
orb $0x2, (%rbx)
cmpb $0x2d, (%r14,%r12)
jne 0x206a
orb $0x4, (%rbx)
cmpb $0x20, (%r14,%r12)
jne 0x2074
orb $0x8, (%rbx)
cmpb $0x23, (%r14,%r12)
jne 0x207e
orb $0x10, (%rbx)
movb 0x1(%r14,%r12), %cl
incq %r12
testb %cl, %cl
jne 0x202f
leaq (%r14,%r12), %r15
jmp 0x2099
xorl %eax, %eax
retq
movq %r12, %r15
addq %r14, %r15
movq %r15, %rdi
callq 0x4038
testl %eax, %eax
cmovlel %ebp, %eax
movl %eax, 0x4(%rbx)
movb (%r15), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x20c4
movq %r15, %rdi
callq 0x4038
movslq %eax, %rdi
callq 0x4228
movl %eax, %ebp
addl %r12d, %ebp
movslq %ebp, %rax
leaq (%r14,%rax), %r12
xorl %r15d, %r15d
cmpb $0x2e, (%r14,%rax)
movl $0x0, %eax
jne 0x20e7
leaq 0x1(%r12), %rdi
callq 0x4038
testl %eax, %eax
cmovlel %r15d, %eax
movl %eax, 0x8(%rbx)
leaq 0x1(%r12), %rdi
callq 0x4038
movslq %eax, %rdi
callq 0x4228
cmpb $0x2e, (%r12)
cmovnel %r15d, %eax
addl %ebp, %eax
cltq
addq %rax, %r14
movb $0x0, 0xc(%rbx)
leaq 0x3071(%rip), %rsi      # 0x518e
movq %r14, %rdi
callq 0x3fb8
movb $0x1, %cl
testq %rax, %rax
jne 0x219a
leaq 0x305c(%rip), %rsi      # 0x518f
movq %r14, %rdi
callq 0x3fb8
movb $0x2, %cl
testq %rax, %rax
jne 0x219a
leaq 0x3048(%rip), %rsi      # 0x5191
movq %r14, %rdi
callq 0x3fb8
movb $0x8, %cl
testq %rax, %rax
jne 0x219a
leaq 0x3033(%rip), %rsi      # 0x5192
movq %r14, %rdi
callq 0x3fb8
movb $0x4, %cl
testq %rax, %rax
jne 0x219a
leaq 0x301f(%rip), %rsi      # 0x5194
movq %r14, %rdi
callq 0x3fb8
movb $0x10, %cl
testq %rax, %rax
jne 0x219a
leaq 0x300b(%rip), %rsi      # 0x5196
movq %r14, %rdi
callq 0x3fb8
movb $0x20, %cl
testq %rax, %rax
je 0x219d
orb %cl, 0xc(%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_print_flags_buffer.c
// Function: ft_print_flags_buffer4
static void		ft_print_flags_buffer4(t_var *var, t_flags *s_flags, int res)
{
	char		tab[6];

	if (var->res)
	{
		if (s_flags->precision < (int)ft_strlen(var->res))
			ft_flags_precision(var, s_flags, 0);
		else
			ft_flags_largeur(var, s_flags, 0);
	}
	else
	{
		var->res = ((var->type == TYPE_STRING || var->type == TYPE_WSTRING) &&
					!(s_flags->c & (1 << 0))) ? ft_strcpy(tab, "(null)") : 0;
		ft_flags_precision(var, s_flags, 0);
	}
	if (var->type == TYPE_WCHAR || (var->type == TYPE_CHAR && s_flags->m > 2 &&
									s_flags->m <= 16))
	{
		if (s_flags->largeur > res)
			ft_wchar2(var->nb.chr, var, res);
		else
			ft_wchar2(var->nb.chr, var, 0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x24ed
movl 0x8(%r14), %r15d
callq 0x3ef0
cmpl %eax, %r15d
jl 0x2516
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3361
jmp 0x2523
movl 0x78(%rbx), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
jne 0x2511
testb $0x1, (%r14)
jne 0x2511
leaq 0x2c7f(%rip), %rsi      # 0x5184
leaq 0x2(%rsp), %rdi
callq 0x3f60
jmp 0x2513
xorl %eax, %eax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x31f0
movl 0x78(%rbx), %eax
cmpl $0x3, %eax
je 0x253a
cmpl $0x2, %eax
jne 0x254e
movb 0xc(%r14), %al
addb $-0x3, %al
cmpb $0xd, %al
ja 0x254e
xorl %edx, %edx
cmpl %ebp, 0x4(%r14)
movl 0x70(%rbx), %edi
cmovgl %ebp, %edx
movq %rbx, %rsi
callq 0x2924
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_wchar.c
// Function: ft_wchar2
void		ft_wchar2(wchar_t chr, t_var *var, int i)
{
	if (chr > 0)
		var->i_buf -= i;
	if (chr <= 127)
		var->buf[var->i_buf++] = chr;
	else if (chr <= 2047)
	{
		var->buf[var->i_buf++] = (chr >> 6) + 192;
		var->buf[var->i_buf++] = (chr & 63) + 128;
	}
	else if (chr <= 65535)
	{
		var->buf[var->i_buf++] = (chr >> 12) + 224;
		var->buf[var->i_buf++] = ((chr >> 6) & 63) + 128;
		var->buf[var->i_buf++] = (chr & 63) + 128;
	}
	else if (chr <= 1114111)
	{
		var->buf[var->i_buf++] = (chr >> 18) + 240;
		var->buf[var->i_buf++] = ((chr >> 12) & 63) + 128;
		var->buf[var->i_buf++] = ((chr >> 6) & 63) + 128;
		var->buf[var->i_buf++] = (chr & 63) + 128;
	}
}

// Assembly:
testl %edi, %edi
jle 0x292b
subl %edx, 0x60(%rsi)
cmpl $0x7f, %edi
jg 0x293d
leaq 0x8(%rsi), %rax
addq $0x60, %rsi
jmp 0x29fa
cmpl $0x7ff, %edi            # imm = 0x7FF
jg 0x296e
movl %edi, %ecx
shrl $0x6, %ecx
addb $-0x40, %cl
leaq 0x8(%rsi), %rax
movq 0x8(%rsi), %rdx
movslq 0x60(%rsi), %r8
leal 0x1(%r8), %r9d
movl %r9d, 0x60(%rsi)
addq $0x60, %rsi
movb %cl, (%rdx,%r8)
jmp 0x29f2
cmpl $0xffff, %edi           # imm = 0xFFFF
jg 0x2984
movl %edi, %ecx
shrl $0xc, %ecx
addb $-0x20, %cl
leaq 0x8(%rsi), %rax
jmp 0x29b7
cmpl $0x10ffff, %edi         # imm = 0x10FFFF
jg 0x2a09
movl %edi, %ecx
shrl $0x12, %ecx
addb $-0x10, %cl
leaq 0x8(%rsi), %rax
movq 0x8(%rsi), %rdx
movslq 0x60(%rsi), %r8
leal 0x1(%r8), %r9d
movl %r9d, 0x60(%rsi)
movb %cl, (%rdx,%r8)
movl %edi, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movq 0x8(%rsi), %rdx
movslq 0x60(%rsi), %r8
leal 0x1(%r8), %r9d
movl %r9d, 0x60(%rsi)
movb %cl, (%rdx,%r8)
movq 0x8(%rsi), %rcx
movslq 0x60(%rsi), %rdx
leal 0x1(%rdx), %r8d
movl %r8d, 0x60(%rsi)
addq $0x60, %rsi
movl %edi, %r8d
shrl $0x6, %r8d
andb $0x3f, %r8b
orb $-0x80, %r8b
movb %r8b, (%rcx,%rdx)
andb $0x3f, %dil
orb $-0x80, %dil
movq (%rax), %rax
movslq (%rsi), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rsi)
movb %dil, (%rax,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_wchar.c
// Function: ft_wchar
char		*ft_wchar(wchar_t chr)
{
	char	*c;

	c = ft_strnew(4);
	if (chr <= 127)
		c[0] = chr;
	else if (chr <= 2047)
	{
		c[0] = (chr >> 6) + 192;
		c[1] = (chr & 63) + 128;
	}
	else if (chr <= 65535)
	{
		c[0] = (chr >> 12) + 224;
		c[1] = ((chr >> 6) & 63) + 128;
		c[2] = (chr & 63) + 128;
	}
	else if (chr <= 1114111)
	{
		c[0] = (chr >> 18) + 240;
		c[1] = ((chr >> 12) & 63) + 128;
		c[2] = ((chr >> 6) & 63) + 128;
		c[3] = (chr & 63) + 128;
	}
	return (c);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x4, %edi
callq 0x40a8
cmpl $0x7f, %ebx
jg 0x2a20
movb %bl, (%rax)
jmp 0x2a9f
cmpl $0x7ff, %ebx            # imm = 0x7FF
jg 0x2a3d
movl %ebx, %ecx
shrl $0x6, %ecx
addb $-0x40, %cl
movb %cl, (%rax)
andb $0x3f, %bl
orb $-0x80, %bl
movb %bl, 0x1(%rax)
jmp 0x2a9f
cmpl $0xffff, %ebx           # imm = 0xFFFF
jg 0x2a68
movl %ebx, %ecx
shrl $0xc, %ecx
addb $-0x20, %cl
movb %cl, (%rax)
movl %ebx, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
andb $0x3f, %bl
orb $-0x80, %bl
movb %bl, 0x2(%rax)
jmp 0x2a9f
cmpl $0x10ffff, %ebx         # imm = 0x10FFFF
jg 0x2a9f
movl %ebx, %ecx
shrl $0x12, %ecx
addb $-0x10, %cl
movb %cl, (%rax)
movl %ebx, %ecx
shrl $0xc, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%rax)
movl %ebx, %ecx
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%rax)
andb $0x3f, %bl
orb $-0x80, %bl
movb %bl, 0x3(%rax)
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_wstrlen.c
// Function: ft_wstrlen
int	ft_wstrlen(wchar_t chr)
{
	if (chr <= 0x7F)
		return (1);
	else if (chr <= 0x7FF)
		return (2);
	else if (chr <= 0xFFFF)
		return (3);
	else if (chr <= 0x10FFFF)
		return (4);
	return (0);
}

// Assembly:
movl $0x1, %eax
cmpl $0x80, %edi
jl 0x2ad9
movl $0x2, %eax
cmpl $0x800, %edi            # imm = 0x800
jl 0x2ad9
movl $0x3, %eax
cmpl $0x10000, %edi          # imm = 0x10000
jl 0x2ad9
xorl %eax, %eax
cmpl $0x110000, %edi         # imm = 0x110000
setl %al
shll $0x2, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_conv_envoi_maj.c
// Function: ft_conv_envoi_maj3
void	ft_conv_envoi_maj3(va_list ap, t_var *var, t_flags *s_flags, int base)
{
	if ((s_flags->m & (1 << 5)))
		ft_flags_stock(var, s_flags,
						ft_ltoa_base_maj(va_arg(ap, size_t), base));
	else
	{
		if (var->type <= TYPE_INT && s_flags->m == 0)
			ft_flags_stock(var, s_flags,
						ft_itoa_base_maj(va_arg(ap, int), base));
		else
			ft_flags_stock(var, s_flags,
					ft_lltoa_base_maj(va_arg(ap, unsigned int), base));
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movb 0xc(%rdx), %dl
testb $0x20, %dl
jne 0x2b0e
movl (%rdi), %eax
testb %dl, %dl
jne 0x2b24
cmpl $0x7, 0x78(%r14)
jg 0x2b24
cmpl $0x28, %eax
ja 0x2b66
movq %rax, %rdx
addq 0x10(%rdi), %rdx
addl $0x8, %eax
movl %eax, (%rdi)
jmp 0x2b72
movl (%rdi), %edx
cmpq $0x28, %rdx
ja 0x2b37
movq %rdx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %edx
movl %edx, (%rdi)
jmp 0x2b43
cmpl $0x28, %eax
ja 0x2b4f
movq %rax, %rdx
addq 0x10(%rdi), %rdx
addl $0x8, %eax
movl %eax, (%rdi)
jmp 0x2b5b
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rdx
movq %rdx, 0x8(%rdi)
movq (%rax), %rdi
movl %ecx, %esi
callq 0x4428
jmp 0x2b7b
movq 0x8(%rdi), %rdx
leaq 0x8(%rdx), %rax
movq %rax, 0x8(%rdi)
movl (%rdx), %edi
movl %ecx, %esi
callq 0x4548
jmp 0x2b7b
movq 0x8(%rdi), %rdx
leaq 0x8(%rdx), %rax
movq %rax, 0x8(%rdi)
movl (%rdx), %edi
movl %ecx, %esi
callq 0x42f8
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x255c
// File: /workspace/github_c_makefile_star2_O1/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_conv_envoi_maj.c
// Function: ft_conv_envoi_maj2
void	ft_conv_envoi_maj2(va_list ap, t_var *var, t_flags *s_flags, int base)
{
	if ((s_flags->m & (1 << 1)))
		ft_flags_stock(var, s_flags,
						ft_itoa_base_maj((short)va_arg(ap, int), base));
	else if ((s_flags->m & (1 << 2)) && (var->type >= TYPE_UNSIGNED &&
										var->type <= TYPE_HEXA_MAJ))
		ft_flags_stock(var, s_flags,
						ft_lltoa_base_maj(va_arg(ap, long long), base));
	else if ((s_flags->m & (1 << 2)))
		ft_flags_stock(var, s_flags,
						ft_ltoa_base_maj(va_arg(ap, long), base));
	else if ((s_flags->m & (1 << 4)))
		ft_flags_stock(var, s_flags,
						ft_ui_maxtoa_base_maj(va_arg(ap, uintmax_t), base));
	else if ((s_flags->m & (1 << 5)) && (var->type >= TYPE_UNSIGNED &&
										var->type <= TYPE_HEXA_MAJ))
		ft_flags_stock(var, s_flags,
						ft_ui_maxtoa_base_maj(va_arg(ap, ssize_t), base));
	else
		ft_conv_envoi_maj3(ap, var, s_flags, base);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movzbl 0xc(%rdx), %eax
testb $0x2, %al
jne 0x2bdf
testb $0x4, %al
jne 0x2bf5
testb $0x10, %al
jne 0x2bc2
testb $0x20, %al
je 0x2c4d
movl 0x78(%r14), %eax
addl $-0x9, %eax
cmpl $0x5, %eax
ja 0x2c4d
movl (%rdi), %edx
cmpq $0x28, %rdx
ja 0x2c5f
movq %rdx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %edx
movl %edx, (%rdi)
jmp 0x2c6b
movl (%rdi), %edx
cmpq $0x28, %rdx
ja 0x2c17
movq %rdx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %edx
movl %edx, (%rdi)
jmp 0x2c23
movl 0x78(%r14), %edx
addl $-0x9, %edx
cmpl $0x5, %edx
ja 0x2c2f
movl (%rdi), %edx
cmpq $0x28, %rdx
ja 0x2c77
movq %rdx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %edx
movl %edx, (%rdi)
jmp 0x2c83
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rdx
movq %rdx, 0x8(%rdi)
movswl (%rax), %edi
movl %ecx, %esi
callq 0x42f8
jmp 0x2ca5
testb $0x4, %al
je 0x2ba6
movl (%rdi), %edx
cmpq $0x28, %rdx
ja 0x2c8f
movq %rdx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %edx
movl %edx, (%rdi)
jmp 0x2c9b
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2adc
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rdx
movq %rdx, 0x8(%rdi)
movq (%rax), %rdi
movl %ecx, %esi
callq 0x4704
jmp 0x2ca5
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rdx
movq %rdx, 0x8(%rdi)
movq (%rax), %rdi
movl %ecx, %esi
callq 0x4548
jmp 0x2ca5
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rdx
movq %rdx, 0x8(%rdi)
movq (%rax), %rdi
movl %ecx, %esi
callq 0x4428
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x255c