#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*/ func(int const);
int /*<<< orphan*/ func_p(char const *);
int /*<<< orphan*/ kfunc(char);
int /*<<< orphan*/ kfunc_p(char const *);
void main() {
  char *a;
  char *b __attribute__((unused));
  char c;
  const char *d;
  const char *e __attribute__((unused));
  const char f __attribute__((unused));
  a = "hi";
  b = (const char *)0;
  c = 'a';
  d = "yo";
  e = (char *)0;
  func(c);
  kfunc(c);
  func_p(a);
  kfunc_p(a);
  func_p(d);
  kfunc_p(d);
  const int i = 2;
  int j __attribute__((unused));
  j = i;
  func(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x61,-0x11(%rbp)
lea    0xe9d(%rip),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movsbl -0x11(%rbp),%edi
call   1050 <func@plt>
movsbl -0x11(%rbp),%edi
call   1060 <kfunc@plt>
mov    -0x8(%rbp),%rdi
call   1040 <func_p@plt>
mov    -0x8(%rbp),%rdi
call   1030 <kfunc_p@plt>
mov    -0x20(%rbp),%rdi
call   1040 <func_p@plt>
mov    -0x20(%rbp),%rdi
call   1030 <kfunc_p@plt>
movl   $0x2,-0x30(%rbp)
movl   $0x2,-0x34(%rbp)
mov    $0x2,%edi
call   1050 <func@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x61,%edi
call   1050 <func@plt>
mov    $0x61,%edi
call   1060 <kfunc@plt>
lea    0xea4(%rip),%rbx
mov    %rbx,%rdi
call   1040 <func_p@plt>
mov    %rbx,%rdi
call   1030 <kfunc_p@plt>
lea    0xe90(%rip),%rbx
mov    %rbx,%rdi
call   1040 <func_p@plt>
mov    %rbx,%rdi
call   1030 <kfunc_p@plt>
mov    $0x2,%edi
pop    %rbx
jmp    1050 <func@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"hi\00"
@.str.1 = [3 x i8] c"yo\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* null, i8** %2
store i8 97, i8* %3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %4
store i8* null, i8** %5
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = call i32 @func(i32 %10)
%12 = load i8, i8* %3
%13 = call i32 @kfunc(i8 signext %12)
%14 = load i8*, i8** %1
%15 = call i32 @func_p(i8* %14)
%16 = load i8*, i8** %1
%17 = call i32 @kfunc_p(i8* %16)
%18 = load i8*, i8** %4
%19 = call i32 @func_p(i8* %18)
%20 = load i8*, i8** %4
%21 = call i32 @kfunc_p(i8* %20)
store i32 2, i32* %7
store i32 2, i32* %8
%22 = call i32 @func(i32 2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"hi\00"
@.str.1 = [3 x i8] c"yo\00"
define void @main() {
%1 = tail call i32 @func(i32 97)
%2 = tail call i32 @kfunc(i8 signext 97)
%3 = tail call i32 @func_p(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @kfunc_p(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @func_p(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @kfunc_p(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @func(i32 2)
ret void
}