// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test6
static void test6(void)
{
	/* Test addc, sub, subc. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	long buf[10];

	if (verbose)
		printf("Run test6\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;
	buf[9] = 0;

	sljit_emit_enter(compiler, 0, 1, 3, 1, 0, 0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, -1);
	sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_SET_C, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, -1);
	sljit_emit_op2(compiler, SLJIT_ADDC, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_IMM, 0, SLJIT_IMM, 0);
	sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_SET_C, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_R0, 0);
	sljit_emit_op2(compiler, SLJIT_ADDC, SLJIT_MEM1(SLJIT_S0), sizeof(long), SLJIT_MEM1(SLJIT_S0), sizeof(long), SLJIT_IMM, 4);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 100);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 2, SLJIT_R0, 0, SLJIT_IMM, 50);
	sljit_emit_op2(compiler, SLJIT_SUB | SLJIT_SET_C, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 6000);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 3, SLJIT_IMM, 10);
	sljit_emit_op2(compiler, SLJIT_SUBC, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 3, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 3, SLJIT_IMM, 5);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 100);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 2);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 4, SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 5000);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 4, SLJIT_R0, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R1, 0, SLJIT_R0, 0, SLJIT_R1, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 5, SLJIT_R1, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 5000);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_IMM, 6000, SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 6, SLJIT_R0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 100);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R1, 0, SLJIT_R0, 0, SLJIT_IMM, 32768);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 7, SLJIT_R1, 0);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R1, 0, SLJIT_R0, 0, SLJIT_IMM, -32767);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 8, SLJIT_R1, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 0x52cd3bf4);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_MEM1(SLJIT_S0), sizeof(long) * 9, SLJIT_R0, 0, SLJIT_IMM, 0x3da297c6);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, 10);
	sljit_emit_op2(compiler, SLJIT_SUB | SLJIT_SET_C, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 5);
	sljit_emit_op2(compiler, SLJIT_SUBC, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 2);
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, -2220);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);

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

	FAILED(code.func1((long)&buf) != 2223, "test6 case 1 failed\n");
	FAILED(buf[0] != 1, "test6 case 2 failed\n");
	FAILED(buf[1] != 5, "test6 case 3 failed\n");
	FAILED(buf[2] != 50, "test6 case 4 failed\n");
	FAILED(buf[3] != 4, "test6 case 5 failed\n");
	FAILED(buf[4] != 50, "test6 case 6 failed\n");
	FAILED(buf[5] != 50, "test6 case 7 failed\n");
	FAILED(buf[6] != 1000, "test6 case 8 failed\n");
	FAILED(buf[7] != 100 - 32768, "test6 case 9 failed\n");
	FAILED(buf[8] != 100 + 32767, "test6 case 10 failed\n");
	FAILED(buf[9] != 0x152aa42e, "test6 case 11 failed\n");

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x307bc(%rip)     # 0x34354
je 0x3ba8
leaq 0x29ac4(%rip), %rdi     # 0x2d665
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0x3bc2
leaq 0x2981d(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x4306
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)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x1, %r8d
movl $0x3, %ecx
movl %r9d, %esi
movl %r8d, %edx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x19b20
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2060, %esi           # imm = 0x2060
movl $0x1, %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 $0x61, %esi
movl $0x8c, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x2060, %esi           # imm = 0x2060
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x61, %esi
movl $0x8c, %r8d
movl $0x8, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x4, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x64, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x8c, %edx
movl $0x10, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, (%rsp)
movq $0x32, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x2062, %esi           # imm = 0x2062
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x1770, 0x8(%rsp)      # imm = 0x1770
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x18, %ecx
movl $0x40, %r8d
movl $0xa, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x63, %esi
movl $0x8c, %r8d
movl $0x18, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x5, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x64, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x8c, (%rsp)
movq $0x10, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x20, %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 $0x1388, %r9d           # imm = 0x1388
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x20, %r9d
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
movl $0x2, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x28, %ecx
movl $0x2, %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 $0x1388, %r9d           # imm = 0x1388
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x1770, %r9d           # imm = 0x1770
movl $0x1, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x30, %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 $0x64, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x8000, 0x8(%rsp)      # imm = 0x8000
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x38, %ecx
movl $0x2, %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 $0x1, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $-0x7fff, 0x8(%rsp)     # imm = 0x8001
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x8c, %edx
movl $0x40, %ecx
movl $0x2, %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 $0x52cd3bf4, %r9d       # imm = 0x52CD3BF4
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x8c, %edx
movl $0x48, %ecx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, (%rsp)
movq $0x3da297c6, 0x8(%rsp)  # imm = 0x3DA297C6
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0xa, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2062, %esi           # imm = 0x2062
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 -0x10(%rbp), %rdi
movl $0x63, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x2, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %edx
movq %r9, %rcx
movl $0x40, (%rsp)
movq $-0x8ac, 0x8(%rsp)      # imm = 0xF754
callq 0x1f8d0
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 0x41bc
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x29271(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x4306
movq -0x10(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rax
leaq -0x60(%rbp), %rdi
callq *%rax
cmpq $0x8af, %rax            # imm = 0x8AF
je 0x41ea
leaq 0x29492(%rip), %rdi     # 0x2d670
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x1, -0x60(%rbp)
je 0x4204
leaq 0x2948d(%rip), %rdi     # 0x2d685
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x5, -0x58(%rbp)
je 0x421e
leaq 0x29488(%rip), %rdi     # 0x2d69a
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x32, -0x50(%rbp)
je 0x4238
leaq 0x29483(%rip), %rdi     # 0x2d6af
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x4, -0x48(%rbp)
je 0x4252
leaq 0x2947e(%rip), %rdi     # 0x2d6c4
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x32, -0x40(%rbp)
je 0x426c
leaq 0x29479(%rip), %rdi     # 0x2d6d9
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x32, -0x38(%rbp)
je 0x4286
leaq 0x29474(%rip), %rdi     # 0x2d6ee
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x3e8, -0x30(%rbp)     # imm = 0x3E8
je 0x42a0
leaq 0x2946c(%rip), %rdi     # 0x2d703
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $-0x7f9c, -0x28(%rbp)   # imm = 0x8064
je 0x42ba
leaq 0x29467(%rip), %rdi     # 0x2d718
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x8063, -0x20(%rbp)    # imm = 0x8063
je 0x42d4
leaq 0x29462(%rip), %rdi     # 0x2d72d
movb $0x0, %al
callq 0x2070
jmp 0x4306
cmpq $0x152aa42e, -0x18(%rbp) # imm = 0x152AA42E
je 0x42ee
leaq 0x2945e(%rip), %rdi     # 0x2d743
movb $0x0, %al
callq 0x2070
jmp 0x4306
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x3005f(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x30056(%rip)     # 0x3435c
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)