#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*/ realToString(double);
int /*<<< orphan*/ test(int /*<<< orphan*/, char *);
void testRealToString(void) {
  test(realToString(0), "0");
  test(realToString(3.1416), "3.1416");
  test(realToString(-2.3), "-2.3");
  test(realToString(1.75E+15), "1.75E+15");
}


x86 assembly (clang, -O0):
<testRealToString>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
call   1030 <realToString@plt>
mov    %eax,%edi
lea    0xee3(%rip),%rsi
call   1040 <test@plt>
movsd  0xece(%rip),%xmm0
call   1030 <realToString@plt>
mov    %eax,%edi
lea    0xeca(%rip),%rsi
call   1040 <test@plt>
movsd  0xeab(%rip),%xmm0
call   1030 <realToString@plt>
mov    %eax,%edi
lea    0xeb6(%rip),%rsi
call   1040 <test@plt>
movsd  0xe88(%rip),%xmm0
call   1030 <realToString@plt>
mov    %eax,%edi
lea    0xea0(%rip),%rsi
call   1040 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testRealToString>:
push   %rax
xorps  %xmm0,%xmm0
call   1030 <realToString@plt>
lea    0xee8(%rip),%rsi
mov    %eax,%edi
call   1040 <test@plt>
movsd  0xec1(%rip),%xmm0
call   1030 <realToString@plt>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
call   1040 <test@plt>
movsd  0xeae(%rip),%xmm0
call   1030 <realToString@plt>
lea    0xebb(%rip),%rsi
mov    %eax,%edi
call   1040 <test@plt>
movsd  0xe9b(%rip),%xmm0
call   1030 <realToString@plt>
lea    0xea5(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1040 <test@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [7 x i8] c"3.1416\00"
@.str.2 = [5 x i8] c"-2.3\00"
@.str.3 = [9 x i8] c"1.75E+15\00"
define void @testRealToString() {
%1 = call i32 @realToString(double 0.000000e+00)
%2 = call i32 @test(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @realToString(double 3.141600e+00)
%4 = call i32 @test(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @realToString(double -2.300000e+00)
%6 = call i32 @test(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @realToString(double 1.750000e+15)
%8 = call i32 @test(i32 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [7 x i8] c"3.1416\00"
@.str.2 = [5 x i8] c"-2.3\00"
@.str.3 = [9 x i8] c"1.75E+15\00"
define void @testRealToString() {
%1 = tail call i32 @realToString(double 0.000000e+00)
%2 = tail call i32 @test(i32 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @realToString(double 3.141600e+00)
%4 = tail call i32 @test(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @realToString(double -2.300000e+00)
%6 = tail call i32 @test(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @realToString(double 1.750000e+15)
%8 = tail call i32 @test(i32 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}