xunge/DecIR huggingface dataset:
unsigned __int128 bpf_hton128(unsigned __int128 val) {
  return bpf_ntoh128(val);
}


x86 assembly (clang, -O0):
<bpf_hton128>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x38(%rbp)
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
xor    %eax,%eax
call   1030 <bpf_ntoh128@plt>
movslq %eax,%rcx
mov    %rcx,%rax
sar    $0x3f,%rax
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_hton128>:
push   %rax
xor    %eax,%eax
call   1030 <bpf_ntoh128@plt>
cltq
mov    %eax,%ecx
sar    $0x1f,%ecx
movslq %ecx,%rdx
pop    %rcx
ret

LLVM IR (-O0):
define { i64, i64 } @bpf_hton128(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
store i128 %11, i128* %6
%12 = bitcast i128* %6 to { i64, i64 }*
%13 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %12, i32 0, i32 0
%14 = load i64, i64* %13
%15 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %12, i32 0, i32 1
%16 = load i64, i64* %15
%17 = call i32 (i64, i64, ...) bitcast (i32 (...)* @bpf_ntoh128 to i32 (i64, i64, ...)*)(i64 %14, i64 %16)
%18 = sext i32 %17 to i128
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @bpf_hton128(i64 %0, i64 %1) {
%3 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @bpf_ntoh128 to i32 (i64, i64, ...)*)(i64 %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = ashr i32 %3, 31
%6 = sext i32 %5 to i64
%7 = insertvalue { i64, i64 } poison, i64 %4, 0
%8 = insertvalue { i64, i64 } %7, i64 %6, 1
ret { i64, i64 } %8
}
/* Variables and functions */
int /*<<< orphan*/ findMyNumber();
int /*<<< orphan*/ getchar();
int main(int argc, char *argv[]) {
  int x = 6;
  int n = 10;
  findMyNumber();
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x6,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
mov    $0x0,%al
call   1040 <findMyNumber@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <findMyNumber@plt>
xor    %eax,%eax
call   1030 <getchar@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**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 6, i32* %6
store i32 10, i32* %7
%8 = call i32 (...) @findMyNumber()
%9 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @findMyNumber()
%4 = tail call i32 (...) @getchar()
ret i32 0
}
double h_T(double a, double b, int n) { return (b - a) / n; }


x86 assembly (clang, -O0):
<h_T>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_T>:
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @h_T(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load double, double* %5
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = load i32, i32* %6
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
ret double %12
}

LLVM IR (-O2):
define double @h_T(double %0, double %1, i32 %2) {
%4 = fsub double %1, %0
%5 = sitofp i32 %2 to double
%6 = fdiv double %4, %5
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, float *, int);
uint32_t copy_if(float f) {
  uint32_t x;
  memcpy(&x, &f, 4);
  return x;
}


x86 assembly (clang, -O0):
<copy_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_if>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @copy_if(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = call i32 @memcpy(i32* %3, float* %2, i32 4)
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @copy_if(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i32* %3, float* %2, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}
/* Type definitions */
typedef int uid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
uid_t __getuid(void) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getuid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getuid>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getuid() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getuid() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
long long int llabs(long long int x) { return ((x < 0) ? -x : x); }


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @llabs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
void gerar(int m[4][4]) {
  int i, j;
  int v = 1;
  for (i = 0; i < 4; i++)
    for (j = 0; j < 4; j++) {
      if (v == 4 * 4 / 2 + 1)
        v = 1;
      m[i][j] = v++;
    }
}


x86 assembly (clang, -O0):
<gerar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1184 <gerar+0x84>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1171 <gerar+0x71>
cmpl   $0x9,-0x14(%rbp)
jne    1142 <gerar+0x42>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <gerar+0x27>
jmp    1176 <gerar+0x76>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <gerar+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gerar>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm1
movups %xmm1,0x10(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm1,0x30(%rdi)
ret

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

LLVM IR (-O2):
define void @gerar([4 x i32]* nocapture writeonly %0) {
%2 = bitcast [4 x i32]* %0 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %2
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 1, i64 0
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %4
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 2, i64 0
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %6
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %0, i64 3, i64 0
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %8
ret void
}
/* Variables and functions */
double max(double, double);
double max_tab(double *tab, int ilosc) {
  if (ilosc == 1) {
    return tab[0];
  } else {
    return max(max_tab(tab, ilosc - 1), tab[ilosc - 1]);
  }
}


x86 assembly (clang, -O0):
<max_tab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    114b <max_tab+0x2b>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1176 <max_tab+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
sub    $0x1,%esi
call   1040 <max_tab@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <max@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_tab>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
cmp    $0x1,%esi
jne    1139 <max_tab+0x19>
movsd  (%r14),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %esi,%ebx
lea    -0x1(%rbx),%esi
mov    %r14,%rdi
call   1040 <max_tab@plt>
movslq %ebx,%rax
movsd  -0x8(%r14,%rax,8),%xmm1
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <max@plt>

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

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

/* Variables and functions */
uint32_t enrange(uint32_t x) { return x & 0x7fffffff; }


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

x86 assembly (clang, -O2):
<enrange>:
mov    %edi,%eax
and    $0x7fffffff,%eax
ret

LLVM IR (-O0):
define i32 @enrange(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 2147483647
ret i32 %4
}

LLVM IR (-O2):
define i32 @enrange(i32 %0) {
%2 = and i32 %0, 2147483647
ret i32 %2
}
/* Variables and functions */
scalar_t__ RLIM_INFINITY;
scalar_t__ system_memlock_amount();
int system_memlock_is_unlimited() {
  return ((RLIM_INFINITY == system_memlock_amount()) ? 1 : 0);
}


x86 assembly (clang, -O0):
<system_memlock_is_unlimited>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <system_memlock_amount@plt>
mov    -0x8(%rbp),%rdx
mov    %rax,%rsi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_memlock_is_unlimited>:
push   %rbx
mov    0x2ec8(%rip),%rax
mov    (%rax),%rbx
xor    %eax,%eax
call   1030 <system_memlock_amount@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@RLIM_INFINITY = global i64 0
define i32 @system_memlock_is_unlimited() {
%1 = load i64, i64* @RLIM_INFINITY
%2 = call i64 (...) @system_memlock_amount()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 1, i32 0
ret i32 %5
}

LLVM IR (-O2):
@RLIM_INFINITY = global i64 0
define i32 @system_memlock_is_unlimited() {
%1 = load i64, i64* @RLIM_INFINITY
%2 = tail call i64 (...) @system_memlock_amount()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ do_send(int, char *);
void japi_pause_recog(int sd) { do_send(sd, "PAUSE\n"); }


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

x86 assembly (clang, -O2):
<japi_pause_recog>:
lea    0xee9(%rip),%rsi
jmp    1030 <do_send@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"PAUSE\0A\00"
define void @japi_pause_recog(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @do_send(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"PAUSE\0A\00"
define void @japi_pause_recog(i32 %0) {
%2 = tail call i32 @do_send(i32 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct genlist *);
int /*<<< orphan*/ genlist_clear(struct genlist *);
void genlist_free(struct genlist *pgenlist) {
  if (!pgenlist) {
    return;
  }
  genlist_clear(pgenlist);
  free(pgenlist);
}


x86 assembly (clang, -O0):
<genlist_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <genlist_free+0x1c>
jmp    114e <genlist_free+0x2e>
mov    -0x8(%rbp),%rdi
call   1030 <genlist_clear@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genlist_free>:
test   %rdi,%rdi
je     1137 <genlist_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1030 <genlist_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>
ret

LLVM IR (-O0):
%struct.genlist = type { i32 }
define void @genlist_free(%struct.genlist* %0) {
%2 = alloca %struct.genlist*
store %struct.genlist* %0, %struct.genlist** %2
%3 = load %struct.genlist*, %struct.genlist** %2
%4 = icmp ne %struct.genlist* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.genlist*, %struct.genlist** %2
%8 = call i32 @genlist_clear(%struct.genlist* %7)
%9 = load %struct.genlist*, %struct.genlist** %2
%10 = call i32 @free(%struct.genlist* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.genlist = type { i32 }
define void @genlist_free(%struct.genlist* %0) {
%2 = icmp eq %struct.genlist* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @genlist_clear(%struct.genlist* %0)
%5 = tail call i32 @free(%struct.genlist* %0)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *myenvvar = getenv("EDITOR");
  printf("The eidtor environment variable is set to %s\n", myenvvar);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"EDITOR\00"
@.str.1 = [46 x i8] c"The eidtor environment variable is set to %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"EDITOR\00"
@.str.1 = [46 x i8] c"The eidtor environment variable is set to %s\0A\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errExit(int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ *sym_find(char *);
void symbol_use(char *ID) {
  char str[50] = "undefine ID:";
  if (sym_find(ID) == NULL)
    errExit(strcat(str, ID));
}


x86 assembly (clang, -O0):
<symbol_use>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xea9(%rip),%rsi
mov    $0x32,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <sym_find@plt>
cmp    $0x0,%rax
jne    1188 <symbol_use+0x48>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    %eax,%edi
call   1040 <errExit@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbol_use>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rbx
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
call   1030 <sym_find@plt>
test   %rax,%rax
jne    117e <symbol_use+0x4e>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1050 <strcat@plt>
mov    %eax,%edi
call   1040 <errExit@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.symbol_use.str = [50 x i8] c"undefine ID:\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @symbol_use(i8* %0) {
%2 = alloca i8*
%3 = alloca [50 x i8]
store i8* %0, i8** %2
%4 = bitcast [50 x i8]* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32* @sym_find(i8* %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %2
%11 = call i32 @strcat(i8* %9, i8* %10)
%12 = call i32 @errExit(i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.symbol_use.str = [50 x i8] c"undefine ID:\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @symbol_use(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = tail call i32* @sym_find(i8* %0)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @strcat(i8* %3, i8* %0)
%8 = call i32 @errExit(i32 %7)
br label %9
9: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doienc(int /*<<< orphan*/);
int doinull() {
  doienc(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @doinull() {
%1 = call i32 @doienc(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @doinull() {
%1 = tail call i32 @doienc(i32 0)
ret i32 0
}
unsigned long LPCChannelPoolAddressGet(unsigned long ulBase,
                                       unsigned long ulChannel) {
  unsigned long ulAddress;
  ;
  ;
  ulAddress =
      (*((volatile unsigned long *)(ulBase + 0x00000010 + (ulChannel * 0x10))));
  ulAddress = ((ulAddress & 0x00007FE0) >> (5 - 1));
  ulAddress += (ulBase + 0x00000400);
  return (ulAddress);
}


x86 assembly (clang, -O0):
<LPCChannelPoolAddressGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    -0x10(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x7fe0,%rax
shr    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x400,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCChannelPoolAddressGet>:
shl    $0x4,%rsi
mov    0x10(%rdi,%rsi,1),%rax
shr    $0x4,%rax
and    $0x7fe,%eax
add    %rdi,%rax
add    $0x400,%rax
ret

LLVM IR (-O0):
define i64 @LPCChannelPoolAddressGet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 16
%8 = load i64, i64* %4
%9 = mul i64 %8, 16
%10 = add i64 %7, %9
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
store i64 %12, i64* %5
%13 = load i64, i64* %5
%14 = and i64 %13, 32736
%15 = lshr i64 %14, 4
store i64 %15, i64* %5
%16 = load i64, i64* %3
%17 = add i64 %16, 1024
%18 = load i64, i64* %5
%19 = add i64 %18, %17
store i64 %19, i64* %5
%20 = load i64, i64* %5
ret i64 %20
}

LLVM IR (-O2):
define i64 @LPCChannelPoolAddressGet(i64 %0, i64 %1) {
%3 = add i64 %0, 16
%4 = shl i64 %1, 4
%5 = add i64 %3, %4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = lshr i64 %7, 4
%9 = and i64 %8, 2046
%10 = add i64 %0, 1024
%11 = add i64 %10, %9
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_96C141(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_96C141() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_96C141() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned short height;
};
typedef TYPE_1__ XRectangle;

/* Variables and functions */
void set_XRectangle_height(void *_p, unsigned short _v) {
  ((XRectangle *)_p)->height = (unsigned short)_v;
}


x86 assembly (clang, -O0):
<set_XRectangle_height>:
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_XRectangle_height>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i16 }
define void @set_XRectangle_height(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_XRectangle_height(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
int test_imm_1Cuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x1C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Cuint64_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, 28
%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_1Cuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1835008
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void libbf_free_aligned(void *ptr) { free(ptr); }


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

LLVM IR (-O0):
define void @libbf_free_aligned(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 @libbf_free_aligned(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void prepend(int i) {}


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

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

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

LLVM IR (-O2):
define void @prepend(i32 %0) {
ret void
}
/* Type definitions */
typedef int u_long;

/* Variables and functions */
u_long IP_host_address(u_long dest_addr) { return 0x0100007F; }


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

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

LLVM IR (-O0):
define i32 @IP_host_address(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 16777343
}

LLVM IR (-O2):
define i32 @IP_host_address(i32 %0) {
ret i32 16777343
}
/* Variables and functions */
int Pop();
int /*<<< orphan*/ Push(int);
int CmdLT(void) {
  int operand2;
  operand2 = Pop();
  Push(Pop() < operand2);
  return 0;
}


x86 assembly (clang, -O0):
<CmdLT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Pop@plt>
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <Push@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdLT>:
push   %rbx
xor    %eax,%eax
call   1030 <Pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <Pop@plt>
xor    %edi,%edi
cmp    %ebx,%eax
setl   %dil
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CmdLT() {
%1 = alloca i32
%2 = call i32 (...) @Pop()
store i32 %2, i32* %1
%3 = call i32 (...) @Pop()
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @Push(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdLT() {
%1 = tail call i32 (...) @Pop()
%2 = tail call i32 (...) @Pop()
%3 = icmp slt i32 %2, %1
%4 = zext i1 %3 to i32
%5 = tail call i32 @Push(i32 %4)
ret i32 0
}
/* Variables and functions */
#define AF_INET 128
int /*<<< orphan*/ EAFNOSUPPORT;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
char *inet_net_ntop_ipv4(void const *, int, char *, size_t);
char *inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size) {
  switch (af) {
  case AF_INET:
    return (inet_net_ntop_ipv4(src, bits, dst, size));
  default:
    __set_errno(EAFNOSUPPORT);
    return (NULL);
  }
}


x86 assembly (clang, -O0):
<inet_net_ntop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
jne    116a <inet_net_ntop+0x4a>
jmp    114d <inet_net_ntop+0x2d>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
call   1040 <inet_net_ntop_ipv4@plt>
mov    %rax,-0x8(%rbp)
jmp    1180 <inet_net_ntop+0x60>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_net_ntop>:
cmp    $0x80,%edi
jne    1138 <inet_net_ntop+0x18>
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rcx,%rdx
mov    %r8,%rcx
jmp    1040 <inet_net_ntop_ipv4@plt>
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EAFNOSUPPORT = global i32 0
define i8* @inet_net_ntop(i32 %0, i8* %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i64
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i64 %4, i64* %11
%12 = load i32, i32* %7
switch i32 %12, label %19 [
i32 128, label %13
]
13: ; preds = %5
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i8*, i8** %10
%17 = load i64, i64* %11
%18 = call i8* @inet_net_ntop_ipv4(i8* %14, i32 %15, i8* %16, i64 %17)
store i8* %18, i8** %6
br label %22
19: ; preds = %5
%20 = load i32, i32* @EAFNOSUPPORT
%21 = call i32 @__set_errno(i32 %20)
store i8* null, i8** %6
br label %22
22: ; preds = %19, %13
%23 = load i8*, i8** %6
ret i8* %23
}

LLVM IR (-O2):
@EAFNOSUPPORT = global i32 0
define i8* @inet_net_ntop(i32 %0, i8* %1, i32 %2, i8* %3, i64 %4) {
%6 = icmp eq i32 %0, 128
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i8* @inet_net_ntop_ipv4(i8* %1, i32 %2, i8* %3, i64 %4)
br label %12
9: ; preds = %5
%10 = load i32, i32* @EAFNOSUPPORT
%11 = tail call i32 @__set_errno(i32 %10)
br label %12
12: ; preds = %9, %7
%13 = phi i8* [ %8, %7 ], [ null, %9 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xbb() {
  Assert_real((ispunct(187) == 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_ispunct.c",
              940, ("ispunct should be 0 for 0xbb"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xbb>:
push   %rax
mov    $0xbb,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3ac,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xbb\00"
define void @t_ispunct_0xbb() {
%1 = call i64 @ispunct(i32 187)
%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 940, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xbb\00"
define void @t_ispunct_0xbb() {
%1 = tail call i64 @ispunct(i32 187)
%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 940, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int byte_col_normal(int byte) { return byte - 0x21; }


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

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

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

LLVM IR (-O2):
define i32 @byte_col_normal(i32 %0) {
%2 = add nsw i32 %0, -33
ret i32 %2
}
void untab(s) char *s;
{
  while (*s) {
    if (*s == 9)
      *s = 32;
    s++;
  }
}


x86 assembly (clang, -O0):
<untab>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113d <untab+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    112c <untab+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <untab+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<untab>:
jmp    1117 <untab+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x20,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x9,%al
je     1110 <untab+0x10>
test   %al,%al
jne    1113 <untab+0x13>
ret

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

LLVM IR (-O2):
define void @untab(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 9, label %5
]
5: ; preds = %2
store i8 32, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ producer();
void *thread(void *arg) {
  (void)arg;
  producer();
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (...) @producer()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @thread(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @producer()
ret i8* null
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t h264nalst_get_type(uint8_t start) { return start & 0x1f; }


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

x86 assembly (clang, -O2):
<h264nalst_get_type>:
mov    %edi,%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @h264nalst_get_type(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 31
ret i32 %4
}

LLVM IR (-O2):
define i32 @h264nalst_get_type(i32 %0) {
%2 = and i32 %0, 31
ret i32 %2
}
int rd(dbl)
double dbl;
{
  if (dbl < 0.0) {
    return ((int)(dbl - 0.5));
  } else {
    return ((int)(dbl + 0.5));
  }
}


x86 assembly (clang, -O0):
<rd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1134 <rd+0x34>
movsd  -0x10(%rbp),%xmm0
movsd  0xedc(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <rd+0x48>
movsd  0xec4(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @rd(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fsub double %7, 5.000000e-01
%9 = fptosi double %8 to i32
store i32 %9, i32* %2
br label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = fadd double %11, 5.000000e-01
%13 = fptosi double %12 to i32
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @rd(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gluOrtho2D(double, int /*<<< orphan*/, double,
                              int /*<<< orphan*/);
void reshape(int w, int h) {
  glViewport(0, 0, (GLsizei)w, (GLsizei)h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluOrtho2D(0.0, (GLdouble)w, 0.0, (GLdouble)h);
}


x86 assembly (clang, -O0):
<reshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1050 <gluOrtho2D@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reshape>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1060 <glViewport@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <gluOrtho2D@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @gluOrtho2D(double 0.000000e+00, i32 %11, double 0.000000e+00, i32 %12)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = tail call i32 @gluOrtho2D(double 0.000000e+00, i32 %0, double 0.000000e+00, i32 %1)
ret void
}
int rend_unregister(char *name, char *type, int port) { return -1; }


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

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

LLVM IR (-O0):
define i32 @rend_unregister(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 i32 -1
}

LLVM IR (-O2):
define i32 @rend_unregister(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int COM_Argc();
int /*<<< orphan*/ CONS_Printf(char *);
int /*<<< orphan*/ DoSayCommand(int /*<<< orphan*/, int, int /*<<< orphan*/);
void Command_Say_f(void) {
  if (COM_Argc() < 2) {
    CONS_Printf(("say <message>: send a message\n"));
    return;
  }
  DoSayCommand(0, 1, 0);
}


x86 assembly (clang, -O0):
<Command_Say_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <COM_Argc@plt>
cmp    $0x2,%eax
jge    1155 <Command_Say_f+0x25>
lea    0xeb5(%rip),%rdi
call   1050 <CONS_Printf@plt>
jmp    1163 <Command_Say_f+0x33>
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1030 <DoSayCommand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Command_Say_f>:
push   %rax
xor    %eax,%eax
call   1040 <COM_Argc@plt>
cmp    $0x1,%eax
jg     114a <Command_Say_f+0x1a>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1050 <CONS_Printf@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <DoSayCommand@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"say <message>: send a message\0A\00"
define void @Command_Say_f() {
%1 = call i32 (...) @COM_Argc()
%2 = icmp slt i32 %1, 2
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @CONS_Printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @DoSayCommand(i32 0, i32 1, i32 0)
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"say <message>: send a message\0A\00"
define void @Command_Say_f() {
%1 = tail call i32 (...) @COM_Argc()
%2 = icmp slt i32 %1, 2
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @CONS_Printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @DoSayCommand(i32 0, i32 1, i32 0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_log();
int /*<<< orphan*/ stop_hermit();
void multi_fini(void) {
  dump_log();
  stop_hermit();
}


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

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

LLVM IR (-O0):
define void @multi_fini() {
%1 = call i32 (...) @dump_log()
%2 = call i32 (...) @stop_hermit()
ret void
}

LLVM IR (-O2):
define void @multi_fini() {
%1 = tail call i32 (...) @dump_log()
%2 = tail call i32 (...) @stop_hermit()
ret void
}
/* Variables and functions */
int choose(int, char *, int, char *);
int /*<<< orphan*/ printf(char *);
page53() {
  printf("You tell The Computer about:\n");
  return choose(47,
                "The commies who have infiltrated the Troubleshooter Training "
                "Course\n     and the impending People\'s Revolution",
                54, "Something less dangerous");
}


x86 assembly (clang, -O0):
<page53>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2f,%edi
lea    0xee2(%rip),%rsi
mov    $0x36,%edx
lea    0xf45(%rip),%rcx
call   1030 <choose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<page53>:
push   %rax
lea    0xf60(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rsi
lea    0xf34(%rip),%rcx
mov    $0x2f,%edi
mov    $0x36,%edx
pop    %rax
jmp    1040 <choose@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"You tell The Computer about:\0A\00"
@.str.1 = [111 x i8] c"The commies who have infiltrated the Troubleshooter Training Course\0A and the impending People's Revolution\00"
@.str.2 = [25 x i8] c"Something less dangerous\00"
define i32 @page53() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @choose(i32 47, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.1, i64 0, i64 0), i32 54, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str.1 = [111 x i8] c"The commies who have infiltrated the Troubleshooter Training Course\0A and the impending People's Revolution\00"
@.str.2 = [25 x i8] c"Something less dangerous\00"
@str = [29 x i8] c"You tell The Computer about:\00"
define i32 @page53() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @choose(i32 47, i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.1, i64 0, i64 0), i32 54, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 %2
}