xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int fileSize(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
char *malloc(int);
char *fileContents(char *fname) {
  FILE *fp = fopen(fname, "r");
  int sz = fileSize(fp);
  char *buffer = malloc(sz);
  fread(buffer, sz, 1, fp);
  fclose(fp);
  return buffer;
}


x86 assembly (clang, -O0):
<fileContents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fileSize@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileContents>:
push   %rbp
push   %r14
push   %rbx
lea    0xea5(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <fileSize@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i8* @fileContents(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = call i32 @fileSize(i32* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = load i32, i32* %4
%14 = load i32*, i32** %3
%15 = call i32 @fread(i8* %12, i32 %13, i32 1, i32* %14)
%16 = load i32*, i32** %3
%17 = call i32 @fclose(i32* %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i8* @fileContents(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fileSize(i32* %2)
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @fread(i8* %4, i32 %3, i32 1, i32* %2)
%6 = tail call i32 @fclose(i32* %2)
ret i8* %4
}
float SnapToEights(float x) {
  x *= 8.0;
  if (x > 0.0)
    x += 0.5;
  else
    x -= 0.5;
  return 0.125 * (int)x;
}


x86 assembly (clang, -O0):
<SnapToEights>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <SnapToEights+0x60>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeba(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117e <SnapToEights+0x7e>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe97(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xe81(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SnapToEights>:
mulss  0xef8(%rip),%xmm0
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
lea    0xeee(%rip),%rcx
addss  (%rcx,%rax,4),%xmm0
cvttps2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
mulsd  0xee1(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @SnapToEights(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 8.000000e+00
%6 = fptrunc double %5 to float
store float %6, float* %2
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fcmp ogt double %8, 0.000000e+00
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fadd double %12, 5.000000e-01
%14 = fptrunc double %13 to float
store float %14, float* %2
br label %20
15: ; preds = %1
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = fsub double %17, 5.000000e-01
%19 = fptrunc double %18 to float
store float %19, float* %2
br label %20
20: ; preds = %15, %10
%21 = load float, float* %2
%22 = fptosi float %21 to i32
%23 = sitofp i32 %22 to double
%24 = fmul double 1.250000e-01, %23
%25 = fptrunc double %24 to float
ret float %25
}

LLVM IR (-O2):
define float @SnapToEights(float %0) {
%2 = fmul float %0, 8.000000e+00
%3 = fcmp ogt float %2, 0.000000e+00
%4 = select i1 %3, float 5.000000e-01, float -5.000000e-01
%5 = fadd float %2, %4
%6 = fptosi float %5 to i32
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 1.250000e-01
%9 = fptrunc double %8 to float
ret float %9
}
/* Variables and functions */
scalar_t__ check_if_palindrome(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int input;
  scanf("%d", &input);
  while (check_if_palindrome(input) != 0) {
    input++;
  }
  printf("%X", input);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <check_if_palindrome@plt>
cmp    $0x0,%rax
je     116f <main+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <main+0x1f>
mov    -0x8(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
cs nopw 0x0(%rax,%rax,1)
call   1050 <check_if_palindrome@plt>
test   %rax,%rax
je     1167 <main+0x37>
mov    0x4(%rsp),%edi
add    $0x1,%edi
mov    %edi,0x4(%rsp)
jmp    1150 <main+0x20>
mov    0x4(%rsp),%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%X\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = call i64 @check_if_palindrome(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%X\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @check_if_palindrome(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
%10 = call i64 @check_if_palindrome(i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %0
%13 = load i32, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pressAnyKeyToContinue();
int /*<<< orphan*/ printlnProjectName();
int /*<<< orphan*/ stdclrscr();
void displaySplashScreen(void) {
  stdclrscr();
  printlnProjectName();
  pressAnyKeyToContinue();
}


x86 assembly (clang, -O0):
<displaySplashScreen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <stdclrscr@plt>
mov    $0x0,%al
call   1030 <printlnProjectName@plt>
mov    $0x0,%al
call   1040 <pressAnyKeyToContinue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<displaySplashScreen>:
push   %rax
xor    %eax,%eax
call   1050 <stdclrscr@plt>
xor    %eax,%eax
call   1030 <printlnProjectName@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pressAnyKeyToContinue@plt>

LLVM IR (-O0):
define void @displaySplashScreen() {
%1 = call i32 (...) @stdclrscr()
%2 = call i32 (...) @printlnProjectName()
%3 = call i32 (...) @pressAnyKeyToContinue()
ret void
}

LLVM IR (-O2):
define void @displaySplashScreen() {
%1 = tail call i32 (...) @stdclrscr()
%2 = tail call i32 (...) @printlnProjectName()
%3 = tail call i32 (...) @pressAnyKeyToContinue()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int setuid(int);
int main() {
  int status = 0;
  setuid(1);
  if (setuid(0) != -1)
    status = 1;
  exit(status);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <setuid@plt>
xor    %edi,%edi
call   1040 <setuid@plt>
cmp    $0xffffffff,%eax
je     1157 <main+0x37>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <setuid@plt>
xor    %edi,%edi
call   1040 <setuid@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
setne  %dil
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @setuid(i32 1)
%4 = call i32 @setuid(i32 0)
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %2
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* %2
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @setuid(i32 1)
%2 = tail call i32 @setuid(i32 0)
%3 = icmp ne i32 %2, -1
%4 = zext i1 %3 to i32
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int access() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @access() {
ret i32 0
}
/* Variables and functions */
int detectPresence(char *);
int beepexePresent(void) {
  static int lBeepexePresent = -1;
  if (lBeepexePresent < 0) {
    lBeepexePresent = detectPresence("beep.exe");
  }
  return lBeepexePresent;
}


x86 assembly (clang, -O0):
<beepexePresent>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
jge    1133 <beepexePresent+0x23>
lea    0xed8(%rip),%rdi
call   1030 <detectPresence@plt>
mov    %eax,0x2ef5(%rip)
mov    0x2eef(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<beepexePresent>:
push   %rax
mov    0x2f11(%rip),%eax
test   %eax,%eax
js     111d <beepexePresent+0xd>
pop    %rcx
ret
lea    0xedc(%rip),%rdi
call   1030 <detectPresence@plt>
mov    %eax,0x2ef9(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@beepexePresent.lBeepexePresent = internal global i32 -1
@.str = [9 x i8] c"beep.exe\00"
define i32 @beepexePresent() {
%1 = load i32, i32* @beepexePresent.lBeepexePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @beepexePresent.lBeepexePresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @beepexePresent.lBeepexePresent
ret i32 %6
}

LLVM IR (-O2):
@beepexePresent.lBeepexePresent = internal unnamed_addr global i32 -1
@.str = [9 x i8] c"beep.exe\00"
define i32 @beepexePresent() {
%1 = load i32, i32* @beepexePresent.lBeepexePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @beepexePresent.lBeepexePresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ peasoup(int *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int *head;
  int turn;
  turn = 13;
  head = &turn;
  peasoup(head);
  printf("Oh nein, es ist %i!\n", *head);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <peasoup@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xd,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <peasoup@plt>
mov    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Oh nein, es ist %i!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
store i32 13, i32* %3
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @peasoup(i32* %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Oh nein, es ist %i!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 13, i32* %1
%3 = call i32 @peasoup(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void ath9k_exit_debug(struct ath_softc *sc) {}


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

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

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

LLVM IR (-O2):
%struct.ath_softc = type opaque
define void @ath9k_exit_debug(%struct.ath_softc* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disablePaging();
void pa_disable_paging() { disablePaging(); }


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

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

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

LLVM IR (-O2):
define void @pa_disable_paging() {
%1 = tail call i32 (...) @disablePaging()
ret void
}
int LightControllerSpy_GetLastID(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @LightControllerSpy_GetLastID() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int);
void DoTwoDup(void) { InlineWords(2, 18, 18); }


x86 assembly (clang, -O0):
<DoTwoDup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x12,%edx
mov    %edx,%esi
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoTwoDup>:
mov    $0x2,%edi
mov    $0x12,%esi
mov    $0x12,%edx
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoTwoDup() {
%1 = call i32 @InlineWords(i32 2, i32 18, i32 18)
ret void
}

LLVM IR (-O2):
define void @DoTwoDup() {
%1 = tail call i32 @InlineWords(i32 2, i32 18, i32 18)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void bar(int x) { printf("%d\n", x); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @bar(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int ima_bprm_check(struct linux_binprm *bprm) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.linux_binprm = type opaque
define i32 @ima_bprm_check(%struct.linux_binprm* nocapture readnone %0) {
ret i32 0
}
char *stpcpy(char *dst, const char *src) {
  while ((*dst++ = *src++) != '\0')
    ;
  return --dst;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <stpcpy+0x3f>
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %4
}
int *set42(int *x) {
  *x = 42;
  return x;
}


x86 assembly (clang, -O0):
<set42>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set42>:
mov    %rdi,%rax
movl   $0x2a,(%rdi)
ret

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

LLVM IR (-O2):
define i32* @set42(i32* returned writeonly %0) {
store i32 42, i32* %0
ret i32* %0
}
int C_Utils_compare_ulong_ptr(const unsigned long *item1,
                              const unsigned long *item2) {
  unsigned long i1 = *item1;
  unsigned long i2 = *item2;
  if (i1 == i2)
    return 0;
  return i1 < i2 ? -1 : 1;
}


x86 assembly (clang, -O0):
<C_Utils_compare_ulong_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    113c <C_Utils_compare_ulong_ptr+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1157 <C_Utils_compare_ulong_ptr+0x57>
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rsi
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovb  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Utils_compare_ulong_ptr>:
mov    (%rdi),%rax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%rax
setae  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @C_Utils_compare_ulong_ptr(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp eq i64 %3, %4
%6 = icmp ult i64 %3, %4
%7 = select i1 %6, i32 -1, i32 1
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_timeval_add() {
  printf("NOT IMPLEMENTED:"
         "pa_timeval_add"
         "\n");
}


x86 assembly (clang, -O0):
<pa_timeval_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_timeval_add\0A\00"
define i32 @pa_timeval_add() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_timeval_add\00"
define i32 @pa_timeval_add() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int find_seq(int);
int find_seq2(int);
int test_max_sequence() {
  int number = 0b0111001101111;
  return 7 == find_seq(number) && 7 == find_seq2(number);
}


x86 assembly (clang, -O0):
<test_max_sequence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xe6f,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <find_seq@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x7,%ecx
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
jne    1162 <test_max_sequence+0x42>
mov    -0x4(%rbp),%edi
call   1030 <find_seq2@plt>
mov    %eax,%ecx
mov    $0x7,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_max_sequence>:
push   %rax
mov    $0xe6f,%edi
call   1040 <find_seq@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x7,%ecx
jne    1148 <test_max_sequence+0x28>
mov    $0xe6f,%edi
call   1030 <find_seq2@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x7,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_max_sequence() {
%1 = alloca i32
store i32 3695, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @find_seq(i32 %2)
%4 = icmp eq i32 7, %3
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @find_seq2(i32 %6)
%8 = icmp eq i32 7, %7
br label %9
9: ; preds = %5, %0
%10 = phi i1 [ false, %0 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_max_sequence() {
%1 = tail call i32 @find_seq(i32 3695)
%2 = icmp eq i32 %1, 7
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @find_seq2(i32 3695)
%5 = icmp eq i32 %4, 7
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void scrub_password(char *password) { memset(password, '0', strlen(password)); }


x86 assembly (clang, -O0):
<scrub_password>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
mov    $0x30,%esi
call   1040 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrub_password>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    $0x30,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <memset@plt>

LLVM IR (-O0):
define void @scrub_password(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @memset(i8* %3, i32 48, i32 %5)
ret void
}

LLVM IR (-O2):
define void @scrub_password(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @memset(i8* %0, i32 48, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int, char *, char const *);
void ws_warning(const char *message) { error(-1, "warning", message); }


x86 assembly (clang, -O0):
<ws_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0xffffffff,%edi
lea    0xed4(%rip),%rsi
call   1030 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_warning>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0xffffffff,%edi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"warning\00"
define void @ws_warning(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @error(i32 -1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"warning\00"
define void @ws_warning(i8* %0) {
%2 = tail call i32 @error(i32 -1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void LOS_EvbUartReadByte(char *c) { return; }


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

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

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

LLVM IR (-O2):
define void @LOS_EvbUartReadByte(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int string_compare(void *s1, void *s2) {
  return strcmp((const char *)s1, (const char *)s2);
}


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

x86 assembly (clang, -O2):
<string_compare>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @string_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void dutch(const char *name) { printf("Hallo Wereld! Welkom, %s\n", name); }


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

x86 assembly (clang, -O2):
<dutch>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Hallo Wereld! Welkom, %s\0A\00"
define void @dutch(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Hallo Wereld! Welkom, %s\0A\00"
define void @dutch(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int HelpItem110(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem110() {
ret i32 0
}
void INQ_FLUSH(int fd) { 0; }


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

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

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

LLVM IR (-O2):
define void @INQ_FLUSH(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ n;

/* Variables and functions */
int __mp_logtwo(unsigned long);
unsigned long __mp_poweroftwo(unsigned long n) {
  if ((n == 0) || (((unsigned long)(n) > 0) &&
                   (((unsigned long)(n) & ((unsigned long)(n)-1)) == 0)))
    return n;
  return (unsigned long)(2 << __mp_logtwo(n));
}


x86 assembly (clang, -O0):
<__mp_poweroftwo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114b <__mp_poweroftwo+0x3b>
cmpq   $0x0,-0x10(%rbp)
jbe    1158 <__mp_poweroftwo+0x48>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
jne    1158 <__mp_poweroftwo+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <__mp_poweroftwo+0x60>
mov    -0x10(%rbp),%rdi
call   1030 <__mp_logtwo@plt>
mov    %eax,%ecx
mov    $0x2,%eax
shl    %cl,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mp_poweroftwo>:
test   %rdi,%rdi
je     118c <__mp_poweroftwo+0x7c>
mov    %rdi,%rax
shr    %rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rax,%rcx
mov    %rdi,%rax
sub    %rcx,%rax
movabs $0x3333333333333333,%rcx
33 33 33
mov    %rax,%rdx
and    %rcx,%rdx
shr    $0x2,%rax
and    %rcx,%rax
add    %rdx,%rax
mov    %rax,%rcx
shr    $0x4,%rcx
add    %rax,%rcx
movabs $0xf0f0f0f0f0f0f0f,%rax
0f 0f 0f
and    %rcx,%rax
movabs $0x101010101010101,%rcx
01 01 01
imul   %rax,%rcx
shr    $0x38,%rcx
cmp    $0x2,%ecx
jb     118c <__mp_poweroftwo+0x7c>
push   %rax
call   1030 <__mp_logtwo@plt>
mov    $0x2,%edx
mov    %eax,%ecx
shl    %cl,%edx
movslq %edx,%rdi
add    $0x8,%rsp
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @__mp_poweroftwo(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = load i64, i64* %3
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i64, i64* %3
%11 = load i64, i64* %3
%12 = sub i64 %11, 1
%13 = and i64 %10, %12
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %9, %1
%16 = load i64, i64* %3
store i64 %16, i64* %2
br label %22
17: ; preds = %9, %6
%18 = load i64, i64* %3
%19 = call i32 @__mp_logtwo(i64 %18)
%20 = shl i32 2, %19
%21 = sext i32 %20 to i64
store i64 %21, i64* %2
br label %22
22: ; preds = %17, %15
%23 = load i64, i64* %2
ret i64 %23
}

LLVM IR (-O2):
define i64 @__mp_poweroftwo(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = tail call i64 @llvm.ctpop.i64(i64 %0)
%4 = icmp ult i64 %3, 2
%5 = or i1 %2, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = tail call i32 @__mp_logtwo(i64 %0)
%8 = shl i32 2, %7
%9 = sext i32 %8 to i64
br label %10
10: ; preds = %1, %6
%11 = phi i64 [ %9, %6 ], [ %0, %1 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ curses_stop();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void bail(char *message) {
  curses_stop();
  fprintf(stderr, "%s\n", message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<bail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <curses_stop@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<bail>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <curses_stop@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @bail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @curses_stop()
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @bail(i8* %0) {
%2 = tail call i32 (...) @curses_stop()
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ start_server(char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 3) {
    fprintf(stderr,
            "Wrong argument count!\nUsage example: hashtable <host> <port>\n");
    return 1;
  }
  start_server(argv[1], argv[2]);
  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)
cmpl   $0x3,-0x8(%rbp)
je     1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    117d <main+0x5d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <start_server@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x3,%edi
jne    1137 <main+0x17>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <start_server@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Wrong argument count!\0AUsage example: hashtable <host> <port>\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 = icmp ne i32 %6, 3
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %19
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call i32 @start_server(i8* %14, i8* %17)
store i32 0, i32* %3
br label %19
19: ; preds = %11, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Wrong argument count!\0AUsage example: hashtable <host> <port>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
br label %13
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @start_server(i8* %9, i8* %11)
br label %13
13: ; preds = %7, %4
%14 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
int tdefault_ranged_break_num_registers(struct target_ops *self) { return -1; }


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

x86 assembly (clang, -O2):
<tdefault_ranged_break_num_registers>:
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define i32 @tdefault_ranged_break_num_registers(%struct.target_ops* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
int /*<<< orphan*/ setenv(char const *, char const *);
int /*<<< orphan*/ testprintenv();
void testsetenv(const char *name, const char *value) {
  printf("setenv (\"%s\", \"%s\"):\n", name, value);
  setenv(name, value);
  testprintenv();
}


x86 assembly (clang, -O0):
<testsetenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <setenv@plt>
mov    $0x0,%al
call   1050 <testprintenv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testsetenv>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <setenv@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <testprintenv@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"setenv (\22%s\22, \22%s\22):\0A\00"
define void @testsetenv(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 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @setenv(i8* %8, i8* %9)
%11 = call i32 (...) @testprintenv()
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"setenv (\22%s\22, \22%s\22):\0A\00"
define void @testsetenv(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 @setenv(i8* %0, i8* %1)
%5 = tail call i32 (...) @testprintenv()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int f1 = 1;
  int f2 = 2;
  int fs = 0;
  while (f1 < 4000000) {
    if (~f1 & 1)
      fs += f1;
    f2 += f1;
    f1 = f2 - f1;
  }
  printf("%d\n", fs);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3d0900,-0x8(%rbp)
jge    1173 <main+0x63>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     115c <main+0x4c>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0x10(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x466664,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %17, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 4000000
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i32, i32* %2
%10 = xor i32 %9, -1
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load i32, i32* %2
%15 = load i32, i32* %4
%16 = add nsw i32 %15, %14
store i32 %16, i32* %4
br label %17
17: ; preds = %13, %8
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = add nsw i32 %19, %18
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = sub nsw i32 %21, %22
store i32 %23, i32* %2
br label %5
24: ; preds = %5
%25 = load i32, i32* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4613732)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getx();
int /*<<< orphan*/ setx();
main() {
  setx();
  getx();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setx@plt>
mov    $0x0,%al
call   1030 <getx@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <setx@plt>
xor    %eax,%eax
call   1030 <getx@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @setx()
%2 = call i32 (...) @getx()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setx()
%2 = tail call i32 (...) @getx()
ret i32 0
}
void f30(void) {
  ({
    ({
      goto a;
    a:
      0;
    });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f30>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f30() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %0
store i32 0, i32* %1
%8 = load i32, i32* %1
store i32 0, i32* %2
%9 = load i32, i32* %2
store i32 0, i32* %3
%10 = load i32, i32* %3
store i32 0, i32* %4
%11 = load i32, i32* %4
store i32 0, i32* %5
%12 = load i32, i32* %5
store i32 0, i32* %6
%13 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @f30() {
ret void
}
void PrintError(char *str) {
  __ERROR_MESSAGE__(str,
                    "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/JoseCarlosFonseca/"
                    "DBSniffer/refs/heads/master/src/util.h",
                    417, __FUNCTION__);
}


x86 assembly (clang, -O0):
<PrintError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x1a1,%edx
lea    0xf60(%rip),%rcx
mov    $0x0,%al
call   1030 <__ERROR_MESSAGE__@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintError>:
lea    0xee9(%rip),%rsi
lea    0xf75(%rip),%rcx
mov    $0x1a1,%edx
xor    %eax,%eax
jmp    1030 <__ERROR_MESSAGE__@plt>

LLVM IR (-O0):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/JoseCarlosFonseca/DBSniffer/refs/heads/master/src/util.h\00"
@__FUNCTION__.PrintError = [11 x i8] c"PrintError\00"
define void @PrintError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__ERROR_MESSAGE__ to i32 (i8*, i8*, i32, i8*, ...)*)(i8* %3, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 417, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.PrintError, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [147 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/JoseCarlosFonseca/DBSniffer/refs/heads/master/src/util.h\00"
@__FUNCTION__.PrintError = [11 x i8] c"PrintError\00"
define void @PrintError(i8* %0) {
%2 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @__ERROR_MESSAGE__ to i32 (i8*, i8*, i32, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i32 417, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.PrintError, i64 0, i64 0))
ret void
}
/* Variables and functions */
float __ocml_y1_f32(float);
float y1f(float x) { return __ocml_y1_f32(x); }


x86 assembly (clang, -O0):
<y1f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__ocml_y1_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y1f>:
jmp    1030 <__ocml_y1_f32@plt>

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

LLVM IR (-O2):
define float @y1f(float %0) {
%2 = tail call float @__ocml_y1_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ uf_backtrack_one();
void uf_backtrack() { uf_backtrack_one(); }


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

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

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

LLVM IR (-O2):
define void @uf_backtrack() {
%1 = tail call i32 (...) @uf_backtrack_one()
ret void
}
/* Type definitions */
struct evhttp_request {
  int /*<<< orphan*/ input_buffer;
};

/* Variables and functions */
scalar_t__ pubsubclient_parse_one_message(int /*<<< orphan*/, void *);
void pubsubclient_source_callback(struct evhttp_request *req, void *arg) {
  while (pubsubclient_parse_one_message(req->input_buffer, arg)) {
  }
}


x86 assembly (clang, -O0):
<pubsubclient_source_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1030 <pubsubclient_parse_one_message@plt>
cmp    $0x0,%rax
je     113e <pubsubclient_source_callback+0x2e>
jmp    1120 <pubsubclient_source_callback+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pubsubclient_source_callback>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%edi
mov    %r14,%rsi
call   1030 <pubsubclient_parse_one_message@plt>
test   %rax,%rax
jne    1120 <pubsubclient_source_callback+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.evhttp_request = type { i32 }
define void @pubsubclient_source_callback(%struct.evhttp_request* %0, i8* %1) {
%3 = alloca %struct.evhttp_request*
%4 = alloca i8*
store %struct.evhttp_request* %0, %struct.evhttp_request** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %12, %2
%6 = load %struct.evhttp_request*, %struct.evhttp_request** %3
%7 = getelementptr inbounds %struct.evhttp_request, %struct.evhttp_request* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load i8*, i8** %4
%10 = call i64 @pubsubclient_parse_one_message(i32 %8, i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %5
br label %5
13: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.evhttp_request = type { i32 }
define void @pubsubclient_source_callback(%struct.evhttp_request* nocapture %0, i8* %1) {
%3 = getelementptr inbounds %struct.evhttp_request, %struct.evhttp_request* %0, i64 0, i32 0
br label %4
4: ; preds = %4, %2
%5 = load i32, i32* %3
%6 = tail call i64 @pubsubclient_parse_one_message(i32 %5, i8* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
ret void
}