// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test4
static void test4(void)
{
	/* Test neg. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	long buf[4];

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

	FAILED(!compiler, "cannot create compiler\n");
	buf[0] = 0;
	buf[1] = 1234;
	buf[2] = 0;
	buf[3] = 0;

	sljit_emit_enter(compiler, 0, 2, 3, 2, 0, 0, 0);
	sljit_emit_op1(compiler, SLJIT_NEG, SLJIT_UNUSED, 0, SLJIT_MEM1(SLJIT_S0), 0);
	sljit_emit_op1(compiler, SLJIT_NEG, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 2, SLJIT_S1, 0);
	sljit_emit_op1(compiler, SLJIT_NEG, SLJIT_MEM0(), (long)&buf[0], SLJIT_MEM0(), (long)&buf[1]);
	sljit_emit_op1(compiler, SLJIT_NEG, SLJIT_RETURN_REG, 0, SLJIT_S1, 0);
	sljit_emit_op1(compiler, SLJIT_NEG, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 3, SLJIT_IMM, 299);
	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((long)&buf, 4567) != -4567, "test4 case 1 failed\n");
	FAILED(buf[0] != -1234, "test4 case 2 failed\n");
	FAILED(buf[2] != -4567, "test4 case 3 failed\n");
	FAILED(buf[3] != -299, "test4 case 4 failed\n");

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x310ac(%rip)     # 0x34354
je 0x32b8
leaq 0x2a28d(%rip), %rdi     # 0x2d53e
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0x32d2
leaq 0x2a10d(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x34b6
movq $0x0, -0x30(%rbp)
movq $0x4d2, -0x28(%rbp)     # imm = 0x4D2
movq $0x0, -0x20(%rbp)
movq $0x0, -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 $0x31, %esi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x8c, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x31, %esi
movl $0x8c, %edx
movl $0x10, %ecx
movl $0xb, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rcx
leaq -0x30(%rbp), %r9
addq $0x8, %r9
movl $0x31, %esi
movl $0x80, %r8d
movl %r8d, %edx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x31, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xb, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x31, %esi
movl $0x8c, %edx
movl $0x18, %ecx
movl $0x40, %r8d
movl $0x12b, %r9d            # imm = 0x12B
callq 0x1d3d0
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 0x3420
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x2a00d(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x34b6
movq -0x10(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rax
leaq -0x30(%rbp), %rdi
movl $0x11d7, %esi           # imm = 0x11D7
callq *%rax
cmpq $-0x11d7, %rax          # imm = 0xEE29
je 0x3450
leaq 0x2a102(%rip), %rdi     # 0x2d549
movb $0x0, %al
callq 0x2070
jmp 0x34b6
cmpq $-0x4d2, -0x30(%rbp)    # imm = 0xFB2E
je 0x346a
leaq 0x2a0fd(%rip), %rdi     # 0x2d55e
movb $0x0, %al
callq 0x2070
jmp 0x34b6
cmpq $-0x11d7, -0x20(%rbp)   # imm = 0xEE29
je 0x3484
leaq 0x2a0f8(%rip), %rdi     # 0x2d573
movb $0x0, %al
callq 0x2070
jmp 0x34b6
cmpq $-0x12b, -0x18(%rbp)    # imm = 0xFED5
je 0x349e
leaq 0x2a0f3(%rip), %rdi     # 0x2d588
movb $0x0, %al
callq 0x2070
jmp 0x34b6
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x30eaf(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x30ea6(%rip)     # 0x3435c
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)