// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test35
static void test35(void)
{
	/* More complicated tests for fast calls. */
	executable_code codeA;
	executable_code codeB;
	executable_code codeC;
	struct sljit_compiler* compiler;
	struct sljit_jump *jump;
	struct sljit_label* label;
	unsigned long return_addr, jump_addr;
	uintptr_t buf[1];

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

	buf[0] = 0;

	/* A */
	compiler = sljit_create_compiler();
	FAILED(!compiler, "cannot create compiler\n");
	sljit_set_context(compiler, 0, 0, 2, 2, 0, 0, 0);

	sljit_emit_fast_enter(compiler, SLJIT_MEM0(), (long)&buf[0]);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 5);
	jump = sljit_emit_jump(compiler, SLJIT_REWRITABLE_JUMP | SLJIT_FAST_CALL);
	sljit_set_target(jump, 0);
	label = sljit_emit_label(compiler);
	sljit_emit_fast_return(compiler, SLJIT_MEM0(), (long)&buf[0]);

	codeA.code = sljit_generate_code(compiler);
	CHECK(compiler);
	return_addr = sljit_get_label_addr(label) - SLJIT_RETURN_ADDRESS_OFFSET;
	jump_addr = sljit_get_jump_addr(jump);
	sljit_free_compiler(compiler);

	/* B */
	compiler = sljit_create_compiler();
	FAILED(!compiler, "cannot create compiler\n");
	sljit_set_context(compiler, 0, 0, 2, 2, 0, 0, 0);

	sljit_emit_fast_enter(compiler, SLJIT_UNUSED, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 7);
	sljit_emit_fast_return(compiler, SLJIT_IMM, return_addr);

	codeB.code = sljit_generate_code(compiler);
	CHECK(compiler);
	sljit_free_compiler(compiler);
	sljit_set_jump_addr(jump_addr, SLJIT_FUNC_OFFSET(codeB.code));

	/* C */
	compiler = sljit_create_compiler();
	FAILED(!compiler, "cannot create compiler\n");

	sljit_emit_enter(compiler, 0, 0, 2, 2, 0, 0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 0);
	sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, SLJIT_FUNC_OFFSET(codeA.code));
	label = sljit_emit_label(compiler);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_R0, 0);

	codeC.code = sljit_generate_code(compiler);
	CHECK(compiler);
	return_addr = sljit_get_label_addr(label);
	sljit_free_compiler(compiler);

	FAILED(codeC.func0() != 12, "test35 case 1 failed\n");
	FAILED(buf[0] != return_addr - SLJIT_RETURN_ADDRESS_OFFSET, "test35 case 2 failed\n");

	sljit_free_code(codeA.code);
	sljit_free_code(codeB.code);
	sljit_free_code(codeC.code);
	successful_tests++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
cmpl $0x0, 0x24005(%rip)     # 0x34354
je 0x1035f
leaq 0x1ee6b(%rip), %rdi     # 0x2f1c3
movb $0x0, %al
callq 0x2070
movq $0x0, -0x48(%rbp)
callq 0x18ba0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1038a
leaq 0x1d055(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x106f3
movq -0x20(%rbp), %rdi
xorl %r9d, %r9d
movl $0x2, %r8d
movl %r9d, %esi
movl %r9d, %edx
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x1a430
movq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rdx
movl $0x80, %esi
callq 0x1b220
movq -0x20(%rbp), %rdi
movl $0x60, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x5, 0x8(%rsp)
callq 0x1f8d0
movq -0x20(%rbp), %rdi
movl $0x1017, %esi           # imm = 0x1017
callq 0x283d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x18e80
movq -0x20(%rbp), %rdi
callq 0x28220
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rdx
movl $0x80, %esi
callq 0x1c2f0
movq -0x20(%rbp), %rdi
callq 0x19070
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x10475
movq -0x20(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x1cfb8(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
callq 0x18d90
jmp 0x106f3
movq -0x30(%rbp), %rdi
callq 0x18080
subq $0x0, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x18060
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x18d90
callq 0x18ba0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x104bf
leaq 0x1cf20(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x106f3
movq -0x20(%rbp), %rdi
xorl %r9d, %r9d
movl $0x2, %r8d
movl %r9d, %esi
movl %r9d, %edx
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x1a430
movq -0x20(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1b220
movq -0x20(%rbp), %rdi
movl $0x60, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x7, 0x8(%rsp)
callq 0x1f8d0
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rdx
movl $0x40, %esi
callq 0x1c2f0
movq -0x20(%rbp), %rdi
callq 0x19070
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x1057b
movq -0x20(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x1ceb2(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
callq 0x18d90
jmp 0x106f3
movq -0x20(%rbp), %rdi
callq 0x18d90
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2ac40
callq 0x18ba0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x105b4
leaq 0x1ce2b(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x106f3
movq -0x20(%rbp), %rdi
xorl %r9d, %r9d
movl $0x2, %r8d
movl %r9d, %esi
movl %r9d, %edx
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x19b20
movq -0x20(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl $0x17, %esi
movl $0x40, %edx
callq 0x288b0
movq -0x20(%rbp), %rdi
callq 0x28220
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1a7c0
movq -0x20(%rbp), %rdi
callq 0x19070
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x10679
movq -0x20(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x1cdb1(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x20(%rbp), %rdi
callq 0x18d90
jmp 0x106f3
movq -0x30(%rbp), %rdi
callq 0x18080
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x18d90
callq *-0x18(%rbp)
cmpq $0xc, %rax
je 0x106a8
leaq 0x1eb30(%rip), %rdi     # 0x2f1cf
movb $0x0, %al
callq 0x2070
jmp 0x106f3
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x0, %rcx
cmpq %rcx, %rax
je 0x106c9
leaq 0x1eb25(%rip), %rdi     # 0x2f1e5
movb $0x0, %al
callq 0x2070
jmp 0x106f3
movq -0x8(%rbp), %rdi
callq 0x18e10
movq -0x10(%rbp), %rdi
callq 0x18e10
movq -0x18(%rbp), %rdi
callq 0x18e10
movl 0x23c72(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x23c69(%rip)     # 0x3435c
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)