xunge/DecIR huggingface dataset:
/* Variables and functions */
int ___sl_get_nondet_int();
int /*<<< orphan*/ strlen(char const *);
int is_orphan_vg(char const *vg_name) {
  int tmp;
  {
    {
      strlen(vg_name);
      tmp = ___sl_get_nondet_int();
    }
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<is_orphan_vg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x0,%al
call   1040 <___sl_get_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_orphan_vg(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 (...) @___sl_get_nondet_int()
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_orphan_vg(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 (...) @___sl_get_nondet_int()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_sys_err() {
  fprintf(stderr, "ERROR:\tSystem call failed.\n");
  return;
}


x86 assembly (clang, -O0):
<print_sys_err>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sys_err>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"ERROR:\09System call failed.\0A\00"
define void @print_sys_err() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"ERROR:\09System call failed.\0A\00"
define void @print_sys_err() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int fill_rule;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_fill_rule(void *_p, int _v) {
  ((XGCValues *)_p)->fill_rule = (int)_v;
}


x86 assembly (clang, -O0):
<set_XGCValues_fill_rule>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XGCValues_fill_rule>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XGCValues_fill_rule(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XGCValues_fill_rule(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf29(int f, int n) { return (cbuf(f, n, 29)); }


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

x86 assembly (clang, -O2):
<cbuf29>:
mov    $0x1d,%edx
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf29(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 29)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
char *skip_chars(char *in_line) {
  while (in_line[0] && (!isspace(in_line[0])))
    in_line++;
  return in_line;
}


x86 assembly (clang, -O0):
<skip_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skip_chars+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skip_chars+0x48>
jmp    1169 <skip_chars+0x59>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_chars+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_chars>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <skip_chars+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1138 <skip_chars+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_chars+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_chars(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ absolutelong();
int /*<<< orphan*/ adc16(int /*<<< orphan*/);
int /*<<< orphan*/ readmemw65816(int /*<<< orphan*/);
void adcLong16(void) { adc16(readmemw65816(absolutelong())); }


x86 assembly (clang, -O0):
<adcLong16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <absolutelong@plt>
mov    %eax,%edi
call   1040 <readmemw65816@plt>
mov    %eax,%edi
call   1050 <adc16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adcLong16>:
push   %rax
xor    %eax,%eax
call   1030 <absolutelong@plt>
mov    %eax,%edi
call   1040 <readmemw65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <adc16@plt>

LLVM IR (-O0):
define void @adcLong16() {
%1 = call i32 (...) @absolutelong()
%2 = call i32 @readmemw65816(i32 %1)
%3 = call i32 @adc16(i32 %2)
ret void
}

LLVM IR (-O2):
define void @adcLong16() {
%1 = tail call i32 (...) @absolutelong()
%2 = tail call i32 @readmemw65816(i32 %1)
%3 = tail call i32 @adc16(i32 %2)
ret void
}
/* Variables and functions */
char getchar();
void ClearInput() {
  char c;
  while (1) {
    c = getchar();
    if (c == 0x0a)
      break;
  }
}


x86 assembly (clang, -O0):
<ClearInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1134 <ClearInput+0x24>
jmp    1139 <ClearInput+0x29>
jmp    1118 <ClearInput+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearInput>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <ClearInput+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @ClearInput() {
%1 = alloca i8
br label %2
2: ; preds = %0, %8
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 10
br i1 %6, label %7, label %8
7: ; preds = %2
br label %9
8: ; preds = %2
br label %2
9: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @ClearInput() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret void
}
int xisempty(const char *s) { return (s == 0) || (*s == 0); }


x86 assembly (clang, -O0):
<xisempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <xisempty+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisempty>:
test   %rdi,%rdi
je     110e <xisempty+0xe>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @xisempty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int myEqualString(void *a, void *b) {
  char *aa = (char *)a;
  char *bb = (char *)b;
  return strcmp(aa, bb) == 0;
}


x86 assembly (clang, -O0):
<myEqualString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myEqualString>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @myEqualString(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i64 @strcmp(i8* %9, i8* %10)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @myEqualString(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xf3() {
  Assert_real((isxdigit(243) == 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_isxdigit.c",
              1220, ("isxdigit should be 0 for 0xf3"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xf3>:
push   %rax
mov    $0xf3,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4c4,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf3\00"
define void @t_isxdigit_0xf3() {
%1 = call i64 @isxdigit(i32 243)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1220, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf3\00"
define void @t_isxdigit_0xf3() {
%1 = tail call i64 @isxdigit(i32 243)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1220, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int MAIN() {
  int i = 8;
  int *p = &i;
  *p >>= 2;
  print("i ", *p);
  print(i);
  return 0;
}


x86 assembly (clang, -O0):
<MAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x8,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sar    $0x2,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAIN>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <print@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i \00"
define i32 @MAIN() {
%1 = alloca i32
%2 = alloca i32*
store i32 8, i32* %1
store i32* %1, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = ashr i32 %4, 2
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @print to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"i \00"
define i32 @MAIN() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @print to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @print to i32 (i32, ...)*)(i32 2)
ret i32 0
}
/* Variables and functions */
char *_is_hostname(char const *);
char *_is_single_terminal(char const *, char);
char const *_is_prefix_hostname(char const *peek) {
  if (!(peek = _is_hostname(peek)))
    return NULL;
  if (!(peek = _is_single_terminal(peek, ' ')))
    return NULL;
  return peek;
}


x86 assembly (clang, -O0):
<_is_prefix_hostname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_is_hostname@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1150 <_is_prefix_hostname+0x30>
movq   $0x0,-0x8(%rbp)
jmp    1181 <_is_prefix_hostname+0x61>
mov    -0x10(%rbp),%rdi
mov    $0x20,%esi
call   1040 <_is_single_terminal@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1179 <_is_prefix_hostname+0x59>
movq   $0x0,-0x8(%rbp)
jmp    1181 <_is_prefix_hostname+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_prefix_hostname>:
push   %rax
call   1030 <_is_hostname@plt>
test   %rax,%rax
je     1139 <_is_prefix_hostname+0x19>
mov    %rax,%rdi
mov    $0x20,%esi
pop    %rax
jmp    1040 <_is_single_terminal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @_is_prefix_hostname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @_is_hostname(i8* %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %15
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @_is_single_terminal(i8* %9, i8 signext 32)
store i8* %10, i8** %3
%11 = icmp ne i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %8
store i8* null, i8** %2
br label %15
13: ; preds = %8
%14 = load i8*, i8** %3
store i8* %14, i8** %2
br label %15
15: ; preds = %13, %12, %7
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @_is_prefix_hostname(i8* %0) {
%2 = tail call i8* @_is_hostname(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @_is_single_terminal(i8* %2, i8 signext 32)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ null, %1 ], [ %5, %4 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int om_touchscreen_open() { return open("/dev/input/event1", O_RDONLY); }


x86 assembly (clang, -O0):
<om_touchscreen_open>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <open@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_touchscreen_open>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <open@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"/dev/input/event1\00"
@O_RDONLY = global i32 0
define i32 @om_touchscreen_open() {
%1 = load i32, i32* @O_RDONLY
%2 = call i32 @open(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [18 x i8] c"/dev/input/event1\00"
@O_RDONLY = global i32 0
define i32 @om_touchscreen_open() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ si470x_powerdown();
uint8_t si470x_mute() {
  si470x_powerdown();
  return 1;
}


x86 assembly (clang, -O0):
<si470x_mute>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <si470x_powerdown@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<si470x_mute>:
push   %rax
xor    %eax,%eax
call   1030 <si470x_powerdown@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @si470x_mute() {
%1 = call i32 (...) @si470x_powerdown()
ret i32 1
}

LLVM IR (-O2):
define i32 @si470x_mute() {
%1 = tail call i32 (...) @si470x_powerdown()
ret i32 1
}
/* Variables and functions */
char *build_sw_path(char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ req_sw(char const *, char const *, char *);
char response_char(int /*<<< orphan*/);
char req_swoa_char(const char *command, const char *hostname,
                   const char *session_id) {
  char *path = build_sw_path(command, session_id, 0);
  char res = response_char(req_sw(hostname, command, path));
  free(path);
  return res;
}


x86 assembly (clang, -O0):
<req_swoa_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1060 <build_sw_path@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1050 <req_sw@plt>
mov    %eax,%edi
call   1030 <response_char@plt>
mov    %al,-0x21(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
movsbl -0x21(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_swoa_char>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rsi
xor    %edx,%edx
call   1060 <build_sw_path@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1050 <req_sw@plt>
mov    %eax,%edi
call   1030 <response_char@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   1040 <free@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define signext i8 @req_swoa_char(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %6
%11 = call i8* @build_sw_path(i8* %9, i8* %10, i32 0)
store i8* %11, i8** %7
%12 = load i8*, i8** %5
%13 = load i8*, i8** %4
%14 = load i8*, i8** %7
%15 = call i32 @req_sw(i8* %12, i8* %13, i8* %14)
%16 = call signext i8 @response_char(i32 %15)
store i8 %16, i8* %8
%17 = load i8*, i8** %7
%18 = call i32 @free(i8* %17)
%19 = load i8, i8* %8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @req_swoa_char(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @build_sw_path(i8* %0, i8* %2, i32 0)
%5 = tail call i32 @req_sw(i8* %1, i8* %0, i8* %4)
%6 = tail call signext i8 @response_char(i32 %5)
%7 = tail call i32 @free(i8* %4)
ret i8 %6
}
/* Variables and functions */
double Student_t_Distribution(double, int);
double zscore2pvalue_student(double z, int df) {
  return 2.0 * Student_t_Distribution(-z, df);
}


x86 assembly (clang, -O0):
<zscore2pvalue_student>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0xc(%rbp),%edi
call   1030 <Student_t_Distribution@plt>
movaps %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zscore2pvalue_student>:
push   %rax
xorpd  0xee7(%rip),%xmm0
call   1030 <Student_t_Distribution@plt>
addsd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @zscore2pvalue_student(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = fneg double %5
%7 = load i32, i32* %4
%8 = call double @Student_t_Distribution(double %6, i32 %7)
%9 = fmul double 2.000000e+00, %8
ret double %9
}

LLVM IR (-O2):
define double @zscore2pvalue_student(double %0, i32 %1) {
%3 = fneg double %0
%4 = tail call double @Student_t_Distribution(double %3, i32 %1)
%5 = fmul double %4, 2.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ code(char *);
int /*<<< orphan*/ commentln(char *);
int /*<<< orphan*/ popIndent();
void funcTrailer(char *funcName) {
  popIndent();
  code("} ");
  commentln(funcName);
}


x86 assembly (clang, -O0):
<funcTrailer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <popIndent@plt>
lea    0xeb6(%rip),%rdi
call   1050 <code@plt>
mov    -0x8(%rbp),%rdi
call   1030 <commentln@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcTrailer>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <popIndent@plt>
lea    0xebe(%rip),%rdi
call   1050 <code@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <commentln@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"} \00"
define void @funcTrailer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @popIndent()
%4 = call i32 @code(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @commentln(i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"} \00"
define void @funcTrailer(i8* %0) {
%2 = tail call i32 (...) @popIndent()
%3 = tail call i32 @code(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @commentln(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ pl_fbdev_open();
unsigned long ulInitDisplay(void) {
  if (pl_fbdev_open() != 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ulInitDisplay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <pl_fbdev_open@plt>
cmp    $0x0,%rax
je     1136 <ulInitDisplay+0x26>
movq   $0x0,-0x8(%rbp)
jmp    113e <ulInitDisplay+0x2e>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulInitDisplay>:
push   %rax
xor    %eax,%eax
call   1030 <pl_fbdev_open@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ulInitDisplay() {
%1 = alloca i64
%2 = call i64 (...) @pl_fbdev_open()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i64 0, i64* %1
br label %6
5: ; preds = %0
store i64 1, i64* %1
br label %6
6: ; preds = %5, %4
%7 = load i64, i64* %1
ret i64 %7
}

LLVM IR (-O2):
define i64 @ulInitDisplay() {
%1 = tail call i64 (...) @pl_fbdev_open()
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i64
ret i64 %3
}
void emission_counter(char c, void *data) {
  int *counter = (int *)data;
  ++*counter;
}


x86 assembly (clang, -O0):
<emission_counter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<emission_counter>:
addl   $0x1,(%rsi)
ret

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

LLVM IR (-O2):
define void @emission_counter(i8 signext %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
void vPortInitialiseFPSCR(size_t wtf) { (void)wtf; }


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

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

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

LLVM IR (-O2):
define void @vPortInitialiseFPSCR(i64 %0) {
ret void
}
roll(ndie, nsides) int ndie, nsides;
{
  register long tot;
  register unsigned n, r;
  tot = 0;
  n = ndie;
  while (n--)
    tot += rand();
  return (int)((tot * (long)nsides) / ((long)32767L + 1)) + ndie;
}


x86 assembly (clang, -O0):
<roll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1156 <roll+0x46>
mov    $0x0,%al
call   1030 <rand@plt>
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112c <roll+0x1c>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    $0x8000,%ecx
cqto
idiv   %rcx
add    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roll>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%r15d
xor    %ebp,%ebp
test   %edi,%edi
je     1141 <roll+0x31>
mov    %r15d,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
add    %rax,%rbp
add    $0xffffffff,%ebx
jne    1130 <roll+0x20>
movslq %r14d,%rcx
imul   %rbp,%rcx
lea    0x7fff(%rcx),%rax
test   %rcx,%rcx
cmovns %rcx,%rax
shr    $0xf,%rax
add    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @roll(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i64 0, i64* %5
%8 = load i32, i32* %3
store i32 %8, i32* %6
br label %9
9: ; preds = %13, %2
%10 = load i32, i32* %6
%11 = add i32 %10, -1
store i32 %11, i32* %6
%12 = icmp ne i32 %10, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = call i32 (...) @rand()
%15 = sext i32 %14 to i64
%16 = load i64, i64* %5
%17 = add nsw i64 %16, %15
store i64 %17, i64* %5
br label %9
18: ; preds = %9
%19 = load i64, i64* %5
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = mul nsw i64 %19, %21
%23 = sdiv i64 %22, 32768
%24 = trunc i64 %23 to i32
%25 = load i32, i32* %3
%26 = add nsw i32 %24, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @roll(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = add i32 %6, -1
%8 = tail call i32 (...) @rand()
%9 = sext i32 %8 to i64
%10 = add nsw i64 %5, %9
%11 = icmp eq i32 %7, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = phi i64 [ 0, %2 ], [ %10, %4 ]
%14 = sext i32 %1 to i64
%15 = mul nsw i64 %13, %14
%16 = sdiv i64 %15, 32768
%17 = trunc i64 %16 to i32
%18 = add nsw i32 %17, %0
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ deputy_fail_mayreturn(char *, char const *, char const *,
                                         int, char const *);
void CSelected(int what, const char *text, const char *file, int line,
               const char *func) {
  if (!(what)) {
    deputy_fail_mayreturn("check that union field is selected", text, file,
                          line, func);
  }
}


x86 assembly (clang, -O0):
<CSelected>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114f <CSelected+0x3f>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
lea    0xeb6(%rip),%rdi
call   1030 <deputy_fail_mayreturn@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSelected>:
test   %edi,%edi
je     1115 <CSelected+0x5>
ret
lea    0xee4(%rip),%rdi
jmp    1030 <deputy_fail_mayreturn@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"check that union field is selected\00"
define void @CSelected(i32 %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %19, label %13
13: ; preds = %5
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = call i32 @deputy_fail_mayreturn(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %14, i8* %15, i32 %16, i8* %17)
br label %19
19: ; preds = %13, %5
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"check that union field is selected\00"
define void @CSelected(i32 %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = icmp eq i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @deputy_fail_mayreturn(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3, i8* %4)
br label %9
9: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
float read_float_le(const uint8_t *data) {
  union {
    uint32_t i;
    float f;
  } u;
  u.i = ((((uint32_t)(((const uint8_t *)(data))[3])) << (24)) |
         (((uint32_t)(((const uint8_t *)(data))[2])) << (16)) |
         (((uint32_t)(((const uint8_t *)(data))[1])) << (8)) |
         (((uint32_t)(((const uint8_t *)(data))[0])) << (0)));
  return u.f;
}


x86 assembly (clang, -O0):
<read_float_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_float_le>:
mov    0x18(%rdi),%eax
shl    $0x18,%eax
mov    0x8(%rdi),%ecx
mov    0x10(%rdi),%edx
shl    $0x10,%edx
or     %eax,%edx
shl    $0x8,%ecx
or     %edx,%ecx
or     (%rdi),%ecx
movd   %ecx,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @read_float_le(i64* %0) {
%2 = alloca i64*
%3 = alloca %union.anon
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 3
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 24
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %8, %13
%15 = load i64*, i64** %2
%16 = getelementptr inbounds i64, i64* %15, i64 1
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = shl i32 %18, 8
%20 = or i32 %14, %19
%21 = load i64*, i64** %2
%22 = getelementptr inbounds i64, i64* %21, i64 0
%23 = load i64, i64* %22
%24 = trunc i64 %23 to i32
%25 = shl i32 %24, 0
%26 = or i32 %20, %25
%27 = bitcast %union.anon* %3 to i32*
store i32 %26, i32* %27
%28 = bitcast %union.anon* %3 to float*
%29 = load float, float* %28
ret float %29
}

LLVM IR (-O2):
define float @read_float_le(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 3
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 24
%6 = getelementptr inbounds i64, i64* %0, i64 2
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i64, i64* %0, i64 1
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = or i32 %10, %14
%16 = load i64, i64* %0
%17 = trunc i64 %16 to i32
%18 = or i32 %15, %17
%19 = bitcast i32 %18 to float
ret float %19
}
void XIfEvent() {}


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

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

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

LLVM IR (-O2):
define void @XIfEvent() {
ret void
}
/* Type definitions */
struct msr_data {
  int dummy;
};
struct kvm_vcpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) {
  BUG();
  return -1;
}


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

x86 assembly (clang, -O2):
<kvm_pmu_set_msr>:
push   %rax
xor    %eax,%eax
call   1030 <BUG@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.kvm_vcpu = type { i32 }
%struct.msr_data = type { i32 }
define i32 @kvm_pmu_set_msr(%struct.kvm_vcpu* nocapture readnone %0, %struct.msr_data* nocapture readnone %1) {
%3 = tail call i32 (...) @BUG()
ret i32 -1
}
double myCyclicBounds(double value, double min, double max) {
  while (value < min) {
    value += max - min;
  }
  while (value > min) {
    value -= max - min;
  }
  return value;
}


x86 assembly (clang, -O0):
<myCyclicBounds>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1140 <myCyclicBounds+0x40>
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1113 <myCyclicBounds+0x13>
jmp    1145 <myCyclicBounds+0x45>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1172 <myCyclicBounds+0x72>
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1145 <myCyclicBounds+0x45>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<myCyclicBounds>:
ucomisd %xmm0,%xmm1
jbe    111a <myCyclicBounds+0x1a>
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
xchg   %ax,%ax
addsd  %xmm3,%xmm0
ucomisd %xmm0,%xmm1
ja     1110 <myCyclicBounds+0x10>
ucomisd %xmm1,%xmm0
jbe    113a <myCyclicBounds+0x3a>
subsd  %xmm1,%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
subsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
ja     1130 <myCyclicBounds+0x30>
ret

LLVM IR (-O0):
define double @myCyclicBounds(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
br label %7
7: ; preds = %11, %3
%8 = load double, double* %4
%9 = load double, double* %5
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load double, double* %6
%13 = load double, double* %5
%14 = fsub double %12, %13
%15 = load double, double* %4
%16 = fadd double %15, %14
store double %16, double* %4
br label %7
17: ; preds = %7
br label %18
18: ; preds = %22, %17
%19 = load double, double* %4
%20 = load double, double* %5
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %28
22: ; preds = %18
%23 = load double, double* %6
%24 = load double, double* %5
%25 = fsub double %23, %24
%26 = load double, double* %4
%27 = fsub double %26, %25
store double %27, double* %4
br label %18
28: ; preds = %18
%29 = load double, double* %4
ret double %29
}

LLVM IR (-O2):
define double @myCyclicBounds(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = fsub double %2, %1
br label %12
7: ; preds = %12, %3
%8 = phi double [ %0, %3 ], [ %14, %12 ]
%9 = fcmp ogt double %8, %1
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = fsub double %2, %1
br label %16
12: ; preds = %5, %12
%13 = phi double [ %0, %5 ], [ %14, %12 ]
%14 = fadd double %6, %13
%15 = fcmp olt double %14, %1
br i1 %15, label %12, label %7
16: ; preds = %10, %16
%17 = phi double [ %8, %10 ], [ %18, %16 ]
%18 = fsub double %17, %11
%19 = fcmp ogt double %18, %1
br i1 %19, label %16, label %20
20: ; preds = %16, %7
%21 = phi double [ %8, %7 ], [ %18, %16 ]
ret double %21
}
void endBeep(void) {}


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

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

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

LLVM IR (-O2):
define void @endBeep() {
ret void
}
/* Variables and functions */
int getnpar(int, char *, char *, char **);
int getnparstring(int n, char *name, char **ptr) {
  return getnpar(n, name, "s", ptr);
}


x86 assembly (clang, -O0):
<getnparstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdx
call   1030 <getnpar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnparstring>:
mov    %rdx,%rcx
lea    0xee6(%rip),%rdx
jmp    1030 <getnpar@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define i32 @getnparstring(i32 %0, i8* %1, i8** %2) {
%4 = tail call i32 @getnpar(i32 %0, i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2)
ret i32 %4
}
void __attribute__((no)) HEX00_lrstastInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_lrstastInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gao();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("before gao()\n");
  gao();
  printf("after gao()\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"before gao()\0A\00"
@.str.1 = [13 x i8] c"after gao()\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @gao()
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"before gao()\00"
@str.2 = [12 x i8] c"after gao()\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @gao()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int, int);
void C67_SUB(int r, int v) { C67_asm("SUB.L", v, r, v); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"SUB.L\00"
define void @C67_SUB(i32 %0, i32 %1) {
%3 = tail call i32 @C67_asm(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0, i32 %1)
ret void
}
void WatchdogIntEnable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<WatchdogIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
or     $0x1,%rcx
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntEnable>:
orq    $0x1,0x8(%rdi)
ret

LLVM IR (-O0):
define void @WatchdogIntEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 1
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @WatchdogIntEnable(i64 %0) {
%2 = add i64 %0, 8
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 1
store volatile i64 %5, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_exit_group;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  printf("exit_group\n");
  syscall(SYS_exit_group, 0);
  printf("failed\n");
  abort();
}


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)
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1050 <syscall@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1050 <syscall@plt>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"exit_group\0A\00"
@SYS_exit_group = global i32 0
@.str.1 = [8 x i8] c"failed\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @SYS_exit_group
%8 = call i32 @syscall(i32 %7, i32 0)
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@SYS_exit_group = global i32 0
@str = [11 x i8] c"exit_group\00"
@str.2 = [7 x i8] c"failed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @SYS_exit_group
%5 = tail call i32 @syscall(i32 %4, i32 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.2, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ isupper(int);
int tolower(int c) {
  if (!isupper(c))
    return c;
  else
    return c + 32;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%eax
jne    1137 <tolower+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <tolower+0x30>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %eax,%eax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @isupper(i32 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32, i32* %3
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i32 @isupper(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
double *calloc(int, int);
double *InitMatrix(int n) {
  double *res;
  res = calloc(n * (n + 1), sizeof(double));
  return res;
}


x86 assembly (clang, -O0):
<InitMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%eax
add    $0x1,%eax
imul   %eax,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitMatrix>:
lea    0x1(%rdi),%eax
imul   %eax,%edi
mov    $0x8,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define double* @InitMatrix(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %4, %6
%8 = call double* @calloc(i32 %7, i32 8)
store double* %8, double** %3
%9 = load double*, double** %3
ret double* %9
}

LLVM IR (-O2):
define noalias double* @InitMatrix(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = tail call double* @calloc(i32 %3, i32 8)
ret double* %4
}