LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/number_cast.c
// Function: cast_unsigned_number
uintmax_t	cast_unsigned_number(t_tags *ids, uintmax_t nbr)
{
	if (ft_strcmp(ids->current_modifier, "\0") == 0)
		nbr = (unsigned int)va_arg(ids->arguments, unsigned int);
	if (ft_strcmp(ids->current_modifier, "h") == 0)
		nbr = (unsigned short)va_arg(ids->arguments, unsigned int);
	if (ft_strcmp(ids->current_modifier, "l") == 0)
		nbr = (unsigned long)va_arg(ids->arguments, unsigned long int);
	if (ft_strcmp(ids->current_modifier, "hh") == 0)
		nbr = (unsigned char)va_arg(ids->arguments, unsigned int);
	if (ft_strcmp(ids->current_modifier, "ll") == 0)
		nbr = (unsigned long long)
		va_arg(ids->arguments, unsigned long long int);
	return ((uintmax_t)nbr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5f(%rdi), %r14
leaq 0x1cbe(%rip), %rsi      # 0x7af5
movq %r14, %rdi
callq 0x4780
testl %eax, %eax
jne 0x5e6a
movl 0x68(%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5e5b
movq %rcx, %rax
addq 0x78(%rbx), %rax
addl $0x8, %ecx
movl %ecx, 0x68(%rbx)
jmp 0x5e67
movq 0x70(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x70(%rbx)
movl (%rax), %r15d
leaq 0x1c87(%rip), %rsi      # 0x7af8
movq %r14, %rdi
callq 0x4780
testl %eax, %eax
jne 0x5ea5
movl 0x68(%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5e95
movq %rcx, %rax
addq 0x78(%rbx), %rax
addl $0x8, %ecx
movl %ecx, 0x68(%rbx)
jmp 0x5ea1
movq 0x70(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x70(%rbx)
movzwl (%rax), %r15d
leaq 0x1c4f(%rip), %rsi      # 0x7afb
movq %r14, %rdi
callq 0x4780
testl %eax, %eax
jne 0x5edf
movl 0x68(%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5ed0
movq %rcx, %rax
addq 0x78(%rbx), %rax
addl $0x8, %ecx
movl %ecx, 0x68(%rbx)
jmp 0x5edc
movq 0x70(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x70(%rbx)
movq (%rax), %r15
leaq 0x1c11(%rip), %rsi      # 0x7af7
movq %r14, %rdi
callq 0x4780
testl %eax, %eax
jne 0x5f1a
movl 0x68(%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5f0a
movq %rcx, %rax
addq 0x78(%rbx), %rax
addl $0x8, %ecx
movl %ecx, 0x68(%rbx)
jmp 0x5f16
movq 0x70(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x70(%rbx)
movzbl (%rax), %r15d
leaq 0x1bd9(%rip), %rsi      # 0x7afa
movq %r14, %rdi
callq 0x4780
testl %eax, %eax
jne 0x5f54
movl 0x68(%rbx), %ecx
cmpq $0x28, %rcx
ja 0x5f45
movq %rcx, %rax
addq 0x78(%rbx), %rax
addl $0x8, %ecx
movl %ecx, 0x68(%rbx)
jmp 0x5f51
movq 0x70(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x70(%rbx)
movq (%rax), %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/print_d.c
// Function: put_plusminus
t_tags			*put_plusminus(t_tags *ids, intmax_t nbr)
{
	if (nbr < 0)
		write(1, "-", 1);
	if (nbr >= 0)
		write(1, "+", 1);
	ids->printed_chars++;
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jns 0x5f8c
leaq 0x1ac3(%rip), %rsi      # 0x7a40
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
testq %r14, %r14
js 0x5fa7
leaq 0x1b65(%rip), %rsi      # 0x7afd
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
incq 0x30(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/print_d.c
// Function: print_d
t_tags			*print_d(t_tags *ids)
{
	intmax_t	nbr;
	intmax_t	len;
	char		*str;

	nbr = cast_number(ids, 0);
	len = base_nbrcount(nbr, 10);
	if (ids->period == 1 && ids->maxwth == 0 && nbr == 0)
	{
		period_zero(ids);
		return (ids);
	}
	prefix_print(ids, len, nbr);
	nbr *= ids->negative;
	if (ids->current_flag[1] != '\0' && ids->period == 0)
		put_zero_df(ids, len);
	str = imaxtoa_base(nbr, 10);
	ft_putstr(str);
	ids->printed_chars += ft_strlen(str);
	if (ids->minwth > 0 && ids->current_flag[4] == '-')
		minwth_print(ids, len);
	free(str);
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x5cca
movq %rax, %r15
movl $0xa, %esi
movq %rax, %rdi
callq 0x5b10
movq %rax, %r14
movq 0x18(%rbx), %rax
cmpq $0x1, %rax
jne 0x5ff1
movq 0x20(%rbx), %rcx
orq %r15, %rcx
je 0x6107
movq 0x10(%rbx), %rdx
cmpq %r14, %rdx
jbe 0x6041
movb 0x5c(%rbx), %cl
cmpb $0x2d, %cl
je 0x6041
cmpb $0x30, 0x59(%rbx)
jne 0x6036
movq 0x20(%rbx), %rsi
cmpq %rdx, %rsi
setb %dl
testq %rsi, %rsi
setne %sil
testb %sil, %dl
jne 0x6036
cmpb $0x2d, %cl
je 0x6041
cmpq $0x1, %rax
jne 0x6041
cmpb $0x30, 0x59(%rbx)
jne 0x6041
cmpq $0x0, 0x20(%rbx)
jne 0x6041
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67cc
cmpb $0x20, 0x5a(%rbx)
jne 0x606d
cmpl $0x1, 0x40(%rbx)
jne 0x606d
cmpb $0x0, 0x5b(%rbx)
jne 0x606d
leaq 0x198b(%rip), %rsi      # 0x79e5
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
incq 0x30(%rbx)
testq %r15, %r15
js 0x6078
cmpb $0x2b, 0x5b(%rbx)
jne 0x6083
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5f64
cmpq $0x1, 0x18(%rbx)
jne 0x6095
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64f4
movslq 0x40(%rbx), %rax
imulq %rax, %r15
cmpb $0x0, 0x59(%rbx)
je 0x60b5
cmpq $0x0, 0x18(%rbx)
jne 0x60b5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64f4
movl $0xa, %esi
movq %r15, %rdi
callq 0x5b46
movq %rax, %r15
movq %rax, %rdi
callq 0x4720
movq %r15, %rdi
callq 0x48d0
addq %rax, 0x30(%rbx)
cmpq $0x0, 0x10(%rbx)
je 0x60f1
cmpb $0x2d, 0x5c(%rbx)
jne 0x60f1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x67cc
movq %r15, %rdi
callq 0x1030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x6344
jmp 0x60f9
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/print_o.c
// Function: print_o
t_tags				*print_o(t_tags *ids)
{
	uintmax_t	nbr;
	size_t		len;
	char		*str;

	nbr = cast_unsigned_number(ids, 0);
	str = uimaxtoa_base(nbr, 8);
	len = ft_strlen(str);
	if (ids->period == 1 && ids->maxwth == 0 && nbr == 0)
	{
		period_zero_check(ids);
		return (ids);
	}
	prefix_print(ids, nbr, len);
	ft_putstr(str);
	ids->printed_chars += len;
	if (nbr == 0 && ids->current_flag[0] == '#' && ids->current_flag[4] == '-')
		minwth_print(ids, len - 1);
	else if (ids->minwth > 0 && ids->current_flag[4] == '-')
		minwth_print(ids, len);
	free(str);
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x5e1c
movq %rax, %r12
movl $0x8, %esi
movq %rax, %rdi
callq 0x5a85
movq %rax, %r14
movq %rax, %rdi
callq 0x48d0
movq %rax, %r15
movq 0x18(%rbx), %rax
cmpq $0x1, %rax
jne 0x615a
movq 0x20(%rbx), %rcx
orq %r12, %rcx
je 0x619f
testq %r12, %r12
jne 0x616b
cmpb $0x23, 0x58(%rbx)
jne 0x616b
cmpb $0x2d, 0x5c(%rbx)
jne 0x61d3
movq 0x10(%rbx), %rcx
cmpq %r15, %rcx
jbe 0x6183
cmpb $0x2d, 0x5c(%rbx)
je 0x6183
cmpb $0x30, 0x59(%rbx)
movq %r15, %rsi
jne 0x61d7
cmpq %r15, %rcx
jbe 0x61df
cmpb $0x30, 0x59(%rbx)
jne 0x61df
cmpq $0x1, %rax
jne 0x61df
cmpb $0x2d, 0x5c(%rbx)
movq %r15, %rsi
jne 0x61d7
jmp 0x61df
cmpq $0x0, 0x10(%rbx)
jne 0x61c6
cmpb $0x23, 0x58(%rbx)
jne 0x61c6
leaq 0x194c(%rip), %rsi      # 0x7aff
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
incq 0x30(%rbx)
movq %rbx, %rdi
callq 0x6344
jmp 0x6273
leaq -0x1(%r15), %rsi
movq %rbx, %rdi
callq 0x67cc
testq %r12, %r12
je 0x6211
cmpb $0x23, 0x58(%rbx)
jne 0x6211
cmpq $0x1, 0x18(%rbx)
jne 0x61f7
cmpq %r15, 0x20(%rbx)
ja 0x6211
leaq 0x1901(%rip), %rsi      # 0x7aff
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
incq 0x30(%rbx)
cmpb $0x30, 0x59(%rbx)
jne 0x6224
movq %rbx, %rdi
movq %r15, %rsi
callq 0x66e1
jmp 0x6231
cmpq $0x1, 0x18(%rbx)
jne 0x6231
cmpq %r15, 0x20(%rbx)
ja 0x6217
movq %r14, %rdi
callq 0x4720
addq %r15, 0x30(%rbx)
testq %r12, %r12
jne 0x6253
cmpb $0x23, 0x58(%rbx)
jne 0x6253
cmpb $0x2d, 0x5c(%rbx)
jne 0x6253
decq %r15
jmp 0x6260
cmpq $0x0, 0x10(%rbx)
je 0x626b
cmpb $0x2d, 0x5c(%rbx)
jne 0x626b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67cc
movq %r14, %rdi
callq 0x1030
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/print_percent.c
// Function: print_percent
t_tags		*print_percent(t_tags *ids)
{
	if (ids->current_flag[4] == '-')
		write(1, "%", 1);
	while (ids->minwth > 1 && ids->current_flag[1] != '0')
	{
		write(1, " ", 1);
		ids->minwth--;
		ids->printed_chars++;
	}
	while (ids->minwth > 1 && ids->current_flag[1] == '0')
	{
		write(1, "0", 1);
		ids->minwth--;
		ids->printed_chars++;
	}
	if (ids->current_flag[4] != '-')
		write(1, "%", 1);
	ids->printed_chars++;
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x2d, 0x5c(%rdi)
jne 0x62a6
leaq 0x186a(%rip), %rsi      # 0x7b01
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
cmpq $0x2, 0x10(%rbx)
jb 0x62e1
leaq 0x1731(%rip), %r14      # 0x79e5
cmpb $0x30, 0x59(%rbx)
je 0x62e1
movl $0x1, %edx
movl $0x1, %edi
movq %r14, %rsi
callq 0x1040
movq 0x10(%rbx), %rax
decq %rax
movq %rax, 0x10(%rbx)
incq 0x30(%rbx)
cmpq $0x1, %rax
ja 0x62b4
cmpq $0x2, 0x10(%rbx)
jb 0x631c
leaq 0x1810(%rip), %r14      # 0x7aff
cmpb $0x30, 0x59(%rbx)
jne 0x631c
movl $0x1, %edx
movl $0x1, %edi
movq %r14, %rsi
callq 0x1040
movq 0x10(%rbx), %rax
decq %rax
movq %rax, 0x10(%rbx)
incq 0x30(%rbx)
cmpq $0x1, %rax
ja 0x62ef
cmpb $0x2d, 0x5c(%rbx)
je 0x6338
leaq 0x17d8(%rip), %rsi      # 0x7b01
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
incq 0x30(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/print_u.c
// Function: period_zero
t_tags			*period_zero(t_tags *ids)
{
	if (ids->minwth == 0 && ids->current_flag[2] == '\0'
	&& ids->current_flag[3] == '\0')
		return (ids);
	if (ids->minwth > 0 &&
	(ids->current_flag[2] == ' ' || ids->current_flag[3] == '+'))
		ids->minwth--;
	while (ids->minwth > 0 && ids->current_flag[4] != '-')
	{
		write(1, " ", 1);
		ids->minwth--;
		ids->printed_chars++;
	}
	write_space_or_plus(ids);
	while (ids->minwth > 0 && ids->current_flag[4] == '-')
	{
		write(1, " ", 1);
		ids->minwth--;
		ids->printed_chars++;
	}
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
jne 0x636c
cmpb $0x0, 0x5a(%rbx)
jne 0x6367
cmpb $0x0, 0x5b(%rbx)
je 0x640e
testq %rax, %rax
je 0x637f
cmpb $0x20, 0x5a(%rbx)
je 0x6378
cmpb $0x2b, 0x5b(%rbx)
jne 0x637f
decq %rax
movq %rax, 0x10(%rbx)
cmpq $0x0, 0x10(%rbx)
je 0x63af
leaq 0x1658(%rip), %r14      # 0x79e5
cmpb $0x2d, 0x5c(%rbx)
je 0x63af
movl $0x1, %edx
movl $0x1, %edi
movq %r14, %rsi
callq 0x1040
incq 0x30(%rbx)
decq 0x10(%rbx)
jne 0x638d
cmpb $0x2b, 0x5b(%rbx)
jne 0x63be
leaq 0x1741(%rip), %rsi      # 0x7afd
jmp 0x63cb
cmpb $0x20, 0x5a(%rbx)
jne 0x63de
leaq 0x161a(%rip), %rsi      # 0x79e5
movl $0x1, %edx
movl $0x1, %edi
callq 0x1040
incq 0x30(%rbx)
cmpq $0x0, 0x10(%rbx)
je 0x640e
leaq 0x15f9(%rip), %r14      # 0x79e5
cmpb $0x2d, 0x5c(%rbx)
jne 0x640e
movl $0x1, %edx
movl $0x1, %edi
movq %r14, %rsi
callq 0x1040
incq 0x30(%rbx)
decq 0x10(%rbx)
jne 0x63ec
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/print_u.c
// Function: print_u
t_tags			*print_u(t_tags *ids)
{
	uintmax_t	nbr;
	size_t		len;
	char		*str;

	nbr = cast_unsigned_number(ids, 0);
	str = uimaxtoa_base(nbr, 10);
	len = ft_strlen(str);
	if (ids->period == 1 && ids->maxwth == 0 && nbr == 0)
	{
		period_zero(ids);
		return (ids);
	}
	prefix_print(ids, len);
	ft_putstr(str);
	ids->printed_chars += len;
	if (ids->minwth > len && ids->current_flag[4] == '-')
		minwth_print(ids, len);
	free(str);
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x5e1c
movq %rax, %r12
movl $0xa, %esi
movq %rax, %rdi
callq 0x5a85
movq %rax, %r14
movq %rax, %rdi
callq 0x48d0
movq %rax, %r15
movq 0x18(%rbx), %rax
cmpq $0x1, %rax
jne 0x645d
orq 0x20(%rbx), %r12
je 0x64e8
cmpq %r15, 0x10(%rbx)
jbe 0x648d
movb 0x5c(%rbx), %cl
cmpb $0x2d, %cl
je 0x648d
cmpb $0x30, 0x59(%rbx)
jne 0x6482
cmpb $0x2d, %cl
je 0x648d
cmpq $0x1, %rax
jne 0x648d
cmpb $0x30, 0x59(%rbx)
jne 0x648d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67cc
cmpb $0x30, 0x59(%rbx)
jne 0x6499
cmpq %r15, 0x10(%rbx)
ja 0x64a6
cmpq $0x1, 0x18(%rbx)
jne 0x64b1
cmpq %r15, 0x20(%rbx)
jbe 0x64b1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x66e1
movq %r14, %rdi
callq 0x4720
addq %r15, 0x30(%rbx)
cmpq %r15, 0x10(%rbx)
jbe 0x64d4
cmpb $0x2d, 0x5c(%rbx)
jne 0x64d4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67cc
movq %r14, %rdi
callq 0x1030
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x6344
jmp 0x64dc
nop
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/put_zeros.c
// Function: put_zero_df
t_tags			*put_zero_df(t_tags *ids, size_t len)
{
	if (ids->current_type == 'f')
	{
		len += ids->period == 0 ? 7 : ids->maxwth + 1;
	}
	if (ids->current_flag[4] == '-' && ids->minwth > len && ids->period == 0)
		return (ids);
	if (ids->current_flag[3] == '+' && ids->period == 0 && ids->negative == 1)
		len++;
	if (ids->current_flag[1] == '0' && ids->current_flag[2] == ' ' &&
	ids->minwth > len && ids->negative == 1)
		len++;
	if (ids->negative == -1 && ids->maxwth + 1 > len)
		len--;
	write_zero(ids, len);
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb 0x5e(%rdi), %al
cmpb $0x66, %al
jne 0x6523
cmpq $0x0, 0x18(%rbx)
je 0x651b
movq 0x20(%rbx), %rcx
incq %rcx
jmp 0x6520
movl $0x7, %ecx
addq %rcx, %r14
cmpb $0x2d, 0x5c(%rbx)
jne 0x653a
cmpq %r14, 0x10(%rbx)
jbe 0x653a
cmpq $0x0, 0x18(%rbx)
je 0x65ee
cmpb $0x2b, 0x5b(%rbx)
jne 0x6553
cmpq $0x0, 0x18(%rbx)
jne 0x6553
xorl %ecx, %ecx
cmpl $0x1, 0x40(%rbx)
sete %cl
addq %rcx, %r14
cmpb $0x30, 0x59(%rbx)
jne 0x6571
cmpb $0x20, 0x5a(%rbx)
jne 0x6571
cmpq %r14, 0x10(%rbx)
jbe 0x6571
xorl %ecx, %ecx
cmpl $0x1, 0x40(%rbx)
sete %cl
addq %rcx, %r14
cmpl $-0x1, 0x40(%rbx)
jne 0x6585
movq 0x20(%rbx), %rcx
incq %rcx
cmpq %rcx, %r14
sbbq $0x0, %r14
cmpb $0x66, %al
je 0x65c2
cmpq $0x1, 0x18(%rbx)
jne 0x65c2
cmpq %r14, 0x20(%rbx)
jbe 0x65ee
leaq 0x1562(%rip), %r15      # 0x7aff
movl $0x1, %edx
movl $0x1, %edi
movq %r15, %rsi
callq 0x1040
incq 0x30(%rbx)
decq 0x10(%rbx)
incq %r14
cmpq %r14, 0x20(%rbx)
ja 0x659d
jmp 0x65ee
cmpq %r14, 0x10(%rbx)
jbe 0x65ee
leaq 0x1530(%rip), %r15      # 0x7aff
movl $0x1, %edx
movl $0x1, %edi
movq %r15, %rsi
callq 0x1040
incq 0x30(%rbx)
incq %r14
cmpq %r14, 0x10(%rbx)
ja 0x65cf
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/put_zeros.c
// Function: put_zero_p
t_tags			*put_zero_p(t_tags *ids, size_t len)
{
	if (ids->current_flag[1] == '0' && ids->period == 1 && ids->maxwth < len)
		return (ids);
	else if (ids->current_type == 'p' && ids->current_flag[1] == '0'
	&& ids->period == 0)
		len += 2;
	if (ids->maxwth >= len)
	{
		maxwth_write(ids, len);
		return (ids);
	}
	while (ids->minwth > len)
	{
		write(1, "0", 1);
		len++;
		ids->printed_chars++;
	}
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb 0x59(%rdi), %al
cmpb $0x30, %al
jne 0x6620
cmpq $0x1, 0x18(%rbx)
jne 0x6620
cmpq %r14, 0x20(%rbx)
jb 0x6676
cmpb $0x30, %al
jne 0x6637
cmpb $0x70, 0x5e(%rbx)
jne 0x6637
leaq 0x2(%r14), %rax
cmpq $0x0, 0x18(%rbx)
cmoveq %rax, %r14
cmpq %r14, 0x20(%rbx)
jae 0x666b
cmpq %r14, 0x10(%rbx)
jbe 0x6676
leaq 0x14b5(%rip), %r15      # 0x7aff
movl $0x1, %edx
movl $0x1, %edi
movq %r15, %rsi
callq 0x1040
incq 0x30(%rbx)
incq %r14
cmpq %r14, 0x10(%rbx)
ja 0x664a
jmp 0x6676
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6684
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/put_zeros.c
// Function: maxwth_write
static t_tags	*maxwth_write(t_tags *ids, size_t len)
{
	while (ids->maxwth > len)
	{
		if (ids->minwth == 0)
			ids->minwth++;
		write(1, "0", 1);
		ids->minwth--;
		len++;
		ids->printed_chars++;
	}
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, 0x20(%rdi)
jbe 0x66d3
movq %rsi, %r14
leaq 0x145e(%rip), %r15      # 0x7aff
cmpq $0x0, 0x10(%rbx)
jne 0x66b0
movq $0x1, 0x10(%rbx)
movl $0x1, %edx
movl $0x1, %edi
movq %r15, %rsi
callq 0x1040
decq 0x10(%rbx)
incq 0x30(%rbx)
incq %r14
cmpq %r14, 0x20(%rbx)
ja 0x66a1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MikeyLHolm[P]Hive-lem-in/libftprintf/srcs/put_zeros.c
// Function: put_zero_oxu
t_tags			*put_zero_oxu(t_tags *ids, size_t len)
{
	if (ids->current_type == 'u' && ids->current_flag[1] == '0'
	&& ids->period == 1 && ids->maxwth < len)
		return (ids);
	if ((ids->current_type == 'o' || ids->current_type == 'x'
	|| ids->current_type == 'X') && ((ids->current_flag[1] == '0'
	&& ids->period == 1 && ids->maxwth < len)
	|| (ids->current_flag[4] == '-' && ids->minwth > len && ids->period == 0)))
		return (ids);
	if ((ids->current_type == 'x' || ids->current_type == 'X')
	&& ids->current_flag[0] == '#' && ids->maxwth <= len)
		len += 2;
	if (ids->maxwth >= len)
	{
		maxwth_write(ids, len);
		return (ids);
	}
	while (ids->minwth > len)
	{
		write(1, "0", 1);
		len++;
		ids->printed_chars++;
	}
	return (ids);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x5e(%rdi), %eax
cmpl $0x74, %eax
jg 0x6706
cmpl $0x58, %eax
je 0x673f
cmpl $0x6f, %eax
je 0x673f
jmp 0x677f
cmpl $0x78, %eax
je 0x673f
cmpl $0x75, %eax
jne 0x677f
cmpb $0x30, 0x59(%rbx)
jne 0x6727
cmpq $0x1, 0x18(%rbx)
jne 0x6727
cmpq %r14, 0x20(%rbx)
jb 0x67be
leal -0x58(%rax), %ecx
cmpl $0x20, %ecx
ja 0x677f
movabsq $0x100800001, %rdx      # imm = 0x100800001
btq %rcx, %rdx
jae 0x677f
cmpb $0x30, 0x59(%rbx)
jne 0x6752
cmpq $0x1, 0x18(%rbx)
jne 0x6752
cmpq %r14, 0x20(%rbx)
jb 0x67be
cmpb $0x2d, 0x5c(%rbx)
jne 0x6765
cmpq %r14, 0x10(%rbx)
jbe 0x6765
cmpq $0x0, 0x18(%rbx)
je 0x67be
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x677f
cmpb $0x23, 0x58(%rbx)
jne 0x677f
cmpq %r14, 0x20(%rbx)
leaq 0x2(%r14), %rax
cmovbeq %rax, %r14
cmpq %r14, 0x20(%rbx)
jae 0x67b3
cmpq %r14, 0x10(%rbx)
jbe 0x67be
leaq 0x136d(%rip), %r15      # 0x7aff
movl $0x1, %edx
movl $0x1, %edi
movq %r15, %rsi
callq 0x1040
incq 0x30(%rbx)
incq %r14
cmpq %r14, 0x10(%rbx)
ja 0x6792
jmp 0x67be
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6684
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/ae.c
// Function: aeResizeSetSize
int aeResizeSetSize(aeEventLoop *eventLoop, int setsize) {
    int i;

    if (setsize == eventLoop->setsize) return AE_OK;
    if (eventLoop->maxfd >= setsize) return AE_ERR;
    if (aeApiResize(eventLoop,setsize) == -1) return AE_ERR;

    eventLoop->events = realloc(eventLoop->events,sizeof(aeFileEvent)*setsize);
    eventLoop->fired = realloc(eventLoop->fired,sizeof(aeFiredEvent)*setsize);
    eventLoop->setsize = setsize;

    /* Make sure that if we created new slots, they are initialized with
     * an AE_NONE mask. */
    for (i = eventLoop->maxfd+1; i < setsize; i++)
        eventLoop->events[i].mask = AE_NONE;
    return AE_OK;
}

// Assembly:
xorl %eax, %eax
cmpl %esi, 0x4(%rdi)
je 0x2e6a
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %esi, (%rdi)
jge 0x2e5f
movq 0x38(%r14), %r12
movq 0x8(%r12), %rdi
movslq %ebx, %r15
leaq (,%r15,4), %rax
leaq (%rax,%rax,2), %rsi
callq 0x2310
movq %rax, 0x8(%r12)
movq 0x18(%r14), %rdi
movq %r15, %rsi
shlq $0x5, %rsi
callq 0x2310
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
leaq (,%r15,8), %rsi
callq 0x2310
movq %rax, 0x20(%r14)
movl %r15d, 0x4(%r14)
movslq (%r14), %rcx
leal 0x1(%rcx), %edx
movl $0x0, %eax
cmpl %r15d, %edx
jge 0x2e5f
movq 0x18(%r14), %rdx
subl %ecx, %ebx
addl $-0x2, %ebx
leaq 0x4(%rbx), %rax
andq $-0x4, %rax
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shlq $0x5, %rcx
addq %rdx, %rcx
addq $0x80, %rcx
xorl %edx, %edx
movdqa 0x5289(%rip), %xmm1     # 0x8010
movdqa 0x5291(%rip), %xmm2     # 0x8020
movdqa 0x5299(%rip), %xmm3     # 0x8030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x2de9
movl $0x0, -0x60(%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x2dff
movl $0x0, -0x40(%rcx)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %esi
testb $0x1, %sil
je 0x2e3b
movl $0x0, -0x20(%rcx)
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x2e4c
movl $0x0, (%rcx)
addq $0x4, %rdx
subq $-0x80, %rcx
cmpq %rdx, %rax
jne 0x2d9f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/ae.c
// Function: aeDeleteEventLoop
void aeDeleteEventLoop(aeEventLoop *eventLoop) {
    aeApiFree(eventLoop);
    free(eventLoop->events);
    free(eventLoop->fired);
    free(eventLoop);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r14
movl (%r14), %edi
callq 0x21b0
movq 0x8(%r14), %rdi
callq 0x2030
movq %r14, %rdi
callq 0x2030
movq 0x18(%rbx), %rdi
callq 0x2030
movq 0x20(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/ae.c
// Function: aeDeleteTimeEvent
int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id)
{
    aeTimeEvent *te, *prev = NULL;

    te = eventLoop->timeEventHead;
    while(te) {
        if (te->id == id) {
            if (prev == NULL)
                eventLoop->timeEventHead = te->next;
            else
                prev->next = te->next;
            if (te->finalizerProc)
                te->finalizerProc(eventLoop, te->clientData);
            free(te);
            return AE_OK;
        }
        prev = te;
        te = te->next;
    }
    return AE_ERR; /* NO event with the specified ID found */
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x31ae
cmpq %rsi, (%rbx)
jne 0x3168
xorl %ecx, %ecx
jmp 0x317f
movq %rbx, %rdx
movq 0x30(%rdx), %rbx
testq %rbx, %rbx
je 0x31ae
movq %rdx, %rcx
movq %rbx, %rdx
cmpq %rsi, (%rbx)
jne 0x316b
leaq 0x28(%rdi), %rax
leaq 0x30(%rcx), %rdx
testq %rcx, %rcx
cmoveq %rax, %rdx
movq 0x30(%rbx), %rax
movq %rax, (%rdx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x31a4
movq 0x28(%rbx), %rsi
callq *%rax
movq %rbx, %rdi
callq 0x2030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/assoc.c
// Function: assoc_init
void assoc_init(void) {
    unsigned int hash_size = hashsize(HASHPOWER) * sizeof(void*);
    hashtable = malloc(hash_size);
    if (! hashtable) {
        fprintf(stderr, "Failed to init hashtable.\n");
        exit(1);
    }
    memset(hashtable, 0, hash_size);
}

// Assembly:
pushq %rax
movl $0x800000, %edi         # imm = 0x800000
callq 0x22c0
movq %rax, 0x9a52(%rip)      # 0xd258
testq %rax, %rax
je 0x381b
movl $0x800000, %edx         # imm = 0x800000
movq %rax, %rdi
xorl %esi, %esi
popq %rax
jmp 0x2190
callq 0x2480
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/assoc.c
// Function: assoc_find
item *assoc_find(char *key) {
    ub4 hv = hash(key, strlen(key), 0) & hashmask(HASHPOWER);
    item *it = hashtable[hv];

    while (it) {
        if (strcmp(key, ITEM_key(it)) == 0)
            return it;
        it = it->h_next;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x2120
xorl %r14d, %r14d
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x360c
andl $0xfffff, %eax          # imm = 0xFFFFF
movq 0x9a0f(%rip), %rcx      # 0xd258
movq (%rcx,%rax,8), %r15
testq %r15, %r15
je 0x3873
xorl %r14d, %r14d
leaq 0x30(%r15), %rsi
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x3870
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x3855
jmp 0x3873
movq %r15, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/assoc.c
// Function: assoc_insert
int assoc_insert(char *key, item *it) {
    ub4 hv;
    assert(assoc_find(key) == 0);  /* shouldn't have duplicately named things defined */
    hv = hash(key, strlen(key), 0) & hashmask(HASHPOWER);
    it->h_next = hashtable[hv];
    hashtable[hv] = it;
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2120
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x360c
andl $0xfffff, %eax          # imm = 0xFFFFF
movq 0x99b4(%rip), %rcx      # 0xd258
movq (%rcx,%rax,8), %rdx
movq %rdx, 0x10(%rbx)
movq %rbx, (%rcx,%rax,8)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/assoc.c
// Function: assoc_delete
void assoc_delete(char *key) {
    item **before = _hashitem_before(key);
    if (*before) {
        item *nxt = (*before)->h_next;
        (*before)->h_next = 0;   /* probably pointless, but whatever. */
        *before = nxt;
        return;
    }
    /* Note:  we never actually get here.  the callers don't delete things
       they can't find. */
    assert(*before != 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x2120
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x360c
andl $0xfffff, %eax          # imm = 0xFFFFF
movq 0x9975(%rip), %rcx      # 0xd258
leaq (%rcx,%rax,8), %r14
movq (%r14), %r15
testq %r15, %r15
je 0x391f
leaq 0x30(%r15), %rsi
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x391f
movq %r15, %r14
movq 0x10(%r15), %r15
testq %r15, %r15
je 0x391b
leaq 0x30(%r15), %rsi
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
jne 0x38ff
addq $0x10, %r14
movq (%r14), %rax
testq %rax, %rax
je 0x3936
movq 0x10(%rax), %rcx
movq $0x0, 0x10(%rax)
movq %rcx, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/command.c
// Function: command_service_create
command_service_ptr command_service_create() {
    command_service_ptr cmd_srv;
    cmd_srv = (command_service_ptr)calloc(1, sizeof(command_service));
    if (NULL == cmd_srv) {
        exit(-1);
    }
    return cmd_srv;
}

// Assembly:
pushq %rax
movl $0x1, %edi
movl $0x18, %esi
callq 0x2220
testq %rax, %rax
je 0x3953
popq %rcx
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2410
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/command.c
// Function: command_service_run
int32_t command_service_run(command_service_ptr service, char *cmd_s, int argc, char **argv) {
    command_info_ptr cmd;
    for (cmd = service->command_list; NULL != cmd; cmd = cmd->next) {
        if (FIXED_PREFIX == cmd->type && strncmp(cmd_s, cmd->cmd, cmd->cmd_len) == 0) {
            return cmd->handler(cmd_s, argc, argv);
        }
        if (FULL_MATCH == cmd->type && strcmp(cmd_s, cmd->cmd) == 0) {
            return cmd->handler(cmd_s, argc, argv);
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x3afc
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movl 0xc(%r15), %r12d
testl %r12d, %r12d
je 0x3ae4
cmpl $0x1, %r12d
jne 0x3af3
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x3b0a
testl %r12d, %r12d
jne 0x3af3
movq (%r15), %rsi
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x3b0a
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x3abd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rax
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/command.c
// Function: command_service_destory
void command_service_destory(command_service_ptr service) {
    command_info_ptr cmd, next_cmd;
    
    if (NULL == service) {
        return;
    }
    cmd = service->command_list;
    while (NULL != cmd) {
        next_cmd = cmd->next;
        free(cmd->cmd);
        free(cmd);
        cmd = next_cmd;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x3b54
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x3b4d
movq (%rbx), %rdi
movq 0x18(%rbx), %r14
callq 0x2030
movq %rbx, %rdi
callq 0x2030
movq %r14, %rbx
testq %r14, %r14
jne 0x3b31
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: conn_cleanup
void conn_cleanup(conn *c) {
    if (c->item) {
        item_free(c->item);
        c->item = 0;
    }

    if (c->ileft) {
        for (; c->ileft > 0; c->ileft--,c->icurr++) {
            item_remove(*(c->icurr));
        }
    }

    if (c->write_and_free) {
        free(c->write_and_free);
        c->write_and_free = 0;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
je 0x3f03
callq 0x4743
movq $0x0, 0x68(%rbx)
cmpl $0x0, 0xb8(%rbx)
je 0x3f40
cmpl $0x0, 0xb8(%rbx)
jle 0x3f40
movq 0xb0(%rbx), %rax
movq (%rax), %rdi
callq 0x489f
movl 0xb8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xb8(%rbx)
addq $0x8, 0xb0(%rbx)
cmpl $0x1, %eax
jg 0x3f15
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x3f56
callq 0x2030
movq $0x0, 0x50(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: conn_close
void conn_close(conn *c) {
    /* delete the event, the socket and the conn */
    aeDeleteFileEvent(g_el, c->sfd, AE_READABLE); 
    aeDeleteFileEvent(g_el, c->sfd, AE_WRITABLE);

    LOG_DEBUG_F1("<%d connection closed.\n", c->sfd);

    close(c->sfd);
    conn_cleanup(c);

    /* if the connection has big buffers, just free it */
    if (c->rsize > READ_BUFFER_HIGHWAT) {
        conn_free(c);
    } else if (freecurr < freetotal) {
        /* if we have enough space in the free connections array, put the structure there */
        freeconns[freecurr++] = c;
    } else {
        /* try to enlarge free connections array */
        conn **new_freeconns = realloc(freeconns, sizeof(conn *)*freetotal*2);
        if (new_freeconns) {
            freetotal *= 2;
            freeconns = new_freeconns;
            freeconns[freecurr++] = c;
        } else {
            conn_free(c);
        }
    }

    -- stats.curr_conns;

    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9311(%rip), %r14      # 0xd278
movq (%r14), %rdi
movl (%rbx), %esi
movl $0x1, %edx
callq 0x2f7e
movq (%r14), %rdi
movl (%rbx), %esi
movl $0x2, %edx
callq 0x2f7e
leaq 0x92fc(%rip), %rax      # 0xd288
cmpl $0x2, 0x18(%rax)
jge 0x4023
movl (%rbx), %edi
callq 0x21b0
movq %rbx, %rdi
callq 0x3ee9
cmpl $0x2001, 0x28(%rbx)     # imm = 0x2001
jl 0x3fb8
movq %rbx, %rdi
callq 0x4030
jmp 0x4013
movslq 0x92a5(%rip), %r14      # 0xd264
movslq 0x929a(%rip), %r15      # 0xd260
movq 0x929b(%rip), %rdi      # 0xd268
cmpl %r15d, %r14d
jge 0x3fe3
movl %r14d, %eax
incl %eax
movl %eax, 0x9287(%rip)      # 0xd264
movq %rbx, (%rdi,%r14,8)
jmp 0x4013
movq %r15, %rsi
shlq $0x4, %rsi
callq 0x2310
testq %rax, %rax
je 0x3fae
addl %r15d, %r15d
movl %r15d, 0x9262(%rip)     # 0xd260
movq %rax, 0x9263(%rip)      # 0xd268
leal 0x1(%r14), %ecx
movl %ecx, 0x9255(%rip)      # 0xd264
movq %rbx, (%rax,%r14,8)
leaq 0x92c6(%rip), %rax      # 0xd2e0
decl 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x255e
jmp 0x3f96
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: conn_free
static void conn_free(conn *c) {
    if (c) {
        if (c->hdrbuf)
            free(c->hdrbuf);
        if (c->msglist)
            free(c->msglist);
        if (c->rbuf)
            free(c->rbuf);
        if (c->wbuf)
            free(c->wbuf);
        if (c->ilist)
            free(c->ilist);
        if (c->iov)
            free(c->iov);
        free(c);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x409f
pushq %rbx
movq %rdi, %rbx
movq 0xd8(%rdi), %rdi
testq %rdi, %rdi
je 0x404a
callq 0x2030
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x405b
callq 0x2030
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4069
callq 0x2030
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4077
callq 0x2030
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x4088
callq 0x2030
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x4096
callq 0x2030
movq %rbx, %rdi
popq %rbx
jmp 0x2030
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: do_realloc
int do_realloc(void **orig, int newsize, int bytes_per_item, int *size) {
    void *newbuf = realloc(*orig, newsize * bytes_per_item);
    if (newbuf) {
        *orig = newbuf;
        *size = newsize;
       return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
imull %esi, %edx
movslq %edx, %rsi
callq 0x2310
testq %rax, %rax
je 0x40cb
movq %rax, (%r14)
movl %ebp, (%rbx)
movl $0x1, %eax
jmp 0x40cd
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: conn_shrink
void conn_shrink(conn *c) {
    if (c->udp)
        return;

    if (c->rsize > READ_BUFFER_HIGHWAT && c->rbytes < DATA_BUFFER_SIZE) {
       do_realloc((void **)&c->rbuf, DATA_BUFFER_SIZE, 1, &c->rsize);
    }

    if (c->isize > ITEM_LIST_HIGHWAT) {
        do_realloc((void **)&c->ilist, ITEM_LIST_INITIAL, sizeof(c->ilist[0]), &c->isize);
    }

    if (c->msgsize > MSG_LIST_HIGHWAT) {
        do_realloc((void **)&c->msglist, MSG_LIST_INITIAL, sizeof(c->msglist[0]), &c->msgsize);
    }

    if (c->iovsize > IOV_LIST_HIGHWAT) {
        do_realloc((void **)&c->iov, IOV_LIST_INITIAL, sizeof(c->iov[0]), &c->iovsize);
    }
}

// Assembly:
cmpl $0x0, 0xbc(%rdi)
je 0x40dc
retq
pushq %rbx
movq %rdi, %rbx
cmpl $0x2001, 0x28(%rdi)     # imm = 0x2001
jl 0x4110
cmpl $0x7ff, 0x2c(%rbx)      # imm = 0x7FF
jg 0x4110
movq 0x18(%rbx), %rdi
movl $0x800, %esi            # imm = 0x800
callq 0x2310
testq %rax, %rax
je 0x4110
movq %rax, 0x18(%rbx)
movl $0x800, 0x28(%rbx)      # imm = 0x800
cmpl $0x191, 0xa8(%rbx)      # imm = 0x191
jl 0x4143
movq 0xa0(%rbx), %rdi
movl $0x640, %esi            # imm = 0x640
callq 0x2310
testq %rax, %rax
je 0x4143
movq %rax, 0xa0(%rbx)
movl $0xc8, 0xa8(%rbx)
cmpl $0x65, 0x90(%rbx)
jl 0x4173
movq 0x88(%rbx), %rdi
movl $0x230, %esi            # imm = 0x230
callq 0x2310
testq %rax, %rax
je 0x4173
movq %rax, 0x88(%rbx)
movl $0xa, 0x90(%rbx)
cmpl $0x259, 0x80(%rbx)      # imm = 0x259
jl 0x41a0
movq 0x78(%rbx), %rdi
movl $0x1900, %esi           # imm = 0x1900
callq 0x2310
testq %rax, %rax
je 0x41a0
movq %rax, 0x78(%rbx)
movl $0x190, 0x80(%rbx)      # imm = 0x190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: conn_set_state
void conn_set_state(conn *c, int state) {
    if (state != c->state) {
        if (state == conn_read) {
            conn_shrink(c);
        }
        c->state = state;
    }
}

// Assembly:
cmpl %esi, 0x4(%rdi)
je 0x41c8
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x1, %esi
jne 0x41bd
movq %r14, %rdi
callq 0x40d2
movl %ebx, 0x4(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: out_string
void out_string(conn *c, char *str) {
    int len;

    LOG_DEBUG_F2(">%d %s\n", c->sfd, str);

    len = strlen(str);
    if (len + 2 > c->wsize) {
        /* ought to be always enough. just fail for simplicity */
        str = "SERVER_ERROR output line too long";
        len = strlen(str);
    }

    strcpy(c->wbuf, str);
    strcpy(c->wbuf + len, "\r\n");
    c->wbytes = len + 2;
    c->wcurr = c->wbuf;

    conn_set_state(c, conn_write);
    c->write_and_go = conn_read;
    return;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90ae(%rip), %rax      # 0xd288
cmpl $0x2, 0x18(%rax)
jge 0x4243
movq %r14, %rdi
callq 0x2120
leal 0x2(%rax), %ecx
cmpl 0x40(%rbx), %ecx
leaq 0x4058(%rip), %rsi      # 0x824d
cmovleq %r14, %rsi
movl $0x21, %ebp
cmovlel %eax, %ebp
movq 0x30(%rbx), %rdi
callq 0x2090
movq 0x30(%rbx), %rax
movslq %ebp, %rcx
movw $0xa0d, (%rax,%rcx)     # imm = 0xA0D
movb $0x0, 0x2(%rax,%rcx)
addl $0x2, %ecx
movl %ecx, 0x44(%rbx)
movq 0x30(%rbx), %rax
movq %rax, 0x38(%rbx)
cmpl $0x2, 0x4(%rbx)
je 0x4237
movl $0x2, 0x4(%rbx)
movl $0x1, 0x48(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8dae(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movl (%rbx), %edx
leaq 0x3fef(%rip), %rsi      # 0x8245
movq %r14, %rcx
xorl %eax, %eax
callq 0x2260
jmp 0x41e0
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: add_iov
int add_iov(conn *c, const void *buf, int len) {
    struct msghdr *m;
    int leftover;
    int limit_to_mtu;

    do {
        m = &c->msglist[c->msgused - 1];

        /*
         * Limit UDP packets, and the first payloads of TCP replies, to
         * UDP_MAX_PAYLOAD_SIZE bytes.
         */
        limit_to_mtu = c->udp || (1 == c->msgused);

        /* We may need to start a new msghdr if this one is full. */
        if (m->msg_iovlen == IOV_MAX ||
                (limit_to_mtu && c->msgbytes >= UDP_MAX_PAYLOAD_SIZE)) {
            add_msghdr(c);
            m = &c->msglist[c->msgused - 1];
        }

        if (ensure_iov_space(c))
            return -1;

        /* If the fragment is too big to fit in the datagram, split it up */
        if (limit_to_mtu && len + c->msgbytes > UDP_MAX_PAYLOAD_SIZE) {
            leftover = len + c->msgbytes - UDP_MAX_PAYLOAD_SIZE;
            len -= leftover;
        } else {
            leftover = 0;
        }

        m = &c->msglist[c->msgused - 1];
        m->msg_iov[m->msg_iovlen].iov_base = (void*) buf;
        m->msg_iov[m->msg_iovlen].iov_len = len;

        c->msgbytes += len;
        c->iovused++;
        m->msg_iovlen++;

        buf = ((char *)buf) + len;
        len = leftover;
    } while (leftover > 0);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x88(%r14), %rax
movslq 0x94(%r14), %rcx
cmpq $0x1, %rcx
sete %dl
imulq $0x38, %rcx, %rcx
cmpl $0x0, 0xbc(%r14)
setne %r15b
orb %dl, %r15b
cmpq $0x400, -0x20(%rax,%rcx) # imm = 0x400
jne 0x42b1
movq %r14, %rdi
callq 0x4359
jmp 0x42c3
testb %r15b, %r15b
je 0x42c3
cmpl $0x578, 0x9c(%r14) # imm = 0x578
jge 0x42a7
movq %r14, %rdi
xorl %eax, %eax
callq 0x4f4b
testl %eax, %eax
jne 0x4349
xorl %eax, %eax
testb %r15b, %r15b
je 0x42f3
movl 0x9c(%r14), %ecx
addl %ebp, %ecx
cmpl $0x579, %ecx            # imm = 0x579
jl 0x42f3
addl $0xfffffa88, %ecx       # imm = 0xFFFFFA88
subl %ecx, %ebp
jmp 0x42f5
xorl %ecx, %ecx
movq 0x88(%r14), %rdx
movslq 0x94(%r14), %rsi
imulq $0x38, %rsi, %rsi
movq -0x28(%rdx,%rsi), %rdi
movq -0x20(%rdx,%rsi), %r8
movq %r8, %r9
shlq $0x4, %r9
movq %rbx, (%rdi,%r9)
movslq %ebp, %r10
movq %r10, 0x8(%rdi,%r9)
addl %r10d, 0x9c(%r14)
incl 0x84(%r14)
incq %r8
movq %r8, -0x20(%rdx,%rsi)
addq %r10, %rbx
movl %ecx, %ebp
testl %ecx, %ecx
jg 0x4274
jmp 0x434e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/connection.c
// Function: add_msghdr
int add_msghdr(conn *c) {
    struct msghdr *msg;

    if (c->msgsize == c->msgused) {
        msg = realloc(c->msglist, c->msgsize * 2 * sizeof(struct msghdr));
        if (! msg)
            return -1;
        c->msglist = msg;
        c->msgsize *= 2;
    }

    msg = c->msglist + c->msgused;

    /* this wipes msg_iovlen, msg_control, msg_controllen, and
       msg_flags, the last 3 of which aren't defined on solaris: */
    memset(msg, 0, sizeof(struct msghdr));

    msg->msg_iov = &c->iov[c->iovused];
    msg->msg_name = &c->request_addr;
    msg->msg_namelen = c->request_addr_size;

    c->msgbytes = 0;
    c->msgused++;

    if (c->udp) {
        /* Leave room for the UDP header, which we'll fill in later. */
        return add_iov(c, NULL, UDP_HEADER_SIZE);
    }

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x90(%rdi), %rax
cmpl 0x94(%rdi), %eax
jne 0x4392
movq 0x88(%rbx), %rdi
imulq $0x70, %rax, %rsi
callq 0x2310
testq %rax, %rax
je 0x4414
movq %rax, 0x88(%rbx)
shll 0x90(%rbx)
movq 0x88(%rbx), %rax
movslq 0x94(%rbx), %rcx
imulq $0x38, %rcx, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax,%rcx)
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq $0x0, 0x30(%rax,%rcx)
movslq 0x84(%rbx), %rdx
shlq $0x4, %rdx
addq 0x78(%rbx), %rdx
movq %rdx, 0x10(%rax,%rcx)
leaq 0xc4(%rbx), %rdx
movq %rdx, (%rax,%rcx)
movl 0xd4(%rbx), %edx
movl %edx, 0x8(%rax,%rcx)
movl $0x0, 0x9c(%rbx)
incl 0x94(%rbx)
cmpl $0x0, 0xbc(%rbx)
je 0x4410
movq %rbx, %rdi
xorl %esi, %esi
movl $0x8, %edx
popq %rbx
jmp 0x4265
xorl %eax, %eax
jmp 0x4419
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/daemon.c
// Function: daemon
int daemon(int nochdir, int noclose) {
    int fd;

    switch (fork()) {
        case -1:
            return (-1);
        case 0:
            break;
        default:
            _exit(0);
    }

    if (setsid() == -1)
        return (-1);

    if (!nochdir) {
        if (chdir("/") < 0) {
            return -1;
        }
    }

    if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
        (void)dup2(fd, STDIN_FILENO);
        (void)dup2(fd, STDOUT_FILENO);
        (void)dup2(fd, STDERR_FILENO);
        if (fd > STDERR_FILENO)
            (void)close(fd);
    }
    return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
callq 0x2450
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x4463
testl %ebx, %ebx
jne 0x44b9
callq 0x21c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x4463
testl %r14d, %r14d
jne 0x445d
leaq 0x3e1b(%rip), %rdi      # 0x826f
callq 0x2130
testl %eax, %eax
js 0x4463
xorl %ebx, %ebx
testl %ebp, %ebp
je 0x446a
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3e00(%rip), %rdi      # 0x8271
xorl %ebx, %ebx
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2380
cmpl $-0x1, %eax
je 0x4463
movl %eax, %ebp
xorl %ebx, %ebx
movl %eax, %edi
xorl %esi, %esi
callq 0x2160
movl %ebp, %edi
movl $0x1, %esi
callq 0x2160
movl %ebp, %edi
movl $0x2, %esi
callq 0x2160
cmpl $0x3, %ebp
jl 0x4463
movl %ebp, %edi
callq 0x21b0
jmp 0x4463
xorl %edi, %edi
callq 0x2080
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/items.c
// Function: item_init
void item_init() {
    int i;
    for(i=0; i<LARGEST_ID; i++) {
        heads[i]=0;
        tails[i]=0;
        sizes[i]=0;
    }
}

// Assembly:
pushq %rax
leaq 0x8e88(%rip), %rdi      # 0xd350
movl $0x7f8, %edx            # imm = 0x7F8
xorl %esi, %esi
callq 0x2190
leaq 0x9675(%rip), %rdi      # 0xdb50
movl $0x7f8, %edx            # imm = 0x7F8
xorl %esi, %esi
callq 0x2190
leaq 0x9e62(%rip), %rdi      # 0xe350
movl $0x3fc, %edx            # imm = 0x3FC
xorl %esi, %esi
popq %rax
jmp 0x2190
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/items.c
// Function: item_make_header
int item_make_header(char *key, int flags, int nbytes,
                     char *suffix, int *nsuffix, int *keylen) {
    *keylen = strlen(key) + 1; 
    if(*keylen % 4) {
        *keylen += 4 - (*keylen % 4);
    }
    *nsuffix = sprintf(suffix, " %u %u\r\n", flags, nbytes - 2);
    return sizeof(item) + *keylen + *nsuffix + nbytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebx
movl %esi, %ebp
callq 0x2120
leal 0x1(%rax), %ecx
leal 0x4(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $-0x4, %edx
negl %edx
addl %eax, %edx
incl %edx
subl %edx, %eax
addl $0x5, %eax
testl %edx, %edx
cmovel %ecx, %eax
movl %eax, (%r14)
leal -0x2(%rbx), %ecx
leaq 0x3d3b(%rip), %rsi      # 0x827b
movq %r12, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2400
movl %eax, (%r15)
movl (%r14), %ecx
addl %eax, %ebx
leal (%rcx,%rbx), %eax
addl $0x30, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/items.c
// Function: item_unlink
void item_unlink(item *it) {
    if (it->it_flags & ITEM_LINKED) {
        it->it_flags &= ~ITEM_LINKED;
        stats.curr_bytes -= ITEM_ntotal(it);
        stats.curr_items -= 1;
        assoc_delete(ITEM_key(it));
        item_unlink_q(it);
    }
    if (it->refcount == 0) {
        item_free(it);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x27(%rdi), %al
testb $0x1, %al
je 0x470c
andb $-0x2, %al
movb %al, 0x27(%rbx)
movzbl 0x29(%rbx), %eax
movzbl 0x26(%rbx), %ecx
addq %rax, %rcx
movslq 0x20(%rbx), %rax
addq %rcx, %rax
leaq 0x8bf9(%rip), %rcx      # 0xd2e0
movq 0x8(%rcx), %rdx
negq %rax
addq %rdx, %rax
addq $-0x30, %rax
movq %rax, 0x8(%rcx)
decl (%rcx)
leaq 0x30(%rbx), %rdi
callq 0x38bd
movq %rbx, %rdi
callq 0x47e4
cmpw $0x0, 0x24(%rbx)
je 0x4715
popq %rbx
retq
movzbl 0x29(%rbx), %eax
movzbl 0x26(%rbx), %ecx
addl %eax, %ecx
movl 0x20(%rbx), %eax
leal (%rax,%rcx), %edx
addl $0x30, %edx
movb $0x0, 0x28(%rbx)
orb $0x4, 0x27(%rbx)
leaq 0x8c01(%rip), %rax      # 0xd338
movq (%rax), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x4e4b
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/items.c
// Function: item_free
void item_free(item *it) {
    unsigned int ntotal = ITEM_ntotal(it);
    assert((it->it_flags & ITEM_LINKED) == 0);
    assert(it != heads[it->slabs_clsid]);
    assert(it != tails[it->slabs_clsid]);
    assert(it->refcount == 0);

    /* so slab size changer can tell later if item is already free or not */
    it->slabs_clsid = 0;
    it->it_flags |= ITEM_SLABBED;
    mem_cache_free(mem_cache, it, ntotal);
}

// Assembly:
movq %rdi, %rsi
movzbl 0x29(%rdi), %eax
movzbl 0x26(%rdi), %ecx
addl %eax, %ecx
movl 0x20(%rdi), %eax
leal (%rax,%rcx), %edx
addl $0x30, %edx
movb $0x0, 0x28(%rdi)
orb $0x4, 0x27(%rdi)
leaq 0x8bd0(%rip), %rax      # 0xd338
movq (%rax), %rdi
jmp 0x4e4b
// File: /workspace/github_c_makefile_star2_O1/zuocheng-liu[P]ae-memcached/src/items.c
// Function: item_link_q
void item_link_q(item *it) { /* item is the new head */
    item **head, **tail;
    /* always true, warns: assert(it->slabs_clsid <= LARGEST_ID); */
    assert((it->it_flags & ITEM_SLABBED) == 0);

    head = &heads[it->slabs_clsid];
    tail = &tails[it->slabs_clsid];
    assert(it != *head);
    assert((*head && *tail) || (*head == 0 && *tail == 0));
    it->prev = 0;
    it->next = *head;
    if (it->next) it->next->prev = it;
    *head = it;
    if (*tail == 0) *tail = it;
    sizes[it->slabs_clsid]++;
    return;
}

// Assembly:
movzbl 0x28(%rdi), %eax
leaq 0x8bac(%rip), %rcx      # 0xd350
movq $0x0, 0x8(%rdi)
movq (%rcx,%rax,8), %rdx
movq %rdx, (%rdi)
testq %rdx, %rdx
je 0x47bc
movq %rdi, 0x8(%rdx)
leal (,%rax,8), %edx
movq %rdi, (%rdx,%rcx)
leaq 0x9382(%rip), %rcx      # 0xdb50
cmpq $0x0, (%rdx,%rcx)
jne 0x47d9
movq %rdi, (%rcx,%rax,8)
leaq 0x9b70(%rip), %rcx      # 0xe350
incl (%rcx,%rax,4)
retq