#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ __fail(char *, char *, char *, int);
void testDivNearOne(void) {
  volatile float left, right, result;
  left = 12392.4;
  right = 12392.4;
  result = left / right;
  if (result > 0.999999) {
  } else {
    __fail("Failure", "\"Failure\"",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/"
           "cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/"
           "simplefloat.c",
           64);
  }
  if (result < 1.00001) {
  } else {
    __fail("Failure", "\"Failure\"",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/"
           "cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/"
           "simplefloat.c",
           72);
  }
  if (result > 0.999999 && result < 1.00001) {
  } else {
    __fail("Failure", "\"Failure\"",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/"
           "cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/"
           "simplefloat.c",
           80);
  }
}


x86 assembly (clang, -O0):
<testDivNearOne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xef0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1165 <testDivNearOne+0x55>
jmp    1184 <testDivNearOne+0x74>
lea    0xea8(%rip),%rdi
lea    0xea9(%rip),%rsi
lea    0xeac(%rip),%rdx
mov    $0x40,%ecx
call   1030 <__fail@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe73(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11a4 <testDivNearOne+0x94>
jmp    11c3 <testDivNearOne+0xb3>
lea    0xe69(%rip),%rdi
lea    0xe6a(%rip),%rsi
lea    0xe6d(%rip),%rdx
mov    $0x48,%ecx
call   1030 <__fail@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe2c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11fe <testDivNearOne+0xee>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe19(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11fe <testDivNearOne+0xee>
jmp    121d <testDivNearOne+0x10d>
lea    0xe0f(%rip),%rdi
lea    0xe10(%rip),%rsi
lea    0xe13(%rip),%rdx
mov    $0x50,%ecx
call   1030 <__fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testDivNearOne>:
sub    $0x18,%rsp
movl   $0x4641a19a,0x14(%rsp)
46
movl   $0x4641a19a,0x10(%rsp)
46
movss  0x14(%rsp),%xmm0
divss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd 0xeb8(%rip),%xmm0
ja     1169 <testDivNearOne+0x59>
lea    0xebf(%rip),%rdi
lea    0xec0(%rip),%rsi
lea    0xec3(%rip),%rdx
mov    $0x40,%ecx
call   1030 <__fail@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8d(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     11a8 <testDivNearOne+0x98>
lea    0xe88(%rip),%rdi
lea    0xe89(%rip),%rsi
lea    0xe8c(%rip),%rdx
mov    $0x48,%ecx
call   1030 <__fail@plt>
movsd  0xe60(%rip),%xmm1
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd 0xe46(%rip),%xmm0
jbe    11d1 <testDivNearOne+0xc1>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    11d1 <testDivNearOne+0xc1>
add    $0x18,%rsp
ret
lea    0xe38(%rip),%rdi
lea    0xe39(%rip),%rsi
lea    0xe3c(%rip),%rdx
mov    $0x50,%ecx
add    $0x18,%rsp
jmp    1030 <__fail@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Failure\00"
@.str.1 = [10 x i8] c"\22Failure\22\00"
@.str.2 = [206 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/simplefloat.c\00"
define void @testDivNearOne() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
store volatile float 0x40C8343340000000, float* %1
store volatile float 0x40C8343340000000, float* %2
%4 = load volatile float, float* %1
%5 = load volatile float, float* %2
%6 = fdiv float %4, %5
store volatile float %6, float* %3
%7 = load volatile float, float* %3
%8 = fpext float %7 to double
%9 = fcmp ogt double %8, 0x3FEFFFFDE7210BE9
br i1 %9, label %10, label %11
10: ; preds = %0
br label %13
11: ; preds = %0
%12 = call i32 @__fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.2, i64 0, i64 0), i32 64)
br label %13
13: ; preds = %11, %10
%14 = load volatile float, float* %3
%15 = fpext float %14 to double
%16 = fcmp olt double %15, 1.000010e+00
br i1 %16, label %17, label %18
17: ; preds = %13
br label %20
18: ; preds = %13
%19 = call i32 @__fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.2, i64 0, i64 0), i32 72)
br label %20
20: ; preds = %18, %17
%21 = load volatile float, float* %3
%22 = fpext float %21 to double
%23 = fcmp ogt double %22, 0x3FEFFFFDE7210BE9
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load volatile float, float* %3
%26 = fpext float %25 to double
%27 = fcmp olt double %26, 1.000010e+00
br i1 %27, label %28, label %29
28: ; preds = %24
br label %31
29: ; preds = %24, %20
%30 = call i32 @__fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.2, i64 0, i64 0), i32 80)
br label %31
31: ; preds = %29, %28
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Failure\00"
@.str.1 = [10 x i8] c"\22Failure\22\00"
@.str.2 = [206 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/simplefloat.c\00"
define void @testDivNearOne() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
store volatile float 0x40C8343340000000, float* %1
store volatile float 0x40C8343340000000, float* %2
%7 = load volatile float, float* %1
%8 = load volatile float, float* %2
%9 = fdiv float %7, %8
store volatile float %9, float* %3
%10 = load volatile float, float* %3
%11 = fpext float %10 to double
%12 = fcmp ogt double %11, 0x3FEFFFFDE7210BE9
br i1 %12, label %15, label %13
13: ; preds = %0
%14 = tail call i32 @__fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.2, i64 0, i64 0), i32 64)
br label %15
15: ; preds = %0, %13
%16 = load volatile float, float* %3
%17 = fpext float %16 to double
%18 = fcmp olt double %17, 1.000010e+00
br i1 %18, label %21, label %19
19: ; preds = %15
%20 = tail call i32 @__fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.2, i64 0, i64 0), i32 72)
br label %21
21: ; preds = %15, %19
%22 = load volatile float, float* %3
%23 = fpext float %22 to double
%24 = fcmp ogt double %23, 0x3FEFFFFDE7210BE9
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load volatile float, float* %3
%27 = fpext float %26 to double
%28 = fcmp olt double %27, 1.000010e+00
br i1 %28, label %31, label %29
29: ; preds = %25, %21
%30 = tail call i32 @__fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([206 x i8], [206 x i8]* @.str.2, i64 0, i64 0), i32 80)
br label %31
31: ; preds = %25, %29
ret void
}