xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, ...);
main() {
  printf("type anything or ctrl-d to send EOF\n");
  printf("getchar() != EOF: %d\n", (getchar() != EOF));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e9d(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"type anything or ctrl-d to send EOF\0A\00"
@.str.1 = [22 x i8] c"getchar() != EOF: %d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"getchar() != EOF: %d\0A\00"
@EOF = global i64 0
@str = [36 x i8] c"type anything or ctrl-d to send EOF\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 (...) @getchar()
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int do_685() { return 685; }


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

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

LLVM IR (-O0):
define i32 @do_685() {
ret i32 685
}

LLVM IR (-O2):
define i32 @do_685() {
ret i32 685
}
/* Type definitions */
struct thread_state {
  int dummy;
};
typedef int /*<<< orphan*/ mcontext_t;

/* Variables and functions */
void copy_state_to(mcontext_t *src, struct thread_state *dst) {}


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

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

LLVM IR (-O0):
%struct.thread_state = type { i32 }
define void @copy_state_to(i32* %0, %struct.thread_state* %1) {
%3 = alloca i32*
%4 = alloca %struct.thread_state*
store i32* %0, i32** %3
store %struct.thread_state* %1, %struct.thread_state** %4
ret void
}

LLVM IR (-O2):
%struct.thread_state = type { i32 }
define void @copy_state_to(i32* nocapture %0, %struct.thread_state* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void help(char *argv0) {
  printf("%s [backlight-level [ %% ]] [--help]\n"
         "--help             Shows this message.\n"
         "--show             Shows actual brightness level.\n"
         "--inc              Increases actual brightness level.\n"
         "--dec              Decreases actual brightness level.\n"
         "--stdin            Read backlight value from stdin\n"
         "backlight-level    Sets backlight\n"
         "backlight-level %%  Sets backlight from 1%% to 100%%\n"
         "This tool changes screen backlight.\n"
         "Example:\n"
         "%s 10 %%       Sets backlight level until 10%%.\n",
         argv0, argv0);
}


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

x86 assembly (clang, -O2):
<help>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [466 x i8] c"%s [backlight-level [ %% ]] [--help]\0A--help Shows this message.\0A--show Shows actual brightness level.\0A--inc Increases actual brightness level.\0A--dec Decreases actual brightness level.\0A--stdin Read backlight value from stdin\0Abacklight-level Sets backlight\0Abacklight-level %% Sets backlight from 1%% to 100%%\0AThis tool changes screen backlight.\0AExample:\0A%s 10 %% Sets backlight level until 10%%.\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [466 x i8] c"%s [backlight-level [ %% ]] [--help]\0A--help Shows this message.\0A--show Shows actual brightness level.\0A--inc Increases actual brightness level.\0A--dec Decreases actual brightness level.\0A--stdin Read backlight value from stdin\0Abacklight-level Sets backlight\0Abacklight-level %% Sets backlight from 1%% to 100%%\0AThis tool changes screen backlight.\0AExample:\0A%s 10 %% Sets backlight level until 10%%.\0A\00"
define void @help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([466 x i8], [466 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
int get_abs(int);
int get_abs_sum(int a, int b, int c) {
  return get_abs(a) + get_abs(b) + get_abs(c);
}


x86 assembly (clang, -O0):
<get_abs_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_abs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <get_abs@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <get_abs@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_abs_sum>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
call   1030 <get_abs@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <get_abs@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    %r14d,%edi
call   1030 <get_abs@plt>
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_abs_sum(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* %4
%8 = call i32 @get_abs(i32 %7)
%9 = load i32, i32* %5
%10 = call i32 @get_abs(i32 %9)
%11 = add nsw i32 %8, %10
%12 = load i32, i32* %6
%13 = call i32 @get_abs(i32 %12)
%14 = add nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_abs_sum(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @get_abs(i32 %0)
%5 = tail call i32 @get_abs(i32 %1)
%6 = add nsw i32 %5, %4
%7 = tail call i32 @get_abs(i32 %2)
%8 = add nsw i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int _false_usage();
int getopt(int, char **, char *);
int _false_main(int argc, char *argv[]) {
  int o;
  while ((o = getopt(argc, argv, "")) != -1)
    switch (o) {
    default:
      return _false_usage();
    }
  return 2;
}


x86 assembly (clang, -O0):
<_false_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xec3(%rip),%rdx
call   1040 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     115d <_false_main+0x3d>
mov    $0x0,%al
call   1030 <_false_usage@plt>
mov    %eax,-0x4(%rbp)
jmp    1164 <_false_main+0x44>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_false_main>:
push   %rax
lea    0xed8(%rip),%rdx
call   1040 <getopt@plt>
cmp    $0xffffffff,%eax
je     113a <_false_main+0x1a>
xor    %eax,%eax
pop    %rcx
jmp    1030 <_false_usage@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @_false_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @getopt(i32 %8, i8** %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %10, i32* %6
%11 = icmp ne i32 %10, -1
br i1 %11, label %12, label %16
12: ; preds = %7
%13 = load i32, i32* %6
switch i32 %13, label %14 [
]
14: ; preds = %12
%15 = call i32 (...) @_false_usage()
store i32 %15, i32* %3
br label %17
16: ; preds = %7
store i32 2, i32* %3
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @_false_main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @_false_usage()
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 2, %2 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ _int(int /*<<< orphan*/);
unsigned _hex_to_int(const char *s, size_t len) {
  unsigned ret = 0;
  while (len--) {
    ret <<= 4;
    ret += _int(*s++);
  }
  return ret;
}


x86 assembly (clang, -O0):
<_hex_to_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
je     1171 <_hex_to_int+0x61>
mov    -0x14(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <_int@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
jmp    1127 <_hex_to_int+0x17>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hex_to_int>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     114c <_hex_to_int+0x3c>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
shl    $0x4,%ebp
movsbl (%r14,%rbx,1),%edi
call   1030 <_int@plt>
add    %ebp,%eax
add    $0x1,%rbx
mov    %eax,%ebp
cmp    %rbx,%r15
jne    1130 <_hex_to_int+0x20>
jmp    114e <_hex_to_int+0x3e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_hex_to_int(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %17, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %15, %4 ], [ 0, %2 ]
%6 = phi i64 [ %8, %4 ], [ %1, %2 ]
%7 = phi i8* [ %10, %4 ], [ %0, %2 ]
%8 = add i64 %6, -1
%9 = shl i32 %5, 4
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = tail call i64 @_int(i32 %12)
%14 = trunc i64 %13 to i32
%15 = add i32 %9, %14
%16 = icmp eq i64 %8, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %2
%18 = phi i32 [ 0, %2 ], [ %15, %4 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printByte(char);
int /*<<< orphan*/ printStr(char *);
void printMem(char *str, int length) {
  while (length > 0) {
    printByte(*str);
    printStr(" ");
    length--;
    str++;
  }
}


x86 assembly (clang, -O0):
<printMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    116b <printMem+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <printByte@plt>
lea    0xeb4(%rip),%rdi
call   1030 <printStr@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112f <printMem+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMem>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    115c <printMem+0x3c>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
lea    0xec9(%rip),%r14
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1040 <printByte@plt>
mov    %r14,%rdi
call   1030 <printStr@plt>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1140 <printMem+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @printMem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = call i32 @printByte(i8 signext %10)
%12 = call i32 @printStr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %4
%14 = add nsw i32 %13, -1
store i32 %14, i32* %4
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @printMem(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ %1, %2 ]
%6 = phi i8* [ %11, %4 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call i32 @printByte(i8 signext %7)
%9 = tail call i32 @printStr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = add nsw i32 %5, -1
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = icmp ugt i32 %5, 1
br i1 %12, label %4, label %13
13: ; preds = %4, %2
ret void
}
void foo522() {}


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

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

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

LLVM IR (-O2):
define void @foo522() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cuaF(unsigned char *);
void cuaF2(unsigned char *x) { cuaF(x); }


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

x86 assembly (clang, -O2):
<cuaF2>:
jmp    1030 <cuaF@plt>

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

LLVM IR (-O2):
define void @cuaF2(i8* %0) {
%2 = tail call i32 @cuaF(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x42() {
  Assert_real((isspace(66) == 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_isspace.c",
              335, ("isspace should be 0 for B"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x42>:
push   %rax
mov    $0x42,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x14f,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for B\00"
define void @t_isspace_0x42() {
%1 = call i64 @isspace(i32 66)
%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 335, i8* getelementptr inbounds ([26 x i8], [26 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for B\00"
define void @t_isspace_0x42() {
%1 = tail call i64 @isspace(i32 66)
%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 335, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  int mov = 0;
  int arg1 = 2;
  __asm__("movl $0xFF, %%eax;" : "=a"(mov) : "a"(arg1));
  return mov;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%eax
mov    $0xff,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = call i32 asm "movl $$0xFF, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 asm "movl $$0xFF, %eax;", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 2)
ret i32 %1
}
struct s26 {
  struct {
    char a, b;
  } a;
  struct {
    char a, b;
  } b;
} f26(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<f26>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f26+0x9>
jmp    1109 <f26+0x9>

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

LLVM IR (-O0):
define i32 @f26() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define i32 @f26() {
br label %1
1: ; preds = %0, %1
br label %1
}
int fun330() { return 330; }


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

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

LLVM IR (-O0):
define i32 @fun330() {
ret i32 330
}

LLVM IR (-O2):
define i32 @fun330() {
ret i32 330
}
_Complex float f26(void) {}


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

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

LLVM IR (-O0):
define <2 x float> @f26() {
%1 = alloca { float, float }
%2 = bitcast { float, float }* %1 to <2 x float>*
%3 = load <2 x float>, <2 x float>* %2
ret <2 x float> %3
}

LLVM IR (-O2):
define <2 x float> @f26() {
ret <2 x float> undef
}
int opal_hibit(int value, int start) {
  unsigned int mask;
  --start;
  mask = 1 << start;
  for (; start >= 0; --start, mask >>= 1) {
    if (value & mask) {
      break;
    }
  }
  return start;
}


x86 assembly (clang, -O0):
<opal_hibit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     115a <opal_hibit+0x5a>
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     113e <opal_hibit+0x3e>
jmp    115a <opal_hibit+0x5a>
jmp    1143 <opal_hibit+0x43>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <opal_hibit+0x20>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opal_hibit>:
lea    -0x1(%rsi),%eax
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%edx
test   %esi,%esi
jle    111f <opal_hibit+0x1f>
mov    %edx,%ecx
and    %edi,%ecx
jne    111f <opal_hibit+0x1f>
add    $0xffffffff,%eax
jae    111f <opal_hibit+0x1f>
shr    %edx
jmp    1110 <opal_hibit+0x10>
ret

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

LLVM IR (-O2):
define i32 @opal_hibit(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl nuw i32 1, %3
%5 = icmp sgt i32 %1, 0
%6 = and i32 %4, %0
%7 = icmp eq i32 %6, 0
%8 = select i1 %5, i1 %7, i1 false
br i1 %8, label %9, label %18
9: ; preds = %2, %9
%10 = phi i32 [ %13, %9 ], [ %4, %2 ]
%11 = phi i32 [ %12, %9 ], [ %3, %2 ]
%12 = add nsw i32 %11, -1
%13 = lshr i32 %10, 1
%14 = icmp ne i32 %11, 0
%15 = and i32 %13, %0
%16 = icmp eq i32 %15, 0
%17 = select i1 %14, i1 %16, i1 false
br i1 %17, label %9, label %18
18: ; preds = %9, %2
%19 = phi i32 [ %3, %2 ], [ %12, %9 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ s2linea(int, float *, float *, float *, double);
void s2line(int in, float *ixpts, float *iypts, float *izpts) {
  s2linea(in, ixpts, iypts, izpts, 1.0);
}


x86 assembly (clang, -O0):
<s2line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  0xec2(%rip),%xmm0
call   1030 <s2linea@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2line>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <s2linea@plt>

LLVM IR (-O0):
define void @s2line(i32 %0, float* %1, float* %2, float* %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store i32 %0, i32* %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load i32, i32* %5
%10 = load float*, float** %6
%11 = load float*, float** %7
%12 = load float*, float** %8
%13 = call i32 @s2linea(i32 %9, float* %10, float* %11, float* %12, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @s2line(i32 %0, float* %1, float* %2, float* %3) {
%5 = tail call i32 @s2linea(i32 %0, float* %1, float* %2, float* %3, double 1.000000e+00)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *BN_new();
scalar_t__ malloc(int);
BIGNUM **poly_new() {
  BIGNUM **p = (BIGNUM **)malloc(2 * sizeof(BIGNUM *));
  int i;
  for (i = 0; i < 2; i++)
    p[i] = BN_new();
  return p;
}


x86 assembly (clang, -O0):
<poly_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    116b <poly_new+0x4b>
mov    $0x0,%al
call   1030 <BN_new@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <poly_new+0x1d>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly_new>:
push   %rbx
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
call   1030 <BN_new@plt>
mov    %rax,0x8(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32** @poly_new() {
%1 = tail call i64 @malloc(i32 16)
%2 = inttoptr i64 %1 to i32**
%3 = tail call i32* (...) @BN_new()
store i32* %3, i32** %2
%4 = tail call i32* (...) @BN_new()
%5 = getelementptr inbounds i32*, i32** %2, i64 1
store i32* %4, i32** %5
ret i32** %2
}
/* Variables and functions */
float fmod(float, float);
float maths_calc_smaller_angle(float angle) {
  float out;
  if (angle > 0.0f) {
    out = fmod(angle + 3.141592653589793f, 2.0f * 3.141592653589793f) -
          3.141592653589793f;
  } else {
    out = fmod(angle - 3.141592653589793f, 2.0f * 3.141592653589793f) +
          3.141592653589793f;
  }
  return out;
}


x86 assembly (clang, -O0):
<maths_calc_smaller_angle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    115e <maths_calc_smaller_angle+0x4e>
movss  0xeca(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  0xec1(%rip),%xmm1
call   1030 <fmod@plt>
movss  0xeb0(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    118d <maths_calc_smaller_angle+0x7d>
movss  -0x4(%rbp),%xmm0
movss  0xe95(%rip),%xmm1
subss  %xmm1,%xmm0
movss  0xe8d(%rip),%xmm1
call   1030 <fmod@plt>
movss  0xe7c(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maths_calc_smaller_angle>:
sub    $0x18,%rsp
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
cmpltss %xmm1,%xmm0
movss  0xed6(%rip),%xmm2
movaps %xmm0,%xmm3
andps  %xmm2,%xmm3
movss  0xecc(%rip),%xmm4
andnps %xmm4,%xmm0
orps   %xmm3,%xmm0
ja     1143 <maths_calc_smaller_angle+0x33>
movaps %xmm2,%xmm4
movaps %xmm4,(%rsp)
addss  %xmm1,%xmm0
movss  0xeb5(%rip),%xmm1
call   1030 <fmod@plt>
addss  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @maths_calc_smaller_angle(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %2
%8 = fadd float %7, 0x400921FB60000000
%9 = call float @fmod(float %8, float 0x401921FB60000000)
%10 = fsub float %9, 0x400921FB60000000
store float %10, float* %3
br label %16
11: ; preds = %1
%12 = load float, float* %2
%13 = fsub float %12, 0x400921FB60000000
%14 = call float @fmod(float %13, float 0x401921FB60000000)
%15 = fadd float %14, 0x400921FB60000000
store float %15, float* %3
br label %16
16: ; preds = %11, %6
%17 = load float, float* %3
ret float %17
}

LLVM IR (-O2):
define float @maths_calc_smaller_angle(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float 0x400921FB60000000, float 0xC00921FB60000000
%4 = select i1 %2, float 0xC00921FB60000000, float 0x400921FB60000000
%5 = fadd float %3, %0
%6 = tail call float @fmod(float %5, float 0x401921FB60000000)
%7 = fadd float %6, %4
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_ldc(int, int, void const *);
void ldc(const void *i) { __builtin_arm_ldc(1, 2, i); }


x86 assembly (clang, -O0):
<ldc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <__builtin_arm_ldc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldc>:
mov    %rdi,%rdx
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <__builtin_arm_ldc@plt>

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

LLVM IR (-O2):
define void @ldc(i8* %0) {
%2 = tail call i32 @__builtin_arm_ldc(i32 1, i32 2, i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int read_target_system_without_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(150, a, b, c);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @read_target_system_without_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 150, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ write_texture(char *, char *);
int main(int argc, char **argv) {
  if (argc < 3) {
    printf("usage: jpg2tex outfile.tex infile.jpg\n");
  }
  write_texture(argv[1], argv[2]);
}


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)
cmpl   $0x3,-0x8(%rbp)
jge    114c <main+0x2c>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <write_texture@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1135 <main+0x15>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   1040 <write_texture@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"usage: jpg2tex outfile.tex infile.jpg\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @write_texture(i8* %13, i8* %16)
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str = [38 x i8] c"usage: jpg2tex outfile.tex infile.jpg\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @write_texture(i8* %8, i8* %10)
ret i32 0
}
int max2(int a, int b) {
  int x;
  if (a >= b)
    x = a;
  else
    x = b;
}


x86 assembly (clang, -O0):
<max2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1121 <max2+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <max2+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @max2(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ glutWireTeapot(int);
void drawWireTeapot(void) { glutWireTeapot(1); }


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

x86 assembly (clang, -O2):
<drawWireTeapot>:
mov    $0x1,%edi
jmp    1030 <glutWireTeapot@plt>

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

LLVM IR (-O2):
define void @drawWireTeapot() {
%1 = tail call i32 @glutWireTeapot(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_t1ha64s_finalise(int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_t1ha64s_fmix1(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_t1ha64s_init(int, uintptr_t, int /*<<< orphan*/ *);
uint64_t rgph_u64_t1ha64s_u32(uint32_t value, uintptr_t seed) {
  uint64_t h[4];
  rgph_t1ha64s_init(sizeof(value), seed, h);
  rgph_t1ha64s_fmix1(value, h);
  return rgph_t1ha64s_finalise(h);
}


x86 assembly (clang, -O0):
<rgph_u64_t1ha64s_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x4,%edi
call   1030 <rgph_t1ha64s_init@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1050 <rgph_t1ha64s_fmix1@plt>
lea    -0x20(%rbp),%rdi
call   1040 <rgph_t1ha64s_finalise@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u64_t1ha64s_u32>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
mov    %rsp,%r14
mov    $0x4,%edi
mov    %r14,%rdx
call   1030 <rgph_t1ha64s_init@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <rgph_t1ha64s_fmix1@plt>
mov    %r14,%rdi
call   1040 <rgph_t1ha64s_finalise@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @rgph_u64_t1ha64s_u32(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [4 x i32]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%8 = call i32 @rgph_t1ha64s_init(i32 4, i64 %6, i32* %7)
%9 = load i32, i32* %3
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%11 = call i32 @rgph_t1ha64s_fmix1(i32 %9, i32* %10)
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%13 = call i32 @rgph_t1ha64s_finalise(i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @rgph_u64_t1ha64s_u32(i32 %0, i64 %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @rgph_t1ha64s_init(i32 4, i64 %1, i32* %5)
%7 = call i32 @rgph_t1ha64s_fmix1(i32 %0, i32* %5)
%8 = call i32 @rgph_t1ha64s_finalise(i32* %5)
ret i32 %8
}
main() {
  int y;
  int *p, *q;
  *p = 5;
  y = *q;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = load i32*, i32** %2
store i32 5, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
store i32 %6, i32* %1
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int CHAR_BIT;
int main(void) {
  (int)1 << (sizeof(int) - 1) * CHAR_BIT;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @CHAR_BIT
%3 = sext i32 %2 to i64
%4 = mul i64 3, %3
%5 = trunc i64 %4 to i32
%6 = shl i32 1, %5
ret i32 0
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void beginTest(const char *str) {
  printf("\n*************************************************************\n");
  if (str != NULL)
    printf("%s\n", str);
}


x86 assembly (clang, -O0):
<beginTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     1147 <beginTest+0x37>
mov    -0x8(%rbp),%rsi
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beginTest>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
test   %rbx,%rbx
je     112e <beginTest+0x1e>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [64 x i8] c"\0A*************************************************************\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @beginTest(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@str = [63 x i8] c"\0A*************************************************************\00"
define void @beginTest(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
int debugger_fault_handler(struct pt_regs *regs) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define i32 @debugger_fault_handler(%struct.pt_regs* nocapture readnone %0) {
ret i32 0
}
void create_heap(heap, num) struct fiblist **heap;
int *num;
{
  *heap = 0;
  *num = 0;
}


x86 assembly (clang, -O0):
<create_heap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_heap>:
movq   $0x0,(%rdi)
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
%struct.fiblist = type opaque
define void @create_heap(%struct.fiblist** %0, i32* %1) {
%3 = alloca %struct.fiblist**
%4 = alloca i32*
store %struct.fiblist** %0, %struct.fiblist*** %3
store i32* %1, i32** %4
%5 = load %struct.fiblist**, %struct.fiblist*** %3
store %struct.fiblist* null, %struct.fiblist** %5
%6 = load i32*, i32** %4
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
%struct.fiblist = type opaque
define void @create_heap(%struct.fiblist** nocapture writeonly %0, i32* nocapture writeonly %1) {
store %struct.fiblist* null, %struct.fiblist** %0
store i32 0, i32* %1
ret void
}
void rcu_irq_exit_preempt(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_irq_exit_preempt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_b();
int /*<<< orphan*/ func_e();
void func_a() {
  for (;;) {
    func_b();
    func_e();
  }
}


x86 assembly (clang, -O0):
<func_a>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <func_a+0x9>
mov    $0x0,%al
call   1030 <func_b@plt>
mov    $0x0,%al
call   1040 <func_e@plt>
jmp    1129 <func_a+0x9>

x86 assembly (clang, -O2):
<func_a>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <func_b@plt>
xor    %eax,%eax
call   1040 <func_e@plt>
jmp    1130 <func_a+0x10>

LLVM IR (-O0):
define void @func_a() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @func_b()
%3 = call i32 (...) @func_e()
br label %1
}

LLVM IR (-O2):
define void @func_a() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @func_b()
%3 = tail call i32 (...) @func_e()
br label %1
}
unsigned f(unsigned x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
scalar_t__ malloc(int);
int *allocVectorInt(int size) {
  int *vector = (int *)malloc(size * sizeof(int));
  return vector;
}


x86 assembly (clang, -O0):
<allocVectorInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocVectorInt>:
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @allocVectorInt(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
define i32* @allocVectorInt(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int const);
void _dropout(const int errcode) { exit(errcode); }


x86 assembly (clang, -O0):
<_dropout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<_dropout>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @_dropout(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
void UARTDisable(unsigned long ulBase) {
  ;
  while ((*((volatile unsigned long *)(ulBase + 0x00000018))) & 0x00000008) {
  }
  (*((volatile unsigned long *)(ulBase + 0x0000002C))) &= ~(0x00000010);
  (*((volatile unsigned long *)(ulBase + 0x00000030))) &=
      ~(0x00000001 | 0x00000100 | 0x00000200);
}


x86 assembly (clang, -O0):
<UARTDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
and    $0x8,%rax
cmp    $0x0,%rax
je     1123 <UARTDisable+0x23>
jmp    1108 <UARTDisable+0x8>
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%rcx
and    $0xffffffffffffffef,%rcx
mov    %rcx,0x2c(%rax)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rcx
and    $0xfffffffffffffcfe,%rcx
mov    %rcx,0x30(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTDisable>:
testq  $0x8,0x18(%rdi)
jne    1100 <UARTDisable>
andq   $0xffffffffffffffef,0x2c(%rdi)
andq   $0xfffffffffffffcfe,0x30(%rdi)
ff
ret

LLVM IR (-O0):
define void @UARTDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %10, %1
%4 = load i64, i64* %2
%5 = add i64 %4, 24
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 8
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
br label %3
11: ; preds = %3
%12 = load i64, i64* %2
%13 = add i64 %12, 44
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = and i64 %15, -17
store volatile i64 %16, i64* %14
%17 = load i64, i64* %2
%18 = add i64 %17, 48
%19 = inttoptr i64 %18 to i64*
%20 = load volatile i64, i64* %19
%21 = and i64 %20, -770
store volatile i64 %21, i64* %19
ret void
}

LLVM IR (-O2):
define void @UARTDisable(i64 %0) {
%2 = add i64 %0, 24
%3 = inttoptr i64 %2 to i64*
br label %4
4: ; preds = %4, %1
%5 = load volatile i64, i64* %3
%6 = and i64 %5, 8
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4
%9 = add i64 %0, 44
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, -17
store volatile i64 %12, i64* %10
%13 = add i64 %0, 48
%14 = inttoptr i64 %13 to i64*
%15 = load volatile i64, i64* %14
%16 = and i64 %15, -770
store volatile i64 %16, i64* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ rotate_text(char *);
void direct_mode2(char *a) {
  char *s = a;
  rotate_text(s);
  printf("%s\n", s);
  exit(0);
}


x86 assembly (clang, -O0):
<direct_mode2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <rotate_text@plt>
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<direct_mode2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <rotate_text@plt>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @direct_mode2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @rotate_text(i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @direct_mode2(i8* %0) {
%2 = tail call i32 @rotate_text(i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}