#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*/ dollar_text(char *, double);
int /*<<< orphan*/ printf(char *, double, int /*<<< orphan*/);
int main(void) {
  double dollar;
  char destination[128];
  dollar = 0.12;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 1.23;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 2.34;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 12.34;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 112.34;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 123.45;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 1234.56;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 9999.99;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 10000.00;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 100000.00;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 123456.78;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  dollar = 999999.99;
  printf("%.2lf is %s\n", dollar, dollar_text(destination, dollar));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xf1e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xf0(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xef2(%rip),%rdi
call   1040 <printf@plt>
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xe8(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xe0(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
movsd  0xe43(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xd8(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xe2f(%rip),%rdi
call   1040 <printf@plt>
movsd  0xdfa(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xd0(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xdee(%rip),%rdi
call   1040 <printf@plt>
movsd  0xdb1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xc8(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xdad(%rip),%rdi
call   1040 <printf@plt>
movsd  0xd68(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xc0(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xd6c(%rip),%rdi
call   1040 <printf@plt>
movsd  0xd1f(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xb8(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xd2b(%rip),%rdi
call   1040 <printf@plt>
movsd  0xcd6(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xb0(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xcea(%rip),%rdi
call   1040 <printf@plt>
movsd  0xc8d(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xa8(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xca9(%rip),%rdi
call   1040 <printf@plt>
movsd  0xc44(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0xa0(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xc68(%rip),%rdi
call   1040 <printf@plt>
movsd  0xbfb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    -0x90(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <dollar_text@plt>
movsd  -0x98(%rbp),%xmm0
ff
mov    %eax,%esi
lea    0xc27(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsp,%r14
movsd  0xecb(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
lea    0xf1c(%rip),%rbx
mov    %rbx,%rdi
movsd  0xeb1(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xeaa(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xe97(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe90(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xe7d(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe76(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xe63(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe5c(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xe49(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe42(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xe2f(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe28(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xe15(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xe0e(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xdfb(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xdf4(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xde1(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xdda(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xdc7(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xdc0(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xdad(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
movsd  0xda6(%rip),%xmm0
mov    %r14,%rdi
call   1030 <dollar_text@plt>
mov    %rbx,%rdi
movsd  0xd93(%rip),%xmm0
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%.2lf is %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [128 x i8]
store i32 0, i32* %1
store double 1.200000e-01, double* %2
%4 = load double, double* %2
%5 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%6 = load double, double* %2
%7 = call i32 @dollar_text(i8* %5, double %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %4, i32 %7)
store double 1.230000e+00, double* %2
%9 = load double, double* %2
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%11 = load double, double* %2
%12 = call i32 @dollar_text(i8* %10, double %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %9, i32 %12)
store double 2.340000e+00, double* %2
%14 = load double, double* %2
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%16 = load double, double* %2
%17 = call i32 @dollar_text(i8* %15, double %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %14, i32 %17)
store double 1.234000e+01, double* %2
%19 = load double, double* %2
%20 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%21 = load double, double* %2
%22 = call i32 @dollar_text(i8* %20, double %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %19, i32 %22)
store double 1.123400e+02, double* %2
%24 = load double, double* %2
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%26 = load double, double* %2
%27 = call i32 @dollar_text(i8* %25, double %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %24, i32 %27)
store double 1.234500e+02, double* %2
%29 = load double, double* %2
%30 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%31 = load double, double* %2
%32 = call i32 @dollar_text(i8* %30, double %31)
%33 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %29, i32 %32)
store double 1.234560e+03, double* %2
%34 = load double, double* %2
%35 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%36 = load double, double* %2
%37 = call i32 @dollar_text(i8* %35, double %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %34, i32 %37)
store double 0x40C387FEB851EB85, double* %2
%39 = load double, double* %2
%40 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%41 = load double, double* %2
%42 = call i32 @dollar_text(i8* %40, double %41)
%43 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %39, i32 %42)
store double 1.000000e+04, double* %2
%44 = load double, double* %2
%45 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%46 = load double, double* %2
%47 = call i32 @dollar_text(i8* %45, double %46)
%48 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %44, i32 %47)
store double 1.000000e+05, double* %2
%49 = load double, double* %2
%50 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%51 = load double, double* %2
%52 = call i32 @dollar_text(i8* %50, double %51)
%53 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %49, i32 %52)
store double 0x40FE240C7AE147AE, double* %2
%54 = load double, double* %2
%55 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%56 = load double, double* %2
%57 = call i32 @dollar_text(i8* %55, double %56)
%58 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %54, i32 %57)
store double 0x412E847FFAE147AE, double* %2
%59 = load double, double* %2
%60 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%61 = load double, double* %2
%62 = call i32 @dollar_text(i8* %60, double %61)
%63 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %59, i32 %62)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%.2lf is %s\0A\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i32 @dollar_text(i8* %2, double 1.200000e-01)
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.200000e-01, i32 %3)
%5 = call i32 @dollar_text(i8* %2, double 1.230000e+00)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.230000e+00, i32 %5)
%7 = call i32 @dollar_text(i8* %2, double 2.340000e+00)
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 2.340000e+00, i32 %7)
%9 = call i32 @dollar_text(i8* %2, double 1.234000e+01)
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.234000e+01, i32 %9)
%11 = call i32 @dollar_text(i8* %2, double 1.123400e+02)
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.123400e+02, i32 %11)
%13 = call i32 @dollar_text(i8* %2, double 1.234500e+02)
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.234500e+02, i32 %13)
%15 = call i32 @dollar_text(i8* %2, double 1.234560e+03)
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.234560e+03, i32 %15)
%17 = call i32 @dollar_text(i8* %2, double 0x40C387FEB851EB85)
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 0x40C387FEB851EB85, i32 %17)
%19 = call i32 @dollar_text(i8* %2, double 1.000000e+04)
%20 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.000000e+04, i32 %19)
%21 = call i32 @dollar_text(i8* %2, double 1.000000e+05)
%22 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 1.000000e+05, i32 %21)
%23 = call i32 @dollar_text(i8* %2, double 0x40FE240C7AE147AE)
%24 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 0x40FE240C7AE147AE, i32 %23)
%25 = call i32 @dollar_text(i8* %2, double 0x412E847FFAE147AE)
%26 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double 0x412E847FFAE147AE, i32 %25)
ret i32 0
}