// File: /workspace/github_c_makefile_star2_O0/MikeGray-APH[P]LibLouisAPH/debug/main.c
// Function: test_input
static void test_input(const struct table *const*tables, const int table_cnt, const struct conversion *conversion, const char *input)
{
	unichar *uchars, *trans;
	int input_len, uchars_len, trans_len, len;

	input_len = strlen(input);
	uchars_len = input_len;
	trans_len = uchars_len * 5;
	if(trans_len < 0x100)
		trans_len = 0x100;
	uchars = MALLOC((uchars_len + 1) * sizeof(unichar));
	trans  = MALLOC((trans_len + 1) * sizeof(unichar));

	memset(uchars, 0, (uchars_len + 1) * sizeof(unichar));
	memset(trans, 0, (trans_len + 1) * sizeof(unichar));

	uchars_len = utf8_convert_to_utf16(uchars, (uchars_len + 1), input, input_len, NULL);
	uchars_len = table_convert_escape_markers(tables[table_cnt - 1], uchars, uchars_len);
	uchars_len = utf16_convert_escapes(uchars, uchars_len);

	len = translate_start(trans, trans_len, uchars, uchars_len, tables, table_cnt, conversion, FORWARD, NULL, NULL, NULL);
	if(len == -1)
	{
		fprintf(stderr, "FAIL\n");
		return;
	}

	table_convert_markers(tables[table_cnt - 1], uchars, uchars_len);
	debug_output_chomp(uchars, uchars_len);
	puts("");
	table_convert_markers(tables[table_cnt - 1], trans, trans_len);
	debug_output_chomp(trans, len);
	puts("");

	FREE(uchars);
	FREE(trans);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10a0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
imull $0x5, -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x100, -0x3c(%rbp)     # imm = 0x100
jge 0x1d680
movl $0x100, -0x3c(%rbp)     # imm = 0x100
movl -0x38(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq %rdi
callq 0x1160
movq %rax, -0x28(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq %rdi
callq 0x1160
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
shlq %rdx
xorl %esi, %esi
callq 0x1100
movq -0x30(%rbp), %rdi
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
shlq %rdx
xorl %esi, %esi
callq 0x1100
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
addl $0x1, %esi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x16c0
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
movl -0x38(%rbp), %edx
callq 0x2bd0
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x1340
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x28(%rbp), %rdx
movl -0x38(%rbp), %ecx
movq -0x8(%rbp), %r8
movl -0xc(%rbp), %r9d
movq -0x18(%rbp), %rax
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x1, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
callq 0xb570
movl %eax, -0x40(%rbp)
cmpl $-0x1, -0x40(%rbp)
jne 0x1d791
movq 0x687a(%rip), %rax      # 0x23ff8
movq (%rax), %rdi
leaq 0x1d4c(%rip), %rsi      # 0x1f4d4
movb $0x0, %al
callq 0x1130
jmp 0x1d80d
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
movl -0x38(%rbp), %edx
callq 0x1d820
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x1cdd0
leaq 0x195b(%rip), %rdi      # 0x1f11c
callq 0x1080
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq -0x30(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x1d820
movq -0x30(%rbp), %rdi
movl -0x40(%rbp), %esi
callq 0x1cdd0
leaq 0x1926(%rip), %rdi      # 0x1f11c
callq 0x1080
movq -0x28(%rbp), %rdi
callq 0x1040
movq -0x30(%rbp), %rdi
callq 0x1040
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)