LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/core/session_mgr.c
// Function: free_session
void free_session(char *session_id)
{
    if(g_ht == NULL){
        log_error("session system is not ready, please retry ");
        return ;
    }
    if(_get_timestamp_by_session_id(session_id) >= 0){
        ht_del_lockless(g_ht, session_id, DEFAULT_SESSION_LEN);
    
        --g_session_count;
        log_debug("current session count: %d\n", g_session_count);
    }
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x66da(%rip)      # 0xe7b8
je 0x8135
movq %rdi, %rbx
callq 0x8046
testl %eax, %eax
js 0x815c
movq 0x66c5(%rip), %rdi      # 0xe7b8
movq %rbx, %rsi
movl $0x40, %edx
callq 0x3ffb
movl 0x66b9(%rip), %r9d      # 0xe7c0
decl %r9d
movl %r9d, 0x66af(%rip)      # 0xe7c0
leaq 0xeec(%rip), %rsi       # 0x9004
leaq 0x20be(%rip), %rdx      # 0xa1dd
leaq 0x21f9(%rip), %r8       # 0xa31f
xorl %edi, %edi
movl $0x98, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x42c5
leaq 0x14e4(%rip), %rsi      # 0x9620
leaq 0x209a(%rip), %rdx      # 0xa1dd
leaq 0x20dd(%rip), %r8       # 0xa227
movl $0x3, %edi
movl $0x91, %ecx
xorl %eax, %eax
popq %rbx
jmp 0x42c5
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/core/session_mgr.c
// Function: get_session_id_by_socketfd
char *get_session_id_by_socketfd(int *socketfd)
{
    char *ret = NULL;

    if(g_ht == NULL){
        log_error("session system is not ready, please retry ");
        return 0;
    }

    ret = ht_iterator_lockless(g_ht, _get_socketfd, socketfd);

    log_debug("get session id: %s by socketfd: %d\n", ret, *socketfd);
    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x664c(%rip), %rdi      # 0xe7b8
testq %rdi, %rdi
je 0x81b1
leaq 0x6c(%rip), %rsi        # 0x81e4
movq %r14, %rdx
callq 0x4130
movq %rax, %rbx
movl (%r14), %eax
movl %eax, (%rsp)
leaq 0xe74(%rip), %rsi       # 0x9004
leaq 0x2046(%rip), %rdx      # 0xa1dd
leaq 0x219c(%rip), %r8       # 0xa33a
xorl %edi, %edi
movl $0xb6, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x42c5
jmp 0x81d9
leaq 0x1468(%rip), %rsi      # 0x9620
leaq 0x201e(%rip), %rdx      # 0xa1dd
leaq 0x2061(%rip), %r8       # 0xa227
xorl %ebx, %ebx
movl $0x3, %edi
movl $0xb0, %ecx
xorl %eax, %eax
callq 0x42c5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/core/session_mgr.c
// Function: get_socketfd_by_session_id
int get_socketfd_by_session_id(char *session_id)
{
    SESSION_ITEM  *item = NULL; 
    
    if(g_ht == NULL || session_id == NULL){
        log_error("session system is not ready, please retry ");
        return -1;
    }

    item = ht_find(g_ht, session_id, DEFAULT_SESSION_LEN, NULL, NULL);
    if(item == NULL){
        log_error("could not find socketfd for session: %s ", session_id);
        return -1;
    }
    
    log_debug("get socketfd: %d by session id: %s \n", *item->sockfd, session_id);
    item->last_modify_time = time(NULL);
    return *item->sockfd;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x6597(%rip), %rdi      # 0xe7b8
testq %rdi, %rdi
setne %al
testq %rbx, %rbx
setne %cl
testb %al, %cl
jne 0x825c
leaq 0x13e8(%rip), %rsi      # 0x9620
leaq 0x1f9e(%rip), %rdx      # 0xa1dd
leaq 0x1fe1(%rip), %r8       # 0xa227
movl $0x3, %edi
movl $0xbf, %ecx
xorl %eax, %eax
callq 0x42c5
jmp 0x82de
movq %rbx, %rsi
movl $0x40, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3d25
testq %rax, %rax
je 0x82b5
movq %rax, %r14
movq (%rax), %rax
movl (%rax), %r9d
movq %rbx, (%rsp)
leaq 0xd7d(%rip), %rsi       # 0x9004
leaq 0x1f4f(%rip), %rdx      # 0xa1dd
leaq 0x20c9(%rip), %r8       # 0xa35e
xorl %edi, %edi
movl $0xc9, %ecx
xorl %eax, %eax
callq 0x42c5
xorl %edi, %edi
callq 0x25c0
movq %rax, 0x8(%r14)
movq (%r14), %rax
movl (%rax), %eax
jmp 0x82e3
leaq 0x1364(%rip), %rsi      # 0x9620
leaq 0x1f1a(%rip), %rdx      # 0xa1dd
leaq 0x202c(%rip), %r8       # 0xa2f6
movl $0x3, %edi
movl $0xc5, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x42c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/xiaowenhuyuehu[P]remote_access/src/core/session_mgr.c
// Function: delete_item
static int _delete_item(void *key, void *val, void *usr)
{
    SESSION_ITEM  *item = val; 

    if(item->last_modify_time + DEFAULT_SESSION_TIMEOUT < time(NULL)){
        log_info("delete timeout session:  %s ", (char *)key);
        *(int *)usr += 1; 
        *item->sockfd = -1;
        free_session(key);
    }

    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x708, %r12d           # imm = 0x708
addq 0x8(%rsi), %r12
xorl %edi, %edi
callq 0x25c0
cmpq %rax, %r12
jge 0x834f
leaq 0x1360(%rip), %rsi      # 0x9679
leaq 0x1ebd(%rip), %rdx      # 0xa1dd
leaq 0x205c(%rip), %r8       # 0xa383
movl $0x1, %edi
movl $0x30, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x42c5
incl (%r15)
movq (%r14), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x80d5
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/983[P]bigint/c_examples.c
// Function: main
int main(){
    char buf[65536];

    /* neat trick to avoid having to write &a, &b, &c everywhere */
    bigint a[1], b[1], c[1];

    /* bigints have to be initialized (same as memset'ed to zero) */
    bigint_init(a);
    bigint_init(b);
    bigint_init(c);

    /* create bigint from string */
    bigint_from_str(a, "123456789");
    bigint_from_str(b, "987654321");

    /* c = a * b */
    /* first parameter is destination parameter */
    bigint_mul(c, a, b);

    /* write and print */
    puts(bigint_write(buf, sizeof(buf), c));

    /* bigints have to be free'd */
    bigint_free(a);
    bigint_free(b);
    bigint_free(c);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10060, %rsp          # imm = 0x10060
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x1378
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x1378
movq %rsp, %r15
movq %r15, %rdi
callq 0x1378
leaq 0x2e10(%rip), %rsi      # 0x4004
movq %rbx, %rdi
callq 0x21da
leaq 0x2e0b(%rip), %rsi      # 0x400e
movq %r14, %rdi
callq 0x21da
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1f7b
leaq 0x60(%rsp), %rdi
movl $0x10000, %esi          # imm = 0x10000
movq %r15, %rdx
callq 0x3175
movq %rax, %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x13fd
movq %r14, %rdi
callq 0x13fd
movq %r15, %rdi
callq 0x13fd
xorl %eax, %eax
addq $0x10060, %rsp          # imm = 0x10060
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_depack.c
// Function: put_buffer
ULONG put_buffer(ULONG pos,ULONG size)
{ // writes specified part of buffer to the output file (with wrapping!)
	ULONG size1,size2,success;

	if( (pos+size)<=DBSIZE )
	{ // no wrapping needed
		return (size==fwrite(&dbuf[pos],1,size,file_out))?1:0;
	}
	else
	{ // wrapping
		size1=(DBSIZE-pos);
		size2=size-size1;

		success=  (size1==fwrite(&dbuf[pos],1,size1,file_out))?1:0;
		success&= (size2==fwrite(&dbuf[0],  1,size2,file_out))?1:0;
		return success;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
leal (%rbx,%rdi), %eax
cmpl $0x2000, %eax           # imm = 0x2000
ja 0x17e6
movl %ebx, %ebx
movl %edi, %edi
addq 0x3816(%rip), %rdi      # 0x4fe0
leaq 0x38ff(%rip), %rax      # 0x50d0
movq (%rax), %rcx
movl $0x1, %esi
movq %rbx, %rdx
callq 0x1130
cmpq %rbx, %rax
jmp 0x1836
movl $0x2000, %r14d          # imm = 0x2000
subl %edi, %r14d
subl %r14d, %ebx
movl %edi, %edi
leaq 0x38f5(%rip), %r15      # 0x50f0
addq %r15, %rdi
leaq 0x38cb(%rip), %r13      # 0x50d0
movq (%r13), %rcx
movl $0x1, %esi
movq %r14, %rdx
callq 0x1130
movq %rax, %r12
xorq %r14, %r12
movq (%r13), %rcx
movl $0x1, %esi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1130
xorq %rbx, %rax
orq %r12, %rax
sete %al
movzbl %al, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_depacker.c
// Function: get_bits
ULONG get_bits(ULONG numbits)
{ // gets specified number of bits from bitstream
  // returns them LSB-aligned
  // if error (get_byte() fails) return 0xFFFFFFFF, so function can't get more than 31 bits!
  // if 0 bits required, returns 0

	ULONG count;
	ULONG bits;
	ULONG input;

	bits=0;
	count=numbits;

	while(count--)
	{
		if( bitcount-- )
		{
			bits<<=1;
			bits|=0x00000001&(bitstream>>7);
			bitstream<<=1;
		}
		else
		{
			bitcount=8;
			input=get_byte();
#ifdef ERRORS
			if( input==0xFFFFFFFF ) return 0xFFFFFFFF;
#endif
			bitstream=(UBYTE)input;

			count++;    // repeat loop once more
		}
	}

	return bits;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
je 0x1b4f
movl %edi, %ebp
xorl %ebx, %ebx
movl 0x55ef(%rip), %ecx      # 0x70f8
subl $0x1, %ecx
movl %ecx, 0x55e6(%rip)      # 0x70f8
jae 0x1b30
movl $0x8, 0x55da(%rip)      # 0x70f8
callq 0x177c
cmpl $-0x1, %eax
je 0x1b53
movl 0x55ca(%rip), %ecx      # 0x70f8
jmp 0x1b43
decl %ebp
movzbl 0x55bb(%rip), %eax      # 0x70f4
movl %eax, %edx
shrl $0x7, %edx
leal (%rdx,%rbx,2), %ebx
addl %eax, %eax
movb %al, 0x55ab(%rip)       # 0x70f4
testl %ebp, %ebp
jne 0x1b09
jmp 0x1b58
xorl %ebx, %ebx
jmp 0x1b58
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_depacker.c
// Function: repeat
void repeat(LONG disp,ULONG len)
{ // repeat len bytes with disp displacement (negative)
  // uses dbpos & dbuf

	ULONG i;

	for(i=0;i<len;i++)
	{
		dbuf[DBMASK&dbpos]=dbuf[DBMASK&(dbpos+disp)];
		dbpos++;
	}
}

// Assembly:
testl %esi, %esi
je 0x1b98
movl 0x5585(%rip), %eax      # 0x70f0
movl $0x1fff, %ecx           # imm = 0x1FFF
leaq 0x3579(%rip), %rdx      # 0x50f0
leal (%rdi,%rax), %r8d
andl %ecx, %r8d
movb (%r8,%rdx), %r8b
movl %eax, %r9d
andl %ecx, %r9d
movb %r8b, (%r9,%rdx)
incl %eax
decl %esi
jne 0x1b77
movl %eax, 0x5558(%rip)      # 0x70f0
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_depacker.c
// Function: get_bigdisp
LONG get_bigdisp(void)
{ // fetches 'big' displacement (-1..-4352)
  // returns negative displacement or ZERO if failed either get_bits() or get_byte()

	ULONG bits,byte;

	bits=get_bits(1);
#ifdef ERRORS
	if( bits==0xFFFFFFFF ) return 0;
#endif

	if( bits )
	{ // longer displacement
		bits=get_bits(4);
#ifdef ERRORS
		if( bits==0xFFFFFFFF ) return 0;
#endif
		byte=get_byte();
#ifdef ERRORS
		if( byte==0xFFFFFFFF ) return 0;
#endif
		return (LONG)( ((0xFFFFF000|(bits<<8))-0x0100)|byte );
	}
	else
	{ // shorter displacement
		byte=get_byte();
#ifdef ERRORS
		if( byte==0xFFFFFFFF ) return 0;
#endif
		return (LONG)( 0xFFFFFF00|byte );
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x1af8
xorl %ebx, %ebx
cmpl $-0x1, %eax
je 0x1bf3
testl %eax, %eax
jne 0x1bc8
callq 0x177c
movl %eax, %ecx
orl $0xffffff00, %ecx       # imm = 0xFFFFFF00
xorl %ebx, %ebx
cmpl $-0x1, %eax
cmovnel %ecx, %ebx
jmp 0x1bf3
movl $0x4, %edi
callq 0x1af8
cmpl $-0x1, %eax
je 0x1bf3
movl %eax, %ebp
callq 0x177c
cmpl $-0x1, %eax
je 0x1bf3
orl $-0x10, %ebp
shll $0x8, %ebp
addl $0xffffff00, %ebp       # imm = 0xFFFFFF00
orl %ebp, %eax
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_emit.c
// Function: emit_code
ULONG emit_code(struct lzinfo * lz)
{ // emits given lz code to the output stream

	// write bits

	emit_bits(lz->bits,lz->bitsnum);


	// write byte, if any

	if( lz->byte!=0xFFFFFFFF )
	{
		oubuf[ob_freepos++]=(UBYTE)(lz->byte&0x000000FF);
	}


	// flush to disk if needed

	if( ob_freepos>(OUBUFSIZE-8) )
	{
		// write up to current bit position
		if( ob_bitpos!=fwrite( oubuf, 1, ob_bitpos, file_out ) )  return 0;

		// move remaining part of buffer to the beginning
		memcpy( oubuf, &oubuf[ob_bitpos], OUBUFSIZE-ob_bitpos);

		// update pointers
		ob_freepos-=ob_bitpos;
		ob_bitpos=0;
	}

	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %edi
movl 0x14(%rbx), %esi
callq 0x1ce7
movl 0xc(%rbx), %eax
cmpl $-0x1, %eax
je 0x1c67
movl 0x55b2(%rip), %edx      # 0x7204
leal 0x1(%rdx), %ecx
movl %ecx, 0x55a9(%rip)      # 0x7204
leaq 0x549e(%rip), %rsi      # 0x7100
movb %al, (%rdx,%rsi)
jmp 0x1c6d
movl 0x5597(%rip), %ecx      # 0x7204
movl $0x1, %eax
cmpl $0xf9, %ecx
jb 0x1cdf
movl 0x557f(%rip), %r14d     # 0x7200
leaq 0x3448(%rip), %rax      # 0x50d0
movq (%rax), %rcx
leaq 0x546e(%rip), %rbx      # 0x7100
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1130
movq %rax, %rcx
xorl %eax, %eax
cmpq %r14, %rcx
jne 0x1cdf
movl 0x554d(%rip), %r14d     # 0x7200
movq %r14, %rsi
addq %rbx, %rsi
movl $0x100, %edx            # imm = 0x100
subl %r14d, %edx
movq %rbx, %rdi
callq 0x1070
subl %r14d, 0x5534(%rip)     # 0x7204
movl $0x0, 0x5526(%rip)      # 0x7200
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_emit.c
// Function: emit_bits
void emit_bits(ULONG bits,ULONG bitsnum)
{
	ULONG i,shifter;

	shifter=bits;

	for(i=0;i<bitsnum;i++)
	{
		if( ob_bits==8 )
		{
			ob_bitpos=ob_freepos;
			ob_freepos++;
			ob_bits=0;
		}

		oubuf[ob_bitpos]=(UBYTE)( (oubuf[ob_bitpos]<<1) | (UBYTE)( shifter>>31 ));

		ob_bits++;

		shifter<<=1;
	}
}

// Assembly:
testl %esi, %esi
je 0x1d3f
movl 0x550f(%rip), %edx      # 0x7200
movl 0x550d(%rip), %ecx      # 0x7204
movl 0x550a(%rip), %r8d      # 0x7208
leaq 0x53fb(%rip), %rax      # 0x7100
cmpl $0x8, %r8d
jne 0x1d1e
movl %ecx, 0x54ef(%rip)      # 0x7200
movl %ecx, %edx
incl %ecx
movl %ecx, 0x54e9(%rip)      # 0x7204
xorl %r8d, %r8d
movl %edx, %r9d
movzbl (%r9,%rax), %r10d
shldl $0x1, %edi, %r10d
movb %r10b, (%r9,%rax)
incl %r8d
addl %edi, %edi
decl %esi
jne 0x1d05
movl %r8d, 0x54c9(%rip)      # 0x7208
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_emit.c
// Function: emit_finish
ULONG emit_finish(void)
{ // finishes output stream outting (flushes everyth, writes stopping bitcode)

	// write stopping bitcode
	emit_bits(0x60100000,12);

	// fill up last unfinished 'bit'-byte
	while( ob_bits<8 )
	{
		oubuf[ob_bitpos]<<=1;
		ob_bits++;
	}

	// write remaining part of buffer
	if( ob_freepos!=fwrite( oubuf, 1, ob_freepos, file_out ) )  return 0;

	return 1;
}

// Assembly:
movl 0x54ba(%rip), %edi      # 0x7200
movl 0x54b8(%rip), %eax      # 0x7204
movl $0x60100000, %edx       # imm = 0x60100000
movl $0xc, %esi
movl 0x54ab(%rip), %r11d     # 0x7208
leaq 0x539c(%rip), %rcx      # 0x7100
cmpl $0x8, %r11d
jne 0x1d7f
movl %eax, 0x5490(%rip)      # 0x7200
movl %eax, %edi
incl %eax
movl %eax, 0x548a(%rip)      # 0x7204
xorl %r8d, %r8d
jmp 0x1d82
movl %r11d, %r8d
movl %edi, %r9d
movzbl (%r9,%rcx), %r10d
shldl $0x1, %edx, %r10d
movb %r10b, (%r9,%rcx)
leal 0x1(%r8), %r11d
addl %edx, %edx
decl %esi
jne 0x1d64
cmpl $0x7, %r11d
ja 0x1db9
addl $-0x7, %r8d
addb %r10b, %r10b
incl %r8d
jne 0x1da7
movb %r10b, (%r9,%rcx)
movl $0x8, %r11d
pushq %rbx
movl %r11d, 0x5447(%rip)     # 0x7208
movl %eax, %ebx
leaq 0x3306(%rip), %rax      # 0x50d0
movq (%rax), %rcx
leaq 0x532c(%rip), %rdi      # 0x7100
movl $0x1, %esi
movq %rbx, %rdx
callq 0x1130
xorl %ecx, %ecx
cmpq %rbx, %rax
sete %cl
movl %ecx, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_hash.c
// Function: make_hash
void make_hash(void)
{ // makes hash for every byte of input file
  // for position i, hash is from bytes at [i-2],[i-1],[i]
  // first and second bytes does not have valid hash values

	UBYTE curr,prev,prev2;
	ULONG i;

	prev=curr=0;

	for(i=0;i<inlen;i++)
	{
		prev2=(UBYTE)((prev>>1)|(prev<<7));
		prev=(UBYTE)((curr>>1)|(curr<<7));
		curr=indata[i];

		hash[i]=(UBYTE)(prev2^prev^curr);
	}
}

// Assembly:
leaq 0x32ae(%rip), %rax      # 0x50d8
cmpl $0x0, (%rax)
je 0x1e6b
xorl %ecx, %ecx
leaq 0x32a8(%rip), %rdx      # 0x50e0
xorl %esi, %esi
xorl %edi, %edi
movl %esi, %r8d
rorb %r8b
movq (%rdx), %rsi
movb (%rsi,%rcx), %sil
rorb %dil
xorb %r8b, %dil
xorb %sil, %dil
movq 0x53b7(%rip), %r9       # 0x7210
movb %dil, (%r9,%rcx)
incq %rcx
movl (%rax), %r9d
movl %r8d, %edi
cmpq %r9, %rcx
jb 0x1e3c
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_lz.c
// Function: end_lz
void end_lz(void)
{ // ends codes[] array filling by setting stopflag
	codes[codepos].disp=0;
	codes[codepos].length=1;

 if(codepos>=256) printf("end_lz(): overflow!\n");
}

// Assembly:
movl 0x53a3(%rip), %eax      # 0x7220
leaq 0x53ac(%rip), %rcx      # 0x7230
movl $0x1, (%rcx,%rax,4)
cmpq $0x100, %rax            # imm = 0x100
jb 0x1e9f
leaq 0x157e(%rip), %rdi      # 0x3418
jmp 0x1120
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_pack.c
// Function: gen_output
ULONG gen_output(void)
{
	ULONG pos;

	struct lzinfo lz;




	if( !emit_init() )
	{
		printf("gen_output(): emit_init() failed!\n");
		return 0;
	}


	pos=1; // first byte copied to output 'as-is', without LZ coding

	while( pos<inlen )
	{
		// write best code to the output stream
		if( !make_lz_info(indata[pos],&pdata[pos].best,&lz) )
		{
				printf("gen_output(): make_lz_info() failed!\n");
				return 0;
		}

		if( !emit_code(&lz) )
		{
			printf("gen_output(): emit_code() failed!\n");
			return 0;
		}
		pos+=lz.length; // step to the next unpacked byte
	}

	// sanity check
	if( pos>inlen )
	{
		printf("gen_output(): last position is out of input file!\n");
		return 0;
	}





	// just finish all deals
	if( !emit_finish() )
	{
		printf("gen_output(): emit_finish() failed!\n");
		return 0;
	}

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
callq 0x1bfc
testl %eax, %eax
je 0x269d
leaq 0x2a98(%rip), %r14      # 0x50d8
movl (%r14), %eax
movl $0x1, %ebp
cmpl $0x2, %eax
jb 0x2690
leaq 0x2a8c(%rip), %r15      # 0x50e0
leaq 0xc(%rsp), %rbx
movq (%r15), %rax
movl %ebp, %esi
movzbl (%rax,%rsi), %edi
shlq $0x3, %rsi
addq 0x4fc3(%rip), %rsi      # 0x7630
movq %rbx, %rdx
callq 0x1ebf
testl %eax, %eax
je 0x26bf
movq %rbx, %rdi
callq 0x1c32
testl %eax, %eax
je 0x26c8
addl 0xc(%rsp), %ebp
movl (%r14), %eax
cmpl %eax, %ebp
jb 0x2659
cmpl %eax, %ebp
jbe 0x26a6
leaq 0xe4f(%rip), %rdi       # 0x34ea
jmp 0x26cf
leaq 0xe00(%rip), %rdi       # 0x34a4
jmp 0x26cf
callq 0x1d40
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x26d6
leaq 0xe09(%rip), %rdi       # 0x34c6
jmp 0x26cf
leaq 0xe56(%rip), %rdi       # 0x351c
jmp 0x26cf
leaq 0xe72(%rip), %rdi       # 0x3541
callq 0x1120
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_twobyters.c
// Function: free_twobyters
void free_twobyters(void)
{ // free all twobyter-related memory

	struct tb_bunch * tbtmp;

	while( tb_bunches )
	{
		tbtmp=tb_bunches;
		tb_bunches=tb_bunches->next;
		free( tbtmp );
	}
}

// Assembly:
movq 0x4f1e(%rip), %rdi      # 0x7648
testq %rdi, %rdi
je 0x274f
pushq %rax
movq (%rdi), %rax
movq %rax, 0x4f0e(%rip)      # 0x7648
callq 0x10e0
movq 0x4f02(%rip), %rdi      # 0x7648
testq %rdi, %rdi
jne 0x2730
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_twobyters.c
// Function: add_twobyter
ULONG add_twobyter(UBYTE last,UBYTE curr,ULONG curpos)
{ // adds new twobyter to the array of chains

	struct tb_chain * newtb;
	ULONG index;


	index=(((ULONG)last)<<8)+((ULONG)curr);

	newtb=get_free_twobyter();
	if( !newtb )
	{ // no free elements

		// first try to flush current chain
		cutoff_twobyte_chain(index,curpos);

		newtb=get_free_twobyter();
		if( !newtb )
		{ // nothing free - allocate new bunch
			if( !add_bunch_of_twobyters() )
			{
				return 0;
			}

			newtb=get_free_twobyter();
		}
	}



	newtb->next=tb_entry[index];
	tb_entry[index]=newtb;

	newtb->pos=curpos-1; // points to the first byte of given two bytes

	return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %edi, %ebp
shll $0x8, %ebp
orl %esi, %ebp
movq 0x4edd(%rip), %rax      # 0x7640
testq %rax, %rax
jne 0x278d
movl %ebp, %edi
movl %ebx, %esi
callq 0x27d7
movq 0x4ec8(%rip), %rax      # 0x7640
testq %rax, %rax
jne 0x278d
callq 0x284d
testl %eax, %eax
je 0x27bc
movq 0x4eb3(%rip), %rax      # 0x7640
movq (%rax), %rcx
movq %rcx, 0x4ea9(%rip)      # 0x7640
movl %ebp, %ecx
leaq 0x4eb0(%rip), %rdx      # 0x7650
movq (%rdx,%rcx,8), %rsi
movq %rsi, (%rax)
movq %rax, (%rdx,%rcx,8)
decl %ebx
movl %ebx, 0x8(%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
jmp 0x27b5
// File: /workspace/github_c_makefile_star2_O3/salextpuru[P]speccy-toochain/src/megalz/MegaLZ_twobyters.c
// Function: add_bunch_of_twobyters
ULONG add_bunch_of_twobyters(void)
{ // adds a bunch of twobyters to the free list

	ULONG i;
	struct tb_bunch * newbunch;

	// alloc new bunch
	newbunch=(struct tb_bunch *)malloc( sizeof(struct tb_bunch) );
	if( newbunch==NULL ) return 0;

	// link every twobyter into one list
	for(i=0;i<(BUNCHSIZE-1);i++)
	{
		newbunch->bunch[i].next=&(newbunch->bunch[i+1]);
	}

	// add this list to the free list
	newbunch->bunch[BUNCHSIZE-1].next=tb_free;
	tb_free=&(newbunch->bunch[0]);

	// add bunch to bunches list
	newbunch->next=tb_bunches;
	tb_bunches=newbunch;

	return 1;
}

// Assembly:
pushq %rax
movl $0x1008, %edi           # imm = 0x1008
callq 0x10f0
testq %rax, %rax
je 0x2937
movq %rax, %rcx
addq $0x8, %rcx
movdqa 0xd00(%rip), %xmm0      # 0x3570
movl $0x18, %edx
movdqa 0xd03(%rip), %xmm1      # 0x3580
movdqa 0xd0b(%rip), %xmm2      # 0x3590
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
pcmpeqd %xmm4, %xmm4
movdqa 0xd0a(%rip), %xmm5      # 0x35a0
movdqa %xmm0, %xmm6
pxor %xmm1, %xmm6
movdqa %xmm2, %xmm8
pcmpgtd %xmm6, %xmm8
pshufd $0xf5, %xmm6, %xmm7     # xmm7 = xmm6[1,1,3,3]
pcmpeqd %xmm3, %xmm7
pand %xmm8, %xmm7
movdqa %xmm0, %xmm6
psubq %xmm4, %xmm6
movd %xmm7, %esi
testb $0x1, %sil
je 0x28d9
movq %xmm6, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
movq %rsi, -0x10(%rax,%rdx)
pextrw $0x4, %xmm7, %esi
testb $0x1, %sil
je 0x28f9
pshufd $0xee, %xmm6, %xmm6     # xmm6 = xmm6[2,3,2,3]
movq %xmm6, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
movq %rsi, (%rax,%rdx)
paddq %xmm5, %xmm0
addq $0x20, %rdx
cmpq $0x1018, %rdx           # imm = 0x1018
jne 0x2896
movq 0x4d2f(%rip), %rdx      # 0x7640
movq %rdx, 0xff8(%rax)
movq %rcx, 0x4d21(%rip)      # 0x7640
movq 0x4d22(%rip), %rcx      # 0x7648
movq %rcx, (%rax)
movq %rax, 0x4d18(%rip)      # 0x7648
movl $0x1, %eax
jmp 0x2939
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-zoe/lodepng/lodepng.c
// Function: lodepng_get_raw_size_idat
static size_t lodepng_get_raw_size_idat(unsigned w, unsigned h, const LodePNGColorMode* color)
{
  size_t bpp = lodepng_get_bpp(color);
  /* + 1 for the filter byte, and possibly plus padding bits per line */
  size_t line = ((size_t)(w / 8) * bpp) + 1 + ((w & 7) * bpp + 7) / 8;
  return (size_t)h * line;
}

// Assembly:
xorl %eax, %eax
cmpl $0x6, %edx
ja 0xbda6
movl %edx, %eax
leaq 0x2d65(%rip), %rdx      # 0xeb08
movl (%rdx,%rax,4), %eax
imull %ecx, %eax
movl %edi, %ecx
shrl $0x3, %ecx
imulq %rax, %rcx
andl $0x7, %edi
imulq %rax, %rdi
addq $0x7, %rdi
shrq $0x3, %rdi
addq %rdi, %rcx
incq %rcx
movl %esi, %eax
imulq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-zoe/tex-to_image.c
// Function: generatePalettePairs
void generatePalettePairs( unsigned int numPaletteEntries, unsigned char* palette, paletteEntry *paired, unsigned int bpp ) {
	int i, e = 0;
	if( bpp == palMode4bpp ) {
		for( i = 0; i < numPaletteEntries; i++ ) {
			paired[i].red = palette[e];
			e++;
			paired[i].green = palette[e];
			e++;
			paired[i].blue = palette[e];
			e++;
			if( palette[e] >= 0x7F ) paired[i].alpha = 0xFF;
			else if ( palette[e] == 0 ) paired[i].alpha = 0; 
			else paired[i].alpha = (palette[e] + 1)*2;
			e++;
		}
	}
	else if( bpp == palMode8bpp ) {
		for( i = 0; i < numPaletteEntries; i++ ) {
			e = 4 * swizzle(i);
			paired[i].red = palette[e];
			e++;
			paired[i].green = palette[e];
			e++;
			paired[i].blue = palette[e];
			e++;
			if( palette[e] >= 0x7F ) paired[i].alpha = 0xFF;
			else if ( palette[e] == 0 ) paired[i].alpha = 0; 
			else paired[i].alpha = (palette[e] + 1)*2;
			e++;
		}
	}
		return;
}

// Assembly:
testl %ecx, %ecx
je 0xcdcc
cmpl $0x1, %ecx
jne 0xce1f
testl %edi, %edi
je 0xce1f
movl %edi, %eax
xorl %ecx, %ecx
movl $0x8, %edi
movl $0x10, %r8d
movl %ecx, %r9d
shrl $0x3, %r9d
andl $0x3, %r9d
leal (,%r9,8), %r10d
cmpl $0x2, %r9d
cmovel %edi, %r10d
cmpl $0x1, %r9d
cmovel %r8d, %r10d
movl %ecx, %r9d
andl $0x3fffffe7, %r9d       # imm = 0x3FFFFFE7
orl %r10d, %r9d
movb (%rsi,%r9,4), %r10b
movb %r10b, (%rdx,%rcx,4)
movb 0x1(%rsi,%r9,4), %r10b
movb %r10b, 0x1(%rdx,%rcx,4)
movb 0x2(%rsi,%r9,4), %r10b
movb %r10b, 0x2(%rdx,%rcx,4)
movb 0x3(%rsi,%r9,4), %r9b
movb $-0x1, %r10b
cmpb $0x7e, %r9b
ja 0xcdbd
testb %r9b, %r9b
je 0xcdba
addb %r9b, %r9b
addb $0x2, %r9b
movl %r9d, %r10d
jmp 0xcdbd
xorl %r10d, %r10d
movb %r10b, 0x3(%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0xcd4f
jmp 0xce1f
testl %edi, %edi
je 0xce1f
movl %edi, %eax
xorl %ecx, %ecx
movb (%rsi,%rcx,4), %dil
movb %dil, (%rdx,%rcx,4)
movb 0x1(%rsi,%rcx,4), %dil
movb %dil, 0x1(%rdx,%rcx,4)
movb 0x2(%rsi,%rcx,4), %dil
movb %dil, 0x2(%rdx,%rcx,4)
movb 0x3(%rsi,%rcx,4), %dil
movb $-0x1, %r8b
cmpb $0x7e, %dil
ja 0xce12
testb %dil, %dil
je 0xce0f
addb %dil, %dil
addb $0x2, %dil
movl %edi, %r8d
jmp 0xce12
xorl %r8d, %r8d
movb %r8b, 0x3(%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0xcdd4
retq
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/rsa/math.c
// Function: isPrime
int isPrime(long long n)
{
    if (n <= 1)  return 0;
    if (n <= 3)  return 1;

    if (n%2 == 0 || n%3 == 0) return 0;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return 0;

    return 1;
}

// Assembly:
xorl %ecx, %ecx
cmpq $0x2, %rdi
jl 0x13bf
cmpq $0x4, %rdi
jae 0x13c2
movl $0x1, %ecx
movl %ecx, %eax
retq
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
movq %rdi, %rax
mulq %rdx
testb $0x1, %dil
je 0x13bf
shrq %rdx
leaq (%rdx,%rdx,2), %rax
movq %rdi, %rdx
subq %rax, %rdx
je 0x13bf
cmpq $0x19, %rdi
jb 0x13ba
movl $0xb, %esi
leaq -0x6(%rsi), %r8
xorl %ecx, %ecx
movq %rdi, %rax
xorl %edx, %edx
divq %r8
testq %rdx, %rdx
je 0x13bf
leaq -0x4(%rsi), %r8
xorl %ecx, %ecx
movq %rdi, %rax
xorl %edx, %edx
divq %r8
testq %rdx, %rdx
je 0x13bf
movq %rsi, %rax
imulq %rsi, %rax
addq $0x6, %rsi
cmpq %rdi, %rax
jbe 0x13f2
jmp 0x13ba
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/rsa/math.c
// Function: mod_inverse
double mod_inverse(unsigned long a, unsigned long m)
{
  int m0 = m;
  int y = 0, x =1;

  if(m==1)
    return 0;

  while(a>1)
  {
    // q is quotient
    int q = a/m;
    int t = m;

    //m is remainder now, process same as
    //Euclid's algo
    m = a%m, a = t;
    t = y;

    //update y and x
    y = x - q*y;
    x =t;
  }

  //make x positive
  if(x <0)
    x += m0;
  return x;
}

// Assembly:
xorpd %xmm0, %xmm0
cmpq $0x1, %rsi
je 0x14c3
movq %rdi, %rax
cmpq $0x2, %rdi
jb 0x14c4
xorl %r9d, %r9d
movl $0x1, %edi
movq %rsi, %r10
xorl %edx, %edx
divq %r10
movq %rax, %rcx
movl %r9d, %r8d
movslq %r10d, %rax
imull %r9d, %ecx
movl %edi, %r9d
subl %ecx, %r9d
movl %r8d, %edi
movq %rdx, %r10
cmpq $0x1, %rax
ja 0x148d
movl %r8d, %eax
sarl $0x1f, %eax
andl %esi, %eax
addl %r8d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
retq
movsd 0xbbc(%rip), %xmm0      # 0x2088
retq
// File: /workspace/github_c_makefile_star2_O3/dubeyalok7[P]crypto-algo/rsa/math.c
// Function: mod_util
static long long _mod_util(long long a,unsigned long long *buff, long long x, int n)
{
  /* [(a mod n)*(b mod n)] mod n = (a*b)mod n */
  if(x<0)
    return 1;
  if(x<MAX_SIZE){
    if(buff[x]){
      return buff[x];
    }
    else {
      if(x == 0){
        buff[x] = 1;
        return buff[x];
      }
      if(x == 1){
        buff[x] =  a%n;
        return buff[x];
      }
      buff[x] = ((_mod_util(a, buff, x/2, n)*_mod_util(a, buff, x - x/2,n))%(long long)n);
      return buff[x];
    }
  }
  return ((_mod_util(a, buff, x/2, n)*_mod_util(a, buff, x - x/2,n))%(long long)n);
}

// Assembly:
movl $0x1, %eax
testq %rdx, %rdx
js 0x15ad
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0xf9f, %rdx            # imm = 0xF9F
ja 0x1564
movq (%r14,%rbx,8), %rax
testq %rax, %rax
jne 0x159f
cmpq $0x1, %rbx
je 0x15ae
testq %rbx, %rbx
jne 0x15b6
movq $0x1, (%r14,%rbx,8)
movl $0x1, %eax
jmp 0x159f
movq %rbx, %r12
shrq %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x1514
movq %rax, %r13
subq %r12, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x1514
imulq %r13, %rax
movslq %ebp, %rcx
cqto
idivq %rcx
movq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %ebp, %rcx
movq %r15, %rax
jmp 0x15e9
movq %rbx, %r12
shrq %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x1514
movq %rax, %r13
movq %rbx, %rdx
subq %r12, %rdx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %ecx
callq 0x1514
imulq %r13, %rax
movslq %ebp, %rcx
cqto
idivq %rcx
movq %rdx, %rax
movq %rdx, (%r14,%rbx,8)
jmp 0x159f
nop
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/cat/io_test.c
// Function: test_io_write_vector_to_file
void test_io_write_vector_to_file(void) {
	Vector vec = vector_create(0, NULL);
	vector_insert_last(vec, "foo");
	vector_insert_last(vec, "bar");

	// δημιουργία ενός προσωρινού αρχείου
	TEST_ASSERT(io_write_vector_to_file("io_tests_temp", vec) > 0);

	vector_destroy(vec);
}

// Assembly:
pushq %rbx
xorl %edi, %edi
xorl %esi, %esi
callq 0x4548
movq %rax, %rbx
leaq 0x1630(%rip), %rsi      # 0x5318
movq %rax, %rdi
callq 0x4619
leaq 0x1625(%rip), %rsi      # 0x531c
movq %rbx, %rdi
callq 0x4619
leaq 0x161a(%rip), %rdi      # 0x5320
movq %rbx, %rsi
callq 0x4508
xorl %edi, %edi
testl %eax, %eax
setg %dil
leaq 0x1611(%rip), %rsi      # 0x532e
leaq 0x1795(%rip), %rcx      # 0x54b9
leaq 0x160d(%rip), %r8       # 0x5338
movl $0x13, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x3d44
movq %rbx, %rdi
popq %rbx
jmp 0x4735
callq 0x2e5b
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/programs/cat/io_test.c
// Function: test_io_read_file_as_vector
void test_io_read_file_as_vector(void) {
	Vector vec = io_read_file_as_vector("io_tests_temp");
	TEST_ASSERT(vec != NULL);

	TEST_ASSERT(strcmp(vector_get_at(vec, 0), "foo") == 0);
	TEST_ASSERT(strcmp(vector_get_at(vec, 1), "bar") == 0);

	// διαγραφή του προσωρινού αρχείου
	remove("io_tests_temp");

	TEST_ASSERT(io_read_file_as_vector("a_file_that_doesnt_exist") == NULL);

	vector_destroy(vec);
}

// Assembly:
pushq %rbx
leaq 0x15cf(%rip), %rdi      # 0x5320
callq 0x4465
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
setne %dil
leaq 0x15c5(%rip), %rsi      # 0x532e
leaq 0x1749(%rip), %rcx      # 0x54b9
leaq 0x15f3(%rip), %r8       # 0x536a
movl $0x1a, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x3e6d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x458c
leaq 0x157c(%rip), %rsi      # 0x5318
movq %rax, %rdi
callq 0x2190
xorl %edi, %edi
testl %eax, %eax
sete %dil
leaq 0x157b(%rip), %rsi      # 0x532e
leaq 0x16ff(%rip), %rcx      # 0x54b9
leaq 0x15b5(%rip), %r8       # 0x5376
movl $0x1c, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x3e6d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x458c
leaq 0x1533(%rip), %rsi      # 0x531c
movq %rax, %rdi
callq 0x2190
xorl %edi, %edi
testl %eax, %eax
sete %dil
leaq 0x152e(%rip), %rsi      # 0x532e
leaq 0x16b2(%rip), %rcx      # 0x54b9
leaq 0x1592(%rip), %r8       # 0x53a0
movl $0x1d, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x3e6d
leaq 0x14fb(%rip), %rdi      # 0x5320
callq 0x2070
leaq 0x1599(%rip), %rdi      # 0x53ca
callq 0x4465
xorl %edi, %edi
testq %rax, %rax
sete %dil
leaq 0x14e8(%rip), %rsi      # 0x532e
leaq 0x166c(%rip), %rcx      # 0x54b9
leaq 0x158f(%rip), %r8       # 0x53e3
movl $0x22, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x3e6d
movq %rbx, %rdi
popq %rbx
jmp 0x4735
callq 0x2e5b
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch2/eatyguy1.c
// Function: set_color
int set_color(lua_State *L) {
  int color = lua_tonumber(L, 1);
  char cmd[1024];
  snprintf(cmd, 1024, "tput setab %d", color);
  system(cmd);
  return 0;  // 0 is the number of Lua-visible return values.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl $0x1, %esi
xorl %edx, %edx
callq 0x4f06
cvttsd2si %xmm0, %ecx
leaq 0x1c855(%rip), %rdx     # 0x21004
leaq -0x410(%rbp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4170
movq %rbx, %rdi
callq 0x4140
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch2/eatyguy1.c
// Function: main
int main() {

  // Create a Lua state and load the module.
  lua_State *L = luaL_newstate();
  luaL_openlibs(L);
  luaL_dofile(L, "eatyguy1.lua");
  lua_setglobal(L, "eatyguy");
  lua_settop(L, 0);

  // Make the set_color function visible to Lua.
  lua_pushcfunction(L, set_color);
  lua_setglobal(L, "set_color");

  // Run the init() function.
  lua_getglobal(L, "eatyguy");
  lua_getfield(L, -1, "init");  // -1 means stack top.
  lua_call(L, 0, 0);            // 0, 0 = #args, #retvals

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x14b29
movq %rax, %rbx
movq %rax, %rdi
callq 0x14d2c
leaq 0x1c81b(%rip), %rsi     # 0x21012
movq %rbx, %rdi
xorl %edx, %edx
callq 0x14282
testl %eax, %eax
jne 0x481c
movq %rbx, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5c47
leaq 0x1c7fc(%rip), %r14     # 0x2101f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5764
movq %rbx, %rdi
xorl %esi, %esi
callq 0x49c5
leaq -0xb3(%rip), %rsi       # 0x478c
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5320
leaq 0x1c7d7(%rip), %rsi     # 0x21027
movq %rbx, %rdi
callq 0x5764
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53ef
leaq 0x1c7c7(%rip), %rdx     # 0x21031
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x550d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5bdf
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/display_square_mlx.c
// Function: display_square_mlx
void	display_square_mlx(t_map *map, int y, int x)
{
	if (map->map[y][x] == 'W' || map->map[y][x] == 'S' ||
	map->map[y][x] == 'N' || map->map[y][x] == 'E')
	{
		map->player.pos_x = x + 0.5;
		map->player.pos_y = y + 0.5;
		map->map[y][x] = '0';
	}
	if (map->map[y][x] == '2')
	{
		map->nbr_sprites += 1;
		if (ft_list_push_front(&map->sprite, x, y) == -1)
		{
			ft_error5(52);
			ft_exit(map);
		}
	}
}

// Assembly:
pushq %rbx
movl %esi, %eax
movq %rdi, %rbx
movq (%rdi), %rsi
movslq %eax, %rcx
movq (%rsi,%rcx,8), %rdi
movslq %edx, %rsi
movzbl (%rdi,%rsi), %r8d
movl %r8d, %r9d
addl $-0x45, %r9d
cmpl $0x12, %r9d
ja 0x75bc
movl $0x44201, %r10d         # imm = 0x44201
btl %r9d, %r10d
jae 0x75bc
movd %ecx, %xmm0
movd %esi, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2pd %xmm1, %xmm0
addpd 0x7a6b(%rip), %xmm0     # 0xf010
movupd %xmm0, 0x98(%rbx)
movb $0x30, (%rdi,%rsi)
movq (%rbx), %rdi
movq (%rdi,%rcx,8), %rcx
movb (%rcx,%rsi), %r8b
cmpb $0x32, %r8b
jne 0x75dd
incl 0x178(%rbx)
leaq 0x158(%rbx), %rdi
movl %edx, %esi
movl %eax, %edx
callq 0x83fc
cmpl $-0x1, %eax
je 0x75df
popq %rbx
retq
movl $0x34, %edi
callq 0x8150
movq %rbx, %rdi
popq %rbx
jmp 0x81f4
nop
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/free_img_text.c
// Function: free_img_text
int	free_img_text(t_map *map)
{
	mlx_destroy_image(map->mlx.mlx, map->img_s);
	mlx_destroy_image(map->mlx.mlx, map->img_n);
	mlx_destroy_image(map->mlx.mlx, map->img_w);
	mlx_destroy_image(map->mlx.mlx, map->img_e);
	mlx_destroy_image(map->mlx.mlx, map->img_sp);
	return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rsi
movq 0x80(%rdi), %rdi
callq 0xe5f0
movq 0x30(%rbx), %rsi
movq 0x80(%rbx), %rdi
callq 0xe5f0
movq 0x38(%rbx), %rsi
movq 0x80(%rbx), %rdi
callq 0xe5f0
movq 0x40(%rbx), %rsi
movq 0x80(%rbx), %rdi
callq 0xe5f0
movq 0x48(%rbx), %rsi
movq 0x80(%rbx), %rdi
callq 0xe5f0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_inside_line.c
// Function: ft_check_inside_line
int	ft_check_inside_line(char *line, t_map *map)
{
	if (line[0] == '1')
		return (8);
	if (map->line_map != 0)
		return (-1);
	if (line[0] == 'R')
		return (0);
	if (line[0] == 'N' && line[1] == 'O')
		return (1);
	if (line[0] == 'S' && line[1] == 'O')
		return (2);
	if (line[0] == 'W' && line[1] == 'E')
		return (3);
	if (line[0] == 'E' && line[1] == 'A')
		return (4);
	if (line[0] == 'S')
		return (5);
	if (line[0] == 'F')
		return (6);
	if (line[0] == 'C')
		return (7);
	if (line[0] == '\0')
		return (9);
	return (-1);
}

// Assembly:
movzbl (%rdi), %ecx
movl $0x8, %eax
cmpl $0x31, %ecx
je 0x768c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%rsi)
je 0x768d
retq
cmpl $0x45, %ecx
jg 0x76ad
testl %ecx, %ecx
je 0x76d2
cmpl $0x43, %ecx
je 0x76d8
cmpl $0x45, %ecx
jne 0x76f4
movl $0x4, %eax
cmpb $0x41, 0x1(%rdi)
je 0x768c
jmp 0x76f4
leal -0x4e(%rcx), %eax
cmpl $0x9, %eax
ja 0x76de
leaq 0x7964(%rip), %rcx      # 0xf020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %eax
cmpb $0x4f, 0x1(%rdi)
je 0x768c
jmp 0x76f4
movl $0x9, %eax
retq
movl $0x7, %eax
retq
cmpl $0x46, %ecx
jne 0x76f4
movl $0x6, %eax
retq
movl $0x3, %eax
cmpb $0x45, 0x1(%rdi)
je 0x768c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
retq
xorl %eax, %eax
cmpb $0x4f, 0x1(%rdi)
setne %al
leal (%rax,%rax,2), %eax
addl $0x2, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_line.c
// Function: ft_check_line
int	ft_check_line(t_map *map, char *line)
{
	int	i;
	int	index;
	int	((*ptr[9])(t_map *map, char *line, int i));

	index = -1;
	i = -1;
	ft_init_ptr(ptr);
	while (line[++i] && line[i] == ' ')
		;
	index = ft_check_inside_line(line + i, map);
	if (index == -1 && ft_free(line) == NULL)
		return (ft_error4(40) + 1);
	if (index != 9)
		return (ptr[index](map, line, -1));
	return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
callq 0x8398
leaq -0x1(%rbx), %rdi
cmpb $0x20, 0x1(%rdi)
leaq 0x1(%rdi), %rdi
je 0x774a
movq %r14, %rsi
callq 0x7674
cmpl $0x9, %eax
je 0x7788
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x7775
movq %rbx, %rdi
callq 0xa39b
testq %rax, %rax
je 0x778c
movslq %ebp, %rax
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq *(%rsp,%rax,8)
jmp 0x7798
xorl %eax, %eax
jmp 0x7798
movl $0x28, %edi
callq 0x8128
incl %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_line_map1.c
// Function: ft_check_line_map1
int	ft_check_line_map1(char *str, t_map *map)
{
	int	i;
	int	max;

	i = -1;
	while (str[++i])
		;
	max = i - 1;
	i = -1;
	while (str[++i] && i < max)
	{
		if (str[i] != '1' && str[i] != '0' && str[i] != 'N' && str[i] != 'S' &&
			str[i] != 'E' && str[i] != 'W' && str[i] != '2' &&
			ft_free(str) == NULL)
			return (ft_error4(42) + 1);
		if (str[i] == 'E' || str[i] == 'N' || str[i] == 'S' || str[i] == 'W')
		{
			if (map->orientation != '0' && ft_free(str) == NULL)
				return (ft_error4(43) + 1);
			map->orientation = str[i];
		}
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movabsq $-0x200000000, %r15     # imm = 0xFFFFFFFE00000000
movq $-0x2, %rcx
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r15
cmpb $0x0, 0x2(%r14,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x77d0
movb (%r14), %sil
testb %sil, %sil
sete %dl
testq %rcx, %rcx
setle %cl
xorl %eax, %eax
orb %dl, %cl
jne 0x7895
sarq $0x20, %r15
movl $0x1, %r12d
movl $0x44201, %r13d         # imm = 0x44201
movabsq $0x8840200007, %rbp     # imm = 0x8840200007
movzbl %sil, %ecx
addl $-0x30, %ecx
cmpl $0x27, %ecx
ja 0x786a
btq %rcx, %rbp
jae 0x786a
movzbl %sil, %ecx
addl $-0x45, %ecx
cmpl $0x12, %ecx
ja 0x7852
btl %ecx, %r13d
jae 0x7852
cmpb $0x30, 0x10(%rbx)
je 0x784e
movq %r14, %rdi
callq 0xa39b
testq %rax, %rax
je 0x7882
movb -0x1(%r14,%r12), %sil
movb %sil, 0x10(%rbx)
movb (%r14,%r12), %sil
testb %sil, %sil
je 0x787e
leaq 0x1(%r12), %rcx
cmpq %r15, %r12
movq %rcx, %r12
jl 0x7812
jmp 0x787e
movq %r14, %rdi
callq 0xa39b
testq %rax, %rax
je 0x7889
movb -0x1(%r14,%r12), %sil
jmp 0x7824
xorl %eax, %eax
jmp 0x7895
movl $0x2b, %edi
jmp 0x788e
movl $0x2a, %edi
callq 0x8128
incl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_malloc.c
// Function: ft_check_malloc
int	ft_check_malloc(t_map *map)
{
	if (map->first_map != NULL)
		ft_free(map->first_map);
	if (map->north_text != NULL)
		ft_free(map->north_text);
	if (map->south_text != NULL)
		ft_free(map->south_text);
	if (map->west_text != NULL)
		ft_free(map->west_text);
	if (map->east_text != NULL)
		ft_free(map->east_text);
	if (map->sprite_text != NULL)
		ft_free(map->sprite_text);
	if (map->map != NULL)
		ft_free2(map->map, map->line_map);
	if (map != NULL)
		ft_free(map);
	return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x78b6
callq 0xa39b
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x78c4
callq 0xa39b
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x78d2
callq 0xa39b
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x78e0
callq 0xa39b
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x78ee
callq 0xa39b
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x78fc
callq 0xa39b
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x790c
movl 0x14(%rbx), %esi
callq 0x82d8
movq %rbx, %rdi
callq 0xa39b
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_map2.c
// Function: ft_check_map2
int	ft_check_map2(char **tab)
{
	int	i;
	int	count;

	count = 0;
	i = -1;
	while (tab[count][++i])
		if (tab[count][i] != '1')
			return (1);
	while (tab[++count + 1] != NULL)
		if (ft_check_map_strcmp(tab[count - 1], tab[count]) == 1)
			return (1);
	count = 0;
	while (tab[++count + 1] != NULL)
		if (ft_check_map_strcmp(tab[count], tab[count - 1]) == 1)
			return (1);
	i = -1;
	while (tab[count][++i])
		if (tab[count][i] != '1')
			return (1);
	return (0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %ecx
incq %rax
cmpl $0x31, %ecx
je 0x7922
testl %ecx, %ecx
jne 0x7993
leaq 0x10(%rbx), %r14
cmpq $0x0, (%r14)
je 0x7953
movq -0x10(%r14), %rdi
movq -0x8(%r14), %rsi
callq 0x7a60
addq $0x8, %r14
cmpl $0x1, %eax
jne 0x7935
jmp 0x7993
movl $0x1, %r14d
cmpq $0x0, 0x8(%rbx,%r14,8)
je 0x7979
movq -0x8(%rbx,%r14,8), %rsi
movq (%rbx,%r14,8), %rdi
callq 0x7a60
incq %r14
cmpl $0x1, %eax
jne 0x7959
jmp 0x7993
movl %r14d, %eax
movq (%rbx,%rax,8), %rax
movzbl (%rax), %ecx
incq %rax
cmpl $0x31, %ecx
je 0x7980
testl %ecx, %ecx
jne 0x7993
xorl %eax, %eax
jmp 0x7998
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_map_and_recup.c
// Function: ft_check_map_and_recup
int	ft_check_map_and_recup(t_map *map, char *file)
{
	int		fd;
	char	*line;
	int		i;
	int		ret;

	ret = 0;
	i = 0;
	if ((fd = open(file, O_RDONLY)) == -1)
		return (ft_error(4) + 1);
	while ((ret = get_next_line(fd, &line)) > 0)
	{
		if (ft_check_line(map, line) == 1)
			return (1);
		free(line);
	}
	if (ret == -1)
		return (ft_error4(44) + 1);
	if (line != NULL)
		free(line);
	if (close(fd) == -1)
		return (ft_error(5) + 1);
	if (ft_finnish_check_split(map) == 1)
		return (1);
	return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x7400
cmpl $-0x1, %eax
je 0x7a31
movl %eax, %ebp
leaq 0x8(%rsp), %rsi
movl %eax, %edi
callq 0xa3c1
testl %eax, %eax
jle 0x79fd
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7730
cmpl $0x1, %eax
je 0x7a38
movq 0x8(%rsp), %rdi
callq 0x7180
movl %ebp, %edi
movq %r14, %rsi
callq 0xa3c1
testl %eax, %eax
jg 0x79d3
cmpl $-0x1, %eax
je 0x7a3f
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7a11
callq 0x7180
movl %ebp, %edi
callq 0x7040
cmpl $-0x1, %eax
je 0x7a4b
movq %rbx, %rdi
callq 0x824c
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sete %al
jmp 0x7a57
movl $0x4, %edi
jmp 0x7a50
movl $0x1, %eax
jmp 0x7a57
movl $0x2c, %edi
callq 0x8128
jmp 0x7a55
movl $0x5, %edi
callq 0x81d0
incl %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_check_map_strcmp.c
// Function: ft_check_map_strcmp
int	ft_check_map_strcmp(char *s1, char *s2)
{
	int	i;
	int	j;

	i = -1;
	while (s1[++i] && s2[i])
		;
	--i;
	j = i;
	if (s2[i] == '0')
		return (1);
	while (s2[++i])
		if (s2[i] != '1')
			return (1);
	while (s1[++j])
		if (s1[j] != '1')
			return (1);
	return (0);
}

// Assembly:
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rsi, %r10
movq %rdi, %rcx
movq %r10, %rdx
movq %r9, %r8
cmpb $0x0, (%rdi)
je 0x7a96
leaq 0x1(%rcx), %rdi
leaq 0x1(%rdx), %r10
leaq (%r8,%rax), %r9
cmpb $0x0, (%rdx)
jne 0x7a77
sarq $0x20, %r8
movl $0x1, %eax
cmpb $0x30, (%rsi,%r8)
je 0x7ac6
movzbl (%rdx), %esi
incq %rdx
cmpl $0x31, %esi
je 0x7aa6
testl %esi, %esi
jne 0x7ac6
movzbl (%rcx), %edx
incq %rcx
cmpl $0x31, %edx
je 0x7ab5
testl %edx, %edx
jne 0x7ac6
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/raphifou15[P]cub3d/src/ft_cub3d2.c
// Function: ft_cub3d2
void	ft_cub3d2(t_map *map, int y, int x)
{
	while (map->map[++y])
	{
		x = -1;
		while (map->map[y][++x])
			display_square_mlx(map, y, x);
	}
	if (map->argc == 3)
		return (ft_global_save(map));
	mlx_hook(map->mlx.win, 2, 1L << 0, key_pressed, map);
	mlx_hook(map->mlx.win, 3, 1L << 1, key_release, map);
	mlx_hook(map->mlx.win, 33, 1L << 17, &mlx_loop_end, map->mlx.mlx);
	mlx_loop_hook(map->mlx.mlx, next_frame, map);
	mlx_loop(map->mlx.mlx);
	free_img_text(map);
	ft_sprite_clear(map->sprite);
	mlx_destroy_window(map->mlx.mlx, map->mlx.win);
	mlx_destroy_display(map->mlx.mlx);
	free(map->mlx.mlx);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movslq %esi, %r14
movq 0x8(%rax,%r14,8), %rcx
testq %rcx, %rcx
je 0x7b95
incq %r14
cmpb $0x0, (%rcx)
je 0x7b88
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x755c
movq (%rbx), %rax
movq (%rax,%r14,8), %rcx
cmpb $0x0, 0x1(%rcx,%r15)
leaq 0x1(%r15), %r15
jne 0x7b67
movq 0x8(%rax,%r14,8), %rcx
incq %r14
testq %rcx, %rcx
jne 0x7b5f
cmpl $0x3, 0x17c(%rbx)
jne 0x7bab
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8330
movq 0x88(%rbx), %rdi
leaq 0x2f58(%rip), %rcx      # 0xab11
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %r8
callq 0xe5a0
movq 0x88(%rbx), %rdi
leaq 0x2fe1(%rip), %rcx      # 0xabba
movl $0x3, %esi
movl $0x2, %edx
movq %rbx, %r8
callq 0xe5a0
movq 0x80(%rbx), %r8
movq 0x88(%rbx), %rdi
leaq 0x3ab0(%rip), %rcx      # 0xb6b0
movl $0x21, %esi
movl $0x20000, %edx          # imm = 0x20000
callq 0xe5a0
movq 0x80(%rbx), %rdi
leaq 0x33ab(%rip), %rsi      # 0xafc8
movq %rbx, %rdx
callq 0xb7d0
movq 0x80(%rbx), %rdi
callq 0xb6c0
movq %rbx, %rdi
callq 0x75f4
movq 0x158(%rbx), %rdi
callq 0x9f74
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
callq 0xe040
movq 0x80(%rbx), %rdi
callq 0xe6e0
movq 0x80(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7180
nopl (%rax)