#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 ssize_t;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int sprintf(char *, char *, int);
double strtod(char *, int /*<<< orphan*/ *);
float strtof(char *, int /*<<< orphan*/ *);
long double strtold(char *, int /*<<< orphan*/ *);
int main(void) {
  char buf[300];
  int cnt;
  int result = 0;
  for (cnt = 0; cnt < 200; ++cnt) {
    ssize_t n;
    float f;
    n = sprintf(buf, "%d", cnt);
    memset(buf + n, '0', cnt);
    sprintf(buf + n + cnt, ".000e-%d", cnt);
    f = strtof(buf, NULL);
    if (f != (float)cnt) {
      printf("strtof(\"%s\") failed for cnt == %d (%g instead of %g)\n", buf,
             cnt, f, (float)cnt);
      result = 1;
    } else
      printf("strtof() fine for cnt == %d\n", cnt);
  }
  for (cnt = 0; cnt < 200; ++cnt) {
    ssize_t n;
    double f;
    n = sprintf(buf, "%d", cnt);
    memset(buf + n, '0', cnt);
    sprintf(buf + n + cnt, ".000e-%d", cnt);
    f = strtod(buf, NULL);
    if (f != (double)cnt) {
      printf("strtod(\"%s\") failed for cnt == %d (%g instead of %g)\n", buf,
             cnt, f, (double)cnt);
      result = 1;
    } else
      printf("strtod() fine for cnt == %d\n", cnt);
  }
  for (cnt = 0; cnt < 200; ++cnt) {
    ssize_t n;
    long double f;
    n = sprintf(buf, "%d", cnt);
    memset(buf + n, '0', cnt);
    sprintf(buf + n + cnt, ".000e-%d", cnt);
    f = strtold(buf, NULL);
    if (f != (long double)cnt) {
      printf("strtold(\"%s\") failed for cnt == %d (%Lg instead of %Lg)\n", buf,
             cnt, f, (long double)cnt);
      result = 1;
    } else
      printf("strtold() fine for cnt == %d\n", cnt);
  }
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x138(%rbp)
movl   $0x0,-0x134(%rbp)
cmpl   $0xc8,-0x134(%rbp)
jge    12ae <main+0x14e>
lea    -0x130(%rbp),%rdi
mov    -0x134(%rbp),%edx
lea    0xe5c(%rip),%rsi
call   1080 <sprintf@plt>
mov    %eax,-0x13c(%rbp)
lea    -0x130(%rbp),%rdi
movslq -0x13c(%rbp),%rax
add    %rax,%rdi
mov    -0x134(%rbp),%edx
mov    $0x30,%esi
call   1060 <memset@plt>
lea    -0x130(%rbp),%rdi
movslq -0x13c(%rbp),%rax
add    %rax,%rdi
movslq -0x134(%rbp),%rax
add    %rax,%rdi
mov    -0x134(%rbp),%edx
lea    0xe02(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x130(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <strtof@plt>
movss  %xmm0,-0x140(%rbp)
ff
movss  -0x140(%rbp),%xmm0
ff
cvtsi2ssl -0x134(%rbp),%xmm1
ff
ucomiss %xmm1,%xmm0
jne    123f <main+0xdf>
jp     123f <main+0xdf>
jmp    1281 <main+0x121>
lea    -0x130(%rbp),%rsi
mov    -0x134(%rbp),%edx
movss  -0x140(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
cvtsi2ssl -0x134(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0xd9e(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x138(%rbp)
jmp    1295 <main+0x135>
mov    -0x134(%rbp),%esi
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    129a <main+0x13a>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    1186 <main+0x26>
movl   $0x0,-0x134(%rbp)
cmpl   $0xc8,-0x134(%rbp)
jge    13d9 <main+0x279>
lea    -0x130(%rbp),%rdi
mov    -0x134(%rbp),%edx
lea    0xd2a(%rip),%rsi
call   1080 <sprintf@plt>
mov    %eax,-0x144(%rbp)
lea    -0x130(%rbp),%rdi
movslq -0x144(%rbp),%rax
add    %rax,%rdi
mov    -0x134(%rbp),%edx
mov    $0x30,%esi
call   1060 <memset@plt>
lea    -0x130(%rbp),%rdi
movslq -0x144(%rbp),%rax
add    %rax,%rdi
movslq -0x134(%rbp),%rax
add    %rax,%rdi
mov    -0x134(%rbp),%edx
lea    0xcd0(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x130(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x150(%rbp),%xmm0
ff
cvtsi2sdl -0x134(%rbp),%xmm1
ff
ucomisd %xmm1,%xmm0
jne    1372 <main+0x212>
jp     1372 <main+0x212>
jmp    13ac <main+0x24c>
lea    -0x130(%rbp),%rsi
mov    -0x134(%rbp),%edx
movsd  -0x150(%rbp),%xmm0
ff
cvtsi2sdl -0x134(%rbp),%xmm1
ff
lea    0xcc6(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x138(%rbp)
jmp    13c0 <main+0x260>
mov    -0x134(%rbp),%esi
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13c5 <main+0x265>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    12b8 <main+0x158>
movl   $0x0,-0x134(%rbp)
cmpl   $0xc8,-0x134(%rbp)
jge    1517 <main+0x3b7>
mov    -0x134(%rbp),%edx
lea    0xc06(%rip),%rsi
lea    -0x130(%rbp),%rdi
mov    %rdi,-0x180(%rbp)
call   1080 <sprintf@plt>
mov    %eax,-0x154(%rbp)
movslq -0x154(%rbp),%rax
lea    -0x130(%rbp,%rax,1),%rdi
ff
mov    -0x134(%rbp),%edx
mov    $0x30,%esi
call   1060 <memset@plt>
movslq -0x154(%rbp),%rax
lea    -0x130(%rbp,%rax,1),%rdi
ff
movslq -0x134(%rbp),%rax
mov    %eax,%edx
add    %rax,%rdi
lea    0xba6(%rip),%rsi
call   1080 <sprintf@plt>
mov    -0x180(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1070 <strtold@plt>
fstpt  -0x170(%rbp)
fldt   -0x170(%rbp)
mov    -0x134(%rbp),%eax
mov    %eax,-0x174(%rbp)
fildl  -0x174(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    14a4 <main+0x344>
jp     14a4 <main+0x344>
jmp    14ea <main+0x38a>
lea    -0x130(%rbp),%rsi
mov    -0x134(%rbp),%eax
mov    %eax,%edx
fldt   -0x170(%rbp)
mov    %eax,-0x178(%rbp)
fildl  -0x178(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xbdb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x1,-0x138(%rbp)
jmp    14fe <main+0x39e>
mov    -0x134(%rbp),%esi
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1503 <main+0x3a3>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    13e3 <main+0x283>
mov    -0x138(%rbp),%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
lea    0xe8e(%rip),%r14
lea    0x30(%rsp),%rbx
lea    0xe7c(%rip),%r15
xor    %r13d,%r13d
xor    %ebp,%ebp
jmp    11ae <main+0x4e>
nopl   0x0(%rax,%rax,1)
lea    0xea8(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13
cmp    $0xc8,%r13
je     1229 <main+0xc9>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1080 <sprintf@plt>
movslq %eax,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x30,%esi
mov    %r13d,%edx
call   1060 <memset@plt>
add    %r13,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    %r15,%rsi
mov    %r13d,%edx
call   1080 <sprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <strtof@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %r13d,%xmm1
ucomiss %xmm1,%xmm0
jne    1203 <main+0xa3>
jnp    1190 <main+0x30>
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
lea    0xdf7(%rip),%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
mov    $0x2,%al
call   1040 <printf@plt>
mov    $0x1,%ebp
jmp    11a1 <main+0x41>
lea    0xdd6(%rip),%r14
lea    0x30(%rsp),%rbx
lea    0xdc4(%rip),%r15
xor    %r13d,%r13d
jmp    126e <main+0x10e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xe3b(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13
cmp    $0xc8,%r13
je     12df <main+0x17f>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1080 <sprintf@plt>
movslq %eax,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x30,%esi
mov    %r13d,%edx
call   1060 <memset@plt>
add    %r13,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    %r15,%rsi
mov    %r13d,%edx
call   1080 <sprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r13d,%xmm1
ucomisd %xmm1,%xmm0
jne    12c4 <main+0x164>
jnp    1250 <main+0xf0>
lea    0xd91(%rip),%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
mov    $0x2,%al
call   1040 <printf@plt>
mov    $0x1,%ebp
jmp    1261 <main+0x101>
lea    0xd20(%rip),%r14
lea    0x30(%rsp),%rbx
lea    0xd0e(%rip),%r15
xor    %r13d,%r13d
jmp    1322 <main+0x1c2>
nopw   0x0(%rax,%rax,1)
fstp   %st(0)
fstp   %st(0)
lea    0xddd(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r13
cmp    $0xc8,%r13
je     13a0 <main+0x240>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   1080 <sprintf@plt>
movslq %eax,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    $0x30,%esi
mov    %r13d,%edx
call   1060 <memset@plt>
add    %r13,%r12
lea    (%rsp,%r12,1),%rdi
add    $0x30,%rdi
mov    %r15,%rsi
mov    %r13d,%edx
call   1080 <sprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <strtold@plt>
mov    %r13d,0x2c(%rsp)
fildl  0x2c(%rsp)
fxch   %st(1)
fucomi %st(1),%st
jne    1379 <main+0x219>
jnp    1300 <main+0x1a0>
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0xd26(%rip),%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%ebp
jmp    1315 <main+0x1b5>
mov    %ebp,%eax
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c".000e-%d\00"
@.str.2 = [54 x i8] c"strtof(\22%s\22) failed for cnt == %d (%g instead of %g)\0A\00"
@.str.3 = [29 x i8] c"strtof() fine for cnt == %d\0A\00"
@.str.4 = [54 x i8] c"strtod(\22%s\22) failed for cnt == %d (%g instead of %g)\0A\00"
@.str.5 = [29 x i8] c"strtod() fine for cnt == %d\0A\00"
@.str.6 = [57 x i8] c"strtold(\22%s\22) failed for cnt == %d (%Lg instead of %Lg)\0A\00"
@.str.7 = [30 x i8] c"strtold() fine for cnt == %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [300 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca x86_fp80
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %3
br label %11
11: ; preds = %52, %0
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 200
br i1 %13, label %14, label %55
14: ; preds = %11
%15 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%16 = load i32, i32* %3
%17 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
store i32 %17, i32* %5
%18 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i32, i32* %3
%23 = call i32 @memset(i8* %21, i32 48, i32 %22)
%24 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i32, i32* %3
%32 = call i32 @sprintf(i8* %30, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%34 = call float @strtof(i8* %33, i32* null)
store float %34, float* %6
%35 = load float, float* %6
%36 = load i32, i32* %3
%37 = sitofp i32 %36 to float
%38 = fcmp une float %35, %37
br i1 %38, label %39, label %48
39: ; preds = %14
%40 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%41 = load i32, i32* %3
%42 = load float, float* %6
%43 = fpext float %42 to double
%44 = load i32, i32* %3
%45 = sitofp i32 %44 to float
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i8* %40, i32 %41, double %43, double %46)
store i32 1, i32* %4
br label %51
48: ; preds = %14
%49 = load i32, i32* %3
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %49)
br label %51
51: ; preds = %48, %39
br label %52
52: ; preds = %51
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %11
55: ; preds = %11
store i32 0, i32* %3
br label %56
56: ; preds = %95, %55
%57 = load i32, i32* %3
%58 = icmp slt i32 %57, 200
br i1 %58, label %59, label %98
59: ; preds = %56
%60 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%61 = load i32, i32* %3
%62 = call i32 @sprintf(i8* %60, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %61)
store i32 %62, i32* %7
%63 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%64 = load i32, i32* %7
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8, i8* %63, i64 %65
%67 = load i32, i32* %3
%68 = call i32 @memset(i8* %66, i32 48, i32 %67)
%69 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%70 = load i32, i32* %7
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
%73 = load i32, i32* %3
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
%76 = load i32, i32* %3
%77 = call i32 @sprintf(i8* %75, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %76)
%78 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%79 = call double @strtod(i8* %78, i32* null)
store double %79, double* %8
%80 = load double, double* %8
%81 = load i32, i32* %3
%82 = sitofp i32 %81 to double
%83 = fcmp une double %80, %82
br i1 %83, label %84, label %91
84: ; preds = %59
%85 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%86 = load i32, i32* %3
%87 = load double, double* %8
%88 = load i32, i32* %3
%89 = sitofp i32 %88 to double
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), i8* %85, i32 %86, double %87, double %89)
store i32 1, i32* %4
br label %94
91: ; preds = %59
%92 = load i32, i32* %3
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32 %92)
br label %94
94: ; preds = %91, %84
br label %95
95: ; preds = %94
%96 = load i32, i32* %3
%97 = add nsw i32 %96, 1
store i32 %97, i32* %3
br label %56
98: ; preds = %56
store i32 0, i32* %3
br label %99
99: ; preds = %138, %98
%100 = load i32, i32* %3
%101 = icmp slt i32 %100, 200
br i1 %101, label %102, label %141
102: ; preds = %99
%103 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%104 = load i32, i32* %3
%105 = call i32 @sprintf(i8* %103, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %104)
store i32 %105, i32* %9
%106 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%107 = load i32, i32* %9
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %106, i64 %108
%110 = load i32, i32* %3
%111 = call i32 @memset(i8* %109, i32 48, i32 %110)
%112 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%113 = load i32, i32* %9
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8, i8* %112, i64 %114
%116 = load i32, i32* %3
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i8, i8* %115, i64 %117
%119 = load i32, i32* %3
%120 = call i32 @sprintf(i8* %118, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %119)
%121 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%122 = call x86_fp80 @strtold(i8* %121, i32* null)
store x86_fp80 %122, x86_fp80* %10
%123 = load x86_fp80, x86_fp80* %10
%124 = load i32, i32* %3
%125 = sitofp i32 %124 to x86_fp80
%126 = fcmp une x86_fp80 %123, %125
br i1 %126, label %127, label %134
127: ; preds = %102
%128 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%129 = load i32, i32* %3
%130 = load x86_fp80, x86_fp80* %10
%131 = load i32, i32* %3
%132 = sitofp i32 %131 to x86_fp80
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i8* %128, i32 %129, x86_fp80 %130, x86_fp80 %132)
store i32 1, i32* %4
br label %137
134: ; preds = %102
%135 = load i32, i32* %3
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %135)
br label %137
137: ; preds = %134, %127
br label %138
138: ; preds = %137
%139 = load i32, i32* %3
%140 = add nsw i32 %139, 1
store i32 %140, i32* %3
br label %99
141: ; preds = %99
%142 = load i32, i32* %4
ret i32 %142
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c".000e-%d\00"
@.str.2 = [54 x i8] c"strtof(\22%s\22) failed for cnt == %d (%g instead of %g)\0A\00"
@.str.3 = [29 x i8] c"strtof() fine for cnt == %d\0A\00"
@.str.4 = [54 x i8] c"strtod(\22%s\22) failed for cnt == %d (%g instead of %g)\0A\00"
@.str.5 = [29 x i8] c"strtod() fine for cnt == %d\0A\00"
@.str.6 = [57 x i8] c"strtold(\22%s\22) failed for cnt == %d (%Lg instead of %Lg)\0A\00"
@.str.7 = [30 x i8] c"strtold() fine for cnt == %d\0A\00"
define i32 @main() {
%1 = alloca [300 x i8]
%2 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %22
%4 = phi i64 [ 0, %0 ], [ %24, %22 ]
%5 = phi i32 [ 0, %0 ], [ %23, %22 ]
%6 = trunc i64 %4 to i32
%7 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 %8
%10 = call i32 @memset(i8* %9, i32 48, i32 %6)
%11 = getelementptr inbounds i8, i8* %9, i64 %4
%12 = call i32 @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%13 = call float @strtof(i8* nocapture %2, i32* null)
%14 = sitofp i32 %6 to float
%15 = fcmp une float %13, %14
br i1 %15, label %16, label %20
16: ; preds = %3
%17 = fpext float %13 to double
%18 = fpext float %14 to double
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0), i8* %2, i32 %6, double %17, double %18)
br label %22
20: ; preds = %3
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %6)
br label %22
22: ; preds = %20, %16
%23 = phi i32 [ 1, %16 ], [ %5, %20 ]
%24 = add nuw nsw i64 %4, 1
%25 = icmp eq i64 %24, 200
br i1 %25, label %26, label %3
26: ; preds = %22, %43
%27 = phi i64 [ %45, %43 ], [ 0, %22 ]
%28 = phi i32 [ %44, %43 ], [ %23, %22 ]
%29 = trunc i64 %27 to i32
%30 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 %31
%33 = call i32 @memset(i8* %32, i32 48, i32 %29)
%34 = getelementptr inbounds i8, i8* %32, i64 %27
%35 = call i32 @sprintf(i8* %34, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%36 = call double @strtod(i8* nocapture %2, i32* null)
%37 = sitofp i32 %29 to double
%38 = fcmp une double %36, %37
br i1 %38, label %39, label %41
39: ; preds = %26
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), i8* %2, i32 %29, double %36, double %37)
br label %43
41: ; preds = %26
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i32 %29)
br label %43
43: ; preds = %41, %39
%44 = phi i32 [ 1, %39 ], [ %28, %41 ]
%45 = add nuw nsw i64 %27, 1
%46 = icmp eq i64 %45, 200
br i1 %46, label %47, label %26
47: ; preds = %43, %64
%48 = phi i64 [ %66, %64 ], [ 0, %43 ]
%49 = phi i32 [ %65, %64 ], [ %44, %43 ]
%50 = trunc i64 %48 to i32
%51 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %50)
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 %52
%54 = call i32 @memset(i8* %53, i32 48, i32 %50)
%55 = getelementptr inbounds i8, i8* %53, i64 %48
%56 = call i32 @sprintf(i8* %55, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %50)
%57 = call x86_fp80 @strtold(i8* nocapture %2, i32* null)
%58 = sitofp i32 %50 to x86_fp80
%59 = fcmp une x86_fp80 %57, %58
br i1 %59, label %60, label %62
60: ; preds = %47
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.6, i64 0, i64 0), i8* %2, i32 %50, x86_fp80 %57, x86_fp80 %58)
br label %64
62: ; preds = %47
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %50)
br label %64
64: ; preds = %62, %60
%65 = phi i32 [ 1, %60 ], [ %49, %62 ]
%66 = add nuw nsw i64 %48, 1
%67 = icmp eq i64 %66, 200
br i1 %67, label %68, label %47
68: ; preds = %64
ret i32 %65
}