xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void conffree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @conffree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16l2(uint16_t x) { return (x << 2) | (x >> 14); }


x86 assembly (clang, -O0):
<rot16l2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    -0x4(%rbp),%ecx
sar    $0xe,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16l2>:
lea    0x0(,%rdi,4),%eax
sar    $0xe,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot16l2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 14
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot16l2(i32 %0) {
%2 = shl i32 %0, 2
%3 = ashr i32 %0, 14
%4 = or i32 %2, %3
ret i32 %4
}
char hxd(int i) {
  if (0 <= i && i <= 9)
    return '0' + i;
  if (10 <= i && i <= 15)
    return 'A' + (i - 10);
  return 'G';
}


x86 assembly (clang, -O0):
<hxd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%eax
jg     112a <hxd+0x2a>
cmpl   $0x9,-0x8(%rbp)
jg     112a <hxd+0x2a>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1157 <hxd+0x57>
mov    $0xa,%eax
cmp    -0x8(%rbp),%eax
jg     1153 <hxd+0x53>
cmpl   $0xf,-0x8(%rbp)
jg     1153 <hxd+0x53>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1157 <hxd+0x57>
movb   $0x47,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hxd>:
cmp    $0x9,%edi
ja     110b <hxd+0xb>
add    $0x30,%dil
jmp    1119 <hxd+0x19>
lea    -0xa(%rdi),%ecx
mov    $0x47,%al
cmp    $0x5,%ecx
ja     111b <hxd+0x1b>
add    $0x37,%dil
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @hxd(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 0, %4
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 9
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 48, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %25
13: ; preds = %6, %1
%14 = load i32, i32* %3
%15 = icmp sle i32 10, %14
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %3
%18 = icmp sle i32 %17, 15
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %3
%21 = sub nsw i32 %20, 10
%22 = add nsw i32 65, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %2
br label %25
24: ; preds = %16, %13
store i8 71, i8* %2
br label %25
25: ; preds = %24, %19, %9
%26 = load i8, i8* %2
ret i8 %26
}

LLVM IR (-O2):
define signext i8 @hxd(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add nuw nsw i8 %4, 48
br label %12
6: ; preds = %1
%7 = add i32 %0, -10
%8 = icmp ult i32 %7, 6
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = trunc i32 %0 to i8
%11 = add nuw nsw i8 %10, 55
br label %12
12: ; preds = %6, %9, %3
%13 = phi i8 [ %5, %3 ], [ %11, %9 ], [ 71, %6 ]
ret i8 %13
}
/* Variables and functions */
int __gpio_get_value(unsigned int);
int gpio_get_value(unsigned gpio) { return __gpio_get_value(gpio); }


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

x86 assembly (clang, -O2):
<gpio_get_value>:
jmp    1030 <__gpio_get_value@plt>

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

LLVM IR (-O2):
define i32 @gpio_get_value(i32 %0) {
%2 = tail call i32 @__gpio_get_value(i32 %0)
ret i32 %2
}
int test_imm_63uint16_reg(unsigned short val) {
  return ((val) & (-0x63 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_63uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -99
%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_63uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -99
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void stop_timer(void) {
  *(volatile int *)(((0x10000000 + 0xA100000) + 0x3000) + 0x04) = 0x0;
}


x86 assembly (clang, -O0):
<stop_timer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1a103004,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_timer>:
movl   $0x0,0x1a103004
ret

LLVM IR (-O0):
define void @stop_timer() {
store volatile i32 0, i32* inttoptr (i64 437268484 to i32*)
ret void
}

LLVM IR (-O2):
define void @stop_timer() {
store volatile i32 0, i32* inttoptr (i64 437268484 to i32*)
ret void
}
extern unsigned long int strtoul(const char *nptr, char **endptr, int base) {}


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

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

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

LLVM IR (-O2):
define i64 @strtoul(i8* nocapture readnone %0, i8** nocapture readnone %1, i32 %2) {
ret i64 undef
}
/* Type definitions */
struct udphdr {
  int /*<<< orphan*/ uh_dport;
};
typedef int /*<<< orphan*/ in_port_t;

/* Variables and functions */
in_port_t *udphdr_uh_dport(struct udphdr *udp) { return &udp->uh_dport; }


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

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

LLVM IR (-O0):
%struct.udphdr = type { i32 }
define i32* @udphdr_uh_dport(%struct.udphdr* %0) {
%2 = alloca %struct.udphdr*
store %struct.udphdr* %0, %struct.udphdr** %2
%3 = load %struct.udphdr*, %struct.udphdr** %2
%4 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %3, i32 0, i32 0
ret i32* %4
}

LLVM IR (-O2):
%struct.udphdr = type { i32 }
define i32* @udphdr_uh_dport(%struct.udphdr* readnone %0) {
%2 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %0, i64 0, i32 0
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ xyzCode(char *, char *, char *, char *);
void moveFn(char *p1, char *p2, char *p3) { xyzCode(p1, p2, p3, "G91\nG1"); }


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

x86 assembly (clang, -O2):
<moveFn>:
lea    0xee9(%rip),%rcx
jmp    1030 <xyzCode@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"G91\0AG1\00"
define void @moveFn(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @xyzCode(i8* %7, i8* %8, i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"G91\0AG1\00"
define void @moveFn(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @xyzCode(i8* %0, i8* %1, i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct flow {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ inc_step(struct flow *);
int /*<<< orphan*/ move_to_inc_at_start(struct flow *);
void move_to_inc(struct flow *fw) {
  move_to_inc_at_start(fw);
  inc_step(fw);
}


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

x86 assembly (clang, -O2):
<move_to_inc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <move_to_inc_at_start@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <inc_step@plt>

LLVM IR (-O0):
%struct.flow = type { i32 }
define void @move_to_inc(%struct.flow* %0) {
%2 = alloca %struct.flow*
store %struct.flow* %0, %struct.flow** %2
%3 = load %struct.flow*, %struct.flow** %2
%4 = call i32 @move_to_inc_at_start(%struct.flow* %3)
%5 = load %struct.flow*, %struct.flow** %2
%6 = call i32 @inc_step(%struct.flow* %5)
ret void
}

LLVM IR (-O2):
%struct.flow = type { i32 }
define void @move_to_inc(%struct.flow* %0) {
%2 = tail call i32 @move_to_inc_at_start(%struct.flow* %0)
%3 = tail call i32 @inc_step(%struct.flow* %0)
ret void
}
void NOROM_AUXADCFlushFifo(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x400C9000 + 0x00000010) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400C9000 + 0x00000010) & 0x000FFFFF) << 5) |
             ((1) << 2)))) = 1;
  (*((volatile unsigned long
          *)(((unsigned long)(0x400C9000 + 0x00000010) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400C9000 + 0x00000010) & 0x000FFFFF) << 5) |
             ((1) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<NOROM_AUXADCFlushFifo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43920204,%eax
movq   $0x1,(%rax)
mov    $0x43920204,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<NOROM_AUXADCFlushFifo>:
movq   $0x1,0x43920204
movq   $0x0,0x43920204
ret

LLVM IR (-O0):
define void @NOROM_AUXADCFlushFifo() {
store volatile i64 1, i64* inttoptr (i64 1133642244 to i64*)
store volatile i64 0, i64* inttoptr (i64 1133642244 to i64*)
ret void
}

LLVM IR (-O2):
define void @NOROM_AUXADCFlushFifo() {
store volatile i64 1, i64* inttoptr (i64 1133642244 to i64*)
store volatile i64 0, i64* inttoptr (i64 1133642244 to i64*)
ret void
}
void dbg_dump_lstats(const struct ubifs_lp_stats *lst) { return; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_lp_stats = type opaque
define void @dbg_dump_lstats(%struct.ubifs_lp_stats* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ bar(int *);
int foo(__m128 x, __m128 y, __m128 z, __m128 a, int size) {
  int __attribute((aligned(16))) xxx;
  xxx = 2;
  bar(&xxx);
  return size;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
movl   $0x2,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <bar@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x10,%rsp
mov    %r8d,%ebx
movl   $0x2,(%rsp)
mov    %rsp,%rdi
call   1030 <bar@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 2, i32* %11
%12 = call i32 @bar(i32* %11)
%13 = load i32, i32* %10
ret i32 %13
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 returned %4) {
%6 = alloca i32
%7 = bitcast i32* %6 to i8*
store i32 2, i32* %6
%8 = call i32 @bar(i32* %6)
ret i32 %4
}
int satsb(int x) {
  if (x < -128) {
    return -128;
  } else if (x > 127) {
    return 127;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<satsb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffff80,-0x8(%rbp)
jge    111d <satsb+0x1d>
movl   $0xffffff80,-0x4(%rbp)
jmp    1139 <satsb+0x39>
cmpl   $0x7f,-0x8(%rbp)
jle    1133 <satsb+0x33>
movl   $0x7f,-0x4(%rbp)
jmp    1139 <satsb+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<satsb>:
cmp    $0x7f,%edi
mov    $0x7f,%ecx
cmovl  %edi,%ecx
cmp    $0xffffff81,%ecx
mov    $0xffffff80,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @satsb(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, -128
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -128, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 127
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 127, i32* %2
br label %13
11: ; preds = %7
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @satsb(i32 %0) {
%2 = icmp slt i32 %0, 127
%3 = select i1 %2, i32 %0, i32 127
%4 = icmp sgt i32 %3, -128
%5 = select i1 %4, i32 %3, i32 -128
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ test4();
int main() {
  test4();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test4@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test4@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test4()
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test4()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void CreateTempFolder(void) {
  system("mkdir Temp");
  system("attrib +h Temp");
}


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

x86 assembly (clang, -O2):
<CreateTempFolder>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xee7(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"mkdir Temp\00"
@.str.1 = [15 x i8] c"attrib +h Temp\00"
define void @CreateTempFolder() {
%1 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"mkdir Temp\00"
@.str.1 = [15 x i8] c"attrib +h Temp\00"
define void @CreateTempFolder() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int tr_distmat_usage() {
  fprintf(stderr,
          "Usage: treebest distmat <dn|ds|dm|jtt|kimura|mm|dns> <alignment>\n");
  return 1;
}


x86 assembly (clang, -O0):
<tr_distmat_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tr_distmat_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [66 x i8] c"Usage: treebest distmat <dn|ds|dm|jtt|kimura|mm|dns> <alignment>\0A\00"
define i32 @tr_distmat_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [66 x i8] c"Usage: treebest distmat <dn|ds|dm|jtt|kimura|mm|dns> <alignment>\0A\00"
define i32 @tr_distmat_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ put_unaligned_u64__(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
void put_unaligned_u64(uint64_t *p, uint64_t x) { put_unaligned_u64__(p, x); }


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

x86 assembly (clang, -O2):
<put_unaligned_u64>:
jmp    1030 <put_unaligned_u64__@plt>

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

LLVM IR (-O2):
define void @put_unaligned_u64(i32* %0, i32 %1) {
%3 = tail call i32 @put_unaligned_u64__(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fibo(int);
int /*<<< orphan*/ printf(char *, int, int);
void main(int argc, char **argv) {
  int f = atoi(argv[1]);
  int result = fibo(f);
  printf("Fibonacci to %d is %d\n", f, result);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <fibo@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <fibo@plt>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Fibonacci to %d is %d\0A\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = call i32 @fibo(i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"Fibonacci to %d is %d\0A\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @fibo(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = tail call i32 @exit(i32 0)
unreachable
}
void initCompass() {}


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

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

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

LLVM IR (-O2):
define void @initCompass() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i <= 255; i++) {
    printf("%d --> %c \n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d --> %c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 255
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d --> %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void scan_proc_shunts(void) {}


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

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

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

LLVM IR (-O2):
define void @scan_proc_shunts() {
ret void
}
int max(int a, int b) {
  if (a >= b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1121 <max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ fexcept_t;

/* Variables and functions */
int fesetexceptflag(const fexcept_t *flagp, int excepts) {
  return (excepts != 0);
}


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

x86 assembly (clang, -O2):
<fesetexceptflag>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
ret

LLVM IR (-O0):
define i32 @fesetexceptflag(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @fesetexceptflag(i32* nocapture readnone %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free3(void *);
void free2(void *ptr) { free3(ptr); }


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

x86 assembly (clang, -O2):
<free2>:
jmp    1030 <free3@plt>

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

LLVM IR (-O2):
define void @free2(i8* %0) {
%2 = tail call i32 @free3(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("hello assembler world, %d arguments  given\n", argc);
  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),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [44 x i8] c"hello assembler world, %d arguments given\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"hello assembler world, %d arguments given\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int sqrt(int);
int main() {
  int n, sqrt_n;
  scanf("%d", &n);
  sqrt_n = sqrt(n);
  if (sqrt_n * sqrt_n == n)
    printf("Natural Square number \n");
  else
    printf("Not a Natural Square \n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <sqrt@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    117b <main+0x4b>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
jmp    1187 <main+0x57>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <sqrt@plt>
imul   %eax,%eax
cmp    0x4(%rsp),%eax
lea    0xec0(%rip),%rax
lea    0xea3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [24 x i8] c"Natural Square number \0A\00"
@.str.2 = [23 x i8] c"Not a Natural Square \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @sqrt(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %3
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %2
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [22 x i8] c"Not a Natural Square \00"
@str.3 = [23 x i8] c"Natural Square number \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @sqrt(i32 %4)
%6 = mul nsw i32 %5, %5
%7 = load i32, i32* %1
%8 = icmp eq i32 %6, %7
%9 = select i1 %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *parse_proc(char *, char *);
long strtol(char *, int /*<<< orphan*/ *, int);
long total_memory(void) {
  char *memory = parse_proc("/proc/meminfo", "MemTotal:");
  if (memory != NULL) {
    long value = strtol(memory, NULL, 10);
    free(memory);
    return value;
  }
  return -1;
}


x86 assembly (clang, -O0):
<total_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1050 <parse_proc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1186 <total_memory+0x56>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118e <total_memory+0x5e>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<total_memory>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1050 <parse_proc@plt>
test   %rax,%rax
je     116e <total_memory+0x3e>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
jmp    1175 <total_memory+0x45>
mov    $0xffffffffffffffff,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/meminfo\00"
@.str.1 = [10 x i8] c"MemTotal:\00"
define i64 @total_memory() {
%1 = alloca i64
%2 = alloca i8*
%3 = alloca i64
%4 = call i8* @parse_proc(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = call i64 @strtol(i8* %8, i32* null, i32 10)
store i64 %9, i64* %3
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
%12 = load i64, i64* %3
store i64 %12, i64* %1
br label %14
13: ; preds = %0
store i64 -1, i64* %1
br label %14
14: ; preds = %13, %7
%15 = load i64, i64* %1
ret i64 %15
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/meminfo\00"
@.str.1 = [10 x i8] c"MemTotal:\00"
define i64 @total_memory() {
%1 = tail call i8* @parse_proc(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i64 @strtol(i8* nocapture %1, i32* null, i32 10)
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %0, %3
%7 = phi i64 [ %4, %3 ], [ -1, %0 ]
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x22() {
  Assert_real((islower(34) == 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_islower.c",
              175, ("islower should be 0 for 0x22"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x22>:
push   %rax
mov    $0x22,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xaf,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x22\00"
define void @t_islower_0x22() {
%1 = call i64 @islower(i32 34)
%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 175, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x22\00"
define void @t_islower_0x22() {
%1 = tail call i64 @islower(i32 34)
%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 175, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n usage: pstore export INPUT [OUTPUT]\n\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0A usage: pstore export INPUT [OUTPUT]\0A\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [39 x i8] c"\0A usage: pstore export INPUT [OUTPUT]\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  int a, a1;
  double b;
  char c;
  a = 10.4;
  a1 = 'D';
  b = 25;
  c = 68;
  printf("a=%d\n", a);
  a = a + c;
  b = a1 + c;
  printf("a=%d, b=%f .\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x44,-0xc(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movb   $0x44,-0x19(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
movsbl -0x19(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
movsbl -0x19(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xe92(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
movsd  0xecd(%rip),%xmm0
mov    $0x4e,%esi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"a=%d\0A\00"
@.str.1 = [14 x i8] c"a=%d, b=%f .\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca i8
store i32 0, i32* %1
store i32 10, i32* %2
store i32 68, i32* %3
store double 2.500000e+01, double* %4
store i8 68, i8* %5
%6 = load i32, i32* %2
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = add nsw i32 %8, %10
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = add nsw i32 %12, %14
%16 = sitofp i32 %15 to double
store double %16, double* %4
%17 = load i32, i32* %2
%18 = load double, double* %4
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %17, double %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"a=%d\0A\00"
@.str.1 = [14 x i8] c"a=%d, b=%f .\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 78, double 1.360000e+02)
ret i32 0
}
void sighandler(int sig) { return; }


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

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

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

LLVM IR (-O2):
define void @sighandler(i32 %0) {
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};

/* Variables and functions */
int times(struct tms *);
int bad_times(void *addr) { return times((struct tms *)addr); }


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

x86 assembly (clang, -O2):
<bad_times>:
jmp    1030 <times@plt>

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @bad_times(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.tms*
%5 = call i32 @times(%struct.tms* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @bad_times(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.tms*
%3 = tail call i32 @times(%struct.tms* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ timedDrive(int, int, int);
void driveOntoBridge() { timedDrive(100, 100, 1750); }


x86 assembly (clang, -O0):
<driveOntoBridge>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%esi
mov    $0x6d6,%edx
mov    %esi,%edi
call   1030 <timedDrive@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<driveOntoBridge>:
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x6d6,%edx
jmp    1030 <timedDrive@plt>

LLVM IR (-O0):
define void @driveOntoBridge() {
%1 = call i32 @timedDrive(i32 100, i32 100, i32 1750)
ret void
}

LLVM IR (-O2):
define void @driveOntoBridge() {
%1 = tail call i32 @timedDrive(i32 100, i32 100, i32 1750)
ret void
}
float obdConvert_2C(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A * 100.0f / 255.0f;
}


x86 assembly (clang, -O0):
<obdConvert_2C>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee4(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xed4(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_2C>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mulss  0xef1(%rip),%xmm0
divss  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_2C(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = fmul float %10, 1.000000e+02
%12 = fdiv float %11, 2.550000e+02
ret float %12
}

LLVM IR (-O2):
define float @obdConvert_2C(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = fmul float %5, 1.000000e+02
%7 = fdiv float %6, 2.550000e+02
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t pes_get_streamid(const uint8_t *p_pes) { return p_pes[3]; }


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

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

LLVM IR (-O0):
define i32 @pes_get_streamid(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @pes_get_streamid(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
void iwl_leds_unregister(struct iwl_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define void @iwl_leds_unregister(%struct.iwl_priv* nocapture %0) {
ret void
}
__float128 from_uns_short(unsigned short a) { return (__float128)a; }


x86 assembly (clang, -O0):
<from_uns_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
xchg   %ax,%ax

x86 assembly (clang, -O2):
<from_uns_short>:
push   %rax
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_uns_short(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = uitofp i16 %3 to fp128
ret fp128 %4
}

LLVM IR (-O2):
define fp128 @from_uns_short(i16 zeroext %0) {
%2 = uitofp i16 %0 to fp128
ret fp128 %2
}
void TRNGEnable(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x40028000 + 0x00000014) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40028000 + 0x00000014) & 0x000FFFFF) << 5) |
             ((10) << 2)))) = 1;
}


x86 assembly (clang, -O0):
<TRNGEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x425002a8,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRNGEnable>:
movq   $0x1,0x425002a8
ret

LLVM IR (-O0):
define void @TRNGEnable() {
store volatile i64 1, i64* inttoptr (i64 1112539816 to i64*)
ret void
}

LLVM IR (-O2):
define void @TRNGEnable() {
store volatile i64 1, i64* inttoptr (i64 1112539816 to i64*)
ret void
}
float mul(float a, float b) { return (a * b); }


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @mul(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @mul(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void clr12(int *x) { memset(x, 0, 12); }


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

x86 assembly (clang, -O2):
<clr12>:
xor    %esi,%esi
mov    $0xc,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @clr12(i32* %0) {
%2 = tail call i32 @memset(i32* %0, i32 0, i32 12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double *, unsigned long);
void cp_vect(double **vect1, double **vect2, unsigned long len) {
  memcpy(*vect1, *vect2, len * sizeof(double));
}


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

x86 assembly (clang, -O2):
<cp_vect>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
shl    $0x3,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @cp_vect(double** %0, double** %1, i64 %2) {
%4 = alloca double**
%5 = alloca double**
%6 = alloca i64
store double** %0, double*** %4
store double** %1, double*** %5
store i64 %2, i64* %6
%7 = load double**, double*** %4
%8 = load double*, double** %7
%9 = load double**, double*** %5
%10 = load double*, double** %9
%11 = load i64, i64* %6
%12 = mul i64 %11, 8
%13 = call i32 @memcpy(double* %8, double* %10, i64 %12)
ret void
}

LLVM IR (-O2):
define void @cp_vect(double** nocapture %0, double** nocapture %1, i64 %2) {
%4 = load double*, double** %0
%5 = load double*, double** %1
%6 = shl i64 %2, 3
%7 = tail call i32 @memcpy(double* %4, double* %5, i64 %6)
ret void
}
/* Type definitions */
struct ipsecalgent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
struct ipsecalgent *getipsecalgbyname(const char *alg_name, int protocol_num,
                                      int *errnop) {
  assert("getipsecalgbyname not implmemented" == NULL);
}


x86 assembly (clang, -O0):
<getipsecalgbyname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getipsecalgbyname>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
%struct.ipsecalgent = type { i32 }
@.str = [35 x i8] c"getipsecalgbyname not implmemented\00"
define %struct.ipsecalgent* @getipsecalgbyname(i8* %0, i32 %1, i32* %2) {
%4 = alloca %struct.ipsecalgent*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = call i32 @assert(i32 0)
%9 = load %struct.ipsecalgent*, %struct.ipsecalgent** %4
ret %struct.ipsecalgent* %9
}

LLVM IR (-O2):
%struct.ipsecalgent = type { i32 }
define noalias %struct.ipsecalgent* @getipsecalgbyname(i8* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
%4 = tail call i32 @assert(i32 0)
ret %struct.ipsecalgent* undef
}
/* Variables and functions */
int /*<<< orphan*/ crypto_deinit();
void ssh_deinit(void) { crypto_deinit(); }


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

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

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

LLVM IR (-O2):
define void @ssh_deinit() {
%1 = tail call i32 (...) @crypto_deinit()
ret void
}