xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long power(unsigned long, unsigned long);
void powertable(unsigned long int *lookup, unsigned long int max,
                unsigned long int pow) {
  while (1) {
    lookup[max] = power(max, pow);
    if (max == 0)
      break;
    max--;
  }
}


x86 assembly (clang, -O0):
<powertable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <power@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <powertable+0x40>
jmp    1161 <powertable+0x51>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <powertable+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powertable>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <power@plt>
mov    %rax,(%r15,%rbx,8)
add    $0xffffffffffffffff,%rbx
jb     1120 <powertable+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @powertable(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
br label %7
7: ; preds = %3, %17
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i64 @power(i64 %8, i64 %9)
%11 = load i64*, i64** %4
%12 = load i64, i64* %5
%13 = getelementptr inbounds i64, i64* %11, i64 %12
store i64 %10, i64* %13
%14 = load i64, i64* %5
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %7
br label %20
17: ; preds = %7
%18 = load i64, i64* %5
%19 = add i64 %18, -1
store i64 %19, i64* %5
br label %7
20: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @powertable(i64* nocapture writeonly %0, i64 %1, i64 %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i64 [ %1, %3 ], [ %9, %4 ]
%6 = tail call i64 @power(i64 %5, i64 %2)
%7 = getelementptr inbounds i64, i64* %0, i64 %5
store i64 %6, i64* %7
%8 = icmp eq i64 %5, 0
%9 = add i64 %5, -1
br i1 %8, label %10, label %4
10: ; preds = %4
ret void
}
__attribute__((visibility("hidden"))) long hash_combine(long h1, long h2) {
  unsigned long uh1 = (unsigned long)h1;
  unsigned long uh2 = (unsigned long)h2;
  unsigned long c = uh1 ^ ((uh1 << 6) + (uh1 >> 2) + 0x9e3779b9 + uh2);
  return (long)c;
}


x86 assembly (clang, -O0):
<hash_combine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x6,%rcx
mov    -0x18(%rbp),%rdx
shr    $0x2,%rdx
add    %rdx,%rcx
movabs $0x9e3779b9,%rdx
add    %rdx,%rcx
add    -0x20(%rbp),%rcx
xor    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_combine>:
mov    %rdi,%rax
shl    $0x6,%rax
mov    %rdi,%rcx
shr    $0x2,%rcx
add    %rax,%rcx
add    %rsi,%rcx
mov    $0x9e3779b9,%eax
add    %rcx,%rax
xor    %rdi,%rax
ret

LLVM IR (-O0):
define hidden i64 @hash_combine(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
store i64 %8, i64* %5
%9 = load i64, i64* %4
store i64 %9, i64* %6
%10 = load i64, i64* %5
%11 = load i64, i64* %5
%12 = shl i64 %11, 6
%13 = load i64, i64* %5
%14 = lshr i64 %13, 2
%15 = add i64 %12, %14
%16 = add i64 %15, 2654435769
%17 = load i64, i64* %6
%18 = add i64 %16, %17
%19 = xor i64 %10, %18
store i64 %19, i64* %7
%20 = load i64, i64* %7
ret i64 %20
}

LLVM IR (-O2):
define hidden i64 @hash_combine(i64 %0, i64 %1) {
%3 = shl i64 %0, 6
%4 = lshr i64 %0, 2
%5 = add nuw nsw i64 %4, 2654435769
%6 = add i64 %5, %3
%7 = add i64 %6, %1
%8 = xor i64 %7, %0
ret i64 %8
}
void GetMillisecTime(struct MillisecTime *msTime) {}


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

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

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

LLVM IR (-O2):
%struct.MillisecTime = type opaque
define void @GetMillisecTime(%struct.MillisecTime* nocapture %0) {
ret void
}
/* Type definitions */
struct pri_sr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pri_sr *);
void pri_sr_free(struct pri_sr *sr) { free(sr); }


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

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

LLVM IR (-O0):
%struct.pri_sr = type { i32 }
define void @pri_sr_free(%struct.pri_sr* %0) {
%2 = alloca %struct.pri_sr*
store %struct.pri_sr* %0, %struct.pri_sr** %2
%3 = load %struct.pri_sr*, %struct.pri_sr** %2
%4 = call i32 @free(%struct.pri_sr* %3)
ret void
}

LLVM IR (-O2):
%struct.pri_sr = type { i32 }
define void @pri_sr_free(%struct.pri_sr* nocapture %0) {
%2 = tail call i32 @free(%struct.pri_sr* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hButtonMaybePressed(char *, char *, char *, char *,
                                       int /*<<< orphan*/);
void hButtonWithOnClick(char *name, char *label, char *msg, char *onClick) {
  hButtonMaybePressed(name, label, msg, onClick, 0);
}


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

x86 assembly (clang, -O2):
<hButtonWithOnClick>:
xor    %r8d,%r8d
jmp    1030 <hButtonMaybePressed@plt>

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

LLVM IR (-O2):
define void @hButtonWithOnClick(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @hButtonMaybePressed(i8* %0, i8* %1, i8* %2, i8* %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ line_char(char, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int num;
  printf("Enter a positive integer: ");
  scanf("%d", &num);
  line_char('*', num);
  printf("The value of the integer is no %d.\n", num);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%esi
mov    $0x2a,%edi
call   1030 <line_char@plt>
mov    -0x4(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
mov    $0x2a,%edi
call   1030 <line_char@plt>
mov    0x4(%rsp),%esi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter a positive integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [36 x i8] c"The value of the integer is no %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @line_char(i8 signext 42, i32 %4)
%6 = load i32, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter a positive integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [36 x i8] c"The value of the integer is no %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @line_char(i8 signext 42, i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
void f4(void) {}


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

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

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

LLVM IR (-O2):
define void @f4() {
ret void
}
void signal_handler(int signum) {}


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

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

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

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ help(char const *);
void help_die(const char *argv0) {
  help(argv0);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<help_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <help@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help_die>:
push   %rax
call   1030 <help@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @help_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @help(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @help_die(i8* %0) {
%2 = tail call i32 @help(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ event_base_dispatch(void *);
void libevent_ctx_run(void *priv) { event_base_dispatch(priv); }


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

x86 assembly (clang, -O2):
<libevent_ctx_run>:
jmp    1030 <event_base_dispatch@plt>

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

LLVM IR (-O2):
define void @libevent_ctx_run(i8* %0) {
%2 = tail call i32 @event_base_dispatch(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_msg(char *);
void log_timeout() { log_msg("DAT: timer expired"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"DAT: timer expired\00"
define void @log_timeout() {
%1 = call i32 @log_msg(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"DAT: timer expired\00"
define void @log_timeout() {
%1 = tail call i32 @log_msg(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void multiplication(int x, int y) { printf("%i\n", (x * y)); }


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

x86 assembly (clang, -O2):
<multiplication>:
imul   %edi,%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @multiplication(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ work_hard();
void do_something(int shall_i_work) {
  if (shall_i_work) {
    work_hard();
    work_hard();
    work_hard();
    work_hard();
    work_hard();
    work_hard();
    work_hard();
    work_hard();
  }
}


x86 assembly (clang, -O0):
<do_something>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115d <do_something+0x4d>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
mov    $0x0,%al
call   1030 <work_hard@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_something>:
test   %edi,%edi
je     114e <do_something+0x3e>
push   %rax
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
call   1030 <work_hard@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <work_hard@plt>
ret

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

LLVM IR (-O2):
define void @do_something(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = tail call i32 (...) @work_hard()
%5 = tail call i32 (...) @work_hard()
%6 = tail call i32 (...) @work_hard()
%7 = tail call i32 (...) @work_hard()
%8 = tail call i32 (...) @work_hard()
%9 = tail call i32 (...) @work_hard()
%10 = tail call i32 (...) @work_hard()
%11 = tail call i32 (...) @work_hard()
br label %12
12: ; preds = %3, %1
ret void
}
/* Type definitions */
struct LinearListNode {
  int dummy;
};
struct LinearList {
  int dummy;
};

/* Variables and functions */
struct LinearListNode *private_LinearList_Search(struct LinearList *, int);
struct LinearListNode *LinearList_Search(struct LinearList *list, int value) {
  if (list == NULL)
    return NULL;
  return private_LinearList_Search(list, value);
}


x86 assembly (clang, -O0):
<LinearList_Search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <LinearList_Search+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1147 <LinearList_Search+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <private_LinearList_Search@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LinearList_Search>:
test   %rdi,%rdi
je     111a <LinearList_Search+0xa>
jmp    1030 <private_LinearList_Search@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.LinearListNode = type { i32 }
%struct.LinearList = type { i32 }
define %struct.LinearListNode* @LinearList_Search(%struct.LinearList* %0, i32 %1) {
%3 = alloca %struct.LinearListNode*
%4 = alloca %struct.LinearList*
%5 = alloca i32
store %struct.LinearList* %0, %struct.LinearList** %4
store i32 %1, i32* %5
%6 = load %struct.LinearList*, %struct.LinearList** %4
%7 = icmp eq %struct.LinearList* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store %struct.LinearListNode* null, %struct.LinearListNode** %3
br label %13
9: ; preds = %2
%10 = load %struct.LinearList*, %struct.LinearList** %4
%11 = load i32, i32* %5
%12 = call %struct.LinearListNode* @private_LinearList_Search(%struct.LinearList* %10, i32 %11)
store %struct.LinearListNode* %12, %struct.LinearListNode** %3
br label %13
13: ; preds = %9, %8
%14 = load %struct.LinearListNode*, %struct.LinearListNode** %3
ret %struct.LinearListNode* %14
}

LLVM IR (-O2):
%struct.LinearListNode = type { i32 }
%struct.LinearList = type { i32 }
define %struct.LinearListNode* @LinearList_Search(%struct.LinearList* %0, i32 %1) {
%3 = icmp eq %struct.LinearList* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call %struct.LinearListNode* @private_LinearList_Search(%struct.LinearList* %0, i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi %struct.LinearListNode* [ %5, %4 ], [ null, %2 ]
ret %struct.LinearListNode* %7
}
/* Variables and functions */
int _get_create_bumpdrop(float);
int get_create_lbump(float lag) {
  int b = _get_create_bumpdrop(lag);
  if (b > 100000)
    return b;
  return ((b >> 1) & 0x1);
}


x86 assembly (clang, -O0):
<get_create_lbump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <_get_create_bumpdrop@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x186a0,-0xc(%rbp)
jle    1142 <get_create_lbump+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <get_create_lbump+0x3e>
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_create_lbump>:
push   %rax
call   1030 <_get_create_bumpdrop@plt>
mov    %eax,%ecx
shr    %ecx
and    $0x1,%ecx
cmp    $0x186a1,%eax
cmovl  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_create_lbump(float %0) {
%2 = tail call i32 @_get_create_bumpdrop(float %0)
%3 = icmp sgt i32 %2, 100000
%4 = lshr i32 %2, 1
%5 = and i32 %4, 1
%6 = select i1 %3, i32 %2, i32 %5
ret i32 %6
}
float am_finvsqrt(float x) {
  float xhalf = 0.5f * x;
  int i = *(int *)&x;
  i = 0x5f375a86 - (i >> 1);
  x = *(float *)&i;
  x = x * (1.5f - xhalf * x * x);
  x = x * (1.5f - xhalf * x * x);
  return x;
}


x86 assembly (clang, -O0):
<am_finvsqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
mov    $0x5f375a86,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe98(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe5e(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<am_finvsqrt>:
movd   %xmm0,%eax
sar    %eax
mov    $0x5f375a86,%ecx
sub    %eax,%ecx
movd   %ecx,%xmm1
mulss  0xee7(%rip),%xmm0
movaps %xmm0,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm1,%xmm2
movss  0xed8(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm3,%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @am_finvsqrt(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %2
%5 = load float, float* %2
%6 = fmul float 5.000000e-01, %5
store float %6, float* %3
%7 = bitcast float* %2 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = ashr i32 %9, 1
%11 = sub nsw i32 1597463174, %10
store i32 %11, i32* %4
%12 = bitcast i32* %4 to float*
%13 = load float, float* %12
store float %13, float* %2
%14 = load float, float* %2
%15 = load float, float* %3
%16 = load float, float* %2
%17 = fmul float %15, %16
%18 = load float, float* %2
%19 = fneg float %17
%20 = call float @llvm.fmuladd.f32(float %19, float %18, float 1.500000e+00)
%21 = fmul float %14, %20
store float %21, float* %2
%22 = load float, float* %2
%23 = load float, float* %3
%24 = load float, float* %2
%25 = fmul float %23, %24
%26 = load float, float* %2
%27 = fneg float %25
%28 = call float @llvm.fmuladd.f32(float %27, float %26, float 1.500000e+00)
%29 = fmul float %22, %28
store float %29, float* %2
%30 = load float, float* %2
ret float %30
}

LLVM IR (-O2):
define float @am_finvsqrt(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = sub nsw i32 1597463174, %3
%5 = bitcast i32 %4 to float
%6 = fmul float %0, -5.000000e-01
%7 = fmul float %6, %5
%8 = tail call float @llvm.fmuladd.f32(float %7, float %5, float 1.500000e+00)
%9 = fmul float %8, %5
%10 = fmul float %6, %9
%11 = tail call float @llvm.fmuladd.f32(float %10, float %9, float 1.500000e+00)
%12 = fmul float %9, %11
ret float %12
}
float Quad__easeOut(float t, float b, float c, float d, float p0, float p1) {
  return -c * (t /= d) * (t - 2) + b;
}


x86 assembly (clang, -O0):
<Quad__easeOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
divss  %xmm2,%xmm1
movss  %xmm1,-0x4(%rbp)
mulss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xea8(%rip),%xmm1
subss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Quad__easeOut>:
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
addss  0xef0(%rip),%xmm0
mulss  %xmm2,%xmm0
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Quad__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = fneg float %13
%15 = load float, float* %10
%16 = load float, float* %7
%17 = fdiv float %16, %15
store float %17, float* %7
%18 = fmul float %14, %17
%19 = load float, float* %7
%20 = fsub float %19, 2.000000e+00
%21 = load float, float* %8
%22 = call float @llvm.fmuladd.f32(float %18, float %20, float %21)
ret float %22
}

LLVM IR (-O2):
define float @Quad__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fneg float %2
%8 = fdiv float %0, %3
%9 = fmul float %8, %7
%10 = fadd float %8, -2.000000e+00
%11 = tail call float @llvm.fmuladd.f32(float %9, float %10, float %1)
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void WebPFree(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @WebPFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int check_pop_cb(void *cb_ctx) {
  int *depth = (int *)cb_ctx;
  --(*depth);
  return 1;
}


x86 assembly (clang, -O0):
<check_pop_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pop_cb>:
addl   $0xffffffff,(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @check_pop_cb(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = add nsw i32 %7, -1
store i32 %8, i32* %6
ret i32 1
}

LLVM IR (-O2):
define i32 @check_pop_cb(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
ret i32 1
}
int Round(float x) { return (x + 0.5); }


x86 assembly (clang, -O0):
<Round>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Round>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @Round(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @Round(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, 5.000000e-01
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ memcpy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char const *get_shell(void) {
  static char ret[255];
  char *env;
  env = getenv("SHELL");
  memcpy(ret, env, strlen(env));
  return ret;
}


x86 assembly (clang, -O0):
<get_shell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0x2eea(%rip),%rdi
call   1050 <memcpy@plt>
lea    0x2ede(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shell>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
lea    0x2efe(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@get_shell.ret = internal global [255 x i8] zeroinitializer
@.str = [6 x i8] c"SHELL\00"
define i8* @get_shell() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @memcpy(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @get_shell.ret, i64 0, i64 0), i8* %3, i32 %5)
ret i8* getelementptr inbounds ([255 x i8], [255 x i8]* @get_shell.ret, i64 0, i64 0)
}

LLVM IR (-O2):
@get_shell.ret = internal global [255 x i8] zeroinitializer
@.str = [6 x i8] c"SHELL\00"
define i8* @get_shell() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @strlen(i8* %1)
%3 = tail call i32 @memcpy(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @get_shell.ret, i64 0, i64 0), i8* %1, i32 %2)
ret i8* getelementptr inbounds ([255 x i8], [255 x i8]* @get_shell.ret, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vsnprintf(char *, unsigned long, char const *, int /*<<< orphan*/);
int rtapi_vsnprintf(char *buffer, unsigned long int size, const char *fmt,
                    va_list args) {
  return vsnprintf(buffer, size, fmt, args);
}


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

x86 assembly (clang, -O2):
<rtapi_vsnprintf>:
jmp    1030 <vsnprintf@plt>

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

LLVM IR (-O2):
define i32 @rtapi_vsnprintf(i8* nocapture %0, i64 %1, i8* nocapture %2, i32 %3) {
%5 = tail call i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3)
ret i32 %5
}
unsigned int swap_endian(unsigned int value) {
  return (value << 24) | ((value << 8) & 0x00FF0000) |
         ((value >> 8) & 0x0000FF00) | (value >> 24);
}


x86 assembly (clang, -O0):
<swap_endian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_endian>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @swap_endian(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = and i32 %6, 16711680
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = lshr i32 %9, 8
%11 = and i32 %10, 65280
%12 = or i32 %8, %11
%13 = load i32, i32* %2
%14 = lshr i32 %13, 24
%15 = or i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @swap_endian(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ UpMouse247(unsigned char);
void upmouse(unsigned char m) { UpMouse247(m); }


x86 assembly (clang, -O0):
<upmouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <UpMouse247@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upmouse>:
jmp    1030 <UpMouse247@plt>

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

LLVM IR (-O2):
define void @upmouse(i8 zeroext %0) {
%2 = tail call i32 @UpMouse247(i8 zeroext %0)
ret void
}
/* Variables and functions */
int INT_MAX;
int INT_MIN;
int int_divide(int left, int right) {
  int result;
  if (right == 0) {
    if (left < 0) {
      result = INT_MIN;
    } else if (left == 0) {
      result = 0;
    } else {
      result = INT_MAX;
    }
  } else {
    result = left / right;
  }
  return result;
}


x86 assembly (clang, -O0):
<int_divide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    115b <int_divide+0x5b>
cmpl   $0x0,-0x4(%rbp)
jge    112f <int_divide+0x2f>
mov    0x2ebb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <int_divide+0x56>
cmpl   $0x0,-0x4(%rbp)
jne    1145 <int_divide+0x45>
movl   $0x0,-0xc(%rbp)
jmp    1151 <int_divide+0x51>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <int_divide+0x56>
jmp    1165 <int_divide+0x65>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_divide>:
mov    %edi,%eax
test   %esi,%esi
je     110a <int_divide+0xa>
cltd
idiv   %esi
ret
test   %eax,%eax
js     111a <int_divide+0x1a>
je     1109 <int_divide+0x9>
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
ret
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
@INT_MAX = global i32 0
define i32 @int_divide(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 = icmp eq i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = load i32, i32* @INT_MIN
store i32 %12, i32* %5
br label %20
13: ; preds = %8
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %5
br label %19
17: ; preds = %13
%18 = load i32, i32* @INT_MAX
store i32 %18, i32* %5
br label %19
19: ; preds = %17, %16
br label %20
20: ; preds = %19, %11
br label %25
21: ; preds = %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = sdiv i32 %22, %23
store i32 %24, i32* %5
br label %25
25: ; preds = %21, %20
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
@INT_MIN = global i32 0
@INT_MAX = global i32 0
define i32 @int_divide(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = icmp slt i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = load i32, i32* @INT_MIN
br label %14
8: ; preds = %4
%9 = icmp eq i32 %0, 0
%10 = load i32, i32* @INT_MAX
%11 = select i1 %9, i32 0, i32 %10
br label %14
12: ; preds = %2
%13 = sdiv i32 %0, %1
br label %14
14: ; preds = %8, %6, %12
%15 = phi i32 [ %7, %6 ], [ %13, %12 ], [ %11, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ ns2i(float, float, float, float, float, float);
void ns2i_(float *x, float *y, float *z, float *red, float *green,
           float *blue) {
  ns2i(*x, *y, *z, *red, *green, *blue);
}


x86 assembly (clang, -O0):
<ns2i_>:
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)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm5
call   1030 <ns2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns2i_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
movss  (%r9),%xmm5
jmp    1030 <ns2i@plt>

LLVM IR (-O0):
define void @ns2i_(float* %0, float* %1, float* %2, float* %3, float* %4, float* %5) {
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
store float* %0, float** %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = load float*, float** %11
%22 = load float, float* %21
%23 = load float*, float** %12
%24 = load float, float* %23
%25 = call i32 @ns2i(float %14, float %16, float %18, float %20, float %22, float %24)
ret void
}

LLVM IR (-O2):
define void @ns2i_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4, float* nocapture %5) {
%7 = load float, float* %0
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = load float, float* %5
%13 = tail call i32 @ns2i(float %7, float %8, float %9, float %10, float %11, float %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_wait();
int /*<<< orphan*/ outb(unsigned char, int);
void outb_p(unsigned char value, int port) {
  outb(value, port);
  io_wait();
}


x86 assembly (clang, -O0):
<outb_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movzbl %al,%edi
call   1030 <outb@plt>
mov    $0x0,%al
call   1040 <io_wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @outb_p(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = load i32, i32* %4
%7 = call i32 @outb(i8 zeroext %5, i32 %6)
%8 = call i32 (...) @io_wait()
ret void
}

LLVM IR (-O2):
define void @outb_p(i8 zeroext %0, i32 %1) {
%3 = tail call i32 @outb(i8 zeroext %0, i32 %1)
%4 = tail call i32 (...) @io_wait()
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_37(uint64_t x) {
  __asm__("rolq $37, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_37>:
mov    %rdi,%rax
rol    $0x25,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_37(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$37, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_37(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$37, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Type definitions */
struct md5_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ md5_write(struct md5_s *, void const *, size_t);
void AddMD5(struct md5_s *restrict h, const void *data, size_t len) {
  md5_write(h, data, len);
}


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

x86 assembly (clang, -O2):
<AddMD5>:
jmp    1030 <md5_write@plt>

LLVM IR (-O0):
%struct.md5_s = type { i32 }
define void @AddMD5(%struct.md5_s* noalias %0, i8* %1, i64 %2) {
%4 = alloca %struct.md5_s*
%5 = alloca i8*
%6 = alloca i64
store %struct.md5_s* %0, %struct.md5_s** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.md5_s*, %struct.md5_s** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @md5_write(%struct.md5_s* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
%struct.md5_s = type { i32 }
define void @AddMD5(%struct.md5_s* noalias %0, i8* %1, i64 %2) {
%4 = tail call i32 @md5_write(%struct.md5_s* %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/ const, int /*<<< orphan*/);
int _mm_cvtsi128_si32(int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_sad_epu8(int /*<<< orphan*/ const,
                                int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_setzero_si128();
int /*<<< orphan*/ _mm_shuffle_epi32(int /*<<< orphan*/ const, int);
int VP8HorizontalAdd8b(const __m128i *const a) {
  const __m128i zero = _mm_setzero_si128();
  const __m128i sad8x2 = _mm_sad_epu8(*a, zero);
  const __m128i sum = _mm_add_epi32(sad8x2, _mm_shuffle_epi32(sad8x2, 2));
  return _mm_cvtsi128_si32(sum);
}


x86 assembly (clang, -O0):
<VP8HorizontalAdd8b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <_mm_setzero_si128@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
call   1070 <_mm_sad_epu8@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x2,%esi
call   1060 <_mm_shuffle_epi32@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <_mm_add_epi32@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm_cvtsi128_si32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VP8HorizontalAdd8b>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_mm_setzero_si128@plt>
mov    (%rbx),%edi
mov    %eax,%esi
call   1070 <_mm_sad_epu8@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x2,%esi
call   1060 <_mm_shuffle_epi32@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_add_epi32@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <_mm_cvtsi128_si32@plt>

LLVM IR (-O0):
define i32 @VP8HorizontalAdd8b(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = call i32 (...) @_mm_setzero_si128()
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = load i32, i32* %3
%10 = call i32 @_mm_sad_epu8(i32 %8, i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @_mm_shuffle_epi32(i32 %12, i32 2)
%14 = call i32 @_mm_add_epi32(i32 %11, i32 %13)
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = call i32 @_mm_cvtsi128_si32(i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @VP8HorizontalAdd8b(i32* nocapture %0) {
%2 = tail call i32 (...) @_mm_setzero_si128()
%3 = load i32, i32* %0
%4 = tail call i32 @_mm_sad_epu8(i32 %3, i32 %2)
%5 = tail call i32 @_mm_shuffle_epi32(i32 %4, i32 2)
%6 = tail call i32 @_mm_add_epi32(i32 %4, i32 %5)
%7 = tail call i32 @_mm_cvtsi128_si32(i32 %6)
ret i32 %7
}
void init_timers(void) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @init_timers() {
ret void
}
void f4(void) {
#pragma omp declare reduction(f4:long : omp_out += omp_in)
#pragma omp declare reduction(f4 : long int : omp_out += omp_in)
#pragma omp declare reduction(f4 : short unsigned : omp_out += omp_in)
#pragma omp declare reduction(f4 : short int : omp_out += omp_in)
}


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

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

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

LLVM IR (-O2):
define void @f4() {
ret void
}
int g3(int a, int b) {
  return ((a) < (((b) > (a) ? (b) : (a))) ? (a) : (((b) > (a) ? (b) : (a))));
}


x86 assembly (clang, -O0):
<g3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1127 <g3+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    112d <g3+0x2d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1146 <g3+0x46>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <g3+0x69>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    115d <g3+0x5d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1163 <g3+0x63>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @g3(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 = load i32, i32* %3
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
br label %13
11: ; preds = %2
%12 = load i32, i32* %3
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
%15 = icmp slt i32 %5, %14
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32, i32* %3
br label %28
18: ; preds = %13
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = load i32, i32* %4
br label %26
24: ; preds = %18
%25 = load i32, i32* %3
br label %26
26: ; preds = %24, %22
%27 = phi i32 [ %23, %22 ], [ %25, %24 ]
br label %28
28: ; preds = %26, %16
%29 = phi i32 [ %17, %16 ], [ %27, %26 ]
ret i32 %29
}

LLVM IR (-O2):
define i32 @g3(i32 returned %0, i32 %1) {
ret i32 %0
}
unsigned long int f91(unsigned long int n) {
  if (n >= 101) {
    n -= 10;
    return n;
  } else
    return f91(f91(n + 11));
}


x86 assembly (clang, -O0):
<f91>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x65,-0x10(%rbp)
jb     1140 <f91+0x30>
mov    -0x10(%rbp),%rax
sub    $0xa,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <f91+0x49>
mov    -0x10(%rbp),%rdi
add    $0xb,%rdi
call   1030 <f91@plt>
mov    %rax,%rdi
call   1030 <f91@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f91>:
push   %rax
mov    %rdi,%rax
cmp    $0x64,%rdi
ja     1132 <f91+0x22>
nopw   0x0(%rax,%rax,1)
add    $0xb,%rax
mov    %rax,%rdi
call   1030 <f91@plt>
cmp    $0x64,%rax
jbe    1120 <f91+0x10>
add    $0xfffffffffffffff6,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @f91(i64 %0) {
%2 = icmp ugt i64 %0, 100
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi i64 [ %0, %1 ], [ %9, %6 ]
%5 = add i64 %4, -10
ret i64 %5
6: ; preds = %1, %6
%7 = phi i64 [ %9, %6 ], [ %0, %1 ]
%8 = add nuw nsw i64 %7, 11
%9 = tail call i64 @f91(i64 %8)
%10 = icmp ugt i64 %9, 100
br i1 %10, label %3, label %6
}
int test_endianness() {
  union doubleword {
    double d;
    unsigned long u[2];
  } dw;
  dw.d = 10;
  return dw.u[0] != 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<test_endianness>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.doubleword = type { [2 x i64] }
define i32 @test_endianness() {
%1 = alloca %union.doubleword
%2 = bitcast %union.doubleword* %1 to double*
store double 1.000000e+01, double* %2
%3 = bitcast %union.doubleword* %1 to [2 x i64]*
%4 = getelementptr inbounds [2 x i64], [2 x i64]* %3, i64 0, i64 0
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 1, i32 0
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_endianness() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void mmio_write(void *reg, uint32_t data) {
  *(volatile uint32_t *)(reg) = data;
}


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

x86 assembly (clang, -O2):
<mmio_write>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @mmio_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @mmio_write(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store volatile i32 %1, i32* %3
ret void
}