xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ show_print(int, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int main() {
  int i;
  for (i = 0; i < 101; ++i) {
    show_print(i, 50);
    fflush(stdout);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    1183 <main+0x53>
mov    -0x8(%rbp),%edi
mov    $0x32,%esi
call   1030 <show_print@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
mov    0x2ea3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
mov    $0x32,%esi
call   1030 <show_print@plt>
mov    (%r14),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1140 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 101
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @show_print(i32 %7, i32 50)
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
%11 = call i32 @sleep(i32 1)
br label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i32 @show_print(i32 %2, i32 50)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @sleep(i32 1)
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 101
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x8e() {
  Assert_real((islower(142) == 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_islower.c",
              715, ("islower should be 0 for 0x8e"));
}


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

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


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

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

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

LLVM IR (-O2):
define void @EC_POINT_new() {
ret void
}
/* Type definitions */
struct task_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ task_clear(struct task_t *);
void _sched_deregister(struct task_t *task) { task_clear(task); }


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

x86 assembly (clang, -O2):
<_sched_deregister>:
jmp    1030 <task_clear@plt>

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

LLVM IR (-O2):
%struct.task_t = type { i32 }
define void @_sched_deregister(%struct.task_t* %0) {
%2 = tail call i32 @task_clear(%struct.task_t* %0)
ret void
}
void null_clear(void *ui) {}


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

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

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

LLVM IR (-O2):
define void @null_clear(i8* nocapture %0) {
ret void
}
void reserve_trampoline_memory(void) {}


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

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

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

LLVM IR (-O2):
define void @reserve_trampoline_memory() {
ret void
}
/* Type definitions */
struct mm_array {
  int dummy;
};

/* Variables and functions */
struct mm_array *mm_array_new_reserved2(size_t, size_t, int /*<<< orphan*/ *);
struct mm_array *mm_array_new_reserved(size_t element_size, size_t count) {
  return mm_array_new_reserved2(element_size, count, NULL);
}


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

x86 assembly (clang, -O2):
<mm_array_new_reserved>:
xor    %edx,%edx
jmp    1030 <mm_array_new_reserved2@plt>

LLVM IR (-O0):
%struct.mm_array = type { i32 }
define %struct.mm_array* @mm_array_new_reserved(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 %struct.mm_array* @mm_array_new_reserved2(i64 %5, i64 %6, i32* null)
ret %struct.mm_array* %7
}

LLVM IR (-O2):
%struct.mm_array = type { i32 }
define %struct.mm_array* @mm_array_new_reserved(i64 %0, i64 %1) {
%3 = tail call %struct.mm_array* @mm_array_new_reserved2(i64 %0, i64 %1, i32* null)
ret %struct.mm_array* %3
}
long double __attribute__((no)) fcmovu(long flags) {
  long double out;
  asm("\n"
      "	push	%1"
      "\n"
      "	popf"
      "\n"
      "	fldpi"
      "\n"
      "	fld1"
      "\n"
      "	"
      "fcmovu"
      " %%st(1), %%st"
      "\n"
      "	ffree	%%st(1)"
      "\n"
      : "=t"(out)
      : "r"(flags));
  return out;
}


x86 assembly (clang, -O0):
<fcmovu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
push   %rax
popf
fldpi
fld1
fcmovu %st(1),%st
ffree  %st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcmovu>:
push   %rdi
popf
fldpi
fld1
fcmovu %st(1),%st
ffree  %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @fcmovu(i64 %0) {
%2 = alloca i64
%3 = alloca x86_fp80
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call x86_fp80 asm "\0A\09push\09$1\0A\09popf\0A\09fldpi\0A\09fld1\0A\09fcmovu %st(1), %st\0A\09ffree\09%st(1)\0A", "={st},r,~{dirflag},~{fpsr},~{flags}"(i64 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @fcmovu(i64 %0) {
%2 = tail call x86_fp80 asm "\0A\09push\09$1\0A\09popf\0A\09fldpi\0A\09fld1\0A\09fcmovu %st(1), %st\0A\09ffree\09%st(1)\0A", "={st},r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  printf("Enter an integer: ");
  scanf("%d", &number);
  if (number == 5)
    return 1;
  printf("You entered: %d", number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5,-0x8(%rbp)
jne    1163 <main+0x43>
movl   $0x1,-0x4(%rbp)
jmp    117b <main+0x5b>
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    $0x1,%eax
cmp    $0x5,%esi
je     115e <main+0x3e>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"You entered: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 5
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %9)
store i32 0, i32* %1
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"You entered: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 5
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %9
9: ; preds = %0, %7
%10 = phi i32 [ 0, %7 ], [ 1, %0 ]
ret i32 %10
}
void open_console(void) {}


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

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

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

LLVM IR (-O2):
define void @open_console() {
ret void
}
/* Variables and functions */
int rom_present(char *);
int tgui9440_available() {
  return rom_present(L"roms/video/tgui9440/9440.vbi");
}


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

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

LLVM IR (-O0):
@.str = [29 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 116, i32 103, i32 117, i32 105, i32 57, i32 52, i32 52, i32 48, i32 47, i32 57, i32 52, i32 52, i32 48, i32 46, i32 118, i32 98, i32 105, i32 0]
define i32 @tgui9440_available() {
%1 = call i32 @rom_present(i8* bitcast ([29 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [29 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 116, i32 103, i32 117, i32 105, i32 57, i32 52, i32 52, i32 48, i32 47, i32 57, i32 52, i32 52, i32 48, i32 46, i32 118, i32 98, i32 105, i32 0]
define i32 @tgui9440_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([29 x i32]* @.str to i8*))
ret i32 %1
}
/* Variables and functions */
int execv(char const *, char *const *);
int octave_execv_wrapper(const char *file, char *const *argv) {
  return execv(file, argv);
}


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

x86 assembly (clang, -O2):
<octave_execv_wrapper>:
jmp    1030 <execv@plt>

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

LLVM IR (-O2):
define i32 @octave_execv_wrapper(i8* %0, i8** %1) {
%3 = tail call i32 @execv(i8* %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int func_from_language_runtime();
int __attribute__((visibility("default"))) func(void) {
  return func_from_language_runtime();
}


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

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

LLVM IR (-O0):
define i32 @func() {
%1 = call i32 (...) @func_from_language_runtime()
ret i32 %1
}

LLVM IR (-O2):
define i32 @func() {
%1 = tail call i32 (...) @func_from_language_runtime()
ret i32 %1
}
void interface_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @interface_cleanup() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ swappacket;

/* Variables and functions */
int /*<<< orphan*/ matrix_write(unsigned char *, int);
void matrix_swap() {
  static unsigned char swappacket[] = {'F', 'W', 'C', 0};
  matrix_write(swappacket, sizeof(swappacket));
}


x86 assembly (clang, -O0):
<matrix_swap>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f0d(%rip),%rdi
mov    $0x4,%esi
call   1030 <matrix_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_swap>:
lea    0x2f11(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <matrix_write@plt>

LLVM IR (-O0):
@matrix_swap.swappacket = internal global [4 x i8] c"FWC\00"
define void @matrix_swap() {
%1 = call i32 @matrix_write(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @matrix_swap.swappacket, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@matrix_swap.swappacket = internal global [4 x i8] c"FWC\00"
define void @matrix_swap() {
%1 = tail call i32 @matrix_write(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @matrix_swap.swappacket, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tm_all_selected_bits_set_1();
int /*<<< orphan*/ tm_all_selected_bits_set_2();
int /*<<< orphan*/ tm_mask_0();
int /*<<< orphan*/ tm_some_selected_bits_set_msb_not_set();
int /*<<< orphan*/ tm_some_selected_bits_set_msb_set();
int /*<<< orphan*/ tm_value_0();
int main() {
  tm_mask_0();
  tm_value_0();
  tm_all_selected_bits_set_1();
  tm_all_selected_bits_set_2();
  tm_some_selected_bits_set_msb_set();
  tm_some_selected_bits_set_msb_not_set();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <tm_mask_0@plt>
mov    $0x0,%al
call   1030 <tm_value_0@plt>
mov    $0x0,%al
call   1050 <tm_all_selected_bits_set_1@plt>
mov    $0x0,%al
call   1070 <tm_all_selected_bits_set_2@plt>
mov    $0x0,%al
call   1080 <tm_some_selected_bits_set_msb_set@plt>
mov    $0x0,%al
call   1060 <tm_some_selected_bits_set_msb_not_set@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <tm_mask_0@plt>
xor    %eax,%eax
call   1030 <tm_value_0@plt>
xor    %eax,%eax
call   1050 <tm_all_selected_bits_set_1@plt>
xor    %eax,%eax
call   1070 <tm_all_selected_bits_set_2@plt>
xor    %eax,%eax
call   1080 <tm_some_selected_bits_set_msb_set@plt>
xor    %eax,%eax
call   1060 <tm_some_selected_bits_set_msb_not_set@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @tm_mask_0()
%3 = call i32 (...) @tm_value_0()
%4 = call i32 (...) @tm_all_selected_bits_set_1()
%5 = call i32 (...) @tm_all_selected_bits_set_2()
%6 = call i32 (...) @tm_some_selected_bits_set_msb_set()
%7 = call i32 (...) @tm_some_selected_bits_set_msb_not_set()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @tm_mask_0()
%2 = tail call i32 (...) @tm_value_0()
%3 = tail call i32 (...) @tm_all_selected_bits_set_1()
%4 = tail call i32 (...) @tm_all_selected_bits_set_2()
%5 = tail call i32 (...) @tm_some_selected_bits_set_msb_set()
%6 = tail call i32 (...) @tm_some_selected_bits_set_msb_not_set()
ret i32 0
}
/* Type definitions */
struct tinyrl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tinyrl_printf(struct tinyrl *, char *, unsigned int);
void tinyrl_vt100_cursor_down(struct tinyrl *this, unsigned count) {
  tinyrl_printf(this, "\x1b[%dB", count);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <tinyrl_printf@plt>

LLVM IR (-O0):
%struct.tinyrl = type { i32 }
@.str = [6 x i8] c"\1B[%dB\00"
define void @tinyrl_vt100_cursor_down(%struct.tinyrl* %0, i32 %1) {
%3 = alloca %struct.tinyrl*
%4 = alloca i32
store %struct.tinyrl* %0, %struct.tinyrl** %3
store i32 %1, i32* %4
%5 = load %struct.tinyrl*, %struct.tinyrl** %3
%6 = load i32, i32* %4
%7 = call i32 @tinyrl_printf(%struct.tinyrl* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
%struct.tinyrl = type { i32 }
@.str = [6 x i8] c"\1B[%dB\00"
define void @tinyrl_vt100_cursor_down(%struct.tinyrl* %0, i32 %1) {
%3 = tail call i32 @tinyrl_printf(%struct.tinyrl* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void rct_set_usb_ext_clk(void) {}


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

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

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

LLVM IR (-O2):
define void @rct_set_usb_ext_clk() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int xyz = 14;
  printf("C Programming\n");
  printf("value of xyz is %i\n", xyz);
  printf("C Programming\n");
  return 0;
}


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)
movl   $0xe,-0x14(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeec(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"C Programming\0A\00"
@.str.1 = [20 x i8] c"value of xyz is %i\0A\00"
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
store i32 14, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"value of xyz is %i\0A\00"
@str.2 = [14 x i8] c"C Programming\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 14)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ is_unique(unsigned int);
unsigned unique_integers(const unsigned limit) {
  unsigned result = 0;
  for (unsigned i = 0; i <= limit; ++i)
    result += is_unique(i);
  return result;
}


x86 assembly (clang, -O0):
<unique_integers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
ja     1157 <unique_integers+0x47>
mov    -0xc(%rbp),%edi
call   1030 <is_unique@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <unique_integers+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unique_integers>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
call   1030 <is_unique@plt>
add    %eax,%ebx
add    $0x1,%ebp
cmp    %r14d,%ebp
jbe    1120 <unique_integers+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @unique_integers(i32 %0) {
br label %3
2: ; preds = %3
ret i32 %8
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %9, %3 ]
%5 = phi i32 [ 0, %1 ], [ %8, %3 ]
%6 = tail call i64 @is_unique(i32 %4)
%7 = trunc i64 %6 to i32
%8 = add i32 %5, %7
%9 = add i32 %4, 1
%10 = icmp ugt i32 %9, %0
br i1 %10, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double);
int Section1(float radius) {
  printf("\n1.- The perimeter is: %.2f, the area is: %.2f\n",
         2 * 3.141592 * radius, 3.141592 * radius * radius);
  return 0;
}


x86 assembly (clang, -O0):
<Section1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section1>:
push   %rax
cvtss2sd %xmm0,%xmm1
movsd  0xee3(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
movsd  0xedb(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"\0A1.- The perimeter is: %.2f, the area is: %.2f\0A\00"
define i32 @Section1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double 0x401921FAFC8B007A, %4
%6 = fptosi double %5 to i32
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double 0x400921FAFC8B007A, %8
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fmul double %9, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %6, double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"\0A1.- The perimeter is: %.2f, the area is: %.2f\0A\00"
define i32 @Section1(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x401921FAFC8B007A
%4 = fptosi double %3 to i32
%5 = fmul double %2, 0x400921FAFC8B007A
%6 = fmul double %5, %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %4, double %6)
ret i32 0
}
unsigned long rdpmc_actual_cycles() {
  unsigned a, d, c;
  c = (1 << 30) + 1;
  __asm__ volatile("rdpmc" : "=a"(a), "=d"(d) : "c"(c));
  return ((unsigned long)a) | (((unsigned long)d) << 32);
  ;
}


x86 assembly (clang, -O0):
<rdpmc_actual_cycles>:
push   %rbp
mov    %rsp,%rbp
movl   $0x40000001,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
rdpmc
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdpmc_actual_cycles>:
mov    $0x40000001,%ecx
rdpmc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdpmc_actual_cycles() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1073741825, i32* %3
%4 = load i32, i32* %3
%5 = call { i32, i32 } asm sideeffect "rdpmc", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
%6 = extractvalue { i32, i32 } %5, 0
%7 = extractvalue { i32, i32 } %5, 1
store i32 %6, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = shl i64 %11, 32
%13 = or i64 %9, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @rdpmc_actual_cycles() {
%1 = tail call { i32, i32 } asm sideeffect "rdpmc", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 1073741825)
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int strcmp(char *, char *);
int compare(const void *a, const void *b) {
  char *str1 = (char *)a;
  char *str2 = (char *)b;
  return strcmp(str1, str2);
}


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

x86 assembly (clang, -O2):
<compare>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __CrestInit();
void __globinit_primemod(void) {
  { __CrestInit(); }
}


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

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

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

LLVM IR (-O2):
define void @__globinit_primemod() {
%1 = tail call i32 (...) @__CrestInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void httpRedirect(const char *url) {
  if (url != NULL) {
    puts("Status: 301");
    printf("Location: %s\n\n", url);
  }
}


x86 assembly (clang, -O0):
<httpRedirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1153 <httpRedirect+0x33>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<httpRedirect>:
test   %rdi,%rdi
je     1145 <httpRedirect+0x25>
push   %rbx
mov    %rdi,%rbx
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Status: 301\00"
@.str.1 = [15 x i8] c"Location: %s\0A\0A\00"
define void @httpRedirect(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Status: 301\00"
@.str.1 = [15 x i8] c"Location: %s\0A\0A\00"
define void @httpRedirect(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %3, %1
ret void
}
void setbeword32(unsigned char *c, unsigned int val) {
  c[0] = (val >> 24) & 0xFF;
  c[1] = (val >> 16) & 0xFF;
  c[2] = (val >> 8) & 0xFF;
  c[3] = val & 0xFF;
}


x86 assembly (clang, -O0):
<setbeword32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @setbeword32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 24
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = lshr i32 %11, 16
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i32, i32* %4
%18 = lshr i32 %17, 8
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i32, i32* %4
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @setbeword32(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
int test_imm_DDint8_mem(signed char *val) {
  return ((*val) & (-0xDD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DDint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff23,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DDint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff23,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DDint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -221
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ function(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x;
  x = 0;
  function(1, 2, 3);
  x = 1;
  printf("%d\n", x);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <function@plt>
lea    0xec4(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @function(i32 1, i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
char base64_encode_value(char value_in) {
  static const char *encoding =
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  if (value_in > 63)
    return '=';
  return encoding[(long)value_in];
}


x86 assembly (clang, -O0):
<base64_encode_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x3f,%eax
jle    1120 <base64_encode_value+0x20>
movb   $0x3d,-0x1(%rbp)
jmp    1132 <base64_encode_value+0x32>
mov    0x2ef9(%rip),%rax
movsbq -0x2(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_encode_value>:
mov    $0x3d,%al
cmp    $0x3f,%dil
jg     1116 <base64_encode_value+0x16>
movsbq %dil,%rax
lea    0xeed(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
@base64_encode_value.encoding = internal global i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i32 0, i32 0)
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @base64_encode_value(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 63
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 61, i8* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** @base64_encode_value.encoding
%10 = load i8, i8* %3
%11 = sext i8 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
store i8 %13, i8* %2
br label %14
14: ; preds = %8, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
@.str = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define signext i8 @base64_encode_value(i8 signext %0) {
%2 = icmp sgt i8 %0, 63
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = sext i8 %0 to i64
%5 = getelementptr inbounds [65 x i8], [65 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
br label %7
7: ; preds = %1, %3
%8 = phi i8 [ %6, %3 ], [ 61, %1 ]
ret i8 %8
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c = getchar();
  while ((c = getchar()) != EOF) {
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%eax
je     115f <main+0x3f>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    1139 <main+0x19>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb2(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
nopw   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
br label %4
4: ; preds = %8, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %2
%10 = call i32 @putchar(i32 %9)
br label %4
11: ; preds = %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = tail call i32 (...) @getchar()
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %11, label %5
5: ; preds = %0, %5
%6 = phi i32 [ %8, %5 ], [ %2, %0 ]
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %5
11: ; preds = %5, %0
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int _wymix(int, int);
int /*<<< orphan*/ _wymum(int *, int *);
uint64_t wyhash64(uint64_t A, uint64_t B) {
  A ^= 0xa0761d6478bd642full;
  B ^= 0xe7037ed1a0b428dbull;
  _wymum(&A, &B);
  return _wymix(A ^ 0xa0761d6478bd642full, B ^ 0xe7037ed1a0b428dbull);
}


x86 assembly (clang, -O0):
<wyhash64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xa0761d6478bd642f,%rcx
1d 76 a0
xor    %rcx,%rax
mov    %eax,-0x4(%rbp)
movslq -0x8(%rbp),%rax
movabs $0xe7037ed1a0b428db,%rcx
7e 03 e7
xor    %rcx,%rax
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <_wymum@plt>
movslq -0x4(%rbp),%rax
movabs $0xa0761d6478bd642f,%rcx
1d 76 a0
xor    %rcx,%rax
mov    %eax,%edi
movslq -0x8(%rbp),%rax
movabs $0xe7037ed1a0b428db,%rcx
7e 03 e7
xor    %rcx,%rax
mov    %eax,%esi
call   1040 <_wymix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wyhash64>:
push   %rax
xor    $0x78bd642f,%edi
mov    %edi,0x4(%rsp)
xor    $0xa0b428db,%esi
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <_wymum@plt>
mov    $0x78bd642f,%edi
xor    0x4(%rsp),%edi
mov    $0xa0b428db,%esi
xor    (%rsp),%esi
call   1040 <_wymix@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wyhash64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = xor i64 %6, -6884282663029611473
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = xor i64 %10, -1800455987208640293
%12 = trunc i64 %11 to i32
store i32 %12, i32* %4
%13 = call i32 @_wymum(i32* %3, i32* %4)
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = xor i64 %15, -6884282663029611473
%17 = trunc i64 %16 to i32
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = xor i64 %19, -1800455987208640293
%21 = trunc i64 %20 to i32
%22 = call i32 @_wymix(i32 %17, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @wyhash64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = xor i32 %0, 2025677871
store i32 %5, i32* %3
%6 = xor i32 %1, -1598805797
store i32 %6, i32* %4
%7 = call i32 @_wymum(i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = xor i32 %8, 2025677871
%10 = load i32, i32* %4
%11 = xor i32 %10, -1598805797
%12 = call i32 @_wymix(i32 %9, i32 %11)
ret i32 %12
}
void timer_release_func(void *ud, void *arg) {
  (void)ud;
  (void)arg;
}


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

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

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

LLVM IR (-O2):
define void @timer_release_func(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset_volatile(void *, int /*<<< orphan*/, size_t);
void s_memclr(void *v, size_t n) { memset_volatile(v, 0, n); }


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

x86 assembly (clang, -O2):
<s_memclr>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <memset_volatile@plt>

LLVM IR (-O0):
define void @s_memclr(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 i32 @memset_volatile(i8* %5, i32 0, i64 %6)
ret void
}

LLVM IR (-O2):
define void @s_memclr(i8* %0, i64 %1) {
%3 = tail call i32 @memset_volatile(i8* %0, i32 0, i64 %1)
ret void
}
int ISP(char a) {
  switch (a) {
  case ')':
    return -2;
  case '^':
    return 3;
  case '*':
    return 2;
  case '/':
    return 2;
  case '+':
    return 1;
  case '-':
    return 1;
  case '(':
    return 0;
  case '$':
    return -1;
  }
}


x86 assembly (clang, -O0):
<ISP>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffdc,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3a,%eax
ja     118f <ISP+0x8f>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xfffffffe,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0x3,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0x2,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0x2,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0x1,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0x1,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0x0,-0x4(%rbp)
jmp    118f <ISP+0x8f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISP>:
mov    $0xfffffffe,%eax
add    $0xffffffdc,%edi
cmp    $0x3a,%edi
ja     112e <ISP+0x2e>
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @ISP(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %14 [
i32 41, label %6
i32 94, label %7
i32 42, label %8
i32 47, label %9
i32 43, label %10
i32 45, label %11
i32 40, label %12
i32 36, label %13
]
6: ; preds = %1
store i32 -2, i32* %2
br label %14
7: ; preds = %1
store i32 3, i32* %2
br label %14
8: ; preds = %1
store i32 2, i32* %2
br label %14
9: ; preds = %1
store i32 2, i32* %2
br label %14
10: ; preds = %1
store i32 1, i32* %2
br label %14
11: ; preds = %1
store i32 1, i32* %2
br label %14
12: ; preds = %1
store i32 0, i32* %2
br label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %14
14: ; preds = %6, %7, %8, %9, %10, %11, %12, %13, %1
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ISP(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %10 [
i32 36, label %9
i32 94, label %3
i32 42, label %4
i32 47, label %5
i32 43, label %6
i32 45, label %7
i32 40, label %8
]
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %3, %4, %5, %6, %7, %8, %9, %1
%11 = phi i32 [ -1, %9 ], [ 0, %8 ], [ 1, %7 ], [ 1, %6 ], [ 2, %5 ], [ 2, %4 ], [ 3, %3 ], [ -2, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x22() {
  Assert_real((isodigit(34) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              175, ("isodigit should be 0 for 0x22"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x22\00"
define void @t_isodigit_0x22() {
%1 = tail call i64 @isodigit(i32 34)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 175, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void initialize_mem_state(void *state) {
  memset(state, 0, 25 * sizeof(unsigned char) * 2);
}


x86 assembly (clang, -O0):
<initialize_mem_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_mem_state>:
xor    %esi,%esi
mov    $0x32,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @initialize_mem_state(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i32 0, i32 50)
ret void
}