xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PCMPEQB(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x74);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PCMPEQB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x74,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PCMPEQB>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x74,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PCMPEQB(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 116)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PCMPEQB(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 116)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void vis_dot_postamble(void) { printf("}\n"); }


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"}\00"
define void @vis_dot_postamble() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CompileWord(int, long);
int /*<<< orphan*/ MakeLink(int, int);
void DoSColon(void) {
  CompileWord(65, 0L);
  MakeLink(5, 1);
}


x86 assembly (clang, -O0):
<DoSColon>:
push   %rbp
mov    %rsp,%rbp
mov    $0x41,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <CompileWord@plt>
mov    $0x5,%edi
mov    $0x1,%esi
call   1040 <MakeLink@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoSColon>:
push   %rax
mov    $0x41,%edi
xor    %esi,%esi
call   1030 <CompileWord@plt>
mov    $0x5,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <MakeLink@plt>

LLVM IR (-O0):
define void @DoSColon() {
%1 = call i32 @CompileWord(i32 65, i64 0)
%2 = call i32 @MakeLink(i32 5, i32 1)
ret void
}

LLVM IR (-O2):
define void @DoSColon() {
%1 = tail call i32 @CompileWord(i32 65, i64 0)
%2 = tail call i32 @MakeLink(i32 5, i32 1)
ret void
}
char downcase_c(char c) {
  if ((c >= 'A') && (c <= 'Z')) {
    return c + 0x20;
  }
  return c;
}


x86 assembly (clang, -O0):
<downcase_c>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <downcase_c+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <downcase_c+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <downcase_c+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<downcase_c>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @downcase_c(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
int tabcmp(const int *tab1, const int *tab2, int n) {
  int i;
  for (i = 0; i < n; i++) {
    if (tab1[i] != tab2[i])
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<tabcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115d <tabcmp+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114a <tabcmp+0x4a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1164 <tabcmp+0x64>
jmp    114f <tabcmp+0x4f>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <tabcmp+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tabcmp>:
test   %edx,%edx
jle    1121 <tabcmp+0x21>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    (%rdi,%rcx,4),%edx
cmp    (%rsi,%rcx,4),%edx
jne    1124 <tabcmp+0x24>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <tabcmp+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @tabcmp(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 %10
%14 = load i32, i32* %13
%15 = icmp eq i32 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 0, %3 ], [ 0, %7 ], [ -1, %9 ]
ret i32 %18
}
unsigned long unsignedlong_ignoring_unsignedlonglong(unsigned long x,
                                                     unsigned long long y) {
  return x;
}


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

x86 assembly (clang, -O2):
<unsignedlong_ignoring_unsignedlonglong>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsignedlong_ignoring_unsignedlonglong(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlong_ignoring_unsignedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int fwrite(unsigned char *const, int, unsigned int,
                    int /*<<< orphan*/ *);
unsigned int pcm_write(const void *const device_st, unsigned char *const buffer,
                       unsigned int length) {
  return fwrite(buffer, 1, length, (FILE *)device_st);
}


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

x86 assembly (clang, -O2):
<pcm_write>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i32 @pcm_write(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @fwrite(i8* %1, i32 1, i32 %2, i32* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void show_usage(char *name) {
  fprintf(stderr, "Syntax: %s [-d duration] pathname\n", name);
  fprintf(stderr, "\t-d duration of test (in seconds)\n");
  exit((2));
}


x86 assembly (clang, -O0):
<show_usage>:
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
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Syntax: %s [-d duration] pathname\0A\00"
@.str.1 = [35 x i8] c"\09-d duration of test (in seconds)\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Syntax: %s [-d duration] pathname\0A\00"
@.str.1 = [35 x i8] c"\09-d duration of test (in seconds)\0A\00"
define void @show_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
float sll2f(long long);
main() {
  if (sll2f((long long int)(~((~0ULL) >> 1))) !=
      (float)(long long int)~((~0ULL) >> 1))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movabs $0x8000000000000000,%rdi
call   1040 <sll2f@plt>
movss  0xeaa(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    116a <main+0x3a>
jp     116a <main+0x3a>
jmp    1171 <main+0x41>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x8000000000000000,%rdi
call   1040 <sll2f@plt>
ucomiss 0xeb9(%rip),%xmm0
jne    114b <main+0x1b>
jnp    1152 <main+0x22>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call float @sll2f(i64 -9223372036854775808)
%3 = fcmp une float %2, 0xC3E0000000000000
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float @sll2f(i64 -9223372036854775808)
%2 = fcmp une float %1, 0xC3E0000000000000
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
void foo_1_2_1_1_1_1_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_1_1_1_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ demo(char *, char *);
void main(void) { demo("DEMO", "hello"); }


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

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <demo@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"DEMO\00"
@.str.1 = [6 x i8] c"hello\00"
define void @main() {
%1 = tail call i32 @demo(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char const *);
void err(const char *s) {
  perror(s);
  abort();
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<err>:
push   %rax
call   1040 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @err(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 (...) @abort()
unreachable
}
int test_imm_EEuint8_reg(unsigned char val) {
  return ((val) & (0xEE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EEuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xee,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_EEuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -18
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg4setBank0(int);
void m31setParams5000(uint16_t addr, uint8_t val) {
  (void)addr;
  prg4setBank0(val << 12);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xc,%edi
jmp    1030 <prg4setBank0@plt>

LLVM IR (-O0):
define void @m31setParams5000(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 = shl i32 %6, 12
%8 = call i32 @prg4setBank0(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m31setParams5000(i32 %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = tail call i32 @prg4setBank0(i32 %3)
ret void
}
/* Type definitions */
struct Plex {
  int dummy;
};

/* Variables and functions */
int moreGlass(struct Plex *);
int initializeGlass(struct Plex *plex) {
  int result;
  result = moreGlass(plex);
  return (result);
}


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

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

LLVM IR (-O0):
%struct.Plex = type { i32 }
define i32 @initializeGlass(%struct.Plex* %0) {
%2 = alloca %struct.Plex*
%3 = alloca i32
store %struct.Plex* %0, %struct.Plex** %2
%4 = load %struct.Plex*, %struct.Plex** %2
%5 = call i32 @moreGlass(%struct.Plex* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Plex = type { i32 }
define i32 @initializeGlass(%struct.Plex* %0) {
%2 = tail call i32 @moreGlass(%struct.Plex* %0)
ret i32 %2
}
int lisp_mock_return_alloc_error(void *user_data) { return 0x01; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI12_SCIX0() {
ret void
}
/* Variables and functions */
int *lista_numeros_pares(int quantos) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i32* @lista_numeros_pares(i32 %0) {
ret i32* null
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int);
int /*<<< orphan*/ pthread_self();
void *f_thread(void *i) {
  int *x = (int *)i;
  printf("je suis le thread %d.%ld\n param était %d\n\n", getpid(),
         pthread_self(), *x);
}


x86 assembly (clang, -O0):
<f_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_thread>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    (%rbx),%ecx
lea    0xeb1(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"je suis le thread %d.%ld\0A param \C3\A9tait %d\0A\0A\00"
define i8* @f_thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %4
%7 = call i32 (...) @getpid()
%8 = call i32 (...) @pthread_self()
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %10)
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [44 x i8] c"je suis le thread %d.%ld\0A param \C3\A9tait %d\0A\0A\00"
define noalias i8* @f_thread(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 (...) @pthread_self()
%5 = load i32, i32* %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4, i32 %5)
ret i8* undef
}
int hashCode(char *str) {
  int hc;
  hc = 0;
  while ('\0' != *str) {
    hc = hc << 5;
    hc = hc - hc + *str;
    str++;
  }
  return (hc);
}


x86 assembly (clang, -O0):
<hashCode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     114c <hashCode+0x4c>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hashCode+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hashCode(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = phi i32 [ 0, %1 ], [ %7, %2 ]
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %9, label %2
9: ; preds = %2
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ *doMalloc();
hol(pthread_mutex_t **l1, pthread_mutex_t **l2) {
  *l1 = doMalloc();
  *l2 = doMalloc();
}


x86 assembly (clang, -O0):
<hol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <doMalloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <doMalloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hol>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <doMalloc@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
call   1030 <doMalloc@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @hol(i32** %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32**
store i32** %0, i32*** %4
store i32** %1, i32*** %5
%6 = call i32* (...) @doMalloc()
%7 = load i32**, i32*** %4
store i32* %6, i32** %7
%8 = call i32* (...) @doMalloc()
%9 = load i32**, i32*** %5
store i32* %8, i32** %9
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @hol(i32** nocapture writeonly %0, i32** nocapture writeonly %1) {
%3 = tail call i32* (...) @doMalloc()
store i32* %3, i32** %0
%4 = tail call i32* (...) @doMalloc()
store i32* %4, i32** %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void putserr(const char *msg) {
  fputs(msg, stderr);
  fputs("\n", stderr);
  fflush(stderr);
}


x86 assembly (clang, -O0):
<putserr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xeb2(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putserr>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @putserr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fflush(i32 %6)
ret void
}
cup(pn1, pn2) int pn1, pn2;
{ brc2(pn1, pn2, 'H'); }


x86 assembly (clang, -O0):
<cup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x48,%edx
mov    $0x0,%al
call   1030 <brc2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cup>:
mov    $0x48,%edx
xor    %eax,%eax
jmp    1030 <brc2@plt>

LLVM IR (-O0):
define i32 @cup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @brc2 to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 72)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cup(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @brc2 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 72)
ret i32 undef
}
unsigned int hash_string(const char *key) {
  const char *p;
  unsigned int hash = 0;
  for (p = key; *p; p++)
    hash = (hash * 617) ^ *p;
  return hash;
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <hash_string+0x48>
imul   $0x269,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
xor    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <hash_string+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <hash_string+0x27>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x269,%eax,%edx
movsbl %cl,%eax
xor    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 617
%9 = sext i8 %5 to i32
%10 = xor i32 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %15
}
/* Type definitions */
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
int CHAR_MAX;
int _Locale_n_cs_precedes(struct _Locale_monetary *lmon) { return CHAR_MAX; }


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

x86 assembly (clang, -O2):
<_Locale_n_cs_precedes>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_n_cs_precedes(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
%3 = load i32, i32* @CHAR_MAX
ret i32 %3
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
@CHAR_MAX = global i32 0
define i32 @_Locale_n_cs_precedes(%struct._Locale_monetary* nocapture readnone %0) {
%2 = load i32, i32* @CHAR_MAX
ret i32 %2
}
unsigned long kgsl_unmapped_pages() { return 0UL; }


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

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

LLVM IR (-O0):
define i64 @kgsl_unmapped_pages() {
ret i64 0
}

LLVM IR (-O2):
define i64 @kgsl_unmapped_pages() {
ret i64 0
}
/* Variables and functions */
double atof(char const *);
double tosReal_fromString(const char *string) { return atof(string); }


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

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

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

LLVM IR (-O2):
define double @tosReal_fromString(i8* nocapture %0) {
%2 = tail call double @atof(i8* %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x3b() {
  Assert_real((isgraph(59)),
              "/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_isgraph.c",
              300, ("isgraph should be 1 for ;"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x3b>:
push   %rax
mov    $0x3b,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x12c,%edx
pop    %rax
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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for ;\00"
define void @t_isgraph_0x3b() {
%1 = call i32 @isgraph(i32 59)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 300, i8* getelementptr inbounds ([26 x i8], [26 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for ;\00"
define void @t_isgraph_0x3b() {
%1 = tail call i32 @isgraph(i32 59)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 300, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_07int16_reg(short val) {
  return ((val) & (-0x07 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_07int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xfffffff9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_07int16_reg>:
test   $0xfff9,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_07int16_reg(i16 signext %0) {
%2 = and i16 %0, -7
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ div_const2(int);
void minmax_div_const2_Bad_FN() {
  div_const2(1);
  div_const2(-2);
}


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

x86 assembly (clang, -O2):
<minmax_div_const2_Bad_FN>:
push   %rax
mov    $0x1,%edi
call   1030 <div_const2@plt>
mov    $0xfffffffe,%edi
pop    %rax
jmp    1030 <div_const2@plt>

LLVM IR (-O0):
define void @minmax_div_const2_Bad_FN() {
%1 = call i32 @div_const2(i32 1)
%2 = call i32 @div_const2(i32 -2)
ret void
}

LLVM IR (-O2):
define void @minmax_div_const2_Bad_FN() {
%1 = tail call i32 @div_const2(i32 1)
%2 = tail call i32 @div_const2(i32 -2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
void Set_Byte(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
void Abs_Set_Byte(int32_t address, int32_t value) {
  return Set_Byte(NULL, address, value);
}


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

x86 assembly (clang, -O2):
<Abs_Set_Byte>:
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <Set_Byte@plt>

LLVM IR (-O0):
define void @Abs_Set_Byte(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
ret void
}

LLVM IR (-O2):
define void @Abs_Set_Byte(i32 %0, i32 %1) {
tail call void @Set_Byte(i32* null, i32 %0, i32 %1)
ret void
}
void BIO_dup_chain(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_dup_chain() {
ret void
}
int strcmp(const char *s1, const char *s2) {
  while (*s1 == *s2) {
    if (!*s1)
      return 0;
    s1++;
    s2++;
  }
  return (*s1 & 0xFF) - (*s2 & 0xFF);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1158 <strcmp+0x58>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113b <strcmp+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1176 <strcmp+0x76>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0xff,%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
and    $0xff,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
mov    (%rsi),%dl
cmp    %dl,%al
jne    1124 <strcmp+0x24>
mov    $0x1,%ecx
nopl   (%rax)
test   %al,%al
je     112d <strcmp+0x2d>
movzbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
add    $0x1,%rcx
cmp    %dl,%al
je     1110 <strcmp+0x10>
movzbl %dl,%ecx
movzbl %al,%eax
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %6
6: ; preds = %19, %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = load i8*, i8** %5
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %9, %12
br i1 %13, label %14, label %24
14: ; preds = %6
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = icmp ne i8 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %14
store i32 0, i32* %3
br label %34
19: ; preds = %14
%20 = load i8*, i8** %4
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %4
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %5
br label %6
24: ; preds = %6
%25 = load i8*, i8** %4
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = and i32 %27, 255
%29 = load i8*, i8** %5
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = and i32 %31, 255
%33 = sub nsw i32 %28, %32
store i32 %33, i32* %3
br label %34
34: ; preds = %24, %18
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2, %11
%7 = phi i8 [ %14, %11 ], [ %3, %2 ]
%8 = phi i8* [ %13, %11 ], [ %1, %2 ]
%9 = phi i8* [ %12, %11 ], [ %0, %2 ]
%10 = icmp eq i8 %7, 0
br i1 %10, label %23, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %12
%15 = load i8, i8* %13
%16 = icmp eq i8 %14, %15
br i1 %16, label %6, label %17
17: ; preds = %11, %2
%18 = phi i8 [ %3, %2 ], [ %14, %11 ]
%19 = phi i8 [ %4, %2 ], [ %15, %11 ]
%20 = zext i8 %19 to i32
%21 = zext i8 %18 to i32
%22 = sub nsw i32 %21, %20
br label %23
23: ; preds = %6, %17
%24 = phi i32 [ %22, %17 ], [ 0, %6 ]
ret i32 %24
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, int /*<<< orphan*/);
int any(char *s1, char *s2) {
  while (*s2)
    if (strchr(s1, *s2++) != NULL)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<any>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <any+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     115e <any+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    116a <any+0x5a>
jmp    1120 <any+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<any>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%esi
test   %esi,%esi
je     113f <any+0x2f>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strchr@plt>
test   %rax,%rax
je     1120 <any+0x10>
mov    $0x1,%eax
jmp    1141 <any+0x31>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @any(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %1, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = sext i8 %5 to i32
%10 = tail call i32* @strchr(i8* %0, i32 %9)
%11 = icmp eq i32* %10, null
br i1 %11, label %3, label %12
12: ; preds = %3, %7
%13 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %13
}
int fun875() { return 875; }


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

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

LLVM IR (-O0):
define i32 @fun875() {
ret i32 875
}

LLVM IR (-O2):
define i32 @fun875() {
ret i32 875
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void info() {
  printf("=== dsminfo v1.0\n");
  printf("=== Part of Linux ROM Kitchen\n");
  printf("=== (c)2008 Pau Oliva Fora - pof @ XDA-Developers\n\n");
}


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

x86 assembly (clang, -O2):
<info>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xeff(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"=== dsminfo v1.0\0A\00"
@.str.1 = [31 x i8] c"=== Part of Linux ROM Kitchen\0A\00"
@.str.2 = [52 x i8] c"=== (c)2008 Pau Oliva Fora - pof @ XDA-Developers\0A\0A\00"
define void @info() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"=== dsminfo v1.0\00"
@str.3 = [30 x i8] c"=== Part of Linux ROM Kitchen\00"
@str.4 = [51 x i8] c"=== (c)2008 Pau Oliva Fora - pof @ XDA-Developers\0A\00"
define void @info() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char str[100], str2[100];
  gets(str);
  if (str == NULL) {
    printf("gets 1 fail\n");
  } else {
    printf("gets 1 print: %s\n", str);
  }
  gets(str2);
  if (str2 == NULL) {
    printf("gets 2 fail\n");
  } else {
    printf("gets 2 print: %s\n", str2);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
lea    -0x70(%rbp),%rsi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xe0(%rbp),%rdi
call   1040 <gets@plt>
lea    -0xe0(%rbp),%rsi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xe0,%rsp
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"gets 1 print: %s\0A\00"
@.str.1 = [18 x i8] c"gets 2 print: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = call i32 @gets(i8* %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"gets 1 print: %s\0A\00"
@.str.1 = [18 x i8] c"gets 2 print: %s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %3)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = call i32 @gets(i8* %4)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
typedef int u_int;
typedef int u_char;

/* Variables and functions */
void clear_channelmap(u_int nr, u_char *map) {
  map[nr >> 3] &= ~(1 << (nr & 7));
}


x86 assembly (clang, -O0):
<clear_channelmap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_channelmap>:
mov    %edi,%ecx
and    $0x7,%cl
mov    $0xfffffffe,%eax
rol    %cl,%eax
sar    $0x3,%edi
movslq %edi,%rcx
and    %eax,(%rsi,%rcx,4)
ret

LLVM IR (-O0):
define void @clear_channelmap(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 = and i32 %5, 7
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i32*, i32** %4
%10 = load i32, i32* %3
%11 = ashr i32 %10, 3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, %8
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @clear_channelmap(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, 7
%4 = shl nuw nsw i32 1, %3
%5 = xor i32 %4, -1
%6 = ashr i32 %0, 3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %1, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %5
store i32 %10, i32* %8
ret void
}