xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _putchar(int);
void putchar(int c) { _putchar(c); }


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

x86 assembly (clang, -O2):
<putchar>:
jmp    1030 <_putchar@plt>

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

LLVM IR (-O2):
define void @putchar(i32 %0) {
%2 = tail call i32 @_putchar(i32 %0)
ret void
}
void f6(long long *p) { *p = 42; }


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

x86 assembly (clang, -O2):
<f6>:
movq   $0x2a,(%rdi)
ret

LLVM IR (-O0):
define void @f6(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
store i64 42, i64* %3
ret void
}

LLVM IR (-O2):
define void @f6(i64* nocapture writeonly %0) {
store i64 42, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ of_call_prom(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void of_exit(void) { of_call_prom("exit", 0, 0); }


x86 assembly (clang, -O0):
<of_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <of_call_prom@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<of_exit>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <of_call_prom@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"exit\00"
define void @of_exit() {
%1 = call i32 @of_call_prom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"exit\00"
define void @of_exit() {
%1 = tail call i32 @of_call_prom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NR_execveat;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, uintptr_t, uintptr_t, uintptr_t,
                           uintptr_t, uintptr_t);
void execveat(int fd, char *path, char **args, char **envp, int options) {
  syscall(__NR_execveat, (uintptr_t)fd, (uintptr_t)path, (uintptr_t)args,
          (uintptr_t)envp, (uintptr_t)options);
}


x86 assembly (clang, -O0):
<execveat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
movslq -0x4(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
movslq -0x24(%rbp),%r9
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execveat>:
mov    %rcx,%r10
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
movslq %edi,%rsi
movslq %r8d,%r9
mov    %eax,%edi
mov    %r10,%r8
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_execveat = global i32 0
define void @execveat(i32 %0, i8* %1, i8** %2, i8** %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i8**
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8** %2, i8*** %8
store i8** %3, i8*** %9
store i32 %4, i32* %10
%11 = load i32, i32* @__NR_execveat
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = load i8*, i8** %7
%15 = ptrtoint i8* %14 to i64
%16 = load i8**, i8*** %8
%17 = ptrtoint i8** %16 to i64
%18 = load i8**, i8*** %9
%19 = ptrtoint i8** %18 to i64
%20 = load i32, i32* %10
%21 = sext i32 %20 to i64
%22 = call i32 @syscall(i32 %11, i64 %13, i64 %15, i64 %17, i64 %19, i64 %21)
ret void
}

LLVM IR (-O2):
@__NR_execveat = global i32 0
define void @execveat(i32 %0, i8* %1, i8** %2, i8** %3, i32 %4) {
%6 = load i32, i32* @__NR_execveat
%7 = sext i32 %0 to i64
%8 = ptrtoint i8* %1 to i64
%9 = ptrtoint i8** %2 to i64
%10 = ptrtoint i8** %3 to i64
%11 = sext i32 %4 to i64
%12 = tail call i32 @syscall(i32 %6, i64 %7, i64 %8, i64 %9, i64 %10, i64 %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *s) { printf("usage: %s [-p P] key plaintext\n", s); }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"usage: %s [-p P] key plaintext\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"usage: %s [-p P] key plaintext\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
greeting(char *temp1, char *temp2) {
  char name[400];
  strcpy(name, temp2);
  printf("Hello %s %s\n", temp1, name);
}


x86 assembly (clang, -O0):
<greeting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x1b0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rsi
lea    -0x1b0(%rbp),%rdx
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greeting>:
push   %r14
push   %rbx
sub    $0x198,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
add    $0x198,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello %s %s\0A\00"
define i32 @greeting(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [400 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = getelementptr inbounds [400 x i8], [400 x i8]* %6, i64 0, i64 0
%8 = load i8*, i8** %5
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [400 x i8], [400 x i8]* %6, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello %s %s\0A\00"
define i32 @greeting(i8* %0, i8* %1) {
%3 = alloca [400 x i8]
%4 = getelementptr inbounds [400 x i8], [400 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %1)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret i32 undef
}
int lw_sock_send_str_ex(int sock, char *str) { return 0; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @launchControl() {
ret void
}
int Limit(int v, int max, int min) {
  return v > max ? max : (v < min ? min : v);
}


x86 assembly (clang, -O0):
<Limit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <Limit+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <Limit+0x47>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <Limit+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <Limit+0x41>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Limit>:
mov    %edx,%eax
cmp    %edx,%edi
cmovge %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @Limit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* %5
br label %22
12: ; preds = %3
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %6
br label %20
18: ; preds = %12
%19 = load i32, i32* %4
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i32 [ %11, %10 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @Limit(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = icmp slt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_escape() {
  printf("NOT IMPLEMENTED:"
         "pa_escape"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [26 x i8] c"NOT IMPLEMENTED:pa_escape\00"
define i32 @pa_escape() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int ut_ignore(const char *const fmt, va_list args) { return 0; }


x86 assembly (clang, -O0):
<ut_ignore>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ut_ignore(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main(int argc, char *argv[]) {
  int x = 0;
#pragma omp parallel
  {
#pragma omp atomic
    x++;
  }
  if (x != 1)
    abort();
  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   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     1147 <main+0x37>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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
store i32 0, i32* %6
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void latin_solver_debug(unsigned char *cube, int o) {}


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

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

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

LLVM IR (-O2):
define void @latin_solver_debug(i8* nocapture %0, i32 %1) {
ret void
}
void init_timer_stats(void) {}


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

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

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

LLVM IR (-O2):
define void @init_timer_stats() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WARN_ON_ONCE(int);
unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl) {
  if (chnl < 20)
    return ((0x00000) + 0xa02c00) + 0x10c + chnl * 4;
  WARN_ON_ONCE(chnl >= 32);
  return ((0x00000) + 0xa02c00) + 0x384 + (chnl - 20) * 4;
}


x86 assembly (clang, -O0):
<SCD_QUEUE_STATUS_BITS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jae    1138 <SCD_QUEUE_STATUS_BITS+0x28>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
add    $0xa02d0c,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <SCD_QUEUE_STATUS_BITS+0x4a>
cmpl   $0x20,-0x8(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <WARN_ON_ONCE@plt>
mov    -0x8(%rbp),%eax
sub    $0x14,%eax
shl    $0x2,%eax
add    $0xa02f84,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCD_QUEUE_STATUS_BITS>:
push   %rbx
mov    %edi,%ebx
mov    $0xa02d0c,%eax
cmp    $0x14,%edi
jb     1130 <SCD_QUEUE_STATUS_BITS+0x20>
xor    %edi,%edi
cmp    $0x20,%ebx
setae  %dil
call   1030 <WARN_ON_ONCE@plt>
mov    $0xa02f34,%eax
lea    (%rax,%rbx,4),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @SCD_QUEUE_STATUS_BITS(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 20
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = mul i32 %7, 4
%9 = add i32 10497292, %8
store i32 %9, i32* %2
br label %19
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp uge i32 %11, 32
%13 = zext i1 %12 to i32
%14 = call i32 @WARN_ON_ONCE(i32 %13)
%15 = load i32, i32* %3
%16 = sub i32 %15, 20
%17 = mul i32 %16, 4
%18 = add i32 10497924, %17
store i32 %18, i32* %2
br label %19
19: ; preds = %10, %6
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @SCD_QUEUE_STATUS_BITS(i32 %0) {
%2 = icmp ult i32 %0, 20
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 31
%5 = zext i1 %4 to i32
%6 = tail call i32 @WARN_ON_ONCE(i32 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ 10497844, %3 ], [ 10497292, %1 ]
%9 = shl i32 %0, 2
%10 = add i32 %9, %8
ret i32 %10
}
void deallocate(double **matrix, int row) {
  for (int i = 0; i < row; i++) {
    free(matrix[i]);
  }
  free(matrix);
}


x86 assembly (clang, -O0):
<deallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <deallocate+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <deallocate+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deallocate>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <deallocate+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <deallocate+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @deallocate(double** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = bitcast double** %0 to i8*
tail call void @free(i8* %7)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds double*, double** %0, i64 %9
%11 = bitcast double** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
void disable_interrupts() { __asm("cli"); }


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

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

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

LLVM IR (-O2):
define void @disable_interrupts() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
char *_strrev(char *);
char *strrev(char *str) { return _strrev(str); }


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

x86 assembly (clang, -O2):
<strrev>:
jmp    1030 <_strrev@plt>

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

LLVM IR (-O2):
define i8* @strrev(i8* %0) {
%2 = tail call i8* @_strrev(i8* %0)
ret i8* %2
}
int ipv4_to_i(char *addr, unsigned int ipv4_addr) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ipv4_to_i(i8* nocapture readnone %0, i32 %1) {
ret i32 1
}
int doendian(int c) {
  int x = 1;
  int e = *(char *)&x;
  if (c == '<')
    return !e;
  if (c == '>')
    return e;
  if (c == '=')
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<doendian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movsbl -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x3c,-0x8(%rbp)
jne    1135 <doendian+0x35>
cmpl   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <doendian+0x67>
cmpl   $0x3e,-0x8(%rbp)
jne    114a <doendian+0x4a>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <doendian+0x67>
cmpl   $0x3d,-0x8(%rbp)
jne    1160 <doendian+0x60>
movl   $0x0,-0x4(%rbp)
jmp    1167 <doendian+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @doendian(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
%6 = bitcast i32* %4 to i8*
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 60
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
store i32 %15, i32* %2
br label %26
16: ; preds = %1
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 62
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* %5
store i32 %20, i32* %2
br label %26
21: ; preds = %16
%22 = load i32, i32* %3
%23 = icmp eq i32 %22, 61
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 0, i32* %2
br label %26
25: ; preds = %21
store i32 0, i32* %2
br label %26
26: ; preds = %25, %24, %19, %11
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @doendian(i32 %0) {
%2 = icmp eq i32 %0, 62
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t detexPack32G8(int g) {
  return (uint32_t)g << 8;
}


x86 assembly (clang, -O0):
<detexPack32G8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexPack32G8>:
mov    %edi,%eax
shl    $0x8,%eax
ret

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

LLVM IR (-O2):
define i32 @detexPack32G8(i32 %0) {
%2 = shl i32 %0, 8
ret i32 %2
}
float __max(float a, float b) {
  if (a > b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<__max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    112c <__max+0x2c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1136 <__max+0x36>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__max>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__max(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp ogt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %5
store float %12, float* %3
br label %13
13: ; preds = %11, %9
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @__max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
float Sleef_acosf_u35(float x) { return __builtin_acosf(x); }


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

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

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

LLVM IR (-O2):
define float @Sleef_acosf_u35(float %0) {
%2 = tail call float @acosf(float %0)
ret float %2
}
/* Variables and functions */
int f399(int *);
int f400(int *p) { return f399(p); }


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

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

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

LLVM IR (-O2):
define i32 @f400(i32* %0) {
%2 = tail call i32 @f399(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DisplayMenu() {
  printf("------------Menu------------\n");
  printf("1. Enqueue an element.\n");
  printf("2. Dequeue an element.\n");
  printf("3. Display a queue.\n");
  printf("4. Exit.\n");
}


x86 assembly (clang, -O0):
<DisplayMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf18(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DisplayMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"------------Menu------------\0A\00"
@.str.1 = [24 x i8] c"1. Enqueue an element.\0A\00"
@.str.2 = [24 x i8] c"2. Dequeue an element.\0A\00"
@.str.3 = [21 x i8] c"3. Display a queue.\0A\00"
@.str.4 = [10 x i8] c"4. Exit.\0A\00"
define void @DisplayMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"------------Menu------------\00"
@str.5 = [23 x i8] c"1. Enqueue an element.\00"
@str.6 = [23 x i8] c"2. Dequeue an element.\00"
@str.7 = [20 x i8] c"3. Display a queue.\00"
@str.8 = [9 x i8] c"4. Exit.\00"
define void @DisplayMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(char *, char *);
void TEST_cpp_constant_expr(void) {
  test("a", "#if 1 + 2\n"
            "a\n"
            "#endif");
  test("b", "#if 1 - 1\n"
            "a\n"
            "#else\n"
            "b\n"
            "#endif");
  test("a", "#if 2 / 1\n"
            "a\n"
            "#else\n"
            "b\n"
            "#endif");
}


x86 assembly (clang, -O0):
<TEST_cpp_constant_expr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <test@plt>
lea    0xee7(%rip),%rdi
lea    0xee2(%rip),%rsi
call   1030 <test@plt>
lea    0xebf(%rip),%rdi
lea    0xeea(%rip),%rsi
call   1030 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TEST_cpp_constant_expr>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test@plt>
lea    0xee7(%rip),%rdi
lea    0xee2(%rip),%rsi
call   1030 <test@plt>
lea    0xef1(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <test@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [19 x i8] c"#if 1 + 2\0Aa\0A#endif\00"
@.str.2 = [2 x i8] c"b\00"
@.str.3 = [27 x i8] c"#if 1 - 1\0Aa\0A#else\0Ab\0A#endif\00"
@.str.4 = [27 x i8] c"#if 2 / 1\0Aa\0A#else\0Ab\0A#endif\00"
define void @TEST_cpp_constant_expr() {
%1 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [19 x i8] c"#if 1 + 2\0Aa\0A#endif\00"
@.str.2 = [2 x i8] c"b\00"
@.str.3 = [27 x i8] c"#if 1 - 1\0Aa\0A#else\0Ab\0A#endif\00"
@.str.4 = [27 x i8] c"#if 2 / 1\0Aa\0A#else\0Ab\0A#endif\00"
define void @TEST_cpp_constant_expr() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_byte(int);
void emit_word(int i) {
  emit_byte(i & 0xff);
  emit_byte((i >> 8) & 0xff);
}


x86 assembly (clang, -O0):
<emit_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <emit_byte@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <emit_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_word>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <emit_byte@plt>
movzbl %bh,%edi
pop    %rbx
jmp    1030 <emit_byte@plt>

LLVM IR (-O0):
define void @emit_word(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = call i32 @emit_byte(i32 %4)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = call i32 @emit_byte(i32 %8)
ret void
}

LLVM IR (-O2):
define void @emit_word(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @emit_byte(i32 %2)
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = tail call i32 @emit_byte(i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ uid_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ geteuid();
int /*<<< orphan*/ stderr;
int running_as_root(void) {
  uid_t uid = geteuid();
  if (uid != 0) {
    fprintf(stderr, "This program must be run as root.\n");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<running_as_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <geteuid@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115f <running_as_root+0x3f>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1166 <running_as_root+0x46>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<running_as_root>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <geteuid@plt>
test   %rax,%rax
je     1146 <running_as_root+0x26>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <fprintf@plt>
jmp    114b <running_as_root+0x2b>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"This program must be run as root.\0A\00"
define i32 @running_as_root() {
%1 = alloca i32
%2 = alloca i64
%3 = call i64 (...) @geteuid()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %10
9: ; preds = %0
store i32 1, i32* %1
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"This program must be run as root.\0A\00"
define i32 @running_as_root() {
%1 = tail call i64 (...) @geteuid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x92() {
  Assert_real((isprint(146) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              735, ("isprint should be 0 for 0x92"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x92>:
push   %rax
mov    $0x92,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2df,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x92\00"
define void @t_isprint_0x92() {
%1 = tail call i64 @isprint(i32 146)
%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 735, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
void random_color() {
  int number = rand() % 256 + 1;
  printf("\033[38;5;%dm", number);
}


x86 assembly (clang, -O0):
<random_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_color>:
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffff00,%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xeb8(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[38;5;%dm\00"
define void @random_color() {
%1 = alloca i32
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 256
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[38;5;%dm\00"
define void @random_color() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 256
%3 = add nsw i32 %2, 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __a_cas(int, int, int volatile *);
int a_cas(volatile int *p, int t, int s) {
  int old;
  for (;;) {
    if (!__a_cas(t, s, p))
      return t;
    if ((old = *p) != t)
      return old;
  }
}


x86 assembly (clang, -O0):
<a_cas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <__a_cas@plt>
cmp    $0x0,%eax
jne    1145 <a_cas+0x35>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <a_cas+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    -0x14(%rbp),%eax
je     1162 <a_cas+0x52>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <a_cas+0x57>
jmp    1122 <a_cas+0x12>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_cas>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %rdi,%rbp
nopl   0x0(%rax)
mov    %ebx,%edi
mov    %r14d,%esi
mov    %rbp,%rdx
call   1030 <__a_cas@plt>
test   %eax,%eax
je     113a <a_cas+0x2a>
mov    0x0(%rbp),%eax
cmp    %ebx,%eax
je     1120 <a_cas+0x10>
jmp    113c <a_cas+0x2c>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @a_cas(i32* %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @__a_cas(i32 %1, i32 %2, i32* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load volatile i32, i32* %0
%9 = icmp eq i32 %8, %1
br i1 %9, label %4, label %10
10: ; preds = %7, %4
%11 = phi i32 [ %1, %4 ], [ %8, %7 ]
ret i32 %11
}
main() { int T = 100, a = (T) + 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 100, i32* %1
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int __attribute__((visibility("default"))) lib3fun(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @lib3fun() {
ret i32 0
}

LLVM IR (-O2):
define i32 @lib3fun() {
ret i32 0
}
void I2CPECConfig(unsigned long ulBase, unsigned long ulConfig) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000000))) &=
      ~(0x00000800 | 0x00001000 | 0x00000020);
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= ulConfig;
}


x86 assembly (clang, -O0):
<I2CPECConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xffffffffffffe7df,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CPECConfig>:
andq   $0xffffffffffffe7df,(%rdi)
or     %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @I2CPECConfig(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 = add i64 %5, 0
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -6177
store volatile i64 %9, i64* %7
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = add i64 %11, 0
%13 = inttoptr i64 %12 to i64*
%14 = load volatile i64, i64* %13
%15 = or i64 %14, %10
store volatile i64 %15, i64* %13
ret void
}

LLVM IR (-O2):
define void @I2CPECConfig(i64 %0, i64 %1) {
%3 = inttoptr i64 %0 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -6177
store volatile i64 %5, i64* %3
%6 = load volatile i64, i64* %3
%7 = or i64 %6, %1
store volatile i64 %7, i64* %3
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
char toupper(char);
unsigned hexdigit(char c) {
  if (isdigit(c))
    return c - '0';
  return toupper(c) - 'A' + 10;
}


x86 assembly (clang, -O0):
<hexdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1150 <hexdigit+0x30>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1165 <hexdigit+0x45>
movsbl -0x5(%rbp),%edi
call   1040 <toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    $0xffffffd0,%ecx
test   %rax,%rax
jne    1141 <hexdigit+0x21>
movsbl %bl,%edi
call   1040 <toupper@plt>
mov    %eax,%ebx
mov    $0xffffffc9,%ecx
movsbl %bl,%eax
add    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hexdigit(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isdigit(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %17
11: ; preds = %1
%12 = load i8, i8* %3
%13 = call signext i8 @toupper(i8 signext %12)
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 65
%16 = add nsw i32 %15, 10
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @hexdigit(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call signext i8 @toupper(i8 signext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8 [ %5, %4 ], [ %0, %1 ]
%8 = phi i32 [ -55, %4 ], [ -48, %1 ]
%9 = sext i8 %7 to i32
%10 = add nsw i32 %8, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int getFileName(char openFile[], int length) {
  printf("enter file name to scramble\n");
  scanf("%s", openFile);
  return 0;
}


x86 assembly (clang, -O0):
<getFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1040 <scanf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileName>:
push   %rbx
mov    %rdi,%rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"enter file name to scramble\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @getFileName(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@str = [28 x i8] c"enter file name to scramble\00"
define i32 @getFileName(i8* %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 0
}
int mdp4_overlay_dtv_set(struct msm_fb_data_type *mfd,
                         struct mdp4_overlay_pipe *pipe) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
%struct.mdp4_overlay_pipe = type opaque
define i32 @mdp4_overlay_dtv_set(%struct.msm_fb_data_type* %0, %struct.mdp4_overlay_pipe* %1) {
%3 = alloca %struct.msm_fb_data_type*
%4 = alloca %struct.mdp4_overlay_pipe*
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %3
store %struct.mdp4_overlay_pipe* %1, %struct.mdp4_overlay_pipe** %4
ret i32 0
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
%struct.mdp4_overlay_pipe = type opaque
define i32 @mdp4_overlay_dtv_set(%struct.msm_fb_data_type* nocapture readnone %0, %struct.mdp4_overlay_pipe* nocapture readnone %1) {
ret i32 0
}
void foo_1_2_1_1_1_2_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_1_2_2_2_1() {
ret void
}
int is_signal(char character) {
  if (character == '+' || character == '-')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_signal>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
je     1124 <is_signal+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    1130 <is_signal+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_signal+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_signal>:
add    $0xd5,%dil
xor    %eax,%eax
test   $0xfd,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_signal(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
%6 = icmp eq i32 %5, 43
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_signal(i8 signext %0) {
%2 = icmp eq i8 %0, 45
%3 = icmp eq i8 %0, 43
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
char *hash_plugin_summary(void) {
  return ("sapg \t\tSAP CODVN G passwords plugin");
}


x86 assembly (clang, -O0):
<hash_plugin_summary>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"sapg \09\09SAP CODVN G passwords plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [36 x i8] c"sapg \09\09SAP CODVN G passwords plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0)
}
unsigned long usl_hash_end_name(unsigned long hash) {
  return (unsigned int)hash;
}


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

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

LLVM IR (-O0):
define i64 @usl_hash_end_name(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = zext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @usl_hash_end_name(i64 %0) {
%2 = and i64 %0, 4294967295
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ foo1();
int /*<<< orphan*/ foo2();
void _start() {
  foo1();
  foo2();
}


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

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

LLVM IR (-O0):
define void @_start() {
%1 = call i32 (...) @foo1()
%2 = call i32 (...) @foo2()
ret void
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @foo1()
%2 = tail call i32 (...) @foo2()
ret void
}