// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test43
static void test43(void)
{
	/* Test floating point compare. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	struct sljit_jump* jump;

	union {
		double value;
		struct {
			unsigned int value1;
			unsigned int value2;
		} u;
	} dbuf[4];

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

	if (!sljit_is_fpu_available()) {
		if (verbose)
			printf("no fpu available, test43 skipped\n");
		successful_tests++;
		if (compiler)
			sljit_free_compiler(compiler);
		return;
	}

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

	dbuf[0].value = 12.125;
	/* a NaN */
	dbuf[1].u.value1 = 0x7fffffff;
	dbuf[1].u.value2 = 0x7fffffff;
	dbuf[2].value = -13.5;
	dbuf[3].value = 12.125;

	sljit_emit_enter(compiler, 0, 1, 1, 1, 3, 0, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 2);
	/* dbuf[0] < dbuf[2] -> -2 */
	jump = sljit_emit_fcmp(compiler, SLJIT_D_GREATER_EQUAL, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_MEM2(SLJIT_S0, SLJIT_R0), SLJIT_DOUBLE_SHIFT);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_IMM, -2);

	sljit_set_label(jump, sljit_emit_label(compiler));
	sljit_emit_fop1(compiler, SLJIT_DMOV, SLJIT_FR1, 0, SLJIT_MEM1(SLJIT_S0), 0);
	/* dbuf[0] and dbuf[1] is not NaN -> 5 */
	jump = sljit_emit_fcmp(compiler, SLJIT_D_UNORDERED, SLJIT_MEM0(), (long)&dbuf[1], SLJIT_FR1, 0);
	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_IMM, 5);

	sljit_set_label(jump, sljit_emit_label(compiler));
	sljit_emit_fop1(compiler, SLJIT_DMOV, SLJIT_FR2, 0, SLJIT_MEM1(SLJIT_S0), 3 * sizeof(double));
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, 11);
	/* dbuf[0] == dbuf[3] -> 11 */
	jump = sljit_emit_fcmp(compiler, SLJIT_D_EQUAL, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_FR2, 0);

	/* else -> -17 */
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, -17);
	sljit_set_label(jump, sljit_emit_label(compiler));
	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)&dbuf) != 11, "test43 case 1 failed\n");
	dbuf[3].value = 12;
	FAILED(code.func1((long)&dbuf) != -17, "test43 case 2 failed\n");
	dbuf[1].value = 0;
	FAILED(code.func1((long)&dbuf) != 5, "test43 case 3 failed\n");
	dbuf[2].value = 20;
	FAILED(code.func1((long)&dbuf) != -2, "test43 case 4 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, 0x208ec(%rip)     # 0x34354
je 0x13a78
leaq 0x1bc97(%rip), %rdi     # 0x2f708
movb $0x0, %al
callq 0x2070
callq 0x23a30
testb $0x1, %al
jne 0x13abc
cmpl $0x0, 0x208cc(%rip)     # 0x34354
je 0x13a98
leaq 0x1bc83(%rip), %rdi     # 0x2f714
movb $0x0, %al
callq 0x2070
movl 0x208be(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x208b5(%rip)     # 0x3435c
cmpq $0x0, -0x10(%rbp)
je 0x13ab7
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x13e03
cmpq $0x0, -0x10(%rbp)
jne 0x13ad6
leaq 0x19909(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x13e03
movsd 0x196a2(%rip), %xmm0    # 0x2d180
movsd %xmm0, -0x40(%rbp)
movl $0x7fffffff, -0x38(%rbp) # imm = 0x7FFFFFFF
movl $0x7fffffff, -0x34(%rbp) # imm = 0x7FFFFFFF
movsd 0x1968f(%rip), %xmm0    # 0x2d188
movsd %xmm0, -0x30(%rbp)
movsd 0x1967a(%rip), %xmm0    # 0x2d180
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %r8d
movl $0x3, %r9d
movl %r8d, %edx
movl %r8d, %ecx
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
movl $0x2, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x11, %esi
movl $0x8c, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x18c, %r8d            # imm = 0x18C
movl $0x3, %r9d
callq 0x2b8b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x40, %edx
movq $-0x2, %rcx
callq 0x1a7c0
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x28220
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x80, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x8c, %r8d
movq %r9, %rcx
callq 0x23a40
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rcx
addq $0x8, %rcx
movl $0x14, %esi
movl $0x80, %edx
movl $0x2, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x2b8b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x40, %edx
movl $0x5, %ecx
callq 0x1a7c0
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x28220
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x80, %esi
movl $0x3, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x18, %r9d
callq 0x23a40
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0xb, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0xe, %esi
movl $0x8c, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %r8d
movq %r9, %rcx
callq 0x2b8b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movq $-0x11, %r9
callq 0x1d3d0
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x28220
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x18e30
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 0x13d3d
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x196f0(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x13e03
movq -0x10(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rax
leaq -0x40(%rbp), %rdi
callq *%rax
cmpq $0xb, %rax
je 0x13d69
leaq 0x1b9d9(%rip), %rdi     # 0x2f736
movb $0x0, %al
callq 0x2070
jmp 0x13e03
movsd 0x1941f(%rip), %xmm0    # 0x2d190
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
leaq -0x40(%rbp), %rdi
callq *%rax
cmpq $-0x11, %rax
je 0x13d96
leaq 0x1b9bf(%rip), %rdi     # 0x2f74c
movb $0x0, %al
callq 0x2070
jmp 0x13e03
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
leaq -0x40(%rbp), %rdi
callq *%rax
cmpq $0x5, %rax
je 0x13dbe
leaq 0x1b9ad(%rip), %rdi     # 0x2f762
movb $0x0, %al
callq 0x2070
jmp 0x13e03
movsd 0x193d2(%rip), %xmm0    # 0x2d198
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rax
leaq -0x40(%rbp), %rdi
callq *%rax
cmpq $-0x2, %rax
je 0x13deb
leaq 0x1b996(%rip), %rdi     # 0x2f778
movb $0x0, %al
callq 0x2070
jmp 0x13e03
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x20562(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x20559(%rip)     # 0x3435c
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)