xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char const *, unsigned int);
void Sys_MemMove(char *to, const char *from, unsigned bytes) {
  memmove(to, from, bytes);
}


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

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

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

LLVM IR (-O2):
define void @Sys_MemMove(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memmove(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
double cons2prim_noble2d_hlld(double *, double *);
double cons2prim_hlld(double *U, double *p) {
  return cons2prim_noble2d_hlld(U, p);
}


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

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

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

LLVM IR (-O2):
define double @cons2prim_hlld(double* %0, double* %1) {
%3 = tail call double @cons2prim_noble2d_hlld(double* %0, double* %1)
ret double %3
}
int lex_isstring(int ch) { return ch == '"' || ch == '\''; }


x86 assembly (clang, -O0):
<lex_isstring>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x22,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <lex_isstring+0x20>
cmpl   $0x27,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lex_isstring>:
cmp    $0x22,%edi
sete   %al
cmp    $0x27,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @lex_isstring(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 34
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 39
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @lex_isstring(i32 %0) {
%2 = icmp eq i32 %0, 34
%3 = icmp eq i32 %0, 39
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
void get_system_time(struct timespec *time) {
  clock_gettime(CLOCK_REALTIME, time);
}


x86 assembly (clang, -O0):
<get_system_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_system_time>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_gettime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @get_system_time(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @clock_gettime(i32 %3, %struct.timespec* %4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @get_system_time(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @clock_gettime(i32 %2, %struct.timespec* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xd5() {
  Assert_real((isspace(213) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1070, ("isspace should be 0 for 0xd5"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xd5\00"
define void @t_isspace_0xd5() {
%1 = tail call i64 @isspace(i32 213)
%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 1070, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void libpla_io_key_info_uninit(struct key_info *ki) { return; }


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

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

LLVM IR (-O0):
%struct.key_info = type opaque
define void @libpla_io_key_info_uninit(%struct.key_info* %0) {
%2 = alloca %struct.key_info*
store %struct.key_info* %0, %struct.key_info** %2
ret void
}

LLVM IR (-O2):
%struct.key_info = type opaque
define void @libpla_io_key_info_uninit(%struct.key_info* nocapture %0) {
ret void
}
void free_2d_uchar(unsigned char **ptr, long height) {
  int i;
  for (i = 0; i < height; i++) {
    free(ptr[i]);
  }
  free(ptr);
}


x86 assembly (clang, -O0):
<free_2d_uchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1154 <free_2d_uchar+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <free_2d_uchar+0x17>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @free_2d_uchar(i8** nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
tail call void @free(i8* %7)
%8 = add nuw nsw i64 %5, 1
%9 = icmp eq i64 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = bitcast i8** %0 to i8*
tail call void @free(i8* %11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int ftell(int /*<<< orphan*/ *);
int getFileSize(FILE *f) {
  int currPos = ftell(f);
  fseek(f, 0, SEEK_END);
  int size = ftell(f);
  fseek(f, 0, currPos);
  return size;
}


x86 assembly (clang, -O0):
<getFileSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileSize>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14d,%edx
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i32 @getFileSize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %4
%12 = load i32*, i32** %2
%13 = load i32, i32* %3
%14 = call i32 @fseek(i32* %12, i32 0, i32 %13)
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i32 @getFileSize(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
ret i32 %5
}
void init_variable_array(int len) {
  int x = 2 * len;
  int a[len + x + 1];
}


x86 assembly (clang, -O0):
<init_variable_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @init_variable_array(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = mul nsw i32 2, %6
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = add nsw i32 %10, 1
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %4
%14 = alloca i32, i64 %12
store i64 %12, i64* %5
%15 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @init_variable_array(i32 %0) {
ret void
}
/* Variables and functions */
int target_xfer_memory(unsigned long long, char *, int, int);
int target_write_memory(unsigned long long memaddr, char *myaddr, int len) {
  return target_xfer_memory(memaddr, myaddr, len, 1);
}


x86 assembly (clang, -O0):
<target_write_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <target_xfer_memory@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_write_memory>:
mov    $0x1,%ecx
jmp    1030 <target_xfer_memory@plt>

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

LLVM IR (-O2):
define i32 @target_write_memory(i64 %0, i8* %1, i32 %2) {
%4 = tail call i32 @target_xfer_memory(i64 %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
int littlebinary2i(char *binary) {
  int result = 0;
  int len = sizeof(result);
  int exp = 1;
  int i;
  for (i = 0; i < len; ++i) {
    result += binary[i] * exp;
    exp <<= 8;
  }
  return result;
}


x86 assembly (clang, -O0):
<littlebinary2i>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115d <littlebinary2i+0x5d>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
imul   -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1124 <littlebinary2i+0x24>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<littlebinary2i>:
movsbl (%rdi),%eax
movsbl 0x1(%rdi),%ecx
shl    $0x8,%ecx
add    %eax,%ecx
movsbl 0x2(%rdi),%edx
shl    $0x10,%edx
add    %ecx,%edx
movzbl 0x3(%rdi),%eax
shl    $0x18,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @littlebinary2i(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = shl nsw i32 %6, 8
%8 = add nsw i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl nsw i32 %11, 16
%13 = add nsw i32 %12, %8
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = shl nsw i32 %16, 24
%18 = add nsw i32 %17, %13
ret i32 %18
}
void gtk_spin_button_set_wrap() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_set_wrap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, char, char);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ usleep(int);
void colora_dbg(int x, int y, char car) {
  move(y + 1, (x * 2) + 1);
  printw("%c%c", car, car);
  refresh();
  usleep(1000 * 10);
}


x86 assembly (clang, -O0):
<colora_dbg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
add    $0x1,%esi
call   1060 <move@plt>
mov    -0x9(%rbp),%al
lea    0xe8f(%rip),%rdi
movsbl %al,%esi
movsbl -0x9(%rbp),%edx
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    $0x2710,%edi
call   1050 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<colora_dbg>:
push   %rbx
mov    %edx,%ebx
lea    0x1(%rsi),%eax
lea    (%rdi,%rdi,1),%esi
add    $0x1,%esi
mov    %eax,%edi
call   1060 <move@plt>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    $0x2710,%edi
pop    %rbx
jmp    1050 <usleep@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%c%c\00"
define void @colora_dbg(i32 %0, i32 %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = mul nsw i32 %9, 2
%11 = add nsw i32 %10, 1
%12 = call i32 @move(i32 %8, i32 %11)
%13 = load i8, i8* %6
%14 = load i8, i8* %6
%15 = call i32 @printw(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %13, i8 signext %14)
%16 = call i32 (...) @refresh()
%17 = call i32 @usleep(i32 10000)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%c%c\00"
define void @colora_dbg(i32 %0, i32 %1, i8 signext %2) {
%4 = add nsw i32 %1, 1
%5 = shl nsw i32 %0, 1
%6 = or i32 %5, 1
%7 = tail call i32 @move(i32 %4, i32 %6)
%8 = tail call i32 @printw(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %2, i8 signext %2)
%9 = tail call i32 (...) @refresh()
%10 = tail call i32 @usleep(i32 10000)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fortune_cookie(char msg[]) {
  printf("Message reads: %s\n", msg);
  printf("msg occupies %i bytes\n", sizeof(msg));
}


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

x86 assembly (clang, -O2):
<fortune_cookie>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Message reads: %s\0A\00"
@.str.1 = [23 x i8] c"msg occupies %i bytes\0A\00"
define void @fortune_cookie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 8)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Message reads: %s\0A\00"
@.str.1 = [23 x i8] c"msg occupies %i bytes\0A\00"
define void @fortune_cookie(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i64 8)
ret void
}
void DBNC_Deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @DBNC_Deinit() {
ret void
}
int syscall_exit(int status) {
  int ret;
  __asm__ volatile("syscall"
                   : "=a"(ret)
                   : "a"(0x0), "D"(status)
                   : "%rcx", "%r11");
  return ret;
}


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

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

LLVM IR (-O0):
define i32 @syscall_exit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm sideeffect "syscall", "={ax},{ax},{di},~{rcx},~{r11},~{dirflag},~{fpsr},~{flags}"(i32 0, i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @syscall_exit(i32 %0) {
%2 = tail call i32 asm sideeffect "syscall", "={ax},{ax},{di},~{rcx},~{r11},~{dirflag},~{fpsr},~{flags}"(i32 0, i32 %0)
ret i32 %2
}
void ff_vdpau_h264_picture_complete() {}


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

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

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

LLVM IR (-O2):
define void @ff_vdpau_h264_picture_complete() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int Reader_io_read(void *in) {
  char c;
  read(0, &c, 1);
  return c;
}


x86 assembly (clang, -O0):
<Reader_io_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reader_io_read>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
movsbl 0x7(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Reader_io_read(i8* nocapture readnone %0) {
%2 = alloca i8
%3 = call i32 @read(i32 0, i8* %2, i32 1)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printError(char message[], int amount) {
  for (int i = 0; i < amount; i++)
    printf("ERROR: %s", message);
}


x86 assembly (clang, -O0):
<printError>:
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    1150 <printError+0x40>
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printError+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printError>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1140 <printError+0x30>
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xedb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <printError+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"ERROR: %s\00"
define void @printError(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %4, label %5
}
/* Variables and functions */
int syscall(int, int, int /*<<< orphan*/);
int dup(int fd) { return syscall(42, fd, 0); }


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

x86 assembly (clang, -O2):
<dup>:
mov    %edi,%esi
mov    $0x2a,%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 @syscall(i32 42, i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
div() { callrts("ccdiv"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"ccdiv\00"
define i32 @div() {
%1 = alloca i32
%2 = call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"ccdiv\00"
define i32 @div() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int cmp_item32(const void *a, const void *b) { return memcmp(a, b, 4); }


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

x86 assembly (clang, -O2):
<cmp_item32>:
mov    $0x4,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @cmp_item32(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 @memcmp(i8* %5, i8* %6, i32 4)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cmp_item32(i8* %0, i8* %1) {
%3 = tail call i32 @memcmp(i8* %0, i8* %1, i32 4)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ csolve_assert(int);
int /*<<< orphan*/ inca(int *);
int /*<<< orphan*/ incb(int *);
scalar_t__ malloc(int);
void main() {
  int *r;
  r = (int *)malloc(4);
  *r = 0;
  inca(r);
  incb(r);
  csolve_assert(*r >= 0);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <inca@plt>
mov    -0x8(%rbp),%rdi
call   1060 <incb@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <csolve_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
mov    %rax,%rdi
call   1030 <inca@plt>
mov    %rbx,%rdi
call   1060 <incb@plt>
mov    (%rbx),%edi
not    %edi
shr    $0x1f,%edi
pop    %rbx
jmp    1050 <csolve_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 0, i32* %4
%5 = load i32*, i32** %1
%6 = call i32 @inca(i32* %5)
%7 = load i32*, i32** %1
%8 = call i32 @incb(i32* %7)
%9 = load i32*, i32** %1
%10 = load i32, i32* %9
%11 = icmp sge i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @csolve_assert(i32 %12)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 0, i32* %2
%3 = tail call i32 @inca(i32* %2)
%4 = tail call i32 @incb(i32* %2)
%5 = load i32, i32* %2
%6 = xor i32 %5, -1
%7 = lshr i32 %6, 31
%8 = tail call i32 @csolve_assert(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yield(int);
void h() {
  printf("Hi, I'm h!\n");
  yield(1);
  printf("Finishing h\n");
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <yield@plt>
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hi, I'm h!\0A\00"
@.str.1 = [13 x i8] c"Finishing h\0A\00"
define void @h() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @yield(i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Hi, I'm h!\00"
@str.2 = [12 x i8] c"Finishing h\00"
define void @h() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @yield(i32 1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *utilStrRTrimChar(char *, char *);
char *utilStrRTrim(char *sStr) { return utilStrRTrimChar(sStr, " \t\r\n"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c" \09\0D\0A\00"
define i8* @utilStrRTrim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @utilStrRTrimChar(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [5 x i8] c" \09\0D\0A\00"
define i8* @utilStrRTrim(i8* %0) {
%2 = tail call i8* @utilStrRTrimChar(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Type definitions */
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void idris2_sleep(int sec) {
  struct timespec t;
  t.tv_sec = sec;
  t.tv_nsec = 0;
  nanosleep(&t, NULL);
}


x86 assembly (clang, -O0):
<idris2_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idris2_sleep>:
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @idris2_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %6
%7 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @idris2_sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %0, i32* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %5
%6 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xe9() {
  Assert_real((isodigit(233) == 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",
              1170, ("isodigit should be 0 for 0xe9"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xe9>:
push   %rax
mov    $0xe9,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x492,%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 0xe9\00"
define void @t_isodigit_0xe9() {
%1 = call i64 @isodigit(i32 233)
%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 1170, 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 0xe9\00"
define void @t_isodigit_0xe9() {
%1 = tail call i64 @isodigit(i32 233)
%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 1170, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void shutdown_output(int File) {
  if (close(File) == -1) {
    perror("Output File");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<shutdown_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1166 <shutdown_output+0x36>
lea    0xead(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shutdown_output>:
push   %rax
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     113d <shutdown_output+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Output File\00"
@EXIT_FAILURE = global i32 0
define void @shutdown_output(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Output File\00"
@EXIT_FAILURE = global i32 0
define void @shutdown_output(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
unsigned short get_uint16(unsigned char *p) { return (p[0] << 8) + p[1]; }


x86 assembly (clang, -O0):
<get_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint16>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @get_uint16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add nsw i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @get_uint16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
unsigned int fib(unsigned int n) { return n < 2 ? n : fib(n - 1) + fib(n - 2); }


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jae    1130 <fib+0x20>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1153 <fib+0x43>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jb     1132 <fib+0x22>
xor    %ebp,%ebp
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1120 <fib+0x10>
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fib(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 2
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %15
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub i32 %8, 1
%10 = call i32 @fib(i32 %9)
%11 = load i32, i32* %2
%12 = sub i32 %11, 2
%13 = call i32 @fib(i32 %12)
%14 = add i32 %10, %13
br label %15
15: ; preds = %7, %5
%16 = phi i32 [ %6, %5 ], [ %14, %7 ]
ret i32 %16
}

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add i32 %4, -2
%9 = add i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ locate(int);
void op_locate() { locate(1); }


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

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

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

LLVM IR (-O2):
define void @op_locate() {
%1 = tail call i32 @locate(i32 1)
ret void
}
void cpuidle_unregister_governor(struct cpuidle_governor *gov) {}


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

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

LLVM IR (-O0):
%struct.cpuidle_governor = type opaque
define void @cpuidle_unregister_governor(%struct.cpuidle_governor* %0) {
%2 = alloca %struct.cpuidle_governor*
store %struct.cpuidle_governor* %0, %struct.cpuidle_governor** %2
ret void
}

LLVM IR (-O2):
%struct.cpuidle_governor = type opaque
define void @cpuidle_unregister_governor(%struct.cpuidle_governor* nocapture %0) {
ret void
}
unsigned char bit_field(unsigned char oct, int start, int num) {
  unsigned char mask = (0x1 << num) - 1;
  return (oct >> start) & mask;
}


x86 assembly (clang, -O0):
<bit_field>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %al,-0xd(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_field>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @bit_field(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = shl i32 1, %8
%10 = sub nsw i32 %9, 1
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = load i32, i32* %5
%15 = ashr i32 %13, %14
%16 = load i8, i8* %7
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @bit_field(i8 zeroext %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = zext i8 %0 to i32
%6 = lshr i32 %5, %1
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
int modify(int hexcode) {
  if (hexcode >= 0 && hexcode <= 9)
    return hexcode + '0';
  else if (hexcode >= 10 && hexcode <= 15)
    return (hexcode + 'a') - 10;
  return 0;
}


x86 assembly (clang, -O0):
<modify>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <modify+0x29>
cmpl   $0x9,-0x8(%rbp)
jg     1129 <modify+0x29>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <modify+0x5a>
cmpl   $0xa,-0x8(%rbp)
jl     114e <modify+0x4e>
cmpl   $0xf,-0x8(%rbp)
jg     114e <modify+0x4e>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <modify+0x5a>
jmp    1153 <modify+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modify>:
mov    %edi,%eax
cmp    $0x9,%edi
ja     110b <modify+0xb>
add    $0x30,%eax
ret
lea    -0xa(%rax),%ecx
add    $0x57,%eax
xor    %edx,%edx
cmp    $0x6,%ecx
cmovb  %eax,%edx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @modify(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = add nuw nsw i32 %0, 48
br label %10
5: ; preds = %1
%6 = add i32 %0, -10
%7 = icmp ult i32 %6, 6
%8 = add nsw i32 %0, 87
%9 = select i1 %7, i32 %8, i32 0
br label %10
10: ; preds = %5, %3
%11 = phi i32 [ %4, %3 ], [ %9, %5 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_ax_memoffs16(unsigned short *memoffs16) {
  put8(0x66);
  put8(0xA1);
  put32((unsigned int)(memoffs16));
}


x86 assembly (clang, -O0):
<mov_ax_memoffs16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0xa1,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_ax_memoffs16>:
push   %rbx
mov    %rdi,%rbx
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0xa1,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_ax_memoffs16(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = call i32 @put8(i32 102)
%4 = call i32 @put8(i32 161)
%5 = load i16*, i16** %2
%6 = ptrtoint i16* %5 to i32
%7 = call i32 @put32(i32 %6)
ret void
}

LLVM IR (-O2):
define void @mov_ax_memoffs16(i16* %0) {
%2 = tail call i32 @put8(i32 102)
%3 = tail call i32 @put8(i32 161)
%4 = ptrtoint i16* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @put32(i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t unaligned_read_le16(const void *_u) {
  const uint8_t *u = _u;
  return (((uint16_t)u[1]) << 8) | ((uint16_t)u[0]);
}


x86 assembly (clang, -O0):
<unaligned_read_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_read_le16>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @unaligned_read_le16(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 8
%11 = load i64*, i64** %3
%12 = getelementptr inbounds i64, i64* %11, i64 0
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @unaligned_read_le16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64, i64* %2
%9 = trunc i64 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}