xunge/DecIR huggingface dataset:
void check_logfs_seg_alias(void) { ; }


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

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

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

LLVM IR (-O2):
define void @check_logfs_seg_alias() {
ret void
}
unsigned int hashInthash(const void *const x) {
  union tmp {
    unsigned int u;
    int i;
  } x0;
  x0.u = 0;
  x0.i = *(int *)x;
  return x0.u;
}


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

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

LLVM IR (-O0):
%union.tmp = type { i32 }
define i32 @hashInthash(i8* %0) {
%2 = alloca i8*
%3 = alloca %union.tmp
store i8* %0, i8** %2
%4 = bitcast %union.tmp* %3 to i32*
store i32 0, i32* %4
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = bitcast %union.tmp* %3 to i32*
store i32 %7, i32* %8
%9 = bitcast %union.tmp* %3 to i32*
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @hashInthash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int g_is_lower_d(double s, double d) {
  if (s < d) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<g_is_lower_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    112e <g_is_lower_d+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1135 <g_is_lower_d+0x35>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_is_lower_d>:
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
ret

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

LLVM IR (-O2):
define i32 @g_is_lower_d(double %0, double %1) {
%3 = fcmp uge double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int analogRead(int pin) {
  printf("analogRead - warning\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"analogRead - warning\00"
define i32 @analogRead(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ crc32c_sw(int /*<<< orphan*/, void const *, size_t);
uint32_t crc32c(uint32_t crc, const void *buf, size_t len) {
  return crc32c_sw(crc, buf, len);
}


x86 assembly (clang, -O0):
<crc32c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <crc32c_sw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32c>:
jmp    1030 <crc32c_sw@plt>

LLVM IR (-O0):
define i32 @crc32c(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @crc32c_sw(i32 %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @crc32c(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @crc32c_sw(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ do_calculations();
int benchmarkRun() { return (int)((int64_t)do_calculations()); }


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

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

LLVM IR (-O0):
define i32 @benchmarkRun() {
%1 = call i64 (...) @do_calculations()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @benchmarkRun() {
%1 = tail call i64 (...) @do_calculations()
%2 = trunc i64 %1 to i32
ret i32 %2
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> (unsigned char)3;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] <<=
          ((state[0UL] >> (unsigned char)3) & (unsigned char)7) | 1UL;
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] ^ 784608736UL) >> (unsigned char)3;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%rax
jae    115c <RandomFunc+0x5c>
movzbl -0x11(%rbp),%eax
sar    $0x3,%eax
and    $0x7,%eax
movslq %eax,%rcx
or     $0x1,%rcx
movzbl -0x11(%rbp),%eax
shl    %cl,%eax
mov    %al,-0x11(%rbp)
movzbl -0x12(%rbp),%eax
add    $0x2,%rax
mov    %al,-0x12(%rbp)
jmp    1124 <RandomFunc+0x24>
movzbl -0x11(%rbp),%eax
xor    $0x2ec42de0,%rax
shr    $0x3,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movb   $0xac,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = or i64 %10, 51238316
%12 = lshr i64 %11, 3
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %13, i8* %14
store i8 0, i8* %6
br label %15
15: ; preds = %19, %2
%16 = load i8, i8* %6
%17 = zext i8 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %37
19: ; preds = %15
%20 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = ashr i32 %22, 3
%24 = and i32 %23, 7
%25 = sext i32 %24 to i64
%26 = or i64 %25, 1
%27 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = trunc i64 %26 to i32
%31 = shl i32 %29, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %27
%33 = load i8, i8* %6
%34 = zext i8 %33 to i64
%35 = add i64 %34, 2
%36 = trunc i64 %35 to i8
store i8 %36, i8* %6
br label %15
37: ; preds = %15
%38 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%39 = load i8, i8* %38
%40 = zext i8 %39 to i64
%41 = xor i64 %40, 784608736
%42 = lshr i64 %41, 3
%43 = trunc i64 %42 to i8
%44 = load i8*, i8** %4
%45 = getelementptr inbounds i8, i8* %44, i64 0
store i8 %43, i8* %45
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
store i8 -84, i8* %1
ret void
}
int test_imm_79int32_mem(int *val) {
  return ((*val) & (0x79 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_79int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 121
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t rtp_get_type(const uint8_t *p_rtp) { return p_rtp[1] & 0x7f; }


x86 assembly (clang, -O0):
<rtp_get_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0x7f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp_get_type>:
mov    0x4(%rdi),%eax
and    $0x7f,%eax
ret

LLVM IR (-O0):
define i32 @rtp_get_type(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 127
ret i32 %6
}

LLVM IR (-O2):
define i32 @rtp_get_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = and i32 %3, 127
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_setgroups;
int /*<<< orphan*/ err_exit(char *);
scalar_t__ syscall(int /*<<< orphan*/, size_t, int /*<<< orphan*/ *);
void _setgroups(size_t s, gid_t *g) {
  if (syscall(SYS_setgroups, s, g) < 0)
    err_exit("_setgroups");
}


x86 assembly (clang, -O0):
<_setgroups>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
cmp    $0x0,%rax
jge    115c <_setgroups+0x3c>
lea    0xea9(%rip),%rdi
call   1040 <err_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_setgroups>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
test   %rax,%rax
js     113c <_setgroups+0x1c>
pop    %rax
ret
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1040 <err_exit@plt>

LLVM IR (-O0):
@SYS_setgroups = global i32 0
@.str = [11 x i8] c"_setgroups\00"
define void @_setgroups(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i32, i32* @SYS_setgroups
%6 = load i64, i64* %3
%7 = load i32*, i32** %4
%8 = call i64 @syscall(i32 %5, i64 %6, i32* %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @err_exit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@SYS_setgroups = global i32 0
@.str = [11 x i8] c"_setgroups\00"
define void @_setgroups(i64 %0, i32* %1) {
%3 = load i32, i32* @SYS_setgroups
%4 = tail call i64 @syscall(i32 %3, i64 %0, i32* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @err_exit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
int fn1(int a, int b) {
  int tem1 = a | b;
  int tem2 = a ^ b;
  return tem1 - tem2;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = xor i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn1(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
int modify_bit(int n, unsigned char pos, _Bool new_state) {
  int mask = 1 << (pos - 1);
  return (n & ~mask) | (-new_state & mask);
}


x86 assembly (clang, -O0):
<modify_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
and    $0x1,%al
mov    %al,-0x6(%rbp)
movzbl -0x5(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x6(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modify_bit>:
mov    %esi,%ecx
add    $0xff,%cl
mov    $0x1,%eax
shl    %cl,%eax
btr    %ecx,%edi
test   %edx,%edx
cmove  %edx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @modify_bit(i32 %0, i8 zeroext %1, i1 zeroext %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i32 %0, i32* %4
store i8 %1, i8* %5
%8 = zext i1 %2 to i8
store i8 %8, i8* %6
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = sub nsw i32 %10, 1
%12 = shl i32 1, %11
store i32 %12, i32* %7
%13 = load i32, i32* %4
%14 = load i32, i32* %7
%15 = xor i32 %14, -1
%16 = and i32 %13, %15
%17 = load i8, i8* %6
%18 = trunc i8 %17 to i1
%19 = zext i1 %18 to i32
%20 = sub nsw i32 0, %19
%21 = load i32, i32* %7
%22 = and i32 %20, %21
%23 = or i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @modify_bit(i32 %0, i8 zeroext %1, i1 zeroext %2) {
%4 = zext i8 %1 to i32
%5 = add nsw i32 %4, -1
%6 = shl nuw i32 1, %5
%7 = xor i32 %6, -1
%8 = and i32 %7, %0
%9 = select i1 %2, i32 %6, i32 0
%10 = or i32 %8, %9
ret i32 %10
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRD2_get(void) { return U_WMRCORENONE_get("U_WMRD2"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRD2\00"
define i32 @U_WMRD2_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD2\00"
define i32 @U_WMRD2_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int ozy_get_firmware_string(char *buffer, int buffer_size) {
  strcpy(buffer, "Unknown");
  return 0;
}


x86 assembly (clang, -O0):
<ozy_get_firmware_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed6(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"Unknown\00"
define i32 @ozy_get_firmware_string(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 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Unknown\00"
define i32 @ozy_get_firmware_string(i8* %0, i32 %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RLD(int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0x6f(void) {
  RLD(4, 11);
  T_WAIT_UNTIL(14);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0x6f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0xb,%esi
call   1030 <RLD@plt>
mov    $0xe,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0x6f>:
push   %rax
mov    $0x4,%edi
mov    $0xb,%esi
call   1030 <RLD@plt>
mov    $0xe,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0x6f() {
%1 = call i32 @RLD(i32 4, i32 11)
%2 = call i32 @T_WAIT_UNTIL(i32 14)
ret void
}

LLVM IR (-O2):
define void @op_ED_0x6f() {
%1 = tail call i32 @RLD(i32 4, i32 11)
%2 = tail call i32 @T_WAIT_UNTIL(i32 14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ minHeapFixdown(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ swap(int, int);
void minHeapSort(int a[], int n) {
  for (int i = n - 1; i >= 1; i--) {
    swap(a[i], a[0]);
    minHeapFixdown(a, 0, i);
  }
}


x86 assembly (clang, -O0):
<minHeapSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     1174 <minHeapSort+0x54>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
call   1040 <swap@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
xor    %esi,%esi
call   1030 <minHeapFixdown@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <minHeapSort+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minHeapSort>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1159 <minHeapSort+0x39>
mov    %rdi,%r14
mov    %esi,%ebx
nop
lea    -0x1(%rbx),%r15
mov    %r15d,%eax
mov    (%r14,%rax,4),%edi
mov    (%r14),%esi
call   1040 <swap@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %r15d,%edx
call   1030 <minHeapFixdown@plt>
cmp    $0x2,%rbx
mov    %r15,%rbx
ja     1130 <minHeapSort+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @minHeapSort(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ %5, %4 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = trunc i64 %9 to i32
%11 = and i64 %9, 4294967295
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %0
%15 = tail call i32 @swap(i32 %13, i32 %14)
%16 = tail call i32 @minHeapFixdown(i32* %0, i32 0, i32 %10)
%17 = icmp ugt i64 %8, 2
br i1 %17, label %7, label %6
}
void test_stun_context() {}


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

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

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

LLVM IR (-O2):
define void @test_stun_context() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xbc() {
  Assert_real((isalpha(188) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              945, ("isalpha should be 0 for 0xbc"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xbc>:
push   %rax
mov    $0xbc,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3b1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xbc\00"
define void @t_isalpha_0xbc() {
%1 = tail call i64 @isalpha(i32 188)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void av_audio_fifo_realloc() {}


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

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

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

LLVM IR (-O2):
define void @av_audio_fifo_realloc() {
ret void
}
long pcount_while(unsigned long x) {
  long result = 0;
  while (x) {
    result += x & 0x1;
    x >>= 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<pcount_while>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <pcount_while+0x3c>
mov    -0x8(%rbp),%rax
and    $0x1,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <pcount_while+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcount_while>:
xor    %eax,%eax
test   %rdi,%rdi
je     1124 <pcount_while+0x24>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %rdx,%rax
shr    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <pcount_while+0x10>
ret

LLVM IR (-O0):
define i64 @pcount_while(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i64, i64* %2
%9 = and i64 %8, 1
%10 = load i64, i64* %3
%11 = add i64 %10, %9
store i64 %11, i64* %3
%12 = load i64, i64* %2
%13 = lshr i64 %12, 1
store i64 %13, i64* %2
br label %4
14: ; preds = %4
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @pcount_while(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %8, %3 ], [ %0, %1 ]
%6 = and i64 %5, 1
%7 = add i64 %4, %6
%8 = lshr i64 %5, 1
%9 = icmp ult i64 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %11
}
int uffs_GetVersion(void) { return 0x01030400; }


x86 assembly (clang, -O0):
<uffs_GetVersion>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1030400,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @uffs_GetVersion() {
ret i32 16974848
}

LLVM IR (-O2):
define i32 @uffs_GetVersion() {
ret i32 16974848
}
int CORE_CHECK() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CORE_CHECK() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ poke_queue(void *);
void netbus_do_sched(void *udata) { poke_queue(udata); }


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

x86 assembly (clang, -O2):
<netbus_do_sched>:
jmp    1030 <poke_queue@plt>

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

LLVM IR (-O2):
define void @netbus_do_sched(i8* %0) {
%2 = tail call i32 @poke_queue(i8* %0)
ret void
}
void XInternAtoms() {}


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

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

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

LLVM IR (-O2):
define void @XInternAtoms() {
ret void
}
void __flash_release(void) {}


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

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

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

LLVM IR (-O2):
define void @__flash_release() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *arg) {
  printf("usage: %s -t <remote tunnel ip>\n", arg);
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"usage: %s -t <remote tunnel ip>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [33 x i8] c"usage: %s -t <remote tunnel ip>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int find_starting_index(int, int *, int, int);
int find_matching_coordinate_index(int window_start_coordinate, int *snp_sites,
                                   int number_of_snps, int starting_index) {
  return find_starting_index(window_start_coordinate, snp_sites, starting_index,
                             number_of_snps);
}


x86 assembly (clang, -O0):
<find_matching_coordinate_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <find_starting_index@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_matching_coordinate_index>:
mov    %edx,%eax
mov    %ecx,%edx
mov    %eax,%ecx
jmp    1030 <find_starting_index@plt>

LLVM IR (-O0):
define i32 @find_matching_coordinate_index(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %8
%12 = load i32, i32* %7
%13 = call i32 @find_starting_index(i32 %9, i32* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @find_matching_coordinate_index(i32 %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @find_starting_index(i32 %0, i32* %1, i32 %3, i32 %2)
ret i32 %5
}
long long calc_andn_u32(int src1, int src2, int dummy) {
  return (~src1 + dummy) & (src2);
}


x86 assembly (clang, -O0):
<calc_andn_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    -0xc(%rbp),%eax
and    -0x8(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_andn_u32>:
not    %edi
add    %edx,%edi
and    %esi,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @calc_andn_u32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %5
%12 = and i32 %10, %11
%13 = sext i32 %12 to i64
ret i64 %13
}

LLVM IR (-O2):
define i64 @calc_andn_u32(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %0, -1
%5 = add nsw i32 %4, %2
%6 = and i32 %5, %1
%7 = sext i32 %6 to i64
ret i64 %7
}
/* Variables and functions */
int write_block(int, int /*<<< orphan*/, int /*<<< orphan*/,
                int /*<<< orphan*/);
int fwd() { return write_block(119, 0, 0, 0); }


x86 assembly (clang, -O0):
<fwd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x77,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_block@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwd>:
mov    $0x77,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <write_block@plt>

LLVM IR (-O0):
define i32 @fwd() {
%1 = call i32 @write_block(i32 119, i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @fwd() {
%1 = tail call i32 @write_block(i32 119, i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ list_dir(char *);
int main() {
  list_dir("/usr/share/games");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"/usr/share/games\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @list_dir(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"/usr/share/games\00"
define i32 @main() {
%1 = tail call i32 @list_dir(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void __attribute__((no, optnone)) bar(int *test) {}


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

x86 assembly (clang, -O2):
<bar>:
mov    %rdi,-0x8(%rsp)
ret

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

LLVM IR (-O2):
define void @bar(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}
int strgl(char *str) {
  int count;
  for (count = 0; *(str + count) != '\0'; count++)
    ;
  return count;
}


x86 assembly (clang, -O0):
<strgl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <strgl+0x37>
jmp    1129 <strgl+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strgl+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strgl>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strgl+0x10>
ret

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

LLVM IR (-O2):
define i32 @strgl(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
long strtol(char const *, char **, int);
long c_strtol(const char *nptr, char **endptr, int base) {
  return strtol(nptr, endptr, base);
}


x86 assembly (clang, -O0):
<c_strtol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strtol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_strtol>:
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i64 @c_strtol(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = call i64 @strtol(i8* %7, i8** %8, i32 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @c_strtol(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i64 @strtol(i8* %0, i8** %1, i32 %2)
ret i64 %4
}
void rop3_40_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk1 = *D & stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_40_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_40_1_0>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_40_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_40_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %5, %4
store i8 %6, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wcsncat(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
void uninivar_wcsncat(void) {
  wchar_t *ct;
  wchar_t *s;
  size_t n;
  (void)wcsncat(ct, s, n);
}


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

x86 assembly (clang, -O2):
<uninivar_wcsncat>:
jmp    1030 <wcsncat@plt>

LLVM IR (-O0):
define void @uninivar_wcsncat() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i64
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = load i64, i64* %3
%7 = call i32 @wcsncat(i32* %4, i32* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninivar_wcsncat() {
%1 = tail call i32 @wcsncat(i32* undef, i32* undef, i64 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ strtoll(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
uid_t fsfr_fetch_uid(char *name) {
  char *id = getenv(name);
  if (!id)
    return 0;
  return (uid_t)strtoll(id, NULL, 0);
}


x86 assembly (clang, -O0):
<fsfr_fetch_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1150 <fsfr_fetch_uid+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1162 <fsfr_fetch_uid+0x42>
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <strtoll@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsfr_fetch_uid>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
je     1138 <fsfr_fetch_uid+0x18>
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
pop    %rax
jmp    1040 <strtoll@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fsfr_fetch_uid(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @getenv(i8* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = load i8*, i8** %4
%12 = call i32 @strtoll(i8* %11, i32* null, i32 0)
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @fsfr_fetch_uid(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @strtoll(i8* nocapture %2, i32* null, i32 0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int scanf(char *, int *, int *);
int main() {
  int v, t;
  while (scanf("%d%d", &v, &t) == 2)
    printf("%d\n", v * t * 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    1167 <main+0x47>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
shl    $0x1,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    1185 <main+0x65>
lea    0xebd(%rip),%r14
lea    0xeb1(%rip),%r15
lea    0x4(%rsp),%r12
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
mov    0x4(%rsp),%esi
imul   (%rsp),%esi
add    %esi,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %15
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = shl i32 %8, 1
%11 = mul i32 %10, %9
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%14 = icmp eq i32 %13, 2
br i1 %14, label %7, label %15
15: ; preds = %7, %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ cfarmhash(char const *, size_t);
uint64_t hash_data(void *data, size_t size) {
  return cfarmhash((const char *)data, size);
}


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

x86 assembly (clang, -O2):
<hash_data>:
jmp    1030 <cfarmhash@plt>

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

LLVM IR (-O2):
define i32 @hash_data(i8* %0, i64 %1) {
%3 = tail call i32 @cfarmhash(i8* %0, i64 %1)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ display;
};
struct TYPE_4__ {
  TYPE_1__ xnoexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void *get_XEvent_xnoexpose_display(void *_p) {
  return (void *)((XEvent *)_p)->xnoexpose.display;
}


x86 assembly (clang, -O0):
<get_XEvent_xnoexpose_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_XEvent_xnoexpose_display>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_XEvent_xnoexpose_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int f58(int *);
int f59(int *p) { return f58(p); }


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

x86 assembly (clang, -O2):
<f59>:
jmp    1030 <f58@plt>

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

LLVM IR (-O2):
define i32 @f59(i32* %0) {
%2 = tail call i32 @f58(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f3(void) { printf("Hey, you pressed F3! \n"); }


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Hey, you pressed F3! \00"
define void @f3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Copyright (c) 2001-2004, Roger Dingledine\n"
         "Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson\n"
         "Copyright (c) 2007-2013, The Tor Project, Inc.\n\n"
         "tor -f <torrc> [args]\n"
         "See man page for options, or https://www.torproject.org/ for "
         "documentation.\n");
}


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

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

LLVM IR (-O0):
@.str = [247 x i8] c"Copyright (c) 2001-2004, Roger Dingledine\0ACopyright (c) 2004-2006, Roger Dingledine, Nick Mathewson\0ACopyright (c) 2007-2013, The Tor Project, Inc.\0A\0Ator -f <torrc> [args]\0ASee man page for options, or https://www.torproject.org/ for documentation.\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([247 x i8], [247 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [246 x i8] c"Copyright (c) 2001-2004, Roger Dingledine\0ACopyright (c) 2004-2006, Roger Dingledine, Nick Mathewson\0ACopyright (c) 2007-2013, The Tor Project, Inc.\0A\0Ator -f <torrc> [args]\0ASee man page for options, or https://www.torproject.org/ for documentation.\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([246 x i8], [246 x i8]* @str, i64 0, i64 0))
ret void
}
void rop3_191_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T & S;
  stk2 = ~stk2;
  stk1 = *D | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_191_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_191_1_0>:
not    %sil
or     %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_191_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = and i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %8
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_191_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %1, -1
%6 = or i8 %4, %5
store i8 %6, i8* %0
ret void
}