xunge/DecIR huggingface dataset:
unsigned int __inlc_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "l"
                       " %"
                       ""
                       "1,%"
                       ""
                       "0"
                       : "=a"(_v)
                       : "id"(port));
  __asm__ __volatile__("outb %al,$0x80");
  return _v;
}


x86 assembly (clang, -O0):
<__inlc_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
out    %al,$0x80
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inlc_p>:
mov    %edi,%edx
in     (%dx),%eax
out    %al,$0x80
ret

LLVM IR (-O0):
define i32 @__inlc_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @__inlc_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl $1,$0", "={ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret i32 %2
}
/* Type definitions */
struct radix_tree_root {
  int dummy;
};

/* Variables and functions */
void *rst_find(struct radix_tree_root *, unsigned long);
void *radix_tree_lookup(struct radix_tree_root *tree, unsigned long index) {
  return rst_find(tree, index);
}


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

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

LLVM IR (-O0):
%struct.radix_tree_root = type { i32 }
define i8* @radix_tree_lookup(%struct.radix_tree_root* %0, i64 %1) {
%3 = alloca %struct.radix_tree_root*
%4 = alloca i64
store %struct.radix_tree_root* %0, %struct.radix_tree_root** %3
store i64 %1, i64* %4
%5 = load %struct.radix_tree_root*, %struct.radix_tree_root** %3
%6 = load i64, i64* %4
%7 = call i8* @rst_find(%struct.radix_tree_root* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.radix_tree_root = type { i32 }
define i8* @radix_tree_lookup(%struct.radix_tree_root* %0, i64 %1) {
%3 = tail call i8* @rst_find(%struct.radix_tree_root* %0, i64 %1)
ret i8* %3
}
/* Type definitions */
struct tgl_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alarm_query(struct tgl_state *, void *);
void alarm_query_gateway(struct tgl_state *TLS, void *arg) {
  alarm_query(TLS, arg);
}


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

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

LLVM IR (-O0):
%struct.tgl_state = type { i32 }
define void @alarm_query_gateway(%struct.tgl_state* %0, i8* %1) {
%3 = alloca %struct.tgl_state*
%4 = alloca i8*
store %struct.tgl_state* %0, %struct.tgl_state** %3
store i8* %1, i8** %4
%5 = load %struct.tgl_state*, %struct.tgl_state** %3
%6 = load i8*, i8** %4
%7 = call i32 @alarm_query(%struct.tgl_state* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.tgl_state = type { i32 }
define void @alarm_query_gateway(%struct.tgl_state* %0, i8* %1) {
%3 = tail call i32 @alarm_query(%struct.tgl_state* %0, i8* %1)
ret void
}
/* Type definitions */
struct winsize {
  int ws_row;
};

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
int nmstermio_get_rows(void) {
  struct winsize w;
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
  return w.ws_row;
}


x86 assembly (clang, -O0):
<nmstermio_get_rows>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmstermio_get_rows>:
push   %rax
mov    0x2ed8(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @nmstermio_get_rows() {
%1 = alloca %struct.winsize
%2 = load i32, i32* @STDOUT_FILENO
%3 = load i32, i32* @TIOCGWINSZ
%4 = call i32 @ioctl(i32 %2, i32 %3, %struct.winsize* %1)
%5 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@STDOUT_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
define i32 @nmstermio_get_rows() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* @TIOCGWINSZ
%5 = call i32 @ioctl(i32 %3, i32 %4, %struct.winsize* %1)
%6 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}
/* Variables and functions */
char *_nbt_strdup(char const *);
char *safe_strdup(const char *s) { return s ? _nbt_strdup(s) : NULL; }


x86 assembly (clang, -O0):
<safe_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <safe_strdup+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <_nbt_strdup@plt>
mov    %rax,-0x10(%rbp)
jmp    1144 <safe_strdup+0x34>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1144 <safe_strdup+0x34>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strdup>:
test   %rdi,%rdi
je     111a <safe_strdup+0xa>
jmp    1030 <_nbt_strdup@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @safe_strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i8* @_nbt_strdup(i8* %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i8* [ %7, %5 ], [ null, %8 ]
ret i8* %10
}

LLVM IR (-O2):
define i8* @safe_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @_nbt_strdup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
void copy(char *fromstr, char *tostr) {
  while (*tostr++ = *fromstr++)
    ;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <copy+0x3b>
jmp    110c <copy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
mov    %cl,(%rsi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
define void @copy(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %6, %3 ]
%5 = phi i8* [ %1, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
int main(int argc, char **argv, char **envp) {}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 0
}
unsigned int to_the_power(unsigned int number, unsigned int summatory) {
  if (number == 0)
    return summatory;
  unsigned int temp = number % 10;
  return to_the_power(number / 10,
                      summatory + (temp * temp * temp * temp * temp));
}


x86 assembly (clang, -O0):
<to_the_power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <to_the_power+0x23>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <to_the_power+0x60>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
add    %eax,%esi
call   1030 <to_the_power@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_the_power>:
mov    %esi,%eax
test   %edi,%edi
je     1138 <to_the_power+0x38>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
mov    %ecx,%esi
imul   %ecx,%esi
imul   %esi,%ecx
imul   %esi,%ecx
add    %ecx,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <to_the_power+0x10>
ret

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

LLVM IR (-O2):
define i32 @to_the_power(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %14, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %12, %4 ], [ %1, %2 ]
%6 = phi i32 [ %8, %4 ], [ %0, %2 ]
%7 = urem i32 %6, 10
%8 = udiv i32 %6, 10
%9 = mul nuw nsw i32 %7, %7
%10 = mul nuw nsw i32 %9, %7
%11 = mul nuw nsw i32 %10, %9
%12 = add i32 %11, %5
%13 = icmp ult i32 %6, 10
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i32 [ %1, %2 ], [ %12, %4 ]
ret i32 %15
}
/* Type definitions */
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void clearMt2(struct mat2 **obj) {
  void *lobj = NULL;
  if (obj != NULL) {
    if (*obj != NULL) {
      lobj = (void *)*obj;
      free(lobj);
      *obj = NULL;
    } else {
    }
  } else {
  }
}


x86 assembly (clang, -O0):
<clearMt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116b <clearMt2+0x5b>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1161 <clearMt2+0x51>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
jmp    1166 <clearMt2+0x56>
jmp    1166 <clearMt2+0x56>
jmp    1170 <clearMt2+0x60>
jmp    1170 <clearMt2+0x60>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearMt2>:
push   %rbx
test   %rdi,%rdi
je     112d <clearMt2+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <clearMt2+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat2 = type { i32 }
define void @clearMt2(%struct.mat2** %0) {
%2 = alloca %struct.mat2**
%3 = alloca i8*
store %struct.mat2** %0, %struct.mat2*** %2
store i8* null, i8** %3
%4 = load %struct.mat2**, %struct.mat2*** %2
%5 = icmp ne %struct.mat2** %4, null
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = load %struct.mat2**, %struct.mat2*** %2
%8 = load %struct.mat2*, %struct.mat2** %7
%9 = icmp ne %struct.mat2* %8, null
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load %struct.mat2**, %struct.mat2*** %2
%12 = load %struct.mat2*, %struct.mat2** %11
%13 = bitcast %struct.mat2* %12 to i8*
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = call i32 @free(i8* %14)
%16 = load %struct.mat2**, %struct.mat2*** %2
store %struct.mat2* null, %struct.mat2** %16
br label %18
17: ; preds = %6
br label %18
18: ; preds = %17, %10
br label %20
19: ; preds = %1
br label %20
20: ; preds = %19, %18
ret void
}

LLVM IR (-O2):
%struct.mat2 = type { i32 }
define void @clearMt2(%struct.mat2** %0) {
%2 = icmp eq %struct.mat2** %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load %struct.mat2*, %struct.mat2** %0
%5 = icmp eq %struct.mat2* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = bitcast %struct.mat2* %4 to i8*
%8 = tail call i32 @free(i8* %7)
store %struct.mat2* null, %struct.mat2** %0
br label %9
9: ; preds = %1, %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int strlen(char *);
void processarIdentificador(char *yytext) {
  if (strlen(yytext) > 32) {
    printf("%s - erro - identificador muito grande\n", yytext);
  } else {
    printf("%s - identificador\n", yytext);
  }
}


x86 assembly (clang, -O0):
<processarIdentificador>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x20,%eax
jle    1153 <processarIdentificador+0x33>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
jmp    1163 <processarIdentificador+0x43>
mov    -0x8(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processarIdentificador>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x21,%eax
lea    0xecd(%rip),%rax
lea    0xeee(%rip),%rdi
cmovge %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"%s - erro - identificador muito grande\0A\00"
@.str.1 = [20 x i8] c"%s - identificador\0A\00"
define void @processarIdentificador(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = icmp sgt i32 %4, 32
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"%s - erro - identificador muito grande\0A\00"
@.str.1 = [20 x i8] c"%s - identificador\0A\00"
define void @processarIdentificador(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 32
%4 = select i1 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((destructor)) void after() { printf(" World!\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c" World!\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @after, i8* null }]
define void @after() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @after, i8* null }]
@str = [8 x i8] c" World!\00"
define void @after() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void xpi2(uint32_t *p) {
  p[2] = (p[2] >> 0x0a) ^ (p[2] << 0x16);
  p[0] = (p[0] >> 0x1f) ^ (p[0] << 1);
}


x86 assembly (clang, -O0):
<xpi2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
sar    $0xa,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x16,%eax
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sar    $0x1f,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x1,%eax
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xpi2>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
mov    %ecx,%edx
sar    $0xa,%edx
shl    $0x16,%ecx
xor    %edx,%ecx
mov    %ecx,0x8(%rdi)
mov    %eax,%ecx
sar    $0x1f,%ecx
add    %eax,%eax
xor    %ecx,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @xpi2(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = ashr i32 %5, 10
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 22
%11 = xor i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
store i32 %11, i32* %13
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = ashr i32 %16, 31
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load i32, i32* %19
%21 = shl i32 %20, 1
%22 = xor i32 %17, %21
%23 = load i32*, i32** %2
%24 = getelementptr inbounds i32, i32* %23, i64 0
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @xpi2(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 10
%5 = shl i32 %3, 22
%6 = xor i32 %4, %5
store i32 %6, i32* %2
%7 = load i32, i32* %0
%8 = ashr i32 %7, 31
%9 = shl i32 %7, 1
%10 = xor i32 %8, %9
store i32 %10, i32* %0
ret void
}
void nseel_asm_mul_op_end(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
signed long long null_query(struct query_context *q) {
  printf("WARNING: PREVIOUS QUERY FAILED, dirty query context.\n");
  return -1;
}


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

x86 assembly (clang, -O2):
<null_query>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.query_context = type { i32 }
@.str = [54 x i8] c"WARNING: PREVIOUS QUERY FAILED, dirty query context.\0A\00"
define i64 @null_query(%struct.query_context* %0) {
%2 = alloca %struct.query_context*
store %struct.query_context* %0, %struct.query_context** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret i64 -1
}

LLVM IR (-O2):
%struct.query_context = type { i32 }
@str = [53 x i8] c"WARNING: PREVIOUS QUERY FAILED, dirty query context.\00"
define i64 @null_query(%struct.query_context* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i64 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ c;

/* Variables and functions */
int toupper(int /*<<< orphan*/);
int toUpper(int c) { return toupper((c)&0xff); }


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

x86 assembly (clang, -O2):
<toUpper>:
movzbl %dil,%edi
jmp    1030 <toupper@plt>

LLVM IR (-O0):
define i32 @toUpper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = call i32 @toupper(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @toUpper(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @toupper(i32 %2)
ret i32 %3
}
void waitforXFW(struct BCState *bcs) {}


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

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

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

LLVM IR (-O2):
%struct.BCState = type opaque
define void @waitforXFW(%struct.BCState* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gdb_clear_breakpoints(int);
int /*<<< orphan*/ gdb_cmd_cont(char *, int /*<<< orphan*/);
int /*<<< orphan*/ gdb_send_packet(char *, int);
void gdb_cmd_detach(char *gdb_packet, int packet_len) {
  (void)gdb_packet;
  (void)packet_len;
  gdb_send_packet("OK", 2);
  gdb_clear_breakpoints(1);
  gdb_cmd_cont("", 0);
}


x86 assembly (clang, -O0):
<gdb_cmd_detach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x2,%esi
call   1040 <gdb_send_packet@plt>
mov    $0x1,%edi
call   1050 <gdb_clear_breakpoints@plt>
lea    0xea1(%rip),%rdi
xor    %esi,%esi
call   1030 <gdb_cmd_cont@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdb_cmd_detach>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0x2,%esi
call   1040 <gdb_send_packet@plt>
mov    $0x1,%edi
call   1050 <gdb_clear_breakpoints@plt>
lea    0xeaf(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <gdb_cmd_cont@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [1 x i8] zeroinitializer
define void @gdb_cmd_detach(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @gdb_send_packet(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%8 = call i32 @gdb_clear_breakpoints(i32 1)
%9 = call i32 @gdb_cmd_cont(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
@.str.1 = [1 x i8] zeroinitializer
define void @gdb_cmd_detach(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @gdb_send_packet(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @gdb_clear_breakpoints(i32 1)
%5 = tail call i32 @gdb_cmd_cont(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int max(int, int /*<<< orphan*/);
int /*<<< orphan*/ min(int, int);
int clamp(int a, int i, int k) { return max(i, min(k, a)); }


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <min@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <max@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
mov    %edx,%edi
call   1030 <min@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <max@plt>

LLVM IR (-O0):
define i32 @clamp(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @min(i32 %8, i32 %9)
%11 = call i32 @max(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @clamp(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @min(i32 %2, i32 %0)
%5 = tail call i32 @max(i32 %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
unsigned long strtoul(char const *, char **, unsigned int);
unsigned long asc2ulong(const char *s, unsigned base, int ignore_errors) {
  char *endp;
  unsigned long rc = strtoul(s, &endp, base);
  if (*endp && !ignore_errors) {
    return -1;
  }
  return rc;
}


x86 assembly (clang, -O0):
<asc2ulong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rsi
call   1030 <strtoul@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115d <asc2ulong+0x4d>
cmpl   $0x0,-0x18(%rbp)
jne    115d <asc2ulong+0x4d>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1165 <asc2ulong+0x55>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asc2ulong>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %esi,%edx
lea    0x8(%rsp),%rsi
call   1030 <strtoul@plt>
mov    0x8(%rsp),%rcx
xor    %edx,%edx
cmp    (%rcx),%dl
sbb    %rcx,%rcx
or     %rax,%rcx
test   %ebx,%ebx
cmove  %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @asc2ulong(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call i64 @strtoul(i8* %0, i8** %4, i32 %1)
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
%10 = icmp ne i32 %2, 0
%11 = or i1 %10, %9
%12 = select i1 %11, i64 %6, i64 -1
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
void uninivar_abs(void) {
  int i;
  (void)abs(i);
}


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

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

LLVM IR (-O0):
define void @uninivar_abs() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @abs(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninivar_abs() {
ret void
}
void usleep(unsigned usec) {
  unsigned msec = usec / 1000;
  system_timer_reset_ticks();
  while (system_timer_ticks() * 10 < msec) {
    asm("hlt");
  }
}


x86 assembly (clang, -O0):
<usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <system_timer_reset_ticks@plt>
mov    $0x0,%al
call   1030 <system_timer_ticks@plt>
imul   $0xa,%eax,%eax
cmp    -0x8(%rbp),%eax
jae    115a <usleep+0x3a>
hlt
jmp    1141 <usleep+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep>:
push   %rbx
mov    %edi,%eax
imul   $0x10624dd3,%rax,%rbx
shr    $0x26,%rbx
xor    %eax,%eax
call   1040 <system_timer_reset_ticks@plt>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <system_timer_ticks@plt>
add    %eax,%eax
lea    (%rax,%rax,4),%eax
cmp    %ebx,%eax
jae    1153 <usleep+0x33>
hlt
jmp    1140 <usleep+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @usleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = udiv i32 %4, 1000
store i32 %5, i32* %3
%6 = call i32 (...) @system_timer_reset_ticks()
br label %7
7: ; preds = %12, %1
%8 = call i32 (...) @system_timer_ticks()
%9 = mul nsw i32 %8, 10
%10 = load i32, i32* %3
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @usleep(i32 %0) {
%2 = udiv i32 %0, 1000
%3 = tail call i32 (...) @system_timer_reset_ticks()
%4 = tail call i32 (...) @system_timer_ticks()
%5 = mul nsw i32 %4, 10
%6 = icmp ult i32 %5, %2
br i1 %6, label %7, label %11
7: ; preds = %1, %7
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
%8 = tail call i32 (...) @system_timer_ticks()
%9 = mul nsw i32 %8, 10
%10 = icmp ult i32 %9, %2
br i1 %10, label %7, label %11
11: ; preds = %7, %1
ret void
}
const char *db_create_standingdata_table_sql(void) {
  static const char *query = "CREATE TABLE standing_data ("
                             "    organization   VARCHAR(100)    NOT NULL,"
                             "    current_year   INTEGER         NOT NULL,"
                             "    current_period INTEGER         NOT NULL,"
                             "    num_periods    INTEGER         NOT NULL,"
                             "  CONSTRAINT standing_data_pk"
                             "    PRIMARY KEY (organization)"
                             ");";
  return query;
}


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

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

LLVM IR (-O0):
@db_create_standingdata_table_sql.query = internal global i8* getelementptr inbounds ([266 x i8], [266 x i8]* @.str, i32 0, i32 0)
@.str = [266 x i8] c"CREATE TABLE standing_data ( organization VARCHAR(100) NOT NULL, current_year INTEGER NOT NULL, current_period INTEGER NOT NULL, num_periods INTEGER NOT NULL, CONSTRAINT standing_data_pk PRIMARY KEY (organization));\00"
define i8* @db_create_standingdata_table_sql() {
%1 = load i8*, i8** @db_create_standingdata_table_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [266 x i8] c"CREATE TABLE standing_data ( organization VARCHAR(100) NOT NULL, current_year INTEGER NOT NULL, current_period INTEGER NOT NULL, num_periods INTEGER NOT NULL, CONSTRAINT standing_data_pk PRIMARY KEY (organization));\00"
define i8* @db_create_standingdata_table_sql() {
ret i8* getelementptr inbounds ([266 x i8], [266 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ DEC8(int /*<<< orphan*/);
int /*<<< orphan*/ DirectIndexedXE1(int);
void OpD6E1(void) { DEC8(DirectIndexedXE1(3)); }


x86 assembly (clang, -O0):
<OpD6E1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <DirectIndexedXE1@plt>
mov    %eax,%edi
call   1040 <DEC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpD6E1>:
push   %rax
mov    $0x3,%edi
call   1030 <DirectIndexedXE1@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <DEC8@plt>

LLVM IR (-O0):
define void @OpD6E1() {
%1 = call i32 @DirectIndexedXE1(i32 3)
%2 = call i32 @DEC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpD6E1() {
%1 = tail call i32 @DirectIndexedXE1(i32 3)
%2 = tail call i32 @DEC8(i32 %1)
ret void
}
const char *Push_Brief(void) { return "Pushable and Popable object"; }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Pushable and Popable object\00"
define i8* @Push_Brief() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [28 x i8] c"Pushable and Popable object\00"
define i8* @Push_Brief() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xcf() {
  Assert_real((isspace(207) == 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",
              1040, ("isspace should be 0 for 0xcf"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xcf>:
push   %rax
mov    $0xcf,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x410,%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 0xcf\00"
define void @t_isspace_0xcf() {
%1 = call i64 @isspace(i32 207)
%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 1040, 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 0xcf\00"
define void @t_isspace_0xcf() {
%1 = tail call i64 @isspace(i32 207)
%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 1040, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct coprthr_event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __do_wait_1(struct coprthr_event *);
int coprthr_dwaitev(int dd, struct coprthr_event *ev1) {
  __do_wait_1(ev1);
  return 0;
}


x86 assembly (clang, -O0):
<coprthr_dwaitev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <__do_wait_1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coprthr_dwaitev>:
push   %rax
mov    %rsi,%rdi
call   1030 <__do_wait_1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.coprthr_event = type { i32 }
define i32 @coprthr_dwaitev(i32 %0, %struct.coprthr_event* %1) {
%3 = alloca i32
%4 = alloca %struct.coprthr_event*
store i32 %0, i32* %3
store %struct.coprthr_event* %1, %struct.coprthr_event** %4
%5 = load %struct.coprthr_event*, %struct.coprthr_event** %4
%6 = call i32 @__do_wait_1(%struct.coprthr_event* %5)
ret i32 0
}

LLVM IR (-O2):
%struct.coprthr_event = type { i32 }
define i32 @coprthr_dwaitev(i32 %0, %struct.coprthr_event* %1) {
%3 = tail call i32 @__do_wait_1(%struct.coprthr_event* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ console_tx_hex8(unsigned char);
void print_warn_hex8(unsigned char value) { console_tx_hex8(value); }


x86 assembly (clang, -O0):
<print_warn_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <console_tx_hex8@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @print_warn_hex8(i8 zeroext %0) {
%2 = tail call i32 @console_tx_hex8(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
char *setbfile(char *buf, const char *boardname, const char *filename) {
  sprintf(buf, "boards/%s/%s", boardname, filename);
  return buf;
}


x86 assembly (clang, -O0):
<setbfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbfile>:
push   %rbx
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"boards/%s/%s\00"
define i8* @setbfile(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
@.str = [13 x i8] c"boards/%s/%s\00"
define i8* @setbfile(i8* returned writeonly %0, i8* %1, i8* %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret i8* %0
}
/* Variables and functions */
int tracebackF2();
int tracebackF1(void) { return tracebackF2(); }


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

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

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

LLVM IR (-O2):
define i32 @tracebackF1() {
%1 = tail call i32 (...) @tracebackF2()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ pthread_attr_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
void sirius_pthread_attr_destroy(pthread_attr_t *attr) {
  if (pthread_attr_destroy(attr)) {
    fprintf(stderr, "pthread_attr_detroy() failed.\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<sirius_pthread_attr_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_attr_destroy@plt>
cmp    $0x0,%rax
je     116e <sirius_pthread_attr_destroy+0x3e>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sirius_pthread_attr_destroy>:
push   %rax
call   1040 <pthread_attr_destroy@plt>
test   %rax,%rax
jne    113d <sirius_pthread_attr_destroy+0xd>
pop    %rax
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"pthread_attr_detroy() failed.\0A\00"
define void @sirius_pthread_attr_destroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @pthread_attr_destroy(i32* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"pthread_attr_detroy() failed.\0A\00"
define void @sirius_pthread_attr_destroy(i32* %0) {
%2 = tail call i64 @pthread_attr_destroy(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ monrestart(int);
void target_reset(void) { monrestart((3 << 4)); }


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

x86 assembly (clang, -O2):
<target_reset>:
mov    $0x30,%edi
jmp    1030 <monrestart@plt>

LLVM IR (-O0):
define void @target_reset() {
%1 = call i32 @monrestart(i32 48)
ret void
}

LLVM IR (-O2):
define void @target_reset() {
%1 = tail call i32 @monrestart(i32 48)
ret void
}
void InitCpp5() {}


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

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

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

LLVM IR (-O2):
define void @InitCpp5() {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compar(char *ch1, char *ch2) { return (strcmp(ch1, ch2)); }


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

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

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

LLVM IR (-O2):
define i32 @compar(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void buffer_delete_backward_word(struct buffer *buf, char **out, int *n_out) {}


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

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

LLVM IR (-O0):
%struct.buffer = type opaque
define void @buffer_delete_backward_word(%struct.buffer* %0, i8** %1, i32* %2) {
%4 = alloca %struct.buffer*
%5 = alloca i8**
%6 = alloca i32*
store %struct.buffer* %0, %struct.buffer** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.buffer = type opaque
define void @buffer_delete_backward_word(%struct.buffer* nocapture %0, i8** nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
char *__kern_mm_alloc(unsigned int);
char *kmalloc(unsigned int size) { return __kern_mm_alloc(size); }


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

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

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

LLVM IR (-O2):
define i8* @kmalloc(i32 %0) {
%2 = tail call i8* @__kern_mm_alloc(i32 %0)
ret i8* %2
}
/* Variables and functions */
int usart_read_arr(char *, int);
int _read(int file, char *ptr, int len) {
  if (len) {
    len = usart_read_arr(ptr, len);
    return len;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1146 <_read+0x36>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <usart_read_arr@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <_read+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read>:
test   %edx,%edx
je     111e <_read+0xe>
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <usart_read_arr@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @usart_read_arr(i8* %1, i32 %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ 0, %3 ]
ret i32 %8
}
void func1(char *pointer) {
  __attribute__((unused)) int dummy = 0;
  return;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @func1(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t clamp16(int16_t x, int16_t lo, int16_t hi) {
  if (x < lo)
    return lo;
  else if (x >= hi)
    return hi - 1;
  else
    return x;
}


x86 assembly (clang, -O0):
<clamp16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    112b <clamp16+0x2b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <clamp16+0x52>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jl     114a <clamp16+0x4a>
mov    -0x20(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <clamp16+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp16>:
lea    -0x1(%rdx),%rax
cmp    %rdx,%rdi
cmovl  %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @clamp16(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp slt i64 %0, %2
%6 = add nsw i64 %2, -1
%7 = select i1 %5, i64 %0, i64 %6
%8 = select i1 %4, i64 %1, i64 %7
ret i64 %8
}