// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test2
static void test2(void)
{
	/* Test mov. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	long buf[8];
	static long data[2] = { 0, -9876 };

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

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

	buf[0] = 5678;
	buf[1] = 0;
	buf[2] = 0;
	buf[3] = 0;
	buf[4] = 0;
	buf[5] = 0;
	buf[6] = 0;
	buf[7] = 0;
	sljit_emit_enter(compiler, 0, 1, 3, 2, 0, 0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_UNUSED, 0, SLJIT_MEM0(), (long)&buf);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 9999);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_S1, 0, SLJIT_S0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S1), sizeof(long), SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM2(SLJIT_S1, SLJIT_R1), 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_S0, 0, SLJIT_IMM, 2);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM2(SLJIT_S1, SLJIT_S0), SLJIT_WORD_SHIFT, SLJIT_MEM2(SLJIT_S1, SLJIT_R1), 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_S0, 0, SLJIT_IMM, 3);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM2(SLJIT_S1, SLJIT_S0), SLJIT_WORD_SHIFT, SLJIT_MEM0(), (long)&buf);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), (long)&data);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S1), 4 * sizeof(long), SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, (long)&buf - 0x12345678);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), 0x12345678);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S1), 5 * sizeof(long), SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 3456);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, (long)&buf - 0xff890 + 6 * sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), 0xff890, SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, (long)&buf + 0xff890 + 7 * sizeof(long));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), -0xff890, SLJIT_R0, 0);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_R2, 0);

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

	FAILED(code.func1((long)&buf) != 9999, "test2 case 1 failed\n");
	FAILED(buf[1] != 9999, "test2 case 2 failed\n");
	FAILED(buf[2] != 9999, "test2 case 3 failed\n");
	FAILED(buf[3] != 5678, "test2 case 4 failed\n");
	FAILED(buf[4] != -9876, "test2 case 5 failed\n");
	FAILED(buf[5] != 5678, "test2 case 6 failed\n");
	FAILED(buf[6] != 3456, "test2 case 6 failed\n");
	FAILED(buf[7] != 3456, "test2 case 6 failed\n");

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x3186c(%rip)     # 0x34354
je 0x2af8
leaq 0x2a965(%rip), %rdi     # 0x2d456
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0x2b12
leaq 0x2a8cd(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
movq $0x162e, -0x50(%rbp)    # imm = 0x162E
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x1, %edx
movl $0x3, %ecx
movl $0x2, %r8d
movl %r9d, %esi
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x19b20
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %r9
movl $0x20, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x80, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x270f, %r9d           # imm = 0x270F
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0xb, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8b, %edx
movl $0x8, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x8, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x28b, %r8d            # imm = 0x28B
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0xc, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x2, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0xc8b, %edx            # imm = 0xC8B
movl $0x3, %ecx
movl $0x28b, %r8d            # imm = 0x28B
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0xc, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x3, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %r9
movl $0x20, %esi
movl $0xc8b, %edx            # imm = 0xC8B
movl $0x3, %ecx
movl $0x80, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x8, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x81, %r8d
leaq 0x3139a(%rip), %r9      # 0x340b0
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8b, %edx
movl $0x20, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %r9
subq $0x12345678, %r9        # imm = 0x12345678
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x81, %r8d
movl $0x12345678, %r9d       # imm = 0x12345678
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8b, %edx
movl $0x28, %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 $0xd80, %r9d            # imm = 0xD80
callq 0x1d3d0
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %r9
subq $0xff890, %r9           # imm = 0xFF890
addq $0x30, %r9
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x82, %edx
movl $0xff890, %ecx          # imm = 0xFF890
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %r9
addq $0xff890, %r9           # imm = 0xFF890
addq $0x38, %r9
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x82, %edx
movq $-0xff890, %rcx         # imm = 0xFFF00770
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x3, %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 0x2ec8
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x2a565(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x2fcd
movq -0x10(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rax
leaq -0x50(%rbp), %rdi
callq *%rax
cmpq $0x270f, %rax           # imm = 0x270F
je 0x2ef6
leaq 0x2a577(%rip), %rdi     # 0x2d461
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $0x270f, -0x48(%rbp)    # imm = 0x270F
je 0x2f13
leaq 0x2a56f(%rip), %rdi     # 0x2d476
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $0x270f, -0x40(%rbp)    # imm = 0x270F
je 0x2f30
leaq 0x2a567(%rip), %rdi     # 0x2d48b
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $0x162e, -0x38(%rbp)    # imm = 0x162E
je 0x2f4d
leaq 0x2a55f(%rip), %rdi     # 0x2d4a0
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $-0x2694, -0x30(%rbp)   # imm = 0xD96C
je 0x2f67
leaq 0x2a557(%rip), %rdi     # 0x2d4b5
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $0x162e, -0x28(%rbp)    # imm = 0x162E
je 0x2f81
leaq 0x2a552(%rip), %rdi     # 0x2d4ca
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $0xd80, -0x20(%rbp)     # imm = 0xD80
je 0x2f9b
leaq 0x2a538(%rip), %rdi     # 0x2d4ca
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
cmpq $0xd80, -0x18(%rbp)     # imm = 0xD80
je 0x2fb5
leaq 0x2a51e(%rip), %rdi     # 0x2d4ca
movb $0x0, %al
callq 0x2070
jmp 0x2fcd
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x31398(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x3138f(%rip)     # 0x3435c
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)