xunge/DecIR huggingface dataset:
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_p_cs_precedes(struct _Locale_monetary *lmon) { return CHAR_MAX; }


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

x86 assembly (clang, -O2):
<_Locale_p_cs_precedes>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_cs_precedes(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_p_cs_precedes(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
void INT_SVC_call(int r0, int r1, int r2, int r3) {}


x86 assembly (clang, -O0):
<INT_SVC_call>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @INT_SVC_call(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @INT_SVC_call(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aligned_free(void *);
void __ompc_task_firstprivates_free(void *firstprivates) {
  aligned_free(firstprivates);
}


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

x86 assembly (clang, -O2):
<__ompc_task_firstprivates_free>:
jmp    1030 <aligned_free@plt>

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

LLVM IR (-O2):
define void @__ompc_task_firstprivates_free(i8* %0) {
%2 = tail call i32 @aligned_free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_time_point(void *timePoint) { free(timePoint); }


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

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

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XSelectionClearEvent;

/* Variables and functions */
void *get_XSelectionClearEvent_display(void *_p) {
  return (void *)((XSelectionClearEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XSelectionClearEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XSelectionClearEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ for_each_row_output_each_field(char **);
int /*<<< orphan*/ get_header_array(char **);
int main(void) {
  char *header_array[1024 + 1];
  get_header_array(header_array);
  for_each_row_output_each_field(header_array);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2010,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2010(%rbp),%rdi
call   1030 <get_header_array@plt>
lea    -0x2010(%rbp),%rdi
call   1040 <for_each_row_output_each_field@plt>
xor    %eax,%eax
add    $0x2010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x2010,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <get_header_array@plt>
mov    %rbx,%rdi
call   1040 <for_each_row_output_each_field@plt>
xor    %eax,%eax
add    $0x2010,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1025 x i8*]
store i32 0, i32* %1
%3 = getelementptr inbounds [1025 x i8*], [1025 x i8*]* %2, i64 0, i64 0
%4 = call i32 @get_header_array(i8** %3)
%5 = getelementptr inbounds [1025 x i8*], [1025 x i8*]* %2, i64 0, i64 0
%6 = call i32 @for_each_row_output_each_field(i8** %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1025 x i8*]
%2 = bitcast [1025 x i8*]* %1 to i8*
%3 = getelementptr inbounds [1025 x i8*], [1025 x i8*]* %1, i64 0, i64 0
%4 = call i32 @get_header_array(i8** %3)
%5 = call i32 @for_each_row_output_each_field(i8** %3)
ret i32 0
}
/* Variables and functions */
int end_interval(int, int, int);
int pow2(int);
int next_interval(int count, int start, int max, int chosen) {
  if (count > 3)
    count = 3;
  return end_interval(count - 1, start, max) + chosen * pow2(count - 1);
}


x86 assembly (clang, -O0):
<next_interval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    1145 <next_interval+0x25>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <end_interval@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <pow2@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_interval>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edi,%ebp
cmp    $0x3,%edi
mov    $0x3,%eax
cmovge %eax,%ebp
add    $0xffffffff,%ebp
mov    %ebp,%edi
call   1040 <end_interval@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <pow2@plt>
imul   %r14d,%eax
add    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @next_interval(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %0, 3
%6 = select i1 %5, i32 %0, i32 3
%7 = add nsw i32 %6, -1
%8 = tail call i32 @end_interval(i32 %7, i32 %1, i32 %2)
%9 = tail call i32 @pow2(i32 %7)
%10 = mul nsw i32 %9, %3
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ print_row(char *, int const, float const *,
                             int /*<<< orphan*/);
void print_obj(const int n, const float *lp) { print_row("obj: ", n, lp, 0); }


x86 assembly (clang, -O0):
<print_obj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rdi
xor    %ecx,%ecx
call   1030 <print_row@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_obj>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
xor    %ecx,%ecx
jmp    1030 <print_row@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"obj: \00"
define void @print_obj(i32 %0, float* %1) {
%3 = alloca i32
%4 = alloca float*
store i32 %0, i32* %3
store float* %1, float** %4
%5 = load i32, i32* %3
%6 = load float*, float** %4
%7 = call i32 @print_row(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5, float* %6, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"obj: \00"
define void @print_obj(i32 %0, float* %1) {
%3 = tail call i32 @print_row(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0, float* %1, i32 0)
ret void
}
/* Variables and functions */
int execvp(char *, char **);
int /*<<< orphan*/ exit(int);
int fork();
int /*<<< orphan*/ wait(int *);
int run_ip_set(char *arg[]) {
  int ret = 0, pid;
  pid = fork();
  if (pid == 0) {
    ret = execvp("ip", arg);
    exit(ret);
  } else
    wait(&ret);
  return ret;
}


x86 assembly (clang, -O0):
<run_ip_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1182 <run_ip_set+0x42>
mov    -0x8(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <execvp@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>
lea    -0xc(%rbp),%rdi
call   1050 <wait@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_ip_set>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,0xc(%rsp)
xor    %eax,%eax
call   1060 <fork@plt>
test   %eax,%eax
je     116f <run_ip_set+0x2f>
lea    0xc(%rsp),%rdi
call   1050 <wait@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xe8a(%rip),%rdi
mov    %rbx,%rsi
call   1030 <execvp@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"ip\00"
define i32 @run_ip_set(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
%5 = call i32 (...) @fork()
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8**, i8*** %2
%10 = call i32 @execvp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = call i32 @wait(i32* %3)
br label %15
15: ; preds = %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"ip\00"
define i32 @run_ip_set(i8** %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = tail call i32 (...) @fork()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @execvp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %0)
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = call i32 @wait(i32* %2)
%11 = load i32, i32* %2
ret i32 %11
}
double CubicEaseOut(double p) {
  double f = (p - 1);
  return f * f * f + 1;
}


x86 assembly (clang, -O0):
<CubicEaseOut>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CubicEaseOut>:
addsd  0xef8(%rip),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
addsd  0xeec(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @CubicEaseOut(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = fmul double %2, %2
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 1.000000e+00)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int cbmarch_untalk(int f) { return ioctl(f, _IO(0xcb, 2)); }


x86 assembly (clang, -O0):
<cbmarch_untalk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xcb,%edi
mov    $0x2,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_untalk>:
push   %rbx
mov    %edi,%ebx
mov    $0xcb,%edi
mov    $0x2,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @cbmarch_untalk(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 203, i32 2)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cbmarch_untalk(i32 %0) {
%2 = tail call i32 @_IO(i32 203, i32 2)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap32(int /*<<< orphan*/);
void cpu_to_be32s(uint32_t *p) { *p = bswap32(*p); }


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

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

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

LLVM IR (-O2):
define void @cpu_to_be32s(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @bswap32(i32 %2)
store i32 %3, i32* %0
ret void
}
int fn1(int n) {
  if (n == 1)
    return -1;
  else if (n == 2)
    return 0;
  else if (n == 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <fn1+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <fn1+0x5a>
cmpl   $0x2,-0x8(%rbp)
jne    1133 <fn1+0x33>
movl   $0x0,-0x4(%rbp)
jmp    115a <fn1+0x5a>
cmpl   $0x1,-0x8(%rbp)
jne    1149 <fn1+0x49>
movl   $0x1,-0x4(%rbp)
jmp    115a <fn1+0x5a>
jmp    114e <fn1+0x4e>
jmp    1153 <fn1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = sext i1 %2 to i32
ret i32 %3
}
void lcm_resume_power(void) {}


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

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

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

LLVM IR (-O2):
define void @lcm_resume_power() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x7c() {
  Assert_real((isodigit(124) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              625, ("isodigit should be 0 for |"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x7c>:
push   %rax
mov    $0x7c,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x271,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for |\00"
define void @t_isodigit_0x7c() {
%1 = call i64 @isodigit(i32 124)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for |\00"
define void @t_isodigit_0x7c() {
%1 = tail call i64 @isodigit(i32 124)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void X509_STORE_set_default_paths(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_STORE_set_default_paths() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int max_maps;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_max_maps(void *_p, int _v) {
  ((Screen *)_p)->max_maps = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_Screen_max_maps>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_Screen_max_maps(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
IR0I1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (*p0) = 33; }


x86 assembly (clang, -O0):
<IR0I1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x21,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0I1>:
movb   $0x21,(%r8)
ret

LLVM IR (-O0):
define i32 @IR0I1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %12
store i8 33, i8* %16
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @IR0I1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4, i8* nocapture readnone %5) {
store i8 33, i8* %4
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ rxml_log_document(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "Usage: %s <path>\n", argv[0]);
    return 1;
  }
  rxml_log_document(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1168 <main+0x48>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1175 <main+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <rxml_log_document@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <rxml_log_document@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s <path>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 1, i32* %3
br label %19
14: ; preds = %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @rxml_log_document(i8* %17)
br label %19
19: ; preds = %14, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Usage: %s <path>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %12
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @rxml_log_document(i8* %10)
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ 1, %4 ], [ 0, %8 ]
ret i32 %13
}
/* Variables and functions */
double meddev_double(int, double *);
double meddev(int n, double *data) { return meddev_double(n, data); }


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

x86 assembly (clang, -O2):
<meddev>:
jmp    1030 <meddev_double@plt>

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

LLVM IR (-O2):
define double @meddev(i32 %0, double* %1) {
%3 = tail call double @meddev_double(i32 %0, double* %1)
ret double %3
}
int search0b_calcld(int d) {
  int ld = 0;
  if (d < -1)
    for (ld = 30; d & (1 << ld); ld--)
      ;
  return ld;
}


x86 assembly (clang, -O0):
<search0b_calcld>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jge    1151 <search0b_calcld+0x51>
movl   $0x1e,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     114c <search0b_calcld+0x4c>
jmp    113e <search0b_calcld+0x3e>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <search0b_calcld+0x1f>
jmp    1151 <search0b_calcld+0x51>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search0b_calcld>:
xor    %eax,%eax
cmp    $0xfffffffe,%edi
jg     1118 <search0b_calcld+0x18>
mov    $0x1f,%eax
nopl   0x0(%rax)
add    $0xffffffff,%eax
bt     %eax,%edi
jb     1110 <search0b_calcld+0x10>
ret

LLVM IR (-O0):
define i32 @search0b_calcld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, -1
br i1 %5, label %6, label %18
6: ; preds = %1
store i32 30, i32* %3
br label %7
7: ; preds = %14, %6
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = shl i32 1, %9
%11 = and i32 %8, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %7
br label %14
14: ; preds = %13
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %7
17: ; preds = %7
br label %18
18: ; preds = %17, %1
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @search0b_calcld(i32 %0) {
%2 = icmp slt i32 %0, -1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 30, %1 ]
%5 = shl nuw i32 1, %4
%6 = and i32 %5, %0
%7 = icmp eq i32 %6, 0
%8 = add nsw i32 %4, -1
br i1 %7, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %4, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void flush_work() { usleep(10000); }


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

x86 assembly (clang, -O2):
<flush_work>:
mov    $0x2710,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @flush_work() {
%1 = call i32 @usleep(i32 10000)
ret void
}

LLVM IR (-O2):
define void @flush_work() {
%1 = tail call i32 @usleep(i32 10000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void die_too_small(void) { die(("Window size is too small for nano...\n")); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Window size is too small for nano...\0A\00"
define void @die_too_small() {
%1 = call i32 @die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Window size is too small for nano...\0A\00"
define void @die_too_small() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
unsigned long get_XConfigureEvent_window(void *_p) {
  return (unsigned long)((XConfigureEvent *)_p)->window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XConfigureEvent_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XConfigureEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void menu_open_submenu() {}


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

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

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

LLVM IR (-O2):
define void @menu_open_submenu() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void my_exit1(void) {
  fprintf(stderr, "I entered the first destructor function \n");
}


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

x86 assembly (clang, -O2):
<my_exit1>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"I entered the first destructor function \0A\00"
define void @my_exit1() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"I entered the first destructor function \0A\00"
define void @my_exit1() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float acosf(float);
float __ocl_acos_float(float src) { return acosf(src); }


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

x86 assembly (clang, -O2):
<__ocl_acos_float>:
jmp    1030 <acosf@plt>

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

LLVM IR (-O2):
define float @__ocl_acos_float(float %0) {
%2 = tail call float @acosf(float %0)
ret float %2
}
void foo_2_2_1_2_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_1_1_2_2_2() {
ret void
}
int exact_square(int number) {
  int root = number;
  if (number > 1)
    while (root * root > number)
      root--;
  if (root * root == number)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    113f <exact_square+0x3f>
jmp    111c <exact_square+0x1c>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    113a <exact_square+0x3a>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111c <exact_square+0x1c>
jmp    113f <exact_square+0x3f>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    115b <exact_square+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <exact_square+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
mov    %edi,%ecx
cmp    $0x2,%edi
jl     111f <exact_square+0x1f>
mov    %edi,%ecx
nopl   0x0(%rax)
mov    %ecx,%eax
imul   %ecx,%eax
add    $0xffffffff,%ecx
cmp    %edi,%eax
jg     1110 <exact_square+0x10>
add    $0x1,%ecx
imul   %ecx,%ecx
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = mul nsw i32 %4, %4
%6 = icmp sgt i32 %5, %0
%7 = add nsw i32 %4, -1
br i1 %6, label %3, label %8
8: ; preds = %3, %1
%9 = phi i32 [ %0, %1 ], [ %4, %3 ]
%10 = mul nsw i32 %9, %9
%11 = icmp eq i32 %10, %0
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *_basename(const char *filename) {
  char *ptr;
  ptr = strrchr(filename, '/');
  if (ptr)
    return ptr + 1;
  else
    return filename;
}


x86 assembly (clang, -O0):
<_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <_basename+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <_basename+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 47)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %3
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ GenMMC1Power();
int /*<<< orphan*/ setchr8r(int /*<<< orphan*/, int /*<<< orphan*/);
void NWCPower(void) {
  GenMMC1Power();
  setchr8r(0, 0);
}


x86 assembly (clang, -O0):
<NWCPower>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GenMMC1Power@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <setchr8r@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<NWCPower>:
push   %rax
xor    %eax,%eax
call   1040 <GenMMC1Power@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <setchr8r@plt>

LLVM IR (-O0):
define void @NWCPower() {
%1 = call i32 (...) @GenMMC1Power()
%2 = call i32 @setchr8r(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @NWCPower() {
%1 = tail call i32 (...) @GenMMC1Power()
%2 = tail call i32 @setchr8r(i32 0, i32 0)
ret void
}
/* Variables and functions */
int EINVAL;
int ENOTSUP;
int errno;
int remove(const char *filename) {
  if (!filename) {
    errno = EINVAL;
    return (EINVAL);
  }
  errno = ENOTSUP;
  return (ENOTSUP);
}


x86 assembly (clang, -O0):
<remove>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <remove+0x36>
mov    0x2eb6(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb5(%rip),%rax
mov    %ecx,(%rax)
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <remove+0x54>
mov    0x2eab(%rip),%rax
mov    (%rax),%ecx
mov    0x2e92(%rip),%rax
mov    %ecx,(%rax)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove>:
test   %rdi,%rdi
jne    110e <remove+0xe>
mov    0x2ec4(%rip),%rax
jmp    1115 <remove+0x15>
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
mov    0x2eba(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
@ENOTSUP = global i32 0
define i32 @remove(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
%8 = load i32, i32* @EINVAL
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* @ENOTSUP
store i32 %10, i32* @errno
%11 = load i32, i32* @ENOTSUP
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@ENOTSUP = global i32 0
define i32 @remove(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = load i32, i32* @EINVAL
%4 = load i32, i32* @ENOTSUP
%5 = select i1 %2, i32 %3, i32 %4
store i32 %5, i32* @errno
ret i32 %5
}
XSetWindowBackground() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetWindowBackground() {
ret i32 undef
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print8int(int8_t value) { printf("%d", value); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @print8int(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int sys$adjwsl(signed int pagcnt, unsigned int *wsetlm) {
  return ({
    unsigned long resultvar;
    register long int _a2 asm("rsi") = (long)(wsetlm);
    register long int _a1 asm("rdi") = (long)(pagcnt);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(57), "r"(_a1), "r"(_a2)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$adjwsl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x39,%rax
int    $0x81
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$adjwsl>:
movslq %edi,%rdi
mov    $0x39,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$adjwsl"(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %3
store i32* %1, i32** %4
%9 = load i32*, i32** %4
%10 = ptrtoint i32* %9 to i64
store i64 %10, i64* %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
store i64 %12, i64* %7
%13 = load i64, i64* %7
%14 = load i64, i64* %6
%15 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},{rsi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 57, i64 %13, i64 %14)
store i64 %15, i64* %5
%16 = load i64, i64* %5
store i64 %16, i64* %8
%17 = load i64, i64* %8
%18 = trunc i64 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @"sys$adjwsl"(i32 %0, i32* %1) {
%3 = ptrtoint i32* %1 to i64
%4 = sext i32 %0 to i64
%5 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},{rsi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 57, i64 %4, i64 %3)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xbf() {
  Assert_real((isgraph(191) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              960, ("isgraph should be 0 for 0xbf"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xbf>:
push   %rax
mov    $0xbf,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c0,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xbf\00"
define void @t_isgraph_0xbf() {
%1 = call i64 @isgraph(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xbf\00"
define void @t_isgraph_0xbf() {
%1 = tail call i64 @isgraph(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int useconds_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
useconds_t ualarm(useconds_t value, useconds_t interval) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<ualarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ualarm>:
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 @ualarm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @ualarm(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
__attribute__((no, noclone)) void foo(unsigned long long t) {
  asm volatile("" : : "r"(&t));
  if (t == 1)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
cmpq   $0x1,-0x8(%rbp)
jne    1130 <foo+0x20>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rax
cmpq   $0x1,(%rsp)
je     1121 <foo+0x11>
pop    %rax
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define void @foo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @foo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int scanf(char *, int *, int *);
int main() {
  int a, b;
  int r;
  r = scanf("%d %d", &a, &b);
  while (1)
    ;
  a += r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <scanf@plt>
mov    %eax,-0x10(%rbp)
jmp    1136 <main+0x26>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1130 <main+0x20>

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
store i32 %5, i32* %4
br label %6
6: ; preds = %0, %6
br label %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
br label %6
6: ; preds = %6, %0
br label %6
}