#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*/ assertStringsEqual(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void test_float() {
  char buffer[100];
  sprintf(buffer, "%.4f", 3.1415354);
  assertStringsEqual(buffer, "3.1415");
  sprintf(buffer, "%.3f", 30343.1415354);
  assertStringsEqual(buffer, "30343.142");
  sprintf(buffer, "%.0f", 34.1415354);
  assertStringsEqual(buffer, "34");
  sprintf(buffer, "%.2f", 42.8952);
  assertStringsEqual(buffer, "42.90");
  sprintf(buffer, "%.9f", 42.8952);
  assertStringsEqual(buffer, "42.895200000");
  sprintf(buffer, "%.10f", 42.895223);
  assertStringsEqual(buffer, "42.8952230000");
  sprintf(buffer, "%6.2f", 42.8952);
  assertStringsEqual(buffer, " 42.90");
  sprintf(buffer, "%+6.2f", 42.8952);
  assertStringsEqual(buffer, "+42.90");
  sprintf(buffer, "%+5.1f", 42.9252);
  assertStringsEqual(buffer, "+42.9");
  sprintf(buffer, "%f", 42.5);
  assertStringsEqual(buffer, "42.500000");
  sprintf(buffer, "%.1f", 42.5);
  assertStringsEqual(buffer, "42.5");
  sprintf(buffer, "%f", 42167.0);
  assertStringsEqual(buffer, "42167.000000");
  sprintf(buffer, "%.9f", -12345.987654321);
  assertStringsEqual(buffer, "-12345.987654321");
  sprintf(buffer, "%.1f", 3.999);
  assertStringsEqual(buffer, "4.0");
  sprintf(buffer, "%.0f", 3.5);
  assertStringsEqual(buffer, "4");
  sprintf(buffer, "%.0f", 3.49);
  assertStringsEqual(buffer, "3");
  sprintf(buffer, "%.1f", 3.49);
  assertStringsEqual(buffer, "3.5");
  sprintf(buffer, "%.1f", 1E20);
  assertStringsEqual(buffer, "100000000000000000000.0");
}


x86 assembly (clang, -O0):
<test_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x7687,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x22,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe81(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe61(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe51(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe4e(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe3f(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe3d(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe2e(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe25(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe17(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xe0e(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xe00(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xdf6(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xdde(%rip),%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xdce(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xdac(%rip),%rsi
mov    $0xa4b7,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xdae(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xd39(%rip),%rsi
mov    $0xffffcfc7,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xd96(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xd6f(%rip),%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xd82(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xce2(%rip),%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xcd3(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xcbd(%rip),%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xd3c(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xd00(%rip),%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xd19(%rip),%rsi
call   1030 <assertStringsEqual@plt>
lea    -0x70(%rbp),%rdi
lea    0xcdb(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x70(%rbp),%rdi
lea    0xcfd(%rip),%rsi
call   1030 <assertStringsEqual@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_float>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x70,%rsp
lea    0xecc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
mov    $0x7687,%edx
call   1040 <sprintf@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe9e(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x22,%edx
call   1040 <sprintf@plt>
lea    0xe8c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe80(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe62(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe4e(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xe40(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe3f(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xe31(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe29(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xe1c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xe14(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xe07(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xdfe(%rip),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xdea(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
lea    0xde5(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x2a,%edx
call   1040 <sprintf@plt>
lea    0xdd3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0xa4b7,%edx
call   1040 <sprintf@plt>
lea    0xdb9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0xffffcfc7,%edx
call   1040 <sprintf@plt>
lea    0xda7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    0xd99(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    0xcf0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    0xd5f(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1040 <sprintf@plt>
lea    0xd42(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <sprintf@plt>
lea    0xd2c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <assertStringsEqual@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.4f\00"
@.str.1 = [7 x i8] c"3.1415\00"
@.str.2 = [5 x i8] c"%.3f\00"
@.str.3 = [10 x i8] c"30343.142\00"
@.str.4 = [5 x i8] c"%.0f\00"
@.str.5 = [3 x i8] c"34\00"
@.str.6 = [5 x i8] c"%.2f\00"
@.str.7 = [6 x i8] c"42.90\00"
@.str.8 = [5 x i8] c"%.9f\00"
@.str.9 = [13 x i8] c"42.895200000\00"
@.str.10 = [6 x i8] c"%.10f\00"
@.str.11 = [14 x i8] c"42.8952230000\00"
@.str.12 = [6 x i8] c"%6.2f\00"
@.str.13 = [7 x i8] c" 42.90\00"
@.str.14 = [7 x i8] c"%+6.2f\00"
@.str.15 = [7 x i8] c"+42.90\00"
@.str.16 = [7 x i8] c"%+5.1f\00"
@.str.17 = [6 x i8] c"+42.9\00"
@.str.18 = [3 x i8] c"%f\00"
@.str.19 = [10 x i8] c"42.500000\00"
@.str.20 = [5 x i8] c"%.1f\00"
@.str.21 = [5 x i8] c"42.5\00"
@.str.22 = [13 x i8] c"42167.000000\00"
@.str.23 = [17 x i8] c"-12345.987654321\00"
@.str.24 = [4 x i8] c"4.0\00"
@.str.25 = [2 x i8] c"4\00"
@.str.26 = [2 x i8] c"3\00"
@.str.27 = [4 x i8] c"3.5\00"
@.str.28 = [24 x i8] c"100000000000000000000.0\00"
define void @test_float() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = call i32 @assertStringsEqual(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 30343)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%9 = call i32 @assertStringsEqual(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%11 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 34)
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%13 = call i32 @assertStringsEqual(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%15 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 42)
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%17 = call i32 @assertStringsEqual(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%19 = call i32 @sprintf(i8* %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 42)
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%21 = call i32 @assertStringsEqual(i8* %20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%23 = call i32 @sprintf(i8* %22, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 42)
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%25 = call i32 @assertStringsEqual(i8* %24, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%27 = call i32 @sprintf(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 42)
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%29 = call i32 @assertStringsEqual(i8* %28, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%31 = call i32 @sprintf(i8* %30, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 42)
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%33 = call i32 @assertStringsEqual(i8* %32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%35 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 42)
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%37 = call i32 @assertStringsEqual(i8* %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%39 = call i32 @sprintf(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 42)
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%41 = call i32 @assertStringsEqual(i8* %40, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%43 = call i32 @sprintf(i8* %42, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 42)
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%45 = call i32 @assertStringsEqual(i8* %44, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0))
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%47 = call i32 @sprintf(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 42167)
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%49 = call i32 @assertStringsEqual(i8* %48, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%51 = call i32 @sprintf(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 -12345)
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%53 = call i32 @assertStringsEqual(i8* %52, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0))
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%55 = call i32 @sprintf(i8* %54, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 3)
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%57 = call i32 @assertStringsEqual(i8* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%58 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%59 = call i32 @sprintf(i8* %58, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 3)
%60 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%61 = call i32 @assertStringsEqual(i8* %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%63 = call i32 @sprintf(i8* %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 3)
%64 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%65 = call i32 @assertStringsEqual(i8* %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%67 = call i32 @sprintf(i8* %66, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 3)
%68 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%69 = call i32 @assertStringsEqual(i8* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0))
%70 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%71 = call i32 @sprintf(i8* %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 poison)
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%73 = call i32 @assertStringsEqual(i8* %72, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.28, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.4f\00"
@.str.1 = [7 x i8] c"3.1415\00"
@.str.2 = [5 x i8] c"%.3f\00"
@.str.3 = [10 x i8] c"30343.142\00"
@.str.4 = [5 x i8] c"%.0f\00"
@.str.5 = [3 x i8] c"34\00"
@.str.6 = [5 x i8] c"%.2f\00"
@.str.7 = [6 x i8] c"42.90\00"
@.str.8 = [5 x i8] c"%.9f\00"
@.str.9 = [13 x i8] c"42.895200000\00"
@.str.10 = [6 x i8] c"%.10f\00"
@.str.11 = [14 x i8] c"42.8952230000\00"
@.str.12 = [6 x i8] c"%6.2f\00"
@.str.13 = [7 x i8] c" 42.90\00"
@.str.14 = [7 x i8] c"%+6.2f\00"
@.str.15 = [7 x i8] c"+42.90\00"
@.str.16 = [7 x i8] c"%+5.1f\00"
@.str.17 = [6 x i8] c"+42.9\00"
@.str.18 = [3 x i8] c"%f\00"
@.str.19 = [10 x i8] c"42.500000\00"
@.str.20 = [5 x i8] c"%.1f\00"
@.str.21 = [5 x i8] c"42.5\00"
@.str.22 = [13 x i8] c"42167.000000\00"
@.str.23 = [17 x i8] c"-12345.987654321\00"
@.str.24 = [4 x i8] c"4.0\00"
@.str.25 = [2 x i8] c"4\00"
@.str.26 = [2 x i8] c"3\00"
@.str.27 = [4 x i8] c"3.5\00"
@.str.28 = [24 x i8] c"100000000000000000000.0\00"
define void @test_float() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 30343)
%6 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 34)
%8 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 42)
%10 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 42)
%12 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 42)
%14 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), i32 42)
%16 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 42)
%18 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%19 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i32 42)
%20 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0))
%21 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 42)
%22 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%23 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 42)
%24 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0))
%25 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i32 42167)
%26 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%27 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 -12345)
%28 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0))
%29 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 3)
%30 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%31 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 3)
%32 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
%33 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 3)
%34 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%35 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 3)
%36 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i64 0, i64 0))
%37 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 poison)
%38 = call i32 @assertStringsEqual(i8* %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.28, i64 0, i64 0))
ret void
}