xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *newstr(char *s, int len) {
  char *rv = (char *)malloc(len + 1);
  rv[len] = '\0';
  strncpy(rv, s, len);
  return rv;
}


x86 assembly (clang, -O0):
<newstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newstr>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movslq %r15d,%rdx
movb   $0x0,(%rax,%rdx,1)
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @newstr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
store i8 0, i8* %13
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @strncpy(i8* %14, i8* %15, i32 %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @newstr(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %5, i64 %6
store i8 0, i8* %7
%8 = tail call i32 @strncpy(i8* %5, i8* %0, i32 %1)
ret i8* %5
}
/* Variables and functions */
scalar_t__ _inttypes(char *);
int main(int argc, char *argv[]) {
  (void)argc;
  return (_inttypes(argv[0]) == 0) ? 0 : 2;
}


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)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <_inttypes@plt>
mov    %rax,%rdx
mov    $0x2,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdi
call   1030 <_inttypes@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
add    %ecx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i64 @_inttypes(i8* %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 2
ret i32 %13
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @_inttypes(i8* %3)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 0, i32 2
ret i32 %6
}
/* Variables and functions */
char *strchr(char *, char);
void gen_swap_first(char **line, char target, char dest) {
  char *holder = NULL;
  holder = strchr(*line, target);
  if (holder != NULL)
    *holder = dest;
}


x86 assembly (clang, -O0):
<gen_swap_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1157 <gen_swap_first+0x47>
mov    -0xa(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_swap_first>:
push   %rbx
mov    %edx,%ebx
mov    (%rdi),%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     1122 <gen_swap_first+0x12>
mov    %bl,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @gen_swap_first(i8** nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8*, i8** %0
%5 = tail call i8* @strchr(i8* dereferenceable(1) %4, i8 signext %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %3
store i8 %2, i8* %5
br label %8
8: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *exec(void *t) {
  printf("Thread\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"Thread\0A\00"
define i8* @exec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@str = [7 x i8] c"Thread\00"
define noalias i8* @exec(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i8* null
}
/* Type definitions */
struct btdev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ del_btdev(struct btdev *);
int /*<<< orphan*/ free(struct btdev *);
void btdev_destroy(struct btdev *btdev) {
  if (!btdev)
    return;
  del_btdev(btdev);
  free(btdev);
}


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

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

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

LLVM IR (-O2):
%struct.btdev = type { i32 }
define void @btdev_destroy(%struct.btdev* %0) {
%2 = icmp eq %struct.btdev* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @del_btdev(%struct.btdev* %0)
%5 = tail call i32 @free(%struct.btdev* %0)
br label %6
6: ; preds = %1, %3
ret void
}
struct gmi_base *to_base(struct gmi_model *m) {
  return (struct gmi_base *)m;
}


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

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

LLVM IR (-O0):
%struct.gmi_base = type opaque
%struct.gmi_model = type opaque
define %struct.gmi_base* @to_base(%struct.gmi_model* %0) {
%2 = alloca %struct.gmi_model*
store %struct.gmi_model* %0, %struct.gmi_model** %2
%3 = load %struct.gmi_model*, %struct.gmi_model** %2
%4 = bitcast %struct.gmi_model* %3 to %struct.gmi_base*
ret %struct.gmi_base* %4
}

LLVM IR (-O2):
%struct.gmi_base = type opaque
%struct.gmi_model = type opaque
define %struct.gmi_base* @to_base(%struct.gmi_model* readnone %0) {
%2 = bitcast %struct.gmi_model* %0 to %struct.gmi_base*
ret %struct.gmi_base* %2
}
/* Variables and functions */
int /*<<< orphan*/ f1(unsigned int *);
void g1(unsigned int *x) { f1(x); }


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

x86 assembly (clang, -O2):
<g1>:
jmp    1030 <f1@plt>

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

LLVM IR (-O2):
define void @g1(i32* %0) {
%2 = tail call i32 @f1(i32* %0)
ret void
}
__attribute__((always_)) void early_memtest(unsigned long start,
                                            unsigned long end) {}


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

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

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

LLVM IR (-O2):
define void @early_memtest(i64 %0, i64 %1) {
ret void
}
float fastsqrt(float c) {}


x86 assembly (clang, -O0):
<fastsqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @fastsqrt(float %0) {
ret float undef
}
/* Type definitions */
struct sbst {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ find_insert_aux(struct sbst *, char *, size_t, char *,
                                   size_t, int, int);
void sbst_insert(struct sbst *tree, char *text, size_t text_size, int i) {
  (void)find_insert_aux(tree, text + i - 1, text_size - i + 1, text, text_size,
                        1, i);
}


x86 assembly (clang, -O0):
<sbst_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x1c(%rbp),%rax
add    %rax,%rsi
add    $0xffffffffffffffff,%rsi
mov    -0x18(%rbp),%rdx
movslq -0x1c(%rbp),%rax
sub    %rax,%rdx
add    $0x1,%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%eax
mov    $0x1,%r9d
mov    %eax,(%rsp)
call   1030 <find_insert_aux@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbst_insert>:
push   %rax
mov    %rdx,%r8
mov    %rsi,%rax
movslq %ecx,%rcx
add    %rcx,%rsi
add    $0xffffffffffffffff,%rsi
sub    %rcx,%rdx
add    $0x1,%rdx
mov    %ecx,(%rsp)
mov    %rax,%rcx
mov    $0x1,%r9d
call   1030 <find_insert_aux@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sbst = type { i32 }
define void @sbst_insert(%struct.sbst* %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca %struct.sbst*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store %struct.sbst* %0, %struct.sbst** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load %struct.sbst*, %struct.sbst** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = getelementptr inbounds i8, i8* %13, i64 -1
%15 = load i64, i64* %7
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = sub i64 %15, %17
%19 = add i64 %18, 1
%20 = load i8*, i8** %6
%21 = load i64, i64* %7
%22 = load i32, i32* %8
%23 = call i32 @find_insert_aux(%struct.sbst* %9, i8* %14, i64 %19, i8* %20, i64 %21, i32 1, i32 %22)
ret void
}

LLVM IR (-O2):
%struct.sbst = type { i32 }
define void @sbst_insert(%struct.sbst* %0, i8* %1, i64 %2, i32 %3) {
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = add i64 %2, 1
%9 = sub i64 %8, %5
%10 = tail call i32 @find_insert_aux(%struct.sbst* %0, i8* %7, i64 %9, i8* %1, i64 %2, i32 1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SetAudioVol302(unsigned long, unsigned long);
void setaudiovol(unsigned long id, unsigned long v) { SetAudioVol302(id, v); }


x86 assembly (clang, -O0):
<setaudiovol>:
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 <SetAudioVol302@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setaudiovol>:
jmp    1030 <SetAudioVol302@plt>

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

LLVM IR (-O2):
define void @setaudiovol(i64 %0, i64 %1) {
%3 = tail call i32 @SetAudioVol302(i64 %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  double debt;
  for (debt = 100; debt < 150.0; debt = debt * 1.1)
    printf("Your debt is now $%.2f.\n", debt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1167 <main+0x57>
movsd  -0x10(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  0xeb8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    112c <main+0x1c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf10(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xed8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xed0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xec8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xec0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Your debt is now $%.2f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 1.000000e+02, double* %2
br label %3
3: ; preds = %9, %0
%4 = load double, double* %2
%5 = fcmp olt double %4, 1.500000e+02
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load double, double* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %7)
br label %9
9: ; preds = %6
%10 = load double, double* %2
%11 = fmul double %10, 1.100000e+00
store double %11, double* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Your debt is now $%.2f.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 1.000000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 0x405B800000000001)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 0x405E400000000002)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 0x4060A33333333335)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 0x40624D1EB851EB88)
ret i32 0
}
/* Variables and functions */
size_t str_find(char const *, char const);
__attribute__((pure)) int str_contains(const char *restrict str, const char c) {
  return str ? (str[str_find(str, c)] == c) : 0;
}


x86 assembly (clang, -O0):
<str_contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1163 <str_contains+0x53>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <str_find@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
jmp    116d <str_contains+0x5d>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    116d <str_contains+0x5d>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_contains>:
test   %rdi,%rdi
je     1139 <str_contains+0x29>
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl %sil,%ebp
mov    %ebp,%esi
call   1030 <str_find@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %bpl,(%rbx,%rcx,1)
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @str_contains(i8* noalias %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = load i8, i8* %4
%11 = call i64 @str_find(i8* %9, i8 signext %10)
%12 = getelementptr inbounds i8, i8* %8, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %14, %16
%18 = zext i1 %17 to i32
br label %20
19: ; preds = %2
br label %20
20: ; preds = %19, %7
%21 = phi i32 [ %18, %7 ], [ 0, %19 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @str_contains(i8* noalias %0, i8 signext %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i64 @str_find(i8* %0, i8 signext %1)
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, %1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
void *realloc(void *ptr, size_t size) {
  void *__libc_realloc(void *ptr, size_t size);
  return __libc_realloc(ptr, size);
}


x86 assembly (clang, -O0):
<realloc>:
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 <__libc_realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realloc>:
jmp    1030 <__libc_realloc@plt>

LLVM IR (-O0):
define i8* @realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @__libc_realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @realloc(i8* %0, i64 %1) {
%3 = tail call i8* @__libc_realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ write_word_data(int, int, int /*<<< orphan*/);
void io_set_interrupt_on_bus(uint16_t value) {
  write_word_data(0x20, 0x04, value);
}


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

x86 assembly (clang, -O2):
<io_set_interrupt_on_bus>:
mov    %edi,%edx
mov    $0x20,%edi
mov    $0x4,%esi
jmp    1030 <write_word_data@plt>

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

LLVM IR (-O2):
define void @io_set_interrupt_on_bus(i32 %0) {
%2 = tail call i32 @write_word_data(i32 32, i32 4, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ strlcat(char *, char *, int);
int /*<<< orphan*/ strlcpy(char *, char *, int);
int main(void) {
  char a[12];
  strlcpy(a, "666", 3);
  strlcat(a, "6", sizeof(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x3,%edx
call   1040 <strlcpy@plt>
lea    -0x10(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0xc,%edx
call   1030 <strlcat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rsi
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%edx
call   1040 <strlcpy@plt>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
mov    $0xc,%edx
call   1030 <strlcat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"666\00"
@.str.1 = [2 x i8] c"6\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%4 = call i32 @strlcpy(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%6 = call i32 @strlcat(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 12)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"666\00"
@.str.1 = [2 x i8] c"6\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlcpy(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = call i32 @strlcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gsl_integration_function(int, int, double *);
void integral_gen(int nmin, int nmax, double vals[]) {
  gsl_integration_function(nmax, nmin, vals);
}


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

x86 assembly (clang, -O2):
<integral_gen>:
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <gsl_integration_function@plt>

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

LLVM IR (-O2):
define void @integral_gen(i32 %0, i32 %1, double* %2) {
%4 = tail call i32 @gsl_integration_function(i32 %1, i32 %0, double* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR58_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR58_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR58_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GL_ALPHA_TEST;
int /*<<< orphan*/ GL_GREATER;
int /*<<< orphan*/ glAlphaFunc(int /*<<< orphan*/, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
void afunc(void) {
  static int state;
  if (state ^= 1) {
    glAlphaFunc(GL_GREATER, .01);
    glEnable(GL_ALPHA_TEST);
  } else {
    glDisable(GL_ALPHA_TEST);
  }
}


x86 assembly (clang, -O0):
<afunc>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f02(%rip),%eax
xor    $0x1,%eax
mov    %eax,0x2ef9(%rip)
cmp    $0x0,%eax
je     1175 <afunc+0x45>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
movsd  0xea3(%rip),%xmm0
call   1040 <glAlphaFunc@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
jmp    1183 <afunc+0x53>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1050 <glDisable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<afunc>:
push   %rax
xorl   $0x1,0x2f04(%rip)
je     115f <afunc+0x2f>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
movsd  0xeb5(%rip),%xmm0
call   1040 <glAlphaFunc@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glEnable@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <glDisable@plt>

LLVM IR (-O0):
@afunc.state = internal global i32 0
@GL_GREATER = global i32 0
@GL_ALPHA_TEST = global i32 0
define void @afunc() {
%1 = load i32, i32* @afunc.state
%2 = xor i32 %1, 1
store i32 %2, i32* @afunc.state
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = load i32, i32* @GL_GREATER
%6 = call i32 @glAlphaFunc(i32 %5, double 1.000000e-02)
%7 = load i32, i32* @GL_ALPHA_TEST
%8 = call i32 @glEnable(i32 %7)
br label %12
9: ; preds = %0
%10 = load i32, i32* @GL_ALPHA_TEST
%11 = call i32 @glDisable(i32 %10)
br label %12
12: ; preds = %9, %4
ret void
}

LLVM IR (-O2):
@afunc.state = internal unnamed_addr global i32 0
@GL_GREATER = global i32 0
@GL_ALPHA_TEST = global i32 0
define void @afunc() {
%1 = load i32, i32* @afunc.state
%2 = xor i32 %1, 1
store i32 %2, i32* @afunc.state
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = load i32, i32* @GL_GREATER
%6 = tail call i32 @glAlphaFunc(i32 %5, double 1.000000e-02)
%7 = load i32, i32* @GL_ALPHA_TEST
%8 = tail call i32 @glEnable(i32 %7)
br label %12
9: ; preds = %0
%10 = load i32, i32* @GL_ALPHA_TEST
%11 = tail call i32 @glDisable(i32 %10)
br label %12
12: ; preds = %9, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putachar();
int main17() {
  putachar();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main17() {
%1 = call i32 (...) @putachar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main17() {
%1 = tail call i32 (...) @putachar()
ret i32 0
}
/* Variables and functions */
size_t hash_func(const void *key, size_t keylen) {
  return ((const char *)key)[0];
}


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

x86 assembly (clang, -O2):
<hash_func>:
movsbq (%rdi),%rax
ret

LLVM IR (-O0):
define i64 @hash_func(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i64
ret i64 %8
}

LLVM IR (-O2):
define i64 @hash_func(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i64
ret i64 %4
}
void blk_mq_debugfs_register_hctx(struct request_queue *q,
                                  struct blk_mq_hw_ctx *hctx) {}


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

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

LLVM IR (-O0):
%struct.request_queue = type opaque
%struct.blk_mq_hw_ctx = type opaque
define void @blk_mq_debugfs_register_hctx(%struct.request_queue* %0, %struct.blk_mq_hw_ctx* %1) {
%3 = alloca %struct.request_queue*
%4 = alloca %struct.blk_mq_hw_ctx*
store %struct.request_queue* %0, %struct.request_queue** %3
store %struct.blk_mq_hw_ctx* %1, %struct.blk_mq_hw_ctx** %4
ret void
}

LLVM IR (-O2):
%struct.request_queue = type opaque
%struct.blk_mq_hw_ctx = type opaque
define void @blk_mq_debugfs_register_hctx(%struct.request_queue* nocapture %0, %struct.blk_mq_hw_ctx* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR5D_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR5D_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR5D_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int main(void) {
  int x = 0;
  int y = 0;
  x + (y = 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0xc(%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 i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
store i32 1, i32* %3
%5 = add nsw i32 %4, 1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
f() {
  goto a;
a:;
}


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

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void smallsuccessp(char *mesg) { printf("\e[0;32m[s] %s\e[0m\n", mesg); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"\1B[0;32m[s] %s\1B[0m\0A\00"
define void @smallsuccessp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"\1B[0;32m[s] %s\1B[0m\0A\00"
define void @smallsuccessp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ wait3(int *, int /*<<< orphan*/, int /*<<< orphan*/);
void reapchild(int signo) {
  int status;
  while (wait3(&status, WNOHANG, 0) > 0)
    ;
}


x86 assembly (clang, -O0):
<reapchild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdi
xor    %edx,%edx
call   1030 <wait3@plt>
cmp    $0x0,%rax
jle    113e <reapchild+0x2e>
jmp    111b <reapchild+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reapchild>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <wait3@plt>
test   %rax,%rax
jg     1120 <reapchild+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @reapchild(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @wait3(i32* %3, i32 %5, i32 0)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @reapchild(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @wait3(i32* %2, i32 %5, i32 0)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x12() {
  Assert_real((isprint(18) == 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_isprint.c",
              95, ("isprint should be 0 for 0x12"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x12>:
push   %rax
mov    $0x12,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x5f,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x12\00"
define void @t_isprint_0x12() {
%1 = call i64 @isprint(i32 18)
%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 95, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x12\00"
define void @t_isprint_0x12() {
%1 = tail call i64 @isprint(i32 18)
%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 95, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
f(float a, double b) {
  _Static_assert(__builtin_types_compatible_p(__typeof(a + b), double), "?");
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(float %0, double %1) {
ret i32 undef
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ geteuid();
int has_file_permission(int /*<<< orphan*/, int, struct stat *);
int has_file_permission_curruser(int permission, struct stat *file_stat) {
  return has_file_permission(geteuid(), permission, file_stat);
}


x86 assembly (clang, -O0):
<has_file_permission_curruser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <geteuid@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <has_file_permission@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_file_permission_curruser>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <geteuid@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <has_file_permission@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @has_file_permission_curruser(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = call i32 (...) @geteuid()
%6 = load i32, i32* %3
%7 = load %struct.stat*, %struct.stat** %4
%8 = call i32 @has_file_permission(i32 %5, i32 %6, %struct.stat* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @has_file_permission_curruser(i32 %0, %struct.stat* %1) {
%3 = tail call i32 (...) @geteuid()
%4 = tail call i32 @has_file_permission(i32 %3, i32 %0, %struct.stat* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(unsigned short *);
unsigned int logic_invert(unsigned short a, unsigned short *p_result) {
  assert(p_result);
  unsigned int err_code = 0;
  if (!p_result) {
    err_code = 2;
    goto end;
  }
  *p_result = (-1 * a);
end:
  return err_code;
}


x86 assembly (clang, -O0):
<logic_invert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114a <logic_invert+0x3a>
movl   $0x2,-0x14(%rbp)
jmp    115e <logic_invert+0x4e>
movzwl -0x2(%rbp),%eax
imul   $0xffffffff,%eax,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logic_invert>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <assert@plt>
test   %rbx,%rbx
je     112e <logic_invert+0x1e>
neg    %ebp
mov    %bp,(%rbx)
xor    %eax,%eax
jmp    1133 <logic_invert+0x23>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @logic_invert(i16 zeroext %0, i16* %1) {
%3 = alloca i16
%4 = alloca i16*
%5 = alloca i32
store i16 %0, i16* %3
store i16* %1, i16** %4
%6 = load i16*, i16** %4
%7 = call i32 @assert(i16* %6)
store i32 0, i32* %5
%8 = load i16*, i16** %4
%9 = icmp ne i16* %8, null
br i1 %9, label %11, label %10
10: ; preds = %2
store i32 2, i32* %5
br label %17
11: ; preds = %2
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = mul nsw i32 -1, %13
%15 = trunc i32 %14 to i16
%16 = load i16*, i16** %4
store i16 %15, i16* %16
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @logic_invert(i16 zeroext %0, i16* %1) {
%3 = tail call i32 @assert(i16* %1)
%4 = icmp eq i16* %1, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = sub i16 0, %0
store i16 %6, i16* %1
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ 2, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  scanf("%d", &n);
  printf("%d", n * 3 / 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
imul   $0x3,-0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
lea    (%rax,%rax,2),%eax
cltq
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x22,%rsi
add    %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 3
%6 = sdiv i32 %5, 10
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int const);
int /*<<< orphan*/ waitchildren(char const *, int);
void xexit(const char *name, const int exit_code) {
  waitchildren(name, 1);
  exit(exit_code);
}


x86 assembly (clang, -O0):
<xexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <waitchildren@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<xexit>:
push   %rbx
mov    %esi,%ebx
mov    $0x1,%esi
call   1030 <waitchildren@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @xexit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @waitchildren(i8* %5, i32 1)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
define void @xexit(i8* %0, i32 %1) {
%3 = tail call i32 @waitchildren(i8* %0, i32 1)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
__attribute__((const)) int is_power_of_2(unsigned long num) {
  return (num != 0 && ((num & (num - 1)) == 0));
}


x86 assembly (clang, -O0):
<is_power_of_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1131 <is_power_of_2+0x31>
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_power_of_2>:
test   %rdi,%rdi
je     1112 <is_power_of_2+0x12>
lea    -0x1(%rdi),%rcx
xor    %eax,%eax
test   %rcx,%rdi
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_power_of_2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i64, i64* %2
%7 = load i64, i64* %2
%8 = sub i64 %7, 1
%9 = and i64 %6, %8
%10 = icmp eq i64 %9, 0
br label %11
11: ; preds = %5, %1
%12 = phi i1 [ false, %1 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_power_of_2(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @llvm.ctpop.i64(i64 %0)
%5 = icmp ult i64 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_LIGHT_MODEL_AMBIENT 131
#define GL_LIGHT_MODEL_COLOR_CONTROL 130
#define GL_LIGHT_MODEL_LOCAL_VIEWER 129
#define GL_LIGHT_MODEL_TWO_SIDE 128
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glLightModelfv_size(GLenum e) {
  switch (e) {
  case GL_LIGHT_MODEL_LOCAL_VIEWER:
  case GL_LIGHT_MODEL_TWO_SIDE:
  case GL_LIGHT_MODEL_COLOR_CONTROL:
    return 1;
  case GL_LIGHT_MODEL_AMBIENT:
    return 4;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__glLightModelfv_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff80,%eax
sub    $0x3,%eax
jb     1131 <__glLightModelfv_size+0x31>
jmp    111e <__glLightModelfv_size+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x83,%eax
je     113d <__glLightModelfv_size+0x3d>
jmp    1149 <__glLightModelfv_size+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1150 <__glLightModelfv_size+0x50>
movl   $0x4,-0x4(%rbp)
jmp    1150 <__glLightModelfv_size+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glLightModelfv_size>:
add    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0x3,%edi
ja     1117 <__glLightModelfv_size+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define hidden i32 @__glLightModelfv_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 129, label %5
i32 128, label %5
i32 130, label %5
i32 131, label %6
]
5: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %8
6: ; preds = %1
store i32 4, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@switch.table.__glLightModelfv_size = [4 x i32] [i32 1, i32 1, i32 1, i32 4]
define hidden i32 @__glLightModelfv_size(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.__glLightModelfv_size, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int((tns_receive))(struct ss7 *ss7, struct isup_call *c, int messagetype,
                   unsigned char *parm, int len) {
  return len;
}


x86 assembly (clang, -O0):
<tns_receive>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tns_receive>:
mov    %r8d,%eax
ret

LLVM IR (-O0):
%struct.ss7 = type opaque
%struct.isup_call = type opaque
define i32 @tns_receive(%struct.ss7* %0, %struct.isup_call* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca %struct.ss7*
%7 = alloca %struct.isup_call*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store %struct.ss7* %0, %struct.ss7** %6
store %struct.isup_call* %1, %struct.isup_call** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
%struct.ss7 = type opaque
%struct.isup_call = type opaque
define i32 @tns_receive(%struct.ss7* nocapture readnone %0, %struct.isup_call* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32 returned %4) {
ret i32 %4
}
/* Variables and functions */
double sin(double);
double sind(double ang) { return sin(ang / 57.29577951); }


x86 assembly (clang, -O0):
<sind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sind>:
divsd  0xee8(%rip),%xmm0
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @sind(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 0x404CA5DC1A5D2372
%5 = call double @sin(double %4)
ret double %5
}

LLVM IR (-O2):
define double @sind(double %0) {
%2 = fdiv double %0, 0x404CA5DC1A5D2372
%3 = tail call double @sin(double %2)
ret double %3
}
int fn2(int a, int b) {
  int tem1 = b & a;
  int tem2 = a ^ b;
  return tem1 + tem2;
}


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = and i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = xor i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn2(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ RESHLm(int);
void RES0HLm() { RESHLm(0x01); }


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

x86 assembly (clang, -O2):
<RES0HLm>:
mov    $0x1,%edi
jmp    1030 <RESHLm@plt>

LLVM IR (-O0):
define void @RES0HLm() {
%1 = call i32 @RESHLm(i32 1)
ret void
}

LLVM IR (-O2):
define void @RES0HLm() {
%1 = tail call i32 @RESHLm(i32 1)
ret void
}