xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i = 0;
loop:
  if (i <= 255) {
    printf("%c %d\n", i, i);
    i++;
    goto loop;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
unsigned int strhash(const char *s) {
  unsigned int h;
  for (h = 0; *s; s++) {
    h = (h << 4) + *s;
    if (h > 0x0fffffff) {
      h ^= (h >> 24) & 0xf0;
      h &= 0x0fffffff;
    }
  }
  return h;
}


x86 assembly (clang, -O0):
<strhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116d <strhash+0x6d>
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xfffffff,-0xc(%rbp)
jbe    1157 <strhash+0x57>
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xf0,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xfffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    115c <strhash+0x5c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <strhash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strhash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113e <strhash+0x3e>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x4,%eax
movsbl %cl,%ecx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x18,%edx
and    $0xfffffff0,%edx
mov    %ecx,%eax
and    $0xfffffff,%eax
xor    %edx,%eax
cmp    $0x10000000,%ecx
cmovb  %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strhash+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strhash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %26, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %29
8: ; preds = %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 4
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = add i32 %10, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = icmp ugt i32 %15, 268435455
br i1 %16, label %17, label %25
17: ; preds = %8
%18 = load i32, i32* %3
%19 = lshr i32 %18, 24
%20 = and i32 %19, 240
%21 = load i32, i32* %3
%22 = xor i32 %21, %20
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = and i32 %23, 268435455
store i32 %24, i32* %3
br label %25
25: ; preds = %17, %8
br label %26
26: ; preds = %25
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %2
br label %4
29: ; preds = %4
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @strhash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %20, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %18, %4 ], [ %2, %1 ]
%6 = phi i32 [ %16, %4 ], [ 0, %1 ]
%7 = phi i8* [ %17, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 4
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = icmp ugt i32 %10, 268435455
%12 = lshr i32 %10, 24
%13 = and i32 %12, 240
%14 = and i32 %10, 268435455
%15 = xor i32 %13, %14
%16 = select i1 %11, i32 %15, i32 %10
%17 = getelementptr inbounds i8, i8* %7, i64 1
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %4
20: ; preds = %4, %1
%21 = phi i32 [ 0, %1 ], [ %16, %4 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ rts_error(int, int const);
void tp_timeout_action(void) {
  extern const int ERR_TPTIMEOUT;
  rts_error(1, ERR_TPTIMEOUT);
}


x86 assembly (clang, -O0):
<tp_timeout_action>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
call   1030 <rts_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tp_timeout_action>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
jmp    1030 <rts_error@plt>

LLVM IR (-O0):
@ERR_TPTIMEOUT = external constant i32
define void @tp_timeout_action() {
%1 = load i32, i32* @ERR_TPTIMEOUT
%2 = call i32 @rts_error(i32 1, i32 %1)
ret void
}

LLVM IR (-O2):
@ERR_TPTIMEOUT = external constant i32
define void @tp_timeout_action() {
%1 = load i32, i32* @ERR_TPTIMEOUT
%2 = tail call i32 @rts_error(i32 1, i32 %1)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int clock_gettime(int /*<<< orphan*/, struct timespec *);
int main(int argc, char **argv) {
  struct timespec tval;
  return clock_gettime(CLOCK_MONOTONIC, &tval);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
call   1030 <clock_gettime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.timespec
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @CLOCK_MONOTONIC
%8 = call i32 @clock_gettime(i32 %7, %struct.timespec* %6)
ret i32 %8
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = load i32, i32* @CLOCK_MONOTONIC
%6 = call i32 @clock_gettime(i32 %5, %struct.timespec* %3)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ tabluate(int *, int);
int main(int argc, const char *argv[]) {
  int a[] = {91, 93, 98, 92, 92, 95, 93, 92, 91, 95, 99, 92, 98};
  int n = sizeof(a) / sizeof(a[0]);
  tabluate(a, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
movl   $0xd,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1030 <tabluate@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf16(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xd,%esi
call   1030 <tabluate@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [13 x i32] [i32 91, i32 93, i32 98, i32 92, i32 92, i32 95, i32 93, i32 92, i32 91, i32 95, i32 99, i32 92, i32 98]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [13 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [13 x i32]* %6 to i8*
store i32 13, i32* %7
%9 = getelementptr inbounds [13 x i32], [13 x i32]* %6, i64 0, i64 0
%10 = load i32, i32* %7
%11 = call i32 @tabluate(i32* %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [13 x i32] [i32 91, i32 93, i32 98, i32 92, i32 92, i32 95, i32 93, i32 92, i32 91, i32 95, i32 99, i32 92, i32 98]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [13 x i32]
%4 = bitcast [13 x i32]* %3 to i8*
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 0
%6 = call i32 @tabluate(i32* %5, i32 13)
ret i32 0
}
int string_length(char *aString) {
  int length;
  char *ptr;
  ptr = aString;
  length = 0;
  while (*ptr != 0) {
    ptr++;
    length = length + 1;
  }
  return length;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1141 <string_length+0x41>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <string_length+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
cmpb   $0x0,(%rdi)
je     111c <string_length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <string_length+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @string_length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = add nuw nsw i32 %6, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
void custom_init(void) {}


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

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

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

LLVM IR (-O2):
define void @custom_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(double);
int /*<<< orphan*/ display(int, int);
int /*<<< orphan*/ setup();
int main() {
  int i;
  setup();
  for (i = 0; i < 100; i++) {
    display(0, i % 16);
    display(1, i % 8);
    delay(.1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <setup@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    119d <main+0x6d>
mov    -0x8(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
xor    %edi,%edi
call   1030 <display@plt>
mov    -0x8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
mov    $0x1,%edi
call   1030 <display@plt>
movsd  0xe76(%rip),%xmm0
call   1040 <delay@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <setup@plt>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%esi
and    $0xf,%esi
xor    %edi,%edi
call   1030 <display@plt>
mov    %ebx,%esi
and    $0x7,%esi
mov    $0x1,%edi
call   1030 <display@plt>
movsd  0xe9d(%rip),%xmm0
call   1040 <delay@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1140 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @setup()
store i32 0, i32* %2
br label %4
4: ; preds = %15, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %2
%9 = srem i32 %8, 16
%10 = call i32 @display(i32 0, i32 %9)
%11 = load i32, i32* %2
%12 = srem i32 %11, 8
%13 = call i32 @display(i32 1, i32 %12)
%14 = call i32 @delay(double 1.000000e-01)
br label %15
15: ; preds = %7
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %4
18: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @setup()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %9, %2 ]
%4 = and i32 %3, 15
%5 = tail call i32 @display(i32 0, i32 %4)
%6 = and i32 %3, 7
%7 = tail call i32 @display(i32 1, i32 %6)
%8 = tail call i32 @delay(double 1.000000e-01)
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 100
br i1 %10, label %11, label %2
11: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_is_valid_isbn13(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char input[21];
  scanf("%s", input);
  print_is_valid_isbn13(input);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <scanf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <print_is_valid_isbn13@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <scanf@plt>
mov    %rbx,%rdi
call   1040 <print_is_valid_isbn13@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%6 = call i32 @print_is_valid_isbn13(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @print_is_valid_isbn13(i8* %2)
ret i32 0
}
/* Variables and functions */
float cosf(float);
float __ocl_cos_float(float src) { return cosf(src); }


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

x86 assembly (clang, -O2):
<__ocl_cos_float>:
jmp    1030 <cosf@plt>

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

LLVM IR (-O2):
define float @__ocl_cos_float(float %0) {
%2 = tail call float @cosf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr,
          "%s PASSPHRASE SALT_HEX EXPECTED_SIG_HEX "
          "EXPECTED_FEKEK_HEX\n",
          name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [60 x i8] c"%s PASSPHRASE SALT_HEX EXPECTED_SIG_HEX EXPECTED_FEKEK_HEX\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [60 x i8] c"%s PASSPHRASE SALT_HEX EXPECTED_SIG_HEX EXPECTED_FEKEK_HEX\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
const char *program_options_usage() {
  return "\n"
         "OPTIONS:\n"
         "  -p <port>     Set the port to listen on\n"
         "  -v            Enable verbose output \n"
         "  -e            Echo the request, for debugging\n"
         "  -h            Show this help message\n"
         "\n";
}


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

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

LLVM IR (-O0):
@.str = [180 x i8] c"\0AOPTIONS:\0A -p <port> Set the port to listen on\0A -v Enable verbose output \0A -e Echo the request, for debugging\0A -h Show this help message\0A\0A\00"
define i8* @program_options_usage() {
ret i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [180 x i8] c"\0AOPTIONS:\0A -p <port> Set the port to listen on\0A -v Enable verbose output \0A -e Echo the request, for debugging\0A -h Show this help message\0A\0A\00"
define i8* @program_options_usage() {
ret i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ my_free(int *);
int *my_malloc(int);
void af2b() {
  int *p = my_malloc(12);
  free(p);
  my_free(p);
}


x86 assembly (clang, -O0):
<af2b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1040 <my_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1050 <my_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<af2b>:
push   %rbx
mov    $0xc,%edi
call   1040 <my_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <my_free@plt>

LLVM IR (-O0):
define void @af2b() {
%1 = alloca i32*
%2 = call i32* @my_malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @free(i32* %3)
%5 = load i32*, i32** %1
%6 = call i32 @my_free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @af2b() {
%1 = tail call i32* @my_malloc(i32 12)
%2 = tail call i32 @free(i32* %1)
%3 = tail call i32 @my_free(i32* %1)
ret void
}
long nside2npix_(const long nside) { return 12 * nside * nside; }


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

x86 assembly (clang, -O2):
<nside2npix_>:
imul   %rdi,%rdi
shl    $0x2,%rdi
lea    (%rdi,%rdi,2),%rax
ret

LLVM IR (-O0):
define i64 @nside2npix_(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul nsw i64 12, %3
%5 = load i64, i64* %2
%6 = mul nsw i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @nside2npix_(i64 %0) {
%2 = mul nsw i64 %0, 12
%3 = mul nsw i64 %2, %0
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_pi8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_unpacklo_pi8(__m64 a, __m64 b) { return _mm_unpacklo_pi8(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_unpacklo_pi8>:
jmp    1030 <_mm_unpacklo_pi8@plt>

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

LLVM IR (-O2):
define i32 @test_mm_unpacklo_pi8(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_pi8(i32 %0, i32 %1)
ret i32 %3
}
unsigned long int kern_ntohl(x)
unsigned long int x;
{
  return ((((x) >> 24) & 0x000000ff) | (((x) >> 8) & 0x0000ff00) |
          (((x) << 8) & 0x00ff0000) | (((x) << 24) & 0xff000000));
}


x86 assembly (clang, -O0):
<kern_ntohl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    -0x8(%rbp),%rcx
shr    $0x8,%rcx
and    $0xff00,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x8,%rcx
and    $0xff0000,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x18,%rcx
movabs $0xff000000,%rdx
and    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @kern_ntohl(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int __pthread_mutex_lock(pthread_mutex_t *mutex) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__pthread_mutex_lock(i32* nocapture readnone %0) {
ret i32 0
}
void USBFS_SOF_ISR(void) {
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<USBFS_SOF_ISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <USBFS_SOF_ISR+0x9>
jmp    110e <USBFS_SOF_ISR+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @USBFS_SOF_ISR() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @USBFS_SOF_ISR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ d_lu(int, double **);
double *dvector(int);
int /*<<< orphan*/ sweep_backward(int, double *, double **, double *);
int /*<<< orphan*/ sweep_forward(int, double *, double **, double *);
void solve(int n, double *x, double **A, double *b) {
  double *y;
  d_lu(n, A);
  y = dvector(n);
  sweep_forward(n, y, A, b);
  sweep_backward(n, x, A, y);
}


x86 assembly (clang, -O0):
<solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <d_lu@plt>
mov    -0x4(%rbp),%edi
call   1050 <dvector@plt>
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1060 <sweep_forward@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <sweep_backward@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%ebp
mov    %rdx,%rsi
call   1030 <d_lu@plt>
mov    %ebp,%edi
call   1050 <dvector@plt>
mov    %rax,%r12
mov    %ebp,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <sweep_forward@plt>
mov    %ebp,%edi
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <sweep_backward@plt>

LLVM IR (-O0):
define void @solve(i32 %0, double* %1, double** %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double**
%8 = alloca double*
%9 = alloca double*
store i32 %0, i32* %5
store double* %1, double** %6
store double** %2, double*** %7
store double* %3, double** %8
%10 = load i32, i32* %5
%11 = load double**, double*** %7
%12 = call i32 @d_lu(i32 %10, double** %11)
%13 = load i32, i32* %5
%14 = call double* @dvector(i32 %13)
store double* %14, double** %9
%15 = load i32, i32* %5
%16 = load double*, double** %9
%17 = load double**, double*** %7
%18 = load double*, double** %8
%19 = call i32 @sweep_forward(i32 %15, double* %16, double** %17, double* %18)
%20 = load i32, i32* %5
%21 = load double*, double** %6
%22 = load double**, double*** %7
%23 = load double*, double** %9
%24 = call i32 @sweep_backward(i32 %20, double* %21, double** %22, double* %23)
ret void
}

LLVM IR (-O2):
define void @solve(i32 %0, double* %1, double** %2, double* %3) {
%5 = tail call i32 @d_lu(i32 %0, double** %2)
%6 = tail call double* @dvector(i32 %0)
%7 = tail call i32 @sweep_forward(i32 %0, double* %6, double** %2, double* %3)
%8 = tail call i32 @sweep_backward(i32 %0, double* %1, double** %2, double* %6)
ret void
}
unsigned char ch_to_ascii(unsigned char c) { return (c + 32); }


x86 assembly (clang, -O0):
<ch_to_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x20,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_to_ascii>:
lea    0x20(%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i8 @ch_to_ascii(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = add nsw i32 %4, 32
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @ch_to_ascii(i8 zeroext %0) {
%2 = add i8 %0, 32
ret i8 %2
}
void music_sheet_set_tempo(struct music_sheet *self, unsigned char bpm) {}


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

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

LLVM IR (-O0):
%struct.music_sheet = type opaque
define void @music_sheet_set_tempo(%struct.music_sheet* %0, i8 zeroext %1) {
%3 = alloca %struct.music_sheet*
%4 = alloca i8
store %struct.music_sheet* %0, %struct.music_sheet** %3
store i8 %1, i8* %4
ret void
}

LLVM IR (-O2):
%struct.music_sheet = type opaque
define void @music_sheet_set_tempo(%struct.music_sheet* nocapture %0, i8 zeroext %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int **, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[5][4];
  a[0][3] = 11;
  int i = 4, m = 5;
  foo(a, i);
  int *j, *k;
  j = &i;
  k = j;
  j = &m;
  printf("%d\n", *j);
  printf("%d", *k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xb,-0x54(%rbp)
movl   $0x4,-0x64(%rbp)
movl   $0x5,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x64(%rbp),%esi
call   1040 <foo@plt>
lea    -0x64(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x68(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    (%rax),%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x78(%rbp),%rax
mov    (%rax),%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movl   $0xb,0xc(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <foo@plt>
lea    0xec0(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [5 x [4 x i32]]
%2 = bitcast [5 x [4 x i32]]* %1 to i8*
%3 = getelementptr inbounds [5 x [4 x i32]], [5 x [4 x i32]]* %1, i64 0, i64 0, i64 3
store i32 11, i32* %3
%4 = bitcast [5 x [4 x i32]]* %1 to i32**
%5 = call i32 @foo(i32** %4, i32 4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 0
}
void LED1_Flash(void) {}


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

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

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

LLVM IR (-O2):
define void @LED1_Flash() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ctime(long *);
long get32(unsigned char *);
int /*<<< orphan*/ lprintf(int, char *, int /*<<< orphan*/);
int decode_timestamp(unsigned char *element, int element_len) {
  long rawtime = 0;
  rawtime = get32(element);
  lprintf(14, "Time: %s", ctime(&rawtime));
  return 0;
}


x86 assembly (clang, -O0):
<decode_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get32@plt>
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <ctime@plt>
mov    %eax,%edx
mov    $0xe,%edi
lea    0xe95(%rip),%rsi
call   1050 <lprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_timestamp>:
push   %rax
call   1040 <get32@plt>
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <ctime@plt>
lea    0xeb7(%rip),%rsi
mov    $0xe,%edi
mov    %eax,%edx
call   1050 <lprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"Time: %s\00"
define i32 @decode_timestamp(i8* %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i64 @get32(i8* %0)
store i64 %5, i64* %3
%6 = call i32 @ctime(i64* %3)
%7 = call i32 @lprintf(i32 14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_standard_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(14, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_standard_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xe,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_standard_start_system>:
mov    $0xe,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_standard_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 14, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_standard_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 14, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void FPUHalfPrecisionModeSet(unsigned long ulMode) {
  (*((volatile unsigned long *)(0xE000EF3C))) =
      ((*((volatile unsigned long *)(0xE000EF3C))) & ~(0x04000000)) | ulMode;
}


x86 assembly (clang, -O0):
<FPUHalfPrecisionModeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xe000ef3c,%eax
mov    (%rax),%rcx
and    $0xfffffffffbffffff,%rcx
or     -0x8(%rbp),%rcx
mov    $0xe000ef3c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FPUHalfPrecisionModeSet>:
mov    $0xe000ef3c,%eax
mov    $0xfffffffffbffffff,%rcx
and    (%rax),%rcx
or     %rdi,%rcx
mov    %rcx,(%rax)
ret

LLVM IR (-O0):
define void @FPUHalfPrecisionModeSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 3758157628 to i64*)
%4 = and i64 %3, -67108865
%5 = load i64, i64* %2
%6 = or i64 %4, %5
store volatile i64 %6, i64* inttoptr (i64 3758157628 to i64*)
ret void
}

LLVM IR (-O2):
define void @FPUHalfPrecisionModeSet(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 3758157628 to i64*)
%3 = and i64 %2, -67108865
%4 = or i64 %3, %0
store volatile i64 %4, i64* inttoptr (i64 3758157628 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fooA(int *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int x = 42;
  printf("x addr: %p\n", &x);
  fooA(&x);
  printf("x value: %d\n", x);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x2a,0xc(%rsp)
lea    0xecc(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <fooA@plt>
mov    0xc(%rsp),%esi
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"x addr: %p\0A\00"
@.str.1 = [13 x i8] c"x value: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @fooA(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ posr__write(int /*<<< orphan*/);
void posr_ref(int64_t refid) { posr__write(refid); }


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

x86 assembly (clang, -O2):
<posr_ref>:
jmp    1030 <posr__write@plt>

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

LLVM IR (-O2):
define void @posr_ref(i32 %0) {
%2 = tail call i32 @posr__write(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_symlinkat;
int syscall(int /*<<< orphan*/, char const *, int, char const *);
__attribute__((always_)) int
_syscall_symlinkat(const char *target, int newdirfd, const char *linkpath) {
  return syscall(__NR_symlinkat, target, newdirfd, linkpath);
}


x86 assembly (clang, -O0):
<_syscall_symlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_symlinkat>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_symlinkat = global i32 0
define i32 @_syscall_symlinkat(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @__NR_symlinkat
%5 = tail call i32 @syscall(i32 %4, i8* %0, i32 %1, i8* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pr_inf(char *, char const *);
int stress_pidfd_supported(const char *name) {
  pr_inf(
      "%s: stressor will be skipped, system call not supported at build time\n",
      name);
  return -1;
}


x86 assembly (clang, -O0):
<stress_pidfd_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <pr_inf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_pidfd_supported>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <pr_inf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [71 x i8] c"%s: stressor will be skipped, system call not supported at build time\0A\00"
define i32 @stress_pidfd_supported(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @pr_inf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 -1
}

LLVM IR (-O2):
@.str = [71 x i8] c"%s: stressor will be skipped, system call not supported at build time\0A\00"
define i32 @stress_pidfd_supported(i8* %0) {
%2 = tail call i32 @pr_inf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void pabc(int x) {
  int abc[3];
  printf("a=%d, b=%d, c=%d\n", abc[0], abc[1], abc[2]);
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"a=%d, b=%d, c=%d\0A\00"
define void @pabc(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"a=%d, b=%d, c=%d\0A\00"
define void @pabc(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 undef, i32 undef, i32 undef)
ret void
}
void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @ieee80211_sta_deinit(%struct.wpa_supplicant* nocapture %0) {
ret void
}
/* Variables and functions */
double scale_h1(double, double, double);
double scale_dLx(double x, double y, double z, double dx, double dy,
                 double dz) {
  return scale_h1(x, y, z) * dx;
}


x86 assembly (clang, -O0):
<scale_dLx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <scale_h1@plt>
mulsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_dLx>:
push   %rax
movsd  %xmm3,(%rsp)
call   1030 <scale_h1@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @scale_dLx(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %9
%16 = call double @scale_h1(double %13, double %14, double %15)
%17 = load double, double* %10
%18 = fmul double %16, %17
ret double %18
}

LLVM IR (-O2):
define double @scale_dLx(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call double @scale_h1(double %0, double %1, double %2)
%8 = fmul double %7, %3
ret double %8
}
__attribute__((always_)) void dma_debug_add_bus(struct bus_type *bus) {}


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

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

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

LLVM IR (-O2):
%struct.bus_type = type opaque
define void @dma_debug_add_bus(%struct.bus_type* nocapture %0) {
ret void
}
void f(void *a, double y) {}


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

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

LLVM IR (-O0):
define void @f(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
ret void
}

LLVM IR (-O2):
define void @f(i8* nocapture %0, double %1) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
const char *packetType(uint8_t type) {
  switch (type) {
  case 0x02: {
    return "TYPE_EVENT";
  }
  case 0x10: {
    return "TYPE_SERIAL_IN";
  }
  default: {
    return "ERR_UNKNOWN";
  }
  }
}


x86 assembly (clang, -O0):
<packetType>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x2,%eax
je     112c <packetType+0x2c>
jmp    111b <packetType+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     113c <packetType+0x3c>
jmp    114c <packetType+0x4c>
lea    0xecd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <packetType+0x57>
lea    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <packetType+0x57>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<packetType>:
cmp    $0x10,%edi
lea    0xf01(%rip),%rax
lea    0xf09(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x2,%edi
lea    0xee1(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"TYPE_EVENT\00"
@.str.1 = [15 x i8] c"TYPE_SERIAL_IN\00"
@.str.2 = [12 x i8] c"ERR_UNKNOWN\00"
define i8* @packetType(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 2, label %5
i32 16, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [11 x i8] c"TYPE_EVENT\00"
@.str.1 = [15 x i8] c"TYPE_SERIAL_IN\00"
@.str.2 = [12 x i8] c"ERR_UNKNOWN\00"
define i8* @packetType(i32 %0) {
%2 = icmp eq i32 %0, 16
%3 = select i1 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0)
%4 = icmp eq i32 %0, 2
%5 = select i1 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}