xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned long);
void showaddr(char *label, void *a) {
  unsigned long n = (unsigned long)a;
  printf("%s   = %lx\n", label, n);
  printf("%s%%4 = %ld\n", label, n % 4);
  printf("%s%%8 = %ld\n", label, n % 8);
}


x86 assembly (clang, -O0):
<showaddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
and    $0x3,%rdx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
and    $0x7,%rdx
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showaddr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xedf(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %ebx,%edx
and    $0x3,%edx
lea    0xed4(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
and    $0x7,%ebx
lea    0xecf(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s = %lx\0A\00"
@.str.1 = [13 x i8] c"%s%%4 = %ld\0A\00"
@.str.2 = [13 x i8] c"%s%%8 = %ld\0A\00"
define void @showaddr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %8, i64 %9)
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = urem i64 %12, 4
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %11, i64 %13)
%15 = load i8*, i8** %3
%16 = load i64, i64* %5
%17 = urem i64 %16, 8
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %15, i64 %17)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s = %lx\0A\00"
@.str.1 = [13 x i8] c"%s%%4 = %ld\0A\00"
@.str.2 = [13 x i8] c"%s%%8 = %ld\0A\00"
define void @showaddr(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %3)
%5 = and i64 %3, 3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %0, i64 %5)
%7 = and i64 %3, 7
%8 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %0, i64 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gln_styled_string(int, char const *);
void gln_banner_string(const char *message) { gln_styled_string((4), message); }


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

x86 assembly (clang, -O2):
<gln_banner_string>:
mov    %rdi,%rsi
mov    $0x4,%edi
jmp    1030 <gln_styled_string@plt>

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

LLVM IR (-O2):
define void @gln_banner_string(i8* %0) {
%2 = tail call i32 @gln_styled_string(i32 4, i8* %0)
ret void
}
void _M2_RTgen_finish(__attribute__((unused)) int argc,
                      __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_RTgen_finish(i32 %0, i8** nocapture %1) {
ret void
}
int test_imm_89uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x89 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_89uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x89,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_89uint64_highword_reg>:
movabs $0x8900000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_89uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 588410519552
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int startPong() {
  getch();
  endwin();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @startPong() {
%1 = call i32 (...) @getch()
%2 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
define i32 @startPong() {
%1 = tail call i32 (...) @getch()
%2 = tail call i32 (...) @endwin()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isxdigit(int);
void t_isxdigit_0x41() {
  Assert_real((isxdigit(65)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              330, ("isxdigit should be 1 for A"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x41>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%edi
call   1030 <isxdigit@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x14a,%edx
lea    0xf66(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x41>:
push   %rax
mov    $0x41,%edi
call   1030 <isxdigit@plt>
lea    0xece(%rip),%rsi
lea    0xf70(%rip),%rcx
mov    %eax,%edi
mov    $0x14a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 1 for A\00"
define void @t_isxdigit_0x41() {
%1 = call i32 @isxdigit(i32 65)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 330, 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 1 for A\00"
define void @t_isxdigit_0x41() {
%1 = tail call i32 @isxdigit(i32 65)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t nmemb, size_t size) {
  void *res;
  size *= nmemb;
  res = malloc(size);
  memset(res, 0, size);
  return res;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = mul i64 %7, %6
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = load i64, i64* %4
%13 = call i32 @memset(i8* %11, i32 0, i64 %12)
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ sio_putchar(char);
int sio_put_in_string(char *string, unsigned int sz, char c, int pos) {
  sio_putchar(c);
  return 1;
}


x86 assembly (clang, -O0):
<sio_put_in_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    %ecx,-0x14(%rbp)
movsbl -0xd(%rbp),%edi
call   1030 <sio_putchar@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sio_put_in_string>:
push   %rax
mov    %edx,%edi
call   1030 <sio_putchar@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sio_put_in_string(i8* %0, i32 %1, i8 signext %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8 %2, i8* %7
store i32 %3, i32* %8
%9 = load i8, i8* %7
%10 = call i32 @sio_putchar(i8 signext %9)
ret i32 1
}

LLVM IR (-O2):
define i32 @sio_put_in_string(i8* nocapture readnone %0, i32 %1, i8 signext %2, i32 %3) {
%5 = tail call i32 @sio_putchar(i8 signext %2)
ret i32 1
}
int test_imm_27uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x27 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_27uint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x20,%rdx
and    $0x27,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_27uint64_highword_reg>:
movabs $0x2700000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_27uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 167503724544
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *helloFunc();
int /*<<< orphan*/ printf(char *, char *);
void main() { printf("%s\n", helloFunc()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <helloFunc@plt>
mov    %rax,%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @main() {
%1 = tail call i8* (...) @helloFunc()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
long long exp(long long);
long long internal_exp_l(long long value) { return exp(value); }


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

x86 assembly (clang, -O2):
<internal_exp_l>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define i64 @internal_exp_l(i64 %0) {
%2 = tail call i64 @exp(i64 %0)
ret i64 %2
}
/* Variables and functions */
char *__f_gets(char *s, int size, void *stream) {
  (void)s;
  (void)size;
  (void)stream;
  return NULL;
}


x86 assembly (clang, -O0):
<__f_gets>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @__f_gets(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i8* null
}
/* Variables and functions */
double compute_1F1_1d(int, double, int);
scalar_t__ fabs(double);
double bingham_F_1d(double z) {
  int iter = (((int)fabs(z) * 10) > (10) ? ((int)fabs(z) * 10) : (10));
  return compute_1F1_1d(1, z, iter);
}


x86 assembly (clang, -O0):
<bingham_F_1d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
imul   $0xa,%eax,%eax
cmp    $0xa,%eax
jle    1158 <bingham_F_1d+0x38>
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
imul   $0xa,%eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1165 <bingham_F_1d+0x45>
mov    $0xa,%eax
mov    %eax,-0x10(%rbp)
jmp    1165 <bingham_F_1d+0x45>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%esi
mov    $0x1,%edi
call   1040 <compute_1F1_1d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bingham_F_1d>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    $0xa,%esi
cmp    $0xb,%eax
jl     1149 <bingham_F_1d+0x29>
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%esi
mov    $0x1,%edi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1040 <compute_1F1_1d@plt>

LLVM IR (-O0):
define double @bingham_F_1d(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = call i64 @fabs(double %4)
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 10
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load double, double* %2
%11 = call i64 @fabs(double %10)
%12 = trunc i64 %11 to i32
%13 = mul nsw i32 %12, 10
br label %15
14: ; preds = %1
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 10, %14 ]
store i32 %16, i32* %3
%17 = load double, double* %2
%18 = load i32, i32* %3
%19 = call double @compute_1F1_1d(i32 1, double %17, i32 %18)
ret double %19
}

LLVM IR (-O2):
define double @bingham_F_1d(double %0) {
%2 = tail call i64 @fabs(double %0)
%3 = trunc i64 %2 to i32
%4 = mul nsw i32 %3, 10
%5 = icmp sgt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i64 @fabs(double %0)
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %8, 10
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 10, %1 ]
%12 = tail call double @compute_1F1_1d(i32 1, double %0, i32 %11)
ret double %12
}
/* Variables and functions */
int duplicate_func();
int func(void) { return duplicate_func(); }


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

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

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

LLVM IR (-O2):
define i32 @func() {
%1 = tail call i32 (...) @duplicate_func()
ret i32 %1
}
/* Type definitions */
struct ip6_ext {
  int ip6e_len;
};
typedef int socklen_t;

/* Variables and functions */
int inet6_opt_init(void *extbuf, socklen_t extlen) {
  struct ip6_ext *ext = (struct ip6_ext *)extbuf;
  if (extlen == 0 || (extlen % 8)) {
    return (-1);
  }
  if (ext) {
    ext->ip6e_len = (extlen >> 3) - 1;
  }
  return (2);
}


x86 assembly (clang, -O0):
<inet6_opt_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1131 <inet6_opt_init+0x31>
mov    -0x14(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     113d <inet6_opt_init+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <inet6_opt_init+0x5e>
cmpq   $0x0,-0x20(%rbp)
je     1157 <inet6_opt_init+0x57>
mov    -0x14(%rbp),%ecx
sar    $0x3,%ecx
sub    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet6_opt_init>:
mov    $0xffffffff,%eax
test   %esi,%esi
je     1122 <inet6_opt_init+0x22>
mov    %esi,%ecx
and    $0x7,%ecx
jne    1122 <inet6_opt_init+0x22>
mov    $0x2,%eax
test   %rdi,%rdi
je     1122 <inet6_opt_init+0x22>
sar    $0x3,%esi
add    $0xffffffff,%esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.ip6_ext = type { i32 }
define i32 @inet6_opt_init(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.ip6_ext*
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to %struct.ip6_ext*
store %struct.ip6_ext* %8, %struct.ip6_ext** %6
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* %5
%13 = srem i32 %12, 8
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %2
store i32 -1, i32* %3
br label %26
16: ; preds = %11
%17 = load %struct.ip6_ext*, %struct.ip6_ext** %6
%18 = icmp ne %struct.ip6_ext* %17, null
br i1 %18, label %19, label %25
19: ; preds = %16
%20 = load i32, i32* %5
%21 = ashr i32 %20, 3
%22 = sub nsw i32 %21, 1
%23 = load %struct.ip6_ext*, %struct.ip6_ext** %6
%24 = getelementptr inbounds %struct.ip6_ext, %struct.ip6_ext* %23, i32 0, i32 0
store i32 %22, i32* %24
br label %25
25: ; preds = %19, %16
store i32 2, i32* %3
br label %26
26: ; preds = %25, %15
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @inet6_opt_init(i8* writeonly %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = and i32 %1, 7
%5 = icmp eq i32 %4, 0
%6 = and i1 %3, %5
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = icmp eq i8* %0, null
br i1 %8, label %13, label %9
9: ; preds = %7
%10 = ashr i32 %1, 3
%11 = add nsw i32 %10, -1
%12 = bitcast i8* %0 to i32*
store i32 %11, i32* %12
br label %13
13: ; preds = %7, %9, %2
%14 = phi i32 [ -1, %2 ], [ 2, %9 ], [ 2, %7 ]
ret i32 %14
}
void inc_zcache_objnode_count(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_objnode_count() {
ret void
}
int is_lowercase(char c) { return c <= 'z' && c >= 'a'; }


x86 assembly (clang, -O0):
<is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jg     1129 <is_lowercase+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
setge  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_lowercase>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_lowercase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int lseek(int, int, int);
int fild_Lseek(int fd, int offset, int whence) {
  return lseek(fd, offset, whence);
}


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

x86 assembly (clang, -O2):
<fild_Lseek>:
jmp    1030 <lseek@plt>

LLVM IR (-O0):
define i32 @fild_Lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @lseek(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @fild_Lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
void bzero(buf, num) char *buf;
unsigned int num;
{
  int i;
  for (i = 0; i < num; i++)
    buf[i] = buf[i] ^ buf[i];
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1153 <bzero+0x53>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <bzero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
je     1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, size_t);
size_t strlen(char *);
char *my_strcat(char *dest, char *src, size_t len) {
  if (0 == len)
    len = strlen(src);
  memcpy(dest, src, len);
  return dest + len;
}


x86 assembly (clang, -O0):
<my_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    114d <my_strcat+0x2d>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcat>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
test   %rdx,%rdx
jne    113e <my_strcat+0x1e>
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @my_strcat(i8* %0, i8* %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i64 @strlen(i8* dereferenceable(1) %1)
br label %7
7: ; preds = %5, %3
%8 = phi i64 [ %6, %5 ], [ %2, %3 ]
%9 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %8)
%10 = getelementptr inbounds i8, i8* %0, i64 %8
ret i8* %10
}
void compat_call_dtors() {}


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

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

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

LLVM IR (-O2):
define void @compat_call_dtors() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, world!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(char *, int);
void oops(int x) { error("Died on signal %d", x); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Died on signal %d\00"
define void @oops(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Died on signal %d\00"
define void @oops(i32 %0) {
%2 = tail call i32 @error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ islower(char);
scalar_t__ isupper(char);
int is_optchar(char c) {
  if (isupper(c))
    return (1);
  if (islower(c))
    return (1);
  if (c == '-')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_optchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     114d <is_optchar+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    118c <is_optchar+0x6c>
movsbl -0x5(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     116c <is_optchar+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    118c <is_optchar+0x6c>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1185 <is_optchar+0x65>
movl   $0x1,-0x4(%rbp)
jmp    118c <is_optchar+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_optchar>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <isupper@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    114b <is_optchar+0x2b>
movsbl %bpl,%edi
call   1030 <islower@plt>
test   %rax,%rax
jne    114b <is_optchar+0x2b>
xor    %ebx,%ebx
cmp    $0x2d,%bpl
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_optchar(i8 signext %0) {
%2 = tail call i64 @isupper(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @islower(i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = icmp eq i8 %0, 45
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %4, %1
%11 = phi i32 [ 1, %1 ], [ 1, %4 ], [ %9, %7 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: rm file...\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 = [19 x i8] c"usage: rm file...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"usage: rm file...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void *, int);
void xmemmove(void *dst, void *src, int n) { memmove(dst, src, n); }


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

x86 assembly (clang, -O2):
<xmemmove>:
jmp    1030 <memmove@plt>

LLVM IR (-O0):
define void @xmemmove(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
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @memmove(i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @xmemmove(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memmove(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
unsigned short app_usb_umount(unsigned short);
unsigned short Usb_off(unsigned short index) { return app_usb_umount(index); }


x86 assembly (clang, -O0):
<Usb_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <app_usb_umount@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usb_off>:
jmp    1030 <app_usb_umount@plt>

LLVM IR (-O0):
define zeroext i16 @Usb_off(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call zeroext i16 @app_usb_umount(i16 zeroext %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @Usb_off(i16 zeroext %0) {
%2 = tail call zeroext i16 @app_usb_umount(i16 zeroext %0)
ret i16 %2
}
int test_imm_C3uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xC3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C3uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xc3,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_C3uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 195
%7 = icmp ne i64 %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_C3uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12779520
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
char *HsStrchr(char *s, int c) {
  char *a;
  return a;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @HsStrchr(i8* nocapture readnone %0, i32 %1) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xbf() {
  Assert_real((isupper(191) == 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_isupper.c",
              960, ("isupper should be 0 for 0xbf"));
}


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

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

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


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

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

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

LLVM IR (-O2):
define void @caller_1_2_2_1_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_full_usage();
int /*<<< orphan*/ print_version();
void usage() {
  print_version();
  print_full_usage();
}


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

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

LLVM IR (-O0):
define void @usage() {
%1 = call i32 (...) @print_version()
%2 = call i32 (...) @print_full_usage()
ret void
}

LLVM IR (-O2):
define void @usage() {
%1 = tail call i32 (...) @print_version()
%2 = tail call i32 (...) @print_full_usage()
ret void
}
int ol(int n) {
  while (n)
    if ((n % 10 == 4) || (n % 10 == 7))
      return 1;
    else
      n /= 10;
  return 0;
}


x86 assembly (clang, -O0):
<ol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1158 <ol+0x58>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x4,%edx
je     1139 <ol+0x39>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x7,%edx
jne    1145 <ol+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115f <ol+0x5f>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1107 <ol+0x7>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ol>:
test   %edi,%edi
je     1148 <ol+0x48>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %edi,%rdx
imul   $0x66666667,%rdx,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x22,%rcx
add    %eax,%ecx
lea    (%rcx,%rcx,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edx
mov    $0x1,%eax
cmp    $0x4,%edx
je     114a <ol+0x4a>
cmp    $0x7,%edx
je     114a <ol+0x4a>
add    $0x9,%edi
cmp    $0x12,%edi
mov    %ecx,%edi
ja     1110 <ol+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ol(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %19, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 10
%10 = icmp eq i32 %9, 4
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = srem i32 %12, 10
%14 = icmp eq i32 %13, 7
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 1, i32* %2
br label %21
16: ; preds = %11
%17 = load i32, i32* %3
%18 = sdiv i32 %17, 10
store i32 %18, i32* %3
br label %19
19: ; preds = %16
br label %4
20: ; preds = %4
store i32 0, i32* %2
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @ol(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %7
%4 = phi i32 [ %6, %7 ], [ %0, %1 ]
%5 = srem i32 %4, 10
%6 = sdiv i32 %4, 10
switch i32 %5, label %7 [
i32 4, label %10
i32 7, label %10
]
7: ; preds = %3
%8 = add i32 %4, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %3, %7, %1
%11 = phi i32 [ 0, %1 ], [ 0, %7 ], [ 1, %3 ], [ 1, %3 ]
ret i32 %11
}
void emit_type_definition_utf8(
    struct processor_explicatory_state *process_state,
    struct modern_stream *stream, void *stream_state,
    struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_type_definition_utf8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_utf8(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_utf8(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NedAccelHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void NedAccelUpdated() { UAVObjUpdated(NedAccelHandle()); }


x86 assembly (clang, -O0):
<NedAccelUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <NedAccelHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @NedAccelUpdated() {
%1 = call i32 (...) @NedAccelHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @NedAccelUpdated() {
%1 = tail call i32 (...) @NedAccelHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
void flash_unlock_option_bytes(void) {}


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

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

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

LLVM IR (-O2):
define void @flash_unlock_option_bytes() {
ret void
}
int xisascii(int c) { return ((c & 0x80) != 0x80); }


x86 assembly (clang, -O0):
<xisascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x80,%eax
cmp    $0x80,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisascii>:
xor    %eax,%eax
test   $0x80,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @xisascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 128
%5 = icmp ne i32 %4, 128
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @xisascii(i32 %0) {
%2 = lshr i32 %0, 7
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ kill(int /*<<< orphan*/, int);
void altera_sc_stop(pid_t pid) { kill(-pid, 9); }


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

x86 assembly (clang, -O2):
<altera_sc_stop>:
neg    %edi
mov    $0x9,%esi
jmp    1030 <kill@plt>

LLVM IR (-O0):
define void @altera_sc_stop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = call i32 @kill(i32 %4, i32 9)
ret void
}

LLVM IR (-O2):
define void @altera_sc_stop(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call i32 @kill(i32 %2, i32 9)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t __synctory_byteswap_32(uint32_t value) {
  return ((value >> 24) | ((value >> 8) & 0xff00) | ((value << 8) & 0xff0000) |
          (value << 24));
}


x86 assembly (clang, -O0):
<__synctory_byteswap_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__synctory_byteswap_32>:
mov    %edi,%eax
sar    $0x18,%eax
mov    %edi,%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
mov    %edi,%edx
shl    $0x8,%edx
and    $0xff0000,%edx
shl    $0x18,%edi
or     %edi,%eax
or     %ecx,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @__synctory_byteswap_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 24
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = and i32 %6, 65280
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = shl i32 %9, 8
%11 = and i32 %10, 16711680
%12 = or i32 %8, %11
%13 = load i32, i32* %2
%14 = shl i32 %13, 24
%15 = or i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @__synctory_byteswap_32(i32 %0) {
%2 = ashr i32 %0, 24
%3 = lshr i32 %0, 8
%4 = and i32 %3, 65280
%5 = shl i32 %0, 8
%6 = and i32 %5, 16711680
%7 = shl i32 %0, 24
%8 = or i32 %7, %2
%9 = or i32 %8, %4
%10 = or i32 %9, %6
ret i32 %10
}
I0AR1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if (22 <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<I0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    $0x16,%eax
cmp    0x10f444(%rcx),%eax
ja     1139 <I0AR1+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1140 <I0AR1+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I0AR1>:
xor    %eax,%eax
cmpl   $0x16,0x10f444(%r9)
16
setae  %al
ret

LLVM IR (-O0):
define i32 @I0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 277777
%16 = load i32, i32* %15
%17 = icmp ule i32 22, %16
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @I0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %5, i64 277777
%8 = load i32, i32* %7
%9 = icmp ugt i32 %8, 21
%10 = zext i1 %9 to i32
ret i32 %10
}