xunge/DecIR huggingface dataset:
/* Variables and functions */
int arrayToUIntBE(unsigned char *, int);
int extractPort(unsigned char *buff) { return arrayToUIntBE(buff, 2); }


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

x86 assembly (clang, -O2):
<extractPort>:
mov    $0x2,%esi
jmp    1030 <arrayToUIntBE@plt>

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

LLVM IR (-O2):
define i32 @extractPort(i8* %0) {
%2 = tail call i32 @arrayToUIntBE(i8* %0, i32 2)
ret i32 %2
}
void gcov_coverage_dump(void) {}


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

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

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

LLVM IR (-O2):
define void @gcov_coverage_dump() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char *);
FILE *stbi__fopen(char const *filename, char const *mode) {
  FILE *f;
  mode = mode + 1;
  f = fopen(filename, "rb");
  return f;
}


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

x86 assembly (clang, -O2):
<stbi__fopen>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define noalias i32* @stbi__fopen(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32* %3
}
int do_042() { return 42; }


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

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

LLVM IR (-O0):
define i32 @do_042() {
ret i32 42
}

LLVM IR (-O2):
define i32 @do_042() {
ret i32 42
}
char *wind_strcat(char *dest, const char *src) {
  char *tmp = dest;
  while (*dest)
    dest++;
  while ((*dest++ = *src++) != '\0')
    ;
  return tmp;
}


x86 assembly (clang, -O0):
<wind_strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <wind_strcat+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <wind_strcat+0x14>
jmp    1137 <wind_strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     116a <wind_strcat+0x6a>
jmp    1137 <wind_strcat+0x37>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wind_strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <wind_strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <wind_strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @wind_strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void set_bit(unsigned long nr, unsigned long *bitmap) {
  unsigned long offset = nr / ((int)sizeof(long) * 8);
  unsigned long bit = nr & (((int)sizeof(long) * 8) - 1);
  bitmap[offset] |= 1UL << bit;
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x6,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
or     (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %rdi,%rcx
mov    %rdi,%rax
mov    $0x1,%edx
shl    %cl,%rdx
shr    $0x6,%rax
or     %rdx,(%rsi,%rax,8)
ret

LLVM IR (-O0):
define void @set_bit(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* %3
%8 = udiv i64 %7, 64
store i64 %8, i64* %5
%9 = load i64, i64* %3
%10 = and i64 %9, 63
store i64 %10, i64* %6
%11 = load i64, i64* %6
%12 = shl i64 1, %11
%13 = load i64*, i64** %4
%14 = load i64, i64* %5
%15 = getelementptr inbounds i64, i64* %13, i64 %14
%16 = load i64, i64* %15
%17 = or i64 %16, %12
store i64 %17, i64* %15
ret void
}

LLVM IR (-O2):
define void @set_bit(i64 %0, i64* nocapture %1) {
%3 = lshr i64 %0, 6
%4 = and i64 %0, 63
%5 = shl nuw i64 1, %4
%6 = getelementptr inbounds i64, i64* %1, i64 %3
%7 = load i64, i64* %6
%8 = or i64 %7, %5
store i64 %8, i64* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFD;
int errno;
int fcntl(int, int /*<<< orphan*/, _Bool);
int so_cloexec(int fd, _Bool cloexec) {
  if (-1 == fcntl(fd, F_SETFD, cloexec))
    return errno;
  return 0;
}


x86 assembly (clang, -O0):
<so_cloexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
and    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edx
call   1030 <fcntl@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    115c <so_cloexec+0x4c>
mov    0x2e86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <so_cloexec+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<so_cloexec>:
push   %rax
mov    %esi,%edx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <fcntl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
jne    1133 <so_cloexec+0x23>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_SETFD = global i32 0
@errno = global i32 0
define i32 @so_cloexec(i32 %0, i1 zeroext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %4
%6 = zext i1 %1 to i8
store i8 %6, i8* %5
%7 = load i32, i32* %4
%8 = load i32, i32* @F_SETFD
%9 = load i8, i8* %5
%10 = trunc i8 %9 to i1
%11 = call i32 @fcntl(i32 %7, i32 %8, i1 zeroext %10)
%12 = icmp eq i32 -1, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = load i32, i32* @errno
store i32 %14, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@F_SETFD = global i32 0
@errno = global i32 0
define i32 @so_cloexec(i32 %0, i1 zeroext %1) {
%3 = load i32, i32* @F_SETFD
%4 = tail call i32 @fcntl(i32 %0, i32 %3, i1 zeroext %1)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = select i1 %5, i32 %6, i32 0
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
scalar_t__ isprint(int);
void putb(FILE *out, int ch) {
  fprintf(out, isprint(ch) ? "'%c" : "%02.2X", ch);
}


x86 assembly (clang, -O0):
<putb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <isprint@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rcx
lea    0xeb7(%rip),%rsi
lea    0xeac(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
mov    -0xc(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putb>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <isprint@plt>
test   %rax,%rax
lea    0xeca(%rip),%rax
lea    0xebf(%rip),%rsi
cmove  %rax,%rsi
mov    %r14,%rdi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"'%c\00"
@.str.1 = [7 x i8] c"%02.2X\00"
define void @putb(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 i64 @isprint(i32 %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%11 = load i32, i32* %4
%12 = call i32 @fprintf(i32* %5, i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"'%c\00"
@.str.1 = [7 x i8] c"%02.2X\00"
define void @putb(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @isprint(i32 %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @fprintf(i32* %0, i8* %5, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_grid_address_from_index(long *, long const,
                                               long const *);
void grg_get_grid_address_from_index(long address[3], const long grid_index,
                                     const long D_diag[3]) {
  get_grid_address_from_index(address, grid_index, D_diag);
}


x86 assembly (clang, -O0):
<grg_get_grid_address_from_index>:
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
call   1030 <get_grid_address_from_index@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grg_get_grid_address_from_index>:
jmp    1030 <get_grid_address_from_index@plt>

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

LLVM IR (-O2):
define void @grg_get_grid_address_from_index(i64* %0, i64 %1, i64* %2) {
%4 = tail call i32 @get_grid_address_from_index(i64* %0, i64 %1, i64* %2)
ret void
}
void relay_config_change_network_ssl_priorities(
    void *data, struct t_config_option *option) {
  (void)data;
  (void)option;
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type opaque
define void @relay_config_change_network_ssl_priorities(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type opaque
define void @relay_config_change_network_ssl_priorities(i8* nocapture %0, %struct.t_config_option* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) { printf("%d\n", argc - 1); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
struct udphdr {
  int /*<<< orphan*/ source;
};

/* Variables and functions */
int /*<<< orphan*/ ntohs(int /*<<< orphan*/);
uint16_t udphdr_source_ntohs(struct udphdr *h) { return ntohs(h->source); }


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

x86 assembly (clang, -O2):
<udphdr_source_ntohs>:
mov    (%rdi),%edi
jmp    1030 <ntohs@plt>

LLVM IR (-O0):
%struct.udphdr = type { i32 }
define i32 @udphdr_source_ntohs(%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
%5 = load i32, i32* %4
%6 = call i32 @ntohs(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.udphdr = type { i32 }
define i32 @udphdr_source_ntohs(%struct.udphdr* nocapture %0) {
%2 = getelementptr inbounds %struct.udphdr, %struct.udphdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @ntohs(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long int streamSize(FILE *f) {
  long int c, s;
  c = ftell(f);
  fseek(f, 0, SEEK_END);
  s = ftell(f);
  fseek(f, c, SEEK_SET);
  return s;
}


x86 assembly (clang, -O0):
<streamSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streamSize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @streamSize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @streamSize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
/* Type definitions */
struct Simhasher {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FreeSimhasher(struct Simhasher *);
void free_sim(struct Simhasher *handle) { FreeSimhasher(handle); }


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

x86 assembly (clang, -O2):
<free_sim>:
jmp    1030 <FreeSimhasher@plt>

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

LLVM IR (-O2):
%struct.Simhasher = type { i32 }
define void @free_sim(%struct.Simhasher* %0) {
%2 = tail call i32 @FreeSimhasher(%struct.Simhasher* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void fatal_error(char *msg, ...) { exit(1); }


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @fatal_error(i8* nocapture readnone %0, ...) {
%2 = tail call i32 @exit(i32 1)
unreachable
}
int hp_lto_kad_validation(int encrypt_mode, int ukad, int akad) {
  int count = 0;
  if (ukad > 32 || akad > 12)
    count = 1;
  if (!encrypt_mode && (ukad || akad))
    count = 1;
  return count;
}


x86 assembly (clang, -O0):
<hp_lto_kad_validation>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x8(%rbp)
jg     1128 <hp_lto_kad_validation+0x28>
cmpl   $0xc,-0xc(%rbp)
jle    112f <hp_lto_kad_validation+0x2f>
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1154 <hp_lto_kad_validation+0x54>
cmpl   $0x0,-0x8(%rbp)
jne    114d <hp_lto_kad_validation+0x4d>
cmpl   $0x0,-0xc(%rbp)
je     1154 <hp_lto_kad_validation+0x54>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hp_lto_kad_validation>:
cmp    $0x21,%esi
setge  %al
cmp    $0xd,%edx
setge  %cl
or     %al,%cl
test   %edi,%edi
sete   %al
or     %esi,%edx
setne  %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @hp_lto_kad_validation(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %5
%9 = icmp sgt i32 %8, 32
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 12
br i1 %12, label %13, label %14
13: ; preds = %10, %3
store i32 1, i32* %7
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 0
br i1 %16, label %24, label %17
17: ; preds = %14
%18 = load i32, i32* %5
%19 = icmp ne i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i32, i32* %6
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20, %17
store i32 1, i32* %7
br label %24
24: ; preds = %23, %20, %14
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @hp_lto_kad_validation(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 32
%5 = icmp sgt i32 %2, 12
%6 = or i1 %4, %5
%7 = icmp eq i32 %0, 0
%8 = or i32 %2, %1
%9 = icmp ne i32 %8, 0
%10 = and i1 %7, %9
%11 = or i1 %6, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int rand();
int /*<<< orphan*/ sleep(int);
void *doSomething(void *i) {
  int sleepTime = rand() % 5;
  sleep(sleepTime);
  printf("ID:%d ok, sleep for %d sec\n", *(int *)i, sleepTime);
}


x86 assembly (clang, -O0):
<doSomething>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <sleep@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doSomething>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <rand@plt>
movslq %eax,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
mov    %ebx,%edi
call   1040 <sleep@plt>
mov    (%r14),%esi
lea    0xe95(%rip),%rdi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"ID:%d ok, sleep for %d sec\0A\00"
define i8* @doSomething(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @sleep(i32 %7)
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [28 x i8] c"ID:%d ok, sleep for %d sec\0A\00"
define noalias i8* @doSomething(i8* nocapture %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 5
%4 = tail call i32 @sleep(i32 %3)
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %3)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ func1();
__attribute__((no_reorder)) __attribute__((no)) int func2(void) { func1(); }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <func1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func2() {
%1 = alloca i32
%2 = call i32 (...) @func1()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @func2() {
%1 = tail call i32 (...) @func1()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ debugPrintStr(char *, char *);
void contactOnlineRecvd(char *line) {
  debugPrintStr("command parser: contactOnlineRecvd: ", line);
}


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

x86 assembly (clang, -O2):
<contactOnlineRecvd>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <debugPrintStr@plt>

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

LLVM IR (-O2):
@.str = [37 x i8] c"command parser: contactOnlineRecvd: \00"
define void @contactOnlineRecvd(i8* %0) {
%2 = tail call i32 @debugPrintStr(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int abs(int n) { return ((n > 0) ? n : (n * (-1))); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <abs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1123 <abs+0x23>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @abs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = mul nsw i32 %8, -1
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printstlevel(int);
void printst(void) {
  int level;
  for (level = 0; level < 50; level++) {
    printstlevel(level);
  }
}


x86 assembly (clang, -O0):
<printst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jge    113f <printst+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <printstlevel@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <printst+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printst>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <printstlevel@plt>
add    $0x1,%ebx
cmp    $0x32,%ebx
jne    1120 <printst+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @printst() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 50
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @printstlevel(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @printst() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printstlevel(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 50
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xfc() {
  Assert_real((isxdigit(252) == 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_isxdigit.c",
              1265, ("isxdigit should be 0 for 0xfc"));
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ read_unixtstamp(char *, int *);
void test_eight_decimals() {
  char *str = "1234.00000001";
  uint64_t dest;
  read_unixtstamp(str, &dest);
  assert((dest / 1000000000) == 1234 && (dest % 1000000000) == 10);
}


x86 assembly (clang, -O0):
<test_eight_decimals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <read_unixtstamp@plt>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x4d2,%ecx
mov    %al,-0xd(%rbp)
jne    1172 <test_eight_decimals+0x52>
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
cmp    $0xa,%edx
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_eight_decimals>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <read_unixtstamp@plt>
xor    %edi,%edi
call   1030 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"1234.00000001\00"
define void @test_eight_decimals() {
%1 = alloca i8*
%2 = alloca i32
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @read_unixtstamp(i8* %3, i32* %2)
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000000000
%7 = icmp eq i32 %6, 1234
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 1000000000
%11 = icmp eq i32 %10, 10
br label %12
12: ; preds = %8, %0
%13 = phi i1 [ false, %0 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"1234.00000001\00"
define void @test_eight_decimals() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @read_unixtstamp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int isqrt(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int i;
  for (i = 0; i <= 0x1000; i++)
    printf("%d %d\n", i, isqrt(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   $0x1000,-0x8(%rbp)
jg     1170 <main+0x50>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isqrt@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <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    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1040 <isqrt@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x1001,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %d\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 = %11, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 4096
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @isqrt(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %3
14: ; preds = %3
ret i32 0
}

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


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

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

LLVM IR (-O0):
define i32 @fun1332() {
ret i32 1332
}

LLVM IR (-O2):
define i32 @fun1332() {
ret i32 1332
}
int light_test_air_abs_interface(struct light *in, int lam) { return 0; }


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

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

LLVM IR (-O0):
%struct.light = type opaque
define i32 @light_test_air_abs_interface(%struct.light* %0, i32 %1) {
%3 = alloca %struct.light*
%4 = alloca i32
store %struct.light* %0, %struct.light** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.light = type opaque
define i32 @light_test_air_abs_interface(%struct.light* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: deq jid\n"
         "\tjid\t\t the job id\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: deq jid\0A\09jid\09\09 the job id\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [33 x i8] c"Usage: deq jid\0A\09jid\09\09 the job id\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
int vbe_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @vbe_init() {
ret i32 0
}
void device_pm_move_last(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @device_pm_move_last(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x81() {
  Assert_real((isalnum(129) == 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_isalnum.c",
              650, ("isalnum should be 0 for 0x81"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x81>:
push   %rax
mov    $0x81,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x28a,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x81\00"
define void @t_isalnum_0x81() {
%1 = call i64 @isalnum(i32 129)
%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 650, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x81\00"
define void @t_isalnum_0x81() {
%1 = tail call i64 @isalnum(i32 129)
%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 650, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
const char *ArpHwTyp2Str(int hwtype) {
  switch (hwtype) {
  case 1:
    return "Eth10Mb";
  case 6:
    return "802Net";
  case 20:
    return "Serial";
  default:
    return "UNKNOWN";
  }
}


x86 assembly (clang, -O0):
<ArpHwTyp2Str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     113d <ArpHwTyp2Str+0x3d>
jmp    111b <ArpHwTyp2Str+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     114d <ArpHwTyp2Str+0x4d>
jmp    112c <ArpHwTyp2Str+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x14,%eax
je     115d <ArpHwTyp2Str+0x5d>
jmp    116d <ArpHwTyp2Str+0x6d>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <ArpHwTyp2Str+0x78>
lea    0xeb4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <ArpHwTyp2Str+0x78>
lea    0xeab(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <ArpHwTyp2Str+0x78>
lea    0xea2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ArpHwTyp2Str>:
cmp    $0x1,%edi
je     1117 <ArpHwTyp2Str+0x17>
cmp    $0x14,%edi
je     111f <ArpHwTyp2Str+0x1f>
cmp    $0x6,%edi
jne    1127 <ArpHwTyp2Str+0x27>
lea    0xef2(%rip),%rax
ret
lea    0xee2(%rip),%rax
ret
lea    0xee9(%rip),%rax
ret
lea    0xee8(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Eth10Mb\00"
@.str.1 = [7 x i8] c"802Net\00"
@.str.2 = [7 x i8] c"Serial\00"
@.str.3 = [8 x i8] c"UNKNOWN\00"
define i8* @ArpHwTyp2Str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 1, label %5
i32 6, label %6
i32 20, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"Eth10Mb\00"
@.str.1 = [7 x i8] c"802Net\00"
@.str.2 = [7 x i8] c"Serial\00"
@.str.3 = [8 x i8] c"UNKNOWN\00"
define i8* @ArpHwTyp2Str(i32 %0) {
switch i32 %0, label %4 [
i32 1, label %5
i32 6, label %2
i32 20, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %6
}
unsigned short buf16_to_ushort(const void *buffer) {
  const unsigned char *p = buffer;
  return (((unsigned short)p[0] << 8) | p[1]);
}


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

x86 assembly (clang, -O2):
<buf16_to_ushort>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @buf16_to_ushort(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i16
%9 = zext i16 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = or i32 %10, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @buf16_to_ushort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Type definitions */
struct clock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clock_clear(struct clock *);
void clock_destroy(struct clock *__restrict c) { clock_clear(c); }


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

x86 assembly (clang, -O2):
<clock_destroy>:
jmp    1030 <clock_clear@plt>

LLVM IR (-O0):
%struct.clock = type { i32 }
define void @clock_destroy(%struct.clock* noalias %0) {
%2 = alloca %struct.clock*
store %struct.clock* %0, %struct.clock** %2
%3 = load %struct.clock*, %struct.clock** %2
%4 = call i32 @clock_clear(%struct.clock* %3)
ret void
}

LLVM IR (-O2):
%struct.clock = type { i32 }
define void @clock_destroy(%struct.clock* noalias %0) {
%2 = tail call i32 @clock_clear(%struct.clock* %0)
ret void
}
void null_handler(int sig) {}


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

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

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

LLVM IR (-O2):
define void @null_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ tell_me_a_bad_translated_joke();
void tell_me_two_bad_translated_jokes() {
  printf("There are two in a motorcycle and the man in the middle goes down");
  tell_me_a_bad_translated_joke();
}


x86 assembly (clang, -O0):
<tell_me_two_bad_translated_jokes>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <tell_me_a_bad_translated_joke@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tell_me_two_bad_translated_jokes>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <tell_me_a_bad_translated_joke@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"There are two in a motorcycle and the man in the middle goes down\00"
define void @tell_me_two_bad_translated_jokes() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @tell_me_a_bad_translated_joke()
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"There are two in a motorcycle and the man in the middle goes down\00"
define void @tell_me_two_bad_translated_jokes() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @tell_me_a_bad_translated_joke()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookreal8array(double *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 8));
}


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

x86 assembly (clang, -O2):
<lookreal8array>:
shl    $0x3,%esi
jmp    1030 <lookNarray@plt>

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

LLVM IR (-O2):
define void @lookreal8array(double* %0, i32 %1) {
%3 = bitcast double* %0 to i8*
%4 = shl nsw i32 %1, 3
%5 = tail call i32 @lookNarray(i8* %3, i32 %4)
ret void
}
/* Type definitions */
typedef int u_int8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int *);
unsigned little_endian_16(u_int8_t *buffer) {
  register unsigned retval;
  assert(buffer);
  retval = buffer[0];
  retval += buffer[1] << 8;
  return retval;
}


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

x86 assembly (clang, -O2):
<little_endian_16>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    0x4(%rbx),%eax
shl    $0x8,%eax
add    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @little_endian_16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @assert(i32* %4)
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = shl i32 %11, 8
%13 = load i32, i32* %3
%14 = add i32 %13, %12
store i32 %14, i32* %3
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @little_endian_16(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
%3 = load i32, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = add i32 %6, %3
ret i32 %7
}
void pmksa_candidate_free(struct wpa_sm *sm) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_sm = type opaque
define void @pmksa_candidate_free(%struct.wpa_sm* nocapture %0) {
ret void
}