#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*/ assert(int);
int f2u(float);
float fabsf(float);
unsigned int float_absval(unsigned int);
int float_f2i(unsigned int);
unsigned int float_half(unsigned int);
unsigned int float_i2f(unsigned int);
unsigned int float_negate(unsigned int);
unsigned int float_twice(unsigned int);
int /*<<< orphan*/ init_seed();
scalar_t__ isnan(float);
int /*<<< orphan*/ printf(char *, ...);
unsigned int random_int();
float u2f(unsigned int);
int main(int argc, char *argv[]) {
  init_seed();
  for (unsigned n = 0, round = 0; !round; n = n + 1) {
    if (n == 0xFFF) {
      round++;
    }
    unsigned r = random_int();
    printf("r:\t0x%.8X\t%d\n", r, r);
    float f = u2f(r);
    printf("f:\t0x%.8X\t%.50f\n", f2u(f), f);
    float fmul2 = f * 2.0;
    printf("fmul2:\t0x%.8X\t%.50f\n", f2u(fmul2), fmul2);
    float fdiv2 = f * 0.5;
    printf("fdiv2:\t0x%.8X\t%.50f\n", f2u(fdiv2), fdiv2);
    int f2i = (int)f;
    printf("f2i:\t0x%.8X\t%d\n", f2i, f2i);
    float i2f = (float)(int)r;
    printf("r:\t0x%.8X\t%d\n", r, r);
    printf("i2f:\t0x%.8X\t%.50f\n", f2u(i2f), i2f);
    if (isnan(f)) {
      assert(float_negate(r) == r);
      assert(float_absval(r) == r);
      assert(float_twice(r) == r);
      assert(float_half(r) == r);
      assert(float_f2i(r) == f2i);
    } else {
      assert(u2f(float_negate(r)) == -f);
      assert(u2f(float_absval(r)) == fabsf(f));
      assert(u2f(float_twice(r)) == fmul2);
      assert(u2f(float_half(r)) == fdiv2);
      assert(float_f2i(r) == f2i);
      float my_i2f = u2f(float_i2f(r));
      printf("my_i2f:\t0x%.8X\t%.50f\n", f2u(my_i2f), my_i2f);
      assert(my_i2f == i2f);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_seed@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1211 <main+0x41>
jmp    151f <main+0x34f>
cmpl   $0xfff,-0x14(%rbp)
jne    1227 <main+0x57>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10b0 <random_int@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%edi
call   1050 <u2f@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
call   10d0 <f2u@plt>
mov    %eax,%esi
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdff(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd82(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
call   10d0 <f2u@plt>
mov    %eax,%esi
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd7f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd39(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
call   10d0 <f2u@plt>
mov    %eax,%esi
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd53(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvttss2si -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    0xd4c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cvtsi2ssl -0x1c(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xcf6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x30(%rbp),%xmm0
call   10d0 <f2u@plt>
mov    %eax,%esi
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd1e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x20(%rbp),%xmm0
call   10a0 <isnan@plt>
cmp    $0x0,%rax
je     13e5 <main+0x215>
mov    -0x1c(%rbp),%edi
call   1070 <float_negate@plt>
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   1090 <float_absval@plt>
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   10e0 <float_twice@plt>
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   1080 <float_half@plt>
cmp    -0x1c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   10c0 <float_f2i@plt>
cmp    -0x2c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
jmp    1503 <main+0x333>
mov    -0x1c(%rbp),%edi
call   1070 <float_negate@plt>
mov    %eax,%edi
call   1050 <u2f@plt>
movss  -0x20(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   1090 <float_absval@plt>
mov    %eax,%edi
call   1050 <u2f@plt>
movss  -0x20(%rbp),%xmm1
movaps 0xbda(%rip),%xmm2
pand   %xmm2,%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   10e0 <float_twice@plt>
mov    %eax,%edi
call   1050 <u2f@plt>
ucomiss -0x24(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   1080 <float_half@plt>
mov    %eax,%edi
call   1050 <u2f@plt>
ucomiss -0x28(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   10c0 <float_f2i@plt>
cmp    -0x2c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%edi
call   10f0 <float_i2f@plt>
mov    %eax,%edi
call   1050 <u2f@plt>
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
call   10d0 <f2u@plt>
mov    %eax,%esi
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xb87(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x34(%rbp),%xmm0
ucomiss -0x30(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xb5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11fb <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %eax,%eax
call   1040 <init_seed@plt>
mov    $0x1000,%r13d
lea    0xe2e(%rip),%rbx
lea    0xe72(%rip),%rbp
jmp    131e <main+0x13e>
xchg   %ax,%ax
mov    %eax,%edi
call   1060 <u2f@plt>
movaps 0x10(%rsp),%xmm1
xorps  0xded(%rip),%xmm1
cmpeqss %xmm0,%xmm1
movd   %xmm1,%edi
and    $0x1,%edi
call   1070 <assert@plt>
mov    %r14d,%edi
call   10a0 <float_absval@plt>
mov    %eax,%edi
call   1060 <u2f@plt>
movaps 0x10(%rsp),%xmm1
andps  0xdd1(%rip),%xmm1
cmpeqss %xmm0,%xmm1
movd   %xmm1,%edi
and    $0x1,%edi
call   1070 <assert@plt>
mov    %r14d,%edi
call   10f0 <float_twice@plt>
mov    %eax,%edi
call   1060 <u2f@plt>
cmpeqss 0x8(%rsp),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1070 <assert@plt>
mov    %r14d,%edi
call   1090 <float_half@plt>
mov    %eax,%edi
call   1060 <u2f@plt>
cmpeqss 0xc(%rsp),%xmm0
movd   %xmm0,%edi
and    $0x1,%edi
call   1070 <assert@plt>
mov    %r14d,%edi
call   10d0 <float_f2i@plt>
xor    %edi,%edi
cmp    %r15d,%eax
sete   %dil
call   1070 <assert@plt>
mov    %r14d,%edi
call   1100 <float_i2f@plt>
mov    %eax,%edi
call   1060 <u2f@plt>
movss  %xmm0,0x10(%rsp)
call   10e0 <f2u@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd93(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm0
cmpeqss 0x10(%rsp),%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
movzbl %al,%edi
call   1070 <assert@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r13d
je     149c <main+0x2bc>
xor    %eax,%eax
call   10c0 <random_int@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %eax,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14d,%edi
call   1060 <u2f@plt>
movaps %xmm0,0x10(%rsp)
call   10e0 <f2u@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd25(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movaps 0x10(%rsp),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
call   10e0 <f2u@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcb8(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movaps 0x10(%rsp),%xmm0
mulss  0xc64(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
call   10e0 <f2u@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc9b(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1050 <printf@plt>
cvttss2si 0x10(%rsp),%r15d
lea    0xc99(%rip),%rdi
mov    %r15d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm0
call   10e0 <f2u@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    %eax,%esi
mov    $0x1,%al
call   1050 <printf@plt>
movaps 0x10(%rsp),%xmm0
call   10b0 <isnan@plt>
mov    %rax,%r12
mov    %r14d,%edi
call   1080 <float_negate@plt>
test   %r12,%r12
je     1210 <main+0x30>
xor    %edi,%edi
cmp    %r14d,%eax
sete   %dil
call   1070 <assert@plt>
mov    %r14d,%edi
call   10a0 <float_absval@plt>
xor    %edi,%edi
cmp    %r14d,%eax
sete   %dil
call   1070 <assert@plt>
mov    %r14d,%edi
call   10f0 <float_twice@plt>
xor    %edi,%edi
cmp    %r14d,%eax
sete   %dil
call   1070 <assert@plt>
mov    %r14d,%edi
call   1090 <float_half@plt>
xor    %edi,%edi
cmp    %r14d,%eax
sete   %dil
call   1070 <assert@plt>
mov    %r14d,%edi
call   10d0 <float_f2i@plt>
cmp    %r15d,%eax
sete   %al
jmp    1302 <main+0x122>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"r:\090x%.8X\09%d\0A\00"
@.str.1 = [17 x i8] c"f:\090x%.8X\09%.50f\0A\00"
@.str.2 = [21 x i8] c"fmul2:\090x%.8X\09%.50f\0A\00"
@.str.3 = [21 x i8] c"fdiv2:\090x%.8X\09%.50f\0A\00"
@.str.4 = [16 x i8] c"f2i:\090x%.8X\09%d\0A\00"
@.str.5 = [19 x i8] c"i2f:\090x%.8X\09%.50f\0A\00"
@.str.6 = [22 x i8] c"my_i2f:\090x%.8X\09%.50f\0A\00"
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca i32
%13 = alloca float
%14 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 (...) @init_seed()
store i32 0, i32* %6
store i32 0, i32* %7
br label %16
16: ; preds = %157, %2
%17 = load i32, i32* %7
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
br i1 %19, label %20, label %160
20: ; preds = %16
%21 = load i32, i32* %6
%22 = icmp eq i32 %21, 4095
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %7
%25 = add i32 %24, 1
store i32 %25, i32* %7
br label %26
26: ; preds = %23, %20
%27 = call i32 (...) @random_int()
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %8
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %29)
%31 = load i32, i32* %8
%32 = call float @u2f(i32 %31)
store float %32, float* %9
%33 = load float, float* %9
%34 = call i32 @f2u(float %33)
%35 = load float, float* %9
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %34, double %36)
%38 = load float, float* %9
%39 = fpext float %38 to double
%40 = fmul double %39, 2.000000e+00
%41 = fptrunc double %40 to float
store float %41, float* %10
%42 = load float, float* %10
%43 = call i32 @f2u(float %42)
%44 = load float, float* %10
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %43, double %45)
%47 = load float, float* %9
%48 = fpext float %47 to double
%49 = fmul double %48, 5.000000e-01
%50 = fptrunc double %49 to float
store float %50, float* %11
%51 = load float, float* %11
%52 = call i32 @f2u(float %51)
%53 = load float, float* %11
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %52, double %54)
%56 = load float, float* %9
%57 = fptosi float %56 to i32
store i32 %57, i32* %12
%58 = load i32, i32* %12
%59 = load i32, i32* %12
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %58, i32 %59)
%61 = load i32, i32* %8
%62 = sitofp i32 %61 to float
store float %62, float* %13
%63 = load i32, i32* %8
%64 = load i32, i32* %8
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %63, i32 %64)
%66 = load float, float* %13
%67 = call i32 @f2u(float %66)
%68 = load float, float* %13
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %67, double %69)
%71 = load float, float* %9
%72 = call i64 @isnan(float %71)
%73 = icmp ne i64 %72, 0
br i1 %73, label %74, label %105
74: ; preds = %26
%75 = load i32, i32* %8
%76 = call i32 @float_negate(i32 %75)
%77 = load i32, i32* %8
%78 = icmp eq i32 %76, %77
%79 = zext i1 %78 to i32
%80 = call i32 @assert(i32 %79)
%81 = load i32, i32* %8
%82 = call i32 @float_absval(i32 %81)
%83 = load i32, i32* %8
%84 = icmp eq i32 %82, %83
%85 = zext i1 %84 to i32
%86 = call i32 @assert(i32 %85)
%87 = load i32, i32* %8
%88 = call i32 @float_twice(i32 %87)
%89 = load i32, i32* %8
%90 = icmp eq i32 %88, %89
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
%93 = load i32, i32* %8
%94 = call i32 @float_half(i32 %93)
%95 = load i32, i32* %8
%96 = icmp eq i32 %94, %95
%97 = zext i1 %96 to i32
%98 = call i32 @assert(i32 %97)
%99 = load i32, i32* %8
%100 = call i32 @float_f2i(i32 %99)
%101 = load i32, i32* %12
%102 = icmp eq i32 %100, %101
%103 = zext i1 %102 to i32
%104 = call i32 @assert(i32 %103)
br label %155
105: ; preds = %26
%106 = load i32, i32* %8
%107 = call i32 @float_negate(i32 %106)
%108 = call float @u2f(i32 %107)
%109 = load float, float* %9
%110 = fneg float %109
%111 = fcmp oeq float %108, %110
%112 = zext i1 %111 to i32
%113 = call i32 @assert(i32 %112)
%114 = load i32, i32* %8
%115 = call i32 @float_absval(i32 %114)
%116 = call float @u2f(i32 %115)
%117 = load float, float* %9
%118 = call float @llvm.fabs.f32(float %117)
%119 = fcmp oeq float %116, %118
%120 = zext i1 %119 to i32
%121 = call i32 @assert(i32 %120)
%122 = load i32, i32* %8
%123 = call i32 @float_twice(i32 %122)
%124 = call float @u2f(i32 %123)
%125 = load float, float* %10
%126 = fcmp oeq float %124, %125
%127 = zext i1 %126 to i32
%128 = call i32 @assert(i32 %127)
%129 = load i32, i32* %8
%130 = call i32 @float_half(i32 %129)
%131 = call float @u2f(i32 %130)
%132 = load float, float* %11
%133 = fcmp oeq float %131, %132
%134 = zext i1 %133 to i32
%135 = call i32 @assert(i32 %134)
%136 = load i32, i32* %8
%137 = call i32 @float_f2i(i32 %136)
%138 = load i32, i32* %12
%139 = icmp eq i32 %137, %138
%140 = zext i1 %139 to i32
%141 = call i32 @assert(i32 %140)
%142 = load i32, i32* %8
%143 = call i32 @float_i2f(i32 %142)
%144 = call float @u2f(i32 %143)
store float %144, float* %14
%145 = load float, float* %14
%146 = call i32 @f2u(float %145)
%147 = load float, float* %14
%148 = fpext float %147 to double
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %146, double %148)
%150 = load float, float* %14
%151 = load float, float* %13
%152 = fcmp oeq float %150, %151
%153 = zext i1 %152 to i32
%154 = call i32 @assert(i32 %153)
br label %155
155: ; preds = %105, %74
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %157
157: ; preds = %155
%158 = load i32, i32* %6
%159 = add i32 %158, 1
store i32 %159, i32* %6
br label %16
160: ; preds = %16
%161 = load i32, i32* %3
ret i32 %161
}

LLVM IR (-O2):
@.str = [14 x i8] c"r:\090x%.8X\09%d\0A\00"
@.str.1 = [17 x i8] c"f:\090x%.8X\09%.50f\0A\00"
@.str.2 = [21 x i8] c"fmul2:\090x%.8X\09%.50f\0A\00"
@.str.3 = [21 x i8] c"fdiv2:\090x%.8X\09%.50f\0A\00"
@.str.4 = [16 x i8] c"f2i:\090x%.8X\09%d\0A\00"
@.str.5 = [19 x i8] c"i2f:\090x%.8X\09%.50f\0A\00"
@.str.6 = [22 x i8] c"my_i2f:\090x%.8X\09%.50f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_seed()
br label %5
4: ; preds = %82
ret i32 0
5: ; preds = %2, %82
%6 = phi i32 [ 0, %2 ], [ %87, %82 ]
%7 = icmp eq i32 %6, 4095
%8 = tail call i32 (...) @random_int()
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %8)
%10 = tail call float @u2f(i32 %8)
%11 = tail call i32 @f2u(float %10)
%12 = fpext float %10 to double
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %11, double %12)
%14 = fmul float %10, 2.000000e+00
%15 = tail call i32 @f2u(float %14)
%16 = fpext float %14 to double
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %15, double %16)
%18 = fmul float %10, 5.000000e-01
%19 = tail call i32 @f2u(float %18)
%20 = fpext float %18 to double
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %19, double %20)
%22 = fptosi float %10 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %22, i32 %22)
%24 = sitofp i32 %8 to float
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %8)
%26 = tail call i32 @f2u(float %24)
%27 = fpext float %24 to double
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %26, double %27)
%29 = tail call i64 @isnan(float %10)
%30 = icmp eq i64 %29, 0
%31 = tail call i32 @float_negate(i32 %8)
br i1 %30, label %50, label %32
32: ; preds = %5
%33 = icmp eq i32 %31, %8
%34 = zext i1 %33 to i32
%35 = tail call i32 @assert(i32 %34)
%36 = tail call i32 @float_absval(i32 %8)
%37 = icmp eq i32 %36, %8
%38 = zext i1 %37 to i32
%39 = tail call i32 @assert(i32 %38)
%40 = tail call i32 @float_twice(i32 %8)
%41 = icmp eq i32 %40, %8
%42 = zext i1 %41 to i32
%43 = tail call i32 @assert(i32 %42)
%44 = tail call i32 @float_half(i32 %8)
%45 = icmp eq i32 %44, %8
%46 = zext i1 %45 to i32
%47 = tail call i32 @assert(i32 %46)
%48 = tail call i32 @float_f2i(i32 %8)
%49 = icmp eq i32 %48, %22
br label %82
50: ; preds = %5
%51 = tail call float @u2f(i32 %31)
%52 = fneg float %10
%53 = fcmp oeq float %51, %52
%54 = zext i1 %53 to i32
%55 = tail call i32 @assert(i32 %54)
%56 = tail call i32 @float_absval(i32 %8)
%57 = tail call float @u2f(i32 %56)
%58 = tail call float @llvm.fabs.f32(float %10)
%59 = fcmp oeq float %57, %58
%60 = zext i1 %59 to i32
%61 = tail call i32 @assert(i32 %60)
%62 = tail call i32 @float_twice(i32 %8)
%63 = tail call float @u2f(i32 %62)
%64 = fcmp oeq float %63, %14
%65 = zext i1 %64 to i32
%66 = tail call i32 @assert(i32 %65)
%67 = tail call i32 @float_half(i32 %8)
%68 = tail call float @u2f(i32 %67)
%69 = fcmp oeq float %68, %18
%70 = zext i1 %69 to i32
%71 = tail call i32 @assert(i32 %70)
%72 = tail call i32 @float_f2i(i32 %8)
%73 = icmp eq i32 %72, %22
%74 = zext i1 %73 to i32
%75 = tail call i32 @assert(i32 %74)
%76 = tail call i32 @float_i2f(i32 %8)
%77 = tail call float @u2f(i32 %76)
%78 = tail call i32 @f2u(float %77)
%79 = fpext float %77 to double
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %78, double %79)
%81 = fcmp oeq float %77, %24
br label %82
82: ; preds = %50, %32
%83 = phi i1 [ %81, %50 ], [ %49, %32 ]
%84 = zext i1 %83 to i32
%85 = tail call i32 @assert(i32 %84)
%86 = tail call i32 @putchar(i32 10)
%87 = add i32 %6, 1
br i1 %7, label %4, label %5
}