#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*/ getchar();
int /*<<< orphan*/ printf(char *, double const);
int main(void) {
  const double RENT = 3852.99;
  printf("*%f*\n", RENT);
  printf("*%e*\n", RENT);
  printf("*%4.2f*\n", RENT);
  printf("*%3.1f*\n", RENT);
  printf("*%10.3f*\n", RENT);
  printf("*%10.3E*\n", RENT);
  printf("*%+4.2f*\n", RENT);
  printf("*%010.2f*\n", RENT);
  printf("*%5d*\n", 5);
  printf("*%05d*\n", 5);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xecd(%rip),%rdi
movsd  0xebd(%rip),%xmm0
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
movsd  0xea9(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
movsd  0xe95(%rip),%xmm0
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
movsd  0xe81(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe9b(%rip),%rdi
movsd  0xe6d(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
movsd  0xe59(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe87(%rip),%rdi
movsd  0xe45(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe7d(%rip),%rdi
movsd  0xe31(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
movsd  0xe15(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
movsd  0xe01(%rip),%xmm0
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
movsd  0xed0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
movsd  0xebc(%rip),%xmm0
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
movsd  0xea8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
movsd  0xe94(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
movsd  0xe80(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
movsd  0xe6c(%rip),%xmm0
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
movsd  0xe58(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
movsd  0xe44(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
movsd  0xe38(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
movsd  0xe24(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"*%f*\0A\00"
@.str.1 = [6 x i8] c"*%e*\0A\00"
@.str.2 = [9 x i8] c"*%4.2f*\0A\00"
@.str.3 = [9 x i8] c"*%3.1f*\0A\00"
@.str.4 = [10 x i8] c"*%10.3f*\0A\00"
@.str.5 = [10 x i8] c"*%10.3E*\0A\00"
@.str.6 = [10 x i8] c"*%+4.2f*\0A\00"
@.str.7 = [11 x i8] c"*%010.2f*\0A\00"
@.str.8 = [7 x i8] c"*%5d*\0A\00"
@.str.9 = [8 x i8] c"*%05d*\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 3.852990e+03, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 3.852990e+03)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 3.852990e+03)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double 3.852990e+03)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double 3.852990e+03)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double 3.852990e+03)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), double 3.852990e+03)
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), double 3.852990e+03)
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), double 3.852990e+03)
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double 5.000000e+00)
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), double 5.000000e+00)
%13 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"*%f*\0A\00"
@.str.1 = [6 x i8] c"*%e*\0A\00"
@.str.2 = [9 x i8] c"*%4.2f*\0A\00"
@.str.3 = [9 x i8] c"*%3.1f*\0A\00"
@.str.4 = [10 x i8] c"*%10.3f*\0A\00"
@.str.5 = [10 x i8] c"*%10.3E*\0A\00"
@.str.6 = [10 x i8] c"*%+4.2f*\0A\00"
@.str.7 = [11 x i8] c"*%010.2f*\0A\00"
@.str.8 = [7 x i8] c"*%5d*\0A\00"
@.str.9 = [8 x i8] c"*%05d*\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double 3.852990e+03)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 3.852990e+03)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double 3.852990e+03)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double 3.852990e+03)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), double 3.852990e+03)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), double 3.852990e+03)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), double 3.852990e+03)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), double 3.852990e+03)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double 5.000000e+00)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), double 5.000000e+00)
%11 = tail call i32 (...) @getchar()
ret i32 0
}