LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/citrusleaf/cf_queue.c
// Function: cf_queue_delete
int
cf_queue_delete(cf_queue *q, const void *ptr, bool only_one)
{
	cf_queue_lock(q);

	bool found = false;

	if (CF_Q_SZ(q) != 0) {
		for (uint32_t i = q->read_offset; i < q->write_offset; i++) {
			int rv = 0;

			// If buf is null, rv is always 0 and we delete all elements.
			if (ptr) {
				rv = memcmp(CF_Q_ELEM_PTR(q, i), ptr, q->element_sz);
			}

			if (rv == 0) {
				cf_queue_delete_offset(q, i);
				found = true;

				if (only_one) {
					break;
				}
			}
		}
	}

	cf_queue_unlock(q);
	return found ? CF_QUEUE_OK : CF_QUEUE_EMPTY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, (%rdi)
jne 0x170e4
leaq 0x20(%rbx), %rdi
callq 0x8ad0
movl 0x8(%rbx), %r15d
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
cmpl %r15d, 0xc(%rbx)
je 0x17153
cmpl 0xc(%rbx), %r15d
jae 0x17153
xorb $0x1, %bpl
xorl %r12d, %r12d
testq %r14, %r14
je 0x1712a
movl %r15d, %eax
xorl %edx, %edx
divl 0x4(%rbx)
movl %edx, %edi
movq 0x18(%rbx), %rdx
imulq %rdx, %rdi
addq 0x78(%rbx), %rdi
movq %r14, %rsi
callq 0x8770
movb $0x1, %cl
testl %eax, %eax
jne 0x1713a
movq %rbx, %rdi
movl %r15d, %esi
callq 0x8320
movb $0x1, %r12b
movl %ebp, %ecx
testb %cl, %cl
je 0x17147
incl %r15d
cmpl 0xc(%rbx), %r15d
jb 0x17101
movzbl %r12b, %eax
andl $0x1, %eax
leal -0x2(%rax,%rax), %r12d
cmpb $0x1, (%rbx)
jne 0x17164
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x8630
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_get_rand_buf
int
cf_get_rand_buf(uint8_t *buf, int len)
{
	if ((uint32_t)len >= sizeof(rand_buf))  return(-1);

	pthread_mutex_lock(&rand_buf_lock);

	if (rand_buf_off < (uint32_t)len ) {
		if (-1 == cf_rand_reload()) {
			pthread_mutex_unlock(&rand_buf_lock);
			return(-1);
		}
	}

	rand_buf_off -= len;
	memcpy(buf, &rand_buf[rand_buf_off] ,len);

	pthread_mutex_unlock(&rand_buf_lock);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpl $0x1fff, %esi           # imm = 0x1FFF
ja 0x171e2
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x9466(%rip), %rdi      # 0x20600
callq 0x8ad0
cmpl %ebp, 0x9483(%rip)      # 0x20628
jae 0x171b1
callq 0x171f2
cmpl $-0x1, %eax
je 0x171ea
movl 0x9471(%rip), %eax      # 0x20628
subl %ebp, %eax
movl %eax, 0x9469(%rip)      # 0x20628
leaq 0x946a(%rip), %rsi      # 0x20630
addq %rax, %rsi
movl %ebp, %edx
movq %rbx, %rdi
callq 0x85c0
xorl %r14d, %r14d
leaq 0x9423(%rip), %rdi      # 0x20600
callq 0x8630
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x171d6
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_rand_reload
static int
cf_rand_reload(void)
{
	if (seeded == 0) {
		int rfd = open("/dev/urandom", O_RDONLY);

		if (rfd < 0) {
#if ! defined ENHANCED_ALLOC
			as_log_error("Failed to open '/dev/urandom'");
#endif

			return -1;
		}

		int rsz = (int)read(rfd, rand_buf, SEED_SZ);

		if (rsz < SEED_SZ) {
#if ! defined ENHANCED_ALLOC
			as_log_error("Failed to seed random number generator");
#endif
			close(rfd);

			return -1;
		}

		close(rfd);
		RAND_seed(rand_buf, rsz);
		seeded = 1;
	}

	if (RAND_bytes(rand_buf, sizeof(rand_buf)) != 1) {
#if ! defined ENHANCED_ALLOC
		as_log_error("Failed to reload random buffer");
#endif
		return -1;
	}

	rand_buf_off = sizeof(rand_buf);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0xb433(%rip)      # 0x22630
jne 0x172cb
leaq 0x26ea(%rip), %rdi      # 0x198f4
xorl %esi, %esi
xorl %eax, %eax
callq 0x8840
testl %eax, %eax
js 0x17277
movl %eax, %ebx
leaq 0x9410(%rip), %rsi      # 0x20630
movl $0x40, %edx
movl %eax, %edi
callq 0x8460
movq %rax, %r14
cmpl $0x3f, %r14d
jg 0x172ae
movq 0x8d84(%rip), %rax      # 0x1ffc0
movq 0x8(%rax), %r9
testq %r9, %r9
je 0x17266
leaq 0x26b5(%rip), %rsi      # 0x19901
leaq 0x26bd(%rip), %rdx      # 0x19910
leaq 0x26f4(%rip), %r8       # 0x1994e
xorl %edi, %edi
movl $0x37, %ecx
xorl %eax, %eax
callq *%r9
movl %ebx, %edi
callq 0x8430
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x17325
movq 0x8d42(%rip), %rax      # 0x1ffc0
movq 0x8(%rax), %r9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r9, %r9
je 0x17325
leaq 0x266a(%rip), %rsi      # 0x19901
leaq 0x2672(%rip), %rdx      # 0x19910
leaq 0x268b(%rip), %r8       # 0x19930
xorl %edi, %edi
movl $0x2d, %ecx
jmp 0x17320
movl %ebx, %edi
callq 0x8430
leaq 0x9374(%rip), %rdi      # 0x20630
movl %r14d, %esi
callq 0x8140
movb $0x1, 0xb365(%rip)      # 0x22630
leaq 0x935e(%rip), %rdi      # 0x20630
movl $0x2000, %esi           # imm = 0x2000
callq 0x8280
cmpl $0x1, %eax
jne 0x172ef
movl $0x2000, 0x933d(%rip)   # imm = 0x2000
xorl %ebx, %ebx
jmp 0x17325
movq 0x8cca(%rip), %rax      # 0x1ffc0
movq 0x8(%rax), %r9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r9, %r9
je 0x17325
leaq 0x25f6(%rip), %rsi      # 0x19901
leaq 0x25fe(%rip), %rdx      # 0x19910
leaq 0x265c(%rip), %r8       # 0x19975
xorl %edi, %edi
movl $0x45, %ecx
xorl %eax, %eax
callq *%r9
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_get_rand64
uint64_t
cf_get_rand64(void)
{
	pthread_mutex_lock(&rand_buf_lock);

	if (rand_buf_off < sizeof(uint64_t) ) {
		if (cf_rand_reload() == -1) {
			pthread_mutex_unlock(&rand_buf_lock);
			return 0;
		}
	}

	rand_buf_off -= sizeof(uint64_t);

	uint64_t r = *(uint64_t *) (&rand_buf[rand_buf_off]);

	pthread_mutex_unlock(&rand_buf_lock);

	return r;
}

// Assembly:
pushq %rbx
leaq 0x92c9(%rip), %rdi      # 0x20600
callq 0x8ad0
cmpl $0x7, 0x92e5(%rip)      # 0x20628
ja 0x1734f
callq 0x171f2
cmpl $-0x1, %eax
je 0x1737a
movl 0x92d3(%rip), %eax      # 0x20628
addl $-0x8, %eax
movl %eax, 0x92ca(%rip)      # 0x20628
leaq 0x92cb(%rip), %rcx      # 0x20630
movq (%rax,%rcx), %rbx
leaq 0x9290(%rip), %rdi      # 0x20600
callq 0x8630
movq %rbx, %rax
popq %rbx
retq
xorl %ebx, %ebx
jmp 0x17369
// File: /workspace/github_c_makefile_star2_O1/aerospike[P]aerospike-common/src/main/citrusleaf/cf_random.c
// Function: cf_get_rand32
uint32_t
cf_get_rand32(void)
{
	pthread_mutex_lock(&rand_buf_lock);

	if (rand_buf_off < sizeof(uint64_t) ) {
		if (cf_rand_reload() == -1) {
			pthread_mutex_unlock(&rand_buf_lock);
			return 0;
		}
	}

	rand_buf_off -= sizeof(uint64_t);

	uint64_t r = *(uint64_t *) (&rand_buf[rand_buf_off]);

	pthread_mutex_unlock(&rand_buf_lock);

	return (uint32_t)r;
}

// Assembly:
pushq %rbx
leaq 0x927a(%rip), %rdi      # 0x20600
callq 0x8ad0
cmpl $0x7, 0x9296(%rip)      # 0x20628
ja 0x1739e
callq 0x171f2
cmpl $-0x1, %eax
je 0x173c7
movl 0x9284(%rip), %eax      # 0x20628
addl $-0x8, %eax
movl %eax, 0x927b(%rip)      # 0x20628
leaq 0x927c(%rip), %rcx      # 0x20630
movl (%rax,%rcx), %ebx
leaq 0x9242(%rip), %rdi      # 0x20600
callq 0x8630
movl %ebx, %eax
popq %rbx
retq
leaq 0x9232(%rip), %rdi      # 0x20600
callq 0x8630
xorl %ebx, %ebx
jmp 0x173c3
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: str2int
char str2int(char c)
{
        switch (c)
        {
                case 'A':
                        return 0;
                case 'C':
                        return 1;
                case 'G':
                        return 2;
                case 'T':
                        return 3;
        }
        return 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x46, %edi
jg 0x12f3
cmpl $0x41, %edi
je 0x1305
cmpl $0x43, %edi
jne 0x1301
movb $0x1, %al
jmp 0x130b
cmpl $0x47, %edi
je 0x1309
cmpl $0x54, %edi
jne 0x1301
movb $0x3, %al
jmp 0x130b
movb $0x4, %al
jmp 0x130b
xorl %eax, %eax
jmp 0x130b
movb $0x2, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: generate
void generate(char *seq,char out[],int pos,int length)
{
	int i;
	for(i=0;i<length;i++)
	{
		out[i]=seq[pos+i];
	}
	out[i]='\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %ecx, %ecx
jle 0x98b2
movslq %edx, %rax
movl %ecx, %ecx
addq %rax, %rdi
xorl %eax, %eax
movb (%rdi,%rax), %dl
movb %dl, (%rsi,%rax)
incq %rax
cmpq %rax, %rcx
jne 0x98a2
jmp 0x98b4
xorl %eax, %eax
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: gc
float gc(char seq[],int length)
{
	int i,number;
	float gc;

	number=0;
	for(i=0;i<length;i++)
	{
		if(seq[i]=='C')
		{
			number++;
			continue;
		}
	
		if(seq[i]=='G')
		{
			number++;
		}
	}

	gc=1.0*number/length*100;
	return gc;
}

// Assembly:
testl %esi, %esi
jle 0x98e5
movl %esi, %eax
xorl %ecx, %ecx
xorl %edx, %edx
movzbl (%rdi,%rcx), %r8d
cmpl $0x47, %r8d
je 0x98d5
cmpl $0x43, %r8d
jne 0x98d7
incl %edx
incq %rcx
cmpq %rcx, %rax
jne 0x98c4
cvtsi2sd %edx, %xmm0
jmp 0x98e9
xorpd %xmm0, %xmm0
pushq %rbp
movq %rsp, %rbp
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
mulsd 0x277b(%rip), %xmm0     # 0xc078
cvtsd2ss %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: translate
int translate(char a)
{
	if(a=='A')
		return 0;
	if(a=='T')
		return 1;
	if(a=='C')
		return 2;
	return 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x41, %edi
je 0x9924
cmpl $0x43, %edi
je 0x991d
cmpl $0x54, %edi
jne 0x9928
movl $0x1, %eax
jmp 0x992d
movl $0x2, %eax
jmp 0x992d
xorl %eax, %eax
jmp 0x992d
movl $0x3, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: tm
float tm(char seq[],float deltah[],float deltas[],int length)
{
	int i,pos;
	float total_deltah,total_deltas,result;

	total_deltah=0;
	total_deltas=0;
	for(i=0;i<length-1;i++)
	{
		pos=translate(seq[i]);
		pos=pos*4+translate(seq[i+1]);
		total_deltah+=deltah[pos];
		total_deltas+=deltas[pos];
	}

	total_deltah=(-1.0)*total_deltah;
	total_deltas=(-1.0)*total_deltas;
	if((seq[0]=='A')||(seq[0]=='T'))
	{
		total_deltah+=2.3;
		total_deltas+=4.1;
	}
	else
	{
		total_deltah+=0.1;
		total_deltas-=2.8;
	}
        if((seq[length-1]=='A')||(seq[length-1]=='T'))
        {
                total_deltah+=2.3;
                total_deltas+=4.1;
        }
        else
        {
                total_deltah+=0.1;
                total_deltas-=2.8;
        }
	result=1000.0*total_deltah/(total_deltas-0.6656578*(length-1)-36.1585064)-273.15;
	return result;
}

// Assembly:
leal -0x1(%rcx), %eax
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
cmpl $0x2, %ecx
jl 0x99c6
movl %eax, %ecx
xorl %r8d, %r8d
movzbl (%rdi,%r8), %r9d
cmpl $0x41, %r9d
je 0x996d
cmpl $0x43, %r9d
je 0x9965
cmpl $0x54, %r9d
jne 0x9972
movl $0x4, %r9d
jmp 0x9978
movl $0x8, %r9d
jmp 0x9978
xorl %r9d, %r9d
jmp 0x9978
movl $0xc, %r9d
movzbl 0x1(%rdi,%r8), %r10d
cmpl $0x41, %r10d
je 0x99a0
cmpl $0x43, %r10d
je 0x9998
cmpl $0x54, %r10d
jne 0x99a5
movl $0x1, %r10d
jmp 0x99ab
movl $0x2, %r10d
jmp 0x99ab
xorl %r10d, %r10d
jmp 0x99ab
movl $0x3, %r10d
orl %r9d, %r10d
shll $0x2, %r10d
addss (%rsi,%r10), %xmm1
incq %r8
addss (%rdx,%r10), %xmm0
cmpq %r8, %rcx
jne 0x9946
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %ecx
movsd 0x26bb(%rip), %xmm2     # 0xc090
movsd 0x26bb(%rip), %xmm3     # 0xc098
movapd %xmm3, %xmm5
movapd %xmm2, %xmm4
cmpl $0x41, %ecx
je 0x9a07
movapd %xmm3, %xmm5
movapd %xmm2, %xmm4
cmpl $0x54, %ecx
je 0x9a07
movsd 0x26a1(%rip), %xmm4     # 0xc0a0
movsd 0x26a1(%rip), %xmm5     # 0xc0a8
movslq %eax, %rcx
movzbl (%rdi,%rcx), %ecx
cmpl $0x41, %ecx
je 0x9a28
cmpl $0x54, %ecx
je 0x9a28
movsd 0x2680(%rip), %xmm2     # 0xc0a0
movsd 0x2680(%rip), %xmm3     # 0xc0a8
cvtss2sd %xmm1, %xmm1
subsd %xmm1, %xmm5
xorps %xmm1, %xmm1
cvtsd2ss %xmm5, %xmm1
cvtss2sd %xmm0, %xmm0
subsd %xmm0, %xmm4
xorps %xmm0, %xmm0
cvtsd2ss %xmm4, %xmm0
cvtss2sd %xmm1, %xmm1
addsd %xmm3, %xmm1
cvtss2sd %xmm0, %xmm0
addsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
mulsd 0x2646(%rip), %xmm1     # 0xc0b0
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd 0x263f(%rip), %xmm2     # 0xc0b8
cvtss2sd %xmm0, %xmm0
addsd %xmm0, %xmm2
addsd 0x2637(%rip), %xmm2     # 0xc0c0
divsd %xmm2, %xmm1
addsd 0x25cb(%rip), %xmm1     # 0xc060
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: check_long_ploy
int check_long_ploy(char primer[],int length)
{
	int i,same;
	char ref;

	same=1;
	ref=primer[0];
	for(i=1;i<length;i++)
	{
		if(primer[i]==ref)
			same++;
		else
		{
			if(same>=6)
				return 0;
			same=1;
			ref=primer[i];
		}
	}
	if(same>=6)
		return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %eax
cmpl $0x2, %esi
jl 0x9b67
movb (%rdi), %r8b
movl %esi, %eax
movl $0x1, %ecx
movl $0x1, %edx
movb (%rdi,%rdx), %sil
cmpb %r8b, %sil
jne 0x9b46
incl %ecx
movl %r8d, %esi
jmp 0x9b50
cmpl $0x5, %ecx
movl $0x1, %ecx
jg 0x9b65
incq %rdx
movl %esi, %r8d
cmpq %rdx, %rax
jne 0x9b36
xorl %eax, %eax
cmpl $0x6, %ecx
setl %al
jmp 0x9b67
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: GContent
float GContent(char primer[],int length)
{
	int i,G;
	G=0;
	for(i=0;i<length;i++)
	{
		if(primer[i]=='G')
			G++;
	}
	return 1.0*G/length*100;
}

// Assembly:
testl %esi, %esi
jle 0x9b8f
movl %esi, %eax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r8d, %r8d
cmpb $0x47, (%rdi,%rcx)
sete %r8b
addl %r8d, %edx
incq %rcx
cmpq %rcx, %rax
jne 0x9b73
cvtsi2sd %edx, %xmm0
jmp 0x9b93
xorpd %xmm0, %xmm0
pushq %rbp
movq %rsp, %rbp
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
mulsd 0x24d1(%rip), %xmm0     # 0xc078
cvtsd2ss %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: check_G_C_Count
int check_G_C_Count(char primer[],int length)
{
	int i,G,C;
	G=0;
	C=0;

	for(i=0;i<length;i++)
	{
		if(primer[i]=='G')
			G++;
		else if(primer[i]=='C')
			C++;
	}
	if(C>G)
		return 1;
	else
		return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0x9bde
movl %esi, %eax
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movzbl (%rdi,%rsi), %r8d
cmpl $0x43, %r8d
je 0x9bd2
cmpl $0x47, %r8d
jne 0x9bd4
incl %ecx
jmp 0x9bd4
incl %edx
incq %rsi
cmpq %rsi, %rax
jne 0x9bbd
jmp 0x9be2
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpl %ecx, %edx
setg %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jiqingxiaoxi[P]RPA/single.c
// Function: usage
void usage()
{
	printf("USAGE:\n");
	printf("  Single  -in <ref_genome>  -out <single_primers>  [options]*\n\n");
	printf("ARGUMENTS:\n");
	printf("  -in <ref_genome>\n");
	printf("    reference genome, fasta formate\n");
	printf("  -out <primer_probe>\n");
	printf("    output the candidate single primers and probes\n");
	printf("  -dir <directory>\n");
	printf("    the directory for output file\n");
	printf("    default: current directory\n");
        printf("  -NoExo\n");
	printf("    don't identifiy candidate exo probe\n");
	printf("    default:identifiy candidate exo probe\n");
	printf("  -NoCheck\n");
	printf("    don't check secondary structure of primers or probes\n");
	printf("    default: check secondary structure\n");
	printf("  -par <par_directory>\n");
	printf("    parameter files under the directory are used to check primers' secondary structure\n");
	printf("    default: GLAPD/Par/\n");
	printf("  -h[-help]\n");
	printf("    print usage\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x17ed(%rip), %rdi      # 0xc51f
callq 0x1080
leaq 0x17e8(%rip), %rdi      # 0xc526
callq 0x1080
leaq 0x181b(%rip), %rdi      # 0xc565
callq 0x1080
leaq 0x181a(%rip), %rdi      # 0xc570
callq 0x1080
leaq 0x1821(%rip), %rdi      # 0xc583
callq 0x1080
leaq 0x1839(%rip), %rdi      # 0xc5a7
callq 0x1080
leaq 0x1843(%rip), %rdi      # 0xc5bd
callq 0x1080
leaq 0x186a(%rip), %rdi      # 0xc5f0
callq 0x1080
leaq 0x1871(%rip), %rdi      # 0xc603
callq 0x1080
leaq 0x1887(%rip), %rdi      # 0xc625
callq 0x1080
leaq 0x189a(%rip), %rdi      # 0xc644
callq 0x1080
leaq 0x1897(%rip), %rdi      # 0xc64d
callq 0x1080
leaq 0x18b3(%rip), %rdi      # 0xc675
callq 0x1080
leaq 0x18d1(%rip), %rdi      # 0xc69f
callq 0x1080
leaq 0x18d0(%rip), %rdi      # 0xc6aa
callq 0x1080
leaq 0x18fd(%rip), %rdi      # 0xc6e3
callq 0x1080
leaq 0x1918(%rip), %rdi      # 0xc70a
callq 0x1080
leaq 0x1923(%rip), %rdi      # 0xc721
callq 0x1080
leaq 0x196e(%rip), %rdi      # 0xc778
callq 0x1080
leaq 0x197a(%rip), %rdi      # 0xc790
callq 0x1080
leaq 0x197a(%rip), %rdi      # 0xc79c
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/malloc.c
// Function: mono_malloc
void		*mono_malloc(size_t size)
{
	void		*ret;
	t_metabody	*body;

	if (size == 0)
		return (NULL);
	body = metabody_get(size);
	if (body == NULL)
		return (NULL);
	ret = malloc_ptr(body, size);
	if (ret == NULL)
		return (NULL);
	if ((get_env() & ENV_PRESCRIBBLE) != 0)
		(void)ft_memset(ret, 0xaa, size);
	log_malloc(body, ret, size);
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x38cc
movq %rdi, %rbx
callq 0x32b0
testq %rax, %rax
je 0x38cc
movq %rax, %r14
cmpw $0x1001, (%rax)         # imm = 0x1001
jne 0x3803
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3911
movl 0x4(%r14), %eax
incl %eax
movw %ax, 0x4(%r14)
xorl %ecx, %ecx
cmpw $0x10, (%r14)
sete %cl
shll $0x7, %ecx
subl $-0x80, %ecx
cmpw %cx, %ax
jne 0x37fa
movb 0x2(%r14), %cl
movl $0x1, %eax
shll %cl, %eax
movq 0x10(%r14), %rcx
orw %ax, 0x4e(%rcx)
movq 0x8(%r14), %r15
jmp 0x389e
movq %r14, %rdi
callq 0x36a0
cmpq $-0x1, %rax
je 0x389b
movq %rax, %r15
addq $0x7, %rax
testq %r15, %r15
cmovnsq %r15, %rax
sarq $0x3, %rax
movzbl 0x18(%r14,%rax), %edx
leal (,%rax,8), %esi
movl %r15d, %ecx
subl %esi, %ecx
movl $0x1, %esi
shll %cl, %esi
btl %ecx, %edx
jb 0x384d
orb %dl, %sil
movb %sil, 0x18(%r14,%rax)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3911
movl 0x4(%r14), %ecx
incl %ecx
movw %cx, 0x4(%r14)
movzwl (%r14), %eax
xorl %edx, %edx
cmpq $0x10, %rax
sete %dl
shll $0x7, %edx
subl $-0x80, %edx
cmpw %dx, %cx
jne 0x3891
movb 0x2(%r14), %cl
movl $0x1, %edx
shll %cl, %edx
movq 0x10(%r14), %rcx
orw %dx, 0x4e(%rcx)
imulq %rax, %r15
addq 0x8(%r14), %r15
jmp 0x389e
xorl %r15d, %r15d
testq %r15, %r15
je 0x38cc
callq 0x34b0
testb $0x10, %al
je 0x38bc
movq %r15, %rdi
movl $0xaa, %esi
movq %rbx, %rdx
callq 0x3270
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x35e0
jmp 0x38cf
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/malloc.c
// Function: malloc
void		*malloc(size_t size)
{
	void	*ret;

	pthread_mutex_lock(&g_thread_mutex);
	ret = mono_malloc(size);
	pthread_mutex_unlock(&g_thread_mutex);
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x76ea(%rip), %r14      # 0xafd8
movq %r14, %rdi
callq 0x3670
movq %rbx, %rdi
callq 0x32d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x33e0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/malloc.c
// Function: malloc_set_size
static void	malloc_set_size(t_metabody *body, const size_t size, const size_t i)
{
	if (body->id == Z4)
	{
		(body->size)[i / 2] &= 0xf0 >> (4 * (i % 2));
		(body->size)[i / 2] |= (size - 1) << (4 * (i % 2));
	}
	else if (body->id <= Z8)
		(body->size)[i] = size - 1;
	else if (body->id <= ZMAX)
	{
		body->size[i] = (size - 1) >> 4;
		(body->store)[i / 2] &= 0xf0 >> (4 * (i % 2));
		(body->store)[i / 2] |= ((size - 1) & 0xf) << (4 * (i % 2));
	}
	else
	{
		*((size_t *)(body->size)) = size - 1;
		*((size_t *)(body->store)) = (size / getpagesize()) * getpagesize();
		if (size % getpagesize())
			*((size_t *)(body->store)) += getpagesize();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzwl (%rdi), %eax
cmpw $0x10, %ax
jne 0x3947
leal (,%rdx,4), %ecx
andb $0x4, %cl
movb $-0x10, %al
shrb %cl, %al
shrq %rdx
decl %r14d
shlq %cl, %r14
andb 0x38(%rbx,%rdx), %al
orb %al, %r14b
jmp 0x3955
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
ja 0x395f
decb %r14b
movb %r14b, 0x38(%rbx,%rdx)
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1(%r14), %rax
cmpl $0x1000, %ecx           # imm = 0x1000
ja 0x39a2
movl %eax, %esi
leal (,%rdx,4), %ecx
andb $0x4, %cl
movb $-0x10, %dil
shrb %cl, %dil
shrl $0x4, %esi
movb %sil, 0x38(%rbx,%rdx)
shrq %rdx
andl $0xf, %eax
shlq %cl, %rax
andb 0xb8(%rbx,%rdx), %dil
orb %dil, %al
movb %al, 0xb8(%rbx,%rdx)
jmp 0x395a
movq %rax, 0x38(%rbx)
callq 0x35c0
movslq %eax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %r14
movq %r14, 0xb8(%rbx)
testq %rdx, %rdx
je 0x395a
addq %rcx, %r14
movq %r14, 0xb8(%rbx)
jmp 0x395a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/free.c
// Function: mono_free
void		mono_free(void *ptr)
{
	t_metabody	*body;
	t_metahead	*head;

	if (ptr == NULL || g_metadata == NULL)
	{
		log_free_failed(ptr, ERR_FREE_INVALID);
		return ;
	}
	body = metabody_find(ptr, g_metadata);
	if (body == NULL)
	{
		log_free_failed(ptr, ERR_FREE_INVALID);
		return ;
	}
	if (metablock_free(body, ptr) == 1)
	{
		log_free_failed(ptr, ERR_FREE_DOUBLE);
		return ;
	}
	head = body->head;
	log_free(ptr, body->block_count);
	metabody_free(body);
	metadata_free(head, g_metadata);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
sete %al
movq 0x75f9(%rip), %r12      # 0xafe8
movq (%r12), %rsi
testq %rsi, %rsi
sete %cl
orb %al, %cl
cmpb $0x1, %cl
je 0x3a2a
movq %rbx, %rdi
callq 0x3660
testq %rax, %rax
je 0x3a2a
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3380
cmpl $0x1, %eax
jne 0x3a3c
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x3a2f
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3480
movq 0x10(%r14), %r15
movzwl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x32c0
movq %r14, %rdi
callq 0x33a0
movq (%r12), %rsi
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x34e0
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/realloc.c
// Function: realloc
void			*realloc(void *ptr, size_t size)
{
	void	*ret;

	pthread_mutex_lock(&g_thread_mutex);
	ret = mono_realloc(ptr, size);
	pthread_mutex_unlock(&g_thread_mutex);
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x7529(%rip), %rdi      # 0xafd8
callq 0x3670
testq %rbx, %rbx
je 0x3b2c
testq %r14, %r14
je 0x3b39
movq 0x7523(%rip), %rax      # 0xafe8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x3660
testq %rax, %rax
je 0x3b41
movq %rax, %r15
movzwl (%rax), %eax
cmpq $0x1001, %rax           # imm = 0x1001
jne 0x3b45
movq 0xb8(%r15), %rbx
cmpq %r14, %rbx
jb 0x3b05
callq 0x35c0
cltq
movq %rbx, %rcx
subq %rax, %rcx
cmpq %r14, %rcx
jbe 0x3b9d
movq %r14, %rdi
callq 0x32d0
movq 0x8(%r15), %rsi
cmpq %r14, %rbx
cmovbq %rbx, %r14
movq %rax, %rdi
movq %r14, %rdx
callq 0x3440
movq %rax, %rbx
movq 0x8(%r15), %rdi
jmp 0x3b7e
movq %r14, %rdi
callq 0x32d0
movq %rax, %rbx
jmp 0x3b83
movq %rbx, %rdi
callq 0x3340
xorl %ebx, %ebx
jmp 0x3b83
cmpq %r14, %rax
jb 0x3b5d
shrl %eax
cmpq %r14, %rax
jae 0x3b5d
movzwl 0x2(%r15), %eax
movb %r14b, 0x38(%r15,%rax)
jmp 0x3b83
movq %r14, %rdi
callq 0x32d0
movzwl 0x2(%r15), %ecx
movzbl 0x38(%r15,%rcx), %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3440
movq %rbx, %rdi
callq 0x3340
movq 0x744e(%rip), %rdi      # 0xafd8
callq 0x33e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movw %r14w, 0x4(%r15)
movq 0x8(%r15), %rbx
jmp 0x3b83
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/show_alloc_mem.c
// Function: mono_show_alloc_mem
static void	mono_show_alloc_mem(int option)
{
	t_metahead	*iter;
	size_t		total;

	if (g_metadata == NULL)
		return ;
	total = 0;
	iter = (t_metahead *)&(g_metadata->head);
	while (iter)
	{
		total += print_metadata(iter, option);
		iter = iter->next;
	}
	ft_printf("Total: %zu bytes\n", total);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x7402(%rip), %rax      # 0xafe8
movq (%rax), %r15
testq %r15, %r15
je 0x3c24
movl %edi, %ebx
xorl %r14d, %r14d
movq %r15, %rdi
movl %ebx, %esi
callq 0x3220
addq %rax, %r14
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x3bf3
leaq 0x43f0(%rip), %rdi      # 0x8000
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3550
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/print.c
// Function: print_dump
void		print_dump(void *address, size_t size)
{
	size_t	i;
	uint8_t	*ptr;

	if (size == 0 || address == NULL)
		return ;
	ptr = (uint8_t *)address;
	i = 0;
	while (i < size)
	{
		if (((i + 1) % 16) != 0)
			ft_printf("%02p ", ptr[i]);
		else
			ft_printf("%02p\n", ptr[i]);
		i++;
	}
	if (size % 16 != 0)
		ft_printf("\n");
}

// Assembly:
testq %rsi, %rsi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x3ce6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %rsi, -0x30(%rbp)
movq %rsi, %r15
negq %r15
movl $0x1, %r12d
leaq 0x4384(%rip), %r13      # 0x8018
leaq 0x4377(%rip), %rbx      # 0x8012
testb $0xf, %r12b
movzbl -0x1(%r14,%r12), %esi
movq %rbx, %rdi
cmoveq %r13, %rdi
xorl %eax, %eax
callq 0x3550
leaq (%r15,%r12), %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x3c9b
testb $0xf, -0x30(%rbp)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
je 0x3ce6
leaq 0x45f9(%rip), %rdi      # 0x82d8
xorl %eax, %eax
jmp 0x3550
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/print.c
// Function: print_large
size_t		print_large(t_metabody *body, int option)
{
	size_t		offset;
	uintptr_t	address;

	offset = *((size_t *)(body->size)) + 1;
	address = (uintptr_t)(body->address);
	ft_printf("%#p - %#p : %zu bytes\n", address, address + offset, offset);
	if (option != 0)
		print_dump((void *)address, offset);
	return (offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq 0x8(%rdi), %r14
movq 0x38(%rdi), %rbx
leaq (%rbx,%r14), %rdx
incq %rdx
incq %rbx
leaq 0x4311(%rip), %rdi      # 0x801e
movq %r14, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3550
testl %r15d, %r15d
je 0x3d2a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/print.c
// Function: print_allocation
size_t		print_allocation(t_metabody *body, size_t max, int option)
{
	size_t		i;
	size_t		ret;
	size_t		offset;
	uintptr_t	address;

	i = 0;
	ret = 0;
	while (i < max)
	{
		if (((body->free)[i / 8] & (1 << (i % 8))) != 0)
		{
			offset = metablock_get_size(body, i);
			address = (uintptr_t)(body->address) + i * body->id;
			ft_printf("%#p - %#p : %zu bytes\n", (void *)address, address + offset,
				offset);
			if (option != 0)
				print_dump((void *)address, offset);
			ret += offset;
		}
		i++;
	}
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, -0x38(%rbp)
testq %rsi, %rsi
je 0x3dc7
movq %rdi, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movq %r13, %rax
shrq $0x3, %rax
movzbl 0x18(%r15,%rax), %eax
movl %r13d, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x3dbc
movq %r15, %rdi
movq %r13, %rsi
callq 0x3470
movq %rax, %rbx
movzwl (%r15), %r14d
imulq %r13, %r14
addq 0x8(%r15), %r14
leaq (%r14,%rax), %rdx
leaq 0x4283(%rip), %rdi      # 0x801e
movq %r14, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x3550
cmpl $0x0, -0x2c(%rbp)
je 0x3db9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32e0
addq %rbx, %r12
incq %r13
cmpq %r13, -0x38(%rbp)
jne 0x3d5e
jmp 0x3dca
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/print.c
// Function: print_zone
void		print_zone(t_metabody *body)
{
	uint16_t	flag;

	flag = get_flag(body->id);
	if ((get_env() & ENV_ZONE) == 0)
	{
		if (flag <= TINY)
			ft_printf("TINY : %#p\n", (uintptr_t)(body->address));
		else if (flag <= SMALL)
			ft_printf("SMALL : %#p\n", (uintptr_t)(body->address));
		else
			ft_printf("LARGE : %#p\n", (uintptr_t)(body->address));
	}
	else
	{
		if (flag != ZLARGE)
			ft_printf("Zone [ %d ] : %#p\n", body->id,
				(uintptr_t)(body->address));
		else
			ft_printf("LARGE : %#p\n", (uintptr_t)(body->address));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl (%rdi), %edi
callq 0x30d0
movl %eax, %r14d
callq 0x34b0
testb $0x2, %al
jne 0x3e12
movzwl %r14w, %eax
cmpl $0x100, %eax            # imm = 0x100
ja 0x3e23
movq 0x8(%rbx), %rsi
leaq 0x4225(%rip), %rdi      # 0x8035
jmp 0x3e3e
movzwl %r14w, %eax
cmpl $0x1001, %eax           # imm = 0x1001
jne 0x3e49
movq 0x8(%rbx), %rsi
jmp 0x3e37
movq 0x8(%rbx), %rsi
cmpl $0x400, %eax            # imm = 0x400
ja 0x3e37
leaq 0x420c(%rip), %rdi      # 0x8041
jmp 0x3e3e
leaq 0x4210(%rip), %rdi      # 0x804e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3550
movzwl (%rbx), %esi
movq 0x8(%rbx), %rdx
leaq 0x4204(%rip), %rdi      # 0x805b
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3550
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/print.c
// Function: print_metadata
size_t		print_metadata(t_metahead *head, int option)
{
	t_metabody	*body;
	size_t		total;
	size_t		i;

	i = 0;
	total = 0;
	while (i < AVAILABLE)
	{
		body = (t_metabody *)&((((t_metadata *)(head->container))->body)[i]);
		if (body->id != 0)
		{
			print_zone(body);
			if (body->id == ZLARGE)
				total += print_large(body, option);
			else if (body->id == Z4)
				total += print_allocation(body, 256, option);
			else
				total += print_allocation(body, 128, option);

		}
		i++;
	}
	return (total);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x100, %r13d           # imm = 0x100
xorl %r15d, %r15d
movq 0x10(%r14), %r12
cmpw $0x0, (%r12,%r13)
je 0x3ecb
addq %r13, %r12
movq %r12, %rdi
callq 0x3260
movzwl (%r12), %eax
cmpl $0x10, %eax
je 0x3eb2
cmpl $0x1001, %eax           # imm = 0x1001
jne 0x3eb9
movq %r12, %rdi
movl %ebx, %esi
callq 0x3610
jmp 0x3ec8
movl $0x100, %esi            # imm = 0x100
jmp 0x3ebe
movl $0x80, %esi
movq %r12, %rdi
movl %ebx, %edx
callq 0x33d0
addq %rax, %r15
addq $0x100, %r13            # imm = 0x100
cmpq $0x1000, %r13           # imm = 0x1000
jne 0x3e7e
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/log1.c
// Function: log_malloc
int			log_malloc(t_metabody *body, void *ptr, size_t size)
{
	int fd;

	fd = get_fd();
	if (fd == -1)
		return (1);
	ft_dprintf(fd, "[%p] Malloc %4zu: %p (N-%zu)\n", (void *)body,
				size, ptr, body->block_count);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
callq 0x35d0
cmpl $-0x1, %eax
je 0x3f6c
movzwl 0x4(%r12), %r9d
leaq 0x412f(%rip), %rsi      # 0x8084
xorl %r15d, %r15d
movl %eax, %edi
movq %r12, %rdx
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x3410
jmp 0x3f72
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/log1.c
// Function: log_mmap_failed
int			log_mmap_failed(size_t size, t_error error)
{
	int	fd;

	fd = get_fd();
	if (fd == -1)
		return (1);
	if (error == ERR_RLIMIT)
		ft_dprintf(fd, "!!! - Cannot allocate: issue with rlimit\n");
	else if (error == ERR_MMAP)
		ft_dprintf(fd, "!!! - Cannot allocate: issue with mmap\n");
	else if (error == ERR_TOO_LARGE)
		ft_dprintf(fd, "! - Cannot allocate: %zu is too large\n", size);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
callq 0x35d0
cmpl $-0x1, %eax
je 0x4057
cmpl $0x5, %r15d
je 0x4072
cmpl $0x4, %r15d
je 0x405e
xorl %ebx, %ebx
cmpl $0x3, %r15d
jne 0x4087
leaq 0x40c8(%rip), %rsi      # 0x811d
jmp 0x4065
movl $0x1, %ebx
jmp 0x4087
leaq 0x40e2(%rip), %rsi      # 0x8147
xorl %ebx, %ebx
movl %eax, %edi
xorl %eax, %eax
callq 0x3410
jmp 0x4087
leaq 0x40f6(%rip), %rsi      # 0x816f
xorl %ebx, %ebx
movl %eax, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3410
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/log2_meta.c
// Function: log_metadata_set
int			log_metadata_set(t_metadata *data, void *l, void *r)
{
	int	fd;

	fd = get_fd();
	if (fd == -1)
		return (1);
	if (l != NULL && r != NULL)
		ft_dprintf(fd, "\n>>> New metadata: (%p| [%p] |%p)\n\n",
			l, (void *)data, r);
	else if (l != NULL)
		ft_dprintf(fd, "\n>>> New metadata: (%p| [%p]\n\n", l, (void *)data);
	else if (r != NULL)
		ft_dprintf(fd, "\n>>> New metadata: [%p] |%p)\n\n", (void *)data, r);
	else
		ft_dprintf(fd, "\n>>> New metadata: [%p]\n\n", (void *)data);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x35d0
cmpl $-0x1, %eax
je 0x40e0
testq %r12, %r12
sete %cl
testq %r15, %r15
sete %dl
orb %cl, %dl
jne 0x40e8
leaq 0x40db(%rip), %rsi      # 0x81a4
xorl %r14d, %r14d
movl %eax, %edi
movq %r12, %rdx
movq %rbx, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x3410
jmp 0x411f
movl $0x1, %r14d
jmp 0x411f
testq %r12, %r12
je 0x4101
leaq 0x40d4(%rip), %rsi      # 0x81c8
xorl %r14d, %r14d
movl %eax, %edi
movq %r12, %rdx
movq %rbx, %rcx
jmp 0x4118
testq %r15, %r15
je 0x412b
leaq 0x40da(%rip), %rsi      # 0x81e7
xorl %r14d, %r14d
movl %eax, %edi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x3410
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40d4(%rip), %rsi      # 0x8206
xorl %r14d, %r14d
movl %eax, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3410
jmp 0x411f
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/log2_meta.c
// Function: log_metabody_set
int			log_metabody_set(t_metabody *body, t_metahead *head)
{
	int	fd;

	fd = get_fd();
	if (fd == -1)
		return (1);
	ft_dprintf(fd, "[%p] New metabody: %p -> %p (%zu left)\n", head->container,
		(void *)body, (void *)body->address, head->available_heap);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x35d0
cmpl $-0x1, %eax
je 0x417e
movq 0x8(%rbx), %r8
movq 0x10(%r14), %rdx
movq 0x28(%r14), %r9
leaq 0x40b3(%rip), %rsi      # 0x8220
xorl %r14d, %r14d
movl %eax, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3410
jmp 0x4184
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/log2_meta.c
// Function: log_metabody_free
int			log_metabody_free(t_metabody *body, void *ptr, t_metahead *head)
{
	int	fd;

	fd = get_fd();
	if (fd == -1)
		return (1);
	ft_dprintf(fd, "[%p] Freed metabody: %p -> %p (%zu left)\n",
		head->container, (void *)body, ptr, head->available_heap);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x35d0
cmpl $-0x1, %eax
je 0x41cc
movq 0x10(%r15), %rdx
movq 0x28(%r15), %r9
leaq 0x4090(%rip), %rsi      # 0x8248
xorl %r15d, %r15d
movl %eax, %edi
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x3410
jmp 0x41d2
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/log2_meta.c
// Function: log_metadata_free
int			log_metadata_free(t_metadata *data, void *l, void *r)
{
	int	fd;

	fd = get_fd();
	if (fd == -1)
		return (1);
	if (l != NULL && r != NULL)
		ft_dprintf(fd, "\n>>> Freed metadata: (%p| [%p] |%p)\n\n",
			l, (void *)data, r);
	else if (l != NULL)
		ft_dprintf(fd, "\n>>> Freed metadata: (%p| [%p]\n\n", l, (void *)data);
	else if (r != NULL)
		ft_dprintf(fd, "\n>>> Freed metadata: [%p] |%p)\n\n", (void *)data, r);
	else
		ft_dprintf(fd, "\n>>> Freed metadata: [%p]\n\n", (void *)data);
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x35d0
cmpl $-0x1, %eax
je 0x422c
testq %r12, %r12
sete %cl
testq %r15, %r15
sete %dl
orb %cl, %dl
jne 0x4234
leaq 0x405d(%rip), %rsi      # 0x8272
xorl %r14d, %r14d
movl %eax, %edi
movq %r12, %rdx
movq %rbx, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x3410
jmp 0x426b
movl $0x1, %r14d
jmp 0x426b
testq %r12, %r12
je 0x424d
leaq 0x4058(%rip), %rsi      # 0x8298
xorl %r14d, %r14d
movl %eax, %edi
movq %r12, %rdx
movq %rbx, %rcx
jmp 0x4264
testq %r15, %r15
je 0x4277
leaq 0x4060(%rip), %rsi      # 0x82b9
xorl %r14d, %r14d
movl %eax, %edi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x3410
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x405c(%rip), %rsi      # 0x82da
xorl %r14d, %r14d
movl %eax, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3410
jmp 0x426b
nop
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/get1.c
// Function: get_flag
uint16_t		get_flag(const size_t size)
{
	if (size == 0)
		return (0);
	if ((get_env() & ENV_ZONE) == 0)
		return (get_flag_no_bonus(size));
	if (size <= Z4)
		return (Z4);
	if (size <= Z5)
		return (Z5);
	if (size <= Z6)
		return (Z6);
	if (size <= Z7)
		return (Z7);
	if (size <= Z8)
		return (Z8);
	if (size <= Z9)
		return (Z9);
	if (size <= Z10)
		return (Z10);
	if (size <= Z11)
		return (Z11);
	if (size <= Z12)
		return (Z12);
	return (ZLARGE);
}

// Assembly:
testq %rdi, %rdi
je 0x42f9
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x34b0
testb $0x2, %al
jne 0x42fc
cmpq $0x401, %rbx            # imm = 0x401
movl $0x400, %eax            # imm = 0x400
movl $0x1001, %ecx           # imm = 0x1001
cmovbl %eax, %ecx
cmpq $0x101, %rbx            # imm = 0x101
movl $0x100, %eax            # imm = 0x100
cmovael %ecx, %eax
jmp 0x436a
xorl %eax, %eax
retq
movw $0x10, %ax
cmpq $0x11, %rbx
jb 0x436a
movw $0x20, %ax
cmpq $0x21, %rbx
jb 0x436a
movw $0x40, %ax
cmpq $0x41, %rbx
jb 0x436a
movw $0x80, %ax
cmpq $0x81, %rbx
jb 0x436a
movw $0x100, %ax             # imm = 0x100
cmpq $0x101, %rbx            # imm = 0x101
jb 0x436a
movw $0x200, %ax             # imm = 0x200
cmpq $0x201, %rbx            # imm = 0x201
jb 0x436a
movw $0x400, %ax             # imm = 0x400
cmpq $0x401, %rbx            # imm = 0x401
jb 0x436a
movw $0x800, %ax             # imm = 0x800
cmpq $0x801, %rbx            # imm = 0x801
jb 0x436a
cmpq $0x1001, %rbx           # imm = 0x1001
movw $0x1001, %ax            # imm = 0x1001
sbbw $0x0, %ax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/get1.c
// Function: get_page
size_t			get_page(const size_t size)
{
	size_t	i;

	if ((get_env() & ENV_ZONE) == 0)
		return (get_page_no_bonus(size));
	i = getpagesize();
	if (size <= Z5)
		return (i);
	else if (size <= Z6)
		return (i * 2);
	else if (size <= Z7)
		return (i * 4);
	else if (size <= Z8)
		return (i * 8);
	else if (size <= Z9)
		return (i * 16);
	else if (size <= Z10)
		return (i * 32);
	else if (size <= Z11)
		return (i * 64);
	else if (size <= Z12)
		return (i * 128);
	else if (size % i)
		return (i * ((size / i) + 1));
	else
		return (i * (size / i));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x34b0
movl %eax, %r14d
callq 0x35c0
movslq %eax, %rcx
testb $0x2, %r14b
jne 0x43a3
cmpq $0x100, %rbx            # imm = 0x100
ja 0x43bb
shlq $0x3, %rcx
jmp 0x4449
cmpq $0x21, %rbx
jb 0x4449
cmpq $0x40, %rbx
ja 0x43ca
addq %rcx, %rcx
jmp 0x4449
cmpq $0x400, %rbx            # imm = 0x400
ja 0x43d9
shlq $0x5, %rcx
jmp 0x4449
cmpq $0x80, %rbx
ja 0x43f7
shlq $0x2, %rcx
jmp 0x4449
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
je 0x4443
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
incq %rax
imulq %rax, %rcx
jmp 0x4449
cmpq $0x100, %rbx            # imm = 0x100
jbe 0x439a
cmpq $0x200, %rbx            # imm = 0x200
ja 0x440f
shlq $0x4, %rcx
jmp 0x4449
cmpq $0x400, %rbx            # imm = 0x400
jbe 0x43c4
cmpq $0x800, %rbx            # imm = 0x800
ja 0x4427
shlq $0x6, %rcx
jmp 0x4449
cmpq $0x1000, %rbx           # imm = 0x1000
ja 0x4436
shlq $0x7, %rcx
jmp 0x4449
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x43ee
subq %rdx, %rbx
movq %rbx, %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/get2_static.c
// Function: get_env
int	get_env(void)
{
	static int	flag = 0;

	if (flag == 0)
	{
		if (getenv(ENV_ZONE_TXT))
			flag |= ENV_ZONE;
		if (getenv(ENV_LOG_TXT))
			flag |= ENV_LOG;
		if (getenv(ENV_PRESCRIBBLE_TXT))
			flag |= ENV_PRESCRIBBLE;
		if (getenv(ENV_GUARD_TXT))
			flag |= ENV_GUARD;
		flag |= 1;
	}
	return (flag);
}

// Assembly:
cmpl $0x0, 0x6f4d(%rip)      # 0xb3a8
jne 0x44cc
pushq %rbp
movq %rsp, %rbp
leaq 0x3e8e(%rip), %rdi      # 0x82f6
callq 0x3030
testq %rax, %rax
je 0x447c
movl $0x2, 0x6f2c(%rip)      # 0xb3a8
leaq 0x3e80(%rip), %rdi      # 0x8303
callq 0x3030
testq %rax, %rax
je 0x4494
orb $0x4, 0x6f14(%rip)      # 0xb3a8
leaq 0x3e74(%rip), %rdi      # 0x830f
callq 0x3030
testq %rax, %rax
je 0x44ac
orb $0x10, 0x6efc(%rip)     # 0xb3a8
leaq 0x3e70(%rip), %rdi      # 0x8323
callq 0x3030
testq %rax, %rax
popq %rbp
je 0x44c5
orb $0x20, 0x6ee3(%rip)     # 0xb3a8
orb $0x1, 0x6edc(%rip)      # 0xb3a8
movl 0x6ed6(%rip), %eax      # 0xb3a8
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/get2_static.c
// Function: get_fd
int	get_fd(void)
{
	static int	fd = -2;

	if ((get_env() & ENV_LOG) == 0)
		fd = -1;
	if (fd == -2)
		fd = open("log_malloc.txt", O_CREAT | O_RDWR | O_TRUNC);
	return (fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x34b0
testb $0x4, %al
jne 0x44ea
movl $0xffffffff, 0x6e7e(%rip) # imm = 0xFFFFFFFF
cmpl $-0x2, 0x6e77(%rip)     # 0xb368
jne 0x450c
leaq 0x3e37(%rip), %rdi      # 0x8331
movl $0x242, %esi            # imm = 0x242
xorl %eax, %eax
callq 0x3510
movl %eax, 0x6e5c(%rip)      # 0xb368
movl 0x6e56(%rip), %eax      # 0xb368
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/get3_size.c
// Function: get_body_size
size_t	get_body_size(t_metabody *body)
{
	if (body->id == ZLARGE)
		return (*((size_t *)(body->store)));
	else if (body->id == Z4)
		return (body->id * 256);
	else
		return (body->id * 128);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
cmpl $0x10, %eax
je 0x4530
cmpl $0x1001, %eax           # imm = 0x1001
jne 0x4537
movq 0xb8(%rdi), %rax
jmp 0x453a
movl $0x1000, %eax           # imm = 0x1000
jmp 0x453a
shll $0x7, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/mmap.c
// Function: mmap_malloc
void		*mmap_malloc(const size_t requested, int bonus)
{
	void			*ret;
	struct rlimit	limit;

	if (getrlimit(RLIMIT_AS, &limit) != 0)
	{
		log_mmap_failed(0, ERR_RLIMIT);
		return (NULL);
	}
	if (requested > limit.rlim_cur)
	{
		log_mmap_failed(requested, ERR_TOO_LARGE);
		return (NULL);
	}
	if (bonus == 0)
		ret = mmap(NULL, requested, PROT_READ | PROT_WRITE,
				MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
	else
		ret = mmap(NULL, requested, PROT_NONE,
				MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
	if (ret == MAP_FAILED)
	{
		log_mmap_failed(0, ERR_MMAP);
		return (NULL);
	}
	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x20(%rbp), %rsi
movl $0x9, %edi
callq 0x35f0
testl %eax, %eax
je 0x456f
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x3, %esi
callq 0x31c0
jmp 0x45ba
cmpq %rbx, -0x20(%rbp)
jae 0x4586
movq %rbx, %rdi
movl $0x5, %esi
callq 0x31c0
xorl %ebx, %ebx
jmp 0x45ba
xorl %edi, %edi
movq %rbx, %rsi
testl %r14d, %r14d
je 0x4599
xorl %edx, %edx
movl $0x4022, %ecx           # imm = 0x4022
jmp 0x45a3
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x3190
movq %rax, %rbx
cmpq $-0x1, %rax
je 0x45c6
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebx, %ebx
xorl %edi, %edi
movl $0x4, %esi
jmp 0x4568
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/metablock.c
// Function: metablock_get_size
size_t	metablock_get_size(t_metabody *body, const size_t i)
{
	size_t	size;

	if (body->id == ZLARGE)
		size = *((size_t *)(body->size)) + 1;
	else if (body->id == Z4 && i % 2)
		size = ((body->size)[i / 2] & 0xf0) >> 4;
	else if (body->id == Z4)
		size = (body->size)[i / 2] & 0xf;
	else if (body->id <= Z8)
		size = (body->size)[i];
	else if (i % 2)
		size = ((body->size)[i] << 4) + (((body->store)[i / 2] & 0xf0) >> 4);
	else
		size = ((body->size)[i] << 4) + ((body->store)[i / 2] & 0xf);
	return (size + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
cmpl $0x10, %eax
je 0x45f0
cmpl $0x1001, %eax           # imm = 0x1001
jne 0x4609
movq 0x38(%rdi), %rax
incq %rax
jmp 0x464e
testb $0x1, %sil
jne 0x463b
cmpw $0x10, %ax
jne 0x4609
shrq %rsi
movzbl 0x38(%rdi,%rsi), %eax
andl $0xf, %eax
jmp 0x464e
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
ja 0x461a
movzbl 0x38(%rdi,%rsi), %eax
jmp 0x464e
movzbl 0x38(%rdi,%rsi), %eax
shll $0x4, %eax
movq %rsi, %rcx
shrq %rcx
movzbl 0xb8(%rdi,%rcx), %ecx
testb $0x1, %sil
jne 0x4648
andl $0xf, %ecx
jmp 0x464b
shrq %rsi
movzbl 0x38(%rdi,%rsi), %eax
shrl $0x4, %eax
jmp 0x464e
shrl $0x4, %ecx
orq %rcx, %rax
incq %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AugustinLopez[P]Fancy_Ft_Malloc/srcs/metablock.c
// Function: metablock_get_available_index
ssize_t	metablock_get_available_index(t_metabody *body)
{
	size_t	max;
	size_t	i;
	size_t	j;

	if (body->id == Z4)
		max = MAX_Z4;
	else
		max = MAX_OTHER;
	i = 0;
	while (i < max)
	{
		j = 0;
		while (j < 8)
		{
			if (((body->free)[i] & (1 << j)) == 0)
				return (i * 8 + j);
			j++;
		}
		i++;
	}
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
cmpw $0x10, (%rdi)
sete %cl
shll $0x4, %ecx
addq $0x10, %rcx
xorl %edx, %edx
xorl %esi, %esi
movzbl 0x18(%rdi,%rsi), %r8d
xorl %eax, %eax
btl %eax, %r8d
jae 0x4697
incq %rax
cmpq $0x8, %rax
jne 0x4673
incq %rsi
addq $-0x8, %rdx
cmpq %rcx, %rsi
jne 0x466b
movq $-0x1, %rax
jmp 0x469a
subq %rdx, %rax
popq %rbp
retq