#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*/ exit(int /*<<< orphan*/);
char f_char();
char f_int();
char f_uchar();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  char c;
  c = f_char();
  printf("char\t%d\n", (int)c);
  c = f_uchar();
  printf("uchar\t%d\n", (int)c);
  c = f_int();
  printf("int\t%d\n", (int)c);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <f_char@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%esi
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <f_uchar@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%esi
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <f_int@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%esi
lea    0xe5b(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f_char@plt>
movsbl %al,%esi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <f_uchar@plt>
movsbl %al,%esi
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <f_int@plt>
movsbl %al,%esi
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"char\09%d\0A\00"
@.str.1 = [10 x i8] c"uchar\09%d\0A\00"
@.str.2 = [8 x i8] c"int\09%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call signext i8 (...) @f_char()
store i8 %7, i8* %6
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call signext i8 (...) @f_uchar()
store i8 %11, i8* %6
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = call signext i8 (...) @f_int()
store i8 %15, i8* %6
%16 = load i8, i8* %6
%17 = sext i8 %16 to i32
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"char\09%d\0A\00"
@.str.1 = [10 x i8] c"uchar\09%d\0A\00"
@.str.2 = [8 x i8] c"int\09%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call signext i8 (...) @f_char()
%4 = sext i8 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call signext i8 (...) @f_uchar()
%7 = sext i8 %6 to i32
%8 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call signext i8 (...) @f_int()
%10 = sext i8 %9 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = tail call i32 @exit(i32 0)
unreachable
}