#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 */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int UINT32_C(int);
int bits(int, int, int);
int float_as_uint(float);
int32_t ftoi_circuit(float f) {
  uint32_t fu = float_as_uint(f);
  uint32_t sgn;
  uint32_t x_len;
  uint32_t u_frc_4, u_frc_3, u_frc_2, u_frc_1, u_frc_0, u_frc_o, u_frc_v,
      u_frc_v2;
  uint32_t any_4, any_3, any_2, any_1, any_0, any_o;
  uint32_t i_err;
  uint32_t err, round;
  sgn = bits(fu, 31, 31);
  x_len = bits(bits(fu, 30, 23) - 0x7E, 8, 0);
  any_4 = 0;
  u_frc_4 = (uint32_t)1 << 31 | bits(fu, 22, 0) << 8;
  any_3 = bits(x_len, 4, 4) == 0 && bits(u_frc_4, 15, 0) ? 1 : any_4;
  u_frc_3 = bits(x_len, 4, 4) == 0 ? u_frc_4 >> 16 : u_frc_4;
  any_2 = bits(x_len, 3, 3) == 0 && bits(u_frc_3, 7, 0) ? 1 : any_3;
  u_frc_2 = bits(x_len, 3, 3) == 0 ? u_frc_3 >> 8 : u_frc_3;
  any_1 = bits(x_len, 2, 2) == 0 && bits(u_frc_2, 3, 0) ? 1 : any_2;
  u_frc_1 = bits(x_len, 2, 2) == 0 ? u_frc_2 >> 4 : u_frc_2;
  any_0 = bits(x_len, 1, 1) == 0 && bits(u_frc_1, 1, 0) ? 1 : any_1;
  u_frc_0 = bits(x_len, 1, 1) == 0 ? u_frc_1 >> 2 : u_frc_1;
  any_o = bits(x_len, 0, 0) == 0 && bits(u_frc_0, 0, 0) ? 1 : any_0;
  u_frc_o = bits(x_len, 0, 0) == 0 ? u_frc_0 >> 1 : u_frc_0;
  u_frc_v = u_frc_o >> 1;
  round = (bits(u_frc_o, 0, 0) & any_o) |
          (bits(u_frc_o, 1, 1) & bits(u_frc_o, 0, 0));
  i_err = bits(x_len, 8, 8) == 1 ? UINT32_C(0x00000000)
          : sgn == 0             ? UINT32_C(0x7FFFFFFF)
                                 : UINT32_C(0x80000000);
  err = (bits(x_len, 8, 8) == 1) | (bits(x_len, 7, 5) != 0);
  u_frc_v2 = sgn == 0 ? u_frc_v : ~u_frc_v;
  return err ? i_err : u_frc_v2 + (sgn ^ round);
}


x86 assembly (clang, -O0):
<ftoi_circuit>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <float_as_uint@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1f,%edx
mov    %edx,%esi
call   1040 <bits@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1e,%esi
mov    $0x17,%edx
call   1040 <bits@plt>
mov    %eax,%edi
sub    $0x7e,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x16,%esi
xor    %edx,%edx
call   1040 <bits@plt>
shl    $0x8,%eax
or     $0x80000000,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    11e3 <ftoi_circuit+0xb3>
mov    -0x14(%rbp),%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1040 <bits@plt>
cmp    $0x0,%eax
je     11e3 <ftoi_circuit+0xb3>
mov    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11e9 <ftoi_circuit+0xb9>
mov    -0x34(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    1215 <ftoi_circuit+0xe5>
mov    -0x14(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x5c(%rbp)
jmp    121b <ftoi_circuit+0xeb>
mov    -0x14(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x3,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    125e <ftoi_circuit+0x12e>
mov    -0x18(%rbp),%edi
mov    $0x7,%esi
xor    %edx,%edx
call   1040 <bits@plt>
cmp    $0x0,%eax
je     125e <ftoi_circuit+0x12e>
mov    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1264 <ftoi_circuit+0x134>
mov    -0x38(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x3,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    1290 <ftoi_circuit+0x160>
mov    -0x18(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x64(%rbp)
jmp    1296 <ftoi_circuit+0x166>
mov    -0x18(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x2,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    12d9 <ftoi_circuit+0x1a9>
mov    -0x1c(%rbp),%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1040 <bits@plt>
cmp    $0x0,%eax
je     12d9 <ftoi_circuit+0x1a9>
mov    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    12df <ftoi_circuit+0x1af>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x2,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    130b <ftoi_circuit+0x1db>
mov    -0x1c(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x6c(%rbp)
jmp    1311 <ftoi_circuit+0x1e1>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    1354 <ftoi_circuit+0x224>
mov    -0x20(%rbp),%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <bits@plt>
cmp    $0x0,%eax
je     1354 <ftoi_circuit+0x224>
mov    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    135a <ftoi_circuit+0x22a>
mov    -0x40(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    1386 <ftoi_circuit+0x256>
mov    -0x20(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x74(%rbp)
jmp    138c <ftoi_circuit+0x25c>
mov    -0x20(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    13c9 <ftoi_circuit+0x299>
mov    -0x24(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
je     13c9 <ftoi_circuit+0x299>
mov    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    13cf <ftoi_circuit+0x29f>
mov    -0x44(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x0,%eax
jne    13f8 <ftoi_circuit+0x2c8>
mov    -0x24(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    13fe <ftoi_circuit+0x2ce>
mov    -0x24(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <bits@plt>
and    -0x48(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x28(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <bits@plt>
mov    %eax,-0x84(%rbp)
mov    -0x28(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <bits@plt>
mov    -0x84(%rbp),%ecx
mov    %eax,%edx
mov    -0x80(%rbp),%eax
and    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x8,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x1,%eax
jne    147c <ftoi_circuit+0x34c>
xor    %edi,%edi
call   1050 <UINT32_C@plt>
mov    %eax,-0x88(%rbp)
jmp    14b7 <ftoi_circuit+0x387>
cmpl   $0x0,-0xc(%rbp)
jne    149b <ftoi_circuit+0x36b>
mov    $0x7fffffff,%edi
call   1050 <UINT32_C@plt>
mov    %eax,-0x8c(%rbp)
jmp    14ab <ftoi_circuit+0x37b>
mov    $0x80000000,%edi
call   1050 <UINT32_C@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x8,%edx
mov    %edx,%esi
call   1040 <bits@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x90(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x7,%esi
mov    $0x5,%edx
call   1040 <bits@plt>
mov    %eax,%ecx
mov    -0x90(%rbp),%eax
cmp    $0x0,%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
mov    %eax,-0x50(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1523 <ftoi_circuit+0x3f3>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x94(%rbp)
jmp    152f <ftoi_circuit+0x3ff>
mov    -0x2c(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x50(%rbp)
je     1550 <ftoi_circuit+0x420>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x98(%rbp)
jmp    1561 <ftoi_circuit+0x431>
mov    -0x30(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    -0x54(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftoi_circuit>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
call   1030 <float_as_uint@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x1f,%esi
mov    $0x1f,%edx
call   1040 <bits@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%edi
mov    $0x1e,%esi
mov    $0x17,%edx
call   1040 <bits@plt>
lea    -0x7e(%rax),%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0x16,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
or     $0x80000000,%ebx
mov    %r14d,%edi
mov    $0x4,%esi
mov    $0x4,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    11c4 <ftoi_circuit+0x94>
mov    %ebx,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    $0x1,%r15d
test   %eax,%eax
jne    11c7 <ftoi_circuit+0x97>
xor    %r15d,%r15d
mov    %r14d,%edi
mov    $0x4,%esi
mov    $0x4,%edx
call   1040 <bits@plt>
mov    %ebx,%ebp
sar    $0x10,%ebp
test   %eax,%eax
cmovne %ebx,%ebp
mov    %r14d,%edi
mov    $0x3,%esi
mov    $0x3,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    1211 <ftoi_circuit+0xe1>
mov    %ebp,%edi
mov    $0x7,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    $0x1,%r12d
test   %eax,%eax
jne    1214 <ftoi_circuit+0xe4>
mov    %r15d,%r12d
mov    %r14d,%edi
mov    $0x3,%esi
mov    $0x3,%edx
call   1040 <bits@plt>
mov    %ebp,%ebx
sar    $0x8,%ebx
test   %eax,%eax
cmovne %ebp,%ebx
mov    %r14d,%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    125e <ftoi_circuit+0x12e>
mov    %ebx,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    $0x1,%r13d
test   %eax,%eax
jne    1261 <ftoi_circuit+0x131>
mov    %r12d,%r13d
mov    %r14d,%edi
mov    $0x2,%esi
mov    $0x2,%edx
call   1040 <bits@plt>
mov    %ebx,%ebp
sar    $0x4,%ebp
test   %eax,%eax
cmovne %ebx,%ebp
mov    $0x1,%r15d
mov    %r14d,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    12ab <ftoi_circuit+0x17b>
mov    %ebp,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    12ae <ftoi_circuit+0x17e>
mov    %r13d,%r15d
mov    $0x1,%r12d
mov    %r14d,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <bits@plt>
mov    %ebp,%ebx
sar    $0x2,%ebx
test   %eax,%eax
cmovne %ebp,%ebx
mov    %r14d,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    12ef <ftoi_circuit+0x1bf>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <bits@plt>
test   %eax,%eax
jne    12f2 <ftoi_circuit+0x1c2>
mov    %r15d,%r12d
mov    %r12d,0x14(%rsp)
xor    %ebp,%ebp
mov    %r14d,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <bits@plt>
test   %eax,%eax
sete   %cl
sar    %cl,%ebx
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <bits@plt>
mov    %eax,0x10(%rsp)
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <bits@plt>
mov    %eax,%r13d
mov    %r14d,%edi
mov    $0x8,%esi
mov    $0x8,%edx
call   1040 <bits@plt>
cmpl   $0x1,0xc(%rsp)
mov    $0x80000000,%edi
sbb    $0x0,%edi
cmp    $0x1,%eax
cmove  %ebp,%edi
call   1050 <UINT32_C@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    $0x8,%esi
mov    $0x8,%edx
call   1040 <bits@plt>
mov    %eax,%r12d
mov    %r14d,%edi
mov    $0x7,%esi
mov    $0x5,%edx
call   1040 <bits@plt>
cmp    $0x1,%r12d
je     13b9 <ftoi_circuit+0x289>
test   %eax,%eax
jne    13b9 <ftoi_circuit+0x289>
and    0x10(%rsp),%r13d
and    0x14(%rsp),%r15d
or     %r13d,%r15d
sar    %ebx
mov    0xc(%rsp),%eax
xor    %eax,%r15d
neg    %eax
sbb    %ebp,%ebp
xor    %ebx,%ebp
add    %r15d,%ebp
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ftoi_circuit(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store float %0, float* %2
%23 = load float, float* %2
%24 = call i32 @float_as_uint(float %23)
store i32 %24, i32* %3
%25 = load i32, i32* %3
%26 = call i32 @bits(i32 %25, i32 31, i32 31)
store i32 %26, i32* %4
%27 = load i32, i32* %3
%28 = call i32 @bits(i32 %27, i32 30, i32 23)
%29 = sub nsw i32 %28, 126
%30 = call i32 @bits(i32 %29, i32 8, i32 0)
store i32 %30, i32* %5
store i32 0, i32* %14
%31 = load i32, i32* %3
%32 = call i32 @bits(i32 %31, i32 22, i32 0)
%33 = shl i32 %32, 8
%34 = or i32 -2147483648, %33
store i32 %34, i32* %6
%35 = load i32, i32* %5
%36 = call i32 @bits(i32 %35, i32 4, i32 4)
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %1
%39 = load i32, i32* %6
%40 = call i32 @bits(i32 %39, i32 15, i32 0)
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %38
br label %45
43: ; preds = %38, %1
%44 = load i32, i32* %14
br label %45
45: ; preds = %43, %42
%46 = phi i32 [ 1, %42 ], [ %44, %43 ]
store i32 %46, i32* %15
%47 = load i32, i32* %5
%48 = call i32 @bits(i32 %47, i32 4, i32 4)
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %45
%51 = load i32, i32* %6
%52 = ashr i32 %51, 16
br label %55
53: ; preds = %45
%54 = load i32, i32* %6
br label %55
55: ; preds = %53, %50
%56 = phi i32 [ %52, %50 ], [ %54, %53 ]
store i32 %56, i32* %7
%57 = load i32, i32* %5
%58 = call i32 @bits(i32 %57, i32 3, i32 3)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %65
60: ; preds = %55
%61 = load i32, i32* %7
%62 = call i32 @bits(i32 %61, i32 7, i32 0)
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %60
br label %67
65: ; preds = %60, %55
%66 = load i32, i32* %15
br label %67
67: ; preds = %65, %64
%68 = phi i32 [ 1, %64 ], [ %66, %65 ]
store i32 %68, i32* %16
%69 = load i32, i32* %5
%70 = call i32 @bits(i32 %69, i32 3, i32 3)
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %75
72: ; preds = %67
%73 = load i32, i32* %7
%74 = ashr i32 %73, 8
br label %77
75: ; preds = %67
%76 = load i32, i32* %7
br label %77
77: ; preds = %75, %72
%78 = phi i32 [ %74, %72 ], [ %76, %75 ]
store i32 %78, i32* %8
%79 = load i32, i32* %5
%80 = call i32 @bits(i32 %79, i32 2, i32 2)
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %77
%83 = load i32, i32* %8
%84 = call i32 @bits(i32 %83, i32 3, i32 0)
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %87
86: ; preds = %82
br label %89
87: ; preds = %82, %77
%88 = load i32, i32* %16
br label %89
89: ; preds = %87, %86
%90 = phi i32 [ 1, %86 ], [ %88, %87 ]
store i32 %90, i32* %17
%91 = load i32, i32* %5
%92 = call i32 @bits(i32 %91, i32 2, i32 2)
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %89
%95 = load i32, i32* %8
%96 = ashr i32 %95, 4
br label %99
97: ; preds = %89
%98 = load i32, i32* %8
br label %99
99: ; preds = %97, %94
%100 = phi i32 [ %96, %94 ], [ %98, %97 ]
store i32 %100, i32* %9
%101 = load i32, i32* %5
%102 = call i32 @bits(i32 %101, i32 1, i32 1)
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %99
%105 = load i32, i32* %9
%106 = call i32 @bits(i32 %105, i32 1, i32 0)
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %109
108: ; preds = %104
br label %111
109: ; preds = %104, %99
%110 = load i32, i32* %17
br label %111
111: ; preds = %109, %108
%112 = phi i32 [ 1, %108 ], [ %110, %109 ]
store i32 %112, i32* %18
%113 = load i32, i32* %5
%114 = call i32 @bits(i32 %113, i32 1, i32 1)
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %119
116: ; preds = %111
%117 = load i32, i32* %9
%118 = ashr i32 %117, 2
br label %121
119: ; preds = %111
%120 = load i32, i32* %9
br label %121
121: ; preds = %119, %116
%122 = phi i32 [ %118, %116 ], [ %120, %119 ]
store i32 %122, i32* %10
%123 = load i32, i32* %5
%124 = call i32 @bits(i32 %123, i32 0, i32 0)
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %131
126: ; preds = %121
%127 = load i32, i32* %10
%128 = call i32 @bits(i32 %127, i32 0, i32 0)
%129 = icmp ne i32 %128, 0
br i1 %129, label %130, label %131
130: ; preds = %126
br label %133
131: ; preds = %126, %121
%132 = load i32, i32* %18
br label %133
133: ; preds = %131, %130
%134 = phi i32 [ 1, %130 ], [ %132, %131 ]
store i32 %134, i32* %19
%135 = load i32, i32* %5
%136 = call i32 @bits(i32 %135, i32 0, i32 0)
%137 = icmp eq i32 %136, 0
br i1 %137, label %138, label %141
138: ; preds = %133
%139 = load i32, i32* %10
%140 = ashr i32 %139, 1
br label %143
141: ; preds = %133
%142 = load i32, i32* %10
br label %143
143: ; preds = %141, %138
%144 = phi i32 [ %140, %138 ], [ %142, %141 ]
store i32 %144, i32* %11
%145 = load i32, i32* %11
%146 = ashr i32 %145, 1
store i32 %146, i32* %12
%147 = load i32, i32* %11
%148 = call i32 @bits(i32 %147, i32 0, i32 0)
%149 = load i32, i32* %19
%150 = and i32 %148, %149
%151 = load i32, i32* %11
%152 = call i32 @bits(i32 %151, i32 1, i32 1)
%153 = load i32, i32* %11
%154 = call i32 @bits(i32 %153, i32 0, i32 0)
%155 = and i32 %152, %154
%156 = or i32 %150, %155
store i32 %156, i32* %22
%157 = load i32, i32* %5
%158 = call i32 @bits(i32 %157, i32 8, i32 8)
%159 = icmp eq i32 %158, 1
br i1 %159, label %160, label %162
160: ; preds = %143
%161 = call i32 @UINT32_C(i32 0)
br label %171
162: ; preds = %143
%163 = load i32, i32* %4
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %167
165: ; preds = %162
%166 = call i32 @UINT32_C(i32 2147483647)
br label %169
167: ; preds = %162
%168 = call i32 @UINT32_C(i32 -2147483648)
br label %169
169: ; preds = %167, %165
%170 = phi i32 [ %166, %165 ], [ %168, %167 ]
br label %171
171: ; preds = %169, %160
%172 = phi i32 [ %161, %160 ], [ %170, %169 ]
store i32 %172, i32* %20
%173 = load i32, i32* %5
%174 = call i32 @bits(i32 %173, i32 8, i32 8)
%175 = icmp eq i32 %174, 1
%176 = zext i1 %175 to i32
%177 = load i32, i32* %5
%178 = call i32 @bits(i32 %177, i32 7, i32 5)
%179 = icmp ne i32 %178, 0
%180 = zext i1 %179 to i32
%181 = or i32 %176, %180
store i32 %181, i32* %21
%182 = load i32, i32* %4
%183 = icmp eq i32 %182, 0
br i1 %183, label %184, label %186
184: ; preds = %171
%185 = load i32, i32* %12
br label %189
186: ; preds = %171
%187 = load i32, i32* %12
%188 = xor i32 %187, -1
br label %189
189: ; preds = %186, %184
%190 = phi i32 [ %185, %184 ], [ %188, %186 ]
store i32 %190, i32* %13
%191 = load i32, i32* %21
%192 = icmp ne i32 %191, 0
br i1 %192, label %193, label %195
193: ; preds = %189
%194 = load i32, i32* %20
br label %201
195: ; preds = %189
%196 = load i32, i32* %13
%197 = load i32, i32* %4
%198 = load i32, i32* %22
%199 = xor i32 %197, %198
%200 = add nsw i32 %196, %199
br label %201
201: ; preds = %195, %193
%202 = phi i32 [ %194, %193 ], [ %200, %195 ]
ret i32 %202
}

LLVM IR (-O2):
define i32 @ftoi_circuit(float %0) {
%2 = tail call i32 @float_as_uint(float %0)
%3 = tail call i32 @bits(i32 %2, i32 31, i32 31)
%4 = tail call i32 @bits(i32 %2, i32 30, i32 23)
%5 = add nsw i32 %4, -126
%6 = tail call i32 @bits(i32 %5, i32 8, i32 0)
%7 = tail call i32 @bits(i32 %2, i32 22, i32 0)
%8 = shl i32 %7, 8
%9 = or i32 %8, -2147483648
%10 = tail call i32 @bits(i32 %6, i32 4, i32 4)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = tail call i32 @bits(i32 %9, i32 15, i32 0)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12, %1
br label %16
16: ; preds = %12, %15
%17 = phi i32 [ 0, %15 ], [ 1, %12 ]
%18 = tail call i32 @bits(i32 %6, i32 4, i32 4)
%19 = icmp eq i32 %18, 0
%20 = ashr i32 %9, 16
%21 = select i1 %19, i32 %20, i32 %9
%22 = tail call i32 @bits(i32 %6, i32 3, i32 3)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %16
%25 = tail call i32 @bits(i32 %21, i32 7, i32 0)
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %24, %16
br label %28
28: ; preds = %24, %27
%29 = phi i32 [ %17, %27 ], [ 1, %24 ]
%30 = tail call i32 @bits(i32 %6, i32 3, i32 3)
%31 = icmp eq i32 %30, 0
%32 = ashr i32 %21, 8
%33 = select i1 %31, i32 %32, i32 %21
%34 = tail call i32 @bits(i32 %6, i32 2, i32 2)
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %28
%37 = tail call i32 @bits(i32 %33, i32 3, i32 0)
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %36, %28
br label %40
40: ; preds = %36, %39
%41 = phi i32 [ %29, %39 ], [ 1, %36 ]
%42 = tail call i32 @bits(i32 %6, i32 2, i32 2)
%43 = icmp eq i32 %42, 0
%44 = ashr i32 %33, 4
%45 = select i1 %43, i32 %44, i32 %33
%46 = tail call i32 @bits(i32 %6, i32 1, i32 1)
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %40
%49 = tail call i32 @bits(i32 %45, i32 1, i32 0)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %48, %40
br label %52
52: ; preds = %48, %51
%53 = phi i32 [ %41, %51 ], [ 1, %48 ]
%54 = tail call i32 @bits(i32 %6, i32 1, i32 1)
%55 = icmp eq i32 %54, 0
%56 = ashr i32 %45, 2
%57 = select i1 %55, i32 %56, i32 %45
%58 = tail call i32 @bits(i32 %6, i32 0, i32 0)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %52
%61 = tail call i32 @bits(i32 %57, i32 0, i32 0)
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %64
63: ; preds = %60, %52
br label %64
64: ; preds = %60, %63
%65 = phi i32 [ %53, %63 ], [ 1, %60 ]
%66 = tail call i32 @bits(i32 %6, i32 0, i32 0)
%67 = icmp eq i32 %66, 0
%68 = zext i1 %67 to i32
%69 = ashr i32 %57, %68
%70 = tail call i32 @bits(i32 %69, i32 0, i32 0)
%71 = tail call i32 @bits(i32 %69, i32 1, i32 1)
%72 = tail call i32 @bits(i32 %69, i32 0, i32 0)
%73 = tail call i32 @bits(i32 %6, i32 8, i32 8)
%74 = icmp eq i32 %73, 1
%75 = icmp eq i32 %3, 0
%76 = select i1 %75, i32 2147483647, i32 -2147483648
%77 = select i1 %74, i32 0, i32 %76
%78 = tail call i32 @UINT32_C(i32 %77)
%79 = tail call i32 @bits(i32 %6, i32 8, i32 8)
%80 = icmp eq i32 %79, 1
%81 = tail call i32 @bits(i32 %6, i32 7, i32 5)
%82 = icmp ne i32 %81, 0
%83 = or i1 %80, %82
br i1 %83, label %94, label %84
84: ; preds = %64
%85 = and i32 %72, %71
%86 = and i32 %70, %65
%87 = or i32 %85, %86
%88 = ashr i32 %69, 1
%89 = icmp ne i32 %3, 0
%90 = sext i1 %89 to i32
%91 = xor i32 %88, %90
%92 = xor i32 %87, %3
%93 = add nsw i32 %92, %91
br label %94
94: ; preds = %64, %84
%95 = phi i32 [ %93, %84 ], [ %78, %64 ]
ret i32 %95
}