xunge/DecIR huggingface dataset:
int little_endian() {
  int num = 1;
  char *c = (char *)&num;
  return *c;
}


x86 assembly (clang, -O0):
<little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @little_endian() {
%1 = alloca i32
%2 = alloca i8*
store i32 1, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @little_endian() {
ret i32 1
}
/* Variables and functions */
scalar_t__ CheckCentOn();
scalar_t__ CheckHitT();
scalar_t__ CheckRightOn();
unsigned char CheckEventsHardLeft(void) {
  if (CheckHitT() != 0)
    return 7;
  if (CheckCentOn() != 0)
    return 3;
  if (CheckRightOn() != 0)
    return 5;
}


x86 assembly (clang, -O0):
<CheckEventsHardLeft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <CheckHitT@plt>
cmp    $0x0,%rax
je     1152 <CheckEventsHardLeft+0x22>
movb   $0x7,-0x1(%rbp)
jmp    1181 <CheckEventsHardLeft+0x51>
mov    $0x0,%al
call   1050 <CheckCentOn@plt>
cmp    $0x0,%rax
je     116c <CheckEventsHardLeft+0x3c>
movb   $0x3,-0x1(%rbp)
jmp    1181 <CheckEventsHardLeft+0x51>
mov    $0x0,%al
call   1040 <CheckRightOn@plt>
cmp    $0x0,%rax
je     1181 <CheckEventsHardLeft+0x51>
movb   $0x5,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckEventsHardLeft>:
push   %rax
xor    %eax,%eax
call   1030 <CheckHitT@plt>
mov    %rax,%rcx
mov    $0x7,%al
test   %rcx,%rcx
je     1144 <CheckEventsHardLeft+0x14>
pop    %rcx
ret
xor    %eax,%eax
call   1050 <CheckCentOn@plt>
mov    %rax,%rcx
mov    $0x3,%al
test   %rcx,%rcx
jne    1142 <CheckEventsHardLeft+0x12>
xor    %eax,%eax
call   1040 <CheckRightOn@plt>
mov    $0x5,%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckEventsHardLeft() {
%1 = alloca i8
%2 = call i64 (...) @CheckHitT()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8 7, i8* %1
br label %13
5: ; preds = %0
%6 = call i64 (...) @CheckCentOn()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i8 3, i8* %1
br label %13
9: ; preds = %5
%10 = call i64 (...) @CheckRightOn()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i8 5, i8* %1
br label %13
13: ; preds = %4, %8, %12, %9
%14 = load i8, i8* %1
ret i8 %14
}

LLVM IR (-O2):
define zeroext i8 @CheckEventsHardLeft() {
%1 = tail call i64 (...) @CheckHitT()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i64 (...) @CheckCentOn()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i64 (...) @CheckRightOn()
br label %8
8: ; preds = %6, %3, %0
%9 = phi i8 [ 7, %0 ], [ 3, %3 ], [ 5, %6 ]
ret i8 %9
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ update_transition(int);
int main(int argc, char **argv) {
  int c;
  while ((c = getchar()) != EOF) {
    update_transition(c);
  }
  return 0;
}


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    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     115c <main+0x3c>
mov    -0x14(%rbp),%edi
call   1030 <update_transition@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <update_transition@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @update_transition(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void nomem(void) { errx(1, "virtual memory exhausted"); }


x86 assembly (clang, -O0):
<nomem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <errx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nomem>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"virtual memory exhausted\00"
define void @nomem() {
%1 = call i32 @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"virtual memory exhausted\00"
define void @nomem() {
%1 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ adjust_score(int /*<<< orphan*/);
int /*<<< orphan*/ print_buggy();
int /*<<< orphan*/ print_ground();
int /*<<< orphan*/ print_lives();
int /*<<< orphan*/ resize_ground(int /*<<< orphan*/);
int /*<<< orphan*/ resize_laser();
int /*<<< orphan*/ resize_meteors();
void game_redraw(void) {
  resize_meteors();
  resize_laser();
  resize_ground(0);
  print_ground();
  adjust_score(0);
  print_lives();
  print_buggy();
}


x86 assembly (clang, -O0):
<game_redraw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <resize_meteors@plt>
mov    $0x0,%al
call   1070 <resize_laser@plt>
xor    %edi,%edi
call   1060 <resize_ground@plt>
mov    $0x0,%al
call   1050 <print_ground@plt>
xor    %edi,%edi
call   1090 <adjust_score@plt>
mov    $0x0,%al
call   1080 <print_lives@plt>
mov    $0x0,%al
call   1040 <print_buggy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<game_redraw>:
push   %rax
xor    %eax,%eax
call   1030 <resize_meteors@plt>
xor    %eax,%eax
call   1070 <resize_laser@plt>
xor    %edi,%edi
call   1060 <resize_ground@plt>
xor    %eax,%eax
call   1050 <print_ground@plt>
xor    %edi,%edi
call   1090 <adjust_score@plt>
xor    %eax,%eax
call   1080 <print_lives@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_buggy@plt>

LLVM IR (-O0):
define void @game_redraw() {
%1 = call i32 (...) @resize_meteors()
%2 = call i32 (...) @resize_laser()
%3 = call i32 @resize_ground(i32 0)
%4 = call i32 (...) @print_ground()
%5 = call i32 @adjust_score(i32 0)
%6 = call i32 (...) @print_lives()
%7 = call i32 (...) @print_buggy()
ret void
}

LLVM IR (-O2):
define void @game_redraw() {
%1 = tail call i32 (...) @resize_meteors()
%2 = tail call i32 (...) @resize_laser()
%3 = tail call i32 @resize_ground(i32 0)
%4 = tail call i32 (...) @print_ground()
%5 = tail call i32 @adjust_score(i32 0)
%6 = tail call i32 (...) @print_lives()
%7 = tail call i32 (...) @print_buggy()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xfb() {
  Assert_real((isupper(251) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              1260, ("isupper should be 0 for 0xfb"));
}


x86 assembly (clang, -O0):
<t_isupper_0xfb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfb,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4ec,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0xfb>:
push   %rax
mov    $0xfb,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ec,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfb\00"
define void @t_isupper_0xfb() {
%1 = call i64 @isupper(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfb\00"
define void @t_isupper_0xfb() {
%1 = tail call i64 @isupper(i32 251)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int newoutf(struct tcb *tcp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.tcb = type opaque
define i32 @newoutf(%struct.tcb* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen(int, int);
int main(int argc, char **argv) { gen(400, 400); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x190,%esi
mov    %esi,%edi
call   1030 <gen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x190,%edi
mov    $0x190,%esi
call   1030 <gen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @gen(i32 400, i32 400)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @gen(i32 400, i32 400)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xbf() {
  Assert_real((iscntrl(191) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              960, ("iscntrl should be 0 for 0xbf"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0xbf>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbf,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3c0,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0xbf>:
push   %rax
mov    $0xbf,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xbf\00"
define void @t_iscntrl_0xbf() {
%1 = call i64 @iscntrl(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xbf\00"
define void @t_iscntrl_0xbf() {
%1 = tail call i64 @iscntrl(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf0;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main() {
  char buf0[300];
  volatile int (*var1)();
  var1 = 0;
  scanf(buf0, sizeof(buf0), stdin);
  if (var1) {
    printf("Wait, you aren't supposed to be here\n");
    var1();
  } else {
    printf("O look you didn't solve this. How very predictable\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x138(%rbp)
lea    -0x130(%rbp),%rdi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
mov    $0x12c,%esi
call   1040 <scanf@plt>
cmpq   $0x0,-0x138(%rbp)
je     117e <main+0x5e>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   *-0x138(%rbp)
jmp    118a <main+0x6a>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x138,%rsp
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x12c,%esi
call   1040 <scanf@plt>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x138,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [38 x i8] c"Wait, you aren't supposed to be here\0A\00"
@.str.1 = [52 x i8] c"O look you didn't solve this. How very predictable\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [300 x i8]
%3 = alloca i32 (...)*
store i32 0, i32* %1
store i32 (...)* null, i32 (...)** %3
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @scanf(i8* %4, i32 300, i32 %5)
%7 = load i32 (...)*, i32 (...)** %3
%8 = icmp ne i32 (...)* %7, null
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%11 = load i32 (...)*, i32 (...)** %3
%12 = call i32 (...) %11()
br label %15
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@stdin = global i32 0
@str = [51 x i8] c"O look you didn't solve this. How very predictable\00"
define i32 @main() {
%1 = alloca [300 x i8]
%2 = getelementptr inbounds [300 x i8], [300 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @scanf(i8* %2, i32 300, i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void alta_expedient() {}


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

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

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

LLVM IR (-O2):
define void @alta_expedient() {
ret void
}
unsigned int f(unsigned int b, unsigned int c) {
  unsigned int a = (b >> 16) * (c >> 16);
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
mov    -0x8(%rbp),%ecx
shr    $0x10,%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %esi,%eax
shr    $0x10,%edi
shr    $0x10,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = lshr i32 %6, 16
%8 = load i32, i32* %4
%9 = lshr i32 %8, 16
%10 = mul i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = lshr i32 %0, 16
%4 = lshr i32 %1, 16
%5 = mul nuw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
void ThreadLock(void) {}


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

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

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

LLVM IR (-O2):
define void @ThreadLock() {
ret void
}
int isschar(char input_char) {
  if (input_char == '!')
    return 1;
  if (input_char == '#')
    return 1;
  if (input_char == '$')
    return 1;
  if (input_char == '?')
    return 1;
  if (input_char == '@')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isschar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x21,%eax
jne    1123 <isschar+0x23>
movl   $0x1,-0x4(%rbp)
jmp    118e <isschar+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x23,%eax
jne    113c <isschar+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    118e <isschar+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x24,%eax
jne    1155 <isschar+0x55>
movl   $0x1,-0x4(%rbp)
jmp    118e <isschar+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x3f,%eax
jne    116e <isschar+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    118e <isschar+0x8e>
movsbl -0x5(%rbp),%eax
cmp    $0x40,%eax
jne    1187 <isschar+0x87>
movl   $0x1,-0x4(%rbp)
jmp    118e <isschar+0x8e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isschar>:
add    $0xdf,%dil
cmp    $0x1f,%dil
ja     111f <isschar+0x1f>
mov    $0x1,%eax
movzbl %dil,%ecx
mov    $0xc000000d,%edx
bt     %rcx,%rdx
jae    111f <isschar+0x1f>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isschar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 33
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %29
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 35
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %29
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 36
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %2
br label %29
18: ; preds = %13
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 63
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %2
br label %29
23: ; preds = %18
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 64
br i1 %26, label %27, label %28
27: ; preds = %23
store i32 1, i32* %2
br label %29
28: ; preds = %23
store i32 0, i32* %2
br label %29
29: ; preds = %28, %27, %22, %17, %12, %7
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @isschar(i8 signext %0) {
switch i8 %0, label %2 [
i8 33, label %3
i8 35, label %3
i8 36, label %3
i8 63, label %3
i8 64, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int land(int x, int y) { return (x & y); }


x86 assembly (clang, -O0):
<land>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @land(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 = and i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @land(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ log_any(char const *, int, char const *);
void log_debug(const char *type, int code, const char *msg) {
  log_any(type, code, msg);
}


x86 assembly (clang, -O0):
<log_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <log_any@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_debug>:
jmp    1030 <log_any@plt>

LLVM IR (-O0):
define void @log_debug(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 i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @log_any(i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @log_debug(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @log_any(i8* %0, i32 %1, i8* %2)
ret void
}
call2a(c, f1, s, d1, i, f2, l, d2) char c;
float f1;
short s;
double d1;
int i;
float f2;
long l;
double d2;
{
  c = 'a';
  f1 = 0.0;
  s = 5;
  d1 = 0.0;
  i = 6;
  f2 = 0.1;
  l = 7;
  d2 = 0.2;
}


x86 assembly (clang, -O0):
<call2a>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm2,-0x38(%rbp)
mov    %esi,%eax
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
mov    %dil,%sil
cvtsd2ss %xmm2,%xmm2
cvtsd2ss %xmm0,%xmm0
mov    %sil,-0x5(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movss  %xmm0,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movb   $0x61,-0x5(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movw   $0x5,-0xe(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x6,-0x1c(%rbp)
movss  0xe9e(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movq   $0x7,-0x28(%rbp)
movsd  0xe81(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @call2a(i32 %0, double %1, i32 %2, double %3, i32 %4, double %5, i64 %6, double %7) {
%9 = alloca i32
%10 = alloca i8
%11 = alloca float
%12 = alloca i16
%13 = alloca double
%14 = alloca i32
%15 = alloca float
%16 = alloca i64
%17 = alloca double
%18 = trunc i32 %0 to i8
%19 = fptrunc double %1 to float
%20 = trunc i32 %2 to i16
%21 = fptrunc double %5 to float
store i8 %18, i8* %10
store float %19, float* %11
store i16 %20, i16* %12
store double %3, double* %13
store i32 %4, i32* %14
store float %21, float* %15
store i64 %6, i64* %16
store double %7, double* %17
store i8 97, i8* %10
store float 0.000000e+00, float* %11
store i16 5, i16* %12
store double 0.000000e+00, double* %13
store i32 6, i32* %14
store float 0x3FB99999A0000000, float* %15
store i64 7, i64* %16
store double 2.000000e-01, double* %17
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
define i32 @call2a(i32 %0, double %1, i32 %2, double %3, i32 %4, double %5, i64 %6, double %7) {
ret i32 undef
}
int Operand_simm8x256_encode(unsigned int *valp) {
  unsigned imm8_0, simm8x256_0;
  simm8x256_0 = *valp;
  imm8_0 = ((simm8x256_0 >> 8) & 0xff);
  *valp = imm8_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_simm8x256_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_simm8x256_encode>:
movzbl 0x1(%rdi),%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_simm8x256_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = lshr i32 %7, 8
%9 = and i32 %8, 255
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32*, i32** %2
store i32 %10, i32* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_simm8x256_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = lshr i32 %2, 8
%4 = and i32 %3, 255
store i32 %4, i32* %0
ret i32 0
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_sort(struct genlist *,
                                int (*)(void const *, void const *));
void clause_list_sort(struct clause_list *tthis,
                      int (*compar)(const struct Clause *const *,
                                    const struct Clause *const *)) {
  genlist_sort((struct genlist *)tthis,
               (int (*)(const void *, const void *))compar);
}


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

x86 assembly (clang, -O2):
<clause_list_sort>:
jmp    1030 <genlist_sort@plt>

LLVM IR (-O0):
%struct.clause_list = type { i32 }
%struct.Clause = type opaque
%struct.genlist = type { i32 }
define void @clause_list_sort(%struct.clause_list* %0, i32 (%struct.Clause**, %struct.Clause**)* %1) {
%3 = alloca %struct.clause_list*
%4 = alloca i32 (%struct.Clause**, %struct.Clause**)*
store %struct.clause_list* %0, %struct.clause_list** %3
store i32 (%struct.Clause**, %struct.Clause**)* %1, i32 (%struct.Clause**, %struct.Clause**)** %4
%5 = load %struct.clause_list*, %struct.clause_list** %3
%6 = bitcast %struct.clause_list* %5 to %struct.genlist*
%7 = load i32 (%struct.Clause**, %struct.Clause**)*, i32 (%struct.Clause**, %struct.Clause**)** %4
%8 = bitcast i32 (%struct.Clause**, %struct.Clause**)* %7 to i32 (i8*, i8*)*
%9 = call i32 @genlist_sort(%struct.genlist* %6, i32 (i8*, i8*)* %8)
ret void
}

LLVM IR (-O2):
%struct.clause_list = type { i32 }
%struct.Clause = type opaque
%struct.genlist = type { i32 }
define void @clause_list_sort(%struct.clause_list* %0, i32 (%struct.Clause**, %struct.Clause**)* %1) {
%3 = bitcast %struct.clause_list* %0 to %struct.genlist*
%4 = bitcast i32 (%struct.Clause**, %struct.Clause**)* %1 to i32 (i8*, i8*)*
%5 = tail call i32 @genlist_sort(%struct.genlist* %3, i32 (i8*, i8*)* %4)
ret void
}
/* Type definitions */
struct Stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Journal_Printf(struct Stream *, char *, void *);
void GlobalPrint(void *ptr, struct Stream *stream) {
  Journal_Printf(stream, "(ptr): %p\n", ptr);
}


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

x86 assembly (clang, -O2):
<GlobalPrint>:
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <Journal_Printf@plt>

LLVM IR (-O0):
%struct.Stream = type { i32 }
@.str = [11 x i8] c"(ptr): %p\0A\00"
define void @GlobalPrint(i8* %0, %struct.Stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.Stream*
store i8* %0, i8** %3
store %struct.Stream* %1, %struct.Stream** %4
%5 = load %struct.Stream*, %struct.Stream** %4
%6 = load i8*, i8** %3
%7 = call i32 @Journal_Printf(%struct.Stream* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
%struct.Stream = type { i32 }
@.str = [11 x i8] c"(ptr): %p\0A\00"
define void @GlobalPrint(i8* %0, %struct.Stream* %1) {
%3 = tail call i32 @Journal_Printf(%struct.Stream* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
int SHA256_DIGEST_LENGTH;
int /*<<< orphan*/ bbp_sha256(int /*<<< orphan*/ const *,
                              int /*<<< orphan*/ const *, int);
void bbp_hash256(uint8_t *digest, const uint8_t *message, size_t len) {
  uint8_t tmp[SHA256_DIGEST_LENGTH];
  bbp_sha256(tmp, message, len);
  bbp_sha256(digest, tmp, SHA256_DIGEST_LENGTH);
}


x86 assembly (clang, -O0):
<bbp_hash256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
call   1030 <bbp_sha256@plt>
mov    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    0x2e71(%rip),%rax
mov    (%rax),%edx
call   1030 <bbp_sha256@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbp_hash256>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2ebc(%rip),%r15
mov    (%r15),%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1030 <bbp_sha256@plt>
mov    (%r15),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <bbp_sha256@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@SHA256_DIGEST_LENGTH = global i32 0
define void @bbp_hash256(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%9 = load i32, i32* @SHA256_DIGEST_LENGTH
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %7
%12 = alloca i32, i64 %10
store i64 %10, i64* %8
%13 = load i32*, i32** %5
%14 = load i64, i64* %6
%15 = trunc i64 %14 to i32
%16 = call i32 @bbp_sha256(i32* %12, i32* %13, i32 %15)
%17 = load i32*, i32** %4
%18 = load i32, i32* @SHA256_DIGEST_LENGTH
%19 = call i32 @bbp_sha256(i32* %17, i32* %12, i32 %18)
%20 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
@SHA256_DIGEST_LENGTH = global i32 0
define void @bbp_hash256(i32* %0, i32* %1, i64 %2) {
%4 = load i32, i32* @SHA256_DIGEST_LENGTH
%5 = zext i32 %4 to i64
%6 = alloca i32, i64 %5
%7 = trunc i64 %2 to i32
%8 = call i32 @bbp_sha256(i32* %6, i32* %1, i32 %7)
%9 = load i32, i32* @SHA256_DIGEST_LENGTH
%10 = call i32 @bbp_sha256(i32* %0, i32* %6, i32 %9)
ret void
}
const char *plugin_api_info_dir_separator_cb(void *data, const char *info_name,
                                             const char *arguments) {
  (void)data;
  (void)info_name;
  (void)arguments;
  return "/";
}


x86 assembly (clang, -O0):
<plugin_api_info_dir_separator_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xee9(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @plugin_api_info_dir_separator_cb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @plugin_api_info_dir_separator_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
short USBSTK5515_I2C_write(int, unsigned char *, int);
short OSD9616_send(unsigned short comdat, unsigned short data) {
  unsigned char cmd[2];
  cmd[0] = comdat & 0x00FF;
  cmd[1] = data;
  return USBSTK5515_I2C_write(0x3C, cmd, 2);
}


x86 assembly (clang, -O0):
<OSD9616_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %al,-0x5(%rbp)
lea    -0x6(%rbp),%rsi
mov    $0x3c,%edi
mov    $0x2,%edx
call   1030 <USBSTK5515_I2C_write@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSD9616_send>:
push   %rax
mov    %dil,0x6(%rsp)
mov    %sil,0x7(%rsp)
lea    0x6(%rsp),%rsi
mov    $0x3c,%edi
mov    $0x2,%edx
call   1030 <USBSTK5515_I2C_write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @OSD9616_send(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca [2 x i8]
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %9, i8* %10
%11 = load i16, i16* %4
%12 = trunc i16 %11 to i8
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %12, i8* %13
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%15 = call signext i16 @USBSTK5515_I2C_write(i32 60, i8* %14, i32 2)
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @OSD9616_send(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i16 %0 to i8
store i8 %5, i8* %4
%6 = trunc i16 %1 to i8
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %6, i8* %7
%8 = call signext i16 @USBSTK5515_I2C_write(i32 60, i8* %4, i32 2)
ret i16 %8
}
/* Variables and functions */
int atf_print_results();
int /*<<< orphan*/ atf_run_suite(void (*)());
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  do {
    extern void Opts(void);
    atf_run_suite(&Opts);
  } while (0);
  do {
    extern void Arg(void);
    atf_run_suite(&Arg);
  } while (0);
  return atf_print_results();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e93(%rip),%rdi
call   1030 <atf_run_suite@plt>
jmp    1147 <main+0x27>
mov    0x2e92(%rip),%rdi
call   1030 <atf_run_suite@plt>
mov    $0x0,%al
call   1040 <atf_print_results@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rdi
call   1030 <atf_run_suite@plt>
mov    0x2eac(%rip),%rdi
call   1030 <atf_run_suite@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <atf_print_results@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
br label %8
8: ; preds = %2
%9 = call i32 @atf_run_suite(void (...)* bitcast (void ()* @Opts to void (...)*))
br label %10
10: ; preds = %8
br label %11
11: ; preds = %10
%12 = call i32 @atf_run_suite(void (...)* bitcast (void ()* @Arg to void (...)*))
br label %13
13: ; preds = %11
%14 = call i32 (...) @atf_print_results()
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @atf_run_suite(void (...)* bitcast (void ()* @Opts to void (...)*))
%4 = tail call i32 @atf_run_suite(void (...)* bitcast (void ()* @Arg to void (...)*))
%5 = tail call i32 (...) @atf_print_results()
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ra;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, ...);
int test2(int n, int ra[n][100]) {
  printf("sizeof(ra) = %d.  sizeof(*ra) = %d\n", sizeof(ra), sizeof(*ra));
  if (sizeof(ra) != sizeof(int *)) {
    printf("Error %d\n", (int)21);
    exit(21);
  };
  if (sizeof(*ra) != 100 * sizeof(int)) {
    printf("Error %d\n", (int)22);
    exit(22);
  };
  return n;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x8,%esi
mov    $0x190,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    $0x190,%edx
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"sizeof(ra) = %d. sizeof(*ra) = %d\0A\00"
define i32 @test2(i32 %0, [100 x i32]* %1) {
%3 = alloca i32
%4 = alloca [100 x i32]*
store i32 %0, i32* %3
store [100 x i32]* %1, [100 x i32]** %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 8, i64 400)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [36 x i8] c"sizeof(ra) = %d. sizeof(*ra) = %d\0A\00"
define i32 @test2(i32 returned %0, [100 x i32]* nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 8, i64 400)
ret i32 %0
}
int GetGFromRGB(const int nRGB) { return (nRGB & 0x0000FF00) >> 8; }


x86 assembly (clang, -O0):
<GetGFromRGB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @GetGFromRGB(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @GetGFromRGB(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ AbsoluteIndexedYX0(int);
int /*<<< orphan*/ STA16(int /*<<< orphan*/, int);
void Op99M0X0(void) { STA16(AbsoluteIndexedYX0(2), 0xFFFFFF); }


x86 assembly (clang, -O0):
<Op99M0X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <AbsoluteIndexedYX0@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
call   1040 <STA16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op99M0X0>:
push   %rax
mov    $0x2,%edi
call   1030 <AbsoluteIndexedYX0@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
pop    %rax
jmp    1040 <STA16@plt>

LLVM IR (-O0):
define void @Op99M0X0() {
%1 = call i32 @AbsoluteIndexedYX0(i32 2)
%2 = call i32 @STA16(i32 %1, i32 16777215)
ret void
}

LLVM IR (-O2):
define void @Op99M0X0() {
%1 = tail call i32 @AbsoluteIndexedYX0(i32 2)
%2 = tail call i32 @STA16(i32 %1, i32 16777215)
ret void
}
/* Type definitions */
struct CMD {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *, char *);
void export(struct CMD *c) {
  char funix[300], ffs[300];
  scanf("%s%s", ffs, funix);
  printf("non implemente\n");
}


x86 assembly (clang, -O0):
<export>:
push   %rbp
mov    %rsp,%rbp
sub    $0x270,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x270(%rbp),%rsi
lea    -0x140(%rbp),%rdx
lea    0xebc(%rip),%rdi
call   1040 <scanf@plt>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x270,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<export>:
sub    $0x268,%rsp
lea    0xed2(%rip),%rdi
mov    %rsp,%rsi
lea    0x130(%rsp),%rdx
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
add    $0x268,%rsp
ret

LLVM IR (-O0):
%struct.CMD = type { i32 }
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [16 x i8] c"non implemente\0A\00"
define void @export(%struct.CMD* %0) {
%2 = alloca %struct.CMD*
%3 = alloca [300 x i8]
%4 = alloca [300 x i8]
store %struct.CMD* %0, %struct.CMD** %2
%5 = getelementptr inbounds [300 x i8], [300 x i8]* %4, i64 0, i64 0
%6 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.CMD = type { i32 }
@.str = [5 x i8] c"%s%s\00"
@str = [15 x i8] c"non implemente\00"
define void @export(%struct.CMD* nocapture readnone %0) {
%2 = alloca [300 x i8]
%3 = alloca [300 x i8]
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %4)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int parityCheck(int x) {
  int mask16 = 0xff << 8 | 0xff;
  int result16 = (x >> 16 ^ x) & mask16;
  int result8 = (result16 >> 8 ^ result16) & 0xff;
  int result4 = (result8 >> 4 ^ result8) & 0xf;
  int result2 = (result4 >> 2 ^ result4) & 0x3;
  return (result2 >> 1 ^ result2) & 0x1;
}


x86 assembly (clang, -O0):
<parityCheck>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
xor    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
xor    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x4,%eax
xor    -0x10(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x2,%eax
xor    -0x14(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
sar    $0x1,%eax
xor    -0x18(%rbp),%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parityCheck>:
movzwl %di,%eax
shr    $0x10,%edi
xor    %edi,%eax
movzbl %al,%ecx
shr    $0x8,%eax
xor    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
and    $0xf,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
shr    $0x2,%edx
xor    %ecx,%edx
mov    %edx,%eax
shr    %eax
xor    %edx,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @parityCheck(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
store i32 65535, i32* %3
%8 = load i32, i32* %2
%9 = ashr i32 %8, 16
%10 = load i32, i32* %2
%11 = xor i32 %9, %10
%12 = load i32, i32* %3
%13 = and i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = ashr i32 %14, 8
%16 = load i32, i32* %4
%17 = xor i32 %15, %16
%18 = and i32 %17, 255
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = ashr i32 %19, 4
%21 = load i32, i32* %5
%22 = xor i32 %20, %21
%23 = and i32 %22, 15
store i32 %23, i32* %6
%24 = load i32, i32* %6
%25 = ashr i32 %24, 2
%26 = load i32, i32* %6
%27 = xor i32 %25, %26
%28 = and i32 %27, 3
store i32 %28, i32* %7
%29 = load i32, i32* %7
%30 = ashr i32 %29, 1
%31 = load i32, i32* %7
%32 = xor i32 %30, %31
%33 = and i32 %32, 1
ret i32 %33
}

LLVM IR (-O2):
define i32 @parityCheck(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %0, 65535
%4 = xor i32 %2, %3
%5 = lshr i32 %4, 8
%6 = and i32 %4, 255
%7 = xor i32 %5, %6
%8 = lshr i32 %7, 4
%9 = and i32 %7, 15
%10 = xor i32 %8, %9
%11 = lshr i32 %10, 2
%12 = xor i32 %11, %10
%13 = lshr i32 %12, 1
%14 = xor i32 %13, %12
%15 = and i32 %14, 1
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ intmax_t;

/* Variables and functions */
int /*<<< orphan*/ __strtol_internal(char const *, char **, int,
                                     int /*<<< orphan*/);
intmax_t strtoimax(const char *__restrict nptr, char **__restrict endptr,
                   int base) {
  return __strtol_internal(nptr, endptr, base, 0);
}


x86 assembly (clang, -O0):
<strtoimax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <__strtol_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoimax>:
xor    %ecx,%ecx
jmp    1030 <__strtol_internal@plt>

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

LLVM IR (-O2):
define i32 @strtoimax(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = tail call i32 @__strtol_internal(i8* %0, i8** %1, i32 %2, i32 0)
ret i32 %4
}
double aa_horner3(double x, double a0, double a1, double a2) {
  return a0 + x * (a1 + x * a2);
}


x86 assembly (clang, -O0):
<aa_horner3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_horner3>:
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @aa_horner3(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %6
%10 = load double, double* %5
%11 = load double, double* %7
%12 = load double, double* %5
%13 = load double, double* %8
%14 = call double @llvm.fmuladd.f64(double %12, double %13, double %11)
%15 = call double @llvm.fmuladd.f64(double %10, double %14, double %9)
ret double %15
}

LLVM IR (-O2):
define double @aa_horner3(double %0, double %1, double %2, double %3) {
%5 = tail call double @llvm.fmuladd.f64(double %0, double %3, double %2)
%6 = tail call double @llvm.fmuladd.f64(double %0, double %5, double %1)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ list_dispose();
int /*<<< orphan*/ semantic_close();
int /*<<< orphan*/ stream_close();
int /*<<< orphan*/ syntax_close();
int /*<<< orphan*/ table_dtor();
void program_exit(int exit_code) {
  stream_close();
  syntax_close();
  semantic_close();
  table_dtor();
  list_dispose();
  exit(exit_code);
}


x86 assembly (clang, -O0):
<program_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <stream_close@plt>
mov    $0x0,%al
call   1070 <syntax_close@plt>
mov    $0x0,%al
call   1060 <semantic_close@plt>
mov    $0x0,%al
call   1040 <table_dtor@plt>
mov    $0x0,%al
call   1030 <list_dispose@plt>
mov    -0x4(%rbp),%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<program_exit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <stream_close@plt>
xor    %eax,%eax
call   1070 <syntax_close@plt>
xor    %eax,%eax
call   1060 <semantic_close@plt>
xor    %eax,%eax
call   1040 <table_dtor@plt>
xor    %eax,%eax
call   1030 <list_dispose@plt>
mov    %ebx,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
define void @program_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @stream_close()
%4 = call i32 (...) @syntax_close()
%5 = call i32 (...) @semantic_close()
%6 = call i32 (...) @table_dtor()
%7 = call i32 (...) @list_dispose()
%8 = load i32, i32* %2
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
define void @program_exit(i32 %0) {
%2 = tail call i32 (...) @stream_close()
%3 = tail call i32 (...) @syntax_close()
%4 = tail call i32 (...) @semantic_close()
%5 = tail call i32 (...) @table_dtor()
%6 = tail call i32 (...) @list_dispose()
%7 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t soft_timer_ticks_to_s(int32_t ticks) { return ticks / 32768; }


x86 assembly (clang, -O0):
<soft_timer_ticks_to_s>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8000,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<soft_timer_ticks_to_s>:
lea    0x7fff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0xf,%eax
ret

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

LLVM IR (-O2):
define i32 @soft_timer_ticks_to_s(i32 %0) {
%2 = sdiv i32 %0, 32768
ret i32 %2
}