xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ mem_copy_word2word_little(int /*<<< orphan*/ *,
                                             int /*<<< orphan*/ const);
uint16_t arch_mem_copy_word2word_little(uint16_t *word_d,
                                        const uint16_t word_s) {
  return mem_copy_word2word_little(word_d, word_s);
}


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

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

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

LLVM IR (-O2):
define i32 @arch_mem_copy_word2word_little(i32* %0, i32 %1) {
%3 = tail call i32 @mem_copy_word2word_little(i32* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
void imodCopyright(void) {
  char *uofc = "the Regents of the University of Colorado";
  printf("Copyright (C) %s by %s\n%s & %s\n", "1994-2009",
         "Boulder Laboratory for 3-Dimensional", "Electron Microscopy of Cells",
         uofc);
  return;
}


x86 assembly (clang, -O0):
<imodCopyright>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%r8
lea    0xefc(%rip),%rdi
lea    0xf15(%rip),%rsi
lea    0xf18(%rip),%rdx
lea    0xf36(%rip),%rcx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imodCopyright>:
lea    0xf13(%rip),%rdi
lea    0xf2c(%rip),%rsi
lea    0xf2f(%rip),%rdx
lea    0xf4d(%rip),%rcx
lea    0xecd(%rip),%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"the Regents of the University of Colorado\00"
@.str.1 = [32 x i8] c"Copyright (C) %s by %s\0A%s & %s\0A\00"
@.str.2 = [10 x i8] c"1994-2009\00"
@.str.3 = [37 x i8] c"Boulder Laboratory for 3-Dimensional\00"
@.str.4 = [29 x i8] c"Electron Microscopy of Cells\00"
define void @imodCopyright() {
%1 = alloca i8*
store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"the Regents of the University of Colorado\00"
@.str.1 = [32 x i8] c"Copyright (C) %s by %s\0A%s & %s\0A\00"
@.str.2 = [10 x i8] c"1994-2009\00"
@.str.3 = [37 x i8] c"Boulder Laboratory for 3-Dimensional\00"
@.str.4 = [29 x i8] c"Electron Microscopy of Cells\00"
define void @imodCopyright() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int get_num();
int /*<<< orphan*/ print_bad();
int /*<<< orphan*/ printf(char *);
int main() {
  int num;
  while (1) {
    num = get_num();
    if (num == 1337) {
      printf("Accepted!\n");
    } else {
      print_bad();
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_num@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x539,-0x8(%rbp)
jne    1167 <main+0x37>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
jmp    116e <main+0x3e>
mov    $0x0,%al
call   1050 <print_bad@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
jmp    1147 <main+0x17>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <print_bad@plt>
xor    %eax,%eax
call   1030 <get_num@plt>
cmp    $0x539,%eax
jne    1140 <main+0x10>
mov    %rbx,%rdi
call   1040 <puts@plt>
jmp    1147 <main+0x17>

LLVM IR (-O0):
@.str = [11 x i8] c"Accepted!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %11
%4 = call i32 (...) @get_num()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 1337
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %3
%10 = call i32 (...) @print_bad()
br label %11
11: ; preds = %9, %7
br label %3
}

LLVM IR (-O2):
@str = [10 x i8] c"Accepted!\00"
define i32 @main() {
br label %1
1: ; preds = %8, %0
%2 = tail call i32 (...) @get_num()
%3 = icmp eq i32 %2, 1337
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @print_bad()
br label %8
8: ; preds = %6, %4
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
char *read() {
  static char word[20];
  char temp;
  printf("Enter a word\n\n");
  fgets(word, 19, stdin);
  return word;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
lea    0x2efc(%rip),%rdi
mov    $0x13,%esi
call   1040 <fgets@plt>
lea    0x2eeb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
lea    0x2f03(%rip),%rbx
mov    %rbx,%rdi
mov    $0x13,%esi
call   1040 <fgets@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@read.word = internal global [20 x i8] zeroinitializer
@.str = [15 x i8] c"Enter a word\0A\0A\00"
@stdin = global i32 0
define i8* @read() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @read.word, i64 0, i64 0), i32 19, i32 %3)
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @read.word, i64 0, i64 0)
}

LLVM IR (-O2):
@read.word = internal global [20 x i8] zeroinitializer
@stdin = global i32 0
@str = [14 x i8] c"Enter a word\0A\00"
define i8* @read() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @read.word, i64 0, i64 0), i32 19, i32 %2)
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @read.word, i64 0, i64 0)
}
void foo231(int p) {}


x86 assembly (clang, -O0):
<foo231>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo231(i32 %0) {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ dataType();
int /*<<< orphan*/ memoryAddress();
int main() {
  dataType();
  memoryAddress();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <dataType@plt>
mov    $0x0,%al
call   1040 <memoryAddress@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <dataType@plt>
xor    %eax,%eax
call   1040 <memoryAddress@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @dataType()
%3 = call i32 (...) @memoryAddress()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @dataType()
%2 = tail call i32 (...) @memoryAddress()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int main(int argc, char **argv) {
  int trunc;
  int sum = 0;
  for (uint64_t i = 0; i < 100000000000000; i += 10) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
movabs $0x5af3107a4000,%rcx
cmp    %rcx,%rax
jge    114a <main+0x4a>
jmp    113c <main+0x3c>
mov    -0x1c(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x1c(%rbp)
jmp    1120 <main+0x20>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %14, %2
%10 = load i32, i32* %8
%11 = sext i32 %10 to i64
%12 = icmp slt i64 %11, 100000000000000
br i1 %12, label %13, label %17
13: ; preds = %9
br label %14
14: ; preds = %13
%15 = load i32, i32* %8
%16 = add nsw i32 %15, 10
store i32 %16, i32* %8
br label %9
17: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
unsigned int invert(unsigned int x, int p, int n) {
  unsigned int tmp, val;
  tmp = ((~(~0 << n)) << (p + 1 - n));
  val = (~(x & tmp)) & tmp;
  x = (x & (~tmp)) | val;
  return x;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = shl i32 -1, %9
%11 = xor i32 %10, -1
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
%16 = shl i32 %11, %15
store i32 %16, i32* %7
%17 = load i32, i32* %4
%18 = load i32, i32* %7
%19 = and i32 %17, %18
%20 = xor i32 %19, -1
%21 = load i32, i32* %7
%22 = and i32 %20, %21
store i32 %22, i32* %8
%23 = load i32, i32* %4
%24 = load i32, i32* %7
%25 = xor i32 %24, -1
%26 = and i32 %23, %25
%27 = load i32, i32* %8
%28 = or i32 %26, %27
store i32 %28, i32* %4
%29 = load i32, i32* %4
ret i32 %29
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = add nsw i32 %1, 1
%7 = sub i32 %6, %2
%8 = shl i32 %5, %7
%9 = xor i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ display(int *, int);
int /*<<< orphan*/ input(int **, int);
main() {
  int a[10];
  input(&a, 10);
  display(a, 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <input@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <input@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <display@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i32**
%3 = call i32 @input(i32** %2, i32 10)
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @display(i32* %4, i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = bitcast [10 x i32]* %1 to i32**
%4 = call i32 @input(i32** %3, i32 10)
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @display(i32* %5, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void pickle_reader_hash_stop(void *state, void *opaque) {
  ((opaque) = (opaque));
  free(state);
}


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

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

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

LLVM IR (-O2):
define void @pickle_reader_hash_stop(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
int test_imm_BFint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xBF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BFint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xbf,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_BFint64_midword_mem>:
testb  $0xbf,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BFint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12517376
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
float pot(float teta, int p) {
  if (p == 0)
    return 1;
  else
    teta = teta * pot(teta, p - 1);
  return teta;
}


x86 assembly (clang, -O0):
<pot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    113c <pot+0x2c>
movss  0xece(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1171 <pot+0x61>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <pot@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pot>:
push   %rax
test   %edi,%edi
je     112b <pot+0x1b>
add    $0xffffffff,%edi
movss  %xmm0,0x4(%rsp)
call   1030 <pot@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret
movss  0xecd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @pot(float %0, i32 %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store float 1.000000e+00, float* %3
br label %18
9: ; preds = %2
%10 = load float, float* %4
%11 = load float, float* %4
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1
%14 = call float @pot(float %11, i32 %13)
%15 = fmul float %10, %14
store float %15, float* %4
br label %16
16: ; preds = %9
%17 = load float, float* %4
store float %17, float* %3
br label %18
18: ; preds = %16, %8
%19 = load float, float* %3
ret float %19
}

LLVM IR (-O2):
define float @pot(float %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi float [ %9, %6 ], [ 1.000000e+00, %2 ]
ret float %5
6: ; preds = %2
%7 = add nsw i32 %1, -1
%8 = tail call float @pot(float %0, i32 %7)
%9 = fmul float %8, %0
br label %4
}
int test_imm_3Cuint8_mem(unsigned char *val) {
  return ((*val) & (-0x3C << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_3Cuint8_mem>:
testb  $0xc4,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Cuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -60
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ setenv(char *, char *, int);
void settz(char *tzname) { setenv("TZ", tzname, 1); }


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

x86 assembly (clang, -O2):
<settz>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <setenv@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"TZ\00"
define void @settz(i8* %0) {
%2 = tail call i32 @setenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
ret void
}
/* Variables and functions */
int xSetIndicator(unsigned int, int);
int xIndicatorOn(unsigned atom) { return xSetIndicator(atom, 1); }


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

x86 assembly (clang, -O2):
<xIndicatorOn>:
mov    $0x1,%esi
jmp    1030 <xSetIndicator@plt>

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

LLVM IR (-O2):
define i32 @xIndicatorOn(i32 %0) {
%2 = tail call i32 @xSetIndicator(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex32(unsigned int);
void print_info_hex32(unsigned int value) { __console_tx_hex32(value); }


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

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

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

LLVM IR (-O2):
define void @print_info_hex32(i32 %0) {
%2 = tail call i32 @__console_tx_hex32(i32 %0)
ret void
}
_Complex long double test_cacoshl(_Complex long double x) {
  return __builtin_cacoshl(x);
}


x86 assembly (clang, -O0):
<test_cacoshl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <cacoshl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cacoshl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <cacoshl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_cacoshl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_cacoshl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @cacoshl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
unsigned int uint2(unsigned char const *p) { return (p[0] << 8) + p[1]; }


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

x86 assembly (clang, -O2):
<uint2>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @uint2(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ error();
int /*<<< orphan*/ printf(char *, int, char *);
void serror(char *msg, int size) {
  printf("Size error (%d): %s\n", size, msg);
  error();
}


x86 assembly (clang, -O0):
<serror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serror>:
push   %rax
mov    %rdi,%rdx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Size error (%d): %s\0A\00"
define void @serror(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
%8 = call i32 (...) @error()
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Size error (%d): %s\0A\00"
define void @serror(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
%4 = tail call i32 (...) @error()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lexer_init();
long parse();
int /*<<< orphan*/ print(long);
int /*<<< orphan*/ require64BitLongs();
int /*<<< orphan*/ runtime_init();
int main(void) {
  long fi;
  require64BitLongs();
  runtime_init();
  lexer_init();
  fi = parse();
  print(fi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <require64BitLongs@plt>
mov    $0x0,%al
call   1060 <runtime_init@plt>
mov    $0x0,%al
call   1050 <lexer_init@plt>
mov    $0x0,%al
call   1070 <parse@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <require64BitLongs@plt>
xor    %eax,%eax
call   1060 <runtime_init@plt>
xor    %eax,%eax
call   1050 <lexer_init@plt>
xor    %eax,%eax
call   1070 <parse@plt>
mov    %rax,%rdi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 (...) @require64BitLongs()
%4 = call i32 (...) @runtime_init()
%5 = call i32 (...) @lexer_init()
%6 = call i64 (...) @parse()
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = call i32 @print(i64 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @require64BitLongs()
%2 = tail call i32 (...) @runtime_init()
%3 = tail call i32 (...) @lexer_init()
%4 = tail call i64 (...) @parse()
%5 = tail call i32 @print(i64 %4)
ret i32 0
}
void head(char *path, char *message) {}


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

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

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

LLVM IR (-O2):
define void @head(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *dbuf_default_realloc(void *opaque, void *ptr, size_t size) {
  return realloc(ptr, size);
}


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

x86 assembly (clang, -O2):
<dbuf_default_realloc>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @dbuf_default_realloc(i8* nocapture readnone %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @realloc(i8* %1, i64 %2)
ret i8* %4
}
float clamp_float(float val, float lower, float upper) {
  if (val < lower)
    return lower;
  if (val > upper)
    return upper;
  return val;
}


x86 assembly (clang, -O0):
<clamp_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1135 <clamp_float+0x35>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clamp_float+0x5d>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1153 <clamp_float+0x53>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <clamp_float+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_float>:
minss  %xmm0,%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm3
andnps %xmm2,%xmm3
andps  %xmm1,%xmm0
orps   %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @clamp_float(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %6
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %7
%16 = fcmp ogt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @clamp_float(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = select i1 %5, float %2, float %0
%7 = select i1 %4, float %1, float %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ putTty1(char const);
void putTtyN(const char *cp, int n) {
  for (; n > 0; n--, cp++)
    putTty1(*cp);
}


x86 assembly (clang, -O0):
<putTtyN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114f <putTtyN+0x3f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putTty1@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111f <putTtyN+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putTtyN>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    1134 <putTtyN+0x24>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
nop
movsbl (%rbx),%edi
call   1030 <putTty1@plt>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1120 <putTtyN+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @putTtyN(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %9, %4 ], [ %1, %2 ]
%6 = phi i8* [ %10, %4 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call i32 @putTty1(i8 signext %7)
%9 = add nsw i32 %5, -1
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = icmp ugt i32 %5, 1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x10() {
  Assert_real((isascii(16)),
              "/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_isascii.c",
              85, ("isascii should be 1 for 0x10"));
}


x86 assembly (clang, -O0):
<t_isascii_0x10>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x55,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x10>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x55,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x10\00"
define void @t_isascii_0x10() {
%1 = call i32 @isascii(i32 16)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 85, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x10\00"
define void @t_isascii_0x10() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_puts(char *);
void bogus_mm(void) {
  serial_puts("Bogus MM exception, spinning ... \n");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<bogus_mm>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <serial_puts@plt>
jmp    1120 <bogus_mm+0x10>

x86 assembly (clang, -O2):
<bogus_mm>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <serial_puts@plt>
nopl   (%rax)
jmp    1120 <bogus_mm+0x10>

LLVM IR (-O0):
@.str = [35 x i8] c"Bogus MM exception, spinning ... \0A\00"
define void @bogus_mm() {
%1 = call i32 @serial_puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
@.str = [35 x i8] c"Bogus MM exception, spinning ... \0A\00"
define void @bogus_mm() {
%1 = tail call i32 @serial_puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ FiveFunction();
int /*<<< orphan*/ FourFunction();
int /*<<< orphan*/ TwoFunction();
void SixBFunction() {
  TwoFunction();
  FiveFunction();
  FourFunction();
}


x86 assembly (clang, -O0):
<SixBFunction>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <TwoFunction@plt>
mov    $0x0,%al
call   1040 <FiveFunction@plt>
mov    $0x0,%al
call   1030 <FourFunction@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SixBFunction>:
push   %rax
xor    %eax,%eax
call   1050 <TwoFunction@plt>
xor    %eax,%eax
call   1040 <FiveFunction@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <FourFunction@plt>

LLVM IR (-O0):
define void @SixBFunction() {
%1 = call i32 (...) @TwoFunction()
%2 = call i32 (...) @FiveFunction()
%3 = call i32 (...) @FourFunction()
ret void
}

LLVM IR (-O2):
define void @SixBFunction() {
%1 = tail call i32 (...) @TwoFunction()
%2 = tail call i32 (...) @FiveFunction()
%3 = tail call i32 (...) @FourFunction()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int const);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
void err_exit(const char *message, const int error_code) {
  if (message)
    printf("%s", message);
  printf("Hit Enter:\n");
  getchar();
  exit(error_code);
}


x86 assembly (clang, -O0):
<err_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115c <err_exit+0x2c>
mov    -0x8(%rbp),%rsi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0xc(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<err_exit>:
push   %rbx
mov    %esi,%ebx
test   %rdi,%rdi
je     1159 <err_exit+0x19>
mov    %rdi,%rsi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %ebx,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [12 x i8] c"Hit Enter:\0A\00"
define void @err_exit(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @getchar()
%13 = load i32, i32* %4
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [11 x i8] c"Hit Enter:\00"
define void @err_exit(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (...) @getchar()
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ namcoSetN163(int /*<<< orphan*/);
int /*<<< orphan*/ namco_setParams58XX(int /*<<< orphan*/, int /*<<< orphan*/);
void namco_setParams58XX_SetN163(uint16_t addr, uint8_t val) {
  namcoSetN163(addr);
  namco_setParams58XX(addr, val);
}


x86 assembly (clang, -O0):
<namco_setParams58XX_SetN163>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <namcoSetN163@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <namco_setParams58XX@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<namco_setParams58XX_SetN163>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <namcoSetN163@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <namco_setParams58XX@plt>

LLVM IR (-O0):
define void @namco_setParams58XX_SetN163(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @namcoSetN163(i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @namco_setParams58XX(i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @namco_setParams58XX_SetN163(i32 %0, i32 %1) {
%3 = tail call i32 @namcoSetN163(i32 %0)
%4 = tail call i32 @namco_setParams58XX(i32 %0, i32 %1)
ret void
}
int test_imm_0Cuint32_reg(unsigned int val) {
  return ((val) & (0x0C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Cuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Cuint32_reg>:
test   $0xc,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Cuint32_reg(i32 %0) {
%2 = and i32 %0, 12
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err_dump(char *msg) {
  fprintf(stderr, "%s", msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<err_dump>:
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    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @err_dump(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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

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

/* Variables and functions */
struct json_value *json_decode_value(char const **);
struct json_value *json_decode(const char *string) {
  return json_decode_value(&string);
}


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

x86 assembly (clang, -O2):
<json_decode>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <json_decode_value@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.json_value = type { i32 }
define %struct.json_value* @json_decode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call %struct.json_value* @json_decode_value(i8** %2)
ret %struct.json_value* %3
}

LLVM IR (-O2):
%struct.json_value = type { i32 }
define %struct.json_value* @json_decode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call %struct.json_value* @json_decode_value(i8** %2)
ret %struct.json_value* %3
}
/* Variables and functions */
int lua_copytagmethods(int /*<<< orphan*/, int);
int /*<<< orphan*/ lua_newtag();
int(lua_clonetag)(int t) { return lua_copytagmethods(lua_newtag(), (t)); }


x86 assembly (clang, -O0):
<lua_clonetag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lua_newtag@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1040 <lua_copytagmethods@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lua_clonetag>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <lua_newtag@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <lua_copytagmethods@plt>

LLVM IR (-O0):
define i32 @lua_clonetag(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @lua_newtag()
%4 = load i32, i32* %2
%5 = call i32 @lua_copytagmethods(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @lua_clonetag(i32 %0) {
%2 = tail call i32 (...) @lua_newtag()
%3 = tail call i32 @lua_copytagmethods(i32 %2, i32 %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fs_univ_undel(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                 int /*<<< orphan*/);
uint8_t fs_mr_undel(uint32_t ts, uint32_t inode) {
  return fs_univ_undel(ts, 0, 0x80, inode);
}


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

x86 assembly (clang, -O2):
<fs_mr_undel>:
mov    %esi,%ecx
xor    %esi,%esi
mov    $0x80,%edx
jmp    1030 <fs_univ_undel@plt>

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

LLVM IR (-O2):
define i32 @fs_mr_undel(i32 %0, i32 %1) {
%3 = tail call i32 @fs_univ_undel(i32 %0, i32 0, i32 128, i32 %1)
ret i32 %3
}
/* Type definitions */
struct fpu_area {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fpu_xrstor(struct fpu_area *, int);
void dune_fpu_load(struct fpu_area *fp) { fpu_xrstor(fp, -1); }


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

x86 assembly (clang, -O2):
<dune_fpu_load>:
mov    $0xffffffff,%esi
jmp    1030 <fpu_xrstor@plt>

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

LLVM IR (-O2):
%struct.fpu_area = type { i32 }
define void @dune_fpu_load(%struct.fpu_area* %0) {
%2 = tail call i32 @fpu_xrstor(%struct.fpu_area* %0, i32 -1)
ret void
}