xunge/DecIR huggingface dataset:
int min2(int a, int b) { return (a > b) ? b : a; }


x86 assembly (clang, -O0):
<min2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <min2+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min2+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min2>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min2(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ ERR_unload_GMP_strings();
int e_gmp_destroy(ENGINE *e) {
  ERR_unload_GMP_strings();
  return 1;
}


x86 assembly (clang, -O0):
<e_gmp_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ERR_unload_GMP_strings@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_gmp_destroy>:
push   %rax
xor    %eax,%eax
call   1030 <ERR_unload_GMP_strings@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @e_gmp_destroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @ERR_unload_GMP_strings()
ret i32 1
}

LLVM IR (-O2):
define i32 @e_gmp_destroy(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @ERR_unload_GMP_strings()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ DAC_ISR();
int /*<<< orphan*/ TIM6_ISR();
void DAC_TIM6_ISR(void) {
  DAC_ISR();
  TIM6_ISR();
}


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

x86 assembly (clang, -O2):
<DAC_TIM6_ISR>:
push   %rax
xor    %eax,%eax
call   1040 <DAC_ISR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <TIM6_ISR@plt>

LLVM IR (-O0):
define void @DAC_TIM6_ISR() {
%1 = call i32 (...) @DAC_ISR()
%2 = call i32 (...) @TIM6_ISR()
ret void
}

LLVM IR (-O2):
define void @DAC_TIM6_ISR() {
%1 = tail call i32 (...) @DAC_ISR()
%2 = tail call i32 (...) @TIM6_ISR()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void lms_usage(void) {
  printf("Lightweight Monitoring Service (LMS) options:\n"
         " --lms\n"
         "      select LMS application.\n"
         " --lms-interval=<ms>\n"
         "      specify observation interval in mili-seconds.\n"
         " --lms-loose=<count>\n"
         "      specify loose count of hidden process detection.\n"
         " --init-task=<addr>\n"
         "      specify kernel virtual address of init_task.\n"
         " --per-cpu-rq=<addr>\n"
         "      specify kernel virtual address of per_cpu__runqueues.\n"
         " --ps-loop\n"
         "      show the process list of target OS for system debugging.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [459 x i8] c"Lightweight Monitoring Service (LMS) options:\0A --lms\0A select LMS application.\0A --lms-interval=<ms>\0A specify observation interval in mili-seconds.\0A --lms-loose=<count>\0A specify loose count of hidden process detection.\0A --init-task=<addr>\0A specify kernel virtual address of init_task.\0A --per-cpu-rq=<addr>\0A specify kernel virtual address of per_cpu__runqueues.\0A --ps-loop\0A show the process list of target OS for system debugging.\0A\00"
define void @lms_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([459 x i8], [459 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [458 x i8] c"Lightweight Monitoring Service (LMS) options:\0A --lms\0A select LMS application.\0A --lms-interval=<ms>\0A specify observation interval in mili-seconds.\0A --lms-loose=<count>\0A specify loose count of hidden process detection.\0A --init-task=<addr>\0A specify kernel virtual address of init_task.\0A --per-cpu-rq=<addr>\0A specify kernel virtual address of per_cpu__runqueues.\0A --ps-loop\0A show the process list of target OS for system debugging.\00"
define void @lms_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([458 x i8], [458 x i8]* @str, i64 0, i64 0))
ret void
}
void proc3() {}


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

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

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

LLVM IR (-O2):
define void @proc3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
main(void) {
  int intVal;
  short shVal;
  char chVal;
  char *cPtr;
  cPtr = (char *)&intVal;
  *cPtr = 126;
  printf("intVal = %d\n", intVal);
  cPtr = (char *)&shVal;
  *cPtr = 100;
  printf("shVal = %d\n", shVal);
  cPtr = &chVal;
  *cPtr = 10;
  printf("chVal = %d\n", chVal);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x7e,(%rax)
mov    -0x4(%rbp),%eax
lea    0xecf(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    -0x6(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x64,(%rax)
mov    -0x6(%rbp),%ax
lea    0xeba(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    -0x7(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0xa,(%rax)
lea    0xea8(%rip),%rdi
movsbl -0x7(%rbp),%esi
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    $0x7e,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"intVal = %d\0A\00"
@.str.1 = [12 x i8] c"shVal = %d\0A\00"
@.str.2 = [12 x i8] c"chVal = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i8
%4 = alloca i8*
%5 = bitcast i32* %1 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %4
store i8 126, i8* %6
%7 = load i32, i32* %1
%8 = trunc i32 %7 to i8
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %8)
%10 = bitcast i16* %2 to i8*
store i8* %10, i8** %4
%11 = load i8*, i8** %4
store i8 100, i8* %11
%12 = load i16, i16* %2
%13 = trunc i16 %12 to i8
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext %13)
store i8* %3, i8** %4
%15 = load i8*, i8** %4
store i8 10, i8* %15
%16 = load i8, i8* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8 signext %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"intVal = %d\0A\00"
@.str.1 = [12 x i8] c"shVal = %d\0A\00"
@.str.2 = [12 x i8] c"chVal = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext 126)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext 100)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8 signext 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: dada [-c columns] [-d delimiter] [-s size] [-v]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: dada [-c columns] [-d delimiter] [-s size] [-v]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: dada [-c columns] [-d delimiter] [-s size] [-v]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
double JHKeyframeAnimationFunctionEaseInQuad(double t, double b, double c,
                                             double d) {
  return c * (t /= d) * t + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseInQuad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,-0x8(%rbp)
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseInQuad>:
divsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionEaseInQuad(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = load double, double* %8
%11 = load double, double* %5
%12 = fdiv double %11, %10
store double %12, double* %5
%13 = fmul double %9, %12
%14 = load double, double* %5
%15 = load double, double* %6
%16 = call double @llvm.fmuladd.f64(double %13, double %14, double %15)
ret double %16
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionEaseInQuad(double %0, double %1, double %2, double %3) {
%5 = fdiv double %0, %3
%6 = fmul double %5, %2
%7 = tail call double @llvm.fmuladd.f64(double %6, double %5, double %1)
ret double %7
}
int move(__attribute__((unused)) const char *source,
         __attribute__((unused)) const char *target) {
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @move(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ abs(int);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
void main() {
  int y = 4;
  print("y 4");
  printid(y);
  y += abs(-4);
  print("y 8");
  printid(y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <print@plt>
mov    -0x4(%rbp),%edi
call   1050 <printid@plt>
mov    $0xfffffffc,%edi
call   1030 <abs@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
lea    0xe93(%rip),%rdi
call   1040 <print@plt>
mov    -0x4(%rbp),%edi
call   1050 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <print@plt>
mov    $0x4,%edi
call   1050 <printid@plt>
mov    $0xfffffffc,%edi
call   1030 <abs@plt>
lea    0x4(%rax),%ebx
lea    0xea9(%rip),%rdi
call   1040 <print@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <printid@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"y 4\00"
@.str.1 = [4 x i8] c"y 8\00"
define void @main() {
%1 = alloca i32
store i32 4, i32* %1
%2 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
%4 = call i32 @printid(i32 %3)
%5 = call i64 @abs(i32 -4)
%6 = load i32, i32* %1
%7 = sext i32 %6 to i64
%8 = add nsw i64 %7, %5
%9 = trunc i64 %8 to i32
store i32 %9, i32* %1
%10 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = call i32 @printid(i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"y 4\00"
@.str.1 = [4 x i8] c"y 8\00"
define void @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 4)
%3 = tail call i64 @abs(i32 -4)
%4 = trunc i64 %3 to i32
%5 = add i32 %4, 4
%6 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @printid(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MF_todirname(char *, int);
int /*<<< orphan*/ readlink(char *, char *, int);
void MF_getdir(char *input, int inputlength) {
  readlink("/proc/self/exe", input, inputlength);
  MF_todirname(input, inputlength);
}


x86 assembly (clang, -O0):
<MF_getdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <readlink@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <MF_todirname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MF_getdir>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <readlink@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <MF_todirname@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"/proc/self/exe\00"
define void @MF_getdir(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 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @MF_todirname(i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"/proc/self/exe\00"
define void @MF_getdir(i8* %0, i32 %1) {
%3 = tail call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 @MF_todirname(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_error0();
void test3(int x, int y) {
  if ((x < y) && (y < x))
    link_error0();
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113d <test3+0x2d>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    113d <test3+0x2d>
mov    $0x0,%al
call   1030 <link_error0@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test3(i32 %0, i32 %1) {
ret void
}
const char *plugin_api_info_dogechat_site_cb(void *data, const char *info_name,
                                             const char *arguments) {
  (void)data;
  (void)info_name;
  (void)arguments;
  return "https://dogechat.org/";
}


x86 assembly (clang, -O0):
<plugin_api_info_dogechat_site_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xee9(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"https://dogechat.org/\00"
define i8* @plugin_api_info_dogechat_site_cb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"https://dogechat.org/\00"
define i8* @plugin_api_info_dogechat_site_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
__attribute__((no)) void with_restrict(int *__restrict p) {
  int i;
  int *q = p - 1;
  for (i = 0; i < 1000; ++i) {
    p[i] = q[i];
  }
}


x86 assembly (clang, -O0):
<with_restrict>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    114c <with_restrict+0x4c>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111b <with_restrict+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<with_restrict>:
mov    -0x4(%rdi),%eax
mov    $0x7,%ecx
nopl   0x0(%rax,%rax,1)
mov    %eax,-0x1c(%rdi,%rcx,4)
mov    %eax,-0x18(%rdi,%rcx,4)
mov    %eax,-0x14(%rdi,%rcx,4)
mov    %eax,-0x10(%rdi,%rcx,4)
mov    %eax,-0xc(%rdi,%rcx,4)
mov    %eax,-0x8(%rdi,%rcx,4)
mov    %eax,-0x4(%rdi,%rcx,4)
mov    %eax,(%rdi,%rcx,4)
add    $0x8,%rcx
cmp    $0x3ef,%rcx
jne    1110 <with_restrict+0x10>
ret

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

LLVM IR (-O2):
define void @with_restrict(i32* noalias nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 -1
%3 = load i32, i32* %2
br label %4
4: ; preds = %4, %1
%5 = phi i64 [ 0, %1 ], [ %21, %4 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %3, i32* %6
%7 = or i64 %5, 1
%8 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %3, i32* %8
%9 = or i64 %5, 2
%10 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %3, i32* %10
%11 = or i64 %5, 3
%12 = getelementptr inbounds i32, i32* %0, i64 %11
store i32 %3, i32* %12
%13 = or i64 %5, 4
%14 = getelementptr inbounds i32, i32* %0, i64 %13
store i32 %3, i32* %14
%15 = or i64 %5, 5
%16 = getelementptr inbounds i32, i32* %0, i64 %15
store i32 %3, i32* %16
%17 = or i64 %5, 6
%18 = getelementptr inbounds i32, i32* %0, i64 %17
store i32 %3, i32* %18
%19 = or i64 %5, 7
%20 = getelementptr inbounds i32, i32* %0, i64 %19
store i32 %3, i32* %20
%21 = add nuw nsw i64 %5, 8
%22 = icmp eq i64 %21, 1000
br i1 %22, label %23, label %4
23: ; preds = %4
ret void
}
float roundFloat(float f) {
  static double r[2] = {0.0005, -0.0005};
  return (0.001f *
          (int)(((double)f + r[((int)((*(long *)(&f) & 0x80000000L) >> 31))]) *
                1000.0));
}


x86 assembly (clang, -O0):
<roundFloat>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movabs $0x80000000,%rax
and    -0x4(%rbp),%rax
sar    $0x1f,%rax
movslq %eax,%rcx
lea    0x2f02(%rip),%rax
addsd  (%rax,%rcx,8),%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
cvtsi2ss %eax,%xmm1
movss  0xeb1(%rip),%xmm0
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundFloat>:
movss  %xmm0,-0x8(%rsp)
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rsp),%rax
shr    $0x1c,%rax
and    $0x8,%eax
lea    0xef3(%rip),%rcx
addsd  (%rax,%rcx,1),%xmm0
mulsd  0xed6(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
mulss  0xecf(%rip),%xmm0
ret

LLVM IR (-O0):
@roundFloat.r = internal global [2 x double] [double 5.000000e-04, double -5.000000e-04]
define float @roundFloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = bitcast float* %2 to i64*
%6 = load i64, i64* %5
%7 = and i64 %6, 2147483648
%8 = ashr i64 %7, 31
%9 = trunc i64 %8 to i32
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [2 x double], [2 x double]* @roundFloat.r, i64 0, i64 %10
%12 = load double, double* %11
%13 = fadd double %4, %12
%14 = fmul double %13, 1.000000e+03
%15 = fptosi double %14 to i32
%16 = sitofp i32 %15 to float
%17 = fmul float 0x3F50624DE0000000, %16
ret float %17
}

LLVM IR (-O2):
@roundFloat.r = internal unnamed_addr constant [2 x double] [double 5.000000e-04, double -5.000000e-04]
define float @roundFloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = fpext float %0 to double
%4 = bitcast float* %2 to i64*
%5 = load i64, i64* %4
%6 = lshr i64 %5, 31
%7 = and i64 %6, 1
%8 = getelementptr inbounds [2 x double], [2 x double]* @roundFloat.r, i64 0, i64 %7
%9 = load double, double* %8
%10 = fadd double %9, %3
%11 = fmul double %10, 1.000000e+03
%12 = fptosi double %11 to i32
%13 = sitofp i32 %12 to float
%14 = fmul float %13, 0x3F50624DE0000000
ret float %14
}
int silnia(int a) {
  if (a == 1) {
    return 1;
  }
  if (a > 1) {
    return silnia(a - 1) * a;
  }
}


x86 assembly (clang, -O0):
<silnia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <silnia+0x21>
movl   $0x1,-0x4(%rbp)
jmp    114d <silnia+0x3d>
cmpl   $0x1,-0x8(%rbp)
jle    114d <silnia+0x3d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <silnia@plt>
imul   -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<silnia>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1122 <silnia+0x22>
mov    $0x1,%eax
nop
cmp    $0x2,%edi
jl     1122 <silnia+0x22>
imul   %edi,%eax
lea    -0x1(%rdi),%ecx
mov    %ecx,%edi
cmp    $0x1,%ecx
jne    1110 <silnia+0x10>
ret

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

LLVM IR (-O2):
define i32 @silnia(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ %0, %1 ]
%5 = phi i32 [ %9, %7 ], [ 1, %1 ]
%6 = icmp sgt i32 %4, 1
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = add nsw i32 %4, -1
%9 = mul nsw i32 %4, %5
%10 = icmp eq i32 %8, 1
br i1 %10, label %11, label %3
11: ; preds = %3, %7, %1
%12 = phi i32 [ 1, %1 ], [ %9, %7 ], [ %5, %3 ]
ret i32 %12
}
int IsWhiteSpace(char c) {
  switch (c) {
  case ' ':
  case '\t':
  case '\n':
  case '\r':
    return 1;
  default:
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<IsWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1144 <IsWhiteSpace+0x44>
jmp    1122 <IsWhiteSpace+0x22>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     1144 <IsWhiteSpace+0x44>
jmp    1133 <IsWhiteSpace+0x33>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1150 <IsWhiteSpace+0x50>
jmp    1144 <IsWhiteSpace+0x44>
movl   $0x1,-0x4(%rbp)
jmp    1157 <IsWhiteSpace+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsWhiteSpace>:
cmp    $0x20,%edi
ja     111d <IsWhiteSpace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111d <IsWhiteSpace+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @IsWhiteSpace(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 32, label %6
i32 9, label %6
i32 10, label %6
i32 13, label %6
]
6: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @IsWhiteSpace(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 32, label %4
i32 9, label %4
i32 10, label %4
i32 13, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int);
void restore_redirection(int *fd) {
  dup2(fd[0], 0);
  close(fd[0]);
  dup2(fd[1], 1);
  close(fd[1]);
}


x86 assembly (clang, -O0):
<restore_redirection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <dup2@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_redirection>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
xor    %esi,%esi
call   1030 <dup2@plt>
mov    (%rbx),%edi
call   1040 <close@plt>
mov    0x4(%rbx),%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    0x4(%rbx),%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
define void @restore_redirection(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = call i32 @dup2(i32 %5, i32 0)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = call i32 @close(i32 %9)
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = call i32 @dup2(i32 %13, i32 1)
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = call i32 @close(i32 %17)
ret void
}

LLVM IR (-O2):
define void @restore_redirection(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @dup2(i32 %2, i32 0)
%4 = load i32, i32* %0
%5 = tail call i32 @close(i32 %4)
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 @dup2(i32 %7, i32 1)
%9 = load i32, i32* %6
%10 = tail call i32 @close(i32 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ avalanche64(int /*<<< orphan*/, int /*<<< orphan*/);
uint64_t hash_integer(const void *in) { return avalanche64((uint64_t)in, 0); }


x86 assembly (clang, -O0):
<hash_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <avalanche64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_integer>:
xor    %esi,%esi
jmp    1030 <avalanche64@plt>

LLVM IR (-O0):
define i32 @hash_integer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i32 @avalanche64(i32 %4, i32 0)
ret i32 %5
}

LLVM IR (-O2):
define i32 @hash_integer(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @avalanche64(i32 %3, i32 0)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ BLKDISCARD;
scalar_t__ ioctl(int, int /*<<< orphan*/, scalar_t__ *);
int /*<<< orphan*/ perror(char *);
bool dbz_discard(int fd, uint64_t *range) {
  bool ret = false;
  if (range[1] != 0 && ioctl(fd, BLKDISCARD, range) != 0) {
    perror("ioctl(BLKDISCARD)");
    goto fail;
  }
  ret = true;
fail:
  return ret;
}


x86 assembly (clang, -O0):
<dbz_discard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     1175 <dbz_discard+0x55>
mov    -0x4(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
je     1175 <dbz_discard+0x55>
lea    0xe95(%rip),%rdi
call   1040 <perror@plt>
jmp    117c <dbz_discard+0x5c>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbz_discard>:
push   %rbx
mov    $0x1,%ebx
cmpq   $0x0,0x8(%rsi)
je     1143 <dbz_discard+0x23>
mov    %rsi,%rdx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
test   %rax,%rax
jne    1147 <dbz_discard+0x27>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
xor    %ebx,%ebx
jmp    1143 <dbz_discard+0x23>

LLVM IR (-O0):
@BLKDISCARD = global i32 0
@.str = [18 x i8] c"ioctl(BLKDISCARD)\00"
define i32 @dbz_discard(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
store i32 0, i32* %5
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i32, i32* @BLKDISCARD
%13 = load i64*, i64** %4
%14 = call i64 @ioctl(i32 %11, i32 %12, i64* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %19
18: ; preds = %10, %2
store i32 1, i32* %5
br label %19
19: ; preds = %18, %16
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@BLKDISCARD = global i32 0
@.str = [18 x i8] c"ioctl(BLKDISCARD)\00"
define i32 @dbz_discard(i32 %0, i64* %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 1
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = load i32, i32* @BLKDISCARD
%8 = tail call i64 @ioctl(i32 %0, i32 %7, i64* %1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %2, %6, %10
%13 = phi i32 [ 0, %10 ], [ 1, %6 ], [ 1, %2 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hugo_scrollwindowup() { printf("\n"); }


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

x86 assembly (clang, -O2):
<hugo_scrollwindowup>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @hugo_scrollwindowup() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void reverseString(char *str) {
  if (*str) {
    reverseString(str + 1);
    putchar(*str);
  }
}


x86 assembly (clang, -O0):
<reverseString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <reverseString+0x32>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1040 <reverseString@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseString>:
push   %rbx
cmpb   $0x0,(%rdi)
je     113b <reverseString+0x1b>
mov    %rdi,%rbx
add    $0x1,%rdi
call   1040 <reverseString@plt>
movsbl (%rbx),%edi
pop    %rbx
jmp    1030 <putchar@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @reverseString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret void
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
tail call void @reverseString(i8* %6)
%7 = load i8, i8* %0
%8 = tail call i32 @putchar(i8 signext %7)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/lkwg82/h2o/refs/heads/master/"
               "include/h2o/h2o/memory.h"
               ":"
               "350"
               ":"
               "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <h2o_mem_alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/lkwg82/h2o/refs/heads/master/include/h2o/h2o/memory.h:350:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/lkwg82/h2o/refs/heads/master/include/h2o/h2o/memory.h:350:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
unsigned int _blsmsk_u32(unsigned int);
unsigned int test_blsmsk_u32(unsigned int __X) { return _blsmsk_u32(__X); }


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

x86 assembly (clang, -O2):
<test_blsmsk_u32>:
jmp    1030 <_blsmsk_u32@plt>

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

LLVM IR (-O2):
define i32 @test_blsmsk_u32(i32 %0) {
%2 = tail call i32 @_blsmsk_u32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void rt_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<rt_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @rt_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ffsnd_fail(char *);
void *malloc(size_t);
void *realloc(void *, size_t);
void *ffsnd_nicerealloc(void *org, size_t size) {
  void *p;
  if (org)
    p = realloc(org, size);
  else
    p = malloc(size);
  if (!p)
    ffsnd_fail("Out of memory");
  return p;
}


x86 assembly (clang, -O0):
<ffsnd_nicerealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1161 <ffsnd_nicerealloc+0x31>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
jmp    116e <ffsnd_nicerealloc+0x3e>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1185 <ffsnd_nicerealloc+0x55>
lea    0xe80(%rip),%rdi
call   1050 <ffsnd_fail@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffsnd_nicerealloc>:
push   %rbx
test   %rdi,%rdi
je     113d <ffsnd_nicerealloc+0xd>
call   1040 <realloc@plt>
jmp    1145 <ffsnd_nicerealloc+0x15>
mov    %rsi,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1159 <ffsnd_nicerealloc+0x29>
lea    0xeac(%rip),%rdi
call   1050 <ffsnd_fail@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i8* @ffsnd_nicerealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i8* @realloc(i8* %9, i64 %10)
store i8* %11, i8** %5
br label %15
12: ; preds = %2
%13 = load i64, i64* %4
%14 = call i8* @malloc(i64 %13)
store i8* %14, i8** %5
br label %15
15: ; preds = %12, %8
%16 = load i8*, i8** %5
%17 = icmp ne i8* %16, null
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = call i32 @ffsnd_fail(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define i8* @ffsnd_nicerealloc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @realloc(i8* %0, i64 %1)
br label %8
6: ; preds = %2
%7 = tail call i8* @malloc(i64 %1)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %7, %6 ]
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @ffsnd_fail(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
ret i8* %9
}
void testAllUnreachableButDefault(int arg) {
  if (arg < 0) {
    switch (arg) {
    case 0 ... 9:
      clang_analyzer_warnIfReached();
      break;
    case 20 ... 0x7fffffff:
      clang_analyzer_warnIfReached();
      break;
    default:
      clang_analyzer_warnIfReached();
      break;
    case 16:
      clang_analyzer_warnIfReached();
    }
    clang_analyzer_warnIfReached();
  }
}


x86 assembly (clang, -O0):
<testAllUnreachableButDefault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    118d <testAllUnreachableButDefault+0x7d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xa,%eax
jb     114a <testAllUnreachableButDefault+0x3a>
jmp    1139 <testAllUnreachableButDefault+0x29>
mov    -0x8(%rbp),%eax
sub    $0x10,%eax
je     117f <testAllUnreachableButDefault+0x6f>
jmp    1162 <testAllUnreachableButDefault+0x52>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
jmp    1186 <testAllUnreachableButDefault+0x76>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
jmp    1186 <testAllUnreachableButDefault+0x76>
mov    -0x8(%rbp),%eax
sub    $0x14,%eax
cmp    $0x7fffffeb,%eax
jbe    1156 <testAllUnreachableButDefault+0x46>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
jmp    1186 <testAllUnreachableButDefault+0x76>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAllUnreachableButDefault>:
test   %edi,%edi
js     1115 <testAllUnreachableButDefault+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <clang_analyzer_warnIfReached@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <clang_analyzer_warnIfReached@plt>

LLVM IR (-O0):
define void @testAllUnreachableButDefault(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %20
5: ; preds = %1
%6 = load i32, i32* %2
switch i32 %6, label %11 [
i32 0, label %7
i32 1, label %7
i32 2, label %7
i32 3, label %7
i32 4, label %7
i32 5, label %7
i32 6, label %7
i32 7, label %7
i32 8, label %7
i32 9, label %7
i32 16, label %16
]
7: ; preds = %5, %5, %5, %5, %5, %5, %5, %5, %5, %5
%8 = call i32 (...) @clang_analyzer_warnIfReached()
br label %18
9: ; preds = %11
%10 = call i32 (...) @clang_analyzer_warnIfReached()
br label %18
11: ; preds = %5
%12 = sub i32 %6, 20
%13 = icmp ule i32 %12, 2147483627
br i1 %13, label %9, label %14
14: ; preds = %11
%15 = call i32 (...) @clang_analyzer_warnIfReached()
br label %18
16: ; preds = %5
%17 = call i32 (...) @clang_analyzer_warnIfReached()
br label %18
18: ; preds = %16, %14, %9, %7
%19 = call i32 (...) @clang_analyzer_warnIfReached()
br label %20
20: ; preds = %18, %1
ret void
}

LLVM IR (-O2):
define void @testAllUnreachableButDefault(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (...) @clang_analyzer_warnIfReached()
%5 = tail call i32 (...) @clang_analyzer_warnIfReached()
br label %6
6: ; preds = %3, %1
ret void
}
void SplitRGBRow_C() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void fputw(int n, FILE *fp) {
  char *a;
  int i;
  a = (char *)&n;
  for (i = 0; i < 2; i++) {
    fputc(a[i], fp);
  }
}


x86 assembly (clang, -O0):
<fputw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x2,-0x1c(%rbp)
jge    115d <fputw+0x4d>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <fputc@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <fputw+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputw>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
shr    $0x8,%ebp
movsbl %dil,%edi
call   1030 <fputc@plt>
movsbl %bpl,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define void @fputw(i32 %0, i32* nocapture %1) {
%3 = trunc i32 %0 to i8
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = tail call i32 @fputc(i8 signext %3, i32* %1)
%7 = tail call i32 @fputc(i8 signext %5, i32* %1)
ret void
}
int isfsync(isfd)
int isfd;
{ return iscntl(isfd, 9); }


x86 assembly (clang, -O0):
<isfsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
mov    $0x0,%al
call   1030 <iscntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isfsync>:
mov    $0x9,%esi
xor    %eax,%eax
jmp    1030 <iscntl@plt>

LLVM IR (-O0):
define i32 @isfsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @iscntl to i32 (i32, i32, ...)*)(i32 %3, i32 9)
ret i32 %4
}

LLVM IR (-O2):
define i32 @isfsync(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @iscntl to i32 (i32, i32, ...)*)(i32 %0, i32 9)
ret i32 %2
}
int sni_eisa_root_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sni_eisa_root_init() {
ret i32 0
}
int compare(const void *first, const void *second) {
  return *(int *)first - *(int *)second;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
struct hostent {
  int dummy;
};

/* Variables and functions */
struct hostent *gethostbyname(char *);
int main() {
  struct hostent *h = gethostbyname("localhost");
  return h == NULL;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <gethostbyname@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <gethostbyname@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@.str = [10 x i8] c"localhost\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.hostent*
store i32 0, i32* %1
%3 = call %struct.hostent* @gethostbyname(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store %struct.hostent* %3, %struct.hostent** %2
%4 = load %struct.hostent*, %struct.hostent** %2
%5 = icmp eq %struct.hostent* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@.str = [10 x i8] c"localhost\00"
define i32 @main() {
%1 = tail call %struct.hostent* @gethostbyname(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq %struct.hostent* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}