#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 */
scalar_t__ fmodf(float, int);
float pow(double, unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  printf("static const float floatdec[256] = {\n    ");
  unsigned int fraction;
  float dec, ceil = 0;
  bool bounds = true;
  for (fraction = 0; fraction < 256; fraction++) {
    dec = pow(10.0, fraction);
    if (0 < fraction && 0 == fraction % 11) {
      printf("\n    ");
    }
    if (bounds && dec == dec && (0 == fraction || 0 == fmodf(dec, 10))) {
      printf("%1.1f", dec);
      ceil = dec;
    } else {
      bounds = false;
      printf("%1.1f", ceil);
    }
    if (fraction < 255)
      printf(", ");
    else
      printf("\n");
  }
  printf("};\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jae    1287 <main+0x157>
mov    -0x14(%rbp),%edi
movsd  0xe7e(%rip),%xmm0
call   1050 <pow@plt>
movss  %xmm0,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
jae    11bb <main+0x8b>
mov    -0x14(%rbp),%eax
mov    $0xb,%ecx
xor    %edx,%edx
div    %ecx
xor    %eax,%eax
cmp    %edx,%eax
jne    11bb <main+0x8b>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
je     1228 <main+0xf8>
movss  -0x18(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
jne    1228 <main+0xf8>
jp     1228 <main+0xf8>
xor    %eax,%eax
cmp    -0x14(%rbp),%eax
je     1202 <main+0xd2>
movss  -0x18(%rbp),%xmm0
mov    $0xa,%edi
call   1040 <fmodf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    1228 <main+0xf8>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe20(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1246 <main+0x116>
movl   $0x0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdf3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cmpl   $0xff,-0x14(%rbp)
jae    1266 <main+0x136>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1274 <main+0x144>
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1279 <main+0x149>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116a <main+0x3a>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0xe8f(%rip),%xmm0
xor    %edi,%edi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
xor    %r13d,%r13d
ucomiss %xmm0,%xmm0
setnp  %al
jnp    118d <main+0x3d>
xorps  %xmm0,%xmm0
jp     1196 <main+0x46>
jmp    1199 <main+0x49>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
jnp    1199 <main+0x49>
xorps  %xmm1,%xmm1
movss  %xmm1,0x4(%rsp)
mov    %al,%r13b
lea    0xe89(%rip),%r12
mov    %r12,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe7e(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebp
jmp    11e9 <main+0x99>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x100,%ebp
je     12a0 <main+0x150>
movzbl %bpl,%ebx
imul   $0x75,%ebx,%eax
shr    $0x8,%eax
mov    %ebx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x3,%cl
movzbl %cl,%eax
imul   $0xfffffff5,%eax,%r15d
movsd  0xdf3(%rip),%xmm0
mov    %ebp,%edi
call   1070 <pow@plt>
add    %bl,%r15b
je     1220 <main+0xd0>
test   %r13d,%r13d
jne    123d <main+0xed>
jmp    1260 <main+0x110>
lea    0xe05(%rip),%rdi
xor    %eax,%eax
movss  %xmm0,(%rsp)
call   1050 <printf@plt>
movss  (%rsp),%xmm0
test   %r13d,%r13d
je     1260 <main+0x110>
ucomiss %xmm0,%xmm0
jp     1260 <main+0x110>
movss  %xmm0,(%rsp)
movss  (%rsp),%xmm0
mov    $0xa,%edi
call   1060 <fmodf@plt>
movss  (%rsp),%xmm0
test   %rax,%rax
je     1298 <main+0x148>
xor    %r13d,%r13d
movss  0x4(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cmp    $0xfe,%ebp
ja     11d0 <main+0x80>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11da <main+0x8a>
mov    $0x1,%r13d
jmp    1269 <main+0x119>
lea    0xd94(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"static const float floatdec[256] = {\0A \00"
@.str.1 = [6 x i8] c"\0A \00"
@.str.2 = [6 x i8] c"%1.1f\00"
@.str.3 = [3 x i8] c", \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [4 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 float
%8 = alloca float
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
store float 0.000000e+00, float* %8
store i32 1, i32* %9
store i32 0, i32* %6
br label %11
11: ; preds = %56, %2
%12 = load i32, i32* %6
%13 = icmp ult i32 %12, 256
br i1 %13, label %14, label %59
14: ; preds = %11
%15 = load i32, i32* %6
%16 = call float @pow(double 1.000000e+01, i32 %15)
store float %16, float* %7
%17 = load i32, i32* %6
%18 = icmp ult i32 0, %17
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load i32, i32* %6
%21 = urem i32 %20, 11
%22 = icmp eq i32 0, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %19, %14
%26 = load i32, i32* %9
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %44
28: ; preds = %25
%29 = load float, float* %7
%30 = load float, float* %7
%31 = fcmp oeq float %29, %30
br i1 %31, label %32, label %44
32: ; preds = %28
%33 = load i32, i32* %6
%34 = icmp eq i32 0, %33
br i1 %34, label %39, label %35
35: ; preds = %32
%36 = load float, float* %7
%37 = call i64 @fmodf(float %36, i32 10)
%38 = icmp eq i64 0, %37
br i1 %38, label %39, label %44
39: ; preds = %35, %32
%40 = load float, float* %7
%41 = fpext float %40 to double
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %41)
%43 = load float, float* %7
store float %43, float* %8
br label %48
44: ; preds = %35, %28, %25
store i32 0, i32* %9
%45 = load float, float* %8
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %46)
br label %48
48: ; preds = %44, %39
%49 = load i32, i32* %6
%50 = icmp ult i32 %49, 255
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %55
53: ; preds = %48
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %55
55: ; preds = %53, %51
br label %56
56: ; preds = %55
%57 = load i32, i32* %6
%58 = add i32 %57, 1
store i32 %58, i32* %6
br label %11
59: ; preds = %11
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%61 = load i32, i32* %3
ret i32 %61
}

LLVM IR (-O2):
@.str = [42 x i8] c"static const float floatdec[256] = {\0A \00"
@.str.1 = [6 x i8] c"\0A \00"
@.str.2 = [6 x i8] c"%1.1f\00"
@.str.3 = [3 x i8] c", \00"
@str = [3 x i8] c"};\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = tail call float @pow(double 1.000000e+01, i32 0)
%5 = fcmp ord float %4, 0.000000e+00
%6 = fpext float %4 to double
%7 = select i1 %5, double %6, double 0.000000e+00
%8 = select i1 %5, float %4, float 0.000000e+00
%9 = zext i1 %5 to i32
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %7)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %2, %40
%13 = phi i32 [ %9, %2 ], [ %32, %40 ]
%14 = phi float [ %8, %2 ], [ %31, %40 ]
%15 = phi i32 [ 1, %2 ], [ %41, %40 ]
%16 = tail call float @pow(double 1.000000e+01, i32 %15)
%17 = trunc i32 %15 to i8
%18 = urem i8 %17, 11
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %12
%23 = icmp ne i32 %13, 0
%24 = fcmp ord float %16, 0.000000e+00
%25 = select i1 %23, i1 %24, i1 false
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = tail call i64 @fmodf(float %16, i32 10)
%28 = icmp eq i64 %27, 0
br i1 %28, label %30, label %29
29: ; preds = %26, %22
br label %30
30: ; preds = %26, %29
%31 = phi float [ %14, %29 ], [ %16, %26 ]
%32 = phi i32 [ 0, %29 ], [ 1, %26 ]
%33 = fpext float %31 to double
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %33)
%35 = icmp ult i32 %15, 255
br i1 %35, label %36, label %38
36: ; preds = %30
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %40
38: ; preds = %30
%39 = tail call i32 @putchar(i32 10)
br label %40
40: ; preds = %36, %38
%41 = add nuw nsw i32 %15, 1
%42 = icmp eq i32 %41, 256
br i1 %42, label %43, label %12
43: ; preds = %40
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}