xunge/DecIR huggingface dataset:
/* Variables and functions */
int fac(int);
int /*<<< orphan*/ printf(char *);
main() {
  {
    int dummy;
    if (fac(6) != 720)
      printf("vernielt return waarde\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
call   1030 <fac@plt>
cmp    $0x2d0,%eax
je     1150 <main+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
call   1040 <fac@plt>
cmp    $0x2d0,%eax
je     113e <main+0x1e>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"vernielt return waarde\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @fac(i32 6)
%4 = icmp ne i32 %3, 720
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"vernielt return waarde\00"
define i32 @main() {
%1 = tail call i32 @fac(i32 6)
%2 = icmp eq i32 %1, 720
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CINF;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_CINF_it;
X509_CINF *d2i_X509_CINF(X509_CINF **a, const unsigned char **in, long len) {
  return (X509_CINF *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_CINF_it);
}


x86 assembly (clang, -O0):
<d2i_X509_CINF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2eb1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_X509_CINF>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@X509_CINF_it = global i32 0
define i32* @d2i_X509_CINF(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @X509_CINF_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@X509_CINF_it = global i32 0
define i32* @d2i_X509_CINF(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @X509_CINF_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
float fp_barrierf(float x) { return x; }


x86 assembly (clang, -O0):
<fp_barrierf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_barrierf>:
ret

LLVM IR (-O0):
define float @fp_barrierf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
ret float %3
}

LLVM IR (-O2):
define float @fp_barrierf(float returned %0) {
ret float %0
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
void print_environment() {
  printf("<B>REMOTE_PORT:</B> %s<BR>\n", getenv("REMOTE_PORT"));
  printf("<B>REMOTE_ADDR:</B> %s<BR>\n", getenv("REMOTE_ADDR"));
}


x86 assembly (clang, -O0):
<print_environment>:
push   %rbp
mov    %rsp,%rbp
lea    0xef1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xed3(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_environment>:
push   %rax
lea    0xef4(%rip),%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
lea    0xf01(%rip),%rdi
call   1030 <getenv@plt>
lea    0xed9(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"<B>REMOTE_PORT:</B> %s<BR>\0A\00"
@.str.1 = [12 x i8] c"REMOTE_PORT\00"
@.str.2 = [28 x i8] c"<B>REMOTE_ADDR:</B> %s<BR>\0A\00"
@.str.3 = [12 x i8] c"REMOTE_ADDR\00"
define void @print_environment() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"<B>REMOTE_PORT:</B> %s<BR>\0A\00"
@.str.1 = [12 x i8] c"REMOTE_PORT\00"
@.str.2 = [28 x i8] c"<B>REMOTE_ADDR:</B> %s<BR>\0A\00"
@.str.3 = [12 x i8] c"REMOTE_ADDR\00"
define void @print_environment() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret void
}
void gtk_menu_shell_select_first() {}


x86 assembly (clang, -O0):
<gtk_menu_shell_select_first>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_menu_shell_select_first>:
ret

LLVM IR (-O0):
define void @gtk_menu_shell_select_first() {
ret void
}

LLVM IR (-O2):
define void @gtk_menu_shell_select_first() {
ret void
}
/* Variables and functions */
scalar_t__ checkprofile();
int /*<<< orphan*/ setprofile();
int /*<<< orphan*/ test_daemon();
int /*<<< orphan*/ test_init(int, char **);
int /*<<< orphan*/ test_msg(char *);
int /*<<< orphan*/ test_waitsig();
int main(int argc, char **argv) {
  test_init(argc, argv);
  setprofile();
  test_daemon();
  test_waitsig();
  if (checkprofile() == 0)
    test_msg("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <test_init@plt>
mov    $0x0,%al
call   1050 <setprofile@plt>
mov    $0x0,%al
call   1060 <test_daemon@plt>
mov    $0x0,%al
call   1080 <test_waitsig@plt>
mov    $0x0,%al
call   1030 <checkprofile@plt>
cmp    $0x0,%rax
jne    11b4 <main+0x54>
lea    0xe51(%rip),%rdi
call   1070 <test_msg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <test_init@plt>
xor    %eax,%eax
call   1050 <setprofile@plt>
xor    %eax,%eax
call   1060 <test_daemon@plt>
xor    %eax,%eax
call   1080 <test_waitsig@plt>
xor    %eax,%eax
call   1030 <checkprofile@plt>
test   %rax,%rax
jne    1193 <main+0x33>
lea    0xe72(%rip),%rdi
call   1070 <test_msg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @test_init(i32 %6, i8** %7)
%9 = call i32 (...) @setprofile()
%10 = call i32 (...) @test_daemon()
%11 = call i32 (...) @test_waitsig()
%12 = call i64 (...) @checkprofile()
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @test_msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"PASS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_init(i32 %0, i8** %1)
%4 = tail call i32 (...) @setprofile()
%5 = tail call i32 (...) @test_daemon()
%6 = tail call i32 (...) @test_waitsig()
%7 = tail call i64 (...) @checkprofile()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @test_msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret i32 0
}
void X509_get_ext_d2i(void) {}


x86 assembly (clang, -O0):
<X509_get_ext_d2i>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_get_ext_d2i>:
ret

LLVM IR (-O0):
define void @X509_get_ext_d2i() {
ret void
}

LLVM IR (-O2):
define void @X509_get_ext_d2i() {
ret void
}
void free_c_ivector(v, nl, nh) int *v;
long nh, nl;
{ free((char *)(v + nl - 1)); }


x86 assembly (clang, -O0):
<free_c_ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_c_ivector>:
lea    (%rdi,%rsi,4),%rdi
add    $0xfffffffffffffffc,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_c_ivector(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i32, i32* %7, i64 %8
%10 = getelementptr inbounds i32, i32* %9, i64 -1
%11 = bitcast i32* %10 to i8*
ret void
}

LLVM IR (-O2):
define void @free_c_ivector(i32* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
%5 = getelementptr inbounds i32, i32* %4, i64 -1
%6 = bitcast i32* %5 to i8*
tail call void @free(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xb4() {
  Assert_real((isodigit(180) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              905, ("isodigit should be 0 for 0xb4"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xb4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb4,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x389,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xb4>:
push   %rax
mov    $0xb4,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x389,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xb4\00"
define void @t_isodigit_0xb4() {
%1 = call i64 @isodigit(i32 180)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 905, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xb4\00"
define void @t_isodigit_0xb4() {
%1 = tail call i64 @isodigit(i32 180)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 905, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int SteamAPI_ISteamUserStats_GetAchievementIcon(void *self,
                                                const char *pchName) {
  xlogf("%s(self = %p, pchName = %s)\n", __func__, self, pchName);
  return 0;
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamUserStats_GetAchievementIcon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xed1(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamUserStats_GetAchievementIcon>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee2(%rip),%rdi
lea    0xef8(%rip),%rsi
xor    %eax,%eax
call   1030 <xlogf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"%s(self = %p, pchName = %s)\0A\00"
@__func__.SteamAPI_ISteamUserStats_GetAchievementIcon = [44 x i8] c"SteamAPI_ISteamUserStats_GetAchievementIcon\00"
define i32 @SteamAPI_ISteamUserStats_GetAchievementIcon(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamUserStats_GetAchievementIcon, i64 0, i64 0), i8* %5, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s(self = %p, pchName = %s)\0A\00"
@__func__.SteamAPI_ISteamUserStats_GetAchievementIcon = [44 x i8] c"SteamAPI_ISteamUserStats_GetAchievementIcon\00"
define i32 @SteamAPI_ISteamUserStats_GetAchievementIcon(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamUserStats_GetAchievementIcon, i64 0, i64 0), i8* %0, i8* %1)
ret i32 0
}
int sh_cannot_store_register(int regno) { return 0; }


x86 assembly (clang, -O0):
<sh_cannot_store_register>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sh_cannot_store_register>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sh_cannot_store_register(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @sh_cannot_store_register(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *);
int /*<<< orphan*/ Cvar_Userinfo();
int /*<<< orphan*/ Info_Print(int /*<<< orphan*/);
void CL_Userinfo_f(void) {
  Com_Printf("User info settings:\n");
  Info_Print(Cvar_Userinfo());
}


x86 assembly (clang, -O0):
<CL_Userinfo_f>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <Com_Printf@plt>
mov    $0x0,%al
call   1040 <Cvar_Userinfo@plt>
mov    %eax,%edi
call   1050 <Info_Print@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_Userinfo_f>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <Com_Printf@plt>
xor    %eax,%eax
call   1040 <Cvar_Userinfo@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <Info_Print@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"User info settings:\0A\00"
define void @CL_Userinfo_f() {
%1 = call i32 @Com_Printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @Cvar_Userinfo()
%3 = call i32 @Info_Print(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"User info settings:\0A\00"
define void @CL_Userinfo_f() {
%1 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @Cvar_Userinfo()
%3 = tail call i32 @Info_Print(i32 %2)
ret void
}
int are_prime(int num1, int num2) {
  if (num1 - num2 == 2 || num2 - num1 == 2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<are_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x2,%eax
je     1128 <are_prime+0x28>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x2,%eax
jne    1134 <are_prime+0x34>
movl   $0x1,-0x4(%rbp)
jmp    113b <are_prime+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_prime>:
mov    %edi,%eax
sub    %esi,%eax
cmp    $0x2,%eax
sete   %al
sub    %edi,%esi
cmp    $0x2,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @are_prime(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sub nsw i32 %6, %7
%9 = icmp eq i32 %8, 2
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = sub nsw i32 %11, %12
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %16
15: ; preds = %10, %2
store i32 1, i32* %3
br label %17
16: ; preds = %10
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @are_prime(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = icmp eq i32 %3, 2
%5 = sub nsw i32 %1, %0
%6 = icmp eq i32 %5, 2
%7 = select i1 %4, i1 true, i1 %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __swab16p(int /*<<< orphan*/ *);
void __swab16s(uint16_t *p) { *p = __swab16p(p); }


x86 assembly (clang, -O0):
<__swab16s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__swab16p@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__swab16s>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__swab16p@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__swab16s(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @__swab16p(i32* %3)
%5 = load i32*, i32** %2
store i32 %4, i32* %5
ret void
}

LLVM IR (-O2):
define void @__swab16s(i32* %0) {
%2 = tail call i32 @__swab16p(i32* %0)
store i32 %2, i32* %0
ret void
}
void gtk_paned_get_child2() {}


x86 assembly (clang, -O0):
<gtk_paned_get_child2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_paned_get_child2>:
ret

LLVM IR (-O0):
define void @gtk_paned_get_child2() {
ret void
}

LLVM IR (-O2):
define void @gtk_paned_get_child2() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char a[0];
  printf("%p\n", a);
  char b[0];
  printf("%p\n", b);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x5(%rbp),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x6(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rbx
lea    0x7(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%p\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [0 x i8]
%3 = alloca [0 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [0 x i8], [0 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [0 x i8], [0 x i8]* %3, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [0 x i8]
%2 = getelementptr inbounds [0 x i8], [0 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ list_passwd();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ user_by_name(char *);
int /*<<< orphan*/ user_by_uid(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  list_passwd();
  user_by_uid(0);
  user_by_name("games");
  printf("pwd ok\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <list_passwd@plt>
xor    %edi,%edi
call   1050 <user_by_uid@plt>
lea    0xe95(%rip),%rdi
call   1060 <user_by_name@plt>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <list_passwd@plt>
xor    %edi,%edi
call   1050 <user_by_uid@plt>
lea    0xeaa(%rip),%rdi
call   1060 <user_by_name@plt>
lea    0xea4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"games\00"
@.str.1 = [8 x i8] c"pwd ok\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @list_passwd()
%7 = call i32 @user_by_uid(i32 0)
%8 = call i32 @user_by_name(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"games\00"
@str = [7 x i8] c"pwd ok\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @list_passwd()
%4 = tail call i32 @user_by_uid(i32 0)
%5 = tail call i32 @user_by_name(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct mm_array {
  int dummy;
};

/* Variables and functions */
int mm_array_insert2(struct mm_array *, void *, size_t, int);
int mm_array_insert(struct mm_array *mar, void *element, size_t pos) {
  (void)(pos);
  return mm_array_insert2(mar, element, pos, 1);
}


x86 assembly (clang, -O0):
<mm_array_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <mm_array_insert2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_array_insert>:
mov    $0x1,%ecx
jmp    1030 <mm_array_insert2@plt>

LLVM IR (-O0):
%struct.mm_array = type { i32 }
define i32 @mm_array_insert(%struct.mm_array* %0, i8* %1, i64 %2) {
%4 = alloca %struct.mm_array*
%5 = alloca i8*
%6 = alloca i64
store %struct.mm_array* %0, %struct.mm_array** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load %struct.mm_array*, %struct.mm_array** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @mm_array_insert2(%struct.mm_array* %8, i8* %9, i64 %10, i32 1)
ret i32 %11
}

LLVM IR (-O2):
%struct.mm_array = type { i32 }
define i32 @mm_array_insert(%struct.mm_array* %0, i8* %1, i64 %2) {
%4 = tail call i32 @mm_array_insert2(%struct.mm_array* %0, i8* %1, i64 %2, i32 1)
ret i32 %4
}
/* Variables and functions */
int evaluatePostfixExpression(char *);
int computePostfix(char *postfix) {
  return evaluatePostfixExpression(postfix);
  ;
}


x86 assembly (clang, -O0):
<computePostfix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <evaluatePostfixExpression@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computePostfix>:
jmp    1030 <evaluatePostfixExpression@plt>

LLVM IR (-O0):
define i32 @computePostfix(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @evaluatePostfixExpression(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @computePostfix(i8* %0) {
%2 = tail call i32 @evaluatePostfixExpression(i8* %0)
ret i32 %2
}
void camc_sn(const int c, const int n, const int a, const int f, const int r) {}


x86 assembly (clang, -O0):
<camc_sn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<camc_sn>:
ret

LLVM IR (-O0):
define void @camc_sn(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
define void @camc_sn(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int xcode_sucks() { return 0; }


x86 assembly (clang, -O0):
<xcode_sucks>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcode_sucks>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @xcode_sucks() {
ret i32 0
}

LLVM IR (-O2):
define i32 @xcode_sucks() {
ret i32 0
}
/* Variables and functions */
scalar_t__ strrchr(char const *, int);
unsigned char *cst_strrchr(const unsigned char *str, int c) {
  return (unsigned char *)strrchr((const char *)str, c);
}


x86 assembly (clang, -O0):
<cst_strrchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strrchr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cst_strrchr>:
jmp    1030 <strrchr@plt>

LLVM IR (-O0):
define i8* @cst_strrchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @strrchr(i8* %5, i32 %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @cst_strrchr(i8* %0, i32 %1) {
%3 = tail call i64 @strrchr(i8* %0, i32 %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int sum(char t[4]) {
  int i;
  int sum = 0;
  for (i = 0; i < 5; i++) {
    sum += t[i];
  }
  return sum;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1140 <sum+0x40>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <sum+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
movsbl (%rdi),%eax
movsbl 0x1(%rdi),%ecx
add    %eax,%ecx
movsbl 0x2(%rdi),%eax
add    %ecx,%eax
movsbl 0x3(%rdi),%ecx
add    %eax,%ecx
movsbl 0x4(%rdi),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @sum(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i32, i32* %4
%16 = add nsw i32 %15, %14
store i32 %16, i32* %4
br label %17
17: ; preds = %8
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
20: ; preds = %5
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @sum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = add nsw i32 %3, %6
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = add nsw i32 %7, %10
%12 = getelementptr inbounds i8, i8* %0, i64 3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = add nsw i32 %11, %14
%16 = getelementptr inbounds i8, i8* %0, i64 4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = add nsw i32 %15, %18
ret i32 %19
}
unsigned char answer_6(unsigned char arg0, int arg1) { return 0; }


x86 assembly (clang, -O0):
<answer_6>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<answer_6>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i8 @answer_6(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @answer_6(i8 zeroext %0, i32 %1) {
ret i8 0
}
const char *getprogname(void) { return "(unknown program)"; }


x86 assembly (clang, -O0):
<getprogname>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getprogname>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"(unknown program)\00"
define i8* @getprogname() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [18 x i8] c"(unknown program)\00"
define i8* @getprogname() {
ret i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
unsigned int sq(unsigned int);
unsigned int power10(unsigned int n) {
  if (n == 1)
    return 10;
  if (n % 2)
    return 10 * sq(power10((n - 1) / 2));
  return sq(power10(n / 2));
}


x86 assembly (clang, -O0):
<power10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1141 <power10+0x21>
movl   $0xa,-0x4(%rbp)
jmp    1185 <power10+0x65>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1170 <power10+0x50>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
shr    $0x1,%edi
call   1040 <power10@plt>
mov    %eax,%edi
call   1030 <sq@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <power10+0x65>
mov    -0x8(%rbp),%edi
shr    $0x1,%edi
call   1040 <power10@plt>
mov    %eax,%edi
call   1030 <sq@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power10>:
push   %rax
mov    $0xa,%eax
cmp    $0x1,%edi
je     1156 <power10+0x36>
test   $0x1,%dil
jne    1140 <power10+0x20>
shr    %edi
call   1040 <power10@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sq@plt>
add    $0xffffffff,%edi
shr    %edi
call   1040 <power10@plt>
mov    %eax,%edi
call   1030 <sq@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @power10(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 10, i32* %2
br label %23
7: ; preds = %1
%8 = load i32, i32* %3
%9 = urem i32 %8, 2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub i32 %12, 1
%14 = udiv i32 %13, 2
%15 = call i32 @power10(i32 %14)
%16 = call i32 @sq(i32 %15)
%17 = mul i32 10, %16
store i32 %17, i32* %2
br label %23
18: ; preds = %7
%19 = load i32, i32* %3
%20 = udiv i32 %19, 2
%21 = call i32 @power10(i32 %20)
%22 = call i32 @sq(i32 %21)
store i32 %22, i32* %2
br label %23
23: ; preds = %18, %11, %6
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @power10(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %8
6: ; preds = %1, %14, %8
%7 = phi i32 [ %13, %8 ], [ %17, %14 ], [ 10, %1 ]
ret i32 %7
8: ; preds = %3
%9 = add i32 %0, -1
%10 = lshr i32 %9, 1
%11 = tail call i32 @power10(i32 %10)
%12 = tail call i32 @sq(i32 %11)
%13 = mul i32 %12, 10
br label %6
14: ; preds = %3
%15 = lshr i32 %0, 1
%16 = tail call i32 @power10(i32 %15)
%17 = tail call i32 @sq(i32 %16)
br label %6
}
unsigned long la2pa(unsigned long la) {
  unsigned long pa;
  pa = ((la % 24) / 4) * 5 + (la / 24) * 32;
  return pa;
}


x86 assembly (clang, -O0):
<la2pa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x18,%ecx
xor    %edx,%edx
div    %rcx
shr    $0x2,%rdx
imul   $0x5,%rdx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x18,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
shl    $0x5,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<la2pa>:
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mov    %rdi,%rax
mul    %rcx
shr    $0x4,%rdx
lea    0x0(,%rdx,8),%rax
lea    (%rax,%rax,2),%rax
sub    %rax,%rdi
shr    $0x2,%rdi
lea    (%rdi,%rdi,4),%rax
shl    $0x5,%rdx
add    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @la2pa(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = urem i64 %4, 24
%6 = udiv i64 %5, 4
%7 = mul i64 %6, 5
%8 = load i64, i64* %2
%9 = udiv i64 %8, 24
%10 = mul i64 %9, 32
%11 = add i64 %7, %10
store i64 %11, i64* %3
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @la2pa(i64 %0) {
%2 = urem i64 %0, 24
%3 = lshr i64 %2, 2
%4 = mul nuw nsw i64 %3, 5
%5 = udiv i64 %0, 24
%6 = shl i64 %5, 5
%7 = add nuw i64 %4, %6
ret i64 %7
}
/* Variables and functions */
scalar_t__ strtod(char const *, char **);
float _mesa_strtof(const char *s, char **end) { return (float)strtod(s, end); }


x86 assembly (clang, -O0):
<_mesa_strtof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mesa_strtof>:
push   %rax
call   1030 <strtod@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @_mesa_strtof(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call i64 @strtod(i8* %5, i8** %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @_mesa_strtof(i8* %0, i8** nocapture %1) {
%3 = tail call i64 @strtod(i8* %0, i8** %1)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ pushattributes();
void pushattributes_() { pushattributes(); }


x86 assembly (clang, -O0):
<pushattributes_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pushattributes@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushattributes_>:
xor    %eax,%eax
jmp    1030 <pushattributes@plt>

LLVM IR (-O0):
define void @pushattributes_() {
%1 = call i32 (...) @pushattributes()
ret void
}

LLVM IR (-O2):
define void @pushattributes_() {
%1 = tail call i32 (...) @pushattributes()
ret void
}
/* Type definitions */
struct jit_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ emit1(struct jit_state *, int);
int /*<<< orphan*/ emit_basic_rex(struct jit_state *, int, int, int);
int /*<<< orphan*/ emit_modrm_reg2reg(struct jit_state *, int, int);
void emit_alu64(struct jit_state *state, int op, int src, int dst) {
  emit_basic_rex(state, 1, src, dst);
  emit1(state, op);
  emit_modrm_reg2reg(state, src, dst);
}


x86 assembly (clang, -O0):
<emit_alu64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    $0x1,%esi
call   1050 <emit_basic_rex@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <emit1@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <emit_modrm_reg2reg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_alu64>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0x1,%esi
call   1050 <emit_basic_rex@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <emit1@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <emit_modrm_reg2reg@plt>

LLVM IR (-O0):
%struct.jit_state = type { i32 }
define void @emit_alu64(%struct.jit_state* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.jit_state*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.jit_state* %0, %struct.jit_state** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.jit_state*, %struct.jit_state** %5
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @emit_basic_rex(%struct.jit_state* %9, i32 1, i32 %10, i32 %11)
%13 = load %struct.jit_state*, %struct.jit_state** %5
%14 = load i32, i32* %6
%15 = call i32 @emit1(%struct.jit_state* %13, i32 %14)
%16 = load %struct.jit_state*, %struct.jit_state** %5
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = call i32 @emit_modrm_reg2reg(%struct.jit_state* %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
%struct.jit_state = type { i32 }
define void @emit_alu64(%struct.jit_state* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @emit_basic_rex(%struct.jit_state* %0, i32 1, i32 %2, i32 %3)
%6 = tail call i32 @emit1(%struct.jit_state* %0, i32 %1)
%7 = tail call i32 @emit_modrm_reg2reg(%struct.jit_state* %0, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void *mpui_list_new(void) {
  void **list;
  list = (void **)malloc(sizeof(*list));
  *list = NULL;
  return list;
}


x86 assembly (clang, -O0):
<mpui_list_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpui_list_new>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movq   $0x0,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @mpui_list_new() {
%1 = alloca i8**
%2 = call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to i8**
store i8** %3, i8*** %1
%4 = load i8**, i8*** %1
store i8* null, i8** %4
%5 = load i8**, i8*** %1
%6 = bitcast i8** %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @mpui_list_new() {
%1 = tail call i64 @malloc(i32 8)
%2 = inttoptr i64 %1 to i8**
store i8* null, i8** %2
%3 = inttoptr i64 %1 to i8*
ret i8* %3
}
/* Variables and functions */
int sqrt(int);
float pierwX2(int a, int b, int delta) { return (-b - sqrt(delta)) / (2 * a); }


x86 assembly (clang, -O0):
<pierwX2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pierwX2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edx,%edi
call   1030 <sqrt@plt>
add    %ebx,%eax
neg    %eax
add    %ebp,%ebp
cltd
idiv   %ebp
cvtsi2ss %eax,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @pierwX2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %6
%10 = call i32 @sqrt(i32 %9)
%11 = sub nsw i32 %8, %10
%12 = load i32, i32* %4
%13 = mul nsw i32 2, %12
%14 = sdiv i32 %11, %13
%15 = sitofp i32 %14 to float
ret float %15
}

LLVM IR (-O2):
define float @pierwX2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @sqrt(i32 %2)
%5 = add i32 %4, %1
%6 = sub i32 0, %5
%7 = shl nsw i32 %0, 1
%8 = sdiv i32 %6, %7
%9 = sitofp i32 %8 to float
ret float %9
}
/* Variables and functions */
size_t base64_encode_size(size_t);
size_t encode_size_base64(size_t in_len) { return base64_encode_size(in_len); }


x86 assembly (clang, -O0):
<encode_size_base64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <base64_encode_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_size_base64>:
jmp    1030 <base64_encode_size@plt>

LLVM IR (-O0):
define i64 @encode_size_base64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @base64_encode_size(i64 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @encode_size_base64(i64 %0) {
%2 = tail call i64 @base64_encode_size(i64 %0)
ret i64 %2
}
void _start() {
  int argc = 0;
  char **argv = (void *)0x0;
  main(argc, argv);
  asm volatile("syscall" ::"a"(12));
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <main@plt>
mov    $0xc,%eax
syscall
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <main@plt>
mov    $0xc,%eax
syscall
pop    %rax
ret

LLVM IR (-O0):
define void @_start() {
%1 = alloca i32
%2 = alloca i8**
store i32 0, i32* %1
store i8** null, i8*** %2
%3 = load i32, i32* %1
%4 = load i8**, i8*** %2
%5 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @main to i32 (i32, i8**, ...)*)(i32 %3, i8** %4)
ret void
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @main to i32 (i32, i8**, ...)*)(i32 0, i8** null)
tail call void asm sideeffect "syscall", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 12)
ret void
}
void init_irq_proc(void) {}


x86 assembly (clang, -O0):
<init_irq_proc>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_irq_proc>:
ret

LLVM IR (-O0):
define void @init_irq_proc() {
ret void
}

LLVM IR (-O2):
define void @init_irq_proc() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void reverse_uint32_t(uint32_t *it, uint32_t *end) {
  uint32_t tmp;
  while (it < end) {
    tmp = *it;
    --end;
    *it++ = *end;
    *end = tmp;
  }
}


x86 assembly (clang, -O0):
<reverse_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1154 <reverse_uint32_t+0x54>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    110c <reverse_uint32_t+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_uint32_t>:
cmp    %rsi,%rdi
jae    1128 <reverse_uint32_t+0x28>
add    $0xfffffffffffffffc,%rsi
nopl   0x0(%rax)
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
add    $0x4,%rdi
mov    %eax,(%rsi)
lea    -0x4(%rsi),%rax
cmp    %rsi,%rdi
mov    %rax,%rsi
jb     1110 <reverse_uint32_t+0x10>
ret

LLVM IR (-O0):
define void @reverse_uint32_t(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
br label %6
6: ; preds = %10, %2
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = icmp ult i32* %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i32 -1
store i32* %14, i32** %4
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %3
store i32 %16, i32* %17
%19 = load i32, i32* %5
%20 = load i32*, i32** %4
store i32 %19, i32* %20
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @reverse_uint32_t(i32* %0, i32* %1) {
%3 = icmp ult i32* %0, %1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32* [ %10, %4 ], [ %0, %2 ]
%6 = phi i32* [ %8, %4 ], [ %1, %2 ]
%7 = load i32, i32* %5
%8 = getelementptr inbounds i32, i32* %6, i64 -1
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %5, i64 1
store i32 %9, i32* %5
store i32 %7, i32* %8
%11 = icmp ult i32* %10, %8
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
long long int get_fibonacci_rec(int n) {
  if (n == 1) {
    return 1;
  }
  if (n == 0) {
    return 0;
  }
  return get_fibonacci_rec(n - 1) + get_fibonacci_rec(n - 2);
}


x86 assembly (clang, -O0):
<get_fibonacci_rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1132 <get_fibonacci_rec+0x22>
movq   $0x1,-0x8(%rbp)
jmp    1171 <get_fibonacci_rec+0x61>
cmpl   $0x0,-0xc(%rbp)
jne    1149 <get_fibonacci_rec+0x39>
movq   $0x0,-0x8(%rbp)
jmp    1171 <get_fibonacci_rec+0x61>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <get_fibonacci_rec@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x2,%edi
call   1030 <get_fibonacci_rec@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_fibonacci_rec>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %r14d,%r14d
test   %ebx,%ebx
je     1137 <get_fibonacci_rec+0x27>
nopl   (%rax)
cmp    $0x1,%ebx
je     113b <get_fibonacci_rec+0x2b>
lea    -0x1(%rbx),%edi
call   1030 <get_fibonacci_rec@plt>
add    %rax,%r14
add    $0xfffffffe,%ebx
test   %ebx,%ebx
jne    1120 <get_fibonacci_rec+0x10>
xor    %eax,%eax
jmp    1140 <get_fibonacci_rec+0x30>
mov    $0x1,%eax
add    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @get_fibonacci_rec(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 0, i64* %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i64 @get_fibonacci_rec(i32 %13)
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 2
%17 = call i64 @get_fibonacci_rec(i32 %16)
%18 = add nsw i64 %14, %17
store i64 %18, i64* %2
br label %19
19: ; preds = %11, %10, %6
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @get_fibonacci_rec(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i64 [ 0, %1 ], [ %9, %5 ]
%4 = phi i32 [ %0, %1 ], [ %8, %5 ]
switch i32 %4, label %5 [
i32 1, label %10
i32 0, label %11
]
5: ; preds = %2
%6 = add nsw i32 %4, -1
%7 = tail call i64 @get_fibonacci_rec(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i64 %7, %3
br label %2
10: ; preds = %2
br label %11
11: ; preds = %2, %10
%12 = phi i64 [ 1, %10 ], [ 0, %2 ]
%13 = add nsw i64 %12, %3
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ clean(char *);
char *to_upper(char *);
char *gen_key(char *string) {
  char *key = to_upper(string);
  clean(key);
  return key;
}


x86 assembly (clang, -O0):
<gen_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <to_upper@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <clean@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_key>:
push   %rbx
call   1040 <to_upper@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <clean@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @gen_key(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @to_upper(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @clean(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @gen_key(i8* %0) {
%2 = tail call i8* @to_upper(i8* %0)
%3 = tail call i32 @clean(i8* %2)
ret i8* %2
}