#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 float BETTER_PI = 3.14159;
  const char BEST_CHAR = 'm';
  const char NAME[7] = "you";
  printf("pi: %f and better pi %f\n", 3.1415, BETTER_PI);
  printf("char: %c and best char: %c\n", 'a', BEST_CHAR);
  printf("%s %s\n", "Hello there", NAME);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movb   $0x6d,-0x9(%rbp)
mov    0xede(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xed8(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xed0(%rip),%al
mov    %al,-0xa(%rbp)
lea    0xec7(%rip),%rdi
movsd  0xea4(%rip),%xmm0
movsd  0xea4(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x61,%esi
mov    $0x6d,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdx
lea    0xec2(%rip),%rdi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x3(%rsp)
movl   $0x756f79,(%rsp)
lea    0xef0(%rip),%rdi
movsd  0xed1(%rip),%xmm0
movsd  0xed1(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x61,%esi
mov    $0x6d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
lea    0xeef(%rip),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.NAME = [7 x i8] c"you\00\00\00\00"
@.str = [25 x i8] c"pi: %f and better pi %f\0A\00"
@.str.1 = [28 x i8] c"char: %c and best char: %c\0A\00"
@.str.2 = [7 x i8] c"%s %s\0A\00"
@.str.3 = [12 x i8] c"Hello there\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i8
%4 = alloca [7 x i8]
store i32 0, i32* %1
store float 0x400921FA00000000, float* %2
store i8 109, i8* %3
%5 = bitcast [7 x i8]* %4 to i8*
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 3.141500e+00, double 0x400921FA00000000)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 109)
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.NAME = [7 x i8] c"you\00\00\00\00"
@.str = [25 x i8] c"pi: %f and better pi %f\0A\00"
@.str.1 = [28 x i8] c"char: %c and best char: %c\0A\00"
@.str.2 = [7 x i8] c"%s %s\0A\00"
@.str.3 = [12 x i8] c"Hello there\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 3.141500e+00, double 0x400921FA00000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 109)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %2)
ret i32 0
}