#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 */
float INFINITY;
float float_min_size() {
  float d, d_p, step;
  short int i;
  d = d_p = step = 0;
  i = 0;
  d = -1;
  while (d != -INFINITY) {
    d_p = d;
    d = d * 10;
    i++;
  };
  d = d_p;
  step = d;
  while (step < -1) {
    step = step / 10;
    i = 0;
    while ((d < INFINITY) && (d + step != d)) {
      d_p = d;
      d = d + step;
      i++;
    };
    d = d_p;
  };
  return d;
}


x86 assembly (clang, -O0):
<float_min_size>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movw   $0x0,-0xe(%rbp)
movss  0xed6(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2ead(%rip),%rax
movss  (%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
ucomiss %xmm1,%xmm0
jne    1160 <float_min_size+0x60>
jp     1160 <float_min_size+0x60>
jmp    118d <float_min_size+0x8d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe92(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0xe(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xe(%rbp)
jmp    112f <float_min_size+0x2f>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe57(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    124f <float_min_size+0x14f>
movss  -0xc(%rbp),%xmm0
movss  0xe44(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movw   $0x0,-0xe(%rbp)
movss  -0x4(%rbp),%xmm1
mov    0x2e0d(%rip),%rax
movss  (%rax),%xmm0
xor    %eax,%eax
ucomiss %xmm1,%xmm0
mov    %al,-0xf(%rbp)
jbe    1206 <float_min_size+0x106>
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0xf(%rbp)
mov    -0xf(%rbp),%al
test   $0x1,%al
jne    1216 <float_min_size+0x116>
jmp    1240 <float_min_size+0x140>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0xe(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xe(%rbp)
jmp    11cf <float_min_size+0xcf>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11a1 <float_min_size+0xa1>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_min_size>:
mov    0x2ee1(%rip),%rax
movss  (%rax),%xmm1
ucomiss 0xefe(%rip),%xmm1
jne    1116 <float_min_size+0x16>
jnp    117b <float_min_size+0x7b>
movaps 0xee3(%rip),%xmm0
xorps  %xmm1,%xmm0
movss  0xeec(%rip),%xmm4
movss  0xee8(%rip),%xmm2
movaps %xmm4,%xmm3
mulss  %xmm2,%xmm4
ucomiss %xmm0,%xmm4
jne    1130 <float_min_size+0x30>
jp     1130 <float_min_size+0x30>
movss  0xece(%rip),%xmm4
ucomiss %xmm3,%xmm4
jbe    117f <float_min_size+0x7f>
movaps %xmm3,%xmm0
jmp    1155 <float_min_size+0x55>
ucomiss %xmm3,%xmm4
jbe    117e <float_min_size+0x7e>
divss  %xmm2,%xmm3
movaps %xmm0,%xmm6
movaps %xmm0,%xmm5
nop
movaps %xmm5,%xmm0
ucomiss %xmm6,%xmm1
jbe    1150 <float_min_size+0x50>
movaps %xmm6,%xmm5
movaps %xmm3,%xmm6
addss  %xmm5,%xmm6
ucomiss %xmm5,%xmm6
jne    1160 <float_min_size+0x60>
jp     1160 <float_min_size+0x60>
jmp    1150 <float_min_size+0x50>
xorps  %xmm0,%xmm0
ret
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
@INFINITY = global float 0.000000e+00
define float @float_min_size() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca i16
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %1
store i16 0, i16* %4
store float -1.000000e+00, float* %1
br label %5
5: ; preds = %10, %0
%6 = load float, float* %1
%7 = load float, float* @INFINITY
%8 = fneg float %7
%9 = fcmp une float %6, %8
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load float, float* %1
store float %11, float* %2
%12 = load float, float* %1
%13 = fmul float %12, 1.000000e+01
store float %13, float* %1
%14 = load i16, i16* %4
%15 = add i16 %14, 1
store i16 %15, i16* %4
br label %5
16: ; preds = %5
%17 = load float, float* %2
store float %17, float* %1
%18 = load float, float* %1
store float %18, float* %3
br label %19
19: ; preds = %44, %16
%20 = load float, float* %3
%21 = fcmp olt float %20, -1.000000e+00
br i1 %21, label %22, label %46
22: ; preds = %19
%23 = load float, float* %3
%24 = fdiv float %23, 1.000000e+01
store float %24, float* %3
store i16 0, i16* %4
br label %25
25: ; preds = %37, %22
%26 = load float, float* %1
%27 = load float, float* @INFINITY
%28 = fcmp olt float %26, %27
br i1 %28, label %29, label %35
29: ; preds = %25
%30 = load float, float* %1
%31 = load float, float* %3
%32 = fadd float %30, %31
%33 = load float, float* %1
%34 = fcmp une float %32, %33
br label %35
35: ; preds = %29, %25
%36 = phi i1 [ false, %25 ], [ %34, %29 ]
br i1 %36, label %37, label %44
37: ; preds = %35
%38 = load float, float* %1
store float %38, float* %2
%39 = load float, float* %1
%40 = load float, float* %3
%41 = fadd float %39, %40
store float %41, float* %1
%42 = load i16, i16* %4
%43 = add i16 %42, 1
store i16 %43, i16* %4
br label %25
44: ; preds = %35
%45 = load float, float* %2
store float %45, float* %1
br label %19
46: ; preds = %19
%47 = load float, float* %1
ret float %47
}

LLVM IR (-O2):
@INFINITY = global float 0.000000e+00
define float @float_min_size() {
%1 = load float, float* @INFINITY
%2 = fneg float %1
%3 = fcmp une float %1, 1.000000e+00
br i1 %3, label %6, label %23
4: ; preds = %6
%5 = fcmp olt float %7, -1.000000e+00
br i1 %5, label %12, label %23
6: ; preds = %0, %6
%7 = phi float [ %8, %6 ], [ -1.000000e+00, %0 ]
%8 = fmul float %7, 1.000000e+01
%9 = fcmp une float %8, %2
br i1 %9, label %6, label %4
10: ; preds = %16
%11 = fcmp olt float %15, -1.000000e+00
br i1 %11, label %12, label %23
12: ; preds = %4, %10
%13 = phi float [ %15, %10 ], [ %7, %4 ]
%14 = phi float [ %18, %10 ], [ %7, %4 ]
%15 = fdiv float %13, 1.000000e+01
br label %16
16: ; preds = %16, %12
%17 = phi float [ %14, %12 ], [ %20, %16 ]
%18 = phi float [ %14, %12 ], [ %17, %16 ]
%19 = fcmp olt float %17, %1
%20 = fadd float %15, %17
%21 = fcmp une float %20, %17
%22 = select i1 %19, i1 %21, i1 false
br i1 %22, label %16, label %10
23: ; preds = %10, %0, %4
%24 = phi float [ %7, %4 ], [ 0.000000e+00, %0 ], [ %18, %10 ]
ret float %24
}