#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*/ func3(int);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(float);
int main() {
  int a = 32767;
  print("a  32767");
  printid(a);
  a = -32767;
  print("a  -32767");
  printid(a);
  int i = 2;
  print("i  2");
  func3(i);
  char m2[2] = {'a', 'b'};
  char c = m2[0];
  print("c  a");
  printid(c);
  float f = 2.0;
  print("f  2.000000");
  printid(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7fff,-0x8(%rbp)
lea    0xeb7(%rip),%rdi
call   1040 <print@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
call   1050 <printid@plt>
movl   $0xffff8001,-0x8(%rbp)
lea    0xea3(%rip),%rdi
call   1040 <print@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
call   1050 <printid@plt>
movl   $0x2,-0xc(%rbp)
lea    0xe90(%rip),%rdi
call   1040 <print@plt>
mov    -0xc(%rbp),%edi
call   1030 <func3@plt>
movw   $0x6261,-0xe(%rbp)
mov    -0xe(%rbp),%al
mov    %al,-0xf(%rbp)
lea    0xe75(%rip),%rdi
call   1040 <print@plt>
movsbl -0xf(%rbp),%eax
cvtsi2ss %eax,%xmm0
call   1050 <printid@plt>
movss  0xe3f(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xe54(%rip),%rdi
call   1040 <print@plt>
movss  -0x14(%rbp),%xmm0
call   1050 <printid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <print@plt>
movss  0xebb(%rip),%xmm0
call   1050 <printid@plt>
lea    0xec8(%rip),%rdi
call   1040 <print@plt>
movss  0xea6(%rip),%xmm0
call   1050 <printid@plt>
lea    0xeb9(%rip),%rdi
call   1040 <print@plt>
mov    $0x2,%edi
call   1030 <func3@plt>
lea    0xea8(%rip),%rdi
call   1040 <print@plt>
movss  0xe7b(%rip),%xmm0
call   1050 <printid@plt>
lea    0xe94(%rip),%rdi
call   1040 <print@plt>
movss  0xe66(%rip),%xmm0
call   1050 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"a 32767\00"
@.str.1 = [10 x i8] c"a -32767\00"
@.str.2 = [5 x i8] c"i 2\00"
@__const.main.m2 = [2 x i8] c"ab"
@.str.3 = [5 x i8] c"c a\00"
@.str.4 = [12 x i8] c"f 2.000000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i8]
%5 = alloca i8
%6 = alloca float
store i32 0, i32* %1
store i32 32767, i32* %2
%7 = call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to float
%10 = call i32 @printid(float %9)
store i32 -32767, i32* %2
%11 = call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = sitofp i32 %12 to float
%14 = call i32 @printid(float %13)
store i32 2, i32* %3
%15 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* %3
%17 = call i32 @func3(i32 %16)
%18 = bitcast [2 x i8]* %4 to i8*
%19 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%20 = load i8, i8* %19
store i8 %20, i8* %5
%21 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%22 = load i8, i8* %5
%23 = sitofp i8 %22 to float
%24 = call i32 @printid(float %23)
store float 2.000000e+00, float* %6
%25 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%26 = load float, float* %6
%27 = call i32 @printid(float %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"a 32767\00"
@.str.1 = [10 x i8] c"a -32767\00"
@.str.2 = [5 x i8] c"i 2\00"
@.str.3 = [5 x i8] c"c a\00"
@.str.4 = [12 x i8] c"f 2.000000\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(float 3.276700e+04)
%3 = tail call i32 @print(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printid(float -3.276700e+04)
%5 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @func3(i32 2)
%7 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @printid(float 9.700000e+01)
%9 = tail call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @printid(float 2.000000e+00)
ret i32 0
}