xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ op_to_dn(char *, int, int /*<<< orphan*/);
void i_sub_dn(void) { op_to_dn("sub", 1, 0); }


x86 assembly (clang, -O0):
<i_sub_dn>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <op_to_dn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_sub_dn>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <op_to_dn@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define void @i_sub_dn() {
%1 = tail call i32 @op_to_dn(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serial_puts(char *);
void bogus_bus(void) {
  serial_puts("Bogus BUS exception, spinning ... \n");
  for (;;)
    ;
}


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

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

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

LLVM IR (-O2):
@.str = [36 x i8] c"Bogus BUS exception, spinning ... \0A\00"
define void @bogus_bus() {
%1 = tail call i32 @serial_puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
void randomfill(long len, long adr) {
  unsigned long *p = (unsigned long *)adr;
  unsigned long value = 0;
  while (len > 0) {
    value = ((value * 1103515245 + 12345) & 0x7fffffff);
    *p = value;
    p++;
    len -= sizeof(long);
  }
}


x86 assembly (clang, -O0):
<randomfill>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1167 <randomfill+0x67>
imul   $0x41c64e6d,-0x20(%rbp),%rax
41
add    $0x3039,%rax
and    $0x7fffffff,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <randomfill+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomfill>:
test   %rdi,%rdi
jle    1131 <randomfill+0x31>
add    $0x8,%rdi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
imul   $0x41c64e6d,%eax,%eax
add    $0x3039,%eax
and    $0x7fffffff,%eax
mov    %rax,(%rsi)
add    $0x8,%rsi
add    $0xfffffffffffffff8,%rdi
cmp    $0x8,%rdi
ja     1110 <randomfill+0x10>
ret

LLVM IR (-O0):
define void @randomfill(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = inttoptr i64 %7 to i64*
store i64* %8, i64** %5
store i64 0, i64* %6
br label %9
9: ; preds = %12, %2
%10 = load i64, i64* %3
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load i64, i64* %6
%14 = mul i64 %13, 1103515245
%15 = add i64 %14, 12345
%16 = and i64 %15, 2147483647
store i64 %16, i64* %6
%17 = load i64, i64* %6
%18 = load i64*, i64** %5
store i64 %17, i64* %18
%19 = load i64*, i64** %5
%20 = getelementptr inbounds i64, i64* %19, i32 1
store i64* %20, i64** %5
%21 = load i64, i64* %3
%22 = sub i64 %21, 8
store i64 %22, i64* %3
br label %9
23: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @randomfill(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = inttoptr i64 %1 to i64*
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %12, %6 ], [ 0, %4 ]
%8 = phi i64* [ %13, %6 ], [ %5, %4 ]
%9 = phi i64 [ %14, %6 ], [ %0, %4 ]
%10 = mul nuw nsw i64 %7, 1103515245
%11 = add nuw nsw i64 %10, 12345
%12 = and i64 %11, 2147483647
store i64 %12, i64* %8
%13 = getelementptr inbounds i64, i64* %8, i64 1
%14 = add nsw i64 %9, -8
%15 = icmp ugt i64 %9, 8
br i1 %15, label %6, label %16
16: ; preds = %6, %2
ret void
}
int test_imm_28int64_lowword_reg(long long val) {
  return ((val) & (0x28 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_28int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 40
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ hash(int);
void test(int M, int N) {
  int c1, c2;
  int i;
  c1 = M + 1;
  i = N + 2;
  {
    hash(1);
    hash(N + 2);
  };
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
add    $0x2,%edi
call   1030 <hash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %esi,%ebx
mov    $0x1,%edi
call   1030 <hash@plt>
add    $0x2,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <hash@plt>

LLVM IR (-O0):
define void @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 2
store i32 %11, i32* %7
%12 = call i32 @hash(i32 1)
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 2
%15 = call i32 @hash(i32 %14)
ret void
}

LLVM IR (-O2):
define void @test(i32 %0, i32 %1) {
%3 = tail call i32 @hash(i32 1)
%4 = add nsw i32 %1, 2
%5 = tail call i32 @hash(i32 %4)
ret void
}
void RTCrc32Process(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCrc32Process() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_break();
int /*<<< orphan*/ write_line(char *);
void latex_itemize_item(void) {
  write_break();
  write_line("\\item");
}


x86 assembly (clang, -O0):
<latex_itemize_item>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <write_break@plt>
lea    0xece(%rip),%rdi
call   1040 <write_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<latex_itemize_item>:
push   %rax
xor    %eax,%eax
call   1030 <write_break@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <write_line@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\\item\00"
define void @latex_itemize_item() {
%1 = call i32 (...) @write_break()
%2 = call i32 @write_line(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\\item\00"
define void @latex_itemize_item() {
%1 = tail call i32 (...) @write_break()
%2 = tail call i32 @write_line(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fprintf(stderr, "Usage: [-f | -r] ipv6-address\n");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: [-f | -r] ipv6-address\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: [-f | -r] ipv6-address\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
time_t round_up(time_t t, int align) {
  t = t - 1;
  t = t - t % align;
  t = t + align;
  return t;
}


x86 assembly (clang, -O0):
<round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up>:
lea    -0x1(%rdi),%eax
cltd
idiv   %esi
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @round_up(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 = sub nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
%11 = sub nsw i32 %7, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @round_up(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = srem i32 %3, %1
%5 = add i32 %3, %1
%6 = sub i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void *thread_start(void *arg) {
  sleep(1);
  return arg;
}


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

x86 assembly (clang, -O2):
<thread_start>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1030 <sleep@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @thread_start(i8* readnone returned %0) {
%2 = tail call i32 @sleep(i32 1)
ret i8* %0
}
void menu_delete_employee(void) { return; }


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

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

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

LLVM IR (-O2):
define void @menu_delete_employee() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(const char *message) {
  if (message)
    printf("%s\n", message);
  printf("pwm_clock <-e | -d> <PWM [PWM]>\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <print_usage+0x29>
mov    -0x8(%rbp),%rsi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
test   %rdi,%rdi
je     111f <print_usage+0xf>
push   %rax
call   1030 <puts@plt>
add    $0x8,%rsp
lea    0xeda(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [34 x i8] c"pwm_clock <-e | -d> <PWM [PWM]>\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"pwm_clock <-e | -d> <PWM [PWM]>\0A\00"
define void @print_usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
gen_swap() { output_line("xchg"); }


x86 assembly (clang, -O0):
<gen_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <output_line@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"xchg\00"
define i32 @gen_swap() {
%1 = alloca i32
%2 = call i32 @output_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"xchg\00"
define i32 @gen_swap() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_be32(int /*<<< orphan*/,
                                        int /*<<< orphan*/ *);
void put_unaligned_be32(uint32_t val, void *p) {
  __put_unaligned_be32(val, (uint8_t *)p);
}


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

x86 assembly (clang, -O2):
<put_unaligned_be32>:
jmp    1030 <__put_unaligned_be32@plt>

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

LLVM IR (-O2):
define void @put_unaligned_be32(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @__put_unaligned_be32(i32 %0, i32* %3)
ret void
}
void asm_cursorshape(char start, char end) {
  asm volatile("movb $0x01,%%ah ; int $0x10"
               :
               : "c"((start << 8) + end)
               : "eax");
}


x86 assembly (clang, -O0):
<asm_cursorshape>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%ecx
shl    $0x8,%ecx
movsbl -0x2(%rbp),%eax
add    %eax,%ecx
mov    $0x1,%ah
int    $0x10
pop    %rbp
ret

x86 assembly (clang, -O2):
<asm_cursorshape>:
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%ecx
mov    $0x1,%ah
int    $0x10
ret

LLVM IR (-O0):
define void @asm_cursorshape(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = add nsw i32 %7, %9
ret void
}

LLVM IR (-O2):
define void @asm_cursorshape(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = shl nsw i32 %3, 8
%5 = sext i8 %1 to i32
%6 = add nsw i32 %4, %5
tail call void asm sideeffect "movb $$0x01,%ah ; int $$0x10", "{cx},~{eax},~{dirflag},~{fpsr},~{flags}"(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *foo = "Hello World!\n";
  printf("%s\n", foo);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef6(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void xfrm_replay_notify(void) { nsc_assert(0, __func__); }


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

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

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

LLVM IR (-O2):
@__func__.xfrm_replay_notify = [19 x i8] c"xfrm_replay_notify\00"
define void @xfrm_replay_notify() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.xfrm_replay_notify, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strend(char *, char *);
int main(void) {
  char *s1 = "hello";
  char *s2 = "llo";
  printf("%i\n", strend(s1, s2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strend@plt>
mov    %eax,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <strend@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [4 x i8] c"llo\00"
@.str.2 = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @strend(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void TTYSetSize(void) { system("mode 140,50"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"mode 140,50\00"
define void @TTYSetSize() {
%1 = call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"mode 140,50\00"
define void @TTYSetSize() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
int Operand_frr_encode(unsigned int *valp) {
  int error;
  error = (*valp & ~0xf) != 0;
  return error;
}


x86 assembly (clang, -O0):
<Operand_frr_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xfffffff0,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_frr_encode>:
xor    %eax,%eax
cmpl   $0x10,(%rdi)
setae  %al
ret

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

LLVM IR (-O2):
define i32 @Operand_frr_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ugt i32 %2, 15
%4 = zext i1 %3 to i32
ret i32 %4
}
int wl_isNband(unsigned char band) { return (band >= 8); }


x86 assembly (clang, -O0):
<wl_isNband>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x8,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_isNband>:
xor    %eax,%eax
cmp    $0x8,%dil
setae  %al
ret

LLVM IR (-O0):
define i32 @wl_isNband(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 8
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @wl_isNband(i8 zeroext %0) {
%2 = icmp ugt i8 %0, 7
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t timespecDiff(struct timespec *timeA_p, struct timespec *timeB_p) {
  return ((timeA_p->tv_sec * 1000000000) + timeA_p->tv_nsec) -
         ((timeB_p->tv_sec * 1000000000) + timeB_p->tv_nsec);
}


x86 assembly (clang, -O0):
<timespecDiff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3b9aca00,(%rax),%eax
cltq
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
mov    -0x10(%rbp),%rcx
imul   $0x3b9aca00,(%rcx),%ecx
movslq %ecx,%rcx
mov    -0x10(%rbp),%rdx
add    0x8(%rdx),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespecDiff>:
movslq (%rdi),%rax
imul   $0x3b9aca00,%rax,%rax
movslq (%rsi),%rcx
add    0x8(%rdi),%rax
imul   $0x3b9aca00,%rcx,%rcx
add    0x8(%rsi),%rcx
sub    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i64 @timespecDiff(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000000000
%9 = sext i32 %8 to i64
%10 = load %struct.timespec*, %struct.timespec** %3
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 1
%12 = load i64, i64* %11
%13 = add nsw i64 %9, %12
%14 = load %struct.timespec*, %struct.timespec** %4
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
%16 = load i32, i32* %15
%17 = mul nsw i32 %16, 1000000000
%18 = sext i32 %17 to i64
%19 = load %struct.timespec*, %struct.timespec** %4
%20 = getelementptr inbounds %struct.timespec, %struct.timespec* %19, i32 0, i32 1
%21 = load i64, i64* %20
%22 = add nsw i64 %18, %21
%23 = sub nsw i64 %13, %22
ret i64 %23
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i64 @timespecDiff(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000000
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%8 = load i64, i64* %7
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, 1000000000
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%14 = load i64, i64* %13
%15 = add i64 %8, %6
%16 = add i64 %14, %12
%17 = sub i64 %15, %16
ret i64 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void dump_alpha(double alpha) {
  printf("alpha = ");
  printf("%g", alpha);
  printf("\n");
}


x86 assembly (clang, -O0):
<dump_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
lea    0xed2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_alpha>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"alpha = \00"
@.str.1 = [3 x i8] c"%g\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @dump_alpha(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load double, double* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"alpha = \00"
@.str.1 = [3 x i8] c"%g\00"
define void @dump_alpha(double %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
int ft_tolower(int c) {
  if (c < 91 && c > 64)
    c += 32;
  return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5b,-0x4(%rbp)
jge    1124 <ft_tolower+0x24>
cmpl   $0x40,-0x4(%rbp)
jle    1124 <ft_tolower+0x24>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 91
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 64
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
void oem_pm8921_bms_low_vol_detect_active(int vbatt, int batt_temp,
                                          int init_state) {}


x86 assembly (clang, -O0):
<oem_pm8921_bms_low_vol_detect_active>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @oem_pm8921_bms_low_vol_detect_active(i32 %0, i32 %1, i32 %2) {
ret void
}
int clearBitsMSThroughI(int x, int i) { return (x & ((1 << (i - 1)) - 1)); }


x86 assembly (clang, -O0):
<clearBitsMSThroughI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearBitsMSThroughI>:
lea    -0x1(%rsi),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @clearBitsMSThroughI(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 = sub nsw i32 %6, 1
%8 = shl i32 1, %7
%9 = sub nsw i32 %8, 1
%10 = and i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @clearBitsMSThroughI(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl nsw i32 -1, %3
%5 = xor i32 %4, -1
%6 = and i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assertTrue(char *, int);
double sum_array(double *, int);
void test_sum_array() {
  double x[] = {1, 4, 16};
  double result = sum_array(x, 3);
  assertTrue("result == 273", result == 273);
}


x86 assembly (clang, -O0):
<test_sum_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1030 <sum_array@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xea7(%rip),%rdi
call   1040 <assertTrue@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sum_array>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movapd 0xed8(%rip),%xmm0
movapd %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <sum_array@plt>
cmpeqsd 0xead(%rip),%xmm0
movq   %xmm0,%rsi
and    $0x1,%esi
lea    0xec6(%rip),%rdi
call   1040 <assertTrue@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_sum_array.x = [3 x double] [double 1.000000e+00, double 4.000000e+00, double 1.600000e+01]
@.str = [14 x i8] c"result == 273\00"
define void @test_sum_array() {
%1 = alloca [3 x double]
%2 = alloca double
%3 = bitcast [3 x double]* %1 to i8*
%4 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%5 = call double @sum_array(double* %4, i32 3)
store double %5, double* %2
%6 = load double, double* %2
%7 = fcmp oeq double %6, 2.730000e+02
%8 = zext i1 %7 to i32
%9 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@__const.test_sum_array.x = [3 x double] [double 1.000000e+00, double 4.000000e+00, double 1.600000e+01]
@.str = [14 x i8] c"result == 273\00"
define void @test_sum_array() {
%1 = alloca [3 x double]
%2 = bitcast [3 x double]* %1 to i8*
%3 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%4 = call double @sum_array(double* %3, i32 3)
%5 = fcmp oeq double %4, 2.730000e+02
%6 = zext i1 %5 to i32
%7 = call i32 @assertTrue(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x44() {
  Assert_real((isalpha(68)),
              "/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_isalpha.c",
              345, ("isalpha should be 1 for D"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x44>:
push   %rax
mov    $0x44,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x159,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for D\00"
define void @t_isalpha_0x44() {
%1 = call i32 @isalpha(i32 68)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 345, 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for D\00"
define void @t_isalpha_0x44() {
%1 = tail call i32 @isalpha(i32 68)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
void fwrite_short(FILE *fp, int16_t s) { fwrite(&s, 2, 1, fp); }


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

x86 assembly (clang, -O2):
<fwrite_short>:
push   %rax
mov    %rdi,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @fwrite_short(i32* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 2, i32 1, i32* %0)
ret void
}
int app_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @app_shutdown() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sym_b2();
void sym_a(void) { sym_b2(); }


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

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

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

LLVM IR (-O2):
define void @sym_a() {
%1 = tail call i32 (...) @sym_b2()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef size_t uint32_t;

/* Variables and functions */
void store_UINT8(uint8_t *arr, uint32_t idx, uint8_t value) {
  arr[idx] = value;
}


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

x86 assembly (clang, -O2):
<store_UINT8>:
mov    %edx,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @store_UINT8(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds i32, i32* %8, i64 %9
store i32 %7, i32* %10
ret void
}

LLVM IR (-O2):
define void @store_UINT8(i32* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
store i32 %2, i32* %4
ret void
}
int process(int i, int j, int k) { return i + j + k; }


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @process(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
void *test49(int *i) {
  int a;
  return &a ?: i;
}


x86 assembly (clang, -O0):
<test49>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
cmp    $0x0,%rax
je     1123 <test49+0x23>
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112b <test49+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test49>:
lea    -0x4(%rsp),%rax
ret

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

LLVM IR (-O2):
define noalias i8* @test49(i32* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
ret i8* %3
}
int HelpItem101(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem101() {
ret i32 0
}
dump_rule(rule) struct s_rule *rule;
{
  char buffer[256];
  printz(buffer, "reduce: %r", rule);
  dump_tran(buffer);
}


x86 assembly (clang, -O0):
<dump_rule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1030 <printz@plt>
lea    -0x110(%rbp),%rdi
mov    $0x0,%al
call   1040 <dump_tran@plt>
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_rule>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printz@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <dump_tran@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.s_rule = type opaque
@.str = [11 x i8] c"reduce: %r\00"
define i32 @dump_rule(%struct.s_rule* %0) {
%2 = alloca i32
%3 = alloca %struct.s_rule*
%4 = alloca [256 x i8]
store %struct.s_rule* %0, %struct.s_rule** %3
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%6 = load %struct.s_rule*, %struct.s_rule** %3
%7 = call i32 (i8*, i8*, %struct.s_rule*, ...) bitcast (i32 (...)* @printz to i32 (i8*, i8*, %struct.s_rule*, ...)*)(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), %struct.s_rule* %6)
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @dump_tran to i32 (i8*, ...)*)(i8* %8)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
%struct.s_rule = type opaque
@.str = [11 x i8] c"reduce: %r\00"
define i32 @dump_rule(%struct.s_rule* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, %struct.s_rule*, ...) bitcast (i32 (...)* @printz to i32 (i8*, i8*, %struct.s_rule*, ...)*)(i8* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), %struct.s_rule* %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @dump_tran to i32 (i8*, ...)*)(i8* %3)
ret i32 undef
}
/* Variables and functions */
char *getlogin();
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int main() {
  char *user = getlogin();
  char cmd[100];
  sprintf(cmd, "/usr/bin/who | grep %s", user);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getlogin@plt>
mov    %rax,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea4(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x80(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
xor    %eax,%eax
call   1040 <getlogin@plt>
lea    0xebd(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"/usr/bin/who | grep %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [100 x i8]
store i32 0, i32* %1
%4 = call i8* (...) @getlogin()
store i8* %4, i8** %2
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([23 x i8], [23 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 @system(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"/usr/bin/who | grep %s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = tail call i8* (...) @getlogin()
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @system(i8* %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t read32(unsigned long addr) {
  return *((volatile uint32_t *)(addr));
}


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

x86 assembly (clang, -O2):
<read32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @read32(i64 %0) {
%2 = inttoptr i64 %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
/* Type definitions */
struct nsxml_program_result {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
nsxml_program_result_add_messagef(struct nsxml_program_result *, int, int,
                                  char *, char const *);
void nsxml_program_result_add_message(struct nsxml_program_result *result,
                                      int type, int code, const char *text) {
  nsxml_program_result_add_messagef(result, type, code, "%s", text);
}


x86 assembly (clang, -O0):
<nsxml_program_result_add_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%r8
lea    0xec5(%rip),%rcx
call   1030 <nsxml_program_result_add_messagef@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsxml_program_result_add_message>:
mov    %rcx,%r8
lea    0xee6(%rip),%rcx
jmp    1030 <nsxml_program_result_add_messagef@plt>

LLVM IR (-O0):
%struct.nsxml_program_result = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @nsxml_program_result_add_message(%struct.nsxml_program_result* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca %struct.nsxml_program_result*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store %struct.nsxml_program_result* %0, %struct.nsxml_program_result** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.nsxml_program_result*, %struct.nsxml_program_result** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @nsxml_program_result_add_messagef(%struct.nsxml_program_result* %9, i32 %10, i32 %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
ret void
}

LLVM IR (-O2):
%struct.nsxml_program_result = type { i32 }
@.str = [3 x i8] c"%s\00"
define void @nsxml_program_result_add_message(%struct.nsxml_program_result* %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i32 @nsxml_program_result_add_messagef(%struct.nsxml_program_result* %0, i32 %1, i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alzati();
int /*<<< orphan*/ molleggiato();
int main(int argc, char **argv) {
  alzati();
  molleggiato();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @alzati()
%4 = tail call i32 (...) @molleggiato()
ret i32 0
}
void asn1_enc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @asn1_enc_init() {
ret void
}
void delay(short n) {
  for (; n > 0; n--) {
  }
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jle    112e <delay+0x2e>
jmp    111d <delay+0x1d>
mov    -0x2(%rbp),%ax
add    $0xffff,%ax
mov    %ax,-0x2(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
br label %3
3: ; preds = %8, %1
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3
br label %8
8: ; preds = %7
%9 = load i16, i16* %2
%10 = add i16 %9, -1
store i16 %10, i16* %2
br label %3
11: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay(i16 signext %0) {
ret void
}