xunge/DecIR huggingface dataset:
/* Variables and functions */
int mod(int, int);
char shift_letter(char plainchar, int shift_value) {
  int plainchar_value = (int)plainchar - (int)'a';
  int shiftedchar_value = mod((plainchar_value + shift_value), 26);
  char shiftedchar = (char)shiftedchar_value + 'a';
  return shiftedchar;
}


x86 assembly (clang, -O0):
<shift_letter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    -0x8(%rbp),%edi
mov    $0x1a,%esi
call   1030 <mod@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movsbl %al,%eax
add    $0x61,%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_letter>:
push   %rax
add    %esi,%edi
add    $0xffffff9f,%edi
mov    $0x1a,%esi
call   1030 <mod@plt>
add    $0x61,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @shift_letter(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i8 %0, i8* %3
store i32 %1, i32* %4
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 97
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
%14 = call i32 @mod(i32 %13, i32 26)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = trunc i32 %15 to i8
%17 = sext i8 %16 to i32
%18 = add nsw i32 %17, 97
%19 = trunc i32 %18 to i8
store i8 %19, i8* %7
%20 = load i8, i8* %7
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @shift_letter(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
%4 = add nsw i32 %3, -97
%5 = add nsw i32 %4, %1
%6 = tail call i32 @mod(i32 %5, i32 26)
%7 = trunc i32 %6 to i8
%8 = add i8 %7, 97
ret i8 %8
}
long long v_long_long_func() { return (0); }


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

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

LLVM IR (-O0):
define i64 @v_long_long_func() {
ret i64 0
}

LLVM IR (-O2):
define i64 @v_long_long_func() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int inrange(int min, int x, int max) {
  assert(min <= max);
  return (min <= x) && (x <= max);
}


x86 assembly (clang, -O0):
<inrange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jg     1151 <inrange+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inrange>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    %edx,%ebx
setle  %dil
call   1030 <assert@plt>
cmp    %ebp,%ebx
setle  %al
cmp    %r14d,%ebp
setle  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @inrange(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 = load i32, i32* %6
%9 = icmp sle i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %19
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = icmp sle i32 %16, %17
br label %19
19: ; preds = %15, %3
%20 = phi i1 [ false, %3 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @inrange(i32 %0, i32 %1, i32 %2) {
%4 = icmp sle i32 %0, %2
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp sle i32 %0, %1
%8 = icmp sle i32 %1, %2
%9 = and i1 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
long lrand();
nrand(int n) {
  long slop, v;
  slop = 0x7FFFFFFFL % n;
  do
    v = lrand();
  while (v <= slop);
  return v % n;
}


x86 assembly (clang, -O0):
<nrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    $0x7fffffff,%eax
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <lrand@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    112d <nrand+0x1d>
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
cqto
idiv   %rcx
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrand>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x7fffffff,%eax
xor    %edx,%edx
idiv   %edi
mov    %edx,%ebx
xor    %eax,%eax
call   1030 <lrand@plt>
cmp    %rbx,%rax
jle    1120 <nrand+0x10>
movslq %ebp,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1145 <nrand+0x35>
cqto
idiv   %rcx
mov    %rdx,%rax
jmp    114b <nrand+0x3b>
xor    %edx,%edx
div    %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @nrand(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = srem i64 2147483647, %6
store i64 %7, i64* %3
br label %8
8: ; preds = %10, %1
%9 = call i64 (...) @lrand()
store i64 %9, i64* %4
br label %10
10: ; preds = %8
%11 = load i64, i64* %4
%12 = load i64, i64* %3
%13 = icmp sle i64 %11, %12
br i1 %13, label %8, label %14
14: ; preds = %10
%15 = load i64, i64* %4
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = srem i64 %15, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @nrand(i32 %0) {
%2 = srem i32 2147483647, %0
%3 = zext i32 %2 to i64
br label %4
4: ; preds = %4, %1
%5 = tail call i64 (...) @lrand()
%6 = icmp sgt i64 %5, %3
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = sext i32 %0 to i64
%9 = srem i64 %5, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}
/* Variables and functions */
void *dmem_alloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *smalloc(size_t length) {
  void *tmp;
  tmp = dmem_alloc(length);
  memset(tmp, 0, length);
  return tmp;
}


x86 assembly (clang, -O0):
<smalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <dmem_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <dmem_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @smalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @dmem_alloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @smalloc(i64 %0) {
%2 = tail call i8* @dmem_alloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Variables and functions */
scalar_t__ asprintf(char **, char *, char const *, char const *);
char *concat_path(const char *s, const char *t) {
  char *buf;
  if (asprintf(&buf, "%s/%s", s, t) < 0)
    return NULL;
  return buf;
}


x86 assembly (clang, -O0):
<concat_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x20(%rbp),%rdi
lea    0xecd(%rip),%rsi
call   1030 <asprintf@plt>
cmp    $0x0,%rax
jge    114f <concat_path+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    1157 <concat_path+0x47>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat_path>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee2(%rip),%rsi
mov    %rsp,%rdi
call   1030 <asprintf@plt>
test   %rax,%rax
js     1131 <concat_path+0x21>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define i8* @concat_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i64 @asprintf(i8** %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %14
12: ; preds = %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %14
14: ; preds = %12, %11
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define i8* @concat_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @asprintf(i8** %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = icmp slt i64 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* null, i8* %7
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(unsigned long);
int /*<<< orphan*/ IntRegister(unsigned long, void (*)());
void I2CIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  unsigned long ulInt;
  ;
  ulInt = (ulBase == 0x40020000) ? 24 : 53;
  IntRegister(ulInt, pfnHandler);
  IntEnable(ulInt);
}


x86 assembly (clang, -O0):
<I2CIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x35,%eax
mov    $0x18,%ecx
cmp    $0x40020000,%rdx
cmove  %ecx,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <IntRegister@plt>
mov    -0x18(%rbp),%rdi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CIntRegister>:
push   %rbx
cmp    $0x40020000,%rdi
mov    $0x18,%eax
mov    $0x35,%ebx
cmove  %rax,%rbx
mov    %rbx,%rdi
call   1040 <IntRegister@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @I2CIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 1073872896
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 24, i32 53
%10 = sext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load void ()*, void ()** %4
%13 = bitcast void ()* %12 to void (...)*
%14 = call i32 @IntRegister(i64 %11, void (...)* %13)
%15 = load i64, i64* %5
%16 = call i32 @IntEnable(i64 %15)
ret void
}

LLVM IR (-O2):
define void @I2CIntRegister(i64 %0, void ()* %1) {
%3 = icmp eq i64 %0, 1073872896
%4 = select i1 %3, i64 24, i64 53
%5 = bitcast void ()* %1 to void (...)*
%6 = tail call i32 @IntRegister(i64 %4, void (...)* %5)
%7 = tail call i32 @IntEnable(i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void suma(int a, int b, int c) { printf("%d\n", a + b + c); }


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

x86 assembly (clang, -O2):
<suma>:
add    %edi,%esi
add    %edx,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @suma(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int _i2cread(int, int, unsigned char *, int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_i2cread(int interface, int bigaddr, unsigned char *data, int len) {
  int val;
  monLock();
  val = _i2cread(interface, bigaddr, data, len);
  monUnlock();
  return (val);
}


x86 assembly (clang, -O0):
<mon_i2cread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <_i2cread@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_i2cread>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <_i2cread@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mon_i2cread(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = call i32 (...) @monLock()
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = call i32 @_i2cread(i32 %11, i32 %12, i8* %13, i32 %14)
store i32 %15, i32* %9
%16 = call i32 (...) @monUnlock()
%17 = load i32, i32* %9
ret i32 %17
}

LLVM IR (-O2):
define i32 @mon_i2cread(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 (...) @monLock()
%6 = tail call i32 @_i2cread(i32 %0, i32 %1, i8* %2, i32 %3)
%7 = tail call i32 (...) @monUnlock()
ret i32 %6
}
/* Variables and functions */
int get_exe_dir(char dir_buf[], size_t dir_buf_len) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @get_exe_dir(i8* nocapture readnone %0, i64 %1) {
ret i32 1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ flags;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
long get_XWMHints_flags(void *_p) { return (long)((XWMHints *)_p)->flags; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XWMHints_flags(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
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XWMHints_flags(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
struct sk_buff {
  int dummy;
};

/* Variables and functions */
struct sk_buff *tipc_cfg_reply_alloc(int /*<<< orphan*/);
struct sk_buff *tipc_cfg_reply_none(void) {
  return tipc_cfg_reply_alloc(0);
}


x86 assembly (clang, -O0):
<tipc_cfg_reply_none>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <tipc_cfg_reply_alloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tipc_cfg_reply_none>:
xor    %edi,%edi
jmp    1030 <tipc_cfg_reply_alloc@plt>

LLVM IR (-O0):
%struct.sk_buff = type { i32 }
define %struct.sk_buff* @tipc_cfg_reply_none() {
%1 = call %struct.sk_buff* @tipc_cfg_reply_alloc(i32 0)
ret %struct.sk_buff* %1
}

LLVM IR (-O2):
%struct.sk_buff = type { i32 }
define %struct.sk_buff* @tipc_cfg_reply_none() {
%1 = tail call %struct.sk_buff* @tipc_cfg_reply_alloc(i32 0)
ret %struct.sk_buff* %1
}
/* Variables and functions */
int t();
int main() { return t(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @t()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int);
void cgdefw(int v) { ngen("%s\t%d", ".long", v); }


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

x86 assembly (clang, -O2):
<cgdefw>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <ngen@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s\09%d\00"
@.str.1 = [6 x i8] c".long\00"
define void @cgdefw(i32 %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprints(int, char const *);
void prints(const char *str) { fprints(1, str); }


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

x86 assembly (clang, -O2):
<prints>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <fprints@plt>

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

LLVM IR (-O2):
define void @prints(i8* %0) {
%2 = tail call i32 @fprints(i32 1, i8* %0)
ret void
}
/* Variables and functions */
double log(scalar_t__);
scalar_t__ sqrt(double);
double aSinh(double x) { return log(x + sqrt((x * x) + 1)); }


x86 assembly (clang, -O0):
<aSinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aSinh>:
push   %rax
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
addsd  0xece(%rip),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @aSinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
%7 = call i64 @sqrt(double %6)
%8 = sitofp i64 %7 to double
%9 = fadd double %3, %8
%10 = fptosi double %9 to i64
%11 = call double @log(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @aSinh(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, %0
%6 = fptosi double %5 to i64
%7 = tail call double @log(i64 %6)
ret double %7
}
/* Variables and functions */
int __builtin_arm_rsr(char *);
unsigned rsr_1() { return __builtin_arm_rsr("sysreg"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"sysreg\00"
define i32 @rsr_1() {
%1 = tail call i32 @__builtin_arm_rsr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CRL;
typedef int /*<<< orphan*/ ASN1_TIME;

/* Variables and functions */
int X509_CRL_set_lastUpdate(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) {
  return X509_CRL_set_lastUpdate(x, tm);
}


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

x86 assembly (clang, -O2):
<X509_CRL_set1_lastUpdate>:
jmp    1030 <X509_CRL_set_lastUpdate@plt>

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

LLVM IR (-O2):
define i32 @X509_CRL_set1_lastUpdate(i32* %0, i32* %1) {
%3 = tail call i32 @X509_CRL_set_lastUpdate(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ emitln(char *);
void popSub() {
  emitln("pop\t%%ebx");
  emitln("sub\t%%ebx,%%eax");
  emitln("neg\t%%eax");
}


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

x86 assembly (clang, -O2):
<popSub>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emitln@plt>
lea    0xee6(%rip),%rdi
call   1030 <emitln@plt>
lea    0xeea(%rip),%rdi
pop    %rax
jmp    1030 <emitln@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [16 x i8] c"sub\09%%ebx,%%eax\00"
@.str.2 = [10 x i8] c"neg\09%%eax\00"
define void @popSub() {
%1 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"pop\09%%ebx\00"
@.str.1 = [16 x i8] c"sub\09%%ebx,%%eax\00"
@.str.2 = [10 x i8] c"neg\09%%eax\00"
define void @popSub() {
%1 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emitln(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @emitln(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int i8k_get_power_status();
int /*<<< orphan*/ printf(char *, int);
int ac_status() {
  printf("%d\n", i8k_get_power_status());
  return 0;
}


x86 assembly (clang, -O0):
<ac_status>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <i8k_get_power_status@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ac_status>:
push   %rax
xor    %eax,%eax
call   1030 <i8k_get_power_status@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @ac_status() {
%1 = tail call i32 (...) @i8k_get_power_status()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int spl_debug_dumplog(int flags) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @spl_debug_dumplog(i32 %0) {
ret i32 0
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_chat_prefix_build();
void config_change_prefix(void *data, struct t_config_option *option) {
  (void)data;
  (void)option;
  gui_chat_prefix_build();
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_change_prefix(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
%7 = call i32 (...) @gui_chat_prefix_build()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_change_prefix(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @gui_chat_prefix_build()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ wait4(int /*<<< orphan*/, int *, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
pid_t wait(int *status) { return wait4((pid_t)-1, status, 0, NULL); }


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0xffffffff,%edi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <wait4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
mov    %rdi,%rsi
mov    $0xffffffff,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <wait4@plt>

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

LLVM IR (-O2):
define i32 @wait(i32* %0) {
%2 = tail call i32 @wait4(i32 -1, i32* %0, i32 0, i32* null)
ret i32 %2
}
void gethrtime(void) {}


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

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

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

LLVM IR (-O2):
define void @gethrtime() {
ret void
}
void testUsing(void) {}


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

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

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

LLVM IR (-O2):
define void @testUsing() {
ret void
}
int is_gpt(int type) { return (type == 0xEE); }


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

x86 assembly (clang, -O2):
<is_gpt>:
xor    %eax,%eax
cmp    $0xee,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_gpt(i32 %0) {
%2 = icmp eq i32 %0, 238
%3 = zext i1 %2 to i32
ret i32 %3
}
void print_debug_message(fmt, a1, a2, a3, a4, a5) char *fmt, *a1, *a2, *a3, *a4,
    *a5;
{
  ldisplay("DEBUG: ");
  ldisplay(fmt, a1, a2, a3, a4, a5);
  ldisplay("\n");
}


x86 assembly (clang, -O0):
<print_debug_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <ldisplay@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    $0x0,%al
call   1030 <ldisplay@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <ldisplay@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_debug_message>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <ldisplay@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
xor    %eax,%eax
call   1030 <ldisplay@plt>
lea    0xead(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <ldisplay@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"DEBUG: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_debug_message(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = load i8*, i8** %9
%17 = load i8*, i8** %10
%18 = load i8*, i8** %11
%19 = load i8*, i8** %12
%20 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %14, i8* %15, i8* %16, i8* %17, i8* %18, i8* %19)
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"DEBUG: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_debug_message(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...)*)(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5)
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ldisplay to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo017(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo017(i32 %0) {
ret void
}
int AtoI(char *str) {
  int n = 0;
  while ((*str >= '0') && (*str <= '9')) {
    n = 10 * n + *str - '0';
    str++;
  }
  return n;
}


x86 assembly (clang, -O0):
<AtoI>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1134 <AtoI+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <AtoI+0x44>
jmp    1168 <AtoI+0x68>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <AtoI+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AtoI>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <AtoI+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <AtoI+0x20>
ret

LLVM IR (-O0):
define i32 @AtoI(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ false, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %26
16: ; preds = %14
%17 = load i32, i32* %3
%18 = mul nsw i32 10, %17
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = add nsw i32 %18, %21
%23 = sub nsw i32 %22, 48
store i32 %23, i32* %3
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %2
br label %4
26: ; preds = %14
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @AtoI(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ escape(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int i;
  char s[100];
  for (i = 0; i < 100; i++) {
    s[i] = 0;
  }
  escape(s, "Michael is\t a\n");
  printf("%s", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1157 <main+0x37>
movslq -0x8(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    -0x70(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1040 <escape@plt>
lea    -0x70(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xeac(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <escape@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Michael is\09 a\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%16 = call i32 @escape(i8* %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [15 x i8] c"Michael is\09 a\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i32 @escape(i8* %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}
long long int check(long long int a, long long int b) {
  if (a >= b) {
    a = a / b;
    return a;
  } else {
    return a;
  }
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     1135 <check+0x35>
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    113d <check+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jl     1119 <check+0x19>
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     111a <check+0x1a>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i64 @check(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = sdiv i64 %0, %1
br label %6
6: ; preds = %2, %4
%7 = phi i64 [ %5, %4 ], [ %0, %2 ]
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_kill(int sig) { printf("KILL\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"KILL\00"
define void @catch_kill(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *strchr(char *, char);
char *getExtension(char *url) {
  char *tmp;
  while ((tmp = strchr(url, '.')) != NULL) {
    tmp++;
    url = tmp;
  }
  return url;
}


x86 assembly (clang, -O0):
<getExtension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1151 <getExtension+0x41>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    111c <getExtension+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getExtension>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rdi
test   %rax,%rax
jne    1120 <getExtension+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @getExtension(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = tail call i8* @strchr(i8* dereferenceable(1) %3, i8 signext 46)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
char *eval_sqstr(char *);
char *eval_dqstr(char *s) { return eval_sqstr(s); }


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

x86 assembly (clang, -O2):
<eval_dqstr>:
jmp    1030 <eval_sqstr@plt>

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

LLVM IR (-O2):
define i8* @eval_dqstr(i8* %0) {
%2 = tail call i8* @eval_sqstr(i8* %0)
ret i8* %2
}
int is_last_block(const int *mem, int fpart, int psize) {
  return (1 == mem[fpart + psize - 1]);
}


x86 assembly (clang, -O0):
<is_last_block>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rdx
mov    $0x1,%eax
cmp    (%rcx,%rdx,4),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_last_block>:
lea    (%rsi,%rdx,1),%eax
add    $0xffffffff,%eax
movslq %eax,%rcx
xor    %eax,%eax
cmpl   $0x1,(%rdi,%rcx,4)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_last_block(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 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = sub nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %7, i64 %12
%14 = load i32, i32* %13
%15 = icmp eq i32 1, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_last_block(i32* nocapture %0, i32 %1, i32 %2) {
%4 = add i32 %1, -1
%5 = add i32 %4, %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
ret i32 %10
}
void RTRandAdvSaveState(void) {}


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

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

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

LLVM IR (-O2):
define void @RTRandAdvSaveState() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Func_predrain_fence();
void pmem_drain(void) { Func_predrain_fence(); }


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

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

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

LLVM IR (-O2):
define void @pmem_drain() {
%1 = tail call i32 (...) @Func_predrain_fence()
ret void
}
int ft_toupper(char c) { return (c - (('a' <= c && c <= 'z') ? 32 : 0)); }


x86 assembly (clang, -O0):
<ft_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x61,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     1134 <ft_toupper+0x34>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x2(%rbp),%sil
xor    %ecx,%ecx
mov    $0x20,%edx
test   $0x1,%sil
cmovne %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toupper>:
lea    -0x61(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x1a,%al
setae  %cl
shl    $0x5,%ecx
lea    (%rcx,%rdi,1),%eax
add    $0xffffffe0,%eax
ret

LLVM IR (-O0):
define i32 @ft_toupper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sle i32 97, %6
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 122
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 32, i32 0
%16 = sub nsw i32 %4, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_toupper(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -97
%4 = icmp ult i8 %3, 26
%5 = select i1 %4, i32 -32, i32 0
%6 = add nsw i32 %5, %2
ret i32 %6
}
int countlist(void **list) {
  int ret = 0;
  while (list && *(list++))
    ret++;
  return ret;
}


x86 assembly (clang, -O0):
<countlist>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     1138 <countlist+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
cmpq   $0x0,(%rax)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1148 <countlist+0x48>
jmp    1156 <countlist+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <countlist+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countlist>:
xor    %eax,%eax
test   %rdi,%rdi
je     111c <countlist+0x1c>
cmpq   $0x0,(%rdi)
je     111c <countlist+0x1c>
xor    %eax,%eax
nop
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <countlist+0x10>
ret

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

LLVM IR (-O2):
define i32 @countlist(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8** [ %9, %6 ], [ %0, %3 ]
%8 = phi i32 [ %10, %6 ], [ 0, %3 ]
%9 = getelementptr inbounds i8*, i8** %7, i64 1
%10 = add nuw nsw i32 %8, 1
%11 = load i8*, i8** %9
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %10, %6 ]
ret i32 %14
}
int process_nexthop(const char *line) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @process_nexthop(i8* nocapture readnone %0) {
ret i32 -1
}