xunge/DecIR huggingface dataset:
int fact(int arg) {
  int i;
  if (arg < 0) {
    return 0;
  }
  for (i = 1; i > 0 && arg > 1; arg--) {
    i *= arg;
  }
  if (i > 0) {
    return i;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<fact>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <fact+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1181 <fact+0x81>
movl   $0x1,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jle    113d <fact+0x3d>
cmpl   $0x1,-0x8(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114d <fact+0x4d>
jmp    1165 <fact+0x65>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <fact+0x24>
cmpl   $0x0,-0xc(%rbp)
jle    117a <fact+0x7a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1181 <fact+0x81>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fact>:
test   %edi,%edi
js     1139 <fact+0x39>
mov    $0x1,%eax
cmp    $0x2,%edi
jb     1138 <fact+0x38>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
imul   %edi,%ecx
test   %ecx,%ecx
jle    1131 <fact+0x31>
lea    -0x1(%rdi),%eax
cmp    $0x2,%edi
mov    %eax,%edi
ja     1120 <fact+0x20>
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @fact(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %30
8: ; preds = %1
store i32 1, i32* %4
br label %9
9: ; preds = %21, %8
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 1
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ false, %9 ], [ %14, %12 ]
br i1 %16, label %17, label %24
17: ; preds = %15
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = mul nsw i32 %19, %18
store i32 %20, i32* %4
br label %21
21: ; preds = %17
%22 = load i32, i32* %3
%23 = add nsw i32 %22, -1
store i32 %23, i32* %3
br label %9
24: ; preds = %15
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = load i32, i32* %4
store i32 %28, i32* %2
br label %30
29: ; preds = %24
store i32 0, i32* %2
br label %30
30: ; preds = %29, %27, %7
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @fact(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 1
br i1 %4, label %5, label %15
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 1, %3 ]
%7 = phi i32 [ %9, %5 ], [ %0, %3 ]
%8 = mul nsw i32 %6, %7
%9 = add nsw i32 %7, -1
%10 = icmp sgt i32 %8, 0
%11 = icmp ugt i32 %7, 2
%12 = and i1 %10, %11
br i1 %12, label %5, label %13
13: ; preds = %5
%14 = select i1 %10, i32 %8, i32 0
br label %15
15: ; preds = %3, %13, %1
%16 = phi i32 [ 0, %1 ], [ 1, %3 ], [ %14, %13 ]
ret i32 %16
}
unsigned long long unsignedlonglong_ignoring_longlongint(unsigned long long x,
                                                         long long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlonglong_ignoring_longlongint(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlonglong_ignoring_longlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int lcm(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, const char *argv[]) {
  int a, b;
  scanf("%d %d", &a, &b);
  printf("%d", lcm(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <lcm@plt>
mov    %eax,%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <lcm@plt>
lea    0xeab(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = call i32 @lcm(i32 %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @lcm(i32 %8, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xa8() {
  Assert_real((isdigit(168) == 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_isdigit.c",
              845, ("isdigit should be 0 for 0xa8"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xa8>:
push   %rax
mov    $0xa8,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x34d,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xa8\00"
define void @t_isdigit_0xa8() {
%1 = call i64 @isdigit(i32 168)
%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 845, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xa8\00"
define void @t_isdigit_0xa8() {
%1 = tail call i64 @isdigit(i32 168)
%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 845, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int acpi_debugfs_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @acpi_debugfs_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void sys_init(void) { srand(time(NULL)); }


x86 assembly (clang, -O0):
<sys_init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @sys_init() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @sys_init() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Type definitions */
struct cli_val_address {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct cli_val_address *);
void cli_val_address_destroy(struct cli_val_address *v) { free(v); }


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

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

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

LLVM IR (-O2):
%struct.cli_val_address = type { i32 }
define void @cli_val_address_destroy(%struct.cli_val_address* nocapture %0) {
%2 = tail call i32 @free(%struct.cli_val_address* %0)
ret void
}
char *sccsid(void) {
  return ("@(#)sysstat-"
          "8.1.5"
          ": "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/"
          "embedded_rootfs/pkg_addon/sysstat-8.1.5/sadf.c"
          " compiled "
          "Mar 16 2022"
          " "
          "16:52:58");
}


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

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

LLVM IR (-O0):
@.str = [221 x i8] c"@(#)sysstat-8.1.5: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/embedded_rootfs/pkg_addon/sysstat-8.1.5/sadf.c compiled Mar 16 2022 16:52:58\00"
define i8* @sccsid() {
ret i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [221 x i8] c"@(#)sysstat-8.1.5: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/embedded_rootfs/pkg_addon/sysstat-8.1.5/sadf.c compiled Mar 16 2022 16:52:58\00"
define i8* @sccsid() {
ret i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0)
}
int calculate_terms(char operand2, char operand3) {
  int terms = 2;
  if (operand2 != '0') {
    terms++;
  }
  if (operand3 != '0') {
    terms++;
  }
  return terms;
}


x86 assembly (clang, -O0):
<calculate_terms>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0x2,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
je     112d <calculate_terms+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
je     1143 <calculate_terms+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_terms>:
xor    %ecx,%ecx
cmp    $0x30,%dil
sete   %cl
xor    %eax,%eax
cmp    $0x30,%sil
setne  %al
sub    %ecx,%eax
add    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @calculate_terms(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 48
%4 = select i1 %3, i32 2, i32 3
%5 = icmp ne i8 %1, 48
%6 = zext i1 %5 to i32
%7 = add nuw nsw i32 %4, %6
ret i32 %7
}
int lib_mod_connect(struct mod *mod) {
  ;
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.mod = type opaque
define i32 @lib_mod_connect(%struct.mod* nocapture readnone %0) {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int nchars;
};
typedef TYPE_1__ XmbTextItem;

/* Variables and functions */
void set_XmbTextItem_nchars(void *_p, int _v) {
  ((XmbTextItem *)_p)->nchars = (int)_v;
}


x86 assembly (clang, -O0):
<set_XmbTextItem_nchars>:
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_XmbTextItem_nchars>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XmbTextItem_nchars(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_XmbTextItem_nchars(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int xh_str_equal(const void *key1, const void *key2, void *data) {
  (void)data;
  return strcmp(*(const char **)key1, *(const char **)key2) == 0;
}


x86 assembly (clang, -O0):
<xh_str_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%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):
<xh_str_equal>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @xh_str_equal(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i8**
%5 = load i8*, i8** %4
%6 = bitcast i8* %1 to i8**
%7 = load i8*, i8** %6
%8 = tail call i64 @strcmp(i8* %5, i8* %7)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ PeripheralReset(int, int, int);
void vSPI_RESET(void) { PeripheralReset((1 << 7), 0x04, 100); }


x86 assembly (clang, -O0):
<vSPI_RESET>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%edi
mov    $0x4,%esi
mov    $0x64,%edx
call   1030 <PeripheralReset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vSPI_RESET>:
mov    $0x80,%edi
mov    $0x4,%esi
mov    $0x64,%edx
jmp    1030 <PeripheralReset@plt>

LLVM IR (-O0):
define void @vSPI_RESET() {
%1 = call i32 @PeripheralReset(i32 128, i32 4, i32 100)
ret void
}

LLVM IR (-O2):
define void @vSPI_RESET() {
%1 = tail call i32 @PeripheralReset(i32 128, i32 4, i32 100)
ret void
}
unsigned long get_cpu_speed(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @get_cpu_speed() {
ret i64 0
}

LLVM IR (-O2):
define i64 @get_cpu_speed() {
ret i64 0
}
int raise(signo) { return kill(getpid(), signo); }


x86 assembly (clang, -O0):
<raise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
mov    $0x0,%al
call   1040 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raise>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <kill@plt>

LLVM IR (-O0):
define i32 @raise(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = load i32, i32* %2
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @kill to i32 (i32, i32, ...)*)(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @raise(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @kill to i32 (i32, i32, ...)*)(i32 %2, i32 %0)
ret i32 %3
}
/* Type definitions */
struct cart {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _cartVarDbName(char *, char *);
int cartUsualBoolean(struct cart *, int /*<<< orphan*/, int);
int cartUsualBooleanDb(struct cart *cart, char *db, char *var, int usual) {
  return cartUsualBoolean(cart, _cartVarDbName(db, var), usual);
}


x86 assembly (clang, -O0):
<cartUsualBooleanDb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_cartVarDbName@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    -0x1c(%rbp),%edx
call   1040 <cartUsualBoolean@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cartUsualBooleanDb>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <_cartVarDbName@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <cartUsualBoolean@plt>

LLVM IR (-O0):
%struct.cart = type { i32 }
define i32 @cartUsualBooleanDb(%struct.cart* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.cart*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store %struct.cart* %0, %struct.cart** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.cart*, %struct.cart** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 @_cartVarDbName(i8* %10, i8* %11)
%13 = load i32, i32* %8
%14 = call i32 @cartUsualBoolean(%struct.cart* %9, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.cart = type { i32 }
define i32 @cartUsualBooleanDb(%struct.cart* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @_cartVarDbName(i8* %1, i8* %2)
%6 = tail call i32 @cartUsualBoolean(%struct.cart* %0, i32 %5, i32 %3)
ret i32 %6
}
/* Variables and functions */
char *strdup(char const *);
char *strrchr(char const *, char);
char *piece_get_extension(const char *filename) {
  const char *dot = strrchr(filename, '.');
  if (!dot || dot == filename)
    return "";
  return strdup(dot + 1);
}


x86 assembly (clang, -O0):
<piece_get_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1157 <piece_get_extension+0x37>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1167 <piece_get_extension+0x47>
lea    0xea2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <piece_get_extension+0x58>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piece_get_extension>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1145 <piece_get_extension+0x25>
cmp    %rbx,%rax
je     1145 <piece_get_extension+0x25>
add    $0x1,%rax
mov    %rax,%rdi
pop    %rbx
jmp    1040 <strdup@plt>
lea    0xeb4(%rip),%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @piece_get_extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = icmp eq i8* %2, %0
%5 = or i1 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = tail call i8* @strdup(i8* %7)
br label %9
9: ; preds = %1, %6
%10 = phi i8* [ %8, %6 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void gdbmi_free(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @gdbmi_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int octave_f_dupfd_wrapper(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @octave_f_dupfd_wrapper() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @octave_f_dupfd_wrapper() {
ret i32 -1
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int /*<<< orphan*/ tv_sec;
};
struct timespec {
  int member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void time_sleep(const struct timeval *t) {
  struct timespec ts = {t->tv_sec, t->tv_usec * 1000};
  nanosleep(&ts, NULL);
}


x86 assembly (clang, -O0):
<time_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3e8,(%rax),%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_sleep>:
push   %rax
mov    0x4(%rdi),%eax
mov    %eax,(%rsp)
imul   $0x3e8,(%rdi),%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
%struct.timespec = type { i32, i32 }
define void @time_sleep(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
%3 = alloca %struct.timespec
store %struct.timeval* %0, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load %struct.timeval*, %struct.timeval** %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%7 = load i32, i32* %6
store i32 %7, i32* %4
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%9 = load %struct.timeval*, %struct.timeval** %2
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = mul nsw i32 %11, 1000
store i32 %12, i32* %8
%13 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
%struct.timespec = type { i32, i32 }
define void @time_sleep(%struct.timeval* nocapture %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 1000
store i32 %10, i32* %7
%11 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
int meaningOfLife(int a) { return a + 42; }


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

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

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

LLVM IR (-O2):
define i32 @meaningOfLife(i32 %0) {
%2 = add nsw i32 %0, 42
ret i32 %2
}
int test_imm_9Dint16_mem(short *val) {
  return ((*val) & (-0x9D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Dint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff63,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Dint16_mem>:
movzwl (%rdi),%eax
test   $0xff63,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Dint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -157
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
long long getllint();
int /*<<< orphan*/ printf(char *, long long);
int main() {
  long long int x = getllint();
  printf("%lld\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getllint()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bin_segs();
int /*<<< orphan*/ close_segs();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ split_bihx(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "%s bihxfile\n", argv[0]);
    exit(1);
  }
  split_bihx(argv[1]);
  close_segs();
  bin_segs();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     118f <main+0x3f>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe80(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <split_bihx@plt>
mov    $0x0,%al
call   1040 <close_segs@plt>
mov    $0x0,%al
call   1060 <bin_segs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1171 <main+0x21>
mov    0x8(%rsi),%rdi
call   1030 <split_bihx@plt>
xor    %eax,%eax
call   1040 <close_segs@plt>
xor    %eax,%eax
call   1060 <bin_segs@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe7c(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"%s bihxfile\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 2
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @split_bihx(i8* %17)
%19 = call i32 (...) @close_segs()
%20 = call i32 (...) @bin_segs()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"%s bihxfile\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @split_bihx(i8* %11)
%13 = tail call i32 (...) @close_segs()
%14 = tail call i32 (...) @bin_segs()
ret i32 0
}
/* Variables and functions */
int check_dimer(char *, char *, int);
int check_hairpin_min(char *ss, char *flip, int n, int min) {
  int half;
  half = n / 2 - min;
  if (half < 4)
    return 0;
  return check_dimer(ss, flip, half);
}


x86 assembly (clang, -O0):
<check_hairpin_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jge    114d <check_hairpin_min+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1160 <check_hairpin_min+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <check_dimer@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_hairpin_min>:
mov    %edx,%eax
shr    $0x1f,%edx
add    %eax,%edx
sar    %edx
sub    %ecx,%edx
cmp    $0x4,%edx
jge    1123 <check_hairpin_min+0x13>
xor    %eax,%eax
ret
jmp    1030 <check_dimer@plt>

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

LLVM IR (-O2):
define i32 @check_hairpin_min(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = sdiv i32 %2, 2
%6 = sub nsw i32 %5, %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @check_dimer(i8* %0, i8* %1, i32 %6)
br label %10
10: ; preds = %4, %8
%11 = phi i32 [ %9, %8 ], [ 0, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char const *);
void FatalError(const char *msg) {
  puts(msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<FatalError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<FatalError>:
push   %rax
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @FatalError(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int debugdata_function();
int main(void) { return debugdata_function() + 1; }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @debugdata_function()
%3 = add nsw i32 %2, 1
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @debugdata_function()
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t F0(uint8_t x) {
  uint8_t temp1, temp2, temp3;
  temp1 = ((x << 1) & 0xFF) ^ ((x >> 7) & 0xFF);
  temp2 = ((x << 2) & 0xFF) ^ ((x >> 6) & 0xFF);
  temp3 = ((x << 7) & 0xFF) ^ ((x >> 1) & 0xFF);
  return temp1 ^ temp2 ^ temp3;
}


x86 assembly (clang, -O0):
<F0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
sar    $0x7,%ecx
and    $0xff,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
and    $0xff,%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
and    $0xff,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<F0>:
lea    (%rdi,%rdi,1),%eax
mov    %edi,%ecx
shr    $0x7,%ecx
xor    %eax,%ecx
lea    0x0(,%rdi,4),%eax
mov    %edi,%edx
shr    $0x6,%edx
xor    %eax,%edx
mov    %edi,%eax
shl    $0x7,%eax
shr    %edi
xor    %eax,%edi
xor    %ecx,%edi
xor    %edx,%edi
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @F0(i32 %0) {
%2 = shl i32 %0, 1
%3 = and i32 %2, 254
%4 = lshr i32 %0, 7
%5 = and i32 %4, 255
%6 = shl i32 %0, 2
%7 = and i32 %6, 252
%8 = lshr i32 %0, 6
%9 = and i32 %8, 255
%10 = shl i32 %0, 7
%11 = and i32 %10, 128
%12 = lshr i32 %0, 1
%13 = and i32 %12, 255
%14 = xor i32 %11, %13
%15 = xor i32 %14, %5
%16 = xor i32 %15, %3
%17 = xor i32 %16, %9
%18 = xor i32 %17, %7
ret i32 %18
}
void glMatrixMode(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glMatrixMode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int main() { hello(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @hello()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hello()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ const wchar_t;

/* Variables and functions */
size_t find_index(const wchar_t *cset, size_t clen, wchar_t tofind) {
  size_t i;
  for (i = 0; i < clen; i++)
    if (cset[i] == tofind)
      return i;
  return ((size_t)-1);
}


x86 assembly (clang, -O0):
<find_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    115f <find_index+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmp    -0x20(%rbp),%rax
jne    1149 <find_index+0x49>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <find_index+0x67>
jmp    114e <find_index+0x4e>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1118 <find_index+0x18>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_index>:
mov    $0xffffffffffffffff,%rax
test   %rsi,%rsi
je     111f <find_index+0x1f>
xor    %ecx,%ecx
xchg   %ax,%ax
cmp    %rdx,(%rdi,%rcx,8)
je     1120 <find_index+0x20>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <find_index+0x10>
ret
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @find_index(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 0, i64* %8
br label %9
9: ; preds = %23, %3
%10 = load i64, i64* %8
%11 = load i64, i64* %6
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %26
13: ; preds = %9
%14 = load i64*, i64** %5
%15 = load i64, i64* %8
%16 = getelementptr inbounds i64, i64* %14, i64 %15
%17 = load i64, i64* %16
%18 = load i64, i64* %7
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %13
%21 = load i64, i64* %8
store i64 %21, i64* %4
br label %27
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = load i64, i64* %8
%25 = add i64 %24, 1
store i64 %25, i64* %8
br label %9
26: ; preds = %9
store i64 -1, i64* %4
br label %27
27: ; preds = %26, %20
%28 = load i64, i64* %4
ret i64 %28
}

LLVM IR (-O2):
define i64 @find_index(i64* nocapture %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %10
%6 = phi i64 [ %11, %10 ], [ 0, %3 ]
%7 = getelementptr inbounds i64, i64* %0, i64 %6
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, %2
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %1
br i1 %12, label %13, label %5
13: ; preds = %5, %10, %3
%14 = phi i64 [ -1, %3 ], [ -1, %10 ], [ %6, %5 ]
ret i64 %14
}
/* Type definitions */
typedef int mode_t;

/* Variables and functions */
int /*<<< orphan*/ umask(int);
void umaskp(mode_t *u) { umask(*u & 0777); }


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

x86 assembly (clang, -O2):
<umaskp>:
mov    $0x1ff,%eax
and    (%rdi),%eax
mov    %eax,%edi
jmp    1030 <umask@plt>

LLVM IR (-O0):
define void @umaskp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 511
%6 = call i32 @umask(i32 %5)
ret void
}

LLVM IR (-O2):
define void @umaskp(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 511
%4 = tail call i32 @umask(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void esplit_version() {
  puts("@"
       "(#)"
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/esplit.c"
       " "
       "Sat Jan 22 08:19:10 2022"
       " compiled: "
       "Mar 15 2022"
       " "
       "22:59:06");
}


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

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

LLVM IR (-O0):
@.str = [195 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/esplit.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:59:06\00"
define void @esplit_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [195 x i8] c"@(#)/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/PawelNabe/EOS/refs/heads/master/SRC/esplit.c Sat Jan 22 08:19:10 2022 compiled: Mar 15 2022 22:59:06\00"
define void @esplit_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main(void) {
  double valorAnterior, valorAtual;
  scanf("%lf %lf", &valorAnterior, &valorAtual);
  printf("%.2f%%\n", (valorAtual / valorAnterior - 1.0) * 100.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
addsd  0xeb2(%rip),%xmm0
mulsd  0xeb2(%rip),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [8 x i8] c"%.2f%%\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %3
%6 = load double, double* %2
%7 = fdiv double %5, %6
%8 = fsub double %7, 1.000000e+00
%9 = fmul double %8, 1.000000e+02
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [8 x i8] c"%.2f%%\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %2
%7 = load double, double* %1
%8 = fdiv double %6, %7
%9 = fadd double %8, -1.000000e+00
%10 = fmul double %9, 1.000000e+02
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}
void ioctl_resume(void) {}


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

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

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

LLVM IR (-O2):
define void @ioctl_resume() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x68() {
  Assert_real((isodigit(104) == 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_isodigit.c",
              525, ("isodigit should be 0 for h"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x68>:
push   %rax
mov    $0x68,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x20d,%edx
pop    %rax
jmp    1030 <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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for h\00"
define void @t_isodigit_0x68() {
%1 = call i64 @isodigit(i32 104)
%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 525, i8* getelementptr inbounds ([27 x i8], [27 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for h\00"
define void @t_isodigit_0x68() {
%1 = tail call i64 @isodigit(i32 104)
%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 525, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int *a, int nLen) {
  int i;
  return;
  for (i = 0; i < nLen; i++)
    printf("%d, ", a[i]);
  printf("\n");
}


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

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

LLVM IR (-O0):
define void @print_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @print_array(i32* nocapture %0, i32 %1) {
ret void
}