#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 *, ...);
int main(void) {
  const int PAGES = 959;
  const double RENT = 3852.99;
  printf("%x %x %#x\n\n", 31, 31, 31);
  printf("*%d*\n", PAGES);
  printf("*%2d*\n", PAGES);
  printf("*%10d*\n", PAGES);
  printf("*%010d*\n", PAGES);
  printf("*%-10d*\n\n", PAGES);
  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\n", RENT);
  printf("[%2s]\n", "Authentic imitation!");
  printf("[%24s]\n", "Authentic imitation!");
  printf("[%24.5s]\n", "Authentic imitation!");
  printf("[%-24.5s]\n", "Authentic imitation!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3bf,-0x8(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xece(%rip),%rdi
mov    $0x1f,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x3bf,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x3bf,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x3bf,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x3bf,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x3bf,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
movsd  0xe48(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
movsd  0xe32(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe6c(%rip),%rdi
movsd  0xe1c(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe5f(%rip),%rdi
movsd  0xe06(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe52(%rip),%rdi
movsd  0xdf0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe46(%rip),%rdi
movsd  0xdda(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe3a(%rip),%rdi
movsd  0xdc4(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe2e(%rip),%rdi
movsd  0xdae(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe24(%rip),%rdi
lea    0xe24(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2b(%rip),%rdi
lea    0xe0f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe1e(%rip),%rdi
lea    0xdfa(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe13(%rip),%rdi
lea    0xde5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef0(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1f,%edx
mov    $0x1f,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x3bf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x3bf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x3bf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x3bf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x3bf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
movsd  0xe64(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
movsd  0xe4e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
movsd  0xe38(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
movsd  0xe22(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe6e(%rip),%rdi
movsd  0xe0c(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe62(%rip),%rdi
movsd  0xdf6(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe56(%rip),%rdi
movsd  0xde0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe4a(%rip),%rdi
movsd  0xdca(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe40(%rip),%rdi
lea    0xe40(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe44(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe3b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%x %x %#x\0A\0A\00"
@.str.1 = [6 x i8] c"*%d*\0A\00"
@.str.2 = [7 x i8] c"*%2d*\0A\00"
@.str.3 = [8 x i8] c"*%10d*\0A\00"
@.str.4 = [9 x i8] c"*%010d*\0A\00"
@.str.5 = [10 x i8] c"*%-10d*\0A\0A\00"
@.str.6 = [6 x i8] c"*%f*\0A\00"
@.str.7 = [6 x i8] c"*%e*\0A\00"
@.str.8 = [9 x i8] c"*%4.2f*\0A\00"
@.str.9 = [9 x i8] c"*%3.1f*\0A\00"
@.str.10 = [10 x i8] c"*%10.3f*\0A\00"
@.str.11 = [10 x i8] c"*%10.3E*\0A\00"
@.str.12 = [10 x i8] c"*%+4.2f*\0A\00"
@.str.13 = [12 x i8] c"*%010.2f*\0A\0A\00"
@.str.14 = [7 x i8] c"[%2s]\0A\00"
@.str.15 = [21 x i8] c"Authentic imitation!\00"
@.str.16 = [8 x i8] c"[%24s]\0A\00"
@.str.17 = [10 x i8] c"[%24.5s]\0A\00"
@.str.18 = [11 x i8] c"[%-24.5s]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store i32 959, i32* %2
store double 3.852990e+03, double* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 31, i32 31, i32 31)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 959)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 959)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 959)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 959)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 959)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double 3.852990e+03)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), double 3.852990e+03)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), double 3.852990e+03)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double 3.852990e+03)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), double 3.852990e+03)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), double 3.852990e+03)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), double 3.852990e+03)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), double 3.852990e+03)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%x %x %#x\0A\0A\00"
@.str.1 = [6 x i8] c"*%d*\0A\00"
@.str.2 = [7 x i8] c"*%2d*\0A\00"
@.str.3 = [8 x i8] c"*%10d*\0A\00"
@.str.4 = [9 x i8] c"*%010d*\0A\00"
@.str.5 = [10 x i8] c"*%-10d*\0A\0A\00"
@.str.6 = [6 x i8] c"*%f*\0A\00"
@.str.7 = [6 x i8] c"*%e*\0A\00"
@.str.8 = [9 x i8] c"*%4.2f*\0A\00"
@.str.9 = [9 x i8] c"*%3.1f*\0A\00"
@.str.10 = [10 x i8] c"*%10.3f*\0A\00"
@.str.11 = [10 x i8] c"*%10.3E*\0A\00"
@.str.12 = [10 x i8] c"*%+4.2f*\0A\00"
@.str.13 = [12 x i8] c"*%010.2f*\0A\0A\00"
@.str.14 = [7 x i8] c"[%2s]\0A\00"
@.str.15 = [21 x i8] c"Authentic imitation!\00"
@.str.16 = [8 x i8] c"[%24s]\0A\00"
@.str.17 = [10 x i8] c"[%24.5s]\0A\00"
@.str.18 = [11 x i8] c"[%-24.5s]\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 31, i32 31, i32 31)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 959)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 959)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 959)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 959)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 959)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double 3.852990e+03)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), double 3.852990e+03)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), double 3.852990e+03)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double 3.852990e+03)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), double 3.852990e+03)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), double 3.852990e+03)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), double 3.852990e+03)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), double 3.852990e+03)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
ret i32 0
}