#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*/ 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);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xed5(%rip),%rdi
movsd  0xec5(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
movsd  0xeb1(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
movsd  0xe9d(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
movsd  0xe89(%rip),%xmm0
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
movsd  0xe75(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
movsd  0xe61(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
movsd  0xe4d(%rip),%xmm0
call   1030 <printf@plt>
lea    0xe85(%rip),%rdi
movsd  0xe39(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
movsd  0xecc(%rip),%xmm0
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
movsd  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
movsd  0xea4(%rip),%xmm0
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
movsd  0xe90(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
movsd  0xe7c(%rip),%xmm0
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
movsd  0xe68(%rip),%xmm0
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
movsd  0xe54(%rip),%xmm0
call   1030 <printf@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"
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)
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"
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)
ret i32 0
}