// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test20
static void test20(void)
{
	/* Test stack. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	struct sljit_jump* jump;
	struct sljit_label* label;
	long buf[6];
#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
	long offset_value = SLJIT_W(0x1234567812345678);
#else
	long offset_value = SLJIT_W(0x12345678);
#endif

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

	FAILED(!compiler, "cannot create compiler\n");
	buf[0] = 5;
	buf[1] = 12;
	buf[2] = 0;
	buf[3] = 0;
	buf[4] = 111;
	buf[5] = -12345;

	sljit_emit_enter(compiler, 0, 1, 5, 5, 0, 0, 4 * sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), sizeof(unsigned long), SLJIT_MEM1(SLJIT_S0), 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), 0, SLJIT_MEM1(SLJIT_S0), sizeof(unsigned long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R3, 0, SLJIT_IMM, -1);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R4, 0, SLJIT_IMM, -1);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_S3, 0, SLJIT_IMM, -1);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_S4, 0, SLJIT_IMM, -1);
	sljit_emit_op2(compiler, SLJIT_MUL, SLJIT_MEM1(SLJIT_S0), 2 * sizeof(unsigned long), SLJIT_MEM1(SLJIT_SP), 0, SLJIT_MEM1(SLJIT_SP), sizeof(unsigned long));
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_MEM1(SLJIT_S0), 3 * sizeof(unsigned long), SLJIT_MEM1(SLJIT_SP), sizeof(unsigned long), SLJIT_MEM1(SLJIT_SP), 0);
	sljit_get_local_base(compiler, SLJIT_R0, 0, -offset_value);
	sljit_get_local_base(compiler, SLJIT_MEM1(SLJIT_S0), 0, -0x1234);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_S0), 0);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_MEM1(SLJIT_S0), 4 * sizeof(unsigned long), SLJIT_MEM1(SLJIT_R0), offset_value, SLJIT_MEM1(SLJIT_R1), 0x1234 + sizeof(long));
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), 5 * sizeof(unsigned long));
	/* Dummy last instructions. */
	sljit_emit_const(compiler, SLJIT_R0, 0, -9);
	sljit_emit_label(compiler);

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

	FAILED(code.func1((long)&buf) != -12345, "test20 case 1 failed\n")

	FAILED(buf[2] != 60, "test20 case 2 failed\n");
	FAILED(buf[3] != 17, "test20 case 3 failed\n");
	FAILED(buf[4] != 7, "test20 case 4 failed\n");

	sljit_free_code(code.code);

	compiler = sljit_create_compiler();
	sljit_emit_enter(compiler, 0, 0, 3, 0, 0, 0, SLJIT_MAX_LOCAL_SIZE);

	sljit_get_local_base(compiler, SLJIT_R0, 0, SLJIT_MAX_LOCAL_SIZE - sizeof(long));
	sljit_get_local_base(compiler, SLJIT_R1, 0, -(long)sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, -1);
	label = sljit_emit_label(compiler);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_R1), sizeof(long), SLJIT_R2, 0);
	sljit_emit_op2(compiler, SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_R1, 0, SLJIT_R0, 0);
	jump = sljit_emit_jump(compiler, SLJIT_NOT_EQUAL);
	sljit_set_label(jump, label);

	sljit_emit_return(compiler, SLJIT_UNUSED, 0, 0);

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

	/* Just survive this code. */
	code.func0();

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
movabsq $0x1234567812345678, %rax # imm = 0x1234567812345678
movq %rax, -0x58(%rbp)
cmpl $0x0, 0x2b33e(%rip)     # 0x34354
je 0x9026
leaq 0x25177(%rip), %rdi     # 0x2e196
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0x9040
leaq 0x2439f(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x94d9
movq $0x5, -0x50(%rbp)
movq $0xc, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x6f, -0x30(%rbp)
movq $-0x3039, -0x28(%rbp)   # imm = 0xCFC7
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x1, %edx
movl $0x5, %r8d
movl %r9d, %esi
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x20, 0x8(%rsp)
callq 0x19b20
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8d, %edx
movl $0x8, %ecx
movl $0x8c, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8d, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x8, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x4, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x5, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x9, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x64, %esi
movl $0x8c, %edx
movl $0x10, %ecx
movl $0x8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x8d, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x8c, %edx
movl $0x18, %ecx
movl $0x8d, %r8d
movl $0x8, %r9d
xorl %eax, %eax
movl $0x8d, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
subq -0x58(%rbp), %rcx
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x29f20
movq -0x10(%rbp), %rdi
movl $0x8c, %esi
xorl %eax, %eax
movl %eax, %edx
movq $-0x1234, %rcx          # imm = 0xEDCC
callq 0x29f20
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x8c, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %r9
movl $0x62, %esi
movl $0x8c, %edx
movl $0x20, %ecx
movl $0x81, %r8d
movl $0x82, (%rsp)
movq $0x123c, 0x8(%rsp)      # imm = 0x123C
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x28, %ecx
callq 0x1a7c0
movq -0x10(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
movq $-0x9, %rcx
callq 0x2a580
movq -0x10(%rbp), %rdi
callq 0x28220
movq -0x10(%rbp), %rdi
callq 0x19070
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x92dd
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x24150(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x94d9
movq -0x10(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rax
leaq -0x50(%rbp), %rdi
callq *%rax
cmpq $-0x3039, %rax          # imm = 0xCFC7
je 0x930b
leaq 0x24ea3(%rip), %rdi     # 0x2e1a2
movb $0x0, %al
callq 0x2070
jmp 0x94d9
cmpq $0x3c, -0x40(%rbp)
je 0x9325
leaq 0x24e9f(%rip), %rdi     # 0x2e1b8
movb $0x0, %al
callq 0x2070
jmp 0x94d9
cmpq $0x11, -0x38(%rbp)
je 0x933f
leaq 0x24e9b(%rip), %rdi     # 0x2e1ce
movb $0x0, %al
callq 0x2070
jmp 0x94d9
cmpq $0x7, -0x30(%rbp)
je 0x9359
leaq 0x24e97(%rip), %rdi     # 0x2e1e4
movb $0x0, %al
callq 0x2070
jmp 0x94d9
movq -0x8(%rbp), %rdi
callq 0x18e10
callq 0x18ba0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x3, %ecx
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x10000, 0x8(%rsp)     # imm = 0x10000
callq 0x19b20
movq -0x10(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0xfff8, %ecx           # imm = 0xFFF8
callq 0x29f20
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
movq $-0x8, %rcx
callq 0x29f20
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x82, %edx
movl $0x8, %ecx
movl $0x3, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x262, %esi            # imm = 0x262
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x283d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
movl %edx, %esi
callq 0x1a7c0
movq -0x10(%rbp), %rdi
callq 0x19070
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x94b5
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x23f75(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x94d9
movq -0x10(%rbp), %rdi
callq 0x18d90
callq *-0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x2ae8c(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x2ae83(%rip)     # 0x3435c
addq $0x70, %rsp
popq %rbp
retq
nop