LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/unlockamos.c
// Function: AMOS_decrypt_procedure
void AMOS_decrypt_procedure(uint8_t *src, size_t len) {
    uint8_t *line, *next, *endline;
    uint32_t key, key2, key3, size;

    /* do not operate on compiled procedures */
    if (len < 12 || src[10] & 0x10) return;

    size = amos_leek(&src[4]);
    if (len < (size + 8 + 6)) return;
    line = next = &src[src[0] * 2]; /* the line after PROCEDURE */
    endline = &src[size + 8 + 6]; /* the start of the line after END PROC */

    /* initialise keys */
    key = (size << 8) | src[11];
    key2 = 1;
    key3 = amos_deek(&src[8]);

    while (line < endline) {
        line = next; next = &line[line[0] * 2];
        if (!line[0]) return; /* avoid infinite loop on bad data */
        for (line += 4; line < next;) {
            *line++ ^= (key >> 8) & 0xFF;
            *line++ ^=  key       & 0xFF;
            key = (key & 0xFFFF0000) | ((key + key2) & 0xFFFF);
            key2 = (key2 + key3) & 0xFFFF;
            key = (key >> 1) | (key << 31); /* rotate right one bit */
        }
    }
    src[10] ^= 0x20; /* toggle "is encrypted" bit */
}

// Assembly:
cmpq $0xc, %rsi
jb 0x13b6
testb $0x10, 0xa(%rdi)
jne 0x13b6
movl 0x4(%rdi), %r8d
bswapl %r8d
leal 0xe(%r8), %eax
cmpq %rsi, %rax
ja 0x13b6
movzbl (%rdi), %ecx
addl %ecx, %ecx
cmpq %rax, %rcx
jae 0x13b2
addq %rdi, %rax
movzwl 0x8(%rdi), %edx
rolw $0x8, %dx
movzwl %dx, %edx
shll $0x8, %r8d
movzbl 0xb(%rdi), %esi
orl %r8d, %esi
addq %rdi, %rcx
movl $0x1, %r8d
movzbl (%rcx), %r10d
testl %r10d, %r10d
je 0x13b6
movq %rcx, %r9
leaq (%rcx,%r10,2), %rcx
addq $0x4, %r9
cmpb $0x3, %r10b
jb 0x13ad
movl %esi, %r10d
shrl $0x8, %r10d
xorb %r10b, (%r9)
xorb %sil, 0x1(%r9)
addq $0x2, %r9
movl %esi, %r10d
andl $0xffff0000, %r10d      # imm = 0xFFFF0000
addl %r8d, %esi
movzwl %si, %esi
orl %r10d, %esi
addl %edx, %r8d
rorl %esi
cmpq %rcx, %r9
jb 0x137e
cmpq %rax, %r9
jb 0x1364
xorb $0x20, 0xa(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/unlockamos.c
// Function: unlock_source
int unlock_source(uint8_t *src, size_t len) {
    int locked_procs_found = 0;
    uint32_t x;

    /* go through the lines of source code */
    len = amos_leek(&src[16]);
    for (src += 20; len > 0; src += x, len -= x) {
        x = src[0] * 2;
        if (x > len) {
            printf("line length error\n");
            return 0;
        }

        /* does this a line begin with "PROCEDURE" ? */
        if (amos_deek(&src[2]) == 0x0376) {
            /* decrypt and remove the "is encrypted" flag */
            if (src[10] & 0x20) {
                if ((size_t)(amos_leek(&src[4]) + 8 + 6) < len) {
                    AMOS_decrypt_procedure(src, len);
                    locked_procs_found++;
                }
                else {
                    printf("WARNING: locked procedure with bad length found\n");
                }
            }
            /* always remove "is locked" flag */
            if (src[10] & 0x40) {
                src[10] ^= 0x040;
                locked_procs_found++;
            }
        }
    }
    return locked_procs_found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzbl 0x10(%rdi), %eax
shll $0x18, %eax
movzbl 0x11(%rdi), %ecx
shll $0x10, %ecx
cltq
orq %rcx, %rax
movzbl 0x12(%rdi), %ecx
shll $0x8, %ecx
orq %rax, %rcx
movzbl 0x13(%rdi), %r14d
orq %rcx, %r14
testl %r14d, %r14d
je 0x1489
movq %rdi, %rbx
addq $0x14, %rbx
xorl %ebp, %ebp
leaq 0xc89(%rip), %r15       # 0x2086
movzbl (%rbx), %r12d
addl %r12d, %r12d
cmpq %r12, %r14
jb 0x147d
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cmpl $0x376, %eax            # imm = 0x376
jne 0x1473
testb $0x20, 0xa(%rbx)
je 0x1465
movzbl 0x4(%rbx), %eax
shll $0x18, %eax
movzbl 0x5(%rbx), %ecx
shll $0x10, %ecx
cltq
orq %rcx, %rax
movzbl 0x6(%rbx), %ecx
shll $0x8, %ecx
orq %rax, %rcx
movzbl 0x7(%rbx), %eax
addq %rcx, %rax
addq $0xe, %rax
cmpq %rax, %r14
jbe 0x145d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1314
incl %ebp
jmp 0x1465
movq %r15, %rdi
callq 0x1050
movb 0xa(%rbx), %al
testb $0x40, %al
je 0x1473
andb $-0x41, %al
movb %al, 0xa(%rbx)
incl %ebp
addq %r12, %rbx
subq %r12, %r14
jne 0x13fd
jmp 0x148b
leaq 0xc32(%rip), %rdi       # 0x20b6
callq 0x1050
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kyz[P]amostools/unlockamos.c
// Function: main
int main(int argc, char *argv[]) {
    char *fname;
    uint8_t *buf;
    size_t len;

    if (argc <= 1) {
        printf("Unlock \"locked\" procedures in AMOS source code.\n");
        printf("Usage: %s <file(s).amos>\n", argv[0]);
        return 1;
    }

    for (argv++; (fname = *argv); argv++) {
        if ((buf = read_file(fname, &len))) {
            if (!memcmp(buf, "AMOS Basic", 10)) {
                if (unlock_source(buf, len)) {
                    printf("%s: unlocked procedures, saving\n", fname);
                    write_file(fname, buf, len);
                }
                else {
                    printf("%s: no locked procedures\n", fname);
                }
            }
            else {
                printf("%s: not an AMOS Basic file\n", fname);
            }
            free(buf);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, %edi
jge 0x14d0
leaq 0xc18(%rip), %rdi       # 0x20c8
callq 0x1050
movq (%rbx), %rsi
leaq 0xb4b(%rip), %rdi       # 0x200a
xorl %eax, %eax
callq 0x1080
movl $0x1, %eax
jmp 0x157b
movq 0x8(%rbx), %rbp
testq %rbp, %rbp
je 0x1579
addq $0x10, %rbx
movq %rsp, %r14
movabsq $0x73614220534f4d41, %r12 # imm = 0x73614220534F4D41
leaq 0xb75(%rip), %r13       # 0x206a
movq %rbp, %rdi
movq %r14, %rsi
callq 0x11dc
testq %rax, %rax
je 0x1562
movq %rax, %r15
movq (%rax), %rax
xorq %r12, %rax
movzwl 0x8(%r15), %ecx
xorq $0x6369, %rcx           # imm = 0x6369
orq %rax, %rcx
je 0x152e
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1080
jmp 0x155a
movq %r15, %rdi
callq 0x13b7
testl %eax, %eax
je 0x1570
leaq 0xaee(%rip), %rdi       # 0x202f
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1080
movq (%rsp), %rdx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x12ae
movq %r15, %rdi
callq 0x1030
movq (%rbx), %rbp
addq $0x8, %rbx
testq %rbp, %rbp
jne 0x14f5
jmp 0x1579
leaq 0xad9(%rip), %rdi       # 0x2050
jmp 0x1522
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/converters/decsys/decsys.c
// Function: main
int main (int argc, char *argv[])
{
int i, j, k, word;
char *ppos, oname[256];
int fill[256] = { 0 };
FILE *ifile, *ofile;

if ((argc < 2) || (argv[0] == NULL)) {
	printf ("Usage is: verb file [file...]\n");
	exit (0);  }

for (i = 1; i < argc; i++) {
	strcpy (oname, argv[i]);
        if (ppos = strrchr (oname, '.')) strcpy (ppos, ".dtp");
        else strcat (oname, ".dtp");
	ifile = fopen (argv[i], "r");
	if (ifile == NULL) {
	    printf ("Error opening file: %s\n", argv[i]);
	    exit (0);  }
	ofile = fopen (oname, "wb");
	if (ofile == NULL) {
	    printf ("Error opening file: %s\n", oname);
	    exit (0);  }

	printf ("Processing file %s\n", argv[i]);
	fwrite (fill, sizeof (int), 256, ofile);
	for (j = 0;; j++) {
	    k = fscanf (ifile, "%d", &word);
	    if (k == EOF) break;
//	    printf ("%06o\n", word);
	    fwrite (&word, sizeof (int), 1, ofile);
	    }
	fclose (ifile);
	fclose (ofile);
	}

return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x120(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x10a0
cmpl $0x2, %ebp
jl 0x1370
cmpq $0x0, (%rbx)
je 0x1370
movl %ebp, %eax
movq %rax, 0x10(%rsp)
movl $0x1, %r14d
leaq 0x20(%rsp), %rbp
leaq 0xe08(%rip), %r15       # 0x203a
leaq 0x1c(%rsp), %r12
movq %rbx, 0x8(%rsp)
movq (%rbx,%r14,8), %rsi
movq %rbp, %rdi
callq 0x1030
movq %rbp, %rdi
movl $0x2e, %esi
callq 0x1090
testq %rax, %rax
je 0x1266
movb $0x0, 0x4(%rax)
movl $0x7074642e, (%rax)     # imm = 0x7074642E
jmp 0x127b
movq %rbp, %rdi
callq 0x1070
movl $0x7074642e, 0x20(%rsp,%rax) # imm = 0x7074642E
movb $0x0, 0x24(%rsp,%rax)
movq (%rbx,%r14,8), %rdi
leaq 0xd83(%rip), %rsi       # 0x2009
callq 0x10b0
testq %rax, %rax
je 0x1344
movq %rax, %r13
movq %rbp, %rbx
movq %rbp, %rdi
leaq 0xd7f(%rip), %rsi       # 0x2023
callq 0x10b0
testq %rax, %rax
je 0x1356
movq %rax, %rbp
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %rsi
leaq 0xd61(%rip), %rdi       # 0x2026
xorl %eax, %eax
callq 0x1080
movl $0x4, %esi
movl $0x100, %edx            # imm = 0x100
leaq 0x120(%rsp), %rdi
movq %rbp, %rcx
callq 0x10d0
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1040
cmpl $-0x1, %eax
je 0x130a
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
jmp 0x12de
movq %r13, %rdi
callq 0x1060
movq %rbp, %rdi
callq 0x1060
incq %r14
cmpq 0x10(%rsp), %r14
movq %rbx, %rbp
movq 0x8(%rsp), %rbx
jne 0x123c
xorl %eax, %eax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %rsi
leaq 0xcb7(%rip), %rdi       # 0x200b
jmp 0x1362
leaq 0xcae(%rip), %rdi       # 0x200b
leaq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x1080
xorl %edi, %edi
callq 0x10c0
leaq 0xcc6(%rip), %rdi       # 0x203d
callq 0x1050
jmp 0x1369
// File: /workspace/github_c_makefile_star2_O1/mulle-nat[P]long-long-double-trouble/long.c
// Function: main
int   main( int argc, char *argv[])
{
   double  value;

   fprintf( stderr, "long (%d bytes): %ld - %ld\n", (int) sizeof( long), LONG_MIN, LONG_MAX);
   fprintf( stderr, "double (%d bytes): %g - %g\n", (int) sizeof( double), DBL_MIN, DBL_MAX);

   assert( (double) LONG_MAX <= DBL_MAX);

   // keep my code optimiza
   if( argc == 1)
      value = (double) LONG_MAX;
   else
      value = (double) (LONG_MAX - atoi( argv[ 1]));

   if( fits_long( value))
      printf( "FITS\n");
   else
      printf( "NOPE\n");
   return( 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movabsq $0x7fffffffffffffff, %rbx # imm = 0x7FFFFFFFFFFFFFFF
movq 0x2f6a(%rip), %r12      # 0x3ff8
movq (%r12), %rdi
leaq 0x1(%rbx), %rcx
leaq 0xfb1(%rip), %rsi       # 0x204e
pushq $0x8
popq %r15
movl %r15d, %edx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1040
movq (%r12), %rdi
leaq 0xfb1(%rip), %rsi       # 0x206a
movsd 0xf67(%rip), %xmm0      # 0x2028
movsd 0xf67(%rip), %xmm1      # 0x2030
movl %r15d, %edx
movb $0x2, %al
callq 0x1040
cmpl $0x1, %ebp
jne 0x10e2
movsd 0xf40(%rip), %xmm0      # 0x2020
jmp 0x10f5
movq 0x8(%r14), %rdi
callq 0x1050
cltq
subq %rax, %rbx
cvtsi2sd %rbx, %xmm0
callq 0x120c
testl %eax, %eax
leaq 0xf83(%rip), %rax       # 0x2086
leaq 0xf81(%rip), %rdi       # 0x208b
cmoveq %rax, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mulle-nat[P]long-long-double-trouble/long.c
// Function: fits_long
int   fits_long( double value)
{
   long   l_val;
   int    fits;

   if( value < (double) LONG_MIN || value > (double) LONG_MAX)
      return( 0);

   l_val = (long) value;
   fits  = (double) l_val == value;
   if( ! fits)
      fprintf( stderr, "Mismatch %f with %ld\n", value, l_val);

   return( fits);
}

// Assembly:
pushq %rbx
movapd 0xdfb(%rip), %xmm1      # 0x2010
andpd %xmm0, %xmm1
ucomisd 0xdff(%rip), %xmm1      # 0x2020
jbe 0x1227
xorl %ebx, %ebx
jmp 0x124d
cvttsd2si %xmm0, %rdx
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
movapd %xmm1, %xmm2
cmpeqsd %xmm0, %xmm2
movq %xmm2, %rbx
andl $0x1, %ebx
ucomisd %xmm0, %xmm1
jne 0x1252
jp 0x1252
movzbl %bl, %eax
popq %rbx
retq
movq 0x2d9f(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xdd5(%rip), %rsi       # 0x2038
movb $0x1, %al
callq 0x1040
jmp 0x124d
// File: /workspace/github_c_makefile_star2_O1/soso7885[P]OPCUA_example/demo_src/server_mainloop.c
// Function: main
int main(int argc, char** argv) {
    signal(SIGINT, stopHandler); /* catches ctrl-c */

    UA_ServerConfig config = UA_ServerConfig_standard;
    UA_ServerNetworkLayer nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 16664);
    config.networkLayers = &nl;
    config.networkLayersSize = 1;
    UA_Server *server = UA_Server_new(config);

    UA_StatusCode retval = UA_Server_run_startup(server);
    if(retval != UA_STATUSCODE_GOOD)
        goto cleanup;

    /* Should the server networklayer block (with a timeout) until a message
       arrives or should it return immediately? */
    UA_Boolean waitInternal = false;

    while(running) {
        /* timeout is the maximum possible delay (in millisec) until the next
           _iterate call. Otherwise, the server might miss an internal timeout
           or cannot react to messages with the promised responsiveness. */
        UA_UInt16 timeout = UA_Server_run_iterate(server, waitInternal);

        /* Now we can use the max timeout to do something else. In this case, we
           just sleep. (select is used as a platform-independent sleep
           function.) */
        struct timeval tv;
        tv.tv_sec = 0;
        tv.tv_usec = timeout * 1000;
        select(0, NULL, NULL, NULL, &tv);
    }
    retval = UA_Server_run_shutdown(server);

 cleanup:
    UA_Server_delete(server);
    nl.deleteMembers(&nl);
    return (int)retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x320, %rsp            # imm = 0x320
leaq 0xff(%rip), %rsi        # 0x12d0
movl $0x2, %edi
callq 0x1080
movq 0x2dfe(%rip), %rsi      # 0x3fe0
leaq -0x1c8(%rbp), %rbx
movl $0x160, %edx            # imm = 0x160
movq %rbx, %rdi
callq 0x1070
movq 0x2df3(%rip), %rax      # 0x3ff0
movl 0x10(%rax), %ecx
movl %ecx, -0x20(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0x30(%rbp)
movl -0x20(%rbp), %eax
movl %eax, 0x10(%rsp)
movaps -0x30(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movl $0x4118, %esi           # imm = 0x4118
callq 0x1050
movq %r14, 0xf8(%rbx)
movq $0x1, 0xf0(%rbx)
movl $0x2c, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x1030
movq %rax, %rbx
movq %rax, %rdi
callq 0x1060
movl %eax, %r14d
testl %eax, %eax
jne 0x12b2
cmpb $0x1, 0x2e08(%rip)      # 0x4070
jne 0x12a7
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10a0
movq $0x0, -0x30(%rbp)
movzwl %ax, %eax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x28(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x1090
cmpb $0x0, 0x2dcb(%rip)      # 0x4070
jne 0x126e
movq %rbx, %rdi
callq 0x1040
movl %eax, %r14d
movq %rbx, %rdi
callq 0x10b0
leaq -0x68(%rbp), %rdi
callq *0x30(%rdi)
movl %r14d, %eax
addq $0x320, %rsp            # imm = 0x320
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mcxiaoke[P]dsaac/ch3/queue_array/queue.c
// Function: clear
void clear(Queue q)
{
    assert(q!=NULL);
    q->size=0;
    q->front=1;
    q->end=0;
}

// Assembly:
testq %rdi, %rdi
je 0x11d8
movl $0x0, 0xc(%rdi)
movq $0x1, 0x4(%rdi)
retq
pushq %rax
leaq 0xe24(%rip), %rdi       # 0x2004
leaq 0xe25(%rip), %rsi       # 0x200c
leaq 0xe26(%rip), %rcx       # 0x2014
movl $0x2c, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/mcxiaoke[P]dsaac/ch3/queue_array/queue.c
// Function: create
Queue create(int maxSize)
{
    Queue q;
    q=(Queue)malloc(sizeof(struct QueueRecord));
    if(q==NULL)
    {
        fatal("queue malloc failed.");
    }
    q->data=malloc(sizeof(int)*maxSize);
    q->capacity=maxSize;
    if(q->data==NULL)
    {
        fatal("data array malloc failed.");
    }
    clear(q);
    return q;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x18, %edi
callq 0x1080
testq %rax, %rax
je 0x1243
movq %rax, %rbx
movslq %ebp, %r14
leaq (,%r14,4), %rdi
callq 0x1080
movq %rax, 0x10(%rbx)
movl %r14d, (%rbx)
testq %rax, %rax
je 0x124c
movl $0x0, 0xc(%rbx)
movq $0x1, 0x4(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xddc(%rip), %rdi       # 0x2026
jmp 0x1253
leaq 0xde8(%rip), %rdi       # 0x203b
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/mcxiaoke[P]dsaac/ch3/queue_array/queue.c
// Function: print
void print(Queue q)
{
    assert(q!=NULL);
    if(isEmpty(q))
    {
        printf("queue is empty.\n");
        return;
    }
    for(int i=q->front; i<(q->front+q->size); i++)
    {

        int cursor=i;
        if(cursor>=q->capacity)
        {
            cursor=i-q->capacity;
        }
        printf("%d ", q->data[cursor]);
    }

    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1321
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
je 0x130b
cmpl $0x0, 0xc(%rbx)
jle 0x12f7
movslq 0x4(%rbx), %r15
xorl %ebp, %ebp
leaq 0xdb5(%rip), %r14       # 0x207b
movl (%rbx), %eax
cmpl %eax, %r15d
cmovll %ebp, %eax
movq 0x10(%rbx), %rcx
cltq
shlq $0x2, %rax
subq %rax, %rcx
movl (%rcx,%r15,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
incq %r15
movl 0xc(%rbx), %eax
addl 0x4(%rbx), %eax
cmpl %eax, %r15d
jl 0x12c6
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
leaq 0xdd7(%rip), %rdi       # 0x20e9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1050
leaq 0xcdc(%rip), %rdi       # 0x2004
leaq 0xcdd(%rip), %rsi       # 0x200c
leaq 0xd33(%rip), %rcx       # 0x2069
movl $0x4d, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/mcxiaoke[P]dsaac/ch3/queue_array/queue.c
// Function: enqueue
void enqueue(int value, Queue q)
{
    assert(q!=NULL);
    if(isFull(q))
    {
        fatal("queue is full.");
    }
    q->size++;
    if(++q->end==q->capacity)
    {
        q->end=0;
    }
    q->data[q->end]=value;
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0x136f
movl (%rsi), %eax
movl 0xc(%rsi), %ecx
cmpl %eax, %ecx
je 0x138e
incl %ecx
movl %ecx, 0xc(%rsi)
movl 0x8(%rsi), %ecx
incl %ecx
xorl %edx, %edx
cmpl %eax, %ecx
cmovnel %ecx, %edx
movl %edx, 0x8(%rsi)
movq 0x10(%rsi), %rax
movslq %edx, %rcx
movl %edi, (%rax,%rcx,4)
popq %rax
retq
leaq 0xc8e(%rip), %rdi       # 0x2004
leaq 0xc8f(%rip), %rsi       # 0x200c
leaq 0xcfb(%rip), %rcx       # 0x207f
movl $0x63, %edx
callq 0x1070
leaq 0xd03(%rip), %rdi       # 0x2098
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/mcxiaoke[P]dsaac/ch3/queue_array/queue.c
// Function: dequeue
int dequeue(Queue q)
{
    assert(q!=NULL);
    if(isEmpty(q))
    {
        fatal("queue is empty.");
    }
    q->size--;
    int tmp= q->data[q->front];
    if(++q->front==q->capacity)
    {
        q->front=0;
    }
    return tmp;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x13d1
movl 0xc(%rdi), %eax
testl %eax, %eax
je 0x13f0
decl %eax
movl %eax, 0xc(%rdi)
movq 0x10(%rdi), %rax
movslq 0x4(%rdi), %rcx
movl (%rax,%rcx,4), %eax
incl %ecx
xorl %edx, %edx
cmpl (%rdi), %ecx
cmovnel %ecx, %edx
movl %edx, 0x4(%rdi)
popq %rcx
retq
leaq 0xc2c(%rip), %rdi       # 0x2004
leaq 0xc2d(%rip), %rsi       # 0x200c
leaq 0xcc1(%rip), %rcx       # 0x20a7
movl $0x72, %edx
callq 0x1070
leaq 0xcf2(%rip), %rdi       # 0x20e9
xorl %eax, %eax
callq 0x1060
movl $0x1, %edi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/mcxiaoke[P]dsaac/ch3/queue_array/queue.c
// Function: main
int main(int argc, char **argv)
{
    Queue q=create(10);
    for(int i=0; i<10; i++)
    {
        enqueue(i, q);
        print(q);
    }
    printInfo(q);
    printf("===========================\n");
    for(int i=0; i<8; i++)
    {
        dequeue(q);
        print(q);
    }
    printInfo(q);
    printf("===========================\n");
    for(int i=0; i<7; i++)
    {
        enqueue(-i,q);
        print(q);
    }
    printInfo(q);
    printf("===========================\n");
    for(int i=0; i<6; i++)
    {
        dequeue(q);
        print(q);
    }
    printInfo(q);
    printf("===========================\n");
    clear(q);
    print(q);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0xa, %edi
callq 0x11f8
movq %rax, %rbx
xorl %ebp, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1340
movq %rbx, %rdi
callq 0x129e
incl %ebp
cmpl $0xa, %ebp
jne 0x144b
movq %rbx, %rdi
callq 0x1545
leaq 0xc86(%rip), %rdi       # 0x20f9
callq 0x1050
movl $0x8, %ebp
movq %rbx, %rdi
callq 0x13a6
movq %rbx, %rdi
callq 0x129e
decl %ebp
jne 0x147d
movq %rbx, %rdi
callq 0x1545
leaq 0xc59(%rip), %rdi       # 0x20f9
callq 0x1050
xorl %ebp, %ebp
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1340
movq %rbx, %rdi
callq 0x129e
decl %ebp
cmpl $-0x7, %ebp
jne 0x14a7
movq %rbx, %rdi
callq 0x1545
leaq 0xc2a(%rip), %rdi       # 0x20f9
callq 0x1050
movl $0x6, %ebp
movq %rbx, %rdi
callq 0x13a6
movq %rbx, %rdi
callq 0x129e
decl %ebp
jne 0x14d9
movq %rbx, %rdi
callq 0x1545
leaq 0xbfd(%rip), %rdi       # 0x20f9
callq 0x1050
testq %rbx, %rbx
je 0x1526
movl $0x0, 0xc(%rbx)
movq $0x1, 0x4(%rbx)
movq %rbx, %rdi
callq 0x129e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xad7(%rip), %rdi       # 0x2004
leaq 0xad8(%rip), %rsi       # 0x200c
leaq 0xad9(%rip), %rcx       # 0x2014
movl $0x2c, %edx
callq 0x1070
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/mini_gzip.c
// Function: mini_gz_start
int
mini_gz_start(struct mini_gzip *gz_ptr, void *mem, size_t mem_len)
{
	uint8_t		*hptr, *hauxptr, *mem8_ptr;
	uint16_t	fextra_len;

	assert(gz_ptr != NULL);

	mem8_ptr = (uint8_t *)mem;
	hptr = mem8_ptr + 0;		// .gz header
	hauxptr = mem8_ptr + 10;	// auxillary header

	gz_ptr->hdr_ptr = hptr;
	gz_ptr->data_ptr = 0;
	gz_ptr->data_len = 0;
	gz_ptr->total_len = mem_len;
	gz_ptr->chunk_size = 1024;

	if (hptr[0] != 0x1F || hptr[1] != 0x8B) {
		GZDBG("hptr[0] = %02x hptr[1] = %02x\n", hptr[0], hptr[1]);
		return (-1);
	}
	if (hptr[2] != 8) {
		return (-2);
	}
	if (hptr[3] & 0x4) {
		fextra_len = hauxptr[1] << 8 | hauxptr[0];
		gz_ptr->fextra_len = fextra_len;
		hauxptr += 2;
		gz_ptr->fextra_ptr = hauxptr;
	}
	if (hptr[3] & 0x8) {
		gz_ptr->fname_ptr = hauxptr;
		while (*hauxptr != '\0') {
			hauxptr++;
		}
		hauxptr++;
	}
	if (hptr[3] & 0x10) {
		gz_ptr->fcomment_ptr = hauxptr;
		while (*hauxptr != '\0') {
			hauxptr++;
		}
		hauxptr++;
	}
	if (hptr[3] & 0x2) /* FCRC */ {
		gz_ptr->fcrc = (*(uint16_t *)hauxptr);
		hauxptr += 2;
	}
	gz_ptr->data_ptr = hauxptr;
	gz_ptr->data_len = mem_len - (hauxptr - hptr);
	gz_ptr->magic = MINI_GZIP_MAGIC;
	return (0);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x130e
movq %rsi, 0x20(%rdi)
xorl %eax, %eax
movq %rax, 0x40(%rdi)
movq %rax, 0x8(%rdi)
movq %rdx, (%rdi)
movq $0x400, 0x10(%rdi)      # imm = 0x400
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x1f, (%rsi)
jne 0x130c
cmpb $-0x75, 0x1(%rsi)
jne 0x130c
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpb $0x8, 0x2(%rsi)
jne 0x130c
testb $0x4, 0x3(%rsi)
jne 0x129e
leaq 0xa(%rsi), %rax
jmp 0x12ae
movzwl 0xa(%rsi), %eax
movw %ax, 0x1e(%rdi)
leaq 0xc(%rsi), %rax
movq %rax, 0x28(%rdi)
testb $0x8, 0x3(%rsi)
jne 0x12b9
movq %rax, %rcx
jmp 0x12c9
movq %rax, 0x30(%rdi)
leaq 0x1(%rax), %rcx
cmpb $0x0, (%rax)
movq %rcx, %rax
jne 0x12bd
testb $0x10, 0x3(%rsi)
jne 0x12d4
movq %rcx, %rax
jmp 0x12e4
movq %rcx, 0x38(%rdi)
leaq 0x1(%rcx), %rax
cmpb $0x0, (%rcx)
movq %rax, %rcx
jne 0x12d8
testb $0x2, 0x3(%rsi)
je 0x12f5
movzwl (%rax), %ecx
movw %cx, 0x1c(%rdi)
addq $0x2, %rax
movq %rax, 0x40(%rdi)
addq %rdx, %rsi
subq %rax, %rsi
movq %rsi, 0x8(%rdi)
movl $0xbeebb00b, 0x18(%rdi) # imm = 0xBEEBB00B
xorl %eax, %eax
popq %rcx
retq
leaq 0x6cef(%rip), %rdi      # 0x8004
leaq 0x6cf7(%rip), %rsi      # 0x8013
leaq 0x6cfc(%rip), %rcx      # 0x801f
movl $0x1e, %edx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/mini_gzip.c
// Function: mini_gz_unpack
int
mini_gz_unpack(struct mini_gzip *gz_ptr, void *mem_out, size_t mem_out_len)
{
	z_stream s;
	int	ret, in_bytes_avail, bytes_to_read;

	assert(gz_ptr != 0);
	assert(gz_ptr->data_len > 0);
	assert(gz_ptr->magic == MINI_GZIP_MAGIC);

	memset (&s, 0, sizeof (z_stream));
	inflateInit2(&s, -MZ_DEFAULT_WINDOW_BITS);
	in_bytes_avail = gz_ptr->data_len;
	s.avail_out = mem_out_len;
	s.next_in = gz_ptr->data_ptr;
	s.next_out = mem_out;
	for (;;) {
		bytes_to_read = MINI_GZ_MIN(gz_ptr->chunk_size, in_bytes_avail);
		s.avail_in += bytes_to_read;
		ret = mz_inflate(&s, MZ_SYNC_FLUSH);
		in_bytes_avail -= bytes_to_read;
		if (s.avail_out == 0 && in_bytes_avail != 0) {
			return (-3);
		}
		assert(ret != MZ_BUF_ERROR);
		if (ret == MZ_PARAM_ERROR) {
			return (-1);
		}
		if (ret == MZ_DATA_ERROR) {
			return (-2);
		}
		if (ret == MZ_STREAM_END) {
			break;
		}
	}
	ret = inflateEnd(&s);
	if (ret != Z_OK) {
		return (-4);
	}
	return (s.total_out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
testq %rdi, %rdi
je 0x14e2
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x1501
cmpl $0xbeebb00b, 0x18(%rbx) # imm = 0xBEEBB00B
jne 0x1520
movq %rdx, %r12
movq %rsi, %r15
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq $0x0, 0x70(%r14)
movq %r14, %rdi
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
callq 0x2114
movl 0x8(%rbx), %r13d
movl %r12d, 0x20(%r14)
movq 0x40(%rbx), %rax
movq %rax, (%r14)
movq %r15, 0x18(%r14)
movq 0x10(%rbx), %r15
movslq %r13d, %r13
cmpq %r13, %r15
cmovael %r13d, %r15d
addl %r15d, 0x8(%rsp)
movq %r14, %rdi
movl $0x2, %esi
callq 0x21e3
subl %r15d, %r13d
cmpl $0x0, 0x20(%rsp)
jne 0x1469
testl %r13d, %r13d
jne 0x14a5
cmpl $-0x4, %eax
jle 0x147a
cmpl $-0x3, %eax
je 0x14ac
cmpl $0x1, %eax
jne 0x143a
jmp 0x14ba
cmpl $0xffffd8f0, %eax       # imm = 0xFFFFD8F0
je 0x14b3
cmpl $-0x5, %eax
jne 0x143a
leaq 0x6c75(%rip), %rdi      # 0x8102
leaq 0x6b7f(%rip), %rsi      # 0x8013
leaq 0x6c1b(%rip), %rcx      # 0x80b6
movl $0x7a, %edx
callq 0x1090
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x14d1
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x14d1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x14d1
movq %rsp, %rdi
callq 0x40fe
movl %eax, %ecx
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
testl %ecx, %ecx
jne 0x14d1
movl 0x28(%rsp), %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x6b6c(%rip), %rdi      # 0x8055
leaq 0x6b23(%rip), %rsi      # 0x8013
leaq 0x6bbf(%rip), %rcx      # 0x80b6
movl $0x68, %edx
callq 0x1090
leaq 0x6be5(%rip), %rdi      # 0x80ed
leaq 0x6b04(%rip), %rsi      # 0x8013
leaq 0x6ba0(%rip), %rcx      # 0x80b6
movl $0x69, %edx
callq 0x1090
leaq 0x6b6e(%rip), %rdi      # 0x8095
leaq 0x6ae5(%rip), %rsi      # 0x8013
leaq 0x6b81(%rip), %rcx      # 0x80b6
movl $0x6a, %edx
callq 0x1090
nop
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: mz_adler32
mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
{
  mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); size_t block_len = buf_len % 5552;
  if (!ptr) return MZ_ADLER32_INIT;
  while (buf_len) {
    for (i = 0; i + 7 < block_len; i += 8, ptr += 8) {
      s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
      s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
    }
    for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
    s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
  }
  return (s2 << 16) + s1;
}

// Assembly:
testq %rsi, %rsi
je 0x1877
movq %rdx, %r8
movq %rdi, %rcx
shrq $0x10, %rcx
movzwl %di, %edi
testq %rdx, %rdx
je 0x1870
movq %r8, %rax
shrq $0x4, %rax
movabsq $0x179baa6bb6398b7, %rdx # imm = 0x179BAA6BB6398B7
mulq %rdx
shrq %rdx
imulq $0x15b0, %rdx, %rdx     # imm = 0x15B0
movq %r8, %rax
subq %rdx, %rax
movl $0x80078071, %edx       # imm = 0x80078071
xorl %r9d, %r9d
cmpq $0x8, %rax
jb 0x1818
movzbl (%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x1(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x2(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x3(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x4(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x5(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
movzbl 0x6(%rsi,%r9), %r10d
addl %edi, %r10d
addl %r10d, %ecx
movzbl 0x7(%rsi,%r9), %edi
addl %r10d, %edi
addl %edi, %ecx
addq $0x8, %r9
leal 0x7(%r9), %r10d
cmpl %eax, %r10d
jb 0x17ad
addq %r9, %rsi
movq %rax, %r10
subq %r9, %r10
jbe 0x1838
xorl %r9d, %r9d
movzbl (%rsi,%r9), %r11d
addl %r11d, %edi
addl %edi, %ecx
incq %r9
cmpq %r9, %r10
jne 0x1823
addq %r10, %rsi
movl %edi, %r9d
imulq %rdx, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %edi
movl %ecx, %r9d
imulq %rdx, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %ecx
subq %rax, %r8
movl $0x15b0, %eax           # imm = 0x15B0
jne 0x17a4
shll $0x10, %ecx
orl %edi, %ecx
jmp 0x187c
movl $0x1, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: mz_deflateInit2
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy)
{
  tdefl_compressor *pComp;
  mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | TDEFL_COMPUTE_CRC32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy);

  if (!pStream) return MZ_STREAM_ERROR;
  if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR;

  pStream->data_type = 0;
  pStream->adler = MZ_ADLER32_INIT;
  pStream->crc32 = MZ_CRC32_INIT;
  pStream->msg = NULL;
  pStream->reserved = 0;
  pStream->total_in = 0;
  pStream->total_out = 0;
  if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
  if (!pStream->zfree) pStream->zfree = def_free_func;

  pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor));
  if (!pComp)
    return MZ_MEM_ERROR;

  pStream->state = (struct mz_internal_state *)pComp;

  if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY)
  {
    mz_deflateEnd(pStream);
    return MZ_PARAM_ERROR;
  }

  return MZ_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
movl %esi, %edi
movl %ecx, %esi
movl %r9d, %edx
callq 0x19e2
testq %rbx, %rbx
je 0x19c8
movl %eax, %ebp
cmpl $0x8, %r12d
setne %al
addl $-0xa, %r14d
cmpl $-0x9, %r14d
setb %cl
orb %al, %cl
movl $0xffffd8f0, %r14d      # imm = 0xFFFFD8F0
jne 0x19ce
cmpl $0xf, %r15d
je 0x194f
cmpl $-0xf, %r15d
jne 0x19ce
movl $0x0, 0x58(%rbx)
movq $0x1, 0x60(%rbx)
movq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x68(%rbx)
cmpq $0x0, 0x40(%rbx)
jne 0x1983
leaq 0xdb(%rip), %rax        # 0x1a5a
movq %rax, 0x40(%rbx)
cmpq $0x0, 0x48(%rbx)
jne 0x1995
leaq 0xd5(%rip), %rax        # 0x1a66
movq %rax, 0x48(%rbx)
movq 0x50(%rbx), %rdi
movl $0x1, %esi
movl $0x4df80, %edx          # imm = 0x4DF80
callq *0x40(%rbx)
testq %rax, %rax
je 0x19da
orl $0x6000, %ebp           # imm = 0x6000
movq %rax, 0x38(%rbx)
xorl %r14d, %r14d
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x1a6e
jmp 0x19ce
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
jmp 0x19ce
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_create_comp_flags_from_zip_params
mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy)
{
  mz_uint comp_flags = s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0);
  if (window_bits > 0) comp_flags |= TDEFL_WRITE_ZLIB_HEADER;

  if (!level) comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS;
  else if (strategy == MZ_FILTERED) comp_flags |= TDEFL_FILTER_MATCHES;
  else if (strategy == MZ_HUFFMAN_ONLY) comp_flags &= ~TDEFL_MAX_PROBES_MASK;
  else if (strategy == MZ_FIXED) comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS;
  else if (strategy == MZ_RLE) comp_flags |= TDEFL_RLE_MATCHES;

  return comp_flags;
}

// Assembly:
cmpl $0xa, %edi
movl $0xa, %eax
cmovll %edi, %eax
testl %edi, %edi
movl $0x6, %ecx
cmovnsl %eax, %ecx
movslq %ecx, %rax
leaq 0x6b0f(%rip), %rcx      # 0x8510
xorl %r8d, %r8d
cmpl $0x4, %edi
setl %r8b
shll $0xf, %r8d
orl (%rcx,%rax,4), %r8d
movl %r8d, %eax
orl $0x1000, %eax           # imm = 0x1000
testl %esi, %esi
cmovlel %r8d, %eax
testl %edi, %edi
je 0x1a42
decl %edx
cmpl $0x3, %edx
ja 0x1a4d
leaq 0x679d(%rip), %rcx      # 0x81d0
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
orl $0x40000, %eax          # imm = 0x40000
retq
orl $0x100000, %eax         # imm = 0x100000
retq
orl $0x20000, %eax          # imm = 0x20000
retq
orl $0x80000, %eax          # imm = 0x80000
retq
andl $0xfffff000, %eax       # imm = 0xFFFFF000
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_init
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
  d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user;
  d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0;
  d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3;
  if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash);
  d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0;
  d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0;
  d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8;
  d->m_pOutput_buf = d->m_output_buf; d->m_pOutput_buf_end = d->m_output_buf; d->m_prev_return_status = TDEFL_STATUS_OKAY;
  d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; d->m_adler32 = 1; d->m_crc32 = 1;
  d->m_pIn_buf = NULL; d->m_pOut_buf = NULL;
  d->m_pIn_buf_size = NULL; d->m_pOut_buf_size = NULL;
  d->m_flush = TDEFL_NO_FLUSH; d->m_pSrc = NULL; d->m_src_buf_left = 0; d->m_out_buf_ofs = 0;
  memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
  memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
  return TDEFL_STATUS_OKAY;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movl %ecx, 0x10(%rdi)
movl %ecx, %eax
andl $0xfff, %eax            # imm = 0xFFF
leal 0x2(%rax), %edx
imulq $0x55555556, %rdx, %rdx # imm = 0x55555556
shrq $0x20, %rdx
incl %edx
movl %edx, 0x14(%rdi)
movl %ecx, %edx
shrl $0xf, %edx
andl $0x1, %edx
movl %edx, 0x1c(%rdi)
shrl $0x2, %eax
addl $0x2, %eax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
shrq $0x20, %rax
incl %eax
movl %eax, 0x18(%rdi)
btl $0x10, %ecx
jb 0x1ad0
leaq 0x292b2(%rbx), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x10a0
xorl %eax, %eax
movl %eax, 0x30(%rbx)
movq %rax, 0x28(%rbx)
leaq 0x92b2(%rbx), %rcx
leaq 0x92b3(%rbx), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x5c(%rbx)
movups %xmm0, 0x78(%rbx)
movq %rax, 0x88(%rbx)
movq %rdx, 0x38(%rbx)
movq %rcx, 0x40(%rbx)
movl $0x8, 0x58(%rbx)
leaq 0x392b2(%rbx), %rcx
movq %rcx, 0x48(%rbx)
movq %rcx, 0x50(%rbx)
movl %eax, 0x74(%rbx)
movq %rax, 0x6c(%rbx)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x20(%rbx)
leaq 0x81d2(%rbx), %rdi
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0xa0(%rbx)
movl %eax, 0xb0(%rbx)
movups %xmm0, 0xb8(%rbx)
movq %rax, 0xc8(%rbx)
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x10a0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: mz_deflateEnd
int mz_deflateEnd(mz_streamp pStream)
{
  if (!pStream) return MZ_STREAM_ERROR;
  if (pStream->state)
  {
    pStream->zfree(pStream->opaque, pStream->state);
    pStream->state = NULL;
  }
  return MZ_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1b8e
movq %rdi, %r14
movq 0x38(%rdi), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x1b93
movq 0x50(%r14), %rdi
callq *0x48(%r14)
movq $0x0, 0x38(%r14)
jmp 0x1b93
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: mz_compress2
int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
{
  int status;
  mz_stream stream;
  memset(&stream, 0, sizeof(stream));

  // In case mz_ulong is 64-bits (argh I hate longs).
  if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;

  stream.next_in = pSource;
  stream.avail_in = (mz_uint32)source_len;
  stream.next_out = pDest;
  stream.avail_out = (mz_uint32)*pDest_len;

  status = mz_deflateInit(&stream, level);
  if (status != MZ_OK) return status;

  status = mz_deflate(&stream, MZ_FINISH);
  if (status != MZ_STREAM_END)
  {
    mz_deflateEnd(&stream);
    return (status == MZ_OK) ? MZ_BUF_ERROR : status;
  }

  *pDest_len = stream.total_out;
  return mz_deflateEnd(&stream);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq $0x0, 0x70(%rsp)
movq (%rsi), %rsi
movq %rsi, %rax
orq %rcx, %rax
shrq $0x20, %rax
movl $0xffffd8f0, %ebp       # imm = 0xFFFFD8F0
jne 0x20b2
movq %rsp, %rax
movq %rdx, (%rax)
movl %ecx, 0x8(%rax)
movq %rdi, 0x18(%rax)
movl %esi, 0x20(%rax)
movq %rax, %rdi
movl %r8d, %esi
movl $0x8, %edx
movl $0xf, %ecx
movl $0x9, %r8d
xorl %r9d, %r9d
callq 0x18f8
movl %eax, %ebp
testl %eax, %eax
jne 0x20b2
movq %rsp, %rdi
movl $0x4, %esi
callq 0x1bdc
cmpl $0x1, %eax
jne 0x2087
movq 0x28(%rsp), %rax
movq %rax, (%rbx)
movq 0x38(%rsp), %rsi
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x20b2
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
movq $0x0, 0x38(%rsp)
jmp 0x20b2
movl %eax, %r14d
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x20a6
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
movq $0x0, 0x38(%rsp)
testl %r14d, %r14d
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: mz_inflateInit2
int mz_inflateInit2(mz_streamp pStream, int window_bits)
{
  inflate_state *pDecomp;
  if (!pStream) return MZ_STREAM_ERROR;
  if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR;

  pStream->data_type = 0;
  pStream->adler = 0;
  pStream->crc32 = 0;
  pStream->msg = NULL;
  pStream->total_in = 0;
  pStream->total_out = 0;
  pStream->reserved = 0;
  if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
  if (!pStream->zfree) pStream->zfree = def_free_func;

  pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
  if (!pDecomp) return MZ_MEM_ERROR;

  pStream->state = (struct mz_internal_state *)pDecomp;

  tinfl_init(&pDecomp->m_decomp);
  pDecomp->m_dict_ofs = 0;
  pDecomp->m_dict_avail = 0;
  pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
  pDecomp->m_first_call = 1;
  pDecomp->m_has_flushed = 0;
  pDecomp->m_window_bits = window_bits;

  return MZ_OK;
}

// Assembly:
testq %rdi, %rdi
je 0x21c6
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0xf, %esi
je 0x2139
movl $0xffffd8f0, %eax       # imm = 0xFFFFD8F0
cmpl $-0xf, %ebx
jne 0x21d1
movl $0x0, 0x58(%r14)
xorl %eax, %eax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x60(%r14)
movq %rax, 0x70(%r14)
cmpq %rax, 0x40(%r14)
jne 0x2169
leaq -0x70b(%rip), %rax      # 0x1a5a
movq %rax, 0x40(%r14)
cmpq $0x0, 0x48(%r14)
jne 0x217b
leaq -0x711(%rip), %rax      # 0x1a66
movq %rax, 0x48(%r14)
movq 0x50(%r14), %rdi
movl $0x1, %esi
movl $0xab18, %edx           # imm = 0xAB18
callq *0x40(%r14)
testq %rax, %rax
je 0x21cc
movq %rax, 0x38(%r14)
movl $0x0, (%rax)
movq $0x0, 0x2b00(%rax)
movl $0x1, 0xab14(%rax)
movq $0x1, 0x2b08(%rax)
movl %ebx, 0x2b10(%rax)
xorl %eax, %eax
jmp 0x21d1
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: mz_uncompress
int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
{
  mz_stream stream;
  int status;
  memset(&stream, 0, sizeof(stream));

  // In case mz_ulong is 64-bits (argh I hate longs).
  if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;

  stream.next_in = pSource;
  stream.avail_in = (mz_uint32)source_len;
  stream.next_out = pDest;
  stream.avail_out = (mz_uint32)*pDest_len;

  status = mz_inflateInit(&stream);
  if (status != MZ_OK)
    return status;

  status = mz_inflate(&stream, MZ_FINISH);
  if (status != MZ_STREAM_END)
  {
    mz_inflateEnd(&stream);
    return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status;
  }
  *pDest_len = stream.total_out;

  return mz_inflateEnd(&stream);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq $0x0, 0x70(%rsp)
movq (%rsi), %rsi
movq %rsi, %rax
orq %rcx, %rax
shrq $0x20, %rax
movl $0xffffd8f0, %ebp       # imm = 0xFFFFD8F0
jne 0x4219
movq %rsp, %rax
movq %rdx, (%rax)
movl %ecx, 0x8(%rax)
movq %rdi, 0x18(%rax)
movl %esi, 0x20(%rax)
movq %rax, %rdi
movl $0xf, %esi
callq 0x2114
movl %eax, %ebp
testl %eax, %eax
jne 0x4219
movq %rsp, %rdi
movl $0x4, %esi
callq 0x21e3
cmpl $0x1, %eax
jne 0x41e7
movq 0x28(%rsp), %rax
movq %rax, (%rbx)
movq 0x38(%rsp), %rsi
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x4219
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
movq $0x0, 0x38(%rsp)
jmp 0x4219
movl %eax, %r14d
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x4206
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
movq $0x0, 0x38(%rsp)
movl %r14d, %eax
xorl $-0x5, %eax
orl 0x8(%rsp), %eax
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tinfl_decompress_mem_to_heap
void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
  tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0;
  *pOut_len = 0;
  tinfl_init(&decomp);
  for ( ; ; )
  {
    size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity;
    tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size,
      (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
    if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT))
    {
      MZ_FREE(pBuf); *pOut_len = 0; return NULL;
    }
    src_buf_ofs += src_buf_size;
    *pOut_len += dst_buf_size;
    if (status == TINFL_STATUS_DONE) break;
    new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128;
    pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity);
    if (!pNew_buf)
    {
      MZ_FREE(pBuf); *pOut_len = 0; return NULL;
    }
    pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity;
  }
  return pBuf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b28, %rsp           # imm = 0x2B28
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, 0x20(%rsp)
movq %rdi, %rbp
movq $0x0, (%rdx)
leaq 0x28(%rsp), %rax
movl $0x0, (%rax)
andl $-0x7, %ebx
orl $0x4, %ebx
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %edx, %edx
movq %rdi, 0x8(%rsp)
movq 0x20(%rsp), %rax
subq %r15, %rax
movq %rax, 0x18(%rsp)
movq (%r14), %r8
movq %rdx, %r12
movq %rdx, %rax
subq %r8, %rax
movq %rax, 0x10(%rsp)
leaq (%r15,%rbp), %rsi
addq %r13, %r8
testq %r13, %r13
cmoveq %r13, %r8
movl %ebx, (%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %r13, %rcx
leaq 0x10(%rsp), %r9
callq 0x2524
testl %eax, %eax
sets %cl
cmpl $0x1, %eax
sete %dl
orb %cl, %dl
je 0x42fc
movq %r13, %rdi
callq 0x1030
movq $0x0, (%r14)
movl $0x1, %ecx
jmp 0x4345
addq 0x18(%rsp), %r15
movq 0x10(%rsp), %rcx
addq %rcx, (%r14)
testl %eax, %eax
je 0x4340
leaq (%r12,%r12), %rbp
cmpq $0x81, %rbp
movl $0x80, %eax
cmovbq %rax, %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1100
testq %rax, %rax
je 0x4352
xorl %ecx, %ecx
movq %rax, %r13
movq %rbp, %rdx
movq 0x8(%rsp), %rbp
jmp 0x4348
movl $0x4, %ecx
movq %r12, %rdx
testl %ecx, %ecx
je 0x4291
jmp 0x4359
movq 0x8(%rsp), %rbp
jmp 0x42e6
cmpl $0x4, %ecx
je 0x4361
xorl %r13d, %r13d
movq %r13, %rax
addq $0x2b28, %rsp           # imm = 0x2B28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_compress_mem_to_output
mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
  tdefl_compressor *pComp; mz_bool succeeded; if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE;
  pComp = (tdefl_compressor*)MZ_MALLOC(sizeof(tdefl_compressor)); if (!pComp) return MZ_FALSE;
  succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
  succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
  MZ_FREE(pComp); return succeeded;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %cl
andb %al, %cl
testq %rdx, %rdx
sete %al
xorl %r13d, %r13d
orb %cl, %al
jne 0x5a98
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
movl $0x4df80, %edi          # imm = 0x4DF80
callq 0x10f0
testq %rax, %rax
je 0x5a98
movq %rax, %rbp
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl 0x4(%rsp), %ecx
callq 0x1a6e
movq %rbp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x4, %ecx
callq 0x59d5
xorl %r13d, %r13d
cmpl $0x1, %eax
sete %r13b
movq %rbp, %rdi
callq 0x1030
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_compress_mem_to_heap
void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
  if (!pOut_len) return MZ_FALSE; else *pOut_len = 0;
  out_buf.m_expandable = MZ_TRUE;
  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return NULL;
  *pOut_len = out_buf.m_size; return out_buf.m_pBuf;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
testq %rdx, %rdx
je 0x5af5
movl %ecx, %r8d
movq %rdx, %rbx
movq $0x0, (%rdx)
movq %rsp, %rcx
movl $0x1, 0x18(%rcx)
leaq 0x1f(%rip), %rdx        # 0x5afd
callq 0x5a18
testl %eax, %eax
je 0x5af5
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
jmp 0x5af7
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq