xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ shiftRow(unsigned char *, int);
void shiftRows(unsigned char *state) {
  int i;
  for (i = 0; i < 4; i++)
    shiftRow(state + i * 4, i);
}


x86 assembly (clang, -O0):
<shiftRows>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1152 <shiftRows+0x42>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
cltq
add    %rax,%rdi
mov    -0xc(%rbp),%esi
call   1030 <shiftRow@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <shiftRows+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shiftRows>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <shiftRow@plt>
lea    0x4(%rbx),%rdi
mov    $0x1,%esi
call   1030 <shiftRow@plt>
lea    0x8(%rbx),%rdi
mov    $0x2,%esi
call   1030 <shiftRow@plt>
add    $0xc,%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
pop    %rbx
jmp    1030 <shiftRow@plt>

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

LLVM IR (-O2):
define void @shiftRows(i8* %0) {
%2 = tail call i32 @shiftRow(i8* %0, i32 0)
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = tail call i32 @shiftRow(i8* %3, i32 1)
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = tail call i32 @shiftRow(i8* %5, i32 2)
%7 = getelementptr inbounds i8, i8* %0, i64 12
%8 = tail call i32 @shiftRow(i8* %7, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ half(int);
int main(int argc, char **argv) {
  half(31);
  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    $0x1f,%edi
call   1030 <half@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @half(i32 31)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void chorus_free(void *data) { free(data); }


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

LLVM IR (-O0):
define void @chorus_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 @chorus_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int func() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
/* Variables and functions */
double atan2(double, int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(double);
double asin(double __x) { return atan2(__x, sqrt(1.0 - __x * __x)); }


x86 assembly (clang, -O0):
<asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x10(%rbp),%xmm0
mov    %eax,%edi
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asin>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @asin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fneg double %4
%7 = call double @llvm.fmuladd.f64(double %6, double %5, double 1.000000e+00)
%8 = call i32 @sqrt(double %7)
%9 = call double @atan2(double %3, i32 %8)
ret double %9
}

LLVM IR (-O2):
define double @asin(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = tail call i32 @sqrt(double %3)
%5 = tail call double @atan2(double %0, i32 %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int print_usage() {
  fprintf(stderr, "Usage: sgrep PATTERN [FILE]...\n");
  return 2;
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Usage: sgrep PATTERN [FILE]...\0A\00"
define i32 @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 2
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Usage: sgrep PATTERN [FILE]...\0A\00"
define i32 @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 2
}
/* Variables and functions */
int readb(int);
int /*<<< orphan*/ writeb(char, int);
void _outbyte(int c) {
  while ((readb(0x60) & 0x20) == 0)
    ;
  writeb((char)c, 0x60 + 1);
}


x86 assembly (clang, -O0):
<_outbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x60,%edi
call   1030 <readb@plt>
and    $0x20,%eax
cmp    $0x0,%eax
jne    1146 <_outbyte+0x26>
jmp    112b <_outbyte+0xb>
mov    -0x4(%rbp),%eax
mov    $0x61,%esi
movsbl %al,%edi
call   1040 <writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_outbyte>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x60,%edi
call   1030 <readb@plt>
test   $0x20,%al
je     1130 <_outbyte+0x10>
movsbl %bl,%edi
mov    $0x61,%esi
pop    %rbx
jmp    1040 <writeb@plt>

LLVM IR (-O0):
define void @_outbyte(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = call i32 @readb(i32 96)
%5 = and i32 %4, 32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i32, i32* %2
%10 = trunc i32 %9 to i8
%11 = call i32 @writeb(i8 signext %10, i32 97)
ret void
}

LLVM IR (-O2):
define void @_outbyte(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @readb(i32 96)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = trunc i32 %0 to i8
%8 = tail call i32 @writeb(i8 signext %7, i32 97)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printOddNumbers() {
  for (int i = 1; i <= 99; i++) {
    if ((i % 2)) {
      printf("%d\n", i);
    }
  }
}


x86 assembly (clang, -O0):
<printOddNumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x63,-0x4(%rbp)
jg     115f <printOddNumbers+0x4f>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     114c <printOddNumbers+0x3c>
mov    -0x4(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <printOddNumbers+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <printOddNumbers+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printOddNumbers>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <printOddNumbers+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x64,%ebx
je     1149 <printOddNumbers+0x39>
test   $0x1,%bl
je     1130 <printOddNumbers+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <printOddNumbers+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printOddNumbers() {
br label %2
1: ; preds = %8
ret void
2: ; preds = %0, %8
%3 = phi i32 [ 1, %0 ], [ %9, %8 ]
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %2, %6
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 100
br i1 %10, label %1, label %2
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(int argc, char **argv) {
  foo(argc);
  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    -0x8(%rbp),%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 %0)
ret i32 0
}
char GetEncoding5() { return 0xe2; }


x86 assembly (clang, -O0):
<GetEncoding5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe2,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetEncoding5>:
mov    $0xe2,%al
ret

LLVM IR (-O0):
define signext i8 @GetEncoding5() {
ret i8 -30
}

LLVM IR (-O2):
define signext i8 @GetEncoding5() {
ret i8 -30
}
/* Variables and functions */
int /*<<< orphan*/ link_error();
void test11(void) {
  unsigned int l = (((((((3 / 2 + 2) * 4) & 7) ^ 3) % 8) << 2) + 1) >> 2;
  if (l != 7)
    link_error();
}


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
je     1130 <test11+0x20>
mov    $0x0,%al
call   1030 <link_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test11() {
ret void
}
/* Variables and functions */
int *stdc_44115DD0();
int *_Geterrno(void) { return stdc_44115DD0(); }


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

x86 assembly (clang, -O2):
<_Geterrno>:
xor    %eax,%eax
jmp    1030 <stdc_44115DD0@plt>

LLVM IR (-O0):
define i32* @_Geterrno() {
%1 = call i32* (...) @stdc_44115DD0()
ret i32* %1
}

LLVM IR (-O2):
define i32* @_Geterrno() {
%1 = tail call i32* (...) @stdc_44115DD0()
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x65() {
  Assert_real((isodigit(101) == 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",
              510, ("isodigit should be 0 for e"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x65>:
push   %rax
mov    $0x65,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1fe,%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 e\00"
define void @t_isodigit_0x65() {
%1 = call i64 @isodigit(i32 101)
%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 510, 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 e\00"
define void @t_isodigit_0x65() {
%1 = tail call i64 @isodigit(i32 101)
%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 510, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *path_default_slash(void) { return "/"; }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @path_default_slash() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void freeCharVector(unsigned char *vector) { free(vector); }


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

LLVM IR (-O0):
define void @freeCharVector(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 @freeCharVector(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned short width;
};
typedef TYPE_1__ XArc;

/* Variables and functions */
void set_XArc_width(void *_p, unsigned short _v) {
  ((XArc *)_p)->width = (unsigned short)_v;
}


x86 assembly (clang, -O0):
<set_XArc_width>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XArc_width>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i16 }
define void @set_XArc_width(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %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 i16 %5, i16* %8
ret void
}

LLVM IR (-O2):
define void @set_XArc_width(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
int emac2_etherstatsundersizepkts_set(
    unsigned int dev_id, union emac2_etherstatsundersizepkts_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac2_etherstatsundersizepkts_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac2_etherstatsundersizepkts_u = type opaque
define i32 @emac2_etherstatsundersizepkts_set(i32 %0, %union.emac2_etherstatsundersizepkts_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_etherstatsundersizepkts_u*
store i32 %0, i32* %3
store %union.emac2_etherstatsundersizepkts_u* %1, %union.emac2_etherstatsundersizepkts_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_etherstatsundersizepkts_u = type opaque
define i32 @emac2_etherstatsundersizepkts_set(i32 %0, %union.emac2_etherstatsundersizepkts_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void gotoxy(int x, int y) { printf("\033[%d;%dH", y, x); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *format_plural(char *destination, char *string) {
  char *end_pointer;
  strcpy(destination, string);
  end_pointer = string + strlen(string) - 1;
  if (*end_pointer != 's')
    strcat(destination, "s");
  return destination;
}


x86 assembly (clang, -O0):
<format_plural>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x73,%eax
je     1192 <format_plural+0x62>
mov    -0x8(%rbp),%rdi
lea    0xe73(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_plural>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0x73,-0x1(%rbx,%rax,1)
je     115f <format_plural+0x2f>
lea    0xea9(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcat@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"s\00"
define i8* @format_plural(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = load i8*, i8** %4
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = getelementptr inbounds i8, i8* %13, i64 -1
store i8* %14, i8** %5
%15 = load i8*, i8** %5
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 115
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load i8*, i8** %3
%21 = call i32 @strcat(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %19, %2
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define i8* @format_plural(i8* returned %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
%4 = tail call i32 @strlen(i8* %1)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 115
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ addOne(int *);
int /*<<< orphan*/ assert(int);
int main(int argc, char *argv[]) {
  int a = 1;
  addOne(&a);
#pragma omp taskwait
  assert(a == 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <addOne@plt>
cmpl   $0x3,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <addOne@plt>
xor    %edi,%edi
cmpl   $0x3,0x4(%rsp)
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%5 = call i32 @addOne(i32* %3)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 3
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tstat {
  int dummy;
};
struct sstat {
  int dummy;
};

/* Variables and functions */
int gendskline(struct sstat *, char *, char);
int lvmline(struct sstat *ss, struct tstat *ts, struct tstat **ps, int nactproc,
            time_t deltasec, time_t deltatic, time_t hz, int osvers, int osrel,
            int ossub, char *tstamp, int ppres, int ntrun, int ntslpi,
            int ntslpu, int pexit, int pzombie) {
  return gendskline(ss, tstamp, 'l');
}


x86 assembly (clang, -O0):
<lvmline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x30(%rbp),%rsi
mov    $0x6c,%edx
call   1030 <gendskline@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lvmline>:
mov    0x28(%rsp),%rsi
mov    $0x6c,%edx
jmp    1030 <gendskline@plt>

LLVM IR (-O0):
%struct.sstat = type { i32 }
%struct.tstat = type { i32 }
define i32 @lvmline(%struct.sstat* %0, %struct.tstat* %1, %struct.tstat** %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i8* %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16) {
%18 = alloca %struct.sstat*
%19 = alloca %struct.tstat*
%20 = alloca %struct.tstat**
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i8*
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
store %struct.sstat* %0, %struct.sstat** %18
store %struct.tstat* %1, %struct.tstat** %19
store %struct.tstat** %2, %struct.tstat*** %20
store i32 %3, i32* %21
store i32 %4, i32* %22
store i32 %5, i32* %23
store i32 %6, i32* %24
store i32 %7, i32* %25
store i32 %8, i32* %26
store i32 %9, i32* %27
store i8* %10, i8** %28
store i32 %11, i32* %29
store i32 %12, i32* %30
store i32 %13, i32* %31
store i32 %14, i32* %32
store i32 %15, i32* %33
store i32 %16, i32* %34
%35 = load %struct.sstat*, %struct.sstat** %18
%36 = load i8*, i8** %28
%37 = call i32 @gendskline(%struct.sstat* %35, i8* %36, i8 signext 108)
ret i32 %37
}

LLVM IR (-O2):
%struct.sstat = type { i32 }
%struct.tstat = type { i32 }
define i32 @lvmline(%struct.sstat* %0, %struct.tstat* nocapture readnone %1, %struct.tstat** nocapture readnone %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i8* %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16) {
%18 = tail call i32 @gendskline(%struct.sstat* %0, i8* %10, i8 signext 108)
ret i32 %18
}
/* Type definitions */
typedef int fexcept_t;

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ fegetenv(int *);
int fetestexcept(int __excepts) {
  fexcept_t __FCSR;
  fegetenv(&__FCSR);
  return (__FCSR & __excepts & FE_ALL_EXCEPT);
}


x86 assembly (clang, -O0):
<fetestexcept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <fegetenv@plt>
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    0x2eaf(%rip),%rcx
and    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fetestexcept>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0xc(%rsp),%rdi
call   1030 <fegetenv@plt>
and    0xc(%rsp),%ebx
mov    0x2eb4(%rip),%rax
and    (%rax),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @fetestexcept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @fegetenv(i32* %3)
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = and i32 %5, %6
%8 = load i32, i32* @FE_ALL_EXCEPT
%9 = and i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @fetestexcept(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fegetenv(i32* %2)
%5 = load i32, i32* %2
%6 = and i32 %5, %0
%7 = load i32, i32* @FE_ALL_EXCEPT
%8 = and i32 %6, %7
ret i32 %8
}
IR0A1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((*p0) <= (*((unsigned short *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzwl (%rax),%eax
mov    $0xa98ac7,%ecx
movzwl (%rcx),%ecx
cmp    %ecx,%eax
jg     1142 <IR0A1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <IR0A1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0A1>:
movzwl (%r8),%ecx
xor    %eax,%eax
cmp    0xa98ac7,%cx
setbe  %al
ret

LLVM IR (-O0):
define i32 @IR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %12
%17 = load i16, i16* %16
%18 = zext i16 %17 to i32
%19 = load i16, i16* inttoptr (i64 11111111 to i16*)
%20 = zext i16 %19 to i32
%21 = icmp sle i32 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %6
store i32 1, i32* %7
br label %24
23: ; preds = %6
store i32 0, i32* %7
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @IR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = load i16, i16* %4
%8 = load i16, i16* inttoptr (i64 11111111 to i16*)
%9 = icmp ule i16 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void sei() {
  printf("%s:%d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/"
         "mock/avr/interrupt.c",
         10);
}


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

x86 assembly (clang, -O2):
<sei>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0xa,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/avr/interrupt.c\00"
define void @sei() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/avr/interrupt.c\00"
define void @sei() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.1, i64 0, i64 0), i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_new() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_new"
         "\n");
}


x86 assembly (clang, -O0):
<pa_format_info_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"NOT IMPLEMENTED:pa_format_info_new\0A\00"
define i32 @pa_format_info_new() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_format_info_new\00"
define i32 @pa_format_info_new() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int st_strcmp(const void *a, const void *b, void *data) {
  const char *s = a, *t = b;
  while (*s)
    if (*s++ != *t++)
      return -1;
  return (*t) ? -1 : 0;
}


x86 assembly (clang, -O0):
<st_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     116a <st_strcmp+0x6a>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x30(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1165 <st_strcmp+0x65>
movl   $0xffffffff,-0x4(%rbp)
jmp    1181 <st_strcmp+0x81>
jmp    1120 <st_strcmp+0x20>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_strcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     112a <st_strcmp+0x2a>
lea    0x1(%rax),%rdx
cmp    (%rsi,%rax,1),%cl
mov    %rdx,%rax
je     1110 <st_strcmp+0x10>
mov    $0xffffffff,%eax
ret
xor    %ecx,%ecx
cmp    (%rsi,%rax,1),%cl
sbb    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @st_strcmp(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %10, %9 ]
%6 = phi i8* [ %1, %3 ], [ %11, %9 ]
%7 = load i8, i8* %5
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %6
%13 = icmp eq i8 %7, %12
br i1 %13, label %4, label %18
14: ; preds = %4
%15 = load i8, i8* %6
%16 = icmp ne i8 %15, 0
%17 = sext i1 %16 to i32
br label %18
18: ; preds = %9, %14
%19 = phi i32 [ %17, %14 ], [ -1, %9 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t, int);
int /*<<< orphan*/ stderr;
void not_enough_mem(size_t sz, int line) {
  do {
    fprintf(stderr,
            "Error: "
            "out of memory! (last alloc = %zu, line = %d)\n\n",
            sz, line);
    exit(1);
  } while (0);
}


x86 assembly (clang, -O0):
<not_enough_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<not_enough_mem>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"Error: out of memory! (last alloc = %zu, line = %d)\0A\0A\00"
define void @not_enough_mem(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = load i64, i64* %3
%8 = load i32, i32* %4
%9 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %7, i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
11: ; No predecessors!
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"Error: out of memory! (last alloc = %zu, line = %d)\0A\0A\00"
define void @not_enough_mem(i64 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i64 %0, i32 %1)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int sign_unext(int, int);
int low_sign_unext(int x, int len) {
  int temp;
  int sign;
  sign = (x >> (len - 1)) & 1;
  temp = sign_unext(x, len - 1);
  return (temp << 1) | sign;
}


x86 assembly (clang, -O0):
<low_sign_unext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
call   1030 <sign_unext@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
or     -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<low_sign_unext>:
push   %rbx
add    $0xffffffff,%esi
mov    %edi,%ebx
mov    %esi,%ecx
shr    %cl,%ebx
and    $0x1,%ebx
call   1030 <sign_unext@plt>
lea    (%rbx,%rax,2),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @low_sign_unext(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = ashr i32 %7, %9
%11 = and i32 %10, 1
store i32 %11, i32* %6
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 %13, 1
%15 = call i32 @sign_unext(i32 %12, i32 %14)
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = shl i32 %16, 1
%18 = load i32, i32* %6
%19 = or i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @low_sign_unext(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = lshr i32 %0, %3
%5 = and i32 %4, 1
%6 = tail call i32 @sign_unext(i32 %0, i32 %3)
%7 = shl i32 %6, 1
%8 = or i32 %7, %5
ret i32 %8
}
char **kvm_getenvv(void *kd, const void *p, int nchr) { return (0); }


x86 assembly (clang, -O0):
<kvm_getenvv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8** @kvm_getenvv(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i8** null
}

LLVM IR (-O2):
define noalias i8** @kvm_getenvv(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i8** null
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_MD_CTX;

/* Variables and functions */
int /*<<< orphan*/ NID_sha224;
int jksengine_digests_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int jksengine_sha224_init(EVP_MD_CTX *ctx) {
  ;
  return (jksengine_digests_init(ctx, NID_sha224));
}


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

x86 assembly (clang, -O2):
<jksengine_sha224_init>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <jksengine_digests_init@plt>

LLVM IR (-O0):
@NID_sha224 = global i32 0
define i32 @jksengine_sha224_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @NID_sha224
%5 = call i32 @jksengine_digests_init(i32* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@NID_sha224 = global i32 0
define i32 @jksengine_sha224_init(i32* %0) {
%2 = load i32, i32* @NID_sha224
%3 = tail call i32 @jksengine_digests_init(i32* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
void *new_object(size_t);
void *new_array(size_t element_size, size_t count) {
  return new_object(element_size * count);
}


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

x86 assembly (clang, -O2):
<new_array>:
imul   %rsi,%rdi
jmp    1030 <new_object@plt>

LLVM IR (-O0):
define i8* @new_array(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
%6 = load i64, i64* %4
%7 = mul i64 %5, %6
%8 = call i8* @new_object(i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @new_array(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @new_object(i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
scalar_t__ shutdown(int, int);
void Shutdown(int fd, int how) {
  if (shutdown(fd, how) < 0)
    err_sys("shutdown error");
}


x86 assembly (clang, -O0):
<Shutdown>:
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   1040 <shutdown@plt>
cmp    $0x0,%rax
jge    114f <Shutdown+0x2f>
lea    0xeb6(%rip),%rdi
call   1030 <err_sys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Shutdown>:
push   %rax
call   1040 <shutdown@plt>
test   %rax,%rax
js     112d <Shutdown+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <err_sys@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"shutdown error\00"
define void @Shutdown(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 i64 @shutdown(i32 %5, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @err_sys(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"shutdown error\00"
define void @Shutdown(i32 %0, i32 %1) {
%3 = tail call i64 @shutdown(i32 %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @err_sys(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ printf(char *);
int main(void) {
  foo();
  printf("ok\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
lea    0xec3(%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 <foo@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [3 x i8] c"ok\00"
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  time_t now;
  const char *p;
  now = time(NULL);
  p = ctime(&now);
  write(1, p, strlen(p));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <ctime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @time(i32* null)
store i32 %8, i32* %6
%9 = call i8* @ctime(i32* %6)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %7
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @write(i32 1, i8* %10, i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call i8* @ctime(i32* %3)
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @write(i32 1, i8* %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: perror number\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"usage: perror number\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"usage: perror number\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void got_endmod(char *cp, int len) { printf("ENDMOD\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"ENDMOD\00"
define void @got_endmod(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t rotl_64b(short dummy, uint64_t x) { return (x << 48) | (x >> 16); }


x86 assembly (clang, -O0):
<rotl_64b>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x30,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rotl_64b(i16 signext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 48
%7 = load i32, i32* %4
%8 = ashr i32 %7, 16
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rotl_64b(i16 signext %0, i32 %1) {
ret i32 poison
}