// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test16
static void test16(void)
{
	/* Ackermann benchmark. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	struct sljit_label *entry;
	struct sljit_label *label;
	struct sljit_jump *jump;
	struct sljit_jump *jump1;
	struct sljit_jump *jump2;

	if (verbose)
		printf("Run test16\n");

	FAILED(!compiler, "cannot create compiler\n");

	entry = sljit_emit_label(compiler);
	sljit_emit_enter(compiler, 0, 2, 3, 2, 0, 0, 0);
	/* If x == 0. */
	sljit_emit_op2(compiler, SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_S0, 0, SLJIT_IMM, 0);
	jump1 = sljit_emit_jump(compiler, SLJIT_EQUAL);
	/* If y == 0. */
	sljit_emit_op2(compiler, SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_S1, 0, SLJIT_IMM, 0);
	jump2 = sljit_emit_jump(compiler, SLJIT_EQUAL);

	/* Ack(x,y-1). */
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_S0, 0);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R1, 0, SLJIT_S1, 0, SLJIT_IMM, 1);
	jump = sljit_emit_jump(compiler, SLJIT_CALL2);
	sljit_set_label(jump, entry);

	/* Returns with Ack(x-1, Ack(x,y-1)). */
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_RETURN_REG, 0);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_S0, 0, SLJIT_IMM, 1);
	jump = sljit_emit_jump(compiler, SLJIT_CALL2);
	sljit_set_label(jump, entry);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);

	/* Returns with y+1. */
	label = sljit_emit_label(compiler);
	sljit_set_label(jump1, label);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1, SLJIT_S1, 0);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);

	/* Returns with Ack(x-1,1) */
	label = sljit_emit_label(compiler);
	sljit_set_label(jump2, label);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_S0, 0, SLJIT_IMM, 1);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, 1);
	jump = sljit_emit_jump(compiler, SLJIT_CALL2);
	sljit_set_label(jump, entry);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);

	code.code = sljit_generate_code(compiler);
	CHECK(compiler);
	sljit_free_compiler(compiler);

	FAILED(code.func2(3, 3) != 61, "test16 case 1 failed\n");
	/* For benchmarking. */
	/* FAILED(code.func2(3, 11) != 16381, "test16 case 1 failed\n"); */

	sljit_free_code(code.code);
	successful_tests++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x2c38c(%rip)     # 0x34354
je 0x7fd8
leaq 0x25f6d(%rip), %rdi     # 0x2df3e
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0x7ff2
leaq 0x253ed(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x8327
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x2, %r8d
movl $0x3, %ecx
movl %r9d, %esi
movl %r8d, %edx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x19b20
movq -0x10(%rbp), %rdi
movl $0x262, %esi            # imm = 0x262
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x283d0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl $0x262, %esi            # imm = 0x262
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xb, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x283d0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xb, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x1, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x1a, %esi
callq 0x283d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x1, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x1a, %esi
callq 0x283d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1a7c0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x1, %r9d
movl $0xb, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1a7c0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x1, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x1, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x1a, %esi
callq 0x283d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1a7c0
movq -0x10(%rbp), %rdi
callq 0x19070
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x82e5
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x25145(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x8327
movq -0x10(%rbp), %rdi
callq 0x18d90
movl $0x3, %esi
movq %rsi, %rdi
callq *-0x8(%rbp)
cmpq $0x3d, %rax
je 0x830f
leaq 0x25c44(%rip), %rdi     # 0x2df4a
movb $0x0, %al
callq 0x2070
jmp 0x8327
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x2c03e(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x2c035(%rip)     # 0x3435c
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)