xunge/DecIR huggingface dataset:
int str_cmp_like(char *s, char *t) {
  for (; *s == *t; s++, t++)
    ;
  if (*s == '\0')
    return 0;
  return *s - *t;
}


x86 assembly (clang, -O0):
<str_cmp_like>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1144 <str_cmp_like+0x44>
jmp    1127 <str_cmp_like+0x27>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <str_cmp_like+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1160 <str_cmp_like+0x60>
movl   $0x0,-0x4(%rbp)
jmp    1173 <str_cmp_like+0x73>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cmp_like>:
mov    (%rdi),%al
mov    (%rsi),%cl
cmp    %cl,%al
jne    1120 <str_cmp_like+0x20>
mov    $0x1,%edx
nopl   (%rax)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
add    $0x1,%rdx
cmp    %cl,%al
je     1110 <str_cmp_like+0x10>
movsbl %cl,%ecx
movsbl %al,%edx
mov    %edx,%esi
sub    %ecx,%esi
xor    %eax,%eax
test   %dl,%dl
cmovne %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @str_cmp_like(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2, %6
%7 = phi i8* [ %10, %6 ], [ %1, %2 ]
%8 = phi i8* [ %9, %6 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %9
%12 = load i8, i8* %10
%13 = icmp eq i8 %11, %12
br i1 %13, label %6, label %14
14: ; preds = %6, %2
%15 = phi i8 [ %3, %2 ], [ %11, %6 ]
%16 = phi i8 [ %4, %2 ], [ %12, %6 ]
%17 = sext i8 %16 to i32
%18 = sext i8 %15 to i32
%19 = icmp eq i8 %15, 0
%20 = sub nsw i32 %18, %17
%21 = select i1 %19, i32 0, i32 %20
ret i32 %21
}
void script_get_vid_pid(int *out_vid, int *out_pid) {
  *out_vid = 0x17cc;
  *out_pid = 0x1400;
}


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

x86 assembly (clang, -O2):
<script_get_vid_pid>:
movl   $0x17cc,(%rdi)
movl   $0x1400,(%rsi)
ret

LLVM IR (-O0):
define void @script_get_vid_pid(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
store i32 6092, i32* %5
%6 = load i32*, i32** %4
store i32 5120, i32* %6
ret void
}

LLVM IR (-O2):
define void @script_get_vid_pid(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
store i32 6092, i32* %0
store i32 5120, i32* %1
ret void
}
int test_imm_DEint8_reg(signed char val) {
  return ((val) & (-0xDE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DEint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff22,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DEint8_reg>:
test   $0xffffff22,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_DEint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -222
%6 = icmp ne i32 %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_DEint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -222
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
_mark(long obj, int i, char *a) { (char *)&(((long *)(obj))[i]) - a; }


x86 assembly (clang, -O0):
<_mark>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_mark(i64 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i8*
store i64 %0, i64* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i64, i64* %5
%9 = inttoptr i64 %8 to i64*
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %9, i64 %11
%13 = bitcast i64* %12 to i8*
%14 = load i8*, i8** %7
%15 = ptrtoint i8* %13 to i64
%16 = ptrtoint i8* %14 to i64
%17 = sub i64 %15, %16
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @_mark(i64 %0, i32 %1, i8* nocapture readnone %2) {
ret i32 undef
}
__attribute__((optimize(1))) int *foo(int *p) { return p; }


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

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

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

LLVM IR (-O2):
define i32* @foo(i32* readnone returned %0) {
ret i32* %0
}
/* Type definitions */
struct lconv {
  int dummy;
};

/* Variables and functions */
struct lconv *__localeconv();
struct lconv *__aeabi_localeconv(void) {
  return __localeconv();
}


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

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

LLVM IR (-O0):
%struct.lconv = type { i32 }
define %struct.lconv* @__aeabi_localeconv() {
%1 = call %struct.lconv* (...) @__localeconv()
ret %struct.lconv* %1
}

LLVM IR (-O2):
%struct.lconv = type { i32 }
define %struct.lconv* @__aeabi_localeconv() {
%1 = tail call %struct.lconv* (...) @__localeconv()
ret %struct.lconv* %1
}
/* Variables and functions */
float cosf(float);
float HMM_CosF(float Radians) {
  ;
  float Result = cosf(Radians);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_CosF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cosf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_CosF>:
jmp    1030 <cosf@plt>

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

LLVM IR (-O2):
define float @HMM_CosF(float %0) {
%2 = tail call float @cosf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ turnOnLed(int);
void turnOnLight1(void) { turnOnLed(3); }


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

x86 assembly (clang, -O2):
<turnOnLight1>:
mov    $0x3,%edi
jmp    1030 <turnOnLed@plt>

LLVM IR (-O0):
define void @turnOnLight1() {
%1 = call i32 @turnOnLed(i32 3)
ret void
}

LLVM IR (-O2):
define void @turnOnLight1() {
%1 = tail call i32 @turnOnLed(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ llvm_gc_collect();
void __tiger__gc_collect(void) { llvm_gc_collect(); }


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

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

LLVM IR (-O0):
define void @__tiger__gc_collect() {
%1 = call i32 (...) @llvm_gc_collect()
ret void
}

LLVM IR (-O2):
define void @__tiger__gc_collect() {
%1 = tail call i32 (...) @llvm_gc_collect()
ret void
}
/* Variables and functions */
double pow(double, double);
double NT(double NT) {
  if (NT > 100) {
    return 1;
  } else {
    double Q4, A = 98.96, B = -0.2232, C = -0.006457;
    Q4 = A * pow(NT, (B + (C * NT)));
    return Q4;
  }
}


x86 assembly (clang, -O0):
<NT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1146 <NT+0x36>
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11b3 <NT+0xa3>
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NT>:
push   %rax
ucomisd 0xeef(%rip),%xmm0
jbe    1125 <NT+0x15>
movsd  0xedd(%rip),%xmm0
pop    %rax
ret
movsd  0xee3(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedf(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @NT(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
%8 = load double, double* %3
%9 = fcmp ogt double %8, 1.000000e+02
br i1 %9, label %10, label %11
10: ; preds = %1
store double 1.000000e+00, double* %2
br label %21
11: ; preds = %1
store double 0x4058BD70A3D70A3D, double* %5
store double -2.232000e-01, double* %6
store double -6.457000e-03, double* %7
%12 = load double, double* %5
%13 = load double, double* %3
%14 = load double, double* %6
%15 = load double, double* %7
%16 = load double, double* %3
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double %14)
%18 = call double @pow(double %13, double %17)
%19 = fmul double %12, %18
store double %19, double* %4
%20 = load double, double* %4
store double %20, double* %2
br label %21
21: ; preds = %11, %10
%22 = load double, double* %2
ret double %22
}

LLVM IR (-O2):
define double @NT(double %0) {
%2 = fcmp ogt double %0, 1.000000e+02
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double -6.457000e-03, double -2.232000e-01)
%5 = tail call double @pow(double %0, double %4)
%6 = fmul double %5, 0x4058BD70A3D70A3D
br label %7
7: ; preds = %1, %3
%8 = phi double [ %6, %3 ], [ 1.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ add_defaults(int);
int /*<<< orphan*/ reset_all_list();
void ft_reset(int in_x) {
  reset_all_list();
  add_defaults(in_x);
}


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

x86 assembly (clang, -O2):
<ft_reset>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <reset_all_list@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <add_defaults@plt>

LLVM IR (-O0):
define void @ft_reset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @reset_all_list()
%4 = load i32, i32* %2
%5 = call i32 @add_defaults(i32 %4)
ret void
}

LLVM IR (-O2):
define void @ft_reset(i32 %0) {
%2 = tail call i32 (...) @reset_all_list()
%3 = tail call i32 @add_defaults(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ match(char);
void labels() { match('l'); }


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

x86 assembly (clang, -O2):
<labels>:
mov    $0x6c,%edi
jmp    1030 <match@plt>

LLVM IR (-O0):
define void @labels() {
%1 = call i32 @match(i8 signext 108)
ret void
}

LLVM IR (-O2):
define void @labels() {
%1 = tail call i32 @match(i8 signext 108)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unsetenv(char const *);
void UTILS_unsetenv(const char *name) { unsetenv(name); }


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

x86 assembly (clang, -O2):
<UTILS_unsetenv>:
jmp    1030 <unsetenv@plt>

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

LLVM IR (-O2):
define void @UTILS_unsetenv(i8* nocapture %0) {
%2 = tail call i32 @unsetenv(i8* %0)
ret void
}
/* Variables and functions */
double fmax(int /*<<< orphan*/, int);
int /*<<< orphan*/ fmin(double, double);
double log(double);
double logloss(double p, double y) {
  double q = fmax(fmin(p, (1.0 - 1e-15)), 1e-15);
  return y == 1.0 ? -log(q) : -log(1.0 - q);
}


x86 assembly (clang, -O0):
<logloss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
call   1030 <fmin@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <fmax@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe91(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11aa <logloss+0x7a>
jp     11aa <logloss+0x7a>
movsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11d8 <logloss+0xa8>
movsd  0xe4e(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logloss>:
sub    $0x18,%rsp
movaps %xmm1,(%rsp)
movsd  0xec0(%rip),%xmm1
call   1030 <fmin@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <fmax@plt>
movsd  0xeb2(%rip),%xmm1
movapd (%rsp),%xmm2
cmpeqsd %xmm1,%xmm2
subsd  %xmm0,%xmm1
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
call   1050 <log@plt>
xorpd  0xe93(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @logloss(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call i32 @fmin(double %6, double 0x3FEFFFFFFFFFFFF7)
%8 = call double @fmax(i32 %7, i32 0)
store double %8, double* %5
%9 = load double, double* %4
%10 = fcmp oeq double %9, 1.000000e+00
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load double, double* %5
%13 = call double @log(double %12)
%14 = fneg double %13
br label %20
15: ; preds = %2
%16 = load double, double* %5
%17 = fsub double 1.000000e+00, %16
%18 = call double @log(double %17)
%19 = fneg double %18
br label %20
20: ; preds = %15, %11
%21 = phi double [ %14, %11 ], [ %19, %15 ]
ret double %21
}

LLVM IR (-O2):
define double @logloss(double %0, double %1) {
%3 = tail call i32 @fmin(double %0, double 0x3FEFFFFFFFFFFFF7)
%4 = tail call double @fmax(i32 %3, i32 0)
%5 = fcmp oeq double %1, 1.000000e+00
%6 = fsub double 1.000000e+00, %4
%7 = select i1 %5, double %4, double %6
%8 = tail call double @log(double %7)
%9 = fneg double %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x91() {
  Assert_real((iscntrl(145) == 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_iscntrl.c",
              730, ("iscntrl should be 0 for 0x91"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x91>:
push   %rax
mov    $0x91,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2da,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x91\00"
define void @t_iscntrl_0x91() {
%1 = call i64 @iscntrl(i32 145)
%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 730, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x91\00"
define void @t_iscntrl_0x91() {
%1 = tail call i64 @iscntrl(i32 145)
%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 730, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void load_settings(void) {}


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

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

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

LLVM IR (-O2):
define void @load_settings() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_edges();
int /*<<< orphan*/ get_n_m();
int /*<<< orphan*/ get_q();
int /*<<< orphan*/ get_tears();
int /*<<< orphan*/ make_set();
int /*<<< orphan*/ output_count();
int /*<<< orphan*/ reverse_add_edges();
int /*<<< orphan*/ setup_graph();
int main() {
  get_n_m();
  get_edges();
  get_q();
  get_tears();
  make_set();
  setup_graph();
  reverse_add_edges();
  output_count();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <get_n_m@plt>
mov    $0x0,%al
call   1060 <get_edges@plt>
mov    $0x0,%al
call   1090 <get_q@plt>
mov    $0x0,%al
call   10a0 <get_tears@plt>
mov    $0x0,%al
call   1080 <make_set@plt>
mov    $0x0,%al
call   1040 <setup_graph@plt>
mov    $0x0,%al
call   1030 <reverse_add_edges@plt>
mov    $0x0,%al
call   1070 <output_count@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <get_n_m@plt>
xor    %eax,%eax
call   1060 <get_edges@plt>
xor    %eax,%eax
call   1090 <get_q@plt>
xor    %eax,%eax
call   10a0 <get_tears@plt>
xor    %eax,%eax
call   1080 <make_set@plt>
xor    %eax,%eax
call   1040 <setup_graph@plt>
xor    %eax,%eax
call   1030 <reverse_add_edges@plt>
xor    %eax,%eax
call   1070 <output_count@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @get_n_m()
%3 = call i32 (...) @get_edges()
%4 = call i32 (...) @get_q()
%5 = call i32 (...) @get_tears()
%6 = call i32 (...) @make_set()
%7 = call i32 (...) @setup_graph()
%8 = call i32 (...) @reverse_add_edges()
%9 = call i32 (...) @output_count()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @get_n_m()
%2 = tail call i32 (...) @get_edges()
%3 = tail call i32 (...) @get_q()
%4 = tail call i32 (...) @get_tears()
%5 = tail call i32 (...) @make_set()
%6 = tail call i32 (...) @setup_graph()
%7 = tail call i32 (...) @reverse_add_edges()
%8 = tail call i32 (...) @output_count()
ret i32 0
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct clause_list {
  int dummy;
};
struct Clause {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_get(struct genlist const *, int);
struct Clause *clause_list_get(const struct clause_list *tthis, int index) {
  return ((struct Clause *)genlist_get((const struct genlist *)tthis, index));
}


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

x86 assembly (clang, -O2):
<clause_list_get>:
jmp    1030 <genlist_get@plt>

LLVM IR (-O0):
%struct.Clause = type { i32 }
%struct.clause_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.Clause* @clause_list_get(%struct.clause_list* %0, i32 %1) {
%3 = alloca %struct.clause_list*
%4 = alloca i32
store %struct.clause_list* %0, %struct.clause_list** %3
store i32 %1, i32* %4
%5 = load %struct.clause_list*, %struct.clause_list** %3
%6 = bitcast %struct.clause_list* %5 to %struct.genlist*
%7 = load i32, i32* %4
%8 = call i64 @genlist_get(%struct.genlist* %6, i32 %7)
%9 = inttoptr i64 %8 to %struct.Clause*
ret %struct.Clause* %9
}

LLVM IR (-O2):
%struct.Clause = type { i32 }
%struct.clause_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.Clause* @clause_list_get(%struct.clause_list* %0, i32 %1) {
%3 = bitcast %struct.clause_list* %0 to %struct.genlist*
%4 = tail call i64 @genlist_get(%struct.genlist* %3, i32 %1)
%5 = inttoptr i64 %4 to %struct.Clause*
ret %struct.Clause* %5
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void frw_sleepUs(int us) { usleep(1000 * us); }


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

x86 assembly (clang, -O2):
<frw_sleepUs>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @frw_sleepUs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 1000, %3
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @frw_sleepUs(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
an(c) char c;
{ return ((alpha(c)) | (numeric(c))); }


x86 assembly (clang, -O0):
<an>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1040 <alpha@plt>
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <numeric@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<an>:
push   %rbp
push   %rbx
push   %rax
movsbl %dil,%ebx
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <alpha@plt>
mov    %eax,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <numeric@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @an(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @alpha to i32 (i32, ...)*)(i32 %5)
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = call i32 (i32, ...) bitcast (i32 (...)* @numeric to i32 (i32, ...)*)(i32 %8)
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @an(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @alpha to i32 (i32, ...)*)(i32 %3)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @numeric to i32 (i32, ...)*)(i32 %3)
%6 = or i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *progname) {
  printf(
      "Usage:  %s ./a.out DiscoveryIP DiscoveryPort ServerIP ServerPortNum\n",
      progname);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"Usage: %s ./a.out DiscoveryIP DiscoveryPort ServerIP ServerPortNum\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"Usage: %s ./a.out DiscoveryIP DiscoveryPort ServerIP ServerPortNum\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void d2i_ASN1_BMPSTRING(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_ASN1_BMPSTRING() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Bresenham(unsigned int, int, unsigned int, int);
void RemplirRectangle(unsigned int aX, unsigned int aY, unsigned int bX,
                      unsigned int bY) {
  int i;
  for (i = aY; i <= bY; i++) {
    Bresenham(aX, i, bX, i);
  }
}


x86 assembly (clang, -O0):
<RemplirRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
ja     1155 <RemplirRectangle+0x45>
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <Bresenham@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <RemplirRectangle+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemplirRectangle>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %ecx,%esi
ja     1146 <RemplirRectangle+0x36>
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %ebp,%ecx
call   1030 <Bresenham@plt>
add    $0x1,%ebp
cmp    %r15d,%ebp
jbe    1130 <RemplirRectangle+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @RemplirRectangle(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ugt i32 %1, %3
br i1 %5, label %11, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %1, %4 ]
%8 = tail call i32 @Bresenham(i32 %0, i32 %7, i32 %2, i32 %7)
%9 = add nsw i32 %7, 1
%10 = icmp ugt i32 %9, %3
br i1 %10, label %11, label %6
11: ; preds = %6, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void SHAMD5IntUnregister(uint32_t ui32Base) {
  ;
  IntDisable(164);
  IntUnregister(164);
}


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

x86 assembly (clang, -O2):
<SHAMD5IntUnregister>:
push   %rax
mov    $0xa4,%edi
call   1030 <IntDisable@plt>
mov    $0xa4,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @SHAMD5IntUnregister(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @IntDisable(i32 164)
%4 = call i32 @IntUnregister(i32 164)
ret void
}

LLVM IR (-O2):
define void @SHAMD5IntUnregister(i32 %0) {
%2 = tail call i32 @IntDisable(i32 164)
%3 = tail call i32 @IntUnregister(i32 164)
ret void
}
int ui_cmp(unsigned int a, unsigned int b) {
  if (a < b)
    return -1;
  else if (a > b)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<ui_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1122 <ui_cmp+0x22>
movl   $0xffffffff,-0x4(%rbp)
jmp    1141 <ui_cmp+0x41>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jbe    113a <ui_cmp+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <ui_cmp+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ui_cmp>:
xor    %ecx,%ecx
cmp    %esi,%edi
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ui_cmp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp ult i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp ugt i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 1, i32* %3
br label %16
15: ; preds = %10
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @ui_cmp(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = icmp ugt i32 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Type definitions */
struct udphdr {
  scalar_t__ uh_sum;
  void *uh_ulen;
  void *uh_dport;
  void *uh_sport;
};

/* Variables and functions */
void *htons(int);
void setupUdpHeader(struct udphdr *udpH) {
  udpH->uh_sport = htons(1337);
  udpH->uh_dport = htons(53);
  udpH->uh_ulen = htons(sizeof(struct udphdr) + 200);
  udpH->uh_sum = 0;
}


x86 assembly (clang, -O0):
<setupUdpHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x539,%edi
call   1030 <htons@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    $0x35,%edi
call   1030 <htons@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    $0xe8,%edi
call   1030 <htons@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupUdpHeader>:
push   %rbx
mov    %rdi,%rbx
mov    $0x539,%edi
call   1030 <htons@plt>
mov    %rax,0x18(%rbx)
mov    $0x35,%edi
call   1030 <htons@plt>
mov    %rax,0x10(%rbx)
mov    $0xe8,%edi
call   1030 <htons@plt>
mov    %rax,0x8(%rbx)
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.udphdr = type { i64, i8*, i8*, i8* }
define void @setupUdpHeader(%struct.udphdr* %0) {
%2 = alloca %struct.udphdr*
store %struct.udphdr* %0, %struct.udphdr** %2
%3 = call i8* @htons(i32 1337)
%4 = load %struct.udphdr*, %struct.udphdr** %2
%5 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %4, i32 0, i32 3
store i8* %3, i8** %5
%6 = call i8* @htons(i32 53)
%7 = load %struct.udphdr*, %struct.udphdr** %2
%8 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %7, i32 0, i32 2
store i8* %6, i8** %8
%9 = call i8* @htons(i32 232)
%10 = load %struct.udphdr*, %struct.udphdr** %2
%11 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %10, i32 0, i32 1
store i8* %9, i8** %11
%12 = load %struct.udphdr*, %struct.udphdr** %2
%13 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %12, i32 0, i32 0
store i64 0, i64* %13
ret void
}

LLVM IR (-O2):
%struct.udphdr = type { i64, i8*, i8*, i8* }
define void @setupUdpHeader(%struct.udphdr* nocapture writeonly %0) {
%2 = tail call i8* @htons(i32 1337)
%3 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %0, i64 0, i32 3
store i8* %2, i8** %3
%4 = tail call i8* @htons(i32 53)
%5 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %0, i64 0, i32 2
store i8* %4, i8** %5
%6 = tail call i8* @htons(i32 232)
%7 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %0, i64 0, i32 1
store i8* %6, i8** %7
%8 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %0, i64 0, i32 0
store i64 0, i64* %8
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ filemodestring(struct stat const *, char *);
char *human_access(struct stat const *stat) {
  static char modebuf[12];
  filemodestring(stat, modebuf);
  modebuf[10] = 0;
  return modebuf;
}


x86 assembly (clang, -O0):
<human_access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f02(%rip),%rsi
call   1030 <filemodestring@plt>
movb   $0x0,0x2f00(%rip)
lea    0x2eef(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<human_access>:
push   %rbx
lea    0x2f11(%rip),%rbx
mov    %rbx,%rsi
call   1030 <filemodestring@plt>
movb   $0x0,0x2f0c(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@human_access.modebuf = internal global [12 x i8] zeroinitializer
define i8* @human_access(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = call i32 @filemodestring(%struct.stat* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @human_access.modebuf, i64 0, i64 0))
store i8 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @human_access.modebuf, i64 0, i64 10)
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @human_access.modebuf, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@human_access.modebuf = internal global [12 x i8] zeroinitializer
define i8* @human_access(%struct.stat* %0) {
%2 = tail call i32 @filemodestring(%struct.stat* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @human_access.modebuf, i64 0, i64 0))
store i8 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @human_access.modebuf, i64 0, i64 10)
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @human_access.modebuf, i64 0, i64 0)
}
void freeArray(char **strarr, int length) {
  int i;
  for (i = 0; i < length; i++) {
    free(strarr[i]);
  }
  free(strarr);
}


x86 assembly (clang, -O0):
<freeArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <freeArray+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freeArray+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeArray>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freeArray+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeArray+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeArray(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 = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
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
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
%20 = load i8**, i8*** %3
%21 = bitcast i8** %20 to i8*
ret void
}

LLVM IR (-O2):
define void @freeArray(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
int ft_isalnum(int c) {
  if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (c >= 48 && c <= 57))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     111b <ft_isalnum+0x1b>
cmpl   $0x5a,-0x8(%rbp)
jle    1143 <ft_isalnum+0x43>
cmpl   $0x61,-0x8(%rbp)
jl     112f <ft_isalnum+0x2f>
cmpl   $0x7a,-0x8(%rbp)
jle    1143 <ft_isalnum+0x43>
cmpl   $0x30,-0x8(%rbp)
jl     114f <ft_isalnum+0x4f>
cmpl   $0x39,-0x8(%rbp)
jg     114f <ft_isalnum+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <ft_isalnum+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %21, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 122
br i1 %14, label %21, label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 48
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp sle i32 %19, 57
br i1 %20, label %21, label %22
21: ; preds = %18, %12, %6
store i32 1, i32* %2
br label %23
22: ; preds = %18, %15
store i32 0, i32* %2
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, char const *, void *, size_t);
ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size) {
  return syscall(231, filedes, name, value, size);
}


x86 assembly (clang, -O0):
<fgetxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0xe7,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetxattr>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0xe7,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @fgetxattr(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @syscall(i32 231, i32 %9, i8* %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @fgetxattr(i32 %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @syscall(i32 231, i32 %0, i8* %1, i8* %2, i64 %3)
ret i32 %5
}
void test_func(void) {}


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

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

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

LLVM IR (-O2):
define void @test_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int ilog2(size_t val) {
  int i;
  assert(val != 0);
  assert(val <= ~(((size_t)-1) >> 1));
  for (i = -1; val; ++i)
    val >>= 1;
  return i;
}


x86 assembly (clang, -O0):
<ilog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movabs $0x8000000000000000,%rax
cmp    %rax,-0x8(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0xffffffff,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1175 <ilog2+0x65>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1150 <ilog2+0x40>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog2>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
movabs $0x8000000000000001,%rax
xor    %edi,%edi
cmp    %rax,%rbx
setb   %dil
call   1030 <assert@plt>
mov    $0xffffffff,%eax
test   %rbx,%rbx
je     115f <ilog2+0x4f>
mov    %rbx,%rcx
nopw   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%eax
cmp    $0x1,%rbx
mov    %rcx,%rbx
ja     1150 <ilog2+0x40>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ilog2(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i64, i64* %2
%9 = icmp ule i64 %8, -9223372036854775808
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
store i32 -1, i32* %3
br label %12
12: ; preds = %18, %1
%13 = load i64, i64* %2
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i64, i64* %2
%17 = lshr i64 %16, 1
store i64 %17, i64* %2
br label %18
18: ; preds = %15
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %12
21: ; preds = %12
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @ilog2(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = icmp ult i64 %0, -9223372036854775807
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = icmp eq i64 %0, 0
br i1 %8, label %15, label %9
9: ; preds = %1, %9
%10 = phi i32 [ %13, %9 ], [ -1, %1 ]
%11 = phi i64 [ %12, %9 ], [ %0, %1 ]
%12 = lshr i64 %11, 1
%13 = add nsw i32 %10, 1
%14 = icmp ult i64 %11, 2
br i1 %14, label %15, label %9
15: ; preds = %9, %1
%16 = phi i32 [ -1, %1 ], [ %13, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ KPP_DriverIRQHandler();
__attribute__((weak)) void KPP_IRQHandler(void) { KPP_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @KPP_IRQHandler() {
%1 = call i32 (...) @KPP_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @KPP_IRQHandler() {
%1 = tail call i32 (...) @KPP_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ USBDCD_DriverIRQHandler();
__attribute__((weak)) void USBDCD_IRQHandler(void) {
  USBDCD_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @USBDCD_IRQHandler() {
%1 = call i32 (...) @USBDCD_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @USBDCD_IRQHandler() {
%1 = tail call i32 (...) @USBDCD_DriverIRQHandler()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(int *, int, int, int /*<<< orphan*/ *);
int ntohl(int);
char svd_readBinFloat(FILE *file, float *val) {
  int x;
  float y;
  if (fread(&x, sizeof(int), 1, file) == 1) {
    x = ntohl(x);
    y = *((float *)&x);
    *val = y;
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<svd_readBinFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x1c(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    117b <svd_readBinFloat+0x5b>
mov    -0x1c(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movb   $0x0,-0x1(%rbp)
jmp    117f <svd_readBinFloat+0x5f>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svd_readBinFloat>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x1,%ecx
jne    1155 <svd_readBinFloat+0x35>
mov    0xc(%rsp),%edi
call   1040 <ntohl@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @svd_readBinFloat(i32* nocapture %0, float* nocapture writeonly %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @fread(i32* %3, i32 4, i32 1, i32* %0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %3
%9 = tail call i32 @ntohl(i32 %8)
%10 = bitcast float* %1 to i32*
store i32 %9, i32* %10
br label %11
11: ; preds = %2, %7
%12 = phi i8 [ 0, %7 ], [ 1, %2 ]
ret i8 %12
}
/* Variables and functions */
int /*<<< orphan*/ p1();
int /*<<< orphan*/ p2();
int main() {
  p1();
  p2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @p1()
%2 = tail call i32 (...) @p2()
ret i32 0
}