xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x62() {
  Assert_real((isprint(98)),
              "/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_isprint.c",
              495, ("isprint should be 1 for b"));
}


x86 assembly (clang, -O0):
<t_isprint_0x62>:
push   %rbp
mov    %rsp,%rbp
mov    $0x62,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1ef,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x62>:
push   %rax
mov    $0x62,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1ef,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for b\00"
define void @t_isprint_0x62() {
%1 = call i32 @isprint(i32 98)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 495, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for b\00"
define void @t_isprint_0x62() {
%1 = tail call i32 @isprint(i32 98)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 495, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned int brightness_mapping(unsigned int level) {
  unsigned int mapped_level;
  mapped_level = level;
  return mapped_level;
}


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

x86 assembly (clang, -O2):
<brightness_mapping>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @brightness_mapping(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int get_yes_no(void) {
  char buf[10] = {0};
  fgets(buf, sizeof(buf), stdin);
  if (buf[0] == 'y' || buf[0] == 'Y')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<get_yes_no>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xe(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <memset@plt>
lea    -0xe(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1040 <fgets@plt>
movsbl -0xe(%rbp),%eax
cmp    $0x79,%eax
je     1169 <get_yes_no+0x49>
movsbl -0xe(%rbp),%eax
cmp    $0x59,%eax
jne    1175 <get_yes_no+0x55>
movl   $0x1,-0x4(%rbp)
jmp    117c <get_yes_no+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_yes_no>:
sub    $0x18,%rsp
movw   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    0x8(%rsp),%cl
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @get_yes_no() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast [10 x i8]* %2 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 10, i32 %5)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 121
br i1 %10, label %16, label %11
11: ; preds = %0
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 89
br i1 %15, label %16, label %17
16: ; preds = %11, %0
store i32 1, i32* %1
br label %18
17: ; preds = %11
store i32 0, i32* %1
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @get_yes_no() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 10, i32 %3)
%5 = load i8, i8* %2
%6 = and i8 %5, -33
%7 = icmp eq i8 %6, 89
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ TKSPI_ChipSel(int);
void TKSPI_Deselect(void) { TKSPI_ChipSel(1); }


x86 assembly (clang, -O0):
<TKSPI_Deselect>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <TKSPI_ChipSel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TKSPI_Deselect>:
mov    $0x1,%edi
jmp    1030 <TKSPI_ChipSel@plt>

LLVM IR (-O0):
define void @TKSPI_Deselect() {
%1 = call i32 @TKSPI_ChipSel(i32 1)
ret void
}

LLVM IR (-O2):
define void @TKSPI_Deselect() {
%1 = tail call i32 @TKSPI_ChipSel(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint32_t inl(uint16_t port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @inl(i32 %0) {
ret i32 0
}
void write_void() {}


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

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

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

LLVM IR (-O2):
define void @write_void() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quest_readdb();
void quest_reload(void) { quest_readdb(); }


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

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

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

LLVM IR (-O2):
define void @quest_reload() {
%1 = tail call i32 (...) @quest_readdb()
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_get_linear_product_solution(int n, int i, int *m, double *sol) {
  int fail, a[2];
  a[0] = n, a[1] = i;
  fail = _ada_use_c2phc4c(144, a, m, sol, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_get_linear_product_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x90,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_get_linear_product_solution>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x90,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_get_linear_product_solution(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
%10 = alloca [2 x i32]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store double* %3, double** %8
%11 = load i32, i32* %5
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %6
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 0
%16 = load i32*, i32** %7
%17 = load double*, double** %8
%18 = call i32 @_ada_use_c2phc4c(i32 144, i32* %15, i32* %16, double* %17, i32 0)
store i32 %18, i32* %9
%19 = load i32, i32* %9
ret i32 %19
}

LLVM IR (-O2):
define i32 @solcon_get_linear_product_solution(i32 %0, i32 %1, i32* %2, double* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 144, i32* %7, i32* %2, double* %3, i32 0)
ret i32 %9
}
const char *psp_joypad_name(unsigned pad) { return "PSP Controller"; }


x86 assembly (clang, -O0):
<psp_joypad_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"PSP Controller\00"
define i8* @psp_joypad_name(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"PSP Controller\00"
define i8* @psp_joypad_name(i32 %0) {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
void const_value(const double r, const double *p, double *f) { *f = *p; }


x86 assembly (clang, -O0):
<const_value>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<const_value>:
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @const_value(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = load double, double* %7
%9 = load double*, double** %6
store double %8, double* %9
ret void
}

LLVM IR (-O2):
define void @const_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
store double %4, double* %2
ret void
}
void SteamAPI_ISteamHTMLSurface_MouseDown(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamHTMLSurface_MouseDown>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_MouseDown = [37 x i8] c"SteamAPI_ISteamHTMLSurface_MouseDown\00"
define void @SteamAPI_ISteamHTMLSurface_MouseDown(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_MouseDown, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamHTMLSurface_MouseDown = [37 x i8] c"SteamAPI_ISteamHTMLSurface_MouseDown\00"
define void @SteamAPI_ISteamHTMLSurface_MouseDown(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @__func__.SteamAPI_ISteamHTMLSurface_MouseDown, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core7_swap(char *, int);
void U_EMRSETVIEWPORTEXTEX_swap(char *record, int torev) {
  core7_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_EMRSETVIEWPORTEXTEX_swap>:
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 <core7_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRSETVIEWPORTEXTEX_swap>:
jmp    1030 <core7_swap@plt>

LLVM IR (-O0):
define void @U_EMRSETVIEWPORTEXTEX_swap(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 i32 @core7_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_EMRSETVIEWPORTEXTEX_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core7_swap(i8* %0, i32 %1)
ret void
}
void print(void) {}


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

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

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

LLVM IR (-O2):
define void @print() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void wppanic(const char *s) {
  printf("Waypoint system error: %s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<wppanic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<wppanic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Waypoint system error: %s\0A\00"
define void @wppanic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"Waypoint system error: %s\0A\00"
define void @wppanic(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int jac_chain_nm2_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 2;
  return 0;
}


x86 assembly (clang, -O0):
<jac_chain_nm2_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <jac_chain_nm2_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <jac_chain_nm2_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <jac_chain_nm2_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <jac_chain_nm2_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x2,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm2_work>:
test   %rdi,%rdi
je     110b <jac_chain_nm2_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <jac_chain_nm2_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <jac_chain_nm2_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <jac_chain_nm2_work+0x2c>
movl   $0x2,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @jac_chain_nm2_work(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i32*, i32** %5
store i32 2, i32* %12
br label %13
13: ; preds = %11, %4
%14 = load i32*, i32** %6
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32*, i32** %6
store i32 2, i32* %17
br label %18
18: ; preds = %16, %13
%19 = load i32*, i32** %7
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = load i32*, i32** %7
store i32 0, i32* %22
br label %23
23: ; preds = %21, %18
%24 = load i32*, i32** %8
%25 = icmp ne i32* %24, null
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i32*, i32** %8
store i32 2, i32* %27
br label %28
28: ; preds = %26, %23
ret i32 0
}

LLVM IR (-O2):
define i32 @jac_chain_nm2_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 2, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ classicHanoi(int);
int main() {
  classicHanoi(8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <classicHanoi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <classicHanoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @classicHanoi(i32 8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @classicHanoi(i32 8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: echo\n", stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Usage: echo\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [13 x i8] c"Usage: echo\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
/* Variables and functions */
scalar_t__ strcasecmp(char *, char *);
int strequal(char *s1, char *s2) {
  if (!s1 || !s2)
    return (0);
  return (strcasecmp(s1, s2) == 0);
}


x86 assembly (clang, -O0):
<strequal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <strequal+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <strequal+0x32>
movl   $0x0,-0x4(%rbp)
jmp    115e <strequal+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strequal>:
xor    %eax,%eax
test   %rdi,%rdi
je     1131 <strequal+0x21>
test   %rsi,%rsi
je     1131 <strequal+0x21>
push   %rax
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @strequal(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ SYS_pkey_mprotect;
int syscall(int /*<<< orphan*/, void *, size_t, unsigned long, unsigned long);
int pkey_mprotect(void *ptr, size_t size, unsigned long orig_prot,
                  unsigned long pkey) {
  return syscall(SYS_pkey_mprotect, ptr, size, orig_prot, pkey);
}


x86 assembly (clang, -O0):
<pkey_mprotect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pkey_mprotect>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_pkey_mprotect = global i32 0
define i32 @pkey_mprotect(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i32, i32* @SYS_pkey_mprotect
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i32 @syscall(i32 %9, i8* %10, i64 %11, i64 %12, i64 %13)
ret i32 %14
}

LLVM IR (-O2):
@SYS_pkey_mprotect = global i32 0
define i32 @pkey_mprotect(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = load i32, i32* @SYS_pkey_mprotect
%6 = tail call i32 @syscall(i32 %5, i8* %0, i64 %1, i64 %2, i64 %3)
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t gnu_hash_func(const char *str) {
  uint32_t hash = 5381;
  for (; *str != '\0'; str++) {
    hash = hash * 33 + *str;
  }
  return hash;
}


x86 assembly (clang, -O0):
<gnu_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <gnu_hash_func+0x40>
imul   $0x21,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <gnu_hash_func+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnu_hash_func>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <gnu_hash_func+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <gnu_hash_func+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @gnu_hash_func(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul nsw i32 %6, 33
%10 = add nsw i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %10, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *);
int main() {
  int a[4];
  foo(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [4 x i32]
%2 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%3 = call i32 @foo(i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
ret i32 0
}
int JiBenBianFa_cost(struct Ability *self) { return 0; }


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

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

LLVM IR (-O0):
%struct.Ability = type opaque
define i32 @JiBenBianFa_cost(%struct.Ability* %0) {
%2 = alloca %struct.Ability*
store %struct.Ability* %0, %struct.Ability** %2
ret i32 0
}

LLVM IR (-O2):
%struct.Ability = type opaque
define i32 @JiBenBianFa_cost(%struct.Ability* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
int /*<<< orphan*/ my_putstr(char *);
int my_show_to_wordtab(char **tab) {
  int i;
  i = 0;
  while (tab[i]) {
    my_putstr(tab[i]);
    my_putchar('\n');
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_show_to_wordtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116f <my_show_to_wordtab+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <my_putstr@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <my_show_to_wordtab+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_show_to_wordtab>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     114b <my_show_to_wordtab+0x2b>
add    $0x8,%rbx
call   1040 <my_putstr@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <my_show_to_wordtab+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @my_show_to_wordtab(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8* [ %11, %4 ], [ %2, %1 ]
%7 = tail call i32 @my_putstr(i8* %6)
%8 = tail call i32 @my_putchar(i8 signext 10)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xfree(void *p) {
  if (p) {
    ((void)0);
    ((void)0);
    free(p);
  }
}


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <xfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfree>:
test   %rdi,%rdi
je     111a <xfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @xfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @xfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void mc_bitstream_write_byte(unsigned char **bs, unsigned char b) {
  **bs = b;
  *bs += 1;
}


x86 assembly (clang, -O0):
<mc_bitstream_write_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_bitstream_write_byte>:
mov    (%rdi),%rax
mov    %sil,(%rax)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @mc_bitstream_write_byte(i8** %0, i8 zeroext %1) {
%3 = alloca i8**
%4 = alloca i8
store i8** %0, i8*** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8 %5, i8* %7
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %8
ret void
}

LLVM IR (-O2):
define void @mc_bitstream_write_byte(i8** nocapture %0, i8 zeroext %1) {
%3 = load i8*, i8** %0
store i8 %1, i8* %3
%4 = load i8*, i8** %0
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %0
ret void
}
/* Variables and functions */
int rmdir(char const *);
int RemoveDir(const char *pathname) { return rmdir(pathname); }


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

x86 assembly (clang, -O2):
<RemoveDir>:
jmp    1030 <rmdir@plt>

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

LLVM IR (-O2):
define i32 @RemoveDir(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
ret i32 %2
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int define_output_file(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(19, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<define_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x13,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<define_output_file>:
mov    $0x13,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @define_output_file() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 19, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @define_output_file() {
%1 = tail call i32 @_ada_use_c2phc(i32 19, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
double fabs(double x) {
  if (x < 0.0)
    return -x;
  return x;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113d <fabs+0x3d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1147 <fabs+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
void append_string(char **dest, char *src) {
  int dest_len = strlen(*dest), src_len = strlen(src);
  *dest = realloc(*dest, (dest_len + src_len + 1) * sizeof(char));
  strcpy(*dest + dest_len, src);
}


x86 assembly (clang, -O0):
<append_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   1050 <realloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_string>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <strlen@plt>
mov    %eax,%r15d
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    (%rbx),%rdi
lea    (%r15,%rax,1),%esi
add    $0x1,%esi
call   1050 <realloc@plt>
mov    %rax,(%rbx)
movslq %r15d,%rdi
add    %rax,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @append_string(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %3
store i8* %1, i8** %4
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
store i32 %11, i32* %6
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = add nsw i32 %14, %15
%17 = add nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = mul i64 %18, 1
%20 = trunc i64 %19 to i32
%21 = call i8* @realloc(i8* %13, i32 %20)
%22 = load i8**, i8*** %3
store i8* %21, i8** %22
%23 = load i8**, i8*** %3
%24 = load i8*, i8** %23
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
%28 = load i8*, i8** %4
%29 = call i32 @strcpy(i8* %27, i8* %28)
ret void
}

LLVM IR (-O2):
define void @append_string(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @strlen(i8* %3)
%5 = tail call i32 @strlen(i8* %1)
%6 = load i8*, i8** %0
%7 = add i32 %4, 1
%8 = add i32 %7, %5
%9 = tail call i8* @realloc(i8* %6, i32 %8)
store i8* %9, i8** %0
%10 = sext i32 %4 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
%12 = tail call i32 @strcpy(i8* %11, i8* %1)
ret void
}
/* Variables and functions */
int getc(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int getchar() { return getc(stdin); }


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <getc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <getc@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @getchar() {
%1 = load i32, i32* @stdin
%2 = call i32 @getc(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @getchar() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @getc(i32 %1)
ret i32 %2
}
/* Variables and functions */
unsigned int external(unsigned int);
int recursive(unsigned int);
int recursive_helper(unsigned int c) {
  unsigned int local = external(c);
  return recursive(local / 2);
}


x86 assembly (clang, -O0):
<recursive_helper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <external@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
shr    $0x1,%edi
call   1040 <recursive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursive_helper>:
push   %rax
call   1030 <external@plt>
shr    %eax
mov    %eax,%edi
pop    %rax
jmp    1040 <recursive@plt>

LLVM IR (-O0):
define i32 @recursive_helper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @external(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = udiv i32 %6, 2
%8 = call i32 @recursive(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @recursive_helper(i32 %0) {
%2 = tail call i32 @external(i32 %0)
%3 = lshr i32 %2, 1
%4 = tail call i32 @recursive(i32 %3)
ret i32 %4
}
/* Variables and functions */
void *__builtin_arm_rsrp(char *);
void *rsrp_1() { return __builtin_arm_rsrp("sysreg"); }


x86 assembly (clang, -O0):
<rsrp_1>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <__builtin_arm_rsrp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsrp_1>:
lea    0xee9(%rip),%rdi
jmp    1030 <__builtin_arm_rsrp@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"sysreg\00"
define i8* @rsrp_1() {
%1 = call i8* @__builtin_arm_rsrp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [7 x i8] c"sysreg\00"
define i8* @rsrp_1() {
%1 = tail call i8* @__builtin_arm_rsrp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
extern void garray_destroy(void **vpp) {
  free(*vpp);
  free(vpp);
}


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

x86 assembly (clang, -O2):
<garray_destroy>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @garray_destroy(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = bitcast i8* %4 to i8**
%6 = call i32 @free(i8** %5)
%7 = load i8**, i8*** %2
%8 = call i32 @free(i8** %7)
ret void
}

LLVM IR (-O2):
define void @garray_destroy(i8** nocapture %0) {
%2 = bitcast i8** %0 to i8***
%3 = load i8**, i8*** %2
%4 = tail call i32 @free(i8** %3)
%5 = tail call i32 @free(i8** %0)
ret void
}
char *langRomTypeBunsetsu() { return "Bunsetsu"; }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"Bunsetsu\00"
define i8* @langRomTypeBunsetsu() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ addstr(char const *);
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ print_current_flags();
void error(const char *msg) {
  move(4, 0);
  clrtoeol();
  addstr(msg);
  print_current_flags();
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
xor    %esi,%esi
call   1060 <move@plt>
mov    $0x0,%al
call   1040 <clrtoeol@plt>
mov    -0x8(%rbp),%rdi
call   1050 <addstr@plt>
mov    $0x0,%al
call   1030 <print_current_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
xor    %esi,%esi
call   1060 <move@plt>
xor    %eax,%eax
call   1040 <clrtoeol@plt>
mov    %rbx,%rdi
call   1050 <addstr@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <print_current_flags@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @move(i32 4, i32 0)
%4 = call i32 (...) @clrtoeol()
%5 = load i8*, i8** %2
%6 = call i32 @addstr(i8* %5)
%7 = call i32 (...) @print_current_flags()
ret void
}

LLVM IR (-O2):
define void @error(i8* %0) {
%2 = tail call i32 @move(i32 4, i32 0)
%3 = tail call i32 (...) @clrtoeol()
%4 = tail call i32 @addstr(i8* %0)
%5 = tail call i32 (...) @print_current_flags()
ret void
}
double f4_cb_send_pre_double_int(double (*cb)(double, int)) {
  int r = 44;
  return cb(8.25, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_double_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2c,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
movsd  0xee6(%rip),%xmm0
call   *%rax
movsd  0xed4(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_double_int>:
push   %rax
mov    %rdi,%rax
movsd  0xef4(%rip),%xmm0
mov    $0x2c,%edi
call   *%rax
addsd  0xeed(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_double_int(double (double, i32)* %0) {
%2 = alloca double (double, i32)*
%3 = alloca i32
store double (double, i32)* %0, double (double, i32)** %2
store i32 44, i32* %3
%4 = load double (double, i32)*, double (double, i32)** %2
%5 = load i32, i32* %3
%6 = call double %4(double 8.250000e+00, i32 %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_double_int(double (double, i32)* nocapture %0) {
%2 = tail call double %0(double 8.250000e+00, i32 44)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ xz(char *);
void cw_decode_region(void) { xz("cw_decode_region(do nothing)"); }


x86 assembly (clang, -O0):
<cw_decode_region>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <xz@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cw_decode_region>:
lea    0xee9(%rip),%rdi
jmp    1030 <xz@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"cw_decode_region(do nothing)\00"
define void @cw_decode_region() {
%1 = call i32 @xz(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"cw_decode_region(do nothing)\00"
define void @cw_decode_region() {
%1 = tail call i32 @xz(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
void sigint(int signo) {}


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

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

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

LLVM IR (-O2):
define void @sigint(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bryanj17() { printf("Will Bryan likes Pizza."); }


x86 assembly (clang, -O0):
<bryanj17>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bryanj17>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Will Bryan likes Pizza.\00"
define void @bryanj17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Will Bryan likes Pizza.\00"
define void @bryanj17() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void free_vector(double *v, int nl, int nh) { free((v + nl)); }


x86 assembly (clang, -O0):
<free_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_vector>:
movslq %esi,%rax
lea    (%rdi,%rax,8),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_vector(double* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds double, double* %0, i64 %4
%6 = tail call i32 @free(double* %5)
ret void
}
int m32r_cannot_store_register(int regno) { return (regno >= 25); }


x86 assembly (clang, -O0):
<m32r_cannot_store_register>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x19,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m32r_cannot_store_register>:
xor    %eax,%eax
cmp    $0x19,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @m32r_cannot_store_register(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 25
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @m32r_cannot_store_register(i32 %0) {
%2 = icmp sgt i32 %0, 24
%3 = zext i1 %2 to i32
ret i32 %3
}
int test_imm_64int8_reg(signed char val) {
  return ((val) & (0x64 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_64int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x64,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_64int8_reg>:
test   $0x64,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_64int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 100
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_64int8_reg(i8 signext %0) {
%2 = and i8 %0, 100
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}