xunge/DecIR huggingface dataset:
main() {
  int(*p)[2] = (int[][2]){1, 2, {3, 4, f()}};
  if (p[0][0] != 1 || p[0][1] != 2 || p[1][0] != 3 || p[1][1] != 4) {
    abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x4,-0x14(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    117a <main+0x6a>
mov    -0x10(%rbp),%rax
cmpl   $0x2,0x4(%rax)
jne    117a <main+0x6a>
mov    -0x10(%rbp),%rax
cmpl   $0x3,0x8(%rax)
jne    117a <main+0x6a>
mov    -0x10(%rbp),%rax
cmpl   $0x4,0xc(%rax)
je     117f <main+0x6f>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]*
%3 = alloca [2 x [2 x i32]]
store i32 0, i32* %1
%4 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 1, i32* %5
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 2, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 1
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 3, i32* %8
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 4, i32* %9
%10 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %3, i64 0, i64 0
store [2 x i32]* %10, [2 x i32]** %2
%11 = load [2 x i32]*, [2 x i32]** %2
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 0
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 0
%14 = load i32, i32* %13
%15 = icmp ne i32 %14, 1
br i1 %15, label %34, label %16
16: ; preds = %0
%17 = load [2 x i32]*, [2 x i32]** %2
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %17, i64 0
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %18, i64 0, i64 1
%20 = load i32, i32* %19
%21 = icmp ne i32 %20, 2
br i1 %21, label %34, label %22
22: ; preds = %16
%23 = load [2 x i32]*, [2 x i32]** %2
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %23, i64 1
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %24, i64 0, i64 0
%26 = load i32, i32* %25
%27 = icmp ne i32 %26, 3
br i1 %27, label %34, label %28
28: ; preds = %22
%29 = load [2 x i32]*, [2 x i32]** %2
%30 = getelementptr inbounds [2 x i32], [2 x i32]* %29, i64 1
%31 = getelementptr inbounds [2 x i32], [2 x i32]* %30, i64 0, i64 1
%32 = load i32, i32* %31
%33 = icmp ne i32 %32, 4
br i1 %33, label %34, label %35
34: ; preds = %28, %22, %16, %0
unreachable
35: ; preds = %28
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
main() { puts("Y = 3\nX=9"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"Y = 3\0AX=9\00"
define i32 @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Y = 3\0AX=9\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void license_notice(void) {
  printf("B-plus_tree version %s\n", "1.00");
  printf("This program comes with ABSOLUTELY NO WARRANTY; for details "
         "type `show w'.\n"
         "This is free software, and you are welcome to redistribute it\n"
         "under certain conditions; type `show c' for details.\n\n");
}


x86 assembly (clang, -O0):
<license_notice>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<license_notice>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"B-plus_tree version %s\0A\00"
@.str.1 = [5 x i8] c"1.00\00"
@.str.2 = [192 x i8] c"This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; type `show c' for details.\0A\0A\00"
define void @license_notice() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([192 x i8], [192 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"B-plus_tree version %s\0A\00"
@.str.1 = [5 x i8] c"1.00\00"
@str = [191 x i8] c"This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\0AThis is free software, and you are welcome to redistribute it\0Aunder certain conditions; type `show c' for details.\0A\00"
define void @license_notice() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([191 x i8], [191 x i8]* @str, i64 0, i64 0))
ret void
}
void CFGMR3InsertString(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3InsertString() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ si_pid;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_handler_usr1(int sig, siginfo_t *siginfo, void *context) {
  int pid = (int)siginfo->si_pid;
  printf("SIGUSR1: %d ", pid);
}


x86 assembly (clang, -O0):
<sig_handler_usr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
@.str = [13 x i8] c"SIGUSR1: %d \00"
define void @sig_handler_usr1(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%8 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
@.str = [13 x i8] c"SIGUSR1: %d \00"
define void @sig_handler_usr1(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_byte(int, int);
int /*<<< orphan*/ put_word(int, int);
__attribute__((always_)) void patch_CAS_3_6_0_546_extra(void) {
  put_word(0x100BEB6C, 0xE12FFF1E);
  put_byte(0x1008E157, 0xEA);
  put_word(0x10136418, 0xE12FFF1E);
}


x86 assembly (clang, -O0):
<patch_CAS_3_6_0_546_extra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100beb6c,%edi
mov    $0xe12fff1e,%esi
call   1040 <put_word@plt>
mov    $0x1008e157,%edi
mov    $0xea,%esi
call   1030 <put_byte@plt>
mov    $0x10136418,%edi
mov    $0xe12fff1e,%esi
call   1040 <put_word@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_CAS_3_6_0_546_extra>:
push   %rax
mov    $0x100beb6c,%edi
mov    $0xe12fff1e,%esi
call   1040 <put_word@plt>
mov    $0x1008e157,%edi
mov    $0xea,%esi
call   1030 <put_byte@plt>
mov    $0x10136418,%edi
mov    $0xe12fff1e,%esi
pop    %rax
jmp    1040 <put_word@plt>

LLVM IR (-O0):
define void @patch_CAS_3_6_0_546_extra() {
%1 = call i32 @put_word(i32 269216620, i32 -516948194)
%2 = call i32 @put_byte(i32 269017431, i32 234)
%3 = call i32 @put_word(i32 269706264, i32 -516948194)
ret void
}

LLVM IR (-O2):
define void @patch_CAS_3_6_0_546_extra() {
%1 = tail call i32 @put_word(i32 269216620, i32 -516948194)
%2 = tail call i32 @put_byte(i32 269017431, i32 234)
%3 = tail call i32 @put_word(i32 269706264, i32 -516948194)
ret void
}
/* Variables and functions */
double tan(double);
double f2(double x) { return 0.5 * tan(x + 2); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <tan@plt>
movaps %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
addsd  0xee7(%rip),%xmm0
call   1030 <tan@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 2.000000e+00
%5 = call double @tan(double %4)
%6 = fmul double 5.000000e-01, %5
ret double %6
}

LLVM IR (-O2):
define double @f2(double %0) {
%2 = fadd double %0, 2.000000e+00
%3 = tail call double @tan(double %2)
%4 = fmul double %3, 5.000000e-01
ret double %4
}
void dv3_copy(double *a, double *b) {
  a[0] = b[0];
  a[1] = b[1];
  a[2] = b[2];
}


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

x86 assembly (clang, -O2):
<dv3_copy>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @dv3_copy(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
store double %3, double* %0
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 1
store double %5, double* %6
%7 = getelementptr inbounds double, double* %1, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 2
store double %8, double* %9
ret void
}
/* Variables and functions */
int scroll1(void *, int);
int Scroll(void *v) { return scroll1(v, 1); }


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

x86 assembly (clang, -O2):
<Scroll>:
mov    $0x1,%esi
jmp    1030 <scroll1@plt>

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

LLVM IR (-O2):
define i32 @Scroll(i8* %0) {
%2 = tail call i32 @scroll1(i8* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_write(char *, int);
void drv_LT_clear(void) {
  char cmd[1];
  cmd[0] = 0x03;
  drv_generic_serial_write(cmd, 1);
}


x86 assembly (clang, -O0):
<drv_LT_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x3,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <drv_generic_serial_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_LT_clear>:
push   %rax
movb   $0x3,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <drv_generic_serial_write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @drv_LT_clear() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 3, i8* %2
%3 = call i32 @drv_generic_serial_write(i8* %2, i32 1)
ret void
}
int test_imm_10int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x10 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_10int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x10,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_10int64_midword_mem>:
testb  $0x10,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_10int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1048576
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int type_mode_one(struct obj_tx_bench *obj_bench, int worker_idx, int op_idx) {
  return 0;
}


x86 assembly (clang, -O0):
<type_mode_one>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.obj_tx_bench = type opaque
define i32 @type_mode_one(%struct.obj_tx_bench* %0, i32 %1, i32 %2) {
%4 = alloca %struct.obj_tx_bench*
%5 = alloca i32
%6 = alloca i32
store %struct.obj_tx_bench* %0, %struct.obj_tx_bench** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.obj_tx_bench = type opaque
define i32 @type_mode_one(%struct.obj_tx_bench* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i = 5;
  printf("Hello i=%d\n", i);
  printf("hello,world!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
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    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello i=%d\0A\00"
@.str.1 = [13 x i8] c"hello,world!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello i=%d\0A\00"
@.str.1 = [13 x i8] c"hello,world!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void getClientOutputBufferMemoryUsage(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               72, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<getClientOutputBufferMemoryUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x48,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getClientOutputBufferMemoryUsage>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x48,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.getClientOutputBufferMemoryUsage = [33 x i8] c"getClientOutputBufferMemoryUsage\00"
define void @getClientOutputBufferMemoryUsage() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 72, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__func__.getClientOutputBufferMemoryUsage, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.getClientOutputBufferMemoryUsage = [33 x i8] c"getClientOutputBufferMemoryUsage\00"
define void @getClientOutputBufferMemoryUsage() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 72, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @__func__.getClientOutputBufferMemoryUsage, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_header(char *);
void pad_hd(void) {
  int Dope;
  print_header("Hey man, welcome to Dealer McDope's Pad!  I gots the some of "
               "the finest dope ");
  print_header("you'll find anywhere in Ularn -- check it out... ");
}


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

x86 assembly (clang, -O2):
<pad_hd>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_header@plt>
lea    0xf2a(%rip),%rdi
pop    %rax
jmp    1030 <print_header@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"Hey man, welcome to Dealer McDope's Pad! I gots the some of the finest dope \00"
@.str.1 = [50 x i8] c"you'll find anywhere in Ularn -- check it out... \00"
define void @pad_hd() {
%1 = alloca i32
%2 = call i32 @print_header(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @print_header(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [78 x i8] c"Hey man, welcome to Dealer McDope's Pad! I gots the some of the finest dope \00"
@.str.1 = [50 x i8] c"you'll find anywhere in Ularn -- check it out... \00"
define void @pad_hd() {
%1 = tail call i32 @print_header(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_header(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_dcl_blank();
int /*<<< orphan*/ test_dcl_code();
int /*<<< orphan*/ test_dcl_comment_entities();
int /*<<< orphan*/ test_dcl_comments();
int /*<<< orphan*/ test_dcl_input_line();
void all_dcl_tests() {
  test_dcl_comments();
  test_dcl_code();
  test_dcl_blank();
  test_dcl_input_line();
  test_dcl_comment_entities();
}


x86 assembly (clang, -O0):
<all_dcl_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <test_dcl_comments@plt>
mov    $0x0,%al
call   1050 <test_dcl_code@plt>
mov    $0x0,%al
call   1040 <test_dcl_blank@plt>
mov    $0x0,%al
call   1070 <test_dcl_input_line@plt>
mov    $0x0,%al
call   1030 <test_dcl_comment_entities@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_dcl_tests>:
push   %rax
xor    %eax,%eax
call   1060 <test_dcl_comments@plt>
xor    %eax,%eax
call   1050 <test_dcl_code@plt>
xor    %eax,%eax
call   1040 <test_dcl_blank@plt>
xor    %eax,%eax
call   1070 <test_dcl_input_line@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_dcl_comment_entities@plt>

LLVM IR (-O0):
define void @all_dcl_tests() {
%1 = call i32 (...) @test_dcl_comments()
%2 = call i32 (...) @test_dcl_code()
%3 = call i32 (...) @test_dcl_blank()
%4 = call i32 (...) @test_dcl_input_line()
%5 = call i32 (...) @test_dcl_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_dcl_tests() {
%1 = tail call i32 (...) @test_dcl_comments()
%2 = tail call i32 (...) @test_dcl_code()
%3 = tail call i32 (...) @test_dcl_blank()
%4 = tail call i32 (...) @test_dcl_input_line()
%5 = tail call i32 (...) @test_dcl_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ term_clrtoeol();
scalar_t__ term_height();
int /*<<< orphan*/ term_move(scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ xminibuf_write(char const *);
void term_minibuf_write(const char *s) {
  term_move(term_height() - 1, 0);
  xminibuf_write(s);
  term_clrtoeol();
}


x86 assembly (clang, -O0):
<term_minibuf_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <term_height@plt>
mov    %rax,%rdi
sub    $0x1,%rdi
xor    %esi,%esi
call   1030 <term_move@plt>
mov    -0x8(%rbp),%rdi
call   1060 <xminibuf_write@plt>
mov    $0x0,%al
call   1040 <term_clrtoeol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_minibuf_write>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <term_height@plt>
lea    -0x1(%rax),%rdi
xor    %esi,%esi
call   1030 <term_move@plt>
mov    %rbx,%rdi
call   1060 <xminibuf_write@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <term_clrtoeol@plt>

LLVM IR (-O0):
define void @term_minibuf_write(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @term_height()
%4 = sub nsw i64 %3, 1
%5 = call i32 @term_move(i64 %4, i32 0)
%6 = load i8*, i8** %2
%7 = call i32 @xminibuf_write(i8* %6)
%8 = call i32 (...) @term_clrtoeol()
ret void
}

LLVM IR (-O2):
define void @term_minibuf_write(i8* %0) {
%2 = tail call i64 (...) @term_height()
%3 = add nsw i64 %2, -1
%4 = tail call i32 @term_move(i64 %3, i32 0)
%5 = tail call i32 @xminibuf_write(i8* %0)
%6 = tail call i32 (...) @term_clrtoeol()
ret void
}
int tst_si_test2(int a, int b, int c) {
  int d = a & 0x99999999;
  if (d == 0)
    return 12;
  else
    return 18;
}


x86 assembly (clang, -O0):
<tst_si_test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x99999999,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    112e <tst_si_test2+0x2e>
movl   $0xc,-0x4(%rbp)
jmp    1135 <tst_si_test2+0x35>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_si_test2>:
test   $0x99999999,%edi
mov    $0xc,%ecx
mov    $0x12,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @tst_si_test2(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %0, -1717986919
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 12, i32 18
ret i32 %6
}
/* Variables and functions */
size_t get_framesize(const char *buffer) {
  return ((buffer[6] << 8) + (buffer[7]));
}


x86 assembly (clang, -O0):
<get_framesize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x6(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x7(%rcx),%ecx
add    %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_framesize>:
movsbq 0x6(%rdi),%rcx
shl    $0x8,%rcx
movsbq 0x7(%rdi),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @get_framesize(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 6
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 7
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add nsw i32 %7, %11
%13 = sext i32 %12 to i64
ret i64 %13
}

LLVM IR (-O2):
define i64 @get_framesize(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 6
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = shl nsw i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 7
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = add nsw i32 %5, %8
%10 = sext i32 %9 to i64
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char *realloc(char *, size_t);
int /*<<< orphan*/ stderr;
char *try_realloc(char *ptr, size_t size) {
  char *block = realloc(ptr, size);
  if (0 == block) {
    fprintf(stderr, "The system ran out of memory!\n");
    exit(1);
  }
  return block;
}


x86 assembly (clang, -O0):
<try_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    117c <try_realloc+0x4c>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
lea    0xe93(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_realloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <try_realloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"The system ran out of memory!\0A\00"
define i8* @try_realloc(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 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* null, %9
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"The system ran out of memory!\0A\00"
define noalias i8* @try_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
void free(void *ptr) { return; }


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

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

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

LLVM IR (-O2):
define void @free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int getyn() {
  char ans[10];
  return (NULL != fgets(ans, 10, stdin)) && ('y' == ans[0] || 'Y' == ans[0]);
}


x86 assembly (clang, -O0):
<getyn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xa(%rbp),%rdi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1030 <fgets@plt>
mov    %rax,%rdx
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %rdx,%rcx
mov    %al,-0xb(%rbp)
je     116f <getyn+0x5f>
movsbl -0xa(%rbp),%edx
mov    $0x1,%al
mov    $0x79,%ecx
cmp    %edx,%ecx
mov    %al,-0xc(%rbp)
je     1169 <getyn+0x59>
movsbl -0xa(%rbp),%ecx
mov    $0x59,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0xc(%rbp)
mov    -0xc(%rbp),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getyn>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edx
lea    0xe(%rsp),%rdi
mov    $0xa,%esi
call   1030 <fgets@plt>
test   %rax,%rax
setne  %al
mov    0xe(%rsp),%cl
and    $0xdf,%cl
cmp    $0x59,%cl
sete   %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
define i32 @getyn() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32* @fgets(i8* %2, i32 10, i32 %3)
%5 = icmp ne i32* %4, null
%6 = load i8, i8* %2
%7 = and i8 %6, -33
%8 = icmp eq i8 %7, 89
%9 = select i1 %5, i1 %8, i1 false
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_mullo_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
__m256i __attribute__((__target__("avx512vl,avx512dq")))
mm256_mullo_epi64_wrap(__m256i a, __m256i b) {
  return _mm256_mullo_epi64(a, b);
}


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

x86 assembly (clang, -O2):
<mm256_mullo_epi64_wrap>:
jmp    1030 <_mm256_mullo_epi64@plt>

LLVM IR (-O0):
define i32 @mm256_mullo_epi64_wrap(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 = call i32 @_mm256_mullo_epi64(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mm256_mullo_epi64_wrap(i32 %0, i32 %1) {
%3 = tail call i32 @_mm256_mullo_epi64(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int ut_ignore(const char *const fmt, va_list args) {
  (void)fmt;
  (void)args;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @ut_ignore(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
ret i32 0
}

LLVM IR (-O2):
define i32 @ut_ignore(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
int isEmpty(int input[], int len) {
  int i;
  for (i = 0; i < len; i++) {
    if (input[i] != 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isEmpty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114f <isEmpty+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     113c <isEmpty+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1156 <isEmpty+0x56>
jmp    1141 <isEmpty+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <isEmpty+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEmpty>:
mov    $0x1,%eax
test   %esi,%esi
jle    111f <isEmpty+0x1f>
mov    %esi,%ecx
xor    %edx,%edx
nopl   (%rax)
cmpl   $0x0,(%rdi,%rdx,4)
jne    1120 <isEmpty+0x20>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <isEmpty+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isEmpty(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %6, label %14
14: ; preds = %8, %6, %2
%15 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_tic_history(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_tic_history>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_tic_history(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_tic_history(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
float logf(float x) { return (float)logf((double)x); }


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

x86 assembly (clang, -O2):
<logf>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jae    1110 <logf+0x10>
ret
nopl   0x0(%rax)
jmp    1110 <logf+0x10>

LLVM IR (-O0):
define float @logf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fptrunc double %4 to float
%6 = call float @logf(float %5)
ret float %6
}

LLVM IR (-O2):
define float @logf(float %0) {
%2 = fcmp ugt float %0, 0.000000e+00
br i1 %2, label %4, label %3
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret float undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float remainingAngle(float, float);
int main(int argc, const char *argv[]) {
  float angleA = 30.0;
  float angleB = 60.0;
  float angleC = remainingAngle(angleA, angleB);
  printf("The third angle is %.2f.\n", angleC);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
call   1030 <remainingAngle@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
movss  0xed3(%rip),%xmm1
call   1030 <remainingAngle@plt>
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"The third angle is %.2f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 3.000000e+01, float* %6
store float 6.000000e+01, float* %7
%9 = load float, float* %6
%10 = load float, float* %7
%11 = call float @remainingAngle(float %9, float %10)
store float %11, float* %8
%12 = load float, float* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"The third angle is %.2f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float @remainingAngle(float 3.000000e+01, float 6.000000e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sumDivisbleBy(int, int);
int main(int args, char *argv[]) {
  int sum =
      sumDivisbleBy(3, 999) + sumDivisbleBy(5, 999) - sumDivisbleBy(15, 999);
  printf("Sum: %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x5,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0xf,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
mov    %eax,%ebx
mov    $0x5,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
add    %eax,%ebx
mov    $0xf,%edi
mov    $0x3e7,%esi
call   1040 <sumDivisbleBy@plt>
sub    %eax,%ebx
lea    0xea5(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Sum: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @sumDivisbleBy(i32 3, i32 999)
%8 = call i32 @sumDivisbleBy(i32 5, i32 999)
%9 = add nsw i32 %7, %8
%10 = call i32 @sumDivisbleBy(i32 15, i32 999)
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Sum: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sumDivisbleBy(i32 3, i32 999)
%4 = tail call i32 @sumDivisbleBy(i32 5, i32 999)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @sumDivisbleBy(i32 15, i32 999)
%7 = sub i32 %5, %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XResizeRequestEvent;

/* Variables and functions */
void *get_XResizeRequestEvent_display(void *_p) {
  return (void *)((XResizeRequestEvent *)_p)->display;
}


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

x86 assembly (clang, -O2):
<get_XResizeRequestEvent_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XResizeRequestEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XResizeRequestEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void X509_REQ_get_attr_count(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REQ_get_attr_count() {
ret void
}
int of_set_root_node(struct device_node *node) { return -38; }


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

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

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

LLVM IR (-O2):
%struct.device_node = type opaque
define i32 @of_set_root_node(%struct.device_node* nocapture readnone %0) {
ret i32 -38
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World\n");
  printf("Have a nice day\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
@.str.1 = [17 x i8] c"Have a nice day\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [12 x i8] c"Hello World\00"
@str.2 = [16 x i8] c"Have a nice day\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int EBADF;
int close(int);
int device_close(int fd) {
  if (fd < 0)
    return -EBADF;
  return close(fd);
}


x86 assembly (clang, -O0):
<device_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1138 <device_close+0x28>
xor    %eax,%eax
mov    0x2eb2(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <device_close+0x33>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<device_close>:
test   %edi,%edi
js     1119 <device_close+0x9>
jmp    1030 <close@plt>
mov    0x2ec0(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EBADF = global i32 0
define i32 @device_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EBADF
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EBADF = global i32 0
define i32 @device_close(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EBADF
%5 = sub nsw i32 0, %4
br label %8
6: ; preds = %1
%7 = tail call i32 @close(i32 %0)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ %5, %3 ], [ %7, %6 ]
ret i32 %9
}