// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test23
static void test23(void)
{
	/* Test 32 bit / 64 bit signed / unsigned int transfer and conversion.
	   This test has do real things on 64 bit systems, but works on 32 bit systems as well. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	long buf[9];
	int ibuf[5];
	union {
		int asint;
		u_char asbytes[4];
	} u;
#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
	long garbage = SLJIT_W(0x1234567812345678);
#else
	long garbage = 0x12345678;
#endif

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

	FAILED(!compiler, "cannot create compiler\n");
	buf[0] = 0;
	buf[1] = 0;
	buf[2] = 0;
	buf[3] = 0;
	buf[4] = 0;
	buf[5] = 0;
	buf[6] = 0;
	buf[7] = 0;
	buf[8] = 0;

	ibuf[0] = 0;
	ibuf[1] = 0;
	ibuf[2] = -5791;
	ibuf[3] = 43579;
	ibuf[4] = 658923;

	sljit_emit_enter(compiler, 0, 2, 3, 3, 0, 0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV_UI, SLJIT_MEM1(SLJIT_S1), 0, SLJIT_IMM, 34567);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 1);
	sljit_emit_op1(compiler, SLJIT_MOVU_SI, SLJIT_MEM2(SLJIT_S1, SLJIT_R0), 2, SLJIT_IMM, -7654);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, garbage);
	sljit_emit_op1(compiler, SLJIT_MOVU_SI, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S1), sizeof(int));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, garbage);
	sljit_emit_op1(compiler, SLJIT_MOVU_UI, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S1), sizeof(int));
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_S0), sizeof(long), SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, garbage);
	sljit_emit_op1(compiler, SLJIT_MOV_SI, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S1), sizeof(int));
	sljit_emit_op1(compiler, SLJIT_MOV_UI, SLJIT_R0, 0, SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long), SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 0x0f00f00);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_S0, 0, SLJIT_S0, 0, SLJIT_IMM, 0x7777);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_S0), 0x7777 + 2 * sizeof(long), SLJIT_R0, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_S0, 0, SLJIT_S0, 0, SLJIT_IMM, 0x7777);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_S0), -0x7777 + (long)sizeof(long), SLJIT_R0, 0);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R1, 0, SLJIT_S0, 0, SLJIT_IMM, 16 - sizeof(long));
	sljit_emit_op2(compiler, SLJIT_LSHR, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 16);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM2(SLJIT_R0, SLJIT_R1), 1, SLJIT_R0, 0);
	sljit_emit_op2(compiler, SLJIT_OR, SLJIT_MEM1(SLJIT_R0), 0, SLJIT_IMM, 64, SLJIT_MEM1(SLJIT_R0), 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 0);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_R0), (long)&buf[6], SLJIT_MEM0(), (long)&buf[6]);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), 0, SLJIT_IMM, 0x123456);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_S0), 3 * sizeof(long), SLJIT_S0, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_IMM, sizeof(long));
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_S0, 0, SLJIT_S0, 0, SLJIT_IMM, 100000 * sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_S0), 100001 * sizeof(long), SLJIT_S0, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_IMM, sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOVU_SI, SLJIT_MEM1(SLJIT_S1), sizeof(int), SLJIT_IMM, 0x12345678);

	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, 0x2bd700 | 243);
	sljit_emit_return(compiler, SLJIT_MOV_SB, SLJIT_R1, 0);

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

	FAILED(code.func2((long)&buf, (long)&ibuf) != -13, "test23 case 1 failed\n");
	FAILED(buf[0] != -5791, "test23 case 2 failed\n");
	FAILED(buf[1] != 43579, "test23 case 3 failed\n");
	FAILED(buf[2] != 658923, "test23 case 4 failed\n");
	FAILED(buf[3] != 0x0f00f00, "test23 case 5 failed\n");
	FAILED(buf[4] != 0x0f00f00, "test23 case 6 failed\n");
	FAILED(buf[5] != 80, "test23 case 7 failed\n");
	FAILED(buf[6] != 0x123456, "test23 case 8 failed\n");
	FAILED(buf[7] != (long)&buf[5], "test23 case 9 failed\n");
	FAILED(buf[8] != (long)&buf[8] - 100000 * sizeof(long), "test23 case 10 failed\n");

	FAILED(ibuf[0] != 34567, "test23 case 11 failed\n");
	FAILED(ibuf[1] != -7654, "test23 case 12 failed\n");
	u.asint = ibuf[4];
#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
	FAILED(u.asbytes[0] != 0x78, "test23 case 13 failed\n");
	FAILED(u.asbytes[1] != 0x56, "test23 case 14 failed\n");
	FAILED(u.asbytes[2] != 0x34, "test23 case 15 failed\n");
	FAILED(u.asbytes[3] != 0x12, "test23 case 16 failed\n");
#else
	FAILED(u.asbytes[0] != 0x12, "test23 case 13 failed\n");
	FAILED(u.asbytes[1] != 0x34, "test23 case 14 failed\n");
	FAILED(u.asbytes[2] != 0x56, "test23 case 15 failed\n");
	FAILED(u.asbytes[3] != 0x78, "test23 case 16 failed\n");
#endif

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
movabsq $0x1234567812345678, %rax # imm = 0x1234567812345678
movq %rax, -0x90(%rbp)
cmpl $0x0, 0x2a278(%rip)     # 0x34354
je 0xa0ec
leaq 0x24304(%rip), %rdi     # 0x2e3e9
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0xa106
leaq 0x232d9(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movq $0x0, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x80(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0xffffe961, -0x78(%rbp) # imm = 0xFFFFE961
movl $0xaa3b, -0x74(%rbp)    # imm = 0xAA3B
movl $0xa0deb, -0x70(%rbp)   # imm = 0xA0DEB
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x2, %edx
movl $0x3, %r8d
movl %r9d, %esi
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x19b20
movq -0x10(%rbp), %rdi
movl $0x25, %esi
movl $0x8b, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x8707, %r9d           # imm = 0x8707
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x1, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
movl $0x18b, %edx            # imm = 0x18B
movl $0x2, %ecx
movl $0x40, %r8d
movq $-0x1de6, %r9           # imm = 0xE21A
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %r9
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8b, %r8d
movl $0x4, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %r9
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2d, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8b, %r8d
movl $0x4, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x8c, %edx
movl $0x8, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %r9
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x26, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8b, %r8d
movl $0x4, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x25, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x8, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0xf00f00, %r9d         # imm = 0xF00F00
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x7777, 0x8(%rsp)      # imm = 0x7777
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x8c, %edx
movl $0x7787, %ecx           # imm = 0x7787
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x7777, 0x8(%rsp)      # imm = 0x7777
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x8c, %edx
movq $-0x776f, %rcx          # imm = 0x8891
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x69, %esi
movl $0x2, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x1, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x10, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x281, %edx            # imm = 0x281
movl $0x1, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x66, %esi
movl $0x81, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x40, %r9d
movl $0x81, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rcx
addq $0x30, %rcx
leaq -0x60(%rbp), %r9
addq $0x30, %r9
movl $0x28, %esi
movl $0x81, %edx
movl $0x80, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x81, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x123456, %r9d         # imm = 0x123456
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x8c, %edx
movl $0x18, %ecx
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x8c, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0xc3500, 0x8(%rsp)     # imm = 0xC3500
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x8c, %edx
movl $0xc3508, %ecx          # imm = 0xC3508
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x8c, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
movl $0x8b, %edx
movl $0x4, %ecx
movl $0x40, %r8d
movl $0x12345678, %r9d       # imm = 0x12345678
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x2bd7f3, %r9d         # imm = 0x2BD7F3
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x22, %esi
movl $0x2, %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 0xa6e5
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x22d48(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0xa8f5
movq -0x10(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rax
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq *%rax
cmpq $-0xd, %rax
je 0xa715
leaq 0x23cec(%rip), %rdi     # 0x2e3f5
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $-0x169f, -0x60(%rbp)   # imm = 0xE961
je 0xa732
leaq 0x23ce5(%rip), %rdi     # 0x2e40b
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $0xaa3b, -0x58(%rbp)    # imm = 0xAA3B
je 0xa74f
leaq 0x23cde(%rip), %rdi     # 0x2e421
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $0xa0deb, -0x50(%rbp)   # imm = 0xA0DEB
je 0xa76c
leaq 0x23cd7(%rip), %rdi     # 0x2e437
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $0xf00f00, -0x48(%rbp)  # imm = 0xF00F00
je 0xa789
leaq 0x23cd0(%rip), %rdi     # 0x2e44d
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $0xf00f00, -0x40(%rbp)  # imm = 0xF00F00
je 0xa7a6
leaq 0x23cc9(%rip), %rdi     # 0x2e463
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $0x50, -0x38(%rbp)
je 0xa7c0
leaq 0x23cc5(%rip), %rdi     # 0x2e479
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpq $0x123456, -0x30(%rbp)  # imm = 0x123456
je 0xa7dd
leaq 0x23cbe(%rip), %rdi     # 0x2e48f
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movq -0x28(%rbp), %rax
leaq -0x60(%rbp), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
je 0xa801
leaq 0x23cb0(%rip), %rdi     # 0x2e4a5
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movq -0x20(%rbp), %rax
leaq -0x60(%rbp), %rcx
addq $0x40, %rcx
subq $0xc3500, %rcx          # imm = 0xC3500
cmpq %rcx, %rax
je 0xa82c
leaq 0x23c9b(%rip), %rdi     # 0x2e4bb
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpl $0x8707, -0x80(%rbp)    # imm = 0x8707
je 0xa848
leaq 0x23c96(%rip), %rdi     # 0x2e4d2
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
cmpl $0xffffe21a, -0x7c(%rbp) # imm = 0xFFFFE21A
je 0xa864
leaq 0x23c91(%rip), %rdi     # 0x2e4e9
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movl -0x70(%rbp), %eax
movl %eax, -0x84(%rbp)
movzbl -0x84(%rbp), %eax
cmpl $0x78, %eax
je 0xa889
leaq 0x23c80(%rip), %rdi     # 0x2e500
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movzbl -0x83(%rbp), %eax
cmpl $0x56, %eax
je 0xa8a5
leaq 0x23c7b(%rip), %rdi     # 0x2e517
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movzbl -0x82(%rbp), %eax
cmpl $0x34, %eax
je 0xa8c1
leaq 0x23c76(%rip), %rdi     # 0x2e52e
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movzbl -0x81(%rbp), %eax
cmpl $0x12, %eax
je 0xa8dd
leaq 0x23c71(%rip), %rdi     # 0x2e545
movb $0x0, %al
callq 0x2070
jmp 0xa8f5
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x29a70(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x29a67(%rip)     # 0x3435c
addq $0xa0, %rsp
popq %rbp
retq
nop