xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i = 2;
  while (i <= i * i) {
    if (i % 2 == 0)
      printf("%d\t", i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1169 <main+0x59>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115b <main+0x4b>
mov    -0x8(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    113c <main+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x2,%ebx
imul   %ebx,%ebx
cmp    %ebx,%ebp
mov    %ebp,%ebx
jae    1151 <main+0x41>
lea    0x1(%rbx),%ebp
test   $0x1,%bpl
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define i32 @main() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 2, %0 ], [ %8, %7 ]
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %5, %1
%8 = add nuw nsw i32 %2, 1
%9 = mul nsw i32 %8, %8
%10 = icmp ult i32 %2, %9
br i1 %10, label %1, label %11
11: ; preds = %7
ret i32 0
}
int main() {
  int a$1[20];
  4;
  8;
  8;
  1;
  4;
  int b$1[20];
  int c$1[20];
  ((int *)a$1);
  ((void *)((int *)a$1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gtk_combo_box_append_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_append_text() {
ret void
}
__attribute__((no, noclone)) double round(double x) { return x; }


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

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

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

LLVM IR (-O2):
define double @round(double returned %0) {
ret double %0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) {
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_cond_init(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 1
}
void hmd_free() {}


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

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

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

LLVM IR (-O2):
define void @hmd_free() {
ret void
}
int fun1132() { return 1132; }


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

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

LLVM IR (-O0):
define i32 @fun1132() {
ret i32 1132
}

LLVM IR (-O2):
define i32 @fun1132() {
ret i32 1132
}
int addDigits(int num) {
  int add = 0;
  while (num > 9) {
    add = num % 10;
    num = num / 10 + add;
  }
  return (num);
}


x86 assembly (clang, -O0):
<addDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    113c <addDigits+0x3c>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110e <addDigits+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addDigits>:
mov    %edi,%eax
cmp    $0xa,%edi
jl     1129 <addDigits+0x29>
mov    $0xcccccccd,%ecx
nopl   0x0(%rax)
mov    %eax,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%eax
add    %edx,%eax
cmp    $0x9,%eax
ja     1110 <addDigits+0x10>
ret

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

LLVM IR (-O2):
define i32 @addDigits(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = urem i32 %4, 10
%6 = udiv i32 %4, 10
%7 = add nuw nsw i32 %6, %5
%8 = icmp ugt i32 %7, 9
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ XTextProperty;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XTextProperty(void *_p) {
  if (_p == NULL)
    abort();
  free((XTextProperty *)_p);
}


x86 assembly (clang, -O0):
<free_XTextProperty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XTextProperty+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XTextProperty>:
test   %rdi,%rdi
je     112a <free_XTextProperty+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XTextProperty(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XTextProperty(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
int main2(int, char **);
int main(int argc, char **argv) {
  int ret;
  ret = main2(argc, argv);
  return ret;
}


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <main2@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 @main2(i32 %7, i8** %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
ret i32 %10
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @main2(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int close(int);
int sk_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<sk_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @sk_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int fpcompare(double, double, int, int);
int isless(double x, double y) { return fpcompare(x, y, 0x0100, -1); }


x86 assembly (clang, -O0):
<isless>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x100,%edi
mov    $0xffffffff,%esi
call   1030 <fpcompare@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isless>:
mov    $0x100,%edi
mov    $0xffffffff,%esi
jmp    1030 <fpcompare@plt>

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

LLVM IR (-O2):
define i32 @isless(double %0, double %1) {
%3 = tail call i32 @fpcompare(double %0, double %1, i32 256, i32 -1)
ret i32 %3
}
/* Type definitions */
struct _Locale_time {
  int dummy;
};

/* Variables and functions */
const char *_Locale_d_fmt(struct _Locale_time *ltime) { return "%m/%d/%y"; }


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

x86 assembly (clang, -O2):
<_Locale_d_fmt>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct._Locale_time = type { i32 }
@.str = [9 x i8] c"%m/%d/%y\00"
define i8* @_Locale_d_fmt(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_time = type { i32 }
@.str = [9 x i8] c"%m/%d/%y\00"
define i8* @_Locale_d_fmt(%struct._Locale_time* nocapture readnone %0) {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_rand_num();
int run_tests_random() {
  printf("\nRunning random number generator tests\n");
  test_rand_num();
  printf("All random number generator tests completed\n");
  return 1;
}


x86 assembly (clang, -O0):
<run_tests_random>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test_rand_num@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests_random>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <test_rand_num@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"\0ARunning random number generator tests\0A\00"
@.str.1 = [45 x i8] c"All random number generator tests completed\0A\00"
define i32 @run_tests_random() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_rand_num()
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [39 x i8] c"\0ARunning random number generator tests\00"
@str.2 = [44 x i8] c"All random number generator tests completed\00"
define i32 @run_tests_random() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_rand_num()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.2, i64 0, i64 0))
ret i32 1
}
void __do_global_dtors(void) {
  extern void (*__DTOR_LIST__[])(void);
  extern void (*__DTOR_END__[])(void);
  int wdtor;
  int ndtor = __DTOR_END__ - __DTOR_LIST__;
  for (wdtor = 0; wdtor < ndtor; wdtor++)
    (*(__DTOR_LIST__[wdtor]))();
}


x86 assembly (clang, -O0):
<__do_global_dtors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed1(%rip),%rax
lea    0x2f1a(%rip),%rcx
sub    %rcx,%rax
lea    0x2f10(%rip),%rcx
mov    0x2eb9(%rip),%rax
sub    %rcx,%rax
shr    $0x3,%rax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1160 <__do_global_dtors+0x60>
movslq -0x4(%rbp),%rcx
lea    0x2ee1(%rip),%rax
call   *(%rax,%rcx,8)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <__do_global_dtors+0x38>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__do_global_dtors>:
push   %r15
push   %r14
push   %rbx
mov    0x2ed4(%rip),%rcx
sub    0x2ebd(%rip),%rcx
lea    0x7(%rcx),%rax
test   %rcx,%rcx
mov    %rcx,%rdx
cmovs  %rax,%rdx
shr    $0x3,%rdx
test   %edx,%edx
jle    115d <__do_global_dtors+0x5d>
test   %rcx,%rcx
cmovns %rcx,%rax
shr    $0x3,%rax
cmp    $0x2,%eax
mov    $0x1,%r14d
cmovge %eax,%r14d
xor    %ebx,%ebx
lea    0x2ee6(%rip),%r15
nopw   0x0(%rax,%rax,1)
call   *(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1150 <__do_global_dtors+0x50>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__DTOR_END__ = external global [0 x void ()*]
@__DTOR_LIST__ = external global [0 x void ()*]
define void @__do_global_dtors() {
%1 = alloca i32
%2 = alloca i32
store i32 trunc (i64 sdiv exact (i64 sub (i64 ptrtoint ([0 x void ()*]* @__DTOR_END__ to i64), i64 ptrtoint ([0 x void ()*]* @__DTOR_LIST__ to i64)), i64 8) to i32), i32* %2
store i32 0, i32* %1
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = icmp slt i32 %4, %5
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [0 x void ()*], [0 x void ()*]* @__DTOR_LIST__, i64 0, i64 %9
%11 = load void ()*, void ()** %10
br label %12
12: ; preds = %7
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %3
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@__DTOR_END__ = external global [0 x void ()*]
@__DTOR_LIST__ = external global [0 x void ()*]
define void @__do_global_dtors() {
br i1 icmp sgt (i32 trunc (i64 sdiv (i64 sub (i64 ptrtoint ([0 x void ()*]* @__DTOR_END__ to i64), i64 ptrtoint ([0 x void ()*]* @__DTOR_LIST__ to i64)), i64 8) to i32), i32 0), label %1, label %10
1: ; preds = %0
%2 = call i32 @llvm.smax.i32(i32 trunc (i64 sdiv (i64 sub (i64 ptrtoint ([0 x void ()*]* @__DTOR_END__ to i64), i64 ptrtoint ([0 x void ()*]* @__DTOR_LIST__ to i64)), i64 8) to i32), i32 1)
%3 = zext i32 %2 to i64
br label %4
4: ; preds = %1, %4
%5 = phi i64 [ 0, %1 ], [ %8, %4 ]
%6 = getelementptr inbounds [0 x void ()*], [0 x void ()*]* @__DTOR_LIST__, i64 0, i64 %5
%7 = load void ()*, void ()** %6
tail call void %7()
%8 = add nuw nsw i64 %5, 1
%9 = icmp eq i64 %8, %3
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret void
}
void g_ascii_dtostr() {}


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

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

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

LLVM IR (-O2):
define void @g_ascii_dtostr() {
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int read_data(int, char *);
ssize_t read_string(ssize_t size, char *data) {
  ssize_t r;
  if ((r = read_data(size - 1, data)) == -1)
    return r;
  data[r + 1] = '\0';
  return r;
}


x86 assembly (clang, -O0):
<read_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <read_data@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    1145 <read_string+0x35>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <read_string+0x4c>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_string>:
push   %rbx
mov    %rsi,%rbx
add    $0xffffffff,%edi
call   1030 <read_data@plt>
cmp    $0xffffffff,%eax
je     1129 <read_string+0x19>
movslq %eax,%rcx
movb   $0x0,0x1(%rcx,%rbx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @read_string(i32 %0, i8* %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @read_data(i32 %3, i8* %1)
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = add nuw nsw i32 %4, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 0, i8* %9
br label %10
10: ; preds = %2, %6
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_mem;
typedef int /*<<< orphan*/ cl_event;
typedef int /*<<< orphan*/ cl_command_queue;

/* Variables and functions */
int /*<<< orphan*/ inner_image_copy(int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, size_t const *,
                                    size_t const *, size_t const *,
                                    unsigned int, int /*<<< orphan*/ const *,
                                    int /*<<< orphan*/ *);
void cl_image_copy(cl_command_queue command_queue, cl_mem src_image,
                   cl_mem dst_image, const size_t src_origin[3],
                   const size_t dst_origin[3], const size_t region[3],
                   unsigned num_evt, const cl_event *evt_list, cl_event *out) {
  inner_image_copy(command_queue, src_image, dst_image, src_origin, dst_origin,
                   region, num_evt, evt_list, out);
}


x86 assembly (clang, -O0):
<cl_image_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <inner_image_copy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_image_copy>:
jmp    1030 <inner_image_copy@plt>

LLVM IR (-O0):
define void @cl_image_copy(i32 %0, i32 %1, i32 %2, i64* %3, i64* %4, i64* %5, i32 %6, i32* %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i64*
%14 = alloca i64*
%15 = alloca i64*
%16 = alloca i32
%17 = alloca i32*
%18 = alloca i32*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i64* %3, i64** %13
store i64* %4, i64** %14
store i64* %5, i64** %15
store i32 %6, i32* %16
store i32* %7, i32** %17
store i32* %8, i32** %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i64*, i64** %13
%23 = load i64*, i64** %14
%24 = load i64*, i64** %15
%25 = load i32, i32* %16
%26 = load i32*, i32** %17
%27 = load i32*, i32** %18
%28 = call i32 @inner_image_copy(i32 %19, i32 %20, i32 %21, i64* %22, i64* %23, i64* %24, i32 %25, i32* %26, i32* %27)
ret void
}

LLVM IR (-O2):
define void @cl_image_copy(i32 %0, i32 %1, i32 %2, i64* %3, i64* %4, i64* %5, i32 %6, i32* %7, i32* %8) {
%10 = tail call i32 @inner_image_copy(i32 %0, i32 %1, i32 %2, i64* %3, i64* %4, i64* %5, i32 %6, i32* %7, i32* %8)
ret void
}
void gtk_text_iter_backward_line() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_backward_line() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void handleExit(int signal) {
  printf("TIMEOUT\n");
  exit(1);
}


x86 assembly (clang, -O0):
<handleExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handleExit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"TIMEOUT\0A\00"
define void @handleExit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"TIMEOUT\00"
define void @handleExit(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int xmlUCSIsCyrillic(int code) {
  return (((code >= 0x0400) && (code <= 0x04FF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsCyrillic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x400,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsCyrillic+0x26>
cmpl   $0x4ff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCyrillic>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0x400,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCyrillic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 1024
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 1279
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsCyrillic(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 1024
%4 = zext i1 %3 to i32
ret i32 %4
}
int pop(unsigned x) {
  x = x - ((x >> 1) & 0x55555555);
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  x = (x + (x >> 4)) & 0x0F0F0F0F;
  x = x + (x >> 8);
  x = x + (x >> 16);
  return x & 0x0000003F;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @pop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 1
%6 = and i32 %5, 1431655765
%7 = sub i32 %3, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = and i32 %8, 858993459
%10 = load i32, i32* %2
%11 = lshr i32 %10, 2
%12 = and i32 %11, 858993459
%13 = add i32 %9, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 4
%17 = add i32 %14, %16
%18 = and i32 %17, 252645135
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = load i32, i32* %2
%21 = lshr i32 %20, 8
%22 = add i32 %19, %21
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = lshr i32 %24, 16
%26 = add i32 %23, %25
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = and i32 %27, 63
ret i32 %28
}

LLVM IR (-O2):
define i32 @pop(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub i32 %0, %3
%5 = and i32 %4, 858993459
%6 = lshr i32 %4, 2
%7 = and i32 %6, 858993459
%8 = add nuw nsw i32 %7, %5
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 8
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 16
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
/* Variables and functions */
void *calloc(int, int);
void *nothing_parse(char **strings) {
  void *ctx;
  strings = strings;
  ctx = calloc(1, sizeof(void *));
  return ctx;
}


x86 assembly (clang, -O0):
<nothing_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nothing_parse>:
mov    $0x1,%edi
mov    $0x8,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @nothing_parse(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
store i8** %4, i8*** %2
%5 = call i8* @calloc(i32 1, i32 8)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @nothing_parse(i8** nocapture readnone %0) {
%2 = tail call dereferenceable_or_null(8) i8* @calloc(i32 1, i32 8)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char character = ' ';
  printf("ASCII-Table\nHex\tDecimal\tCharacter\n");
  while (character <= '~') {
    printf("%x\t%d\t%c\n", character, character, character);
    character++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x20,-0x5(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jg     1165 <main+0x55>
movsbl -0x5(%rbp),%esi
movsbl -0x5(%rbp),%edx
movsbl -0x5(%rbp),%ecx
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1131 <main+0x21>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
mov    $0x20,%ebx
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [35 x i8] c"ASCII-Table\0AHex\09Decimal\09Character\0A\00"
@.str.1 = [10 x i8] c"%x\09%d\09%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 32, i8* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %8, %0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sle i32 %6, 126
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %12, i32 %14)
%16 = load i8, i8* %2
%17 = add i8 %16, 1
store i8 %17, i8* %2
br label %4
18: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%x\09%d\09%c\0A\00"
@str = [34 x i8] c"ASCII-Table\0AHex\09Decimal\09Character\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 32, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %3, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 127
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
int test4(int a) {
  while (a < 20) {
    a = a + 1;
  }
  return a;
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jge    111f <test4+0x1f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <test4+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
cmp    $0x15,%edi
mov    $0x14,%eax
cmovge %edi,%eax
ret

LLVM IR (-O0):
define i32 @test4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 20
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @test4(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 20)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xc6() {
  Assert_real((isspace(198) == 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_isspace.c",
              995, ("isspace should be 0 for 0xc6"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xc6>:
push   %rax
mov    $0xc6,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e3,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc6\00"
define void @t_isspace_0xc6() {
%1 = call i64 @isspace(i32 198)
%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 995, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc6\00"
define void @t_isspace_0xc6() {
%1 = tail call i64 @isspace(i32 198)
%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 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
long long calcula_digito_cpf(long long);
int e_cpf(long long cpf) {
  return cpf == calcula_digito_cpf((long long)cpf / 100);
}


x86 assembly (clang, -O0):
<e_cpf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1030 <calcula_digito_cpf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_cpf>:
push   %rbx
mov    %rdi,%rbx
movabs $0xa3d70a3d70a3d70b,%rcx
0a d7 a3
mov    %rdi,%rax
imul   %rcx
add    %rdx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x6,%rdi
add    %rax,%rdi
call   1030 <calcula_digito_cpf@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @e_cpf(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = sdiv i64 %4, 100
%6 = call i64 @calcula_digito_cpf(i64 %5)
%7 = icmp eq i64 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @e_cpf(i64 %0) {
%2 = sdiv i64 %0, 100
%3 = tail call i64 @calcula_digito_cpf(i64 %2)
%4 = icmp eq i64 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
int swmm_getVersion(void) { return 50021; }


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

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

LLVM IR (-O0):
define i32 @swmm_getVersion() {
ret i32 50021
}

LLVM IR (-O2):
define i32 @swmm_getVersion() {
ret i32 50021
}
/* Variables and functions */
char *malloc(int);
char *realloc(char *, int);
int main(void) {
  int i;
  char *p = malloc(1);
  for (i = 2; i < 50; i++) {
    p = realloc(p, i);
    p[i - 1] = 'z';
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    117d <main+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x7a,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%edi
call   1030 <malloc@plt>
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x1(%rbx),%r14
mov    %rax,%rdi
mov    %r14d,%esi
call   1040 <realloc@plt>
movb   $0x7a,(%rax,%rbx,1)
mov    %r14,%rbx
cmp    $0x31,%r14
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i8* @malloc(i32 1)
store i8* %4, i8** %3
store i32 2, i32* %2
br label %5
5: ; preds = %17, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 50
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i32, i32* %2
%11 = call i8* @realloc(i8* %9, i32 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i32, i32* %2
%14 = sub nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
store i8 122, i8* %16
br label %17
17: ; preds = %8
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %5
20: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
br label %2
2: ; preds = %0, %2
%3 = phi i64 [ 2, %0 ], [ %9, %2 ]
%4 = phi i8* [ %1, %0 ], [ %6, %2 ]
%5 = trunc i64 %3 to i32
%6 = tail call i8* @realloc(i8* %4, i32 %5)
%7 = add nsw i64 %3, -1
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8 122, i8* %8
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 50
br i1 %10, label %11, label %2
11: ; preds = %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
FILE *fdopen(int fd, const char *mode) {}


x86 assembly (clang, -O0):
<fdopen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i32* @fdopen(i32 %0, i8* nocapture readnone %1) {
ret i32* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ title;
typedef int /*<<< orphan*/ rank;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, short);
int /*<<< orphan*/ u_printf(char *, char const *, int /*<<< orphan*/);
void uw_printf(short rank, const char *fmt, va_list valist) {
  char title[sizeof("WORKER") + (2 << sizeof(rank)) + 1] = "";
  snprintf(title, sizeof(title),
           "WORKER"
           ":%d",
           rank);
  u_printf(title, fmt, valist);
}


x86 assembly (clang, -O0):
<uw_printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
mov    $0x10,%esi
lea    0xe9a(%rip),%rdx
movswl -0x2(%rbp),%ecx
call   1030 <snprintf@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <u_printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uw_printf>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%ecx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
lea    0xec3(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x10,%esi
call   1030 <snprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <u_printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"WORKER:%d\00"
define void @uw_printf(i16 signext %0, i8* %1, i32 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [16 x i8]
store i16 %0, i16* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = bitcast [16 x i8]* %7 to i8*
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%10 = load i16, i16* %4
%11 = call i32 @snprintf(i8* %9, i32 16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i16 signext %10)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = call i32 @u_printf(i8* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"WORKER:%d\00"
define void @uw_printf(i16 signext %0, i8* %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i16 signext %0)
%7 = call i32 @u_printf(i8* %5, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int i2cmaster_ReadLast(int);
unsigned i2c1master_ReadLast(void) { return i2cmaster_ReadLast(1); }


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

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

LLVM IR (-O0):
define i32 @i2c1master_ReadLast() {
%1 = call i32 @i2cmaster_ReadLast(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @i2c1master_ReadLast() {
%1 = tail call i32 @i2cmaster_ReadLast(i32 1)
ret i32 %1
}
void gf8mul_10100110(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm5\n"
                       "\tpxor    %xmm6, %xmm4\n"
                       "\tpxor    %xmm5, %xmm3\n"
                       "\tpxor    %xmm4, %xmm2\n"
                       "\tpxor    %xmm3, %xmm1\n"
                       "\tpxor    %xmm2, %xmm0\n"
                       "\tpxor    %xmm1, %xmm7\n"
                       "\tpxor    %xmm1, %xmm6\n"
                       "\tpxor    %xmm1, %xmm5\n"
                       "\tpxor    %xmm1, %xmm4\n"
                       "\tpxor    %xmm1, %xmm2\n"
                       "\tpxor    %xmm1, %xmm0\n"
                       "\tpxor    %xmm0, %xmm7\n"
                       "\tpxor    %xmm0, %xmm5\n"
                       "\tpxor    %xmm0, %xmm2\n"
                       "\tpxor    %xmm0, %xmm1\n"
                       "\tpxor    %xmm1, %xmm0\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm5
pxor   %xmm6,%xmm4
pxor   %xmm5,%xmm3
pxor   %xmm4,%xmm2
pxor   %xmm3,%xmm1
pxor   %xmm2,%xmm0
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm6
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm2
pxor   %xmm1,%xmm0
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm2
pxor   %xmm0,%xmm1
pxor   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm5
pxor   %xmm6,%xmm4
pxor   %xmm5,%xmm3
pxor   %xmm4,%xmm2
pxor   %xmm3,%xmm1
pxor   %xmm2,%xmm0
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm6
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm2
pxor   %xmm1,%xmm0
pxor   %xmm0,%xmm7
pxor   %xmm0,%xmm5
pxor   %xmm0,%xmm2
pxor   %xmm0,%xmm1
pxor   %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define void @gf8mul_10100110() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm5\0A\09pxor %xmm6, %xmm4\0A\09pxor %xmm5, %xmm3\0A\09pxor %xmm4, %xmm2\0A\09pxor %xmm3, %xmm1\0A\09pxor %xmm2, %xmm0\0A\09pxor %xmm1, %xmm7\0A\09pxor %xmm1, %xmm6\0A\09pxor %xmm1, %xmm5\0A\09pxor %xmm1, %xmm4\0A\09pxor %xmm1, %xmm2\0A\09pxor %xmm1, %xmm0\0A\09pxor %xmm0, %xmm7\0A\09pxor %xmm0, %xmm5\0A\09pxor %xmm0, %xmm2\0A\09pxor %xmm0, %xmm1\0A\09pxor %xmm1, %xmm0\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
gettype(uid) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @gettype(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
FILE *open_dcd_read(const char *filename) { return fopen(filename, "rb"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define noalias i32* @open_dcd_read(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ tel_init();
int /*<<< orphan*/ telopt(int, int, int);
void term_init() {
  tel_init();
  telopt(1, 251, 3);
  telopt(1, 253, 3);
  telopt(1, 251, 0);
  telopt(1, 253, 0);
  telopt(1, 251, 1);
}


x86 assembly (clang, -O0):
<term_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <tel_init@plt>
mov    $0x1,%edi
mov    $0xfb,%esi
mov    $0x3,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfd,%esi
mov    $0x3,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfb,%esi
xor    %edx,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfd,%esi
xor    %edx,%edx
call   1030 <telopt@plt>
mov    $0x1,%edx
mov    $0xfb,%esi
mov    %edx,%edi
call   1030 <telopt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_init>:
push   %rax
xor    %eax,%eax
call   1040 <tel_init@plt>
mov    $0x1,%edi
mov    $0xfb,%esi
mov    $0x3,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfd,%esi
mov    $0x3,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfb,%esi
xor    %edx,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfd,%esi
xor    %edx,%edx
call   1030 <telopt@plt>
mov    $0x1,%edi
mov    $0xfb,%esi
mov    $0x1,%edx
pop    %rax
jmp    1030 <telopt@plt>

LLVM IR (-O0):
define void @term_init() {
%1 = call i32 (...) @tel_init()
%2 = call i32 @telopt(i32 1, i32 251, i32 3)
%3 = call i32 @telopt(i32 1, i32 253, i32 3)
%4 = call i32 @telopt(i32 1, i32 251, i32 0)
%5 = call i32 @telopt(i32 1, i32 253, i32 0)
%6 = call i32 @telopt(i32 1, i32 251, i32 1)
ret void
}

LLVM IR (-O2):
define void @term_init() {
%1 = tail call i32 (...) @tel_init()
%2 = tail call i32 @telopt(i32 1, i32 251, i32 3)
%3 = tail call i32 @telopt(i32 1, i32 253, i32 3)
%4 = tail call i32 @telopt(i32 1, i32 251, i32 0)
%5 = tail call i32 @telopt(i32 1, i32 253, i32 0)
%6 = tail call i32 @telopt(i32 1, i32 251, i32 1)
ret void
}