xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strtok_r(char *, char const *, char **);
char *strtok(char *str, const char *delim) {
  static char *ptr;
  return strtok_r(str, delim, &ptr);
}


x86 assembly (clang, -O0):
<strtok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0x2f01(%rip),%rdx
call   1030 <strtok_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtok>:
lea    0x2f19(%rip),%rdx
jmp    1030 <strtok_r@plt>

LLVM IR (-O0):
@strtok.ptr = internal global i8* null
define i8* @strtok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @strtok_r(i8* %5, i8* %6, i8** @strtok.ptr)
ret i8* %7
}

LLVM IR (-O2):
@strtok.ptr = internal global i8* null
define i8* @strtok(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strtok_r(i8* %0, i8* %1, i8** @strtok.ptr)
ret i8* %3
}
int hashstr(char *str, int sz) {
  unsigned int h;
  int c;
  h = 5381;
  while ((c = *str++))
    h = ((h << 5) + h) + c;
  return (int)(h % sz);
}


x86 assembly (clang, -O0):
<hashstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1144 <hashstr+0x44>
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <hashstr+0x12>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashstr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1139 <hashstr+0x39>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <hashstr+0x20>
jmp    113e <hashstr+0x3e>
mov    $0x1505,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hashstr(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i32 [ %12, %5 ], [ 5381, %2 ]
%9 = sext i8 %6 to i32
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = mul i32 %8, 33
%12 = add i32 %11, %9
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 5381, %2 ], [ %12, %5 ]
%17 = urem i32 %16, %1
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ helpindex_load(int);
void helpindex_init(void) { helpindex_load((-1)); }


x86 assembly (clang, -O0):
<helpindex_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <helpindex_load@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<helpindex_init>:
mov    $0xffffffff,%edi
jmp    1030 <helpindex_load@plt>

LLVM IR (-O0):
define void @helpindex_init() {
%1 = call i32 @helpindex_load(i32 -1)
ret void
}

LLVM IR (-O2):
define void @helpindex_init() {
%1 = tail call i32 @helpindex_load(i32 -1)
ret void
}
/* Variables and functions */
char *strchrnul(const char *s, int c) {
  while (*s && *s != (char)c)
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1135 <strchrnul+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1145 <strchrnul+0x45>
jmp    1156 <strchrnul+0x56>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchrnul+0x23>
movsbl %sil,%edx
nopl   (%rax)
movsbl %cl,%ecx
cmp    %ecx,%edx
je     1123 <strchrnul+0x23>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchrnul+0x10>
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2
%6 = shl i32 %1, 24
%7 = ashr exact i32 %6, 24
br label %8
8: ; preds = %5, %13
%9 = phi i8 [ %3, %5 ], [ %15, %13 ]
%10 = phi i8* [ %0, %5 ], [ %14, %13 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %7, %11
br i1 %12, label %17, label %13
13: ; preds = %8
%14 = getelementptr inbounds i8, i8* %10, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %8
17: ; preds = %8, %13, %2
%18 = phi i8* [ %0, %2 ], [ %14, %13 ], [ %10, %8 ]
ret i8* %18
}
/* Type definitions */
struct net_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WARN_ON(int);
struct net_device *alloc_etherdev(int);
struct net_device *alloc_etherdev_mq(int sizeof_priv,
                                     unsigned int queue_count) {
  WARN_ON(queue_count != 1);
  return alloc_etherdev(sizeof_priv);
}


x86 assembly (clang, -O0):
<alloc_etherdev_mq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <WARN_ON@plt>
mov    -0x4(%rbp),%edi
call   1040 <alloc_etherdev@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_etherdev_mq>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x1,%esi
setne  %dil
call   1030 <WARN_ON@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <alloc_etherdev@plt>

LLVM IR (-O0):
%struct.net_device = type { i32 }
define %struct.net_device* @alloc_etherdev_mq(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @WARN_ON(i32 %7)
%9 = load i32, i32* %3
%10 = call %struct.net_device* @alloc_etherdev(i32 %9)
ret %struct.net_device* %10
}

LLVM IR (-O2):
%struct.net_device = type { i32 }
define %struct.net_device* @alloc_etherdev_mq(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, 1
%4 = zext i1 %3 to i32
%5 = tail call i32 @WARN_ON(i32 %4)
%6 = tail call %struct.net_device* @alloc_etherdev(i32 %0)
ret %struct.net_device* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f1_print(int n) { printf("f1 n=%d\n", n); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"f1 n=%d\0A\00"
define void @f1_print(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"f1 n=%d\0A\00"
define void @f1_print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Widget;

/* Variables and functions */
int /*<<< orphan*/ XFlush(int /*<<< orphan*/);
int /*<<< orphan*/ XUndefineCursor(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ XtDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XtWindow(int /*<<< orphan*/);
void TurnOffHourGlass(Widget w) {
  XUndefineCursor(XtDisplay(w), XtWindow(w));
  XFlush(XtDisplay(w));
}


x86 assembly (clang, -O0):
<TurnOffHourGlass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <XtWindow@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1050 <XUndefineCursor@plt>
mov    -0x4(%rbp),%edi
call   1040 <XtDisplay@plt>
mov    %eax,%edi
call   1060 <XFlush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TurnOffHourGlass>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <XtDisplay@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <XtWindow@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1050 <XUndefineCursor@plt>
mov    %ebx,%edi
call   1040 <XtDisplay@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <XFlush@plt>

LLVM IR (-O0):
define void @TurnOffHourGlass(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @XtDisplay(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @XtWindow(i32 %5)
%7 = call i32 @XUndefineCursor(i32 %4, i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @XtDisplay(i32 %8)
%10 = call i32 @XFlush(i32 %9)
ret void
}

LLVM IR (-O2):
define void @TurnOffHourGlass(i32 %0) {
%2 = tail call i32 @XtDisplay(i32 %0)
%3 = tail call i32 @XtWindow(i32 %0)
%4 = tail call i32 @XUndefineCursor(i32 %2, i32 %3)
%5 = tail call i32 @XtDisplay(i32 %0)
%6 = tail call i32 @XFlush(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command_end();
scalar_t__ get_hex(int);
unsigned char *get_address(void) {
  unsigned char *r = (unsigned char *)get_hex(7);
  command_end();
  return r;
}


x86 assembly (clang, -O0):
<get_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7,%edi
call   1040 <get_hex@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <command_end@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_address>:
push   %rbx
mov    $0x7,%edi
call   1040 <get_hex@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <command_end@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @get_address() {
%1 = alloca i8*
%2 = call i64 @get_hex(i32 7)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = call i32 (...) @command_end()
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
define i8* @get_address() {
%1 = tail call i64 @get_hex(i32 7)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 (...) @command_end()
ret i8* %2
}
void rop3_81_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_81_0_0>:
not    %dl
and    %sil,%dl
or     (%rdi),%dl
not    %dl
mov    %dl,(%rdi)
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ exec_op_cb(int /*<<< orphan*/);
void op_pref_cb(void *_a, void *_b) {
  uint8_t *a = (uint8_t *)_a;
  exec_op_cb(*a);
}


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

x86 assembly (clang, -O2):
<op_pref_cb>:
mov    (%rdi),%edi
jmp    1030 <exec_op_cb@plt>

LLVM IR (-O0):
define void @op_pref_cb(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = call i32 @exec_op_cb(i32 %9)
ret void
}

LLVM IR (-O2):
define void @op_pref_cb(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @exec_op_cb(i32 %4)
ret void
}
int func2(int value) {
  int i;
  int result = 0;
  for (i = 0; i < 5; i++)
    result += value >> i;
  result >>= 1;
  return result;
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    113b <func2+0x3b>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <func2+0x15>
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
mov    %edi,%eax
sar    %eax
add    %edi,%eax
mov    %edi,%ecx
sar    $0x2,%ecx
add    %eax,%ecx
mov    %edi,%eax
sar    $0x3,%eax
add    %ecx,%eax
sar    $0x4,%edi
add    %edi,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @func2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = ashr i32 %9, %10
%12 = load i32, i32* %4
%13 = add nsw i32 %12, %11
store i32 %13, i32* %4
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
%18 = load i32, i32* %4
%19 = ashr i32 %18, 1
store i32 %19, i32* %4
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @func2(i32 %0) {
%2 = ashr i32 %0, 1
%3 = add nsw i32 %2, %0
%4 = ashr i32 %0, 2
%5 = add nsw i32 %3, %4
%6 = ashr i32 %0, 3
%7 = add nsw i32 %5, %6
%8 = ashr i32 %0, 4
%9 = add nsw i32 %7, %8
%10 = ashr i32 %9, 1
ret i32 %10
}
const char *Filter_Definition(void) {
  return "struct Filter {\n"
         "  var iter;\n"
         "  var func;\n"
         "};\n";
}


x86 assembly (clang, -O0):
<Filter_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [44 x i8] c"struct Filter {\0A var iter;\0A var func;\0A};\0A\00"
define i8* @Filter_Definition() {
ret i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [44 x i8] c"struct Filter {\0A var iter;\0A var func;\0A};\0A\00"
define i8* @Filter_Definition() {
ret i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ input_joystick_available();
char const *lang_get(char *);
const char *f_input_right() {
  return lang_get(input_joystick_available() ? "INPUT_JOY_RIGHT"
                                             : "INPUT_KEYB_RIGHT");
}


x86 assembly (clang, -O0):
<f_input_right>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <input_joystick_available@plt>
mov    %rax,%rcx
lea    0xedb(%rip),%rdi
lea    0xec4(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
call   1030 <lang_get@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_input_right>:
push   %rax
xor    %eax,%eax
call   1040 <input_joystick_available@plt>
test   %rax,%rax
lea    0xede(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
pop    %rax
jmp    1030 <lang_get@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"INPUT_JOY_RIGHT\00"
@.str.1 = [17 x i8] c"INPUT_KEYB_RIGHT\00"
define i8* @f_input_right() {
%1 = call i64 (...) @input_joystick_available()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0)
%5 = call i8* @lang_get(i8* %4)
ret i8* %5
}

LLVM IR (-O2):
@.str = [16 x i8] c"INPUT_JOY_RIGHT\00"
@.str.1 = [17 x i8] c"INPUT_KEYB_RIGHT\00"
define i8* @f_input_right() {
%1 = tail call i64 (...) @input_joystick_available()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
%4 = tail call i8* @lang_get(i8* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ usleep(float);
void fsleep(float seconds) { usleep(seconds * 1e6); }


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

x86 assembly (clang, -O2):
<fsleep>:
mulss  0xee8(%rip),%xmm0
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @fsleep(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 1.000000e+06
%6 = fptrunc double %5 to float
%7 = call i32 @usleep(float %6)
ret void
}

LLVM IR (-O2):
define void @fsleep(float %0) {
%2 = fmul float %0, 1.000000e+06
%3 = tail call i32 @usleep(float %2)
ret void
}
/* Variables and functions */
bool nrf53_errata_7(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_7() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ asm_test_C();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  asm_test_C();
  printf("all done\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <asm_test_C@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"all done\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @asm_test_C()
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"all done\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @asm_test_C()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Iteration();
int main() {
  for (;;)
    Iteration();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Iteration@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <Iteration@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 (...) @Iteration()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @Iteration()
br label %1
}
int foo() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
/* Variables and functions */
int inb_p(int);
void mach_countup(unsigned long *count_p) {
  unsigned long count = 0;
  do {
    count++;
  } while ((inb_p(0x61) & 0x20) == 0);
  *count_p = count;
}


x86 assembly (clang, -O0):
<mach_countup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    $0x61,%edi
call   1030 <inb_p@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     1124 <mach_countup+0x14>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mach_countup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
add    $0x1,%rbx
mov    $0x61,%edi
call   1030 <inb_p@plt>
test   $0x20,%al
je     1120 <mach_countup+0x10>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mach_countup(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
store i64* %0, i64** %2
store i64 0, i64* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %3
%6 = add i64 %5, 1
store i64 %6, i64* %3
br label %7
7: ; preds = %4
%8 = call i32 @inb_p(i32 97)
%9 = and i32 %8, 32
%10 = icmp eq i32 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %7
%12 = load i64, i64* %3
%13 = load i64*, i64** %2
store i64 %12, i64* %13
ret void
}

LLVM IR (-O2):
define void @mach_countup(i64* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %4, %2 ]
%4 = add i64 %3, 1
%5 = tail call i32 @inb_p(i32 97)
%6 = and i32 %5, 32
%7 = icmp eq i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %2
store i64 %4, i64* %0
ret void
}
void rop3_175_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~T;
  stk1 = *D | stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

x86 assembly (clang, -O2):
<rop3_175_1_1>:
or     %edx,%esi
mov    %edx,%eax
not    %al
mov    (%rdi),%cl
or     %cl,%al
not    %sil
and    %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

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

/* Variables and functions */
uint8_t *recv_diag_data(uint8_t *data) { return data + 4; }


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

x86 assembly (clang, -O2):
<recv_diag_data>:
lea    0x10(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @recv_diag_data(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
ret i32* %4
}

LLVM IR (-O2):
define i32* @recv_diag_data(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
ret i32* %2
}
double f4_sum_pre_int_int_int_int_long(int v0, int v1, int v2, int v3, long v) {
  return (double)v0 + (double)v1 + (double)v2 + (double)v3 + ((double)(v));
}


x86 assembly (clang, -O0):
<f4_sum_pre_int_int_int_int_long>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdq -0x18(%rbp),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_sum_pre_int_int_int_int_long>:
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
cvtsi2sd %edx,%xmm2
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %ecx,%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r8,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f4_sum_pre_int_int_int_int_long(i32 %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to double
%13 = load i32, i32* %7
%14 = sitofp i32 %13 to double
%15 = fadd double %12, %14
%16 = load i32, i32* %8
%17 = sitofp i32 %16 to double
%18 = fadd double %15, %17
%19 = load i32, i32* %9
%20 = sitofp i32 %19 to double
%21 = fadd double %18, %20
%22 = load i64, i64* %10
%23 = sitofp i64 %22 to double
%24 = fadd double %21, %23
ret double %24
}

LLVM IR (-O2):
define double @f4_sum_pre_int_int_int_int_long(i32 %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = sitofp i32 %0 to double
%7 = sitofp i32 %1 to double
%8 = fadd double %6, %7
%9 = sitofp i32 %2 to double
%10 = fadd double %8, %9
%11 = sitofp i32 %3 to double
%12 = fadd double %10, %11
%13 = sitofp i64 %4 to double
%14 = fadd double %12, %13
ret double %14
}
void main() {
  int i;
  i = 1;
  while (1) {
    i = i * 2;
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %0, %2
%3 = load i32, i32* %1
%4 = mul nsw i32 %3, 2
store i32 %4, i32* %1
br label %2
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void txt_write_in_file(FILE *file, char *bytes) {
  fprintf(file, "%s", bytes);
  fflush(file);
}


x86 assembly (clang, -O0):
<txt_write_in_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_write_in_file>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <fputs@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @txt_write_in_file(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 @fflush(i32* %8)
ret void
}

LLVM IR (-O2):
define void @txt_write_in_file(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fputs(i8* %1, i32* %0)
%4 = tail call i32 @fflush(i32* %0)
ret void
}
int getch() { return (-1); }


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

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

LLVM IR (-O0):
define i32 @getch() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @getch() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ AK_debmod_print_function_use(char const *,
                                                int /*<<< orphan*/);
void AK_print_function_use(const char *func_name) {
  AK_debmod_print_function_use(func_name, 0);
}


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

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

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

LLVM IR (-O2):
define void @AK_print_function_use(i8* %0) {
%2 = tail call i32 @AK_debmod_print_function_use(i8* %0, i32 0)
ret void
}
void __asan_report_load4() {}


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

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

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

LLVM IR (-O2):
define void @__asan_report_load4() {
ret void
}
unsigned long reflect_32(unsigned long b) {
  int i;
  unsigned long rw = 0L;
  for (i = 0; i < 32; i++) {
    if (b & 1)
      rw |= 1 << (31 - i);
    b >>= 1;
  }
  return (rw);
}


x86 assembly (clang, -O0):
<reflect_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1166 <reflect_32+0x66>
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     114c <reflect_32+0x4c>
mov    $0x1f,%ecx
sub    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <reflect_32+0x17>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reflect_32>:
xor    %eax,%eax
xor    %r9d,%r9d
mov    %rdi,%r8
nopl   0x0(%rax,%rax,1)
mov    %edi,%esi
and    $0x1,%esi
neg    %rsi
mov    $0x80000000,%edx
mov    %r9d,%ecx
shr    %cl,%edx
movslq %edx,%rdx
and    %rsi,%rdx
or     %rax,%rdx
shr    $0x2,%r8
shl    $0x3e,%rdi
sar    $0x3f,%rdi
lea    0x1(%r9),%ecx
mov    $0x80000000,%eax
shr    %cl,%eax
cltq
and    %rdi,%rax
or     %rdx,%rax
add    $0x2,%r9d
mov    %r8,%rdi
cmp    $0x20,%r9d
jne    1110 <reflect_32+0x10>
ret

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

LLVM IR (-O2):
define i64 @reflect_32(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %19, %2 ]
%4 = phi i32 [ 0, %1 ], [ %20, %2 ]
%5 = phi i64 [ %0, %1 ], [ %12, %2 ]
%6 = and i64 %5, 1
%7 = icmp eq i64 %6, 0
%8 = lshr i32 -2147483648, %4
%9 = sext i32 %8 to i64
%10 = select i1 %7, i64 0, i64 %9
%11 = or i64 %10, %3
%12 = lshr i64 %5, 2
%13 = or i32 %4, 1
%14 = and i64 %5, 2
%15 = icmp eq i64 %14, 0
%16 = lshr i32 -2147483648, %13
%17 = sext i32 %16 to i64
%18 = select i1 %15, i64 0, i64 %17
%19 = or i64 %18, %11
%20 = add nuw nsw i32 %4, 2
%21 = icmp eq i32 %20, 32
br i1 %21, label %22, label %2
22: ; preds = %2
ret i64 %19
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
int peek(FILE *fp) {
  int c;
  c = getc(fp);
  ungetc(c, fp);
  return c;
}


x86 assembly (clang, -O0):
<peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <ungetc@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peek>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <getc@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
call   1030 <ungetc@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @peek(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @getc(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @ungetc(i32 %6, i32* %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @peek(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = tail call i32 @ungetc(i32 %2, i32* %0)
ret i32 %2
}
extern int liq_version() { return 20502; }


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

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

LLVM IR (-O0):
define i32 @liq_version() {
ret i32 20502
}

LLVM IR (-O2):
define i32 @liq_version() {
ret i32 20502
}
/* Type definitions */
struct random_data {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int random();
int random_r(struct random_data *buf, int32_t *result) { return random(); }


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

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

LLVM IR (-O0):
%struct.random_data = type { i32 }
define i32 @random_r(%struct.random_data* %0, i32* %1) {
%3 = alloca %struct.random_data*
%4 = alloca i32*
store %struct.random_data* %0, %struct.random_data** %3
store i32* %1, i32** %4
%5 = call i32 (...) @random()
ret i32 %5
}

LLVM IR (-O2):
%struct.random_data = type { i32 }
define i32 @random_r(%struct.random_data* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @random()
ret i32 %3
}
/* Variables and functions */
double jn(int, double);
double c_jn(int arg0, double arg1) { return jn(arg0, arg1); }


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

x86 assembly (clang, -O2):
<c_jn>:
jmp    1030 <jn@plt>

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

LLVM IR (-O2):
define double @c_jn(i32 %0, double %1) {
%3 = tail call double @jn(i32 %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void assert_not_null(void *val) {
  if (val != NULL)
    printf("\033[00;32mOK: The given value is not null\033[00m\n");
  else
    printf("\033[31mKO: The given value is null\033[00m\n");
}


x86 assembly (clang, -O0):
<assert_not_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <assert_not_null+0x28>
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
jmp    1144 <assert_not_null+0x34>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_not_null>:
test   %rdi,%rdi
lea    0xee6(%rip),%rax
lea    0xf05(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"\1B[00;32mOK: The given value is not null\1B[00m\0A\00"
@.str.1 = [39 x i8] c"\1B[31mKO: The given value is null\1B[00m\0A\00"
define void @assert_not_null(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"\1B[31mKO: The given value is null\1B[00m\00"
@str.2 = [45 x i8] c"\1B[00;32mOK: The given value is not null\1B[00m\00"
define void @assert_not_null(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int EAGAIN;
int pthread_mutex_unlock(int /*<<< orphan*/ *);
int release_mutex(pthread_mutex_t *mutex) {
  int ret_code;
  do {
    ret_code = pthread_mutex_unlock(mutex);
  } while (ret_code == EAGAIN);
  if (ret_code != 0) {
    return ret_code;
  }
  return 0;
}


x86 assembly (clang, -O0):
<release_mutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_mutex_unlock@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%eax
je     111c <release_mutex+0xc>
cmpl   $0x0,-0x14(%rbp)
je     114f <release_mutex+0x3f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <release_mutex+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<release_mutex>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <pthread_mutex_unlock@plt>
cmp    (%r14),%eax
je     1120 <release_mutex+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EAGAIN = global i32 0
define i32 @release_mutex(i32* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @pthread_mutex_unlock(i32* %0)
%4 = load i32, i32* @EAGAIN
%5 = icmp eq i32 %3, %4
br i1 %5, label %2, label %6
6: ; preds = %2
ret i32 %3
}
unsigned int of_get_reset_source_priority(struct device_node *node) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.device_node = type opaque
define i32 @of_get_reset_source_priority(%struct.device_node* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int detectPresence(char *);
int beepexePresent() {
  static int lBeepexePresent = -1;
  if (lBeepexePresent < 0) {
    lBeepexePresent = detectPresence("beep.exe");
  }
  return lBeepexePresent;
}


x86 assembly (clang, -O0):
<beepexePresent>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
jge    1133 <beepexePresent+0x23>
lea    0xed8(%rip),%rdi
call   1030 <detectPresence@plt>
mov    %eax,0x2ef5(%rip)
mov    0x2eef(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<beepexePresent>:
push   %rax
mov    0x2f11(%rip),%eax
test   %eax,%eax
js     111d <beepexePresent+0xd>
pop    %rcx
ret
lea    0xedc(%rip),%rdi
call   1030 <detectPresence@plt>
mov    %eax,0x2ef9(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@beepexePresent.lBeepexePresent = internal global i32 -1
@.str = [9 x i8] c"beep.exe\00"
define i32 @beepexePresent() {
%1 = load i32, i32* @beepexePresent.lBeepexePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @beepexePresent.lBeepexePresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @beepexePresent.lBeepexePresent
ret i32 %6
}

LLVM IR (-O2):
@beepexePresent.lBeepexePresent = internal unnamed_addr global i32 -1
@.str = [9 x i8] c"beep.exe\00"
define i32 @beepexePresent() {
%1 = load i32, i32* @beepexePresent.lBeepexePresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @beepexePresent.lBeepexePresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
void CDAudio_Stop(void) {}


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

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

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

LLVM IR (-O2):
define void @CDAudio_Stop() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_mod_uint8_t(uint8_t m) { printf("K:=GF(%u);\n", m); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"K:=GF(%u);\0A\00"
define void @print_mod_uint8_t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"K:=GF(%u);\0A\00"
define void @print_mod_uint8_t(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ existingUserBillsLoader(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void existingUserloginFunction() {
  char userName[20];
  printf("Enter Username : ");
  scanf("%s", userName);
  existingUserBillsLoader(userName);
}


x86 assembly (clang, -O0):
<existingUserloginFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <existingUserBillsLoader@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<existingUserloginFunction>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <existingUserBillsLoader@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter Username : \00"
@.str.1 = [3 x i8] c"%s\00"
define void @existingUserloginFunction() {
%1 = alloca [20 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = call i32 @existingUserBillsLoader(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter Username : \00"
@.str.1 = [3 x i8] c"%s\00"
define void @existingUserloginFunction() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 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), i8* %2)
%5 = call i32 @existingUserBillsLoader(i8* %2)
ret void
}