xunge/DecIR huggingface dataset:
/* Variables and functions */
int call_me(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 10;
  printf("%d\n", call_me(i));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <call_me@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <call_me@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @call_me(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void function_empty_real_date_ini() { write("csv-task.csv", ",", NULL); }


x86 assembly (clang, -O0):
<function_empty_real_date_ini>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_real_date_ini>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_real_date_ini() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [2 x i8] c",\00"
define void @function_empty_real_date_ini() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int rand();
int rnum(int range) { return rand() % range; }


x86 assembly (clang, -O0):
<rnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnum>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rnum(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Type definitions */
struct stemmer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rr_free(struct stemmer *);
void free_stemmer(struct stemmer *z) { rr_free(z); }


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

x86 assembly (clang, -O2):
<free_stemmer>:
jmp    1030 <rr_free@plt>

LLVM IR (-O0):
%struct.stemmer = type { i32 }
define void @free_stemmer(%struct.stemmer* %0) {
%2 = alloca %struct.stemmer*
store %struct.stemmer* %0, %struct.stemmer** %2
%3 = load %struct.stemmer*, %struct.stemmer** %2
%4 = call i32 @rr_free(%struct.stemmer* %3)
ret void
}

LLVM IR (-O2):
%struct.stemmer = type { i32 }
define void @free_stemmer(%struct.stemmer* %0) {
%2 = tail call i32 @rr_free(%struct.stemmer* %0)
ret void
}
int main() {
  signed long long int li;
  signed char c;
  li = 0;
  c = 0x01;
  li = c;
  li = 0;
  c = 0xFF;
  li = c;
  li = 0;
  c = 0x80;
  li = c;
  li = 0;
  c = 0x7F;
  li = c;
  li = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x1,-0x11(%rbp)
movsbq -0x11(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0xff,-0x11(%rbp)
movsbq -0x11(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x80,-0x11(%rbp)
movsbq -0x11(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
movb   $0x7f,-0x11(%rbp)
movsbq -0x11(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8
store i32 0, i32* %1
store i64 0, i64* %2
store i8 1, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i64
store i64 %5, i64* %2
store i64 0, i64* %2
store i8 -1, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i64
store i64 %7, i64* %2
store i64 0, i64* %2
store i8 -128, i8* %3
%8 = load i8, i8* %3
%9 = sext i8 %8 to i64
store i64 %9, i64* %2
store i64 0, i64* %2
store i8 127, i8* %3
%10 = load i8, i8* %3
%11 = sext i8 %10 to i64
store i64 %11, i64* %2
store i64 0, i64* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct ovs_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_insert(struct ovs_list *, struct ovs_list *);
void list_push_back(struct ovs_list *list, struct ovs_list *elem) {
  list_insert(list, elem);
}


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

x86 assembly (clang, -O2):
<list_push_back>:
jmp    1030 <list_insert@plt>

LLVM IR (-O0):
%struct.ovs_list = type { i32 }
define void @list_push_back(%struct.ovs_list* %0, %struct.ovs_list* %1) {
%3 = alloca %struct.ovs_list*
%4 = alloca %struct.ovs_list*
store %struct.ovs_list* %0, %struct.ovs_list** %3
store %struct.ovs_list* %1, %struct.ovs_list** %4
%5 = load %struct.ovs_list*, %struct.ovs_list** %3
%6 = load %struct.ovs_list*, %struct.ovs_list** %4
%7 = call i32 @list_insert(%struct.ovs_list* %5, %struct.ovs_list* %6)
ret void
}

LLVM IR (-O2):
%struct.ovs_list = type { i32 }
define void @list_push_back(%struct.ovs_list* %0, %struct.ovs_list* %1) {
%3 = tail call i32 @list_insert(%struct.ovs_list* %0, %struct.ovs_list* %1)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ write(int, void *, size_t);
int ft_putmemchar_fd(void *ptr, size_t n, int fd) {
  if (write(fd, ptr, n) < 0)
    return (EXIT_FAILURE);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<ft_putmemchar_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
cmp    $0x0,%rax
jge    114e <ft_putmemchar_fd+0x3e>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <ft_putmemchar_fd+0x4a>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putmemchar_fd>:
push   %rax
mov    %edx,%eax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %eax,%edi
call   1030 <write@plt>
test   %rax,%rax
jns    112e <ft_putmemchar_fd+0x1e>
mov    0x2eb4(%rip),%rax
jmp    1135 <ft_putmemchar_fd+0x25>
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @ft_putmemchar_fd(i8* %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i64 @write(i32 %8, i8* %9, i64 %10)
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i32, i32* @EXIT_FAILURE
store i32 %14, i32* %4
br label %17
15: ; preds = %3
%16 = load i32, i32* @EXIT_SUCCESS
store i32 %16, i32* %4
br label %17
17: ; preds = %15, %13
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @ft_putmemchar_fd(i8* nocapture %0, i64 %1, i32 %2) {
%4 = tail call i64 @write(i32 %2, i8* %0, i64 %1)
%5 = icmp slt i64 %4, 0
%6 = load i32, i32* @EXIT_FAILURE
%7 = load i32, i32* @EXIT_SUCCESS
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
void SDHostCmdReset(unsigned long ulBase) {
  (*((volatile unsigned long *)(ulBase + 0x0000022C))) |= 1 << 25;
  while (((*((volatile unsigned long *)(ulBase + 0x0000022C))) & (1 << 25))) {
  }
}


x86 assembly (clang, -O0):
<SDHostCmdReset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x22c(%rax),%rcx
or     $0x2000000,%rcx
mov    %rcx,0x22c(%rax)
mov    -0x8(%rbp),%rax
mov    0x22c(%rax),%rax
and    $0x2000000,%rax
cmp    $0x0,%rax
je     1141 <SDHostCmdReset+0x41>
jmp    1121 <SDHostCmdReset+0x21>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDHostCmdReset>:
orq    $0x2000000,0x22c(%rdi)
nopl   0x0(%rax,%rax,1)
testq  $0x2000000,0x22c(%rdi)
jne    1110 <SDHostCmdReset+0x10>
ret

LLVM IR (-O0):
define void @SDHostCmdReset(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 556
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 33554432
store volatile i64 %7, i64* %5
br label %8
8: ; preds = %15, %1
%9 = load i64, i64* %2
%10 = add i64 %9, 556
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, 33554432
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %8
br label %8
16: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @SDHostCmdReset(i64 %0) {
%2 = add i64 %0, 556
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 33554432
store volatile i64 %5, i64* %3
br label %6
6: ; preds = %6, %1
%7 = load volatile i64, i64* %3
%8 = and i64 %7, 33554432
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %6
10: ; preds = %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bgnpolygon();
void bgnpolygon_() { bgnpolygon(); }


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

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

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

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

/* Variables and functions */
int atomic_cas_u32(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/);
bool atomic_cas_ptr(void **ptr, void **expectedCurrentValue,
                    void *desiredValue) {
  return atomic_cas_u32((uint32_t *)ptr, (uint32_t *)expectedCurrentValue,
                        (uint32_t)desiredValue);
}


x86 assembly (clang, -O0):
<atomic_cas_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
call   1030 <atomic_cas_u32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_cas_ptr>:
jmp    1030 <atomic_cas_u32@plt>

LLVM IR (-O0):
define i32 @atomic_cas_ptr(i8** %0, i8** %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i8*
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%7 = load i8**, i8*** %4
%8 = bitcast i8** %7 to i32*
%9 = load i8**, i8*** %5
%10 = bitcast i8** %9 to i32*
%11 = load i8*, i8** %6
%12 = ptrtoint i8* %11 to i32
%13 = call i32 @atomic_cas_u32(i32* %8, i32* %10, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @atomic_cas_ptr(i8** %0, i8** %1, i8* %2) {
%4 = bitcast i8** %0 to i32*
%5 = bitcast i8** %1 to i32*
%6 = ptrtoint i8* %2 to i64
%7 = trunc i64 %6 to i32
%8 = tail call i32 @atomic_cas_u32(i32* %4, i32* %5, i32 %7)
ret i32 %8
}
void setTTL(unsigned char *pdata, short i) {
  *(pdata + 22) = (unsigned char)((i >> 0) & 0xff);
}


x86 assembly (clang, -O0):
<setTTL>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x16(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setTTL>:
mov    %sil,0x16(%rdi)
ret

LLVM IR (-O0):
define void @setTTL(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = ashr i32 %6, 0
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 22
store i8 %9, i8* %11
ret void
}

LLVM IR (-O2):
define void @setTTL(i8* nocapture writeonly %0, i16 signext %1) {
%3 = trunc i16 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 22
store i8 %3, i8* %4
ret void
}
void a_Dpi_init(void) {}


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

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

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

LLVM IR (-O2):
define void @a_Dpi_init() {
ret void
}
/* Variables and functions */
double f(double *x, size_t xlen) { return x[0] * x[0] + x[1] * x[1] + 100; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xec2(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  0xee3(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
store double* %0, double** %3
store i64 %1, i64* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %3
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = fadd double %18, 1.000000e+02
ret double %19
}

LLVM IR (-O2):
define double @f(double* nocapture %0, i64 %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = fmul double %5, %5
%7 = tail call double @llvm.fmuladd.f64(double %3, double %3, double %6)
%8 = fadd double %7, 1.000000e+02
ret double %8
}
void cat(int a[3]) {}


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

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

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

LLVM IR (-O2):
define void @cat(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rec2();
int /*<<< orphan*/ rec3();
void rec4(void) {
  rec2();
  rec3();
}


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

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

LLVM IR (-O0):
define void @rec4() {
%1 = call i32 (...) @rec2()
%2 = call i32 (...) @rec3()
ret void
}

LLVM IR (-O2):
define void @rec4() {
%1 = tail call i32 (...) @rec2()
%2 = tail call i32 (...) @rec3()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayTitleScreen(void *);
void *threadFunc(void *window) {
  displayTitleScreen(window);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @threadFunc(i8* %0) {
%2 = tail call i32 @displayTitleScreen(i8* %0)
ret i8* null
}
void XkbChangeTypesOfKey() {}


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

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

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

LLVM IR (-O2):
define void @XkbChangeTypesOfKey() {
ret void
}
char interval_add(char a, char x, char range_min, char range_max) {
  return ((a - range_min + x) % (range_max - range_min + 1)) + range_min;
}


x86 assembly (clang, -O0):
<interval_add>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x3(%rbp),%ecx
sub    %ecx,%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
movsbl -0x4(%rbp),%ecx
movsbl -0x3(%rbp),%edx
sub    %edx,%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
movsbl -0x3(%rbp),%eax
add    %eax,%edx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<interval_add>:
mov    %edx,%r8d
lea    (%rdi,%rsi,1),%eax
sub    %edx,%eax
sub    %edx,%ecx
add    $0x1,%ecx
cwtd
idiv   %cx
lea    (%r8,%rdx,1),%eax
ret

LLVM IR (-O0):
define signext i8 @interval_add(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = load i8, i8* %7
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %10, %12
%14 = load i8, i8* %6
%15 = sext i8 %14 to i32
%16 = add nsw i32 %13, %15
%17 = load i8, i8* %8
%18 = sext i8 %17 to i32
%19 = load i8, i8* %7
%20 = sext i8 %19 to i32
%21 = sub nsw i32 %18, %20
%22 = add nsw i32 %21, 1
%23 = srem i32 %16, %22
%24 = load i8, i8* %7
%25 = sext i8 %24 to i32
%26 = add nsw i32 %23, %25
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define signext i8 @interval_add(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3) {
%5 = sext i8 %0 to i32
%6 = sext i8 %2 to i32
%7 = sext i8 %1 to i32
%8 = add nsw i32 %7, %5
%9 = sub nsw i32 %8, %6
%10 = sext i8 %3 to i32
%11 = sub nsw i32 %10, %6
%12 = trunc i32 %9 to i16
%13 = trunc i32 %11 to i16
%14 = add nsw i16 %13, 1
%15 = srem i16 %12, %14
%16 = trunc i16 %15 to i8
%17 = add i8 %16, %2
ret i8 %17
}
/* Variables and functions */
int /*<<< orphan*/ gpio_config(int, int, int);
void led_init(void) {
  gpio_config(9, 10, (1));
  gpio_config(0, 20, (1));
}


x86 assembly (clang, -O0):
<led_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
mov    $0xa,%esi
mov    $0x1,%edx
call   1030 <gpio_config@plt>
xor    %edi,%edi
mov    $0x14,%esi
mov    $0x1,%edx
call   1030 <gpio_config@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_init>:
push   %rax
mov    $0x9,%edi
mov    $0xa,%esi
mov    $0x1,%edx
call   1030 <gpio_config@plt>
xor    %edi,%edi
mov    $0x14,%esi
mov    $0x1,%edx
pop    %rax
jmp    1030 <gpio_config@plt>

LLVM IR (-O0):
define void @led_init() {
%1 = call i32 @gpio_config(i32 9, i32 10, i32 1)
%2 = call i32 @gpio_config(i32 0, i32 20, i32 1)
ret void
}

LLVM IR (-O2):
define void @led_init() {
%1 = tail call i32 @gpio_config(i32 9, i32 10, i32 1)
%2 = tail call i32 @gpio_config(i32 0, i32 20, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_INTEGER;

/* Variables and functions */
int /*<<< orphan*/ ASN1_INTEGER_it;
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_INTEGER_it);
}


x86 assembly (clang, -O0):
<i2d_ASN1_INTEGER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_ASN1_INTEGER>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@ASN1_INTEGER_it = global i32 0
define i32 @i2d_ASN1_INTEGER(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @ASN1_INTEGER_it)
ret i32 %3
}
int test_imm_88uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x88 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_88uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 584115552256
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c, nl;
  nl = 0;
  while ((c = getchar()) != EOF)
    if (c == '\n')
      nl++;
  printf("%d\n", nl);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
double frexp(double x, int *expo) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  (void)(expo);
  return 0;
}


x86 assembly (clang, -O0):
<frexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frexp>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.frexp = [6 x i8] c"frexp\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @frexp(double %0, i32* %1) {
%3 = alloca double
%4 = alloca i32*
store double %0, double* %3
store i32* %1, i32** %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.frexp, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load double, double* %3
%10 = load i32*, i32** %4
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.frexp = [6 x i8] c"frexp\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @frexp(double %0, i32* nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.frexp, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hola.\n");
  return EXIT_SUCCESS;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [6 x i8] c"Hola.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ err(int /*<<< orphan*/, char *);
int /*<<< orphan*/ errno;
int main(int argc, char *argv[]) {
  errno = ENOTSUP;
  err(EXIT_FAILURE, "Not yet implemented.");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea9(%rip),%rax
mov    %ecx,(%rax)
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1030 <err@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%eax
mov    0x2eb7(%rip),%rcx
mov    %eax,(%rcx)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <err@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
@errno = global i32 0
@EXIT_FAILURE = global i32 0
@.str = [21 x i8] c"Not yet implemented.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @ENOTSUP
store i32 %5, i32* @errno
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @err(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
@errno = global i32 0
@EXIT_FAILURE = global i32 0
@.str = [21 x i8] c"Not yet implemented.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @ENOTSUP
store i32 %3, i32* @errno
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @err(i32 %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xf3() {
  Assert_real((iscntrl(243) == 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",
              1220, ("iscntrl should be 0 for 0xf3"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xf3>:
push   %rax
mov    $0xf3,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c4,%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 0xf3\00"
define void @t_iscntrl_0xf3() {
%1 = call i64 @iscntrl(i32 243)
%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 1220, 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 0xf3\00"
define void @t_iscntrl_0xf3() {
%1 = tail call i64 @iscntrl(i32 243)
%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 1220, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void backwards_void(void) {}


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

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

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

LLVM IR (-O2):
define void @backwards_void() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_close(unsigned long);
void io_reap(unsigned long int recv) { file_close(recv); }


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

x86 assembly (clang, -O2):
<io_reap>:
jmp    1030 <file_close@plt>

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

LLVM IR (-O2):
define void @io_reap(i64 %0) {
%2 = tail call i32 @file_close(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned long pluscczextb(unsigned int a, unsigned int b) {
  unsigned int sum = a + b;
  if (sum < b)
    abort();
  return sum;
}


x86 assembly (clang, -O0):
<pluscczextb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    113a <pluscczextb+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pluscczextb>:
add    %esi,%edi
jb     1117 <pluscczextb+0x7>
mov    %edi,%eax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i64 @pluscczextb(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
ret i64 %16
}

LLVM IR (-O2):
define i64 @pluscczextb(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = icmp ult i32 %3, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = zext i32 %3 to i64
ret i64 %8
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ die(char *);
void *xcalloc(int nr, size_t size) {
  void *ret = calloc(nr, size);
  if (!ret)
    die("Out of memory, calloc failed");
  return ret;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1156 <xcalloc+0x36>
lea    0xeaf(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xcalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Out of memory, calloc failed\00"
define i8* @xcalloc(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8*
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i32 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [29 x i8] c"Out of memory, calloc failed\00"
define i8* @xcalloc(i32 %0, i64 %1) {
%3 = tail call i8* @calloc(i32 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
double T0(const double et) { return (et / 86400.0) / 36525.0; }


x86 assembly (clang, -O0):
<T0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<T0>:
divsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @T0(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 8.640000e+04
%5 = fdiv double %4, 3.652500e+04
ret double %5
}

LLVM IR (-O2):
define double @T0(double %0) {
%2 = fdiv double %0, 8.640000e+04
%3 = fdiv double %2, 3.652500e+04
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *av0) {
  fprintf(stderr, "usage: %s [-n samples] [-i bits] [-h] [-o outname] [-s]\n",
          av0);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"usage: %s [-n samples] [-i bits] [-h] [-o outname] [-s]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"usage: %s [-n samples] [-i bits] [-h] [-o outname] [-s]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ rotr64(int /*<<< orphan*/, int);
uint64_t bmw_large_r5(uint64_t x) {
  uint64_t r;
  r = rotr64(x, 64 - 37);
  return r;
}


x86 assembly (clang, -O0):
<bmw_large_r5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1b,%esi
call   1030 <rotr64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmw_large_r5>:
mov    $0x1b,%esi
jmp    1030 <rotr64@plt>

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

LLVM IR (-O2):
define i32 @bmw_large_r5(i32 %0) {
%2 = tail call i32 @rotr64(i32 %0, i32 27)
ret i32 %2
}
/* Variables and functions */
bool is_magical(int number) {
  number = number * 2;
  number += 10;
  for (int i = 1; i <= 6; i++) {
    if (number % i != 0) {
      return false;
    }
  }
  return true;
}


x86 assembly (clang, -O0):
<is_magical>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jg     1159 <is_magical+0x59>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
je     1146 <is_magical+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1160 <is_magical+0x60>
jmp    114b <is_magical+0x4b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <is_magical+0x20>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_magical>:
lea    (%rdi,%rdi,1),%eax
add    $0xa,%eax
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
mov    %eax,%edx
sub    %ecx,%edx
mov    %eax,%ecx
and    $0x2,%ecx
or     %edx,%ecx
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x21,%rdx
add    %esi,%edx
lea    (%rdx,%rdx,4),%edx
imul   $0xaaaaaaab,%eax,%esi
sub    %edx,%eax
or     %ecx,%eax
sete   %al
add    $0x2aaaaaaa,%esi
ror    %esi
cmp    $0x2aaaaaab,%esi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_magical(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %2, 10
%4 = srem i32 %3, 3
%5 = and i32 %3, 2
%6 = or i32 %4, %5
%7 = icmp eq i32 %6, 0
%8 = srem i32 %3, 5
%9 = icmp eq i32 %8, 0
%10 = select i1 %7, i1 %9, i1 false
%11 = srem i32 %3, 6
%12 = icmp eq i32 %11, 0
%13 = select i1 %10, i1 %12, i1 false
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xc7() {
  Assert_real((isxdigit(199) == 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_isxdigit.c",
              1000, ("isxdigit should be 0 for 0xc7"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc7\00"
define void @t_isxdigit_0xc7() {
%1 = call i64 @isxdigit(i32 199)
%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 1000, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc7\00"
define void @t_isxdigit_0xc7() {
%1 = tail call i64 @isxdigit(i32 199)
%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 1000, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void out_str(fmt, str) const char fmt[], str[];
{
  printf(fmt, str);
  out_line_count(fmt);
  out_line_count(str);
}


x86 assembly (clang, -O0):
<out_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <out_line_count@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <out_line_count@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <out_line_count@plt>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <out_line_count@plt>

LLVM IR (-O0):
define void @out_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, ...) @printf(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %10)
ret void
}

LLVM IR (-O2):
define void @out_str(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i8* %1)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %0)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @out_line_count to i32 (i8*, ...)*)(i8* %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  x = __VERIFIER_nondet_int();
  if (x > __VERIFIER_nondet_int()) {
    while (x != 0) {
      x = x - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jle    1165 <main+0x55>
jmp    1148 <main+0x38>
cmpl   $0x0,-0x8(%rbp)
je     1160 <main+0x50>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1148 <main+0x38>
jmp    1165 <main+0x55>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
%6 = icmp sgt i32 %4, %5
br i1 %6, label %7, label %15
7: ; preds = %0
br label %8
8: ; preds = %11, %7
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %2
br label %8
14: ; preds = %8
br label %15
15: ; preds = %14, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int do_070() { return 70; }


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

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

LLVM IR (-O0):
define i32 @do_070() {
ret i32 70
}

LLVM IR (-O2):
define i32 @do_070() {
ret i32 70
}