#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 *, char);
int main(void) {
  int IDEAL_METRIC_METER = 1;
  float PI = 3.14;
  char CHAR = 'A';
  printf("%d\n", IDEAL_METRIC_METER);
  printf("%f\n", PI);
  printf("%c\n\n", CHAR);
  IDEAL_METRIC_METER = 2;
  PI = 3.15;
  CHAR = 'B';
  printf("%d\n", IDEAL_METRIC_METER);
  printf("%f\n", PI);
  printf("%c\n", CHAR);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x4048f5c3,-0xc(%rbp)
movb   $0x41,-0xd(%rbp)
movsbl -0x8(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    %rdi,-0x18(%rbp)
call   1030 <printf@plt>
cvttss2si -0xc(%rbp),%eax
movsbl %al,%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
movsbl -0xd(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
movl   $0x2,-0x8(%rbp)
movl   $0x4049999a,-0xc(%rbp)
movb   $0x42,-0xd(%rbp)
movsbl -0x8(%rbp),%esi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%eax
lea    0xe6c(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
movsbl -0xd(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xed5(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x42,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@.str.2 = [5 x i8] c"%c\0A\0A\00"
@.str.3 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca i8
store i32 0, i32* %1
store i32 1, i32* %2
store float 0x40091EB860000000, float* %3
store i8 65, i8* %4
%5 = load i32, i32* %2
%6 = trunc i32 %5 to i8
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = load float, float* %3
%9 = fptosi float %8 to i8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %9)
%11 = load i8, i8* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 signext %11)
store i32 2, i32* %2
store float 0x4009333340000000, float* %3
store i8 66, i8* %4
%13 = load i32, i32* %2
%14 = trunc i32 %13 to i8
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %14)
%16 = load float, float* %3
%17 = fptosi float %16 to i8
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %17)
%19 = load i8, i8* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 signext %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@.str.2 = [5 x i8] c"%c\0A\0A\00"
@.str.3 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext 3)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8 signext 65)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8 signext 66)
ret i32 0
}