// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/tests/decimal.c
// Function: verify_cmp
static void verify_cmp(int count)
{
	bool fail = false;
	struct tt_dec *dec1, *dec2;

	int old_level = tt_log_set_level(TT_LOG_WARN);

	/* Big number */
	printf("Cmp big number...\n");
	dec1 = tt_dec_alloc(50);
	dec2 = tt_dec_alloc(50);
	for (int i = 0; i < count; i++) {
		double d1, d2;
		char s1[128], s2[128];
		d1 = get_num(s1, 1, 100);
		tt_dec_from_string(dec1, s1);
		d2 = get_num(s2, 1, 100);
		tt_dec_from_string(dec2, s2);

		int c = tt_dec_cmp(dec1, dec2);
		double d = d1 - d2;
		if (!((c > 0 && d > 0) || (c < 0 && d < 0) || (c == 0 && d == 0))) {
			tt_error("Num cmp mismatch: %s %s", s1, s2);
			fail = true;
			break;
		}
	}

	tt_dec_free(dec1);
	tt_dec_free(dec2);
	if (fail)
		return;

#ifdef __STDC_IEC_559__
	/* Random float */
	printf("Cmp float...\n");
	dec1 = tt_dec_alloc(0);
	dec2 = tt_dec_alloc(0);

	for (int i = 0; i < count; i++) {
		double d1 = gen_float(150);
		double d2 = gen_float(150);

		tt_dec_from_float(dec1, d1);
		tt_dec_from_float(dec2, d2);

		int c = tt_dec_cmp(dec1, dec2);
		double d = d1 - d2;
		if (!((c > 0 && d > 0) || (c < 0 && d < 0) || (c == 0 && d == 0))) {
			tt_error("Num cmp mismatch: %.18E %.18E", d1, d2);
			fail = true;
			break;
		}
	}
	tt_dec_free(dec1);
	tt_dec_free(dec2);
#endif
	tt_log_set_level(old_level);
}

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movl %edi, 0x184(%rsp)
movb $0x0, 0x183(%rsp)
movl $0x1, %edi
callq 0x10ac0
movl %eax, 0x16c(%rsp)
leaq 0x11488(%rip), %rdi     # 0x153a6
movb $0x0, %al
callq 0x20c0
movl $0x32, %edi
callq 0x4660
movq %rax, 0x178(%rsp)
movl $0x32, %edi
callq 0x4660
movq %rax, 0x170(%rsp)
movl $0x0, 0x168(%rsp)
movl 0x168(%rsp), %eax
cmpl 0x184(%rsp), %eax
jge 0x4093
leaq 0xd0(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x1, %esi
movl %esi, 0x8(%rsp)
movl $0x64, %edx
movl %edx, 0xc(%rsp)
callq 0x4230
movq (%rsp), %rsi
fstpl 0x160(%rsp)
movq 0x178(%rsp), %rdi
callq 0x5690
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
leaq 0x50(%rsp), %rdi
callq 0x4230
fstpl 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x158(%rsp)
movq 0x170(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x5690
movq 0x178(%rsp), %rdi
movq 0x170(%rsp), %rsi
callq 0x8c50
movl %eax, 0x4c(%rsp)
movsd 0x160(%rsp), %xmm0
subsd 0x158(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
cmpl $0x0, 0x4c(%rsp)
jle 0x4021
movsd 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x407b
cmpl $0x0, 0x4c(%rsp)
jge 0x4033
xorps %xmm0, %xmm0
ucomisd 0x40(%rsp), %xmm0
ja 0x407b
cmpl $0x0, 0x4c(%rsp)
jne 0x404d
movsd 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x404d
jp 0x404d
jmp 0x407b
leaq 0xd0(%rsp), %rcx
leaq 0x50(%rsp), %r8
xorl %edi, %edi
leaq 0x11356(%rip), %rsi     # 0x153b9
leaq 0x1135a(%rip), %rdx     # 0x153c4
movb $0x0, %al
callq 0x10770
movb $0x1, 0x183(%rsp)
jmp 0x4093
jmp 0x407d
movl 0x168(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x168(%rsp)
jmp 0x3f54
movq 0x178(%rsp), %rdi
callq 0x47e0
movq 0x170(%rsp), %rdi
callq 0x47e0
testb $0x1, 0x183(%rsp)
je 0x40bc
jmp 0x4219
leaq 0x11319(%rip), %rdi     # 0x153dc
movb $0x0, %al
callq 0x20c0
xorl %edi, %edi
callq 0x4660
movq %rax, 0x178(%rsp)
xorl %edi, %edi
callq 0x4660
movq %rax, 0x170(%rsp)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x184(%rsp), %eax
jge 0x41f3
movl $0x96, %edi
callq 0x44f0
movsd %xmm0, 0x30(%rsp)
movl $0x96, %edi
callq 0x44f0
movsd %xmm0, 0x28(%rsp)
movq 0x178(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
callq 0x4e10
movq 0x170(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
callq 0x4e10
movq 0x178(%rsp), %rdi
movq 0x170(%rsp), %rsi
callq 0x8c50
movl %eax, 0x24(%rsp)
movsd 0x30(%rsp), %xmm0
subsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpl $0x0, 0x24(%rsp)
jle 0x4188
movsd 0x18(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x41e1
cmpl $0x0, 0x24(%rsp)
jge 0x419a
xorps %xmm0, %xmm0
ucomisd 0x18(%rsp), %xmm0
ja 0x41e1
cmpl $0x0, 0x24(%rsp)
jne 0x41b4
movsd 0x18(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x41b4
jp 0x41b4
jmp 0x41e1
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
xorl %edi, %edi
leaq 0x111f0(%rip), %rsi     # 0x153b9
leaq 0x1121a(%rip), %rdx     # 0x153ea
movb $0x2, %al
callq 0x10770
movb $0x1, 0x183(%rsp)
jmp 0x41f3
jmp 0x41e3
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x40f0
movq 0x178(%rsp), %rdi
callq 0x47e0
movq 0x170(%rsp), %rdi
callq 0x47e0
movl 0x16c(%rsp), %edi
callq 0x10ac0
addq $0x188, %rsp            # imm = 0x188
retq
nopw %cs:(%rax,%rax)