xunge/DecIR huggingface dataset:
/* Variables and functions */
char toupper(char);
unsigned char toNum(char c) {
  c = toupper(c);
  switch (c) {
  case 'A':
  case '0':
    return 0;
  case 'C':
  case '1':
    return 1;
  case 'G':
  case '2':
    return 2;
  case 'T':
  case 'U':
  case '3':
    return 3;
  }
  return 4;
}


x86 assembly (clang, -O0):
<toNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <toupper@plt>
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x25,%eax
ja     1178 <toNum+0x68>
mov    -0x10(%rbp),%rax
lea    0xeb5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,-0x1(%rbp)
jmp    117c <toNum+0x6c>
movb   $0x1,-0x1(%rbp)
jmp    117c <toNum+0x6c>
movb   $0x2,-0x1(%rbp)
jmp    117c <toNum+0x6c>
movb   $0x3,-0x1(%rbp)
jmp    117c <toNum+0x6c>
movb   $0x4,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toNum>:
push   %rax
call   1030 <toupper@plt>
movsbl %al,%ecx
add    $0xffffffd0,%ecx
cmp    $0x25,%ecx
ja     113f <toNum+0x2f>
xor    %eax,%eax
lea    0xed6(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x3,%al
pop    %rcx
ret
mov    $0x1,%al
pop    %rcx
ret
mov    $0x2,%al
pop    %rcx
ret
mov    $0x4,%al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @toNum(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call signext i8 @toupper(i8 signext %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
switch i32 %7, label %12 [
i32 65, label %8
i32 48, label %8
i32 67, label %9
i32 49, label %9
i32 71, label %10
i32 50, label %10
i32 84, label %11
i32 85, label %11
i32 51, label %11
]
8: ; preds = %1, %1
store i8 0, i8* %2
br label %13
9: ; preds = %1, %1
store i8 1, i8* %2
br label %13
10: ; preds = %1, %1
store i8 2, i8* %2
br label %13
11: ; preds = %1, %1, %1
store i8 3, i8* %2
br label %13
12: ; preds = %1
store i8 4, i8* %2
br label %13
13: ; preds = %12, %11, %10, %9, %8
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define zeroext i8 @toNum(i8 signext %0) {
%2 = tail call signext i8 @toupper(i8 signext %0)
%3 = sext i8 %2 to i32
switch i32 %3, label %7 [
i32 65, label %8
i32 48, label %8
i32 67, label %4
i32 49, label %4
i32 71, label %5
i32 50, label %5
i32 84, label %6
i32 85, label %6
i32 51, label %6
]
4: ; preds = %1, %1
br label %8
5: ; preds = %1, %1
br label %8
6: ; preds = %1, %1, %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %1, %7, %6, %5, %4
%9 = phi i8 [ 4, %7 ], [ 3, %6 ], [ 2, %5 ], [ 1, %4 ], [ 0, %1 ], [ 0, %1 ]
ret i8 %9
}
/* Variables and functions */
int ENOSYS;
int hwconfig_arg_cmp(const char *opt, const char *arg) { return -ENOSYS; }


x86 assembly (clang, -O0):
<hwconfig_arg_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ed3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hwconfig_arg_cmp>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @hwconfig_arg_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @hwconfig_arg_cmp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
int test_imm_F2uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0xF2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F2uint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 242
%6 = icmp ne i64 %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_F2uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 15859712
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *basename(char *);
char *strrchr(char *, char);
char *file_get_extension(char *path) {
  char *extension = NULL;
  char *base_name = basename(path);
  extension = strrchr(base_name, '.');
  if (extension == base_name)
    extension = NULL;
  else
    extension++;
  return extension;
}


x86 assembly (clang, -O0):
<file_get_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    116e <file_get_extension+0x4e>
movq   $0x0,-0x10(%rbp)
jmp    117a <file_get_extension+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_get_extension>:
push   %rbx
call   1040 <basename@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rdx
xor    %ecx,%ecx
cmp    %rbx,%rax
cmovne %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @file_get_extension(i8* %0) {
%2 = tail call i8* @basename(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 46)
%4 = icmp eq i8* %3, %2
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = select i1 %4, i8* null, i8* %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reply_print_header_sumary(int);
void reply_print_header(int width) {
  reply_print_header_sumary(width);
  printf(" ____________________________________________________________________"
         "_________\n");
  printf("   IP            At MAC Address     Count     Len  MAC Vendor / "
         "Hostname      \n");
  printf(" --------------------------------------------------------------------"
         "---------\n");
}


x86 assembly (clang, -O0):
<reply_print_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <reply_print_header_sumary@plt>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0a(%rip),%rdi
call   1040 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reply_print_header>:
push   %rax
call   1030 <reply_print_header_sumary@plt>
lea    0xed3(%rip),%rdi
call   1040 <puts@plt>
lea    0xf16(%rip),%rdi
call   1040 <puts@plt>
lea    0xf59(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [80 x i8] c" _____________________________________________________________________________\0A\00"
@.str.1 = [80 x i8] c" IP At MAC Address Count Len MAC Vendor / Hostname \0A\00"
@.str.2 = [80 x i8] c" -----------------------------------------------------------------------------\0A\00"
define void @reply_print_header(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @reply_print_header_sumary(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [79 x i8] c" _____________________________________________________________________________\00"
@str.3 = [79 x i8] c" IP At MAC Address Count Len MAC Vendor / Hostname \00"
@str.4 = [79 x i8] c" -----------------------------------------------------------------------------\00"
define void @reply_print_header(i32 %0) {
%2 = tail call i32 @reply_print_header_sumary(i32 %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f401(int *);
int f402(int *p) { return f401(p); }


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

x86 assembly (clang, -O2):
<f402>:
jmp    1030 <f401@plt>

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

LLVM IR (-O2):
define i32 @f402(i32* %0) {
%2 = tail call i32 @f401(i32* %0)
ret i32 %2
}
/* Type definitions */
struct type {
  int dummy;
};
struct expression {
  int dummy;
};

/* Variables and functions */
struct type const *type_get_or_create(int /*<<< orphan*/);
int /*<<< orphan*/ type_new_array_type_reversed(struct type const *,
                                                struct expression const *);
const struct type *
type_get_array_type_reversed(const struct type *values,
                             const struct expression *const_expr_array_size) {
  return type_get_or_create(
      type_new_array_type_reversed(values, const_expr_array_size));
}


x86 assembly (clang, -O0):
<type_get_array_type_reversed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <type_new_array_type_reversed@plt>
mov    %eax,%edi
call   1030 <type_get_or_create@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type_get_array_type_reversed>:
push   %rax
call   1040 <type_new_array_type_reversed@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <type_get_or_create@plt>

LLVM IR (-O0):
%struct.type = type { i32 }
%struct.expression = type { i32 }
define %struct.type* @type_get_array_type_reversed(%struct.type* %0, %struct.expression* %1) {
%3 = alloca %struct.type*
%4 = alloca %struct.expression*
store %struct.type* %0, %struct.type** %3
store %struct.expression* %1, %struct.expression** %4
%5 = load %struct.type*, %struct.type** %3
%6 = load %struct.expression*, %struct.expression** %4
%7 = call i32 @type_new_array_type_reversed(%struct.type* %5, %struct.expression* %6)
%8 = call %struct.type* @type_get_or_create(i32 %7)
ret %struct.type* %8
}

LLVM IR (-O2):
%struct.type = type { i32 }
%struct.expression = type { i32 }
define %struct.type* @type_get_array_type_reversed(%struct.type* %0, %struct.expression* %1) {
%3 = tail call i32 @type_new_array_type_reversed(%struct.type* %0, %struct.expression* %1)
%4 = tail call %struct.type* @type_get_or_create(i32 %3)
ret %struct.type* %4
}
int f(int n, int x, int stride) {
  int a, x1, x2, x3;
  a = x * stride;
  if (n > 64) {
    x1 = x - 3;
    a += x1 * stride;
    x2 = x1 - 3;
    a += x2 * stride;
  } else {
    x3 = x - 3;
    a += x3 * stride;
  }
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x40,-0x4(%rbp)
jle    1152 <f+0x52>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1168 <f+0x68>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %esi,%eax
mov    %edx,%ecx
imul   %esi,%ecx
cmp    $0x41,%edi
jl     111a <f+0x1a>
lea    (%rax,%rax,1),%esi
add    $0xfffffff7,%esi
imul   %edx,%esi
mov    %ecx,%eax
add    %esi,%eax
ret
add    $0xfffffffd,%eax
imul   %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %7
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 64
br i1 %15, label %16, label %31
16: ; preds = %3
%17 = load i32, i32* %5
%18 = sub nsw i32 %17, 3
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = load i32, i32* %6
%21 = mul nsw i32 %19, %20
%22 = load i32, i32* %7
%23 = add nsw i32 %22, %21
store i32 %23, i32* %7
%24 = load i32, i32* %8
%25 = sub nsw i32 %24, 3
store i32 %25, i32* %9
%26 = load i32, i32* %9
%27 = load i32, i32* %6
%28 = mul nsw i32 %26, %27
%29 = load i32, i32* %7
%30 = add nsw i32 %29, %28
store i32 %30, i32* %7
br label %39
31: ; preds = %3
%32 = load i32, i32* %5
%33 = sub nsw i32 %32, 3
store i32 %33, i32* %10
%34 = load i32, i32* %10
%35 = load i32, i32* %6
%36 = mul nsw i32 %34, %35
%37 = load i32, i32* %7
%38 = add nsw i32 %37, %36
store i32 %38, i32* %7
br label %39
39: ; preds = %31, %16
%40 = load i32, i32* %7
ret i32 %40
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %1
%5 = icmp sgt i32 %0, 64
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = shl i32 %1, 1
%8 = add i32 %7, -9
%9 = mul i32 %8, %2
br label %13
10: ; preds = %3
%11 = add nsw i32 %1, -3
%12 = mul nsw i32 %11, %2
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %12, %10 ], [ %4, %6 ]
%15 = phi i32 [ %4, %10 ], [ %9, %6 ]
%16 = add i32 %15, %14
ret i32 %16
}
signed int f15(signed int v_foo) {
  signed int v_parta = v_foo << 14;
  signed int v_partb = ((unsigned int)v_foo) >> 18;
  signed int v_rotl = v_parta | v_partb;
  signed int v_and = v_rotl & 114688;
  return v_and;
}


x86 assembly (clang, -O0):
<f15>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xe,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x12,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1c000,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f15>:
mov    %edi,%eax
and    $0x7,%eax
shl    $0xe,%eax
ret

LLVM IR (-O0):
define i32 @f15(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = shl i32 %7, 14
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = lshr i32 %9, 18
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = or i32 %11, %12
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = and i32 %14, 114688
store i32 %15, i32* %6
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
define i32 @f15(i32 %0) {
%2 = shl i32 %0, 14
%3 = and i32 %2, 114688
ret i32 %3
}
int test_imm_ABuint8_reg(unsigned char val) {
  return ((val) & (0xAB << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_ABuint8_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, 171
%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_ABuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -85
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_constant_and_var_0() {
  char *x = "123";
  clang_analyzer_eval(strcmp(x, "123") == 0);
}


x86 assembly (clang, -O0):
<strcmp_constant_and_var_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_constant_and_var_0>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant_and_var_0() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
define void @strcmp_constant_and_var_0() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Type definitions */
typedef scalar_t__ uint_fast16_t;

/* Variables and functions */
uint_fast16_t lzs_idx_dec_wrap(uint_fast16_t idx, uint_fast16_t dec,
                               uint_fast16_t array_size) {
  if (idx < dec) {
    idx += array_size;
  }
  return idx - dec;
}


x86 assembly (clang, -O0):
<lzs_idx_dec_wrap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112a <lzs_idx_dec_wrap+0x2a>
mov    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lzs_idx_dec_wrap>:
xor    %eax,%eax
sub    %rsi,%rdi
cmovl  %rdx,%rax
add    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @lzs_idx_dec_wrap(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = select i1 %4, i64 %2, i64 0
%6 = sub i64 %0, %1
%7 = add i64 %6, %5
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ parse_option(int, char **);
int /*<<< orphan*/ snoop_packet();
int main(int argc, char **argv) {
  parse_option(argc, argv);
  snoop_packet();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_option(i32 %0, i8** %1)
%4 = tail call i32 (...) @snoop_packet()
ret i32 0
}
unsigned int fib(unsigned int n) {
  return (n < 2) ? n : fib(n - 1) + fib(n - 2);
}


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

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

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add i32 %4, -2
%9 = add i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add i32 %13, %12
ret i32 %14
}
void rop3_188_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D & S;
  stk3 = ~stk3;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_188_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_188_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_188_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = load i8*, i8** %4
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = load i8, i8* %6
%54 = zext i8 %53 to i32
%55 = and i32 %52, %54
%56 = or i32 %49, %55
%57 = trunc i32 %56 to i8
%58 = load i8*, i8** %4
store i8 %57, i8* %58
ret void
}

LLVM IR (-O2):
define void @rop3_188_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int /*<<< orphan*/, char *, char *, char *, int);
void gmx_finalize(void) {
  fatal_error(0, "Routine %s called in %s, %d", "gmx_finalize",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/"
              "tests/test_07/network.c",
              436);
}


x86 assembly (clang, -O0):
<gmx_finalize>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
lea    0xef8(%rip),%rdx
lea    0xefe(%rip),%rcx
mov    $0x1b4,%r8d
call   1030 <fatal_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_finalize>:
lea    0xee9(%rip),%rsi
lea    0xefe(%rip),%rdx
lea    0xf04(%rip),%rcx
xor    %edi,%edi
mov    $0x1b4,%r8d
jmp    1030 <fatal_error@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [13 x i8] c"gmx_finalize\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_finalize() {
%1 = call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 436)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [13 x i8] c"gmx_finalize\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_finalize() {
%1 = tail call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 436)
ret void
}
/* Type definitions */
struct tracecmd_recorder {
  int dummy;
};

/* Variables and functions */
struct tracecmd_recorder *
tracecmd_create_buffer_recorder_fd2(int, int, int, unsigned int, char const *,
                                    int /*<<< orphan*/);
struct tracecmd_recorder *
tracecmd_create_buffer_recorder_fd(int fd, int cpu, unsigned flags,
                                   const char *buffer) {
  return tracecmd_create_buffer_recorder_fd2(fd, -1, cpu, flags, buffer, 0);
}


x86 assembly (clang, -O0):
<tracecmd_create_buffer_recorder_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0xffffffff,%esi
xor    %r9d,%r9d
call   1030 <tracecmd_create_buffer_recorder_fd2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracecmd_create_buffer_recorder_fd>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    $0xffffffff,%esi
xor    %r9d,%r9d
jmp    1030 <tracecmd_create_buffer_recorder_fd2@plt>

LLVM IR (-O0):
%struct.tracecmd_recorder = type { i32 }
define %struct.tracecmd_recorder* @tracecmd_create_buffer_recorder_fd(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call %struct.tracecmd_recorder* @tracecmd_create_buffer_recorder_fd2(i32 %9, i32 -1, i32 %10, i32 %11, i8* %12, i32 0)
ret %struct.tracecmd_recorder* %13
}

LLVM IR (-O2):
%struct.tracecmd_recorder = type { i32 }
define %struct.tracecmd_recorder* @tracecmd_create_buffer_recorder_fd(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call %struct.tracecmd_recorder* @tracecmd_create_buffer_recorder_fd2(i32 %0, i32 -1, i32 %1, i32 %2, i8* %3, i32 0)
ret %struct.tracecmd_recorder* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xbe() {
  Assert_real((isascii(190) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              955, ("isascii should be 0 for 0xbe"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xbe\00"
define void @t_isascii_0xbe() {
%1 = call i64 @isascii(i32 190)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 955, 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 0 for 0xbe\00"
define void @t_isascii_0xbe() {
%1 = tail call i64 @isascii(i32 190)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 955, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void rtems_bsp_delay(int num) {
  while (num--) {
    __asm__("nop");
  }
}


x86 assembly (clang, -O0):
<rtems_bsp_delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1121 <rtems_bsp_delay+0x21>
nop
jmp    1107 <rtems_bsp_delay+0x7>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtems_bsp_delay>:
test   %edi,%edi
je     1116 <rtems_bsp_delay+0x16>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
nop
add    $0xffffffff,%edi
jne    1110 <rtems_bsp_delay+0x10>
ret

LLVM IR (-O0):
define void @rtems_bsp_delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp ne i32 %4, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @rtems_bsp_delay(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
void GPS_UBX(void) {}


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

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

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

LLVM IR (-O2):
define void @GPS_UBX() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ErrorS(long, char *, char const *);
void Error_UnsuitableStringForKeyword(long p_position, const char *p_string) {
  _ErrorS(p_position, "Keyword '%s' is ambiguous with identifiers", p_string);
}


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

x86 assembly (clang, -O2):
<Error_UnsuitableStringForKeyword>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <_ErrorS@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Keyword '%s' is ambiguous with identifiers\00"
define void @Error_UnsuitableStringForKeyword(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = load i8*, i8** %4
%7 = call i32 @_ErrorS(i64 %5, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Keyword '%s' is ambiguous with identifiers\00"
define void @Error_UnsuitableStringForKeyword(i64 %0, i8* %1) {
%3 = tail call i32 @_ErrorS(i64 %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ io_error();
struct fsm *fsm_read_prolog(char *filename) {
  io_error();
  return NULL;
}


x86 assembly (clang, -O0):
<fsm_read_prolog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <io_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_read_prolog>:
push   %rax
xor    %eax,%eax
call   1030 <io_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_read_prolog(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @io_error()
ret %struct.fsm* null
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define noalias %struct.fsm* @fsm_read_prolog(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @io_error()
ret %struct.fsm* null
}
void framebuffer_sync_from_host_maybe(void) {}


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

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

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

LLVM IR (-O2):
define void @framebuffer_sync_from_host_maybe() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SCR_BeginLoadingPlaque();
void SCR_Loading_f(void) { SCR_BeginLoadingPlaque(); }


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

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

LLVM IR (-O0):
define void @SCR_Loading_f() {
%1 = call i32 (...) @SCR_BeginLoadingPlaque()
ret void
}

LLVM IR (-O2):
define void @SCR_Loading_f() {
%1 = tail call i32 (...) @SCR_BeginLoadingPlaque()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core5_swap(char *, int);
void U_EMRWIDENPATH_swap(char *record, int torev) { core5_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRWIDENPATH_swap>:
jmp    1030 <core5_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRWIDENPATH_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core5_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_printf(char *, int);
int main(int argc, char *argv[]) { my_printf("abcedf %d abc", 125); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x7d,%esi
call   1030 <my_printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x7d,%esi
call   1030 <my_printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"abcedf %d abc\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @my_printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 125)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"abcedf %d abc\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @my_printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 125)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bio_s_mempacket_test_free();
void cleanup_tests(void) { bio_s_mempacket_test_free(); }


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

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

LLVM IR (-O0):
define void @cleanup_tests() {
%1 = call i32 (...) @bio_s_mempacket_test_free()
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
void clear_win(WINDOW *win) {
  wclear(win);
  box(win, 0, 0);
}


x86 assembly (clang, -O0):
<clear_win>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <wclear@plt>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <box@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_win>:
push   %rbx
mov    %rdi,%rbx
call   1040 <wclear@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <box@plt>

LLVM IR (-O0):
define void @clear_win(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wclear(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @box(i32* %5, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @clear_win(i32* %0) {
%2 = tail call i32 @wclear(i32* %0)
%3 = tail call i32 @box(i32* %0, i32 0, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ name_cipher(char *, short);
int /*<<< orphan*/ r_write(int /*<<< orphan*/ *, char *, short);
int strlen(char *);
void write_string(char *s, FILE *fp) {
  short n;
  n = strlen(s) + 1;
  name_cipher(s, n);
  r_write(fp, (char *)&n, sizeof(short));
  r_write(fp, s, n);
}


x86 assembly (clang, -O0):
<write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
movswl -0x12(%rbp),%esi
call   1040 <name_cipher@plt>
mov    -0x10(%rbp),%rdi
lea    -0x12(%rbp),%rsi
mov    $0x2,%edx
call   1050 <r_write@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movswl -0x12(%rbp),%edx
call   1050 <r_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %ax,0x6(%rsp)
movswl %ax,%esi
mov    %rbx,%rdi
call   1040 <name_cipher@plt>
lea    0x6(%rsp),%rsi
mov    %r14,%rdi
mov    $0x2,%edx
call   1050 <r_write@plt>
movswl 0x6(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <r_write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @write_string(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i16
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i8*, i8** %3
%11 = load i16, i16* %5
%12 = call i32 @name_cipher(i8* %10, i16 signext %11)
%13 = load i32*, i32** %4
%14 = bitcast i16* %5 to i8*
%15 = call i32 @r_write(i32* %13, i8* %14, i16 signext 2)
%16 = load i32*, i32** %4
%17 = load i8*, i8** %3
%18 = load i16, i16* %5
%19 = call i32 @r_write(i32* %16, i8* %17, i16 signext %18)
ret void
}

LLVM IR (-O2):
define void @write_string(i8* %0, i32* %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = tail call i32 @strlen(i8* %0)
%6 = trunc i32 %5 to i16
%7 = add i16 %6, 1
store i16 %7, i16* %3
%8 = tail call i32 @name_cipher(i8* %0, i16 signext %7)
%9 = call i32 @r_write(i32* %1, i8* %4, i16 signext 2)
%10 = load i16, i16* %3
%11 = call i32 @r_write(i32* %1, i8* %0, i16 signext %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *xrealloc(void *in_ptr, size_t size) {
  void *ptr = realloc(in_ptr, size);
  if (ptr == NULL) {
    perror("xrealloc: out of memory.\n");
    abort();
    return NULL;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116f <xrealloc+0x3f>
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"xrealloc: out of memory.\0A\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [26 x i8] c"xrealloc: out of memory.\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, unsigned int);
void CopyMemory(void *dest, const void *src, unsigned int size) {
  memcpy(dest, src, size);
}


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

x86 assembly (clang, -O2):
<CopyMemory>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @CopyMemory(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xaf() {
  Assert_real((isodigit(175) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              880, ("isodigit should be 0 for 0xaf"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xaf>:
push   %rax
mov    $0xaf,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x370,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xaf\00"
define void @t_isodigit_0xaf() {
%1 = call i64 @isodigit(i32 175)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 880, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xaf\00"
define void @t_isodigit_0xaf() {
%1 = tail call i64 @isodigit(i32 175)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 880, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}