xunge/DecIR huggingface dataset:
/* Type definitions */
struct audit_rule_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct audit_rule_data *);
void audit_rule_free_data(struct audit_rule_data *rule) { free(rule); }


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

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

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

LLVM IR (-O2):
%struct.audit_rule_data = type { i32 }
define void @audit_rule_free_data(%struct.audit_rule_data* nocapture %0) {
%2 = tail call i32 @free(%struct.audit_rule_data* %0)
ret void
}
int cmp(char *s1, char *s2) {
  while (*s1 && *s1++ != *s2++)
    ;
  return *s1;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     114d <cmp+0x4d>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115d <cmp+0x5d>
jmp    1162 <cmp+0x62>
jmp    110c <cmp+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
je     1129 <cmp+0x29>
lea    0x1(%rcx),%r8
cmp    (%rsi,%rcx,1),%dl
mov    %r8,%rcx
jne    1110 <cmp+0x10>
movsbl (%rdi,%r8,1),%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %22, %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 %20
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
%13 = load i8, i8* %11
%14 = sext i8 %13 to i32
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %4
%17 = load i8, i8* %15
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %14, %18
br label %20
20: ; preds = %10, %5
%21 = phi i1 [ false, %5 ], [ %19, %10 ]
br i1 %21, label %22, label %23
22: ; preds = %20
br label %5
23: ; preds = %20
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %10, %8 ]
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = load i8, i8* %5
%12 = icmp eq i8 %6, %11
br i1 %12, label %13, label %3
13: ; preds = %8
%14 = load i8, i8* %9
%15 = sext i8 %14 to i32
br label %16
16: ; preds = %3, %13
%17 = phi i32 [ %15, %13 ], [ 0, %3 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char prompt[] = "Press any key: ";
  printf("%s", prompt);
  getchar();
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.prompt = [16 x i8] c"Press any key: \00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
store i32 0, i32* %1
%3 = bitcast [16 x i8]* %2 to i8*
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.prompt = [16 x i8] c"Press any key: \00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (...) @getchar()
ret i32 0
}
int func(int x, int y, int (*sfunc)()) { return (*sfunc)(x, y); }


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x0,%al
call   *%rcx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
xor    %eax,%eax
jmp    *%rdx

LLVM IR (-O0):
define i32 @func(i32 %0, i32 %1, i32 (...)* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32 (...)*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 (...)* %2, i32 (...)** %6
%7 = load i32 (...)*, i32 (...)** %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = bitcast i32 (...)* %7 to i32 (i32, i32, ...)*
%11 = call i32 (i32, i32, ...) %10(i32 %8, i32 %9)
ret i32 %11
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1, i32 (...)* nocapture %2) {
%4 = bitcast i32 (...)* %2 to i32 (i32, i32, ...)*
%5 = tail call i32 (i32, i32, ...) %4(i32 %0, i32 %1)
ret i32 %5
}
int toUpperCase(int x) {
  if (x >= 'a' && x <= 'z') {
    x -= 'a';
    x += 'A';
  }
  return x;
}


x86 assembly (clang, -O0):
<toUpperCase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     112d <toUpperCase+0x2d>
cmpl   $0x7a,-0x4(%rbp)
jg     112d <toUpperCase+0x2d>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toUpperCase>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toUpperCase(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 97
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 65
store i32 %12, i32* %2
br label %13
13: ; preds = %8, %5, %1
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @toUpperCase(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int mx35_gpio_get(unsigned int gpio) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @mx35_gpio_get(i32 %0) {
ret i32 1
}
void nrf_802154_timer_critical_section_enter(void) {}


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

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

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

LLVM IR (-O2):
define void @nrf_802154_timer_critical_section_enter() {
ret void
}
int seek_set_function(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @seek_set_function() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int main(void) {
  char *args[80 / 2 + 1];
  int should_run = 1;
  int i, upper;
  while (should_run) {
    printf("osh>");
    fflush(stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x154(%rbp)
cmpl   $0x0,-0x154(%rbp)
je     1168 <main+0x48>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
mov    0x2eae(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
jmp    1140 <main+0x20>

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

LLVM IR (-O2):
@.str = [5 x i8] c"osh>\00"
@stdout = global i32 0
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int n = 0;
  while (n++ < 3)
    ;
  printf("n is %d\n", n);
  printf("That is all this program does.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x3,%eax
jge    113f <main+0x2f>
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"n is %d\0A\00"
@.str.1 = [32 x i8] c"That is all this program does.\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 = %7, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
%6 = icmp slt i32 %4, 3
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"n is %d\0A\00"
@str = [31 x i8] c"That is all this program does.\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear_bit(unsigned int, unsigned long *);
int /*<<< orphan*/ set_bit(unsigned int, unsigned long *);
scalar_t__ test_bit(unsigned int, unsigned long *);
void change_bit(unsigned int bit, unsigned long mask[]) {
  if (test_bit(bit, mask))
    clear_bit(bit, mask);
  else
    set_bit(bit, mask);
}


x86 assembly (clang, -O0):
<change_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <test_bit@plt>
cmp    $0x0,%rax
je     1166 <change_bit+0x36>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <clear_bit@plt>
jmp    1172 <change_bit+0x42>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <set_bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_bit>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <test_bit@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
test   %rax,%rax
je     1152 <change_bit+0x22>
pop    %rbx
pop    %rbp
jmp    1030 <clear_bit@plt>
pop    %rbx
pop    %rbp
jmp    1040 <set_bit@plt>

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

LLVM IR (-O2):
define void @change_bit(i32 %0, i64* %1) {
%3 = tail call i64 @test_bit(i32 %0, i64* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @clear_bit(i32 %0, i64* %1)
br label %9
7: ; preds = %2
%8 = tail call i32 @set_bit(i32 %0, i64* %1)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int read(int, unsigned char *, int);
int read_port(int fd, unsigned char *buf, int len) {
  int i, bytesRead;
  int totalBytes;
  totalBytes = 0;
  while (1) {
    bytesRead = read(fd, buf, len);
    if (bytesRead <= 0)
      break;
    totalBytes += bytesRead;
  }
  return totalBytes;
}


x86 assembly (clang, -O0):
<read_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jg     114a <read_port+0x3a>
jmp    1158 <read_port+0x48>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1129 <read_port+0x19>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_port>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
mov    %edi,%ebp
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ecx,%ebx
mov    %ebp,%edi
mov    %r15,%rsi
mov    %r14d,%edx
call   1030 <read@plt>
lea    (%rax,%rbx,1),%ecx
test   %eax,%eax
jg     1130 <read_port+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @read_port(i32 %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i32 [ 0, %3 ], [ %8, %4 ]
%6 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%7 = icmp slt i32 %6, 1
%8 = add nsw i32 %6, %5
br i1 %7, label %9, label %4
9: ; preds = %4
ret i32 %5
}
void GB_LNOT_f_FP32(float *z, const float *x) { (*z) = !((*x) != 0); }


x86 assembly (clang, -O0):
<GB_LNOT_f_FP32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_LNOT_f_FP32>:
xorps  %xmm0,%xmm0
cmpeqss (%rsi),%xmm0
movss  0xef0(%rip),%xmm1
andps  %xmm0,%xmm1
movss  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @GB_LNOT_f_FP32(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = load float, float* %5
%7 = fcmp une float %6, 0.000000e+00
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = sitofp i32 %9 to float
%11 = load float*, float** %3
store float %10, float* %11
ret void
}

LLVM IR (-O2):
define void @GB_LNOT_f_FP32(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp oeq float %3, 0.000000e+00
%5 = uitofp i1 %4 to float
store float %5, float* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void celt_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @celt_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void _Z26_Jv_GCInitializeFinalizersPFvvE(void) {}


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

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

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

LLVM IR (-O2):
define void @_Z26_Jv_GCInitializeFinalizersPFvvE() {
ret void
}
void onBackground_BaseScreen(void) {}


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

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

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

LLVM IR (-O2):
define void @onBackground_BaseScreen() {
ret void
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
#pragma omp parallel
  printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(),
         omp_get_num_threads());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Hello from thread %d, nthreads %d\0A\00"
define i32 @main() {
%1 = call i32 (...) @omp_get_thread_num()
%2 = call i32 (...) @omp_get_num_threads()
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Hello from thread %d, nthreads %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 (...) @omp_get_num_threads()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, long, char *);
yyerror(char *msg) {
  extern long yypos;
  printf("line %ld: %s\n", yypos, msg);
  exit(1);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2ebd(%rip),%rax
mov    (%rax),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"line %ld: %s\0A\00"
@yypos = external global i64
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @yypos
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %3, i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"line %ld: %s\0A\00"
@yypos = external global i64
define i32 @yyerror(i8* %0) {
%2 = load i64, i64* @yypos
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %2, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ gterm();
int /*<<< orphan*/ gterms();
void fterm() {
  gterm();
  gterms();
}


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

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

LLVM IR (-O0):
define void @fterm() {
%1 = call i32 (...) @gterm()
%2 = call i32 (...) @gterms()
ret void
}

LLVM IR (-O2):
define void @fterm() {
%1 = tail call i32 (...) @gterm()
%2 = tail call i32 (...) @gterms()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Expand(char *, int, char const *);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char buffer[64] = {0};
  const char *str = "a-z0-9";
  Expand(buffer, 64, str);
  printf("%s.\n", buffer);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    0xe9a(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    $0x40,%esi
call   1060 <Expand@plt>
lea    -0x50(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xeae(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1050 <Expand@plt>
lea    0xe9e(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"a-z0-9\00"
@.str.1 = [5 x i8] c"%s.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [64 x i8]* %2 to i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @Expand(i8* %5, i32 64, i8* %6)
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"a-z0-9\00"
@.str.1 = [5 x i8] c"%s.\0A\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i32 @Expand(i8* %2, i32 64, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
struct stat {
  unsigned long st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char const *, struct stat *);
unsigned long file_size(const char *path) {
  struct stat sb;
  stat(path, &sb);
  return sb.st_size;
}


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

x86 assembly (clang, -O2):
<file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @file_size(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}
int XmeXpmLibraryVersion() { return ((3 * 100 + 4) * 100 + 9); }


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

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

LLVM IR (-O0):
define i32 @XmeXpmLibraryVersion() {
ret i32 30409
}

LLVM IR (-O2):
define i32 @XmeXpmLibraryVersion() {
ret i32 30409
}
/* Variables and functions */
int /*<<< orphan*/ CANInit();
int /*<<< orphan*/ CANMessageSetRx();
void ConfigureCANInterface(unsigned long ulSetTiming) {
  CANInit();
  if (ulSetTiming != 0) {
    (*((volatile unsigned long *)(0x40040000 + 0x0000000C))) =
        ((((5 - 1) << 12) & 0x00007000) | (((10 - 1) << 8) & 0x00000F00) |
         (((4 - 1) << 6) & 0x000000C0) | (((1 - 1) << 0) & 0x0000003F));
    (*((volatile unsigned long *)(0x40040000 + 0x00000018))) = 0;
  }
  (*((volatile unsigned long *)(0x40040000 + 0x00000000))) = 0;
  CANMessageSetRx();
}


x86 assembly (clang, -O0):
<ConfigureCANInterface>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <CANInit@plt>
cmpq   $0x0,-0x8(%rbp)
je     1156 <ConfigureCANInterface+0x36>
mov    $0x4004000c,%eax
movq   $0x49c0,(%rax)
mov    $0x40040018,%eax
movq   $0x0,(%rax)
mov    $0x40040000,%eax
movq   $0x0,(%rax)
mov    $0x0,%al
call   1040 <CANMessageSetRx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConfigureCANInterface>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <CANInit@plt>
test   %rbx,%rbx
je     1148 <ConfigureCANInterface+0x28>
movq   $0x49c0,0x4004000c
movq   $0x0,0x40040018
movq   $0x0,0x40040000
xor    %eax,%eax
pop    %rbx
jmp    1040 <CANMessageSetRx@plt>

LLVM IR (-O0):
define void @ConfigureCANInterface(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @CANInit()
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store volatile i64 18880, i64* inttoptr (i64 1074003980 to i64*)
store volatile i64 0, i64* inttoptr (i64 1074003992 to i64*)
br label %7
7: ; preds = %6, %1
store volatile i64 0, i64* inttoptr (i64 1074003968 to i64*)
%8 = call i32 (...) @CANMessageSetRx()
ret void
}

LLVM IR (-O2):
define void @ConfigureCANInterface(i64 %0) {
%2 = tail call i32 (...) @CANInit()
%3 = icmp eq i64 %0, 0
br i1 %3, label %5, label %4
4: ; preds = %1
store volatile i64 18880, i64* inttoptr (i64 1074003980 to i64*)
store volatile i64 0, i64* inttoptr (i64 1074003992 to i64*)
br label %5
5: ; preds = %4, %1
store volatile i64 0, i64* inttoptr (i64 1074003968 to i64*)
%6 = tail call i32 (...) @CANMessageSetRx()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void logger_stdout(const char *line) {
  printf("%s\n", line);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<logger_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_stdout>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@stdout = global i32 0
define void @logger_stdout(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
int /*<<< orphan*/ h();
main() {
  f();
  g();
  h();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
xor    %eax,%eax
call   1050 <g@plt>
xor    %eax,%eax
call   1030 <h@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @g()
%3 = tail call i32 (...) @h()
ret i32 0
}
void arc4random_stir(void) {}


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

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

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

LLVM IR (-O2):
define void @arc4random_stir() {
ret void
}
int IsLower(char C) { return (C >= 'a' && C <= 'z'); }


x86 assembly (clang, -O0):
<IsLower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <IsLower+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsLower>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @IsLower(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
size_t fixed64_pack(int /*<<< orphan*/ const, void *);
size_t fixed64_pack_p(const void *value, void *out) {
  return fixed64_pack(*(const uint64_t *)value, out);
}


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

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

LLVM IR (-O0):
define i64 @fixed64_pack_p(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = call i64 @fixed64_pack(i32 %7, i8* %8)
ret i64 %9
}

LLVM IR (-O2):
define i64 @fixed64_pack_p(i8* nocapture %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i64 @fixed64_pack(i32 %4, i8* %1)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ seq_utils_clamp(scalar_t__, int /*<<< orphan*/, int);
scalar_t__ song_get_midi_remote_ctrl();
int /*<<< orphan*/ song_set_midi_remote_ctrl(int /*<<< orphan*/);
void seq_ctrl_adjust_midi_remote_ctrl(int change) {
  song_set_midi_remote_ctrl(
      seq_utils_clamp(song_get_midi_remote_ctrl() + change, 0, 1));
}


x86 assembly (clang, -O0):
<seq_ctrl_adjust_midi_remote_ctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <song_get_midi_remote_ctrl@plt>
mov    %rax,%rdi
movslq -0x4(%rbp),%rax
add    %rax,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <seq_utils_clamp@plt>
mov    %eax,%edi
call   1050 <song_set_midi_remote_ctrl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_adjust_midi_remote_ctrl>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <song_get_midi_remote_ctrl@plt>
movslq %ebx,%rdi
add    %rax,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <seq_utils_clamp@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <song_set_midi_remote_ctrl@plt>

LLVM IR (-O0):
define void @seq_ctrl_adjust_midi_remote_ctrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @song_get_midi_remote_ctrl()
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add nsw i64 %3, %5
%7 = call i32 @seq_utils_clamp(i64 %6, i32 0, i32 1)
%8 = call i32 @song_set_midi_remote_ctrl(i32 %7)
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_adjust_midi_remote_ctrl(i32 %0) {
%2 = tail call i64 (...) @song_get_midi_remote_ctrl()
%3 = sext i32 %0 to i64
%4 = add nsw i64 %2, %3
%5 = tail call i32 @seq_utils_clamp(i64 %4, i32 0, i32 1)
%6 = tail call i32 @song_set_midi_remote_ctrl(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clean_up_test_resources();
int /*<<< orphan*/ run_io_test_suite();
int /*<<< orphan*/ run_list_test_suite();
int /*<<< orphan*/ run_tools_test_suite();
int /*<<< orphan*/ run_tweet_test_suite();
int main(void) {
  run_list_test_suite();
  run_io_test_suite();
  run_tools_test_suite();
  run_tweet_test_suite();
  clean_up_test_resources();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <run_list_test_suite@plt>
mov    $0x0,%al
call   1070 <run_io_test_suite@plt>
mov    $0x0,%al
call   1030 <run_tools_test_suite@plt>
mov    $0x0,%al
call   1040 <run_tweet_test_suite@plt>
mov    $0x0,%al
call   1060 <clean_up_test_resources@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <run_list_test_suite@plt>
xor    %eax,%eax
call   1070 <run_io_test_suite@plt>
xor    %eax,%eax
call   1030 <run_tools_test_suite@plt>
xor    %eax,%eax
call   1040 <run_tweet_test_suite@plt>
xor    %eax,%eax
call   1060 <clean_up_test_resources@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @run_list_test_suite()
%3 = call i32 (...) @run_io_test_suite()
%4 = call i32 (...) @run_tools_test_suite()
%5 = call i32 (...) @run_tweet_test_suite()
%6 = call i32 (...) @clean_up_test_resources()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run_list_test_suite()
%2 = tail call i32 (...) @run_io_test_suite()
%3 = tail call i32 (...) @run_tools_test_suite()
%4 = tail call i32 (...) @run_tweet_test_suite()
%5 = tail call i32 (...) @clean_up_test_resources()
ret i32 0
}
void SSMR3GetBool(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetBool() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  }
  fprintf(stream, "Usage: %s <pid> <sig> <data> [num-sigs]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [41 x i8] c"Usage: %s <pid> <sig> <data> [num-sigs]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [41 x i8] c"Usage: %s <pid> <sig> <data> [num-sigs]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int close(int);
int close_pipe(int s) { return close(s); }


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

x86 assembly (clang, -O2):
<close_pipe>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @close_pipe(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
int func2(int a) { return a * a; }


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

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

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

LLVM IR (-O2):
define i32 @func2(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float cost;
  printf("Enter the item's cost: ");
  scanf("%f", &cost);
  printf("Your item costs: $%.2f after tax!\n", (cost * 1.05f));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeab(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  0xeb2(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Enter the item's cost: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [35 x i8] c"Your item costs: $%.2f after tax!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 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), float* %2)
%5 = load float, float* %2
%6 = fmul float %5, 0x3FF0CCCCC0000000
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Enter the item's cost: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [35 x i8] c"Your item costs: $%.2f after tax!\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 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), float* %1)
%5 = load float, float* %1
%6 = fmul float %5, 0x3FF0CCCCC0000000
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
int trap_PC_AddGlobalDefine(char *define) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @trap_PC_AddGlobalDefine(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char const);
const char *skip_ws(const char *s) {
  while (isspace(*s))
    ++s;
  return s;
}


x86 assembly (clang, -O0):
<skip_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <skip_ws+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_ws+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_ws>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_ws+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_ws(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_network_link_get_ntp(int ifindex, char ***ret) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_network_link_get_ntp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_network_link_get_ntp>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_network_link_get_ntp(i32 %0, i8*** %1) {
%3 = alloca i32
%4 = alloca i8***
store i32 %0, i32* %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_network_link_get_ntp(i32 %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
int test_imm_C6uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xC6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C6uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xc6,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C6uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 850403524608
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello Word, C!"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello Word, C!\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello Word, C!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}