LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/converter.c
// Function: get_converted_string
char		*get_converted_string(long long arg, t_conversion *conv)
{
	if (ft_strchr("dDioOuUxXp", conv->conversion) != NULL)
		return (convert_decimals(arg, conv));
	else if (ft_strchr("s", conv->conversion) != NULL)
		return (convert_strings(arg, conv));
	else if (ft_strchr("cC", conv->conversion) != NULL)
		return (convert_chars(arg, conv));
	return (NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movsbl 0x20(%rsi), %esi
leaq 0x1611(%rip), %rdi      # 0x6676
callq 0x416c
movsbl 0x20(%r14), %esi
testq %rax, %rax
je 0x509f
movzbl %sil, %eax
addl $-0x44, %eax
cmpl $0x25, %eax
ja 0x50ee
movabsq $0x2100000001, %rcx     # imm = 0x2100000001
btq %rax, %rcx
jae 0x50ee
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x58b4
leaq 0x1031(%rip), %rdi      # 0x60d7
callq 0x416c
movsbl 0x20(%r14), %esi
testq %rax, %rax
je 0x510e
cmpb $0x73, %sil
jne 0x51a5
testq %rbx, %rbx
je 0x5176
movq 0x18(%r14), %rdi
movl $0x6c, %esi
callq 0x416c
movq %rbx, %rdi
testq %rax, %rax
je 0x517d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x51f0
movl %esi, %eax
andb $-0x21, %al
cmpb $0x4f, %al
je 0x515c
movl %esi, %eax
andl $0xdf, %eax
cmpl $0x55, %eax
jne 0x5165
leaq 0x113a(%rip), %rsi      # 0x6243
jmp 0x5196
leaq 0x15cd(%rip), %rdi      # 0x66e2
callq 0x416c
testq %rax, %rax
je 0x51a5
movq %rbx, (%rsp)
cmpq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
jg 0x51a5
testq %rbx, %rbx
je 0x51b2
movq 0x18(%r14), %rdi
movl $0x6c, %esi
callq 0x416c
testq %rax, %rax
je 0x51c3
movl (%rsp), %edi
callq 0x5293
movq %rax, (%rsp)
movl $0x8, %r14d
jmp 0x51c9
leaq 0x151e(%rip), %rsi      # 0x6681
jmp 0x5196
movl %esi, %eax
andb $-0x9, %al
cmpb $0x70, %al
jne 0x5189
leaq 0x1516(%rip), %rsi      # 0x668a
jmp 0x5196
leaq 0x152f(%rip), %rdi      # 0x66ac
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4120
cmpb $0x58, %sil
jne 0x51a5
leaq 0x1505(%rip), %rsi      # 0x669b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5978
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x14fa(%rip), %rdi      # 0x66b3
callq 0x4120
movq %rax, %rbx
jmp 0x51a7
movl $0x1, %r14d
leaq 0x1(%r14), %rdi
callq 0x5a2c
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x59fc
movq %rbx, %rdi
callq 0x5a54
jmp 0x51a7
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/utf.c
// Function: convert_utf_string
char		*convert_utf_string(wint_t *endpoints_list)
{
	char		*out;
	char		*old;
	char		*new;
	long long	utf;

	if (*endpoints_list == '\0')
		return (ft_strdup(""));
	out = NULL;
	while (*endpoints_list != (wint_t)0)
	{
		old = out;
		utf = convert_utf(*endpoints_list);
		new = ft_strnew(sizeof(long long) + 1);
		ft_memcpy(new, &utf, sizeof(long long));
		out = ft_strjoin(old, ft_strrev(new));
		free(old);
		free(new);
		endpoints_list++;
	}
	return (out);
}

// Assembly:
cmpl $0x0, (%rdi)
je 0x5273
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
je 0x527f
addq $0x4, %rbx
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
callq 0x5293
movq %rax, 0x8(%rsp)
movl $0x9, %edi
callq 0x5a2c
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x59fc
movq %r13, %rdi
callq 0x5a54
movq %r15, %rdi
movq %rax, %rsi
callq 0x4298
movq %rax, %r12
movq %r15, %rdi
callq 0x1030
movq %r13, %rdi
callq 0x1030
movl (%rbx), %edi
addq $0x4, %rbx
movq %r12, %r15
testl %edi, %edi
jne 0x5217
jmp 0x5282
leaq 0xffb(%rip), %rdi       # 0x6275
jmp 0x4120
xorl %r12d, %r12d
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/utf.c
// Function: convert_utf
long long	convert_utf(wint_t arg)
{
	unsigned char		power;
	int					rang;
	unsigned long long	out;

	if (arg <= 0x7F)
		return (arg);
	power = 0x3F;
	rang = 0;
	out = 0;
	while (arg > (wint_t)power)
	{
		out += (long long)((arg & 0x3F) | 0x80) << (rang++ * 8);
		power /= 2;
		arg >>= 6;
	}
	out += (long long)((unsigned char)(~power << 1) | arg) << (rang * 8);
	return (out);
}

// Assembly:
cmpl $0x80, %edi
jae 0x529e
movl %edi, %eax
retq
movl $0x3f, %esi
xorl %ecx, %ecx
xorl %edx, %edx
movl %edi, %r8d
andl $0x3f, %r8d
orl $0x80, %r8d
shlq %cl, %r8
movl %esi, %eax
addq %r8, %rdx
shrl %esi
shrl $0x6, %edi
addq $0x8, %rcx
cmpl %esi, %edi
ja 0x52a7
andl $0x3e, %eax
xorl $0xfe, %eax
orl %edi, %eax
andb $-0x8, %cl
shlq %cl, %rax
addq %rdx, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/flags.c
// Function: process_flags
char		*process_flags(char *str, t_conversion *conv)
{
	char	*out;

	if (str == NULL)
		str = ft_strdup("");
	out = str;
	if (ft_strchr(conv->flags, '+') != NULL
			|| ft_strchr(conv->flags, ' ') != NULL)
		out = sign_wrapper(out, conv);
	if (ft_strchr(conv->flags, '#') != NULL)
		out = hash_wrapper(out, conv);
	if (ft_strchr(conv->flags, '-') != NULL)
		out = minus_wrapper(out, conv);
	else if (ft_strchr(conv->flags, '0') != NULL
			&& (!(ft_strchr("diouxX", conv->conversion) && *(conv->precision))
			|| conv->conversion == 0))
		out = zero_wrapper(out, ft_atoi(conv->width));
	out = space_wrapper(out, ft_atoi(conv->width));
	return (out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
jne 0x5303
leaq 0xf7a(%rip), %rdi       # 0x6275
callq 0x4120
movq %rax, %r14
movq (%rbx), %rdi
movl $0x2b, %esi
callq 0x416c
testq %rax, %rax
jne 0x5327
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x416c
testq %rax, %rax
je 0x538f
movsbl 0x20(%rbx), %esi
leaq 0x138a(%rip), %rdi      # 0x66bc
callq 0x416c
testq %rax, %rax
jne 0x538f
cmpb $0x2d, (%r14)
je 0x538f
movq (%rbx), %rdi
movl $0x2b, %esi
callq 0x416c
testq %rax, %rax
je 0x535d
leaq 0x1369(%rip), %rdi      # 0x66c4
jmp 0x5379
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x416c
movq %r14, %r15
testq %rax, %rax
je 0x5384
leaq 0xc92(%rip), %rdi       # 0x600b
movq %r14, %rsi
callq 0x4298
movq %rax, %r15
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
movq (%rbx), %rdi
movl $0x23, %esi
callq 0x416c
testq %rax, %rax
je 0x5410
movzbl 0x20(%rbx), %eax
cmpl $0x6f, %eax
jg 0x53cb
cmpl $0x58, %eax
je 0x53de
cmpl $0x6f, %eax
jne 0x5410
cmpb $0x30, (%r14)
jne 0x53f3
cmpl $0x58, %eax
je 0x53de
cmpl $0x78, %eax
je 0x53d5
cmpl $0x70, %eax
je 0x53d5
jmp 0x5410
cmpl $0x70, %eax
je 0x53d5
cmpl $0x78, %eax
jne 0x5410
leaq 0x12ec(%rip), %rdi      # 0x66c8
jmp 0x53fa
movq %r14, %rdi
callq 0x4208
testl %eax, %eax
je 0x5410
leaq 0x12da(%rip), %rdi      # 0x66cb
jmp 0x53fa
leaq 0x12cc(%rip), %rdi      # 0x66c6
movq %r14, %rsi
callq 0x4298
movq %rax, %r15
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
movq (%rbx), %rdi
movl $0x2d, %esi
callq 0x416c
testq %rax, %rax
je 0x546e
movq 0x8(%rbx), %rdi
callq 0x4208
testl %eax, %eax
je 0x54a4
movslq %eax, %r13
movq %r14, %rdi
callq 0x4104
cmpq %r13, %rax
jae 0x54a4
leaq 0xbc5(%rip), %r12       # 0x600b
movq %r14, %rdi
movq %r12, %rsi
callq 0x4298
movq %rax, %r15
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x4104
movq %r15, %r14
cmpq %r13, %rax
jb 0x5446
jmp 0x54c0
movq (%rbx), %rdi
movl $0x30, %esi
callq 0x416c
testq %rax, %rax
je 0x54a4
movsbl 0x20(%rbx), %esi
leaq 0x122a(%rip), %rdi      # 0x66b5
callq 0x416c
testq %rax, %rax
je 0x54a9
movq 0x10(%rbx), %rax
cmpb $0x0, (%rax)
je 0x54a9
cmpb $0x0, 0x20(%rbx)
je 0x54a9
movq %r14, %r15
jmp 0x54c0
movq 0x8(%rbx), %rdi
callq 0x4208
movslq %eax, %rsi
movq %r14, %rdi
callq 0x54e0
movq %rax, %r15
movq 0x8(%rbx), %rdi
callq 0x4208
movslq %eax, %rsi
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x55c6
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/wrapper.c
// Function: zero_wrapper
char		*zero_wrapper(char *str, size_t length)
{
	char	*out;
	char	*old;
	char	*left_part;

	left_part = get_left_part(str);
	out = ft_strdup(str + ft_strlen(left_part));
	free(str);
	while (ft_strlen(out) + ft_strlen(left_part) < length)
	{
		old = out;
		out = ft_strjoin("0", old);
		free(old);
	}
	old = out;
	out = ft_strjoin(left_part, old);
	free(old);
	free(left_part);
	return (out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4120
movq %rax, %rbx
xorl %eax, %eax
movabsq $0x100000000012801, %rcx # imm = 0x100000000012801
movzbl (%r15,%rax), %edx
leal -0x20(%rdx), %esi
cmpl $0x38, %esi
ja 0x551b
btq %rsi, %rcx
jae 0x551b
incq %rax
jmp 0x5503
cmpl $0x78, %edx
je 0x5516
movb $0x0, (%rbx,%rax)
movq %rbx, %rdi
callq 0x4104
leaq (%rax,%r15), %rdi
callq 0x4120
movq %rax, %r12
movq %r15, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x4104
movq %rax, %r15
movq %rbx, %rdi
callq 0x4104
addq %r15, %rax
cmpq %r14, %rax
jae 0x5598
leaq 0x1164(%rip), %r13      # 0x66c6
movq %r13, %rdi
movq %r12, %rsi
callq 0x4298
movq %rax, %r15
movq %r12, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x4104
movq %rax, %r12
movq %rbx, %rdi
callq 0x4104
addq %r12, %rax
movq %r15, %r12
cmpq %r14, %rax
jb 0x5562
jmp 0x559b
movq %r12, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4298
movq %rax, %r14
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/wrapper.c
// Function: space_wrapper
char		*space_wrapper(char *str, size_t length)
{
	char	*out;
	char	*old;

	out = str;
	while (ft_strlen(out) < length)
	{
		old = out;
		out = ft_strjoin(" ", old);
		free(old);
	}
	return (out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4104
cmpq %rbx, %rax
jae 0x560d
leaq 0xa26(%rip), %r15       # 0x600b
movq %r15, %rdi
movq %r14, %rsi
callq 0x4298
movq %rax, %r12
movq %r14, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x4104
movq %r12, %r14
cmpq %rbx, %rax
jb 0x55e5
jmp 0x5610
movq %r14, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/precision.c
// Function: process_precision
char		*process_precision(char *str, t_conversion *conv)
{
	char	*out;
	char	*old;
	size_t	precision;

	out = str;
	if (*(conv->precision++) == '.')
	{
		precision = ft_atoi(conv->precision);
		if (ft_strchr("diouxXp", conv->conversion)
			&& ft_atoi(str) == 0 && precision == 0)
			*str = '\0';
		else if (ft_strchr("diouxXp", conv->conversion) != NULL)
			out = zero_wrapper(out, precision + (ft_strchr(str, '-') != NULL));
		else if (conv->conversion == 's')
		{
			old = out;
			out = ft_strsub(out, 0, precision);
			free(old);
		}
	}
	conv->precision--;
	return (out);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rsi), %rax
leaq 0x1(%rax), %rdi
movq %rdi, 0x10(%rsi)
cmpb $0x2e, (%rax)
jne 0x56cb
callq 0x4208
movslq %eax, %r15
movsbl 0x20(%rbx), %esi
leaq 0x107b(%rip), %rdi      # 0x66ce
callq 0x416c
testq %rax, %rax
je 0x5670
movq %r14, %rdi
callq 0x4208
orl %r15d, %eax
jne 0x5670
movb $0x0, (%r14)
jmp 0x56cb
movsbl 0x20(%rbx), %esi
leaq 0x1053(%rip), %rdi      # 0x66ce
callq 0x416c
testq %rax, %rax
je 0x56aa
movq %r14, %rdi
movl $0x2d, %esi
callq 0x416c
cmpq $0x1, %rax
sbbq $-0x1, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x54e0
movq %rax, %r14
jmp 0x56cb
cmpb $0x73, 0x20(%rbx)
jne 0x56cb
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4c00
movq %rax, %r15
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
decq 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/read_conversion.c
// Function: save_conversion_format
t_conversion	*save_conversion_format(char *str)
{
	t_conversion	*conv;
	int				i;

	i = 1;
	if (!(conv = (t_conversion*)malloc(sizeof(t_conversion))))
		return (NULL);
	conv->conversion = 0;
	conv->flags = get_flags(&str[i]);
	i += ft_strlen(conv->flags);
	conv->width = get_width(&str[i]);
	i += ft_strlen(conv->width);
	conv->precision = get_precision(&str[i]);
	i += ft_strlen(conv->precision);
	conv->modifier = get_modifier(&str[i]);
	i += ft_strlen(conv->modifier);
	conv->conversion = get_conversion(&str[i]);
	conv->length = ++i;
	return (resolve_alias(conv));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x28, %edi
callq 0x1080
testq %rax, %rax
je 0x5793
movq %rax, %rbx
movb $0x0, 0x20(%rax)
leaq 0x1(%r14), %rdi
callq 0x57d4
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x4104
incl %eax
movslq %eax, %r12
leaq (%r14,%r12), %rdi
callq 0x57fc
movq %rax, 0x8(%rbx)
movq %rax, %rdi
callq 0x4104
movq %rax, %r15
addq %r12, %r15
movslq %r15d, %rdi
addq %r14, %rdi
callq 0x5817
movq %rax, 0x10(%rbx)
movq %rax, %rdi
callq 0x4104
movq %rax, %r12
addq %r15, %r12
movslq %r12d, %rdi
addq %r14, %rdi
callq 0x5848
movq %rax, 0x18(%rbx)
movq %rax, %rdi
callq 0x4104
addq %r12, %rax
movslq %eax, %r15
addq %r15, %r14
movq %r14, %rdi
callq 0x5891
movb %al, 0x20(%rbx)
incl %r15d
movl %r15d, 0x24(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5aac
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/read_conversion.c
// Function: free_conversion_format
void			free_conversion_format(t_conversion *conv)
{
	free(conv->flags);
	free(conv->width);
	free(conv->precision);
	free(conv->modifier);
	free(conv);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq 0x10(%rbx), %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/get_conversion_parts.c
// Function: get_flags
char			*get_flags(char *str)
{
	int		i;

	i = 0;
	while (str[i] == '#' || str[i] == '0' || str[i] == '-' || str[i] == '+'
			|| str[i] == ' ')
		i++;
	return (ft_strsub(str, 0, i));
}

// Assembly:
xorl %edx, %edx
movabsq $0x1280900000000, %rax  # imm = 0x1280900000000
movzbl (%rdi,%rdx), %ecx
cmpq $0x30, %rcx
ja 0x57f5
btq %rcx, %rax
jae 0x57f5
incq %rdx
jmp 0x57e0
xorl %esi, %esi
jmp 0x4c00
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/get_conversion_parts.c
// Function: get_precision
char			*get_precision(char *str)
{
	int		i;

	i = 0;
	if (*str == '.')
		i++;
	while (i > 0 && str[i] >= '0' && str[i] <= '9')
		i++;
	return (ft_strsub(str, 0, i));
}

// Assembly:
movb (%rdi), %cl
xorl %eax, %eax
cmpb $0x2e, %cl
sete %cl
jne 0x583d
sete %al
movzbl %al, %eax
decq %rax
movb 0x1(%rdi,%rax), %cl
addb $-0x30, %cl
incq %rax
cmpb $0xa, %cl
jb 0x582c
jmp 0x583f
movb %cl, %al
movl %eax, %edx
xorl %esi, %esi
jmp 0x4c00
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/get_conversion_parts.c
// Function: get_modifier
char			*get_modifier(char *str)
{
	int		i;

	i = 0;
	if ((*str == 'h' && *(str + 1) == 'h')
			|| (*str == 'l' && *(str + 1) == 'l'))
		i = 2;
	else if (*str == 'h' || *str == 'l' || *str == 'j' || *str == 'z')
		i = 1;
	return (ft_strsub(str, 0, i));
}

// Assembly:
movzbl (%rdi), %eax
cmpl $0x6c, %eax
je 0x5864
cmpl $0x68, %eax
jne 0x586f
movl $0x2, %edx
cmpb $0x68, 0x1(%rdi)
je 0x588a
cmpb $0x6c, %al
jne 0x586f
movl $0x2, %edx
cmpb $0x6c, 0x1(%rdi)
je 0x588a
addl $-0x68, %eax
rorb %al
cmpb $0x9, %al
ja 0x5888
movzbl %al, %eax
leaq 0xe66(%rip), %rcx       # 0x66e8
movq (%rcx,%rax,8), %rdx
jmp 0x588a
xorl %edx, %edx
xorl %esi, %esi
jmp 0x4c00
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/itoa.c
// Function: itoa
char		*itoa(long long n)
{
	char	*str;
	int		is_neg;
	int		len;

	len = get_size(n);
	str = (char *)malloc(sizeof(char) * len);
	if (str == NULL)
		return (NULL);
	is_neg = (n < 0) ? 1 : 0;
	str[--len] = 0;
	while (len-- > 0)
	{
		str[len] = (n % 10) * (n < 0 ? -1 : 1) + '0';
		n /= 10;
	}
	if (is_neg)
		*str = '-';
	return (str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rdi, %r15
shrq $0x3f, %r15
incl %r15d
leaq 0x9(%rdi), %rax
movabsq $0x6666666666666667, %r14 # imm = 0x6666666666666667
cmpq $0x13, %rax
jb 0x58ff
movq %rbx, %rax
imulq %r14
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x2, %rdx
leaq (%rdx,%rcx), %rax
incl %r15d
addq %rdx, %rcx
addq $0x9, %rcx
cmpq $0x12, %rcx
ja 0x58dd
leal 0x1(%r15), %eax
movslq %eax, %rdi
callq 0x1080
testq %rax, %rax
je 0x596b
movq %rax, %rcx
movslq %r15d, %rdi
movb $0x0, (%rax,%rdi)
incq %rdi
movq %rbx, %rsi
movq %rsi, %rax
imulq %r14
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
movl %esi, %r8d
subl %eax, %r8d
movl %r8d, %eax
negb %al
testq %rsi, %rsi
movzbl %al, %eax
cmovnsl %r8d, %eax
addb $0x30, %al
movb %al, -0x2(%rcx,%rdi)
decq %rdi
movq %rdx, %rsi
cmpq $0x1, %rdi
jg 0x5920
testq %rbx, %rbx
jns 0x596d
movb $0x2d, (%rcx)
jmp 0x596d
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/itoa_base.c
// Function: itoa_base
char		*itoa_base(unsigned long long n, char *charset)
{
	char	*str;
	int		base;
	int		len;

	base = ft_strlen(charset);
	len = get_size(n, base);
	str = (char *)malloc(sizeof(char) * len);
	if (str == NULL)
		return (NULL);
	str[--len] = 0;
	while (len-- > 0)
	{
		str[len] = charset[n % base];
		n /= base;
	}
	return (str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4104
movq %rax, %r15
movslq %r15d, %rcx
movl $0x2, %ebp
cmpq %r14, %rcx
ja 0x59ad
movq %r14, %rax
xorl %edx, %edx
divq %rcx
incl %ebp
cmpq %rcx, %rax
jae 0x59a1
movslq %ebp, %r12
movq %r12, %rdi
callq 0x1080
testq %rax, %rax
je 0x59ee
movq %rax, %rcx
movb $0x0, -0x1(%rax,%r12)
cmpl $0x2, %r12d
jl 0x59f0
movslq %r15d, %rsi
movl %ebp, %edi
movq %r14, %rax
xorl %edx, %edx
divq %rsi
movb (%rbx,%rdx), %dl
movb %dl, -0x2(%rcx,%rdi)
decq %rdi
movq %rax, %r14
cmpq $0x1, %rdi
jg 0x59d1
jmp 0x59f0
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/ft_memcpy.c
// Function: ft_memcpy
void	*ft_memcpy(void *dst, const void *src, size_t n)
{
	unsigned char	*dst2;

	if (dst == NULL || src == NULL)
		return (NULL);
	dst2 = dst;
	while (n--)
		*dst2++ = *(unsigned char *)src++;
	return (dst);
}

// Assembly:
movq %rdi, %rax
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
orb %cl, %dil
je 0x5a14
xorl %eax, %eax
retq
testq %rdx, %rdx
je 0x5a2b
xorl %ecx, %ecx
movb (%rsi,%rcx), %dil
movb %dil, (%rax,%rcx)
incq %rcx
cmpq %rcx, %rdx
jne 0x5a1b
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/ft_strnew.c
// Function: ft_strnew
char	*ft_strnew(size_t size)
{
	char	*str;
	size_t	c;

	str = (char*)malloc(sizeof(char) * size);
	if (str == NULL)
		return (NULL);
	c = 0;
	while (c < size)
		str[c++] = '\0';
	return (str);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1080
testq %rax, %rax
je 0x5a4d
testq %rbx, %rbx
je 0x5a4f
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x1050
xorl %eax, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/ft_strrev.c
// Function: ft_strrev
char	*ft_strrev(char *str)
{
	char	*cpy;
	char	*out;
	int		len;

	out = str;
	len = ft_strlen(str);
	cpy = ft_strdup(str);
	if (cpy == NULL)
		return (NULL);
	while (len > 0)
		*str++ = cpy[--len];
	free(cpy);
	return (out);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4104
movq %rax, %r14
movq %rbx, %rdi
callq 0x4120
testq %rax, %rax
je 0x5a9f
testl %r14d, %r14d
jle 0x5a95
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
incq %r14
movq %rbx, %rcx
movb -0x2(%rax,%r14), %dl
movb %dl, (%rcx)
incq %rcx
decq %r14
cmpq $0x1, %r14
jg 0x5a82
movq %rax, %rdi
callq 0x1030
jmp 0x5aa1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Orycterope[P]corewar/libft/printf/alias.c
// Function: resolve_alias
t_conversion	*resolve_alias(t_conversion *conv)
{
	char	*newflags;

	if (conv == NULL)
		return (NULL);
	if (ft_strchr("DOUCS", conv->conversion) != NULL)
	{
		free(conv->modifier);
		conv->modifier = ft_strdup("l");
		conv->conversion = ft_tolower(conv->conversion);
	}
	else if (conv->conversion == 'p')
	{
		newflags = ft_strjoin(conv->flags, "#");
		free(conv->flags);
		conv->flags = newflags;
		free(conv->modifier);
		conv->modifier = ft_strdup("l");
	}
	return (conv);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5af4
movq %rdi, %rbx
movsbl 0x20(%rdi), %esi
leaq 0xc75(%rip), %rdi       # 0x6738
callq 0x416c
testq %rax, %rax
je 0x5af8
movq 0x18(%rbx), %rdi
callq 0x1030
leaq 0x622(%rip), %rdi       # 0x60ff
callq 0x4120
movq %rax, 0x18(%rbx)
movsbl 0x20(%rbx), %edi
callq 0x5b40
movb %al, 0x20(%rbx)
jmp 0x5b34
xorl %ebx, %ebx
jmp 0x5b34
cmpb $0x70, 0x20(%rbx)
jne 0x5b34
movq (%rbx), %rdi
leaq 0xc36(%rip), %rsi       # 0x673e
callq 0x4298
movq %rax, %r14
movq (%rbx), %rdi
callq 0x1030
movq %r14, (%rbx)
movq 0x18(%rbx), %rdi
callq 0x1030
leaq 0x5d4(%rip), %rdi       # 0x60ff
callq 0x4120
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_07/fwide.c
// Function: main
int main(void)
{
	int mode;

	errno = 0;
	mode = fwide(stdout, 0);
	if (errno) {
		perror("fwide");
		return -1;
	}
	wprintf(L"by default stdout has mode=%d\n", mode);

	errno = 0;
	mode = fwide(stdout, 0);
	if (errno) {
		perror("fwide");
		return -1;
	}
	wprintf(L"now stdout has mode=%d\n", mode);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x1030
movq %rax, %r14
movl $0x0, (%rax)
movq 0x2e5a(%rip), %r15      # 0x3fe0
movq (%r15), %rdi
xorl %esi, %esi
callq 0x1050
cmpl $0x0, (%r14)
jne 0x11d7
leaq 0xe6f(%rip), %rdi       # 0x200c
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movl $0x0, (%r14)
movq (%r15), %rdi
xorl %esi, %esi
callq 0x1050
cmpl $0x0, (%r14)
jne 0x11d7
leaq 0xec2(%rip), %rdi       # 0x2088
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xe26(%rip), %rdi       # 0x2004
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x11cf
// File: /workspace/github_c_makefile_star2_O1/hiperiondev[P]hpsdrsim/src/hpsdr_debug.c
// Function: dbg_printf
void dbg_printf(int Level, const char *fmt, ...) {
    if (Level <= debug_level) {
        bool debug_id_m = false;
        va_list args;
        va_start(args, fmt);
        if (fmt[0] == '<') {
            --debug_id;
            debug_id_m = true;
            fprintf(stderr, "%*c(%d)", debug_id, ' ', debug_id);
        }
        if (fmt[0] == '>') {
            debug_id_m = true;
            fprintf(stderr, "%*c(%d)", debug_id, ' ', debug_id);
            ++debug_id;
        }
        if (!debug_id_m)
            fprintf(stderr, "%*c", debug_id, ' ');
        vfprintf(stderr, fmt, args);
        va_end(args);
        debug_id_m = false;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
testb %al, %al
je 0x13ee
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpl %edi, 0xaecc(%rip)      # 0xc2d4
jge 0x1414
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
movq %rsi, %rbx
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movb (%rsi), %bpl
cmpb $0x3c, %bpl
jne 0x144a
callq 0x1220
cmpb $0x3e, (%rbx)
jne 0x1456
callq 0x1279
jmp 0x1461
cmpb $0x3c, %bpl
je 0x1461
callq 0x1252
movq 0xab90(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1170
jmp 0x140a
// File: /workspace/github_c_makefile_star2_O1/hiperiondev[P]hpsdrsim/src/hpsdr_functions.c
// Function: op_erase_packet
void op_erase_packet(uint8_t *buffer) {
    sleep(1);
    memset(buffer, 0, 60);
    buffer[0] = 0xEF;
    buffer[1] = 0xFE;
    buffer[2] = 0x03;
    buffer[3] = 0xAA;
    buffer[4] = 0xBB;
    buffer[5] = 0xCC;
    buffer[6] = 0xDD;
    buffer[7] = 0xEE;
    buffer[8] = 0xFF;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %edi
callq 0x11e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x2c(%rbx)
movabsq $-0x1122334455fc0111, %rax # imm = 0xEEDDCCBBAA03FEEF
movq %rax, (%rbx)
movb $-0x1, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hiperiondev[P]hpsdrsim/src/hpsdr_functions.c
// Function: op_program
void op_program(uint8_t *buffer) {
    usleep(1000);
    memset(buffer, 0, 60);
    buffer[0] = 0xEF;
    buffer[1] = 0xFE;
    buffer[2] = 0x04;
    buffer[3] = 0xAA;
    buffer[4] = 0xBB;
    buffer[5] = 0xCC;
    buffer[6] = 0xDD;
    buffer[7] = 0xEE;
    buffer[8] = 0xFF;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x11f0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x2c(%rbx)
movabsq $-0x1122334455fb0111, %rax # imm = 0xEEDDCCBBAA04FEEF
movq %rax, (%rbx)
movb $-0x1, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hiperiondev[P]hpsdrsim/src/hpsdr_newprotocol.c
// Function: rx_hardware_thread
void* rx_hardware_thread(void *data) {
    int id = (int) (uintptr_t) data;
    dbg_printf(1, "-- Start rx_hardware_thread %d\n", id);

    while (1) {
        sleep(1);
    }

    return NULL;
}

// Assembly:
pushq %rax
movq %rdi, %rdx
leaq 0x5215(%rip), %rsi      # 0x8f31
movl $0x1, %edi
xorl %eax, %eax
callq 0x13aa
movl $0x1, %edi
callq 0x11e0
jmp 0x3d28
// File: /workspace/github_c_makefile_star2_O1/hiperiondev[P]hpsdrsim/src/hpsdr_newprotocol.c
// Function: tx_hardware_thread
void* tx_hardware_thread(void *data) {
    dbg_printf(1, "-- Start tx_hardware_thread\n");

    while (1) {
        sleep(1);
    }

    return NULL;
}

// Assembly:
pushq %rax
leaq 0x4ef9(%rip), %rsi      # 0x8f14
movl $0x1, %edi
xorl %eax, %eax
callq 0x13aa
movl $0x1, %edi
callq 0x11e0
jmp 0x4027
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaMain.cpp
// Function: LuaDump(lua_State*)
void LuaDump(lua_State* L)
{
  int i, top;

  top = lua_gettop(L);
  printf("stack top: %d\n", top);

  for (i = 1; i <= top; ++i)
  {
    printf("#%d: ", i);
    DumpValue(L, i, 2);
    puts("");
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1a79d
movl %eax, %r14d
leaq 0x291ce(%rip), %rdi     # 0x30024
movl %eax, %esi
xorl %eax, %eax
callq 0x6070
testl %r14d, %r14d
jle 0x6eae
negl %r14d
movl $0x1, %r12d
leaq 0x291bf(%rip), %r15     # 0x30033
movq %r15, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x6070
movq %rbx, %rdi
movl %r12d, %esi
movl $0x2, %edx
callq 0x6eba
movl $0xa, %edi
callq 0x6640
leal (%r14,%r12), %eax
incl %eax
movl %r12d, %ecx
incl %ecx
movl %ecx, %r12d
cmpl $0x1, %eax
jne 0x6e74
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaMain.cpp
// Function: DumpValue(lua_State*, int, int)
static void DumpValue(lua_State* L, int i, int max_depth)
{
	int type = lua_type(L, i);

	switch (type)
	{
		case LUA_TSTRING:
			printf("\"%s\"", lua_tostring(L, i));
			break;

		case LUA_TNUMBER:
			printf(LUA_NUMBER_FMT, lua_tonumber(L, i));
			break;

		case LUA_TTABLE:
			if (max_depth > 0)
			{
				int first = 1;
				printf("{ ");
				lua_pushnil(L);
				while (lua_next(L, i))
				{
					int top = lua_gettop(L);
					if (!first)
						printf(", ");
					DumpValue(L, top-1, max_depth-1);
					printf("=");
					DumpValue(L, top, max_depth-1);
					lua_pop(L, 1);
					first = 0;
				}
				printf("}");
			}
			else
			{
				printf("{...}");
			}
			break;

		case LUA_TUSERDATA:
			printf("<userdata>");
			break;

		case LUA_TNIL:
			printf("<nil>");
			break;

		default:
			printf("[%s]", lua_typename(L, type));
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1a9f8
cmpl $0x7, %eax
ja 0x6ef5
movl %eax, %ecx
leaq 0x29124(%rip), %rdx     # 0x30004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x2916f(%rip), %rdi     # 0x3005f
jmp 0x7009
movq %rbx, %rdi
movl %eax, %esi
callq 0x1aa16
leaq 0x2915f(%rip), %rdi     # 0x30065
jmp 0x6f2e
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1ac32
leaq 0x2a7ba(%rip), %rdi     # 0x316d5
jmp 0x6f2e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1abb2
leaq 0x29115(%rip), %rdi     # 0x30043
movq %rax, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6070
testl %r14d, %r14d
jle 0x7002
leaq 0x290f2(%rip), %rdi     # 0x30048
xorl %eax, %eax
callq 0x6070
movq %rbx, %rdi
callq 0x1adc1
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1b755
testl %eax, %eax
je 0x6fe1
decl %r14d
xorl %r13d, %r13d
leaq 0x290cb(%rip), %r15     # 0x3004b
movq %rbx, %rdi
callq 0x1a79d
movl %eax, %r12d
testb $0x1, %r13b
je 0x6f9b
movq %r15, %rdi
xorl %eax, %eax
callq 0x6070
movl %r12d, %esi
decl %esi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x6eba
movl $0x3d, %edi
callq 0x6640
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
callq 0x6eba
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1a7aa
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1b755
movb $0x1, %r13b
testl %eax, %eax
jne 0x6f80
movl $0x7d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6640
leaq 0x29054(%rip), %rdi     # 0x30054
jmp 0x7009
leaq 0x29045(%rip), %rdi     # 0x3004e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6070
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaMain.cpp
// Function: main
int main(int argc, char** argv)
{
  using namespace t2;

  InitCommon();

  MemAllocHeap heap;
  HeapInit(&heap);

  bool profile = false;

  int script_arg_start = 1;

  // Eat a secret --profile argument if it's first on the command line.
  if (argc > 1 && 0 == strcmp("--profile", argv[1]))
  {
    profile = true;
    ++script_arg_start;
  }

  lua_State* L = CreateLuaState(&heap, profile);

  bool success = RunBuildScript(L, (const char**) &argv[script_arg_start], argc - script_arg_start);

  if (profile)
    LuaProfilerReport();

  DestroyLuaState(L);

  t2::HeapDestroy(&heap);

	return success ? 0 : 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movl %edi, %ebx
callq 0xa100
leaq 0xf(%rsp), %rdi
callq 0xacdc
cmpl $0x2, %ebx
jl 0x7062
movq 0x8(%r14), %rsi
leaq 0x28feb(%rip), %rdi     # 0x30039
callq 0x6650
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %r12d
incl %r12d
jmp 0x706a
movl $0x1, %r12d
xorl %ecx, %ecx
movzbl %cl, %ebp
leaq 0xf(%rsp), %rdi
movl %ebp, %esi
callq 0x70c4
movq %rax, %r15
movl %r12d, %eax
leaq (%r14,%rax,8), %rsi
subl %r12d, %ebx
movq %r15, %rdi
movl %ebx, %edx
callq 0x7406
movl %eax, %ebx
testb %bpl, %bpl
je 0x709c
callq 0x9cba
movq %r15, %rdi
callq 0x75f2
leaq 0xf(%rsp), %rdi
callq 0xacdd
xorb $0x1, %bl
movzbl %bl, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::LuaAllocFunc(void*, void*, unsigned long, unsigned long)
static void* LuaAllocFunc(void* ud, void* old_ptr, size_t old_size, size_t new_size)
{
  MemAllocHeap* heap = static_cast<MemAllocHeap*>(ud);
  if (new_size && old_size)
    return HeapReallocate(heap, old_ptr, new_size);
  else if (new_size)
    return HeapAllocate(heap, new_size);
  else if (old_size)
    HeapFree(heap, old_ptr);

  return nullptr;
}

// Assembly:
testq %rcx, %rcx
sete %al
testq %rdx, %rdx
sete %r8b
orb %al, %r8b
jne 0x73d8
movq %rcx, %rdx
jmp 0xacee
testq %rcx, %rcx
je 0x73e5
movq %rcx, %rsi
jmp 0xacde
testq %rdx, %rdx
je 0x73f4
pushq %rax
callq 0xace6
addq $0x8, %rsp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::RunBuildScript(lua_State*, char const**, int)
bool RunBuildScript(lua_State *L, const char** args, int argc_count)
{
  // Push our error handler on the stack now (before the chunk to run)
  lua_pushcclosure(L, LuaGetTraceback, 0);
  int error_index = lua_gettop(L);

  switch (luaL_loadbuffer(L, s_BootSnippet, sizeof(s_BootSnippet)-1, "boot_snippet"))
  {
  case LUA_ERRMEM    : Croak("out of memory");
  case LUA_ERRSYNTAX : Croak("syntax error\n%s\n", lua_tostring(L, -1));
  }

  // Expose the path to tundra2 -- we're not that executable, so we'll need to find it.
  {
    PathBuffer exe_path;
    PathInit(&exe_path, GetExePath());
    PathStripLast(&exe_path);
    PathConcat(&exe_path, "tundra2" TUNDRA_EXE_SUFFIX);

    char tundra2_exe[kMaxPathLength];
    PathFormat(tundra2_exe, &exe_path);

    lua_pushstring(L, tundra2_exe);
    lua_setglobal(L, "TundraExePath");
  }

  // Push args from the command line
  for (int i = 0; i < argc_count; ++i)
  {
    lua_pushstring(L, args[i]);
  }

  int res = lua_pcall(L, /*narg:*/argc_count, /*nres:*/1, /*errorfunc:*/ error_index);

  if (0 == res)
  {
    return true;
  }
  else
  {
    // pcall failed
    if (lua_isstring(L, -1))
    {
      fprintf(stderr, "\nLua error\n%s\n", lua_tostring(L, -1));
    }
    return false;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x133(%rip), %rsi       # 0x7559
xorl %edx, %edx
callq 0x1af82
movq %rbx, %rdi
callq 0x1a79d
movl %eax, %r15d
leaq 0x28f11(%rip), %rsi     # 0x30350
leaq 0x28cc4(%rip), %rcx     # 0x3010a
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x1c92e
cmpl $0x3, %eax
je 0x752b
cmpl $0x4, %eax
je 0x754b
callq 0xa554
leaq 0x20c(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xadf0
movq %r12, %rdi
callq 0xb030
leaq 0x28ca8(%rip), %rsi     # 0x30136
movq %r12, %rdi
callq 0xb050
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xb16e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1ae54
leaq 0x28c88(%rip), %rdx     # 0x3013e
movq %rbx, %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x1b267
testl %ebp, %ebp
jle 0x74e1
movl %ebp, %r12d
xorl %r13d, %r13d
movq (%r14,%r13,8), %rsi
movq %rbx, %rdi
callq 0x1ae54
incq %r13
cmpq %r13, %r12
jne 0x74cd
movq %rbx, %rdi
movl %ebp, %esi
movl $0x1, %edx
movl %r15d, %ecx
callq 0x1b4d5
movl %eax, %ebp
testl %eax, %eax
je 0x750a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1aa82
testl %eax, %eax
jne 0x7521
testl %ebp, %ebp
sete %al
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x6910
jmp 0x750a
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x1ac32
leaq 0x28be4(%rip), %rdi     # 0x30125
movq %rax, %rsi
xorl %eax, %eax
callq 0xa101
leaq 0x28bc5(%rip), %rdi     # 0x30117
xorl %eax, %eax
callq 0xa101
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::DestroyLuaState(lua_State*)
void DestroyLuaState(lua_State* L)
{
  if (s_IsProfiling)
  {
    LuaProfilerDestroy();
    LinearAllocDestroy(&s_ProfilerAllocator);
  }

  lua_close(L);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x3b063(%rip)     # 0x42660
jne 0x7610
callq 0x9c87
leaq 0x3b05d(%rip), %rdi     # 0x42668
callq 0xad8e
movq %rbx, %rdi
popq %rbx
jmp 0x254b7
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::LuaTundraDigestGuid(lua_State*)
static int LuaTundraDigestGuid(lua_State* L)
{
  HashDigest digest;
  DoDigest(&digest, L);
  char result[kDigestStringSize];
  DigestToString(result, digest);
  lua_pushstring(L, result);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7cc2
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xac73
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ae54
movl $0x1, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::LuaTundraGetEnv(lua_State*)
static int LuaTundraGetEnv(lua_State *L)
{
  const char* key    = luaL_checkstring(L, 1);
  const char* result = getenv(key);

  if (result)
  {
    lua_pushstring(L, result);
    return 1;
  }
  else if (lua_gettop(L) >= 2)
  {
    lua_pushvalue(L, 2);
    return 1;
  }
  else
  {
    return luaL_error(L, "key %s not present in environment (and no default given)", key);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x1bcb3
movq %rax, %r14
movq %rax, %rdi
callq 0x65c0
testq %rax, %rax
je 0x78cc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ae54
jmp 0x78e6
movq %rbx, %rdi
callq 0x1a79d
cmpl $0x2, %eax
jl 0x78f3
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1a9d8
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2891d(%rip), %rsi     # 0x30217
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ba66
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::LuaStatFile(lua_State*)
static int LuaStatFile(lua_State* L)
{
  const char* fn = luaL_checkstring(L, 1);

  FileInfo info = GetFileInfo(fn);

  // Push dir result table on stack
  lua_newtable(L);
  lua_pushinteger(L, (lua_Integer) info.m_Size);
  lua_setfield(L, -2, "size");
  lua_pushinteger(L, (lua_Integer) info.m_Timestamp);
  lua_setfield(L, -2, "timestamp");
  lua_pushboolean(L, info.IsDirectory());
  lua_setfield(L, -2, "isdirectory");
  lua_pushboolean(L, info.Exists());
  lua_setfield(L, -2, "exists");

  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x1bcb3
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0xa704
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b144
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x1ade9
leaq 0x288ff(%rip), %rdx     # 0x30250
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x1ade9
leaq 0x288e4(%rip), %rdx     # 0x30255
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movl (%r14), %esi
shrl $0x3, %esi
andl $0x1, %esi
movq %rbx, %rdi
callq 0x1b019
leaq 0x288c9(%rip), %rdx     # 0x3025f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movl (%r14), %esi
andl $0x1, %esi
movq %rbx, %rdi
callq 0x1b019
leaq 0x288b3(%rip), %rdx     # 0x3026b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::LuaMakePathBuf(lua_State*)
static int LuaMakePathBuf(lua_State* L)
{
  const char* fn = luaL_checkstring(L, 1);
  PathBuffer buffer;
  PathInit(&buffer, fn);

  lua_newtable(L);
  lua_pushinteger(L, buffer.m_Type);
  lua_setfield(L, -2, "type");
  lua_pushinteger(L, buffer.m_Flags);
  lua_setfield(L, -2, "flags");
  lua_pushinteger(L, buffer.m_LeadingDotDots);
  lua_setfield(L, -2, "leading_dotdots");

  lua_newtable(L);
  for (int i = 0; i < buffer.m_SegCount; ++i)
  {
    lua_pushinteger(L, buffer.m_SegEnds[i]);
    lua_rawseti(L, -2, i + 1);
  }
  lua_setfield(L, -2, "seg_ends");

  int len = buffer.m_SegCount > 0 ? buffer.m_SegEnds[buffer.m_SegCount - 1] : 0;
  lua_pushlstring(L, buffer.m_Data, len);
  lua_setfield(L, -2, "data");

  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
callq 0x1bcb3
leaq 0xc(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xadf0
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b144
movl (%r14), %esi
movq %rbx, %rdi
callq 0x1ade9
leaq 0x28eef(%rip), %rdx     # 0x3090a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movzwl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x1ade9
leaq 0x28836(%rip), %rdx     # 0x30272
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movzwl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x1ade9
leaq 0x2881b(%rip), %rdx     # 0x30278
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b144
cmpw $0x0, 0x6(%r14)
je 0x7aac
xorl %r14d, %r14d
movzwl 0x16(%rsp,%r14,2), %esi
movq %rbx, %rdi
callq 0x1ade9
incq %r14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r14d, %edx
callq 0x1b324
movzwl 0x12(%rsp), %eax
cmpq %rax, %r14
jb 0x7a81
leaq 0x287d5(%rip), %rdx     # 0x30288
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movzwl 0x12(%rsp), %eax
testq %rax, %rax
je 0x7ad3
decl %eax
movzwl 0x16(%rsp,%rax,2), %edx
jmp 0x7ad5
xorl %edx, %edx
leaq 0x96(%rsp), %rsi
movq %rbx, %rdi
callq 0x1adfd
leaq 0x29c63(%rip), %rdx     # 0x3174f
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1b267
movl $0x1, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::LuaTimeDiff(lua_State*)
static int LuaTimeDiff(lua_State* L)
{
  lua_Integer a = luaL_checkinteger(L, 1);
  lua_Integer b = luaL_checkinteger(L, 2);
  double d = t2::TimerDiffSeconds(a, b);
  char buffer[64];
  snprintf(buffer, sizeof buffer, "%.5f", d);
  lua_pushstring(L, buffer);
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x1beeb
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x1beeb
movq %r14, %rdi
movq %rax, %rsi
callq 0xa629
leaq 0x2867c(%rip), %rdx     # 0x302a4
movq %rsp, %r14
movl $0x40, %esi
movq %r14, %rdi
movb $0x1, %al
callq 0x6780
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ae54
movl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::OnFileIter(void*, t2::FileInfo const&, char const*)
static void OnFileIter(void* user_data, const FileInfo& info, const char* name)
{
  lua_State* L = static_cast<lua_State*>(user_data);

  if (info.IsFile()) 
  {
    lua_pushstring(L, name);
    lua_rawseti(L, -2, (int) lua_objlen(L, -2) + 1);
  }
  else if (info.IsDirectory()) 
  {
    lua_pushstring(L, name);
    lua_rawseti(L, -3, (int) lua_objlen(L, -3) + 1);
  }
  else
  {
    Log(kWarning, "ignoring unsupported file type: %s\n", name);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
testb $0x4, %al
jne 0x7c74
testb $0x8, %al
jne 0x7c99
leaq 0x2858c(%rip), %rsi     # 0x301f3
movl $0x2, %edi
xorl %eax, %eax
popq %rbx
jmp 0xa414
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x1ae54
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1aca3
leal 0x1(%rax), %edx
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
jmp 0x7cbc
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x1ae54
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x1aca3
leal 0x1(%rax), %edx
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
popq %rbx
jmp 0x1b324
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterface.cpp
// Function: t2::DoDigest(t2::HashDigest*, lua_State*)
static void DoDigest(HashDigest* out, lua_State* L)
{
  HashState h;
  HashInit(&h);

  int narg = lua_gettop(L);

  for (int i = 1; i <= narg; ++i)
  {
    size_t len;
    unsigned char* data = (unsigned char*) luaL_checklstring(L, i, &len);
    HashUpdate(&h, data, len);
  }

  HashFinalize(&h, out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0xab22
movq %r14, %rdi
callq 0x1a79d
testl %eax, %eax
jle 0x7d32
movl %eax, %r15d
negl %r15d
movl $0x1, %ebp
leaq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x1bcb3
movq 0x8(%rsp), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0xaa0c
leal (%r15,%rbp), %eax
incl %eax
movl %ebp, %ecx
incl %ecx
movl %ecx, %ebp
cmpl $0x1, %eax
jne 0x7d04
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xab39
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterpolate.cpp
// Function: t2::LuaInterpolate(lua_State*)
static int LuaInterpolate(lua_State* L)
{
  size_t input_len;
  const char* input = luaL_checklstring(L, 1, &input_len);
  luaL_checktype(L, 2, LUA_TTABLE);
  const bool has_vars = lua_type(L, 3) == LUA_TTABLE;

  MemAllocHeap* heap;
  lua_getallocf(L, (void**) &heap);

  LuaEnvLookup lookup = { L, 2, has_vars ? 3 : 0 };
  StringBuffer output(heap);

  if (DoInterpolate(output, input, input_len, lookup))
  {
    lua_pushlstring(L, output.GetBuffer(), output.GetSize());
    return 1;
  }

  return luaL_error(L, "interpolation failed: %s", input);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1bcb3
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x5, %edx
callq 0x1be0e
movq %rbx, %rdi
movl $0x3, %esi
callq 0x1a9f8
xorl %r13d, %r13d
cmpl $0x5, %eax
sete %r13b
movq %rsp, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1b809
leaq 0x10(%rsp), %rcx
movq %rbx, (%rcx)
movl $0x2, 0x8(%rcx)
leal (%r13,%r13,2), %eax
movl %eax, 0xc(%rcx)
movq (%r12), %rax
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movq %rax, 0x60(%rdi)
movq (%r15), %rdx
movq %r14, %rsi
callq 0x7e8d
testb %al, %al
je 0x7e44
leaq 0x30(%rsp), %rax
movq 0x48(%rax), %rdx
testq %rdx, %rdx
movq 0x40(%rax), %rsi
cmoveq %rax, %rsi
cmoveq -0x8(%rax), %rdx
movl $0x1, %ebp
movq %rbx, %rdi
callq 0x1adfd
jmp 0x7e5a
leaq 0x285d7(%rip), %rsi     # 0x30422
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1ba66
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
callq 0x86b0
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x86b0
movq %rbx, %rdi
callq 0x6820
// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/LuaInterpolate.cpp
// Function: t2::LuaEnvLookupScope::GetValue(unsigned long, unsigned long*)
const char* GetValue(size_t index, size_t* len_out)
  {
    lua_State* L = m_LuaState;
    CHECK(lua_type(L, -1) == LUA_TTABLE);
    lua_rawgeti(L, -1, int(index + 1));
    if (lua_type(L, -1) != LUA_TSTRING)
    {
      fprintf(stderr, "env lookup failed: elem %d is not a string: %s\n", (int) index + 1, lua_typename(L, lua_type(L, -1)));
      return nullptr;
    }
    // This is technically not allowed but we do it anyway for performance.
    // We check that the value is already a string, and we know it's being
    // kept alive by the table which is on our stack.
    const char* str = lua_tolstring(L, -1, len_out);
    lua_pop(L, 1);
    return str;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %rbx
incl %r15d
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %r15d, %edx
callq 0x1b10f
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a9f8
cmpl $0x4, %eax
jne 0x88e4
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %rdx
callq 0x1ac32
movq %rax, %r14
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1a7aa
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movl %r15d, %esi
callq 0x695d
xorl %eax, %eax
jmp 0x88de
nop