xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void reverseString(char *str) {
  if (*str) {
    reverseString(str + 1);
    printf("%c", *str);
  }
}


x86 assembly (clang, -O0):
<reverseString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1159 <reverseString+0x39>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1040 <reverseString@plt>
mov    -0x8(%rbp),%rax
lea    0xeaf(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseString>:
push   %rbx
cmpb   $0x0,(%rdi)
je     1142 <reverseString+0x22>
mov    %rdi,%rbx
add    $0x1,%rdi
call   1040 <reverseString@plt>
movsbl (%rbx),%esi
lea    0xec4(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @reverseString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1, %5
ret void
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
tail call void @reverseString(i8* %6)
%7 = load i8, i8* %0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  void *ptr = NULL;
  char *z = NULL;
  char c = 'A';
  ptr = &c;
  z = (char *)ptr;
  *z = 'B';
  printf("%c", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x41,-0x11(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x42,(%rax)
lea    0xeb6(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 66)
ret i32 0
}
void set_rupperpoledump_content_dnumcolumns_dnumversion(int *numcolumns,
                                                        int *numversion) {
  extern void set_rupperpoledump_read_content_dnumcolumns_dnumversion(
      int *numcolumns, int *numversion);
  set_rupperpoledump_read_content_dnumcolumns_dnumversion(numcolumns,
                                                          numversion);
}


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

x86 assembly (clang, -O2):
<set_rupperpoledump_content_dnumcolumns_dnumversion>:
jmp    1030 <set_rupperpoledump_read_content_dnumcolumns_dnumversion@plt>

LLVM IR (-O0):
define void @set_rupperpoledump_content_dnumcolumns_dnumversion(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
ret void
}

LLVM IR (-O2):
define void @set_rupperpoledump_content_dnumcolumns_dnumversion(i32* %0, i32* %1) {
tail call void @set_rupperpoledump_read_content_dnumcolumns_dnumversion(i32* %0, i32* %1)
ret void
}
int foo(int i, int j) {
  char g[16];
  if (&g[i] == &g[j])
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0x8(%rbp),%rcx
lea    -0x20(%rbp),%rax
add    %rcx,%rax
movslq -0xc(%rbp),%rdx
lea    -0x20(%rbp),%rcx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    1135 <foo+0x35>
movl   $0x1,-0x4(%rbp)
jmp    113c <foo+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [16 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 %8
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 %11
%13 = icmp eq i8* %9, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 1, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void SIO1writeData8(unsigned char val) {}


x86 assembly (clang, -O0):
<SIO1writeData8>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @SIO1writeData8(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nocall(char *);
void setinitctl(void) { nocall("setinitctl"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"setinitctl\00"
define void @setinitctl() {
%1 = call i32 @nocall(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"setinitctl\00"
define void @setinitctl() {
%1 = tail call i32 @nocall(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int sgx_destroy_enclave(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @sgx_destroy_enclave() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_1023() {
  Assert_real((isqrt(1023) == 31),
              "/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/stdlib/isqrt.c",
              1285, ("Integer square root of 1023 should be 31"));
}


x86 assembly (clang, -O0):
<t_sqrt_1023>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ff,%edi
call   1030 <isqrt@plt>
cmp    $0x1f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x505,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_1023>:
push   %rax
mov    $0x3ff,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x1f,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x505,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 1023 should be 31\00"
define void @t_sqrt_1023() {
%1 = call i32 @isqrt(i32 1023)
%2 = icmp eq i32 %1, 31
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1285, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 1023 should be 31\00"
define void @t_sqrt_1023() {
%1 = tail call i32 @isqrt(i32 1023)
%2 = icmp eq i32 %1, 31
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1285, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cell_t {
  int dummy;
};

/* Variables and functions */
size_t func_inputs_max();
int /*<<< orphan*/ printf(char *);
void plumb_cell(const struct cell_t *cell) {
  printf("-1 ");
  for (size_t j = 0; j < func_inputs_max(); ++j)
    printf("-1 ");
}


x86 assembly (clang, -O0):
<plumb_cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <func_inputs_max@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jae    117c <plumb_cell+0x5c>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1140 <plumb_cell+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plumb_cell>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <func_inputs_max@plt>
test   %rax,%rax
je     1168 <plumb_cell+0x48>
lea    0xebd(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
xor    %eax,%eax
call   1040 <func_inputs_max@plt>
cmp    %rax,%rbx
jb     1150 <plumb_cell+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.cell_t = type { i32 }
@.str = [4 x i8] c"-1 \00"
define void @plumb_cell(%struct.cell_t* %0) {
%2 = alloca %struct.cell_t*
%3 = alloca i64
store %struct.cell_t* %0, %struct.cell_t** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %3
br label %5
5: ; preds = %11, %1
%6 = load i64, i64* %3
%7 = call i64 (...) @func_inputs_max()
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9
%12 = load i64, i64* %3
%13 = add i64 %12, 1
store i64 %13, i64* %3
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.cell_t = type { i32 }
@.str = [4 x i8] c"-1 \00"
define void @plumb_cell(%struct.cell_t* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 (...) @func_inputs_max()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %6, %1
ret void
6: ; preds = %1, %6
%7 = phi i64 [ %9, %6 ], [ 0, %1 ]
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = add nuw i64 %7, 1
%10 = tail call i64 (...) @func_inputs_max()
%11 = icmp ult i64 %9, %10
br i1 %11, label %6, label %5
}
/* Variables and functions */
char *gets(char *);
char *c_gets(char *arg0) { return gets(arg0); }


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

x86 assembly (clang, -O2):
<c_gets>:
jmp    1030 <gets@plt>

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

LLVM IR (-O2):
define i8* @c_gets(i8* %0) {
%2 = tail call i8* @gets(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR92_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR92_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR92_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  int b;
  int ans;
  a = 2;
  b = 3;
  ans = (a + b) ^ 2;
  printf("%d", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
xor    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 7)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int solve_by_multprec_homotopy_continuation(int decimals) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(496, &decimals, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solve_by_multprec_homotopy_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1f0,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_by_multprec_homotopy_continuation>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1f0,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solve_by_multprec_homotopy_continuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 496, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
XFreeColormap() {}


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

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

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

LLVM IR (-O2):
define i32 @XFreeColormap() {
ret i32 undef
}
void ipa3_debugfs_remove(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __cpu_to_le64(int /*<<< orphan*/);
void set64_le(uint64_t *p, uint64_t n) { *p = __cpu_to_le64(n); }


x86 assembly (clang, -O0):
<set64_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <__cpu_to_le64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set64_le>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <__cpu_to_le64@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @set64_le(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 = call i32 @__cpu_to_le64(i32 %5)
%7 = load i32*, i32** %3
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @set64_le(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @__cpu_to_le64(i32 %1)
store i32 %3, i32* %0
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void clearDecodeTable(uint32_t *ary) {
  int i = 0;
  for (i = 0; i < 256; ++i) {
    ary[i] = 0xFFFFFFFF;
  }
}


x86 assembly (clang, -O0):
<clearDecodeTable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    1140 <clearDecodeTable+0x40>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <clearDecodeTable+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearDecodeTable>:
push   %rax
mov    $0x400,%edx
mov    $0xff,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clearDecodeTable(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
int test_imm_65uint8_mem(unsigned char *val) {
  return ((*val) & (-0x65 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_65uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -101
%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_65uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -101
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
void setAlarm(int time) { alarm(time); }


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

x86 assembly (clang, -O2):
<setAlarm>:
jmp    1030 <alarm@plt>

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

LLVM IR (-O2):
define void @setAlarm(i32 %0) {
%2 = tail call i32 @alarm(i32 %0)
ret void
}
/* Variables and functions */
size_t CMSG_LEN(size_t);
size_t cmsg_len(size_t length) { return CMSG_LEN(length); }


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

x86 assembly (clang, -O2):
<cmsg_len>:
jmp    1030 <CMSG_LEN@plt>

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

LLVM IR (-O2):
define i64 @cmsg_len(i64 %0) {
%2 = tail call i64 @CMSG_LEN(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x6e() {
  Assert_real((isdigit(110) == 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",
              555, ("isdigit should be 0 for n"));
}


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

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

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


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"simple_hello()\0A\00"
define void @simple_hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"simple_hello()\00"
define void @simple_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clockin(int, int /*<<< orphan*/);
void test_reset(void) {
  clockin(1, 0);
  clockin(1, 0);
  clockin(1, 0);
  clockin(1, 0);
  clockin(1, 0);
  clockin(0, 0);
}


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

x86 assembly (clang, -O2):
<test_reset>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <clockin@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <clockin@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <clockin@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <clockin@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <clockin@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <clockin@plt>

LLVM IR (-O0):
define void @test_reset() {
%1 = call i32 @clockin(i32 1, i32 0)
%2 = call i32 @clockin(i32 1, i32 0)
%3 = call i32 @clockin(i32 1, i32 0)
%4 = call i32 @clockin(i32 1, i32 0)
%5 = call i32 @clockin(i32 1, i32 0)
%6 = call i32 @clockin(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @test_reset() {
%1 = tail call i32 @clockin(i32 1, i32 0)
%2 = tail call i32 @clockin(i32 1, i32 0)
%3 = tail call i32 @clockin(i32 1, i32 0)
%4 = tail call i32 @clockin(i32 1, i32 0)
%5 = tail call i32 @clockin(i32 1, i32 0)
%6 = tail call i32 @clockin(i32 0, i32 0)
ret void
}
void keyboard_close() {}


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

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

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

LLVM IR (-O2):
define void @keyboard_close() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime(struct tm *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  time_t timer;
  struct tm *tblock;
  timer = time(NULL);
  tblock = localtime(&timer);
  printf("Local time is: %s", asctime(tblock));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <asctime@plt>
mov    %rax,%rsi
lea    0xe85(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1040 <asctime@plt>
lea    0xe9b(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"Local time is: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 0, i32* %1
%4 = call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %5, %struct.tm** %3
%6 = load %struct.tm*, %struct.tm** %3
%7 = call i8* @asctime(%struct.tm* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"Local time is: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i8* @asctime(%struct.tm* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Type definitions */
struct nl_handle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ NETLINK_GENERIC;
int nl_open(struct nl_handle *, int /*<<< orphan*/);
int genl_open(struct nl_handle *hnd) { return nl_open(hnd, NETLINK_GENERIC); }


x86 assembly (clang, -O0):
<genl_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <nl_open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genl_open>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <nl_open@plt>

LLVM IR (-O0):
%struct.nl_handle = type { i32 }
@NETLINK_GENERIC = global i32 0
define i32 @genl_open(%struct.nl_handle* %0) {
%2 = alloca %struct.nl_handle*
store %struct.nl_handle* %0, %struct.nl_handle** %2
%3 = load %struct.nl_handle*, %struct.nl_handle** %2
%4 = load i32, i32* @NETLINK_GENERIC
%5 = call i32 @nl_open(%struct.nl_handle* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.nl_handle = type { i32 }
@NETLINK_GENERIC = global i32 0
define i32 @genl_open(%struct.nl_handle* %0) {
%2 = load i32, i32* @NETLINK_GENERIC
%3 = tail call i32 @nl_open(%struct.nl_handle* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct token {
  int dummy;
};
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expand(struct node *);
struct node *init_root(struct token *);
struct node *parse(struct token *token_list) {
  struct node *root;
  root = init_root(token_list);
  expand(root);
  return root;
}


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

x86 assembly (clang, -O2):
<parse>:
push   %rbx
call   1030 <init_root@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <expand@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
%struct.token = type { i32 }
define %struct.node* @parse(%struct.token* %0) {
%2 = alloca %struct.token*
%3 = alloca %struct.node*
store %struct.token* %0, %struct.token** %2
%4 = load %struct.token*, %struct.token** %2
%5 = call %struct.node* @init_root(%struct.token* %4)
store %struct.node* %5, %struct.node** %3
%6 = load %struct.node*, %struct.node** %3
%7 = call i32 @expand(%struct.node* %6)
%8 = load %struct.node*, %struct.node** %3
ret %struct.node* %8
}

LLVM IR (-O2):
%struct.node = type { i32 }
%struct.token = type { i32 }
define %struct.node* @parse(%struct.token* %0) {
%2 = tail call %struct.node* @init_root(%struct.token* %0)
%3 = tail call i32 @expand(%struct.node* %2)
ret %struct.node* %2
}
void INT_Excep_ICU_GROUP3(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initialized_read()
%2 = tail call i32 (...) @uninitialized_read()
ret i32 0
}
int pop() {}


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

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

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

LLVM IR (-O2):
define i32 @pop() {
ret i32 undef
}
__attribute__((no, noclone)) unsigned short foo5(unsigned short arg) {
  unsigned short ret = 1;
  if (arg + 1 < ((!1) ? -(1L << (sizeof(char) * 8 - 1)) : 0) + 1 ||
      arg + 1 > ((!1) ? ((1L << (sizeof(char) * 8 - 1)) - 1)
                      : ((1L << (sizeof(char) * 8)) - 1)) -
                    1)
    return ret;
  arg = arg + 1;
  ret = (unsigned char)arg;
  return arg;
}


x86 assembly (clang, -O0):
<foo5>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movw   $0x1,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
add    $0x1,%eax
cltq
cmp    $0x1,%rax
jl     1139 <foo5+0x39>
movzwl -0x4(%rbp),%eax
add    $0x1,%eax
cltq
cmp    $0xfe,%rax
jle    1146 <foo5+0x46>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1164 <foo5+0x64>
movzwl -0x4(%rbp),%eax
add    $0x1,%eax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
movzbl %al,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo5>:
lea    0x1(%rdi),%ecx
cmp    $0xfe,%edi
mov    $0x1,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @foo5(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 1, i16* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = icmp slt i64 %8, 1
br i1 %9, label %16, label %10
10: ; preds = %1
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = icmp sgt i64 %14, 254
br i1 %15, label %16, label %18
16: ; preds = %10, %1
%17 = load i16, i16* %4
store i16 %17, i16* %2
br label %27
18: ; preds = %10
%19 = load i16, i16* %3
%20 = zext i16 %19 to i32
%21 = add nsw i32 %20, 1
%22 = trunc i32 %21 to i16
store i16 %22, i16* %3
%23 = load i16, i16* %3
%24 = trunc i16 %23 to i8
%25 = zext i8 %24 to i16
store i16 %25, i16* %4
%26 = load i16, i16* %3
store i16 %26, i16* %2
br label %27
27: ; preds = %18, %16
%28 = load i16, i16* %2
ret i16 %28
}

LLVM IR (-O2):
define zeroext i16 @foo5(i16 zeroext %0) {
%2 = add i16 %0, 1
%3 = icmp ugt i16 %0, 253
%4 = select i1 %3, i16 1, i16 %2
ret i16 %4
}
/* Variables and functions */
unsigned long brk(void *);
void *sbrk(intptr_t increment) {
  unsigned long oldProgramBreak = brk(0);
  brk((void *)oldProgramBreak + increment);
  return (void *)oldProgramBreak;
}


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

x86 assembly (clang, -O2):
<sbrk>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <brk@plt>
mov    %rax,%r14
add    %rax,%rbx
mov    %rbx,%rdi
call   1030 <brk@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @sbrk(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i64 @brk(i8* null)
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = inttoptr i64 %5 to i8*
%7 = load i64, i64* %2
%8 = getelementptr i8, i8* %6, i64 %7
%9 = call i64 @brk(i8* %8)
%10 = load i64, i64* %3
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @sbrk(i64 %0) {
%2 = tail call i64 @brk(i8* null)
%3 = inttoptr i64 %2 to i8*
%4 = getelementptr i8, i8* %3, i64 %0
%5 = tail call i64 @brk(i8* %4)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  raise(SIGSEGV);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGSEGV = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = load i32, i32* @SIGSEGV
%9 = call i32 @raise(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGSEGV
%4 = tail call i32 @raise(i32 %3)
ret i32 0
}
/* Type definitions */
struct Vector_TYPE {
  int dummy;
};

/* Variables and functions */
struct Vector_TYPE *vec_Create_TYPE(int);
struct Vector_TYPE *vec_CreateDefault_TYPE() {
  return vec_Create_TYPE(20);
}


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

x86 assembly (clang, -O2):
<vec_CreateDefault_TYPE>:
mov    $0x14,%edi
jmp    1030 <vec_Create_TYPE@plt>

LLVM IR (-O0):
%struct.Vector_TYPE = type { i32 }
define %struct.Vector_TYPE* @vec_CreateDefault_TYPE() {
%1 = call %struct.Vector_TYPE* @vec_Create_TYPE(i32 20)
ret %struct.Vector_TYPE* %1
}

LLVM IR (-O2):
%struct.Vector_TYPE = type { i32 }
define %struct.Vector_TYPE* @vec_CreateDefault_TYPE() {
%1 = tail call %struct.Vector_TYPE* @vec_Create_TYPE(i32 20)
ret %struct.Vector_TYPE* %1
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ strlen(char *);
char *strstr(char *, char *);
int get_val(char *cmd, char *str) {
  int val = 0;
  char *p;
  if ((p = strstr(cmd, str))) {
    p += strlen(str);
    val = atoi(p);
  }
  return val;
}


x86 assembly (clang, -O0):
<get_val>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1187 <get_val+0x57>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_val>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1050 <strstr@plt>
test   %rax,%rax
je     1160 <get_val+0x30>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <atoi@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @get_val(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @strstr(i8* %7, i8* %8)
store i8* %9, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i32 @strlen(i8* %12)
%14 = load i8*, i8** %6
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8* %16, i8** %6
%17 = load i8*, i8** %6
%18 = call i32 @atoi(i8* %17)
store i32 %18, i32* %5
br label %19
19: ; preds = %11, %2
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @get_val(i8* %0, i8* %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %1)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %3, i64 %7
%9 = tail call i32 @atoi(i8* %8)
br label %10
10: ; preds = %5, %2
%11 = phi i32 [ %9, %5 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void FreeDistanceTable(unsigned char *disttable) {
  free(disttable);
  return;
}


x86 assembly (clang, -O0):
<FreeDistanceTable>:
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):
<FreeDistanceTable>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @FreeDistanceTable(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 @FreeDistanceTable(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
const char *dyad_getVersion(void) { return "0.1.0"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"0.1.0\00"
define i8* @dyad_getVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"0.1.0\00"
define i8* @dyad_getVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void gf2_matrix_square(square, mat) unsigned int *square;
unsigned int *mat;
{
  int n;
  for (n = 0; n < 32; n++)
    square[n] = gf2_matrix_times(mat, mat[n]);
}


x86 assembly (clang, -O0):
<gf2_matrix_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    1162 <gf2_matrix_square+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    $0x0,%al
call   1030 <gf2_matrix_times@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <gf2_matrix_square+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf2_matrix_square>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <gf2_matrix_times@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x20,%rbx
jne    1120 <gf2_matrix_square+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @gf2_matrix_square(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 32
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @gf2_matrix_times to i32 (i32*, i32, ...)*)(i32* %10, i32 %15)
%17 = load i32*, i32** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
store i32 %16, i32* %20
br label %21
21: ; preds = %9
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @gf2_matrix_square(i32* nocapture writeonly %0, i32* %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %9, %3 ]
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @gf2_matrix_times to i32 (i32*, i32, ...)*)(i32* %1, i32 %6)
%8 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %7, i32* %8
%9 = add nuw nsw i64 %4, 1
%10 = icmp eq i64 %9, 32
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
void delete_pseudo_files() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ usbcan_deregister_callback(int /*<<< orphan*/,
                                              int /*<<< orphan*/);
int /*<<< orphan*/ usbcan_reset(int /*<<< orphan*/, int /*<<< orphan*/);
bool usbcan_stop(uint32_t dev, uint32_t bus) {
  usbcan_deregister_callback(dev, bus);
  usbcan_reset(dev, bus);
  return true;
}


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

x86 assembly (clang, -O2):
<usbcan_stop>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <usbcan_deregister_callback@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <usbcan_reset@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @usbcan_stop(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 @usbcan_deregister_callback(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @usbcan_reset(i32 %8, i32 %9)
ret i32 1
}

LLVM IR (-O2):
define i32 @usbcan_stop(i32 %0, i32 %1) {
%3 = tail call i32 @usbcan_deregister_callback(i32 %0, i32 %1)
%4 = tail call i32 @usbcan_reset(i32 %0, i32 %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_outb(unsigned char, unsigned short);
void outb(unsigned char value, unsigned short port) {
  __builtin_outb(value, port);
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzwl -0x4(%rbp),%esi
call   1030 <__builtin_outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
jmp    1030 <__builtin_outb@plt>

LLVM IR (-O0):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
%7 = call i32 @__builtin_outb(i8 zeroext %5, i16 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @__builtin_outb(i8 zeroext %0, i16 zeroext %1)
ret void
}