xunge/DecIR huggingface dataset:
/* Variables and functions */
int can_direct_read(int address) {
  if ((address & 0xDFF00000) == 0x200000)
    return 1;
  if ((address & 0xDE000000) == 0x6000000)
    return 1;
  if ((address & 0xDFF00000) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<can_direct_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xdff00000,%eax
cmp    $0x200000,%eax
jne    1126 <can_direct_read+0x26>
movl   $0x1,-0x4(%rbp)
jmp    1169 <can_direct_read+0x69>
mov    -0x8(%rbp),%eax
and    $0xde000000,%eax
cmp    $0x6000000,%eax
jne    1145 <can_direct_read+0x45>
movl   $0x1,-0x4(%rbp)
jmp    1169 <can_direct_read+0x69>
mov    -0x8(%rbp),%eax
and    $0xdff00000,%eax
cmp    $0x0,%eax
jne    1162 <can_direct_read+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <can_direct_read+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_direct_read>:
mov    %edi,%eax
and    $0xde000000,%eax
cmp    $0x6000000,%eax
sete   %al
test   $0xdfd00000,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @can_direct_read(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, -537919488
%6 = icmp eq i32 %5, 2097152
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, -570425344
%11 = icmp eq i32 %10, 100663296
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = and i32 %14, -537919488
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %2
br label %19
18: ; preds = %13
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @can_direct_read(i32 %0) {
%2 = and i32 %0, -540016640
%3 = and i32 %0, -570425344
%4 = icmp eq i32 %3, 100663296
%5 = icmp eq i32 %2, 0
%6 = or i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void mostra_int(void *info) {
  int *p = (int *)info;
  printf("%i\n", *p);
}


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

x86 assembly (clang, -O2):
<mostra_int>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define void @mostra_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define void @mostra_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int die = -999;
  srand(time(NULL));
  die = rand() % 6 + 1;
  printf("%d\n", die);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfffffc19,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -999, i32* %2
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 6
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ display_array();
int /*<<< orphan*/ shellsort();
int main(int argv, char *argc[]) {
  shellsort();
  display_array();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <shellsort@plt>
xor    %eax,%eax
call   1030 <display_array@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @shellsort()
%4 = tail call i32 (...) @display_array()
ret i32 0
}
void seq_read(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<seq_read>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_read>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.seq_read = [9 x i8] c"seq_read\00"
define void @seq_read() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.seq_read, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.seq_read = [9 x i8] c"seq_read\00"
define void @seq_read() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.seq_read, i64 0, i64 0))
ret void
}
void security_ip_decapsulate(struct sk_buff *skb) {}


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

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

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

LLVM IR (-O2):
%struct.sk_buff = type opaque
define void @security_ip_decapsulate(%struct.sk_buff* nocapture %0) {
ret void
}
/* Type definitions */
struct stat {
  size_t st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char const *, struct stat *);
size_t get_file_size(const char *filename) {
  struct stat st;
  stat(filename, &st);
  return st.st_size;
}


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

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x7d() {
  Assert_real((isxdigit(125) == 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_isxdigit.c",
              630, ("isxdigit should be 0 for }"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x276,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for }\00"
define void @t_isxdigit_0x7d() {
%1 = call i64 @isxdigit(i32 125)
%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 630, i8* getelementptr inbounds ([27 x i8], [27 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for }\00"
define void @t_isxdigit_0x7d() {
%1 = tail call i64 @isxdigit(i32 125)
%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 630, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ jstp_tx_char(char const);
void jstp_tx_str(const char *str) {
  const char *c = str;
  jstp_tx_char('\"');
  while (*c) {
    jstp_tx_char(*c);
    c++;
  }
  jstp_tx_char('\"');
}


x86 assembly (clang, -O0):
<jstp_tx_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x22,%edi
call   1030 <jstp_tx_char@plt>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <jstp_tx_str+0x48>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <jstp_tx_char@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112e <jstp_tx_str+0x1e>
mov    $0x22,%edi
call   1030 <jstp_tx_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jstp_tx_str>:
push   %rbx
mov    %rdi,%rbx
mov    $0x22,%edi
call   1030 <jstp_tx_char@plt>
mov    (%rbx),%al
test   %al,%al
je     1143 <jstp_tx_str+0x33>
add    $0x1,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <jstp_tx_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <jstp_tx_str+0x20>
mov    $0x22,%edi
pop    %rbx
jmp    1030 <jstp_tx_char@plt>

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

LLVM IR (-O2):
define void @jstp_tx_str(i8* nocapture %0) {
%2 = tail call i32 @jstp_tx_char(i8 signext 34)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %10, %5 ], [ %3, %1 ]
%7 = phi i8* [ %9, %5 ], [ %0, %1 ]
%8 = tail call i32 @jstp_tx_char(i8 signext %6)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = tail call i32 @jstp_tx_char(i8 signext 34)
ret void
}
/* Variables and functions */
int identity(char);
char tand1(char x) {
  char y = (identity(x) & 1) ? 42 : 43;
  return y;
}


x86 assembly (clang, -O0):
<tand1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <identity@plt>
mov    %eax,%edx
and    $0x1,%edx
mov    $0x2b,%eax
mov    $0x2a,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tand1>:
push   %rax
call   1030 <identity@plt>
and    $0x1,%al
xor    $0x2b,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @tand1(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @identity(i8 signext %4)
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 42, i32 43
%10 = trunc i32 %9 to i8
store i8 %10, i8* %3
%11 = load i8, i8* %3
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @tand1(i8 signext %0) {
%2 = tail call i32 @identity(i8 signext %0)
%3 = trunc i32 %2 to i8
%4 = and i8 %3, 1
%5 = xor i8 %4, 43
ret i8 %5
}
/* Type definitions */
struct cdb_make {
  int dummy;
};

/* Variables and functions */
int cdb_make_finish_internal(struct cdb_make *);
int /*<<< orphan*/ cdb_make_free(struct cdb_make *);
int cdb_make_finish(struct cdb_make *cdbmp) {
  int r = cdb_make_finish_internal(cdbmp);
  cdb_make_free(cdbmp);
  return r;
}


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

x86 assembly (clang, -O2):
<cdb_make_finish>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <cdb_make_finish_internal@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <cdb_make_free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.cdb_make = type { i32 }
define i32 @cdb_make_finish(%struct.cdb_make* %0) {
%2 = alloca %struct.cdb_make*
%3 = alloca i32
store %struct.cdb_make* %0, %struct.cdb_make** %2
%4 = load %struct.cdb_make*, %struct.cdb_make** %2
%5 = call i32 @cdb_make_finish_internal(%struct.cdb_make* %4)
store i32 %5, i32* %3
%6 = load %struct.cdb_make*, %struct.cdb_make** %2
%7 = call i32 @cdb_make_free(%struct.cdb_make* %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.cdb_make = type { i32 }
define i32 @cdb_make_finish(%struct.cdb_make* %0) {
%2 = tail call i32 @cdb_make_finish_internal(%struct.cdb_make* %0)
%3 = tail call i32 @cdb_make_free(%struct.cdb_make* %0)
ret i32 %2
}
int fun191() { return 191; }


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

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

LLVM IR (-O0):
define i32 @fun191() {
ret i32 191
}

LLVM IR (-O2):
define i32 @fun191() {
ret i32 191
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xdd() {
  Assert_real((isspace(221) == 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",
              1110, ("isspace should be 0 for 0xdd"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xdd>:
push   %rax
mov    $0xdd,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x456,%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 0xdd\00"
define void @t_isspace_0xdd() {
%1 = call i64 @isspace(i32 221)
%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 1110, 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 0xdd\00"
define void @t_isspace_0xdd() {
%1 = tail call i64 @isspace(i32 221)
%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 1110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EINVAL;
int errno;
int /*<<< orphan*/ printf(char *, int);
int main() {
  errno = EINVAL;
  printf("errno: %d\n", errno);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    %esi,(%rax)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@.str = [11 x i8] c"errno: %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @EINVAL
store i32 %1, i32* @errno
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int is_little_endian(void) {
  return 1;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @is_little_endian() {
ret i32 1
}

LLVM IR (-O2):
define i32 @is_little_endian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_typescript_comment_entities();
int /*<<< orphan*/ test_typescript_comments();
void all_typescript_tests() {
  test_typescript_comments();
  test_typescript_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_typescript_tests() {
%1 = call i32 (...) @test_typescript_comments()
%2 = call i32 (...) @test_typescript_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_typescript_tests() {
%1 = tail call i32 (...) @test_typescript_comments()
%2 = tail call i32 (...) @test_typescript_comment_entities()
ret void
}
/* Variables and functions */
char *GetConfigValue(char const *, char const *, char *);
int ConfigValueStr(const char *blockName, const char *keyName,
                   const char **ret) {
  const char *val = GetConfigValue(blockName, keyName, "");
  if (!val[0])
    return 0;
  *ret = val;
  return 1;
}


x86 assembly (clang, -O0):
<ConfigValueStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xecd(%rip),%rdx
call   1030 <GetConfigValue@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1155 <ConfigValueStr+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1167 <ConfigValueStr+0x57>
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConfigValueStr>:
push   %rbx
mov    %rdx,%rbx
lea    0xee5(%rip),%rdx
call   1030 <GetConfigValue@plt>
cmpb   $0x0,(%rax)
je     112f <ConfigValueStr+0x1f>
mov    %rax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @ConfigValueStr(i8* %0, i8* %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @GetConfigValue(i8* %9, i8* %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = icmp ne i8 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %3
store i32 0, i32* %4
br label %20
17: ; preds = %3
%18 = load i8*, i8** %8
%19 = load i8**, i8*** %7
store i8* %18, i8** %19
store i32 1, i32* %4
br label %20
20: ; preds = %17, %16
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @ConfigValueStr(i8* %0, i8* %1, i8** nocapture writeonly %2) {
%4 = tail call i8* @GetConfigValue(i8* %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %3
store i8* %4, i8** %2
br label %8
8: ; preds = %3, %7
%9 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ IO_put_low_byte_hex(int);
void IO_put_low_16b_hex(int w) {
  IO_put_low_byte_hex(w >> 8);
  IO_put_low_byte_hex(w);
}


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

x86 assembly (clang, -O2):
<IO_put_low_16b_hex>:
push   %rbx
mov    %edi,%ebx
sar    $0x8,%edi
call   1030 <IO_put_low_byte_hex@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <IO_put_low_byte_hex@plt>

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

LLVM IR (-O2):
define void @IO_put_low_16b_hex(i32 %0) {
%2 = ashr i32 %0, 8
%3 = tail call i32 @IO_put_low_byte_hex(i32 %2)
%4 = tail call i32 @IO_put_low_byte_hex(i32 %0)
ret void
}
void qsim_out(char i) {
  asm("cpuid;" : : "a"((0xff & i) | 0xc501e000) : "%ebx", "%edx", "%ecx");
}


x86 assembly (clang, -O0):
<qsim_out>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %dil,%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
and    $0xff,%eax
or     $0xc501e000,%eax
cpuid
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsim_out>:
push   %rbx
movzbl %dil,%eax
or     $0xc501e000,%eax
cpuid
pop    %rbx
ret

LLVM IR (-O0):
define void @qsim_out(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 255, %4
%6 = or i32 %5, -989732864
ret void
}

LLVM IR (-O2):
define void @qsim_out(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = or i32 %2, -989732864
tail call void asm sideeffect "cpuid;", "{ax},~{ebx},~{edx},~{ecx},~{dirflag},~{fpsr},~{flags}"(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TKSPI_Deselect();
int /*<<< orphan*/ TKSPI_Select();
void TKSPI_PowerOff(void) {
  TKSPI_Select();
  TKSPI_Deselect();
}


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

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

LLVM IR (-O0):
define void @TKSPI_PowerOff() {
%1 = call i32 (...) @TKSPI_Select()
%2 = call i32 (...) @TKSPI_Deselect()
ret void
}

LLVM IR (-O2):
define void @TKSPI_PowerOff() {
%1 = tail call i32 (...) @TKSPI_Select()
%2 = tail call i32 (...) @TKSPI_Deselect()
ret void
}
void HMAC_Update(void) {}


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

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

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

LLVM IR (-O2):
define void @HMAC_Update() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void __attribute__((__noreturn__)) yy_fatal_error(const char *msg) {
  (void)fprintf(stderr, "%s\n", msg);
  exit(2);
}


x86 assembly (clang, -O0):
<yy_fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yy_fatal_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @yy_fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @yy_fatal_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 2)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int sockresolve(char const *, char const *, int /*<<< orphan*/ *,
                int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/,
                int);
int udpresolve(const char *hostname, const char *service, uint32_t *ip,
               uint16_t *port, int passive) {
  return sockresolve(hostname, service, ip, port, AF_INET, SOCK_DGRAM, passive);
}


x86 assembly (clang, -O0):
<udpresolve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x2ea5(%rip),%rax
mov    (%rax),%r8d
mov    0x2e93(%rip),%rax
mov    (%rax),%r9d
mov    -0x24(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <sockresolve@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udpresolve>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%r10d
mov    0x2ebe(%rip),%rax
mov    (%rax),%r9d
mov    %r8d,(%rsp)
mov    %r10d,%r8d
call   1030 <sockresolve@plt>
pop    %rcx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @udpresolve(i8* %0, i8* %1, i32* %2, i32* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i32*, i32** %8
%14 = load i32*, i32** %9
%15 = load i32, i32* @AF_INET
%16 = load i32, i32* @SOCK_DGRAM
%17 = load i32, i32* %10
%18 = call i32 @sockresolve(i8* %11, i8* %12, i32* %13, i32* %14, i32 %15, i32 %16, i32 %17)
ret i32 %18
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @udpresolve(i8* %0, i8* %1, i32* %2, i32* %3, i32 %4) {
%6 = load i32, i32* @AF_INET
%7 = load i32, i32* @SOCK_DGRAM
%8 = tail call i32 @sockresolve(i8* %0, i8* %1, i32* %2, i32* %3, i32 %6, i32 %7, i32 %4)
ret i32 %8
}
/* Variables and functions */
int api3(int, int, int, int);
int create_window(int w, int h, const char *name) {
  return api3(1000, w, h, (int)name);
}


x86 assembly (clang, -O0):
<create_window>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x3e8,%edi
call   1030 <api3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_window>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x3e8,%edi
jmp    1030 <api3@plt>

LLVM IR (-O0):
define i32 @create_window(i32 %0, i32 %1, i8* %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* %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @api3(i32 1000, i32 %7, i32 %8, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @create_window(i32 %0, i32 %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @api3(i32 1000, i32 %0, i32 %1, i32 %5)
ret i32 %6
}
/* Variables and functions */
int error(int);
int /*<<< orphan*/ fixed();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int err = 0;
  int version = 1;
  error(err);
  error(version);
  printf("This is"
         " version %d",
         error(version));
  fixed();
  return err;
}


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)
movl   $0x1,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <error@plt>
mov    -0x18(%rbp),%edi
call   1050 <error@plt>
mov    -0x18(%rbp),%edi
call   1050 <error@plt>
mov    %eax,%esi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <fixed@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <error@plt>
mov    $0x1,%edi
call   1050 <error@plt>
mov    $0x1,%edi
call   1050 <error@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <fixed@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"This is version %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
%8 = load i32, i32* %6
%9 = call i32 @error(i32 %8)
%10 = load i32, i32* %7
%11 = call i32 @error(i32 %10)
%12 = load i32, i32* %7
%13 = call i32 @error(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @fixed()
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
@.str = [19 x i8] c"This is version %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @error(i32 0)
%4 = tail call i32 @error(i32 1)
%5 = tail call i32 @error(i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @fixed()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x = 1;
  x++;
  int *y = &x;
  y++;
  printf("%d, %d\n", x, *y);
  int z = 5;
  printf("%d, %d\n", z, *y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
movl   $0x5,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2, i32 poison)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5, i32 poison)
ret i32 0
}
float unlerp(float t, float a, float b) { return (t - a) / (b - a); }


x86 assembly (clang, -O0):
<unlerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlerp>:
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @unlerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float, float* %6
%11 = load float, float* %5
%12 = fsub float %10, %11
%13 = fdiv float %9, %12
ret float %13
}

LLVM IR (-O2):
define float @unlerp(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = fsub float %2, %1
%6 = fdiv float %4, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xf2() {
  Assert_real((isxdigit(242) == 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_isxdigit.c",
              1215, ("isxdigit should be 0 for 0xf2"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xf2>:
push   %rax
mov    $0xf2,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4bf,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf2\00"
define void @t_isxdigit_0xf2() {
%1 = call i64 @isxdigit(i32 242)
%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 1215, 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xf2\00"
define void @t_isxdigit_0xf2() {
%1 = tail call i64 @isxdigit(i32 242)
%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 1215, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ft_tolower(int c) {
  if ((unsigned char)c >= 'A' && (unsigned char)c <= 'Z')
    return (c - ('M' - 'm'));
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x41,%eax
jl     1133 <ft_tolower+0x33>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x5a,%eax
jg     1133 <ft_tolower+0x33>
mov    -0x8(%rbp),%eax
sub    $0xffffffe0,%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <ft_tolower+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
movzbl %dil,%ecx
add    $0xffffffbf,%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 65
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i8
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 90
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, -32
store i32 %15, i32* %2
br label %18
16: ; preds = %8, %1
%17 = load i32, i32* %3
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add nsw i32 %0, 32
%6 = select i1 %4, i32 %5, i32 %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x56() {
  Assert_real((isodigit(86) == 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",
              435, ("isodigit should be 0 for V"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x56>:
push   %rax
mov    $0x56,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1b3,%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 = [27 x i8] c"isodigit should be 0 for V\00"
define void @t_isodigit_0x56() {
%1 = call i64 @isodigit(i32 86)
%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 435, i8* getelementptr inbounds ([27 x i8], [27 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 = [27 x i8] c"isodigit should be 0 for V\00"
define void @t_isodigit_0x56() {
%1 = tail call i64 @isodigit(i32 86)
%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 435, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned long u_int32_t;

/* Variables and functions */
void unset_bit_u32(int nr, u_int32_t *addr) {
  addr[nr >> 5] &= ~(1UL << (nr & 31));
}


x86 assembly (clang, -O0):
<unset_bit_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
and    (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unset_bit_u32>:
mov    %edi,%ecx
and    $0x1f,%cl
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
sar    $0x5,%edi
movslq %edi,%rcx
and    %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @unset_bit_u32(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 31
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = xor i64 %8, -1
%10 = load i64*, i64** %4
%11 = load i32, i32* %3
%12 = ashr i32 %11, 5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load i64, i64* %14
%16 = and i64 %15, %9
store i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @unset_bit_u32(i32 %0, i64* nocapture %1) {
%3 = and i32 %0, 31
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 1, %4
%6 = xor i64 %5, -1
%7 = ashr i32 %0, 5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %1, i64 %8
%10 = load i64, i64* %9
%11 = and i64 %10, %6
store i64 %11, i64* %9
ret void
}
/* Type definitions */
struct can_frame {
  int *data;
};

/* Variables and functions */
int cs(struct can_frame frame) { return frame.data[0] >> 5 & 0x7; }


x86 assembly (clang, -O0):
<cs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x5,%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs>:
mov    (%rdi),%eax
shr    $0x5,%eax
and    $0x7,%eax
ret

LLVM IR (-O0):
%struct.can_frame = type { i32* }
define i32 @cs(i32* %0) {
%2 = alloca %struct.can_frame
%3 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
store i32* %0, i32** %3
%4 = getelementptr inbounds %struct.can_frame, %struct.can_frame* %2, i32 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = ashr i32 %7, 5
%9 = and i32 %8, 7
ret i32 %9
}

LLVM IR (-O2):
define i32 @cs(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = lshr i32 %2, 5
%4 = and i32 %3, 7
ret i32 %4
}
int precheck_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @precheck_init() {
ret i32 0
}
long libj_srand(seed)
long seed;
{ return (seed % 0x7ffffffe + 1); }


x86 assembly (clang, -O0):
<libj_srand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x7ffffffe,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libj_srand>:
movabs $0x8000000200000009,%rcx
mov    %rdi,%rax
imul   %rcx
add    %rdi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x1e,%rdx
add    %rax,%rdx
mov    %rdx,%rax
shl    $0x1f,%rax
mov    %rdx,%rcx
sub    %rax,%rcx
add    %rdx,%rcx
lea    (%rdi,%rcx,1),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @libj_srand(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 2147483646
%5 = add nsw i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @libj_srand(i64 %0) {
%2 = srem i64 %0, 2147483646
%3 = add nsw i64 %2, 1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int const *, int);
void copy(int rows, int cols, const int *a, int *b) {
  memcpy(b, a, rows * cols * sizeof(int));
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
imul   %esi,%edi
lea    0x0(,%rdi,4),%eax
mov    %rcx,%rdi
mov    %rdx,%rsi
mov    %eax,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @copy(i32 %0, i32 %1, i32* %2, i32* %3) {
%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
store i32* %3, i32** %8
%9 = load i32*, i32** %8
%10 = load i32*, i32** %7
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = trunc i64 %15 to i32
%17 = call i32 @memcpy(i32* %9, i32* %10, i32 %16)
ret void
}

LLVM IR (-O2):
define void @copy(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = shl i32 %0, 2
%6 = mul i32 %5, %1
%7 = tail call i32 @memcpy(i32* %3, i32* %2, i32 %6)
ret void
}
void XcmsQueryBlack() {}


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

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

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

LLVM IR (-O2):
define void @XcmsQueryBlack() {
ret void
}
/* Variables and functions */
int hasQualifier(char const **, char *);
int isBluetoothDeviceIdentifier(const char **identifier) {
  return hasQualifier(identifier, "bluetooth");
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"bluetooth\00"
define i32 @isBluetoothDeviceIdentifier(i8** %0) {
%2 = tail call i32 @hasQualifier(i8** %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}