#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*/ compare_float(float, float);
float do_fsrra(float);
int /*<<< orphan*/ printf(char *, char *, int, float, unsigned int, float,
                          unsigned int);
int test_fsrra(float f, float expect) {
  float f2 = do_fsrra(f);
  if (!compare_float(expect, f2)) {
    printf(
        "Assertion failed at %s.%d: expected %.8f (%08X) but was %.8f (%08X)\n",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/Aishou/lxdream/refs/heads/master/test/"
        "testmath.c",
        68, expect, (*((unsigned int *)&expect)), f2, (*((unsigned int *)&f2)));
    return 1;
  };
}


x86 assembly (clang, -O0):
<test_fsrra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <do_fsrra@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1050 <compare_float@plt>
cmp    $0x0,%eax
jne    1199 <test_fsrra+0x69>
movss  -0xc(%rbp),%xmm0
mov    -0xc(%rbp),%ecx
movss  -0x10(%rbp),%xmm1
mov    -0x10(%rbp),%r8d
lea    0xe7f(%rip),%rdi
lea    0xebd(%rip),%rsi
mov    $0x44,%edx
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fsrra>:
push   %rax
movss  %xmm1,(%rsp)
call   1030 <do_fsrra@plt>
movdqa %xmm0,%xmm1
movd   (%rsp),%xmm0
movd   %xmm1,0x4(%rsp)
call   1050 <compare_float@plt>
test   %eax,%eax
jne    117f <test_fsrra+0x4f>
movd   (%rsp),%xmm0
movd   %xmm0,%ecx
movd   0x4(%rsp),%xmm1
movd   %xmm1,%r8d
lea    0xe92(%rip),%rdi
lea    0xed0(%rip),%rsi
mov    $0x44,%edx
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [69 x i8] c"Assertion failed at %s.%d: expected %.8f (%08X) but was %.8f (%08X)\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Aishou/lxdream/refs/heads/master/test/testmath.c\00"
define i32 @test_fsrra(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %4
%8 = call float @do_fsrra(float %7)
store float %8, float* %6
%9 = load float, float* %5
%10 = load float, float* %6
%11 = call i32 @compare_float(float %9, float %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %21, label %13
13: ; preds = %2
%14 = load float, float* %5
%15 = bitcast float* %5 to i32*
%16 = load i32, i32* %15
%17 = load float, float* %6
%18 = bitcast float* %6 to i32*
%19 = load i32, i32* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 68, float %14, i32 %16, float %17, i32 %19)
store i32 1, i32* %3
br label %21
21: ; preds = %13, %2
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@.str = [69 x i8] c"Assertion failed at %s.%d: expected %.8f (%08X) but was %.8f (%08X)\0A\00"
@.str.1 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Aishou/lxdream/refs/heads/master/test/testmath.c\00"
define i32 @test_fsrra(float %0, float %1) {
%3 = tail call float @do_fsrra(float %0)
%4 = tail call i32 @compare_float(float %1, float %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = bitcast float %1 to i32
%8 = bitcast float %3 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.1, i64 0, i64 0), i32 68, float %1, i32 %7, float %3, i32 %8)
br label %10
10: ; preds = %2, %6
ret i32 1
}