xunge/DecIR huggingface dataset:
/* Type definitions */
struct ll {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ll *);
int /*<<< orphan*/ ll_clear(struct ll *, void (*)(struct ll_node *));
void ll_free(struct ll *list, void (*free_node)(struct ll_node *)) {
  ll_clear(list, free_node);
  free(list);
}


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

x86 assembly (clang, -O2):
<ll_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ll_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ll = type { i32 }
%struct.ll_node = type opaque
%struct.ll_node.0 = type opaque
define void @ll_free(%struct.ll* %0, void (%struct.ll_node*)* %1) {
%3 = alloca %struct.ll*
%4 = alloca void (%struct.ll_node*)*
store %struct.ll* %0, %struct.ll** %3
store void (%struct.ll_node*)* %1, void (%struct.ll_node*)** %4
%5 = load %struct.ll*, %struct.ll** %3
%6 = load void (%struct.ll_node*)*, void (%struct.ll_node*)** %4
%7 = bitcast void (%struct.ll_node*)* %6 to void (%struct.ll_node.0*)*
%8 = call i32 @ll_clear(%struct.ll* %5, void (%struct.ll_node.0*)* %7)
%9 = load %struct.ll*, %struct.ll** %3
%10 = call i32 @free(%struct.ll* %9)
ret void
}

LLVM IR (-O2):
%struct.ll = type { i32 }
%struct.ll_node = type opaque
%struct.ll_node.0 = type opaque
define void @ll_free(%struct.ll* %0, void (%struct.ll_node*)* %1) {
%3 = bitcast void (%struct.ll_node*)* %1 to void (%struct.ll_node.0*)*
%4 = tail call i32 @ll_clear(%struct.ll* %0, void (%struct.ll_node.0*)* %3)
%5 = tail call i32 @free(%struct.ll* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_acsl_assert(int, char *, char *, char *, int);
long long foo(void) {
  long long i;
  long long sn;
  unsigned int n;
  i = (long long)1;
  sn = (long long)0;
  n = (unsigned int)100;
  e_acsl_assert(n >= (unsigned int)1, (char *)"Assertion", (char *)"foo",
                (char *)"n >= 1", 26);
  while (i <= (long long)n) {
    sn += i;
    i++;
  }
  return sn;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x1,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
setae  %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebe(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xebe(%rip),%rcx
mov    $0x1a,%r8d
call   1030 <e_acsl_assert@plt>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmp    %rcx,%rax
jg     1188 <foo+0x78>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    115b <foo+0x4b>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xeeb(%rip),%rdx
lea    0xee8(%rip),%rcx
mov    $0x1,%edi
mov    $0x1a,%r8d
call   1030 <e_acsl_assert@plt>
mov    $0x13ba,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Assertion\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [7 x i8] c"n >= 1\00"
define i64 @foo() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
store i64 1, i64* %1
store i64 0, i64* %2
store i32 100, i32* %3
%4 = load i32, i32* %3
%5 = icmp uge i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @e_acsl_assert(i32 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 26)
br label %8
8: ; preds = %13, %0
%9 = load i64, i64* %1
%10 = load i32, i32* %3
%11 = zext i32 %10 to i64
%12 = icmp sle i64 %9, %11
br i1 %12, label %13, label %19
13: ; preds = %8
%14 = load i64, i64* %1
%15 = load i64, i64* %2
%16 = add nsw i64 %15, %14
store i64 %16, i64* %2
%17 = load i64, i64* %1
%18 = add nsw i64 %17, 1
store i64 %18, i64* %1
br label %8
19: ; preds = %8
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
@.str = [10 x i8] c"Assertion\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [7 x i8] c"n >= 1\00"
define i64 @foo() {
%1 = tail call i32 @e_acsl_assert(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 26)
ret i64 5050
}
/* Variables and functions */
int ap_cmd_get_int(int, int, int *);
int ap_get_tracks(int session, int *val) {
  return (ap_cmd_get_int(session, 0xcc2b, val));
}


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

x86 assembly (clang, -O2):
<ap_get_tracks>:
mov    %rsi,%rdx
mov    $0xcc2b,%esi
jmp    1030 <ap_cmd_get_int@plt>

LLVM IR (-O0):
define i32 @ap_get_tracks(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 @ap_cmd_get_int(i32 %5, i32 52267, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ap_get_tracks(i32 %0, i32* %1) {
%3 = tail call i32 @ap_cmd_get_int(i32 %0, i32 52267, i32* %1)
ret i32 %3
}
int lw_sock_peek_ex(int sock, int len) { return 0; }


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

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

LLVM IR (-O0):
define i32 @lw_sock_peek_ex(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @lw_sock_peek_ex(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __SOCKADDR_ARG;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t __recvfrom(int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr,
                   socklen_t *addr_len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__recvfrom>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, i32 %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32* %5, i32** %12
%13 = load i32, i32* @ENOSYS
%14 = call i32 @__set_errno(i32 %13)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__recvfrom(i32 %0, i8* nocapture readnone %1, i64 %2, i32 %3, i32 %4, i32* nocapture readnone %5) {
%7 = load i32, i32* @ENOSYS
%8 = tail call i32 @__set_errno(i32 %7)
ret i32 -1
}
/* Variables and functions */
int CLOCKS_PER_SEC;
unsigned long clock();
void pause2(unsigned long msecs) {
  unsigned long finish = 0, start = 0;
  start = clock();
  while (finish < msecs) {
    finish = clock() - start;
    finish = finish / (CLOCKS_PER_SEC / 1000);
  }
}


x86 assembly (clang, -O0):
<pause2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1184 <pause2+0x74>
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
jmp    1137 <pause2+0x27>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause2>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <clock@plt>
test   %r14,%r14
je     1173 <pause2+0x63>
mov    %rax,%rbx
mov    0x2eba(%rip),%r15
jmp    113a <pause2+0x2a>
xor    %edx,%edx
div    %rsi
cmp    %r14,%rax
jae    1173 <pause2+0x63>
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
movslq (%r15),%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
movslq %ecx,%rsi
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
jne    1130 <pause2+0x20>
xor    %edx,%edx
div    %ecx
cmp    %r14,%rax
jb     113a <pause2+0x2a>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i32 0
define void @pause2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
store i64 0, i64* %4
%5 = call i64 (...) @clock()
store i64 %5, i64* %4
br label %6
6: ; preds = %10, %1
%7 = load i64, i64* %3
%8 = load i64, i64* %2
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call i64 (...) @clock()
%12 = load i64, i64* %4
%13 = sub i64 %11, %12
store i64 %13, i64* %3
%14 = load i64, i64* %3
%15 = load i32, i32* @CLOCKS_PER_SEC
%16 = sdiv i32 %15, 1000
%17 = sext i32 %16 to i64
%18 = udiv i64 %14, %17
store i64 %18, i64* %3
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i32 0
define void @pause2(i64 %0) {
%2 = tail call i64 (...) @clock()
%3 = icmp eq i64 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = tail call i64 (...) @clock()
%6 = sub i64 %5, %2
%7 = load i32, i32* @CLOCKS_PER_SEC
%8 = sdiv i32 %7, 1000
%9 = sext i32 %8 to i64
%10 = udiv i64 %6, %9
%11 = icmp ult i64 %10, %0
br i1 %11, label %4, label %12
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ safe_closep(int);
void safe_closepp(int *p) {
  if (*p)
    safe_closep(*p);
}


x86 assembly (clang, -O0):
<safe_closepp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1134 <safe_closepp+0x24>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <safe_closep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_closepp>:
mov    (%rdi),%edi
test   %edi,%edi
je     111b <safe_closepp+0xb>
jmp    1030 <safe_closep@plt>
ret

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

LLVM IR (-O2):
define void @safe_closepp(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @safe_closep(i32 %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *,
                           char *);
int /*<<< orphan*/ stdout;
int display_version(const char *pn) {
  fprintf(stdout, "%s v%s (%s)\n", pn, "v0.06.00 *forked*", "2006-11-09");
  return 0;
}


x86 assembly (clang, -O0):
<display_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
lea    0xed6(%rip),%rcx
lea    0xee1(%rip),%r8
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_version>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xee2(%rip),%rcx
lea    0xeed(%rip),%r8
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"%s v%s (%s)\0A\00"
@.str.1 = [18 x i8] c"v0.06.00 *forked*\00"
@.str.2 = [11 x i8] c"2006-11-09\00"
define i32 @display_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"%s v%s (%s)\0A\00"
@.str.1 = [18 x i8] c"v0.06.00 *forked*\00"
@.str.2 = [11 x i8] c"2006-11-09\00"
define i32 @display_version(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
int pf_pqos_stop(struct _perf_pqos *pqos __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
%struct._perf_pqos = type opaque
define i32 @pf_pqos_stop(%struct._perf_pqos* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int socket(int, int, int);
int getsocket(int domain, int type) {
  int protocol = 0;
  return socket(domain, type, protocol);
}


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

x86 assembly (clang, -O2):
<getsocket>:
xor    %edx,%edx
jmp    1030 <socket@plt>

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

LLVM IR (-O2):
define i32 @getsocket(i32 %0, i32 %1) {
%3 = tail call i32 @socket(i32 %0, i32 %1, i32 0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(unsigned short, int /*<<< orphan*/ *);
void write16u(FILE *f, unsigned short h) {
  putc(h, f);
  putc(h >> 8, f);
}


x86 assembly (clang, -O0):
<write16u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    -0x8(%rbp),%rsi
movzwl %ax,%edi
call   1030 <putc@plt>
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    -0x8(%rbp),%rsi
movzwl %ax,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write16u>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
shr    $0x8,%ebx
mov    %ebx,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putc@plt>

LLVM IR (-O0):
define void @write16u(i32* %0, i16 zeroext %1) {
%3 = alloca i32*
%4 = alloca i16
store i32* %0, i32** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i32*, i32** %3
%7 = call i32 @putc(i16 zeroext %5, i32* %6)
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = ashr i32 %9, 8
%11 = trunc i32 %10 to i16
%12 = load i32*, i32** %3
%13 = call i32 @putc(i16 zeroext %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @write16u(i32* nocapture %0, i16 zeroext %1) {
%3 = tail call i32 @putc(i16 zeroext %1, i32* %0)
%4 = lshr i16 %1, 8
%5 = tail call i32 @putc(i16 zeroext %4, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
size_t read_FD_BE(int, int /*<<< orphan*/ *, int);
size_t uint16ReadFromFD(int fd, uint16_t *data) {
  return read_FD_BE(fd, data, sizeof(uint16_t));
}


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

x86 assembly (clang, -O2):
<uint16ReadFromFD>:
mov    $0x4,%edx
jmp    1030 <read_FD_BE@plt>

LLVM IR (-O0):
define i64 @uint16ReadFromFD(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 @read_FD_BE(i32 %5, i32* %6, i32 4)
ret i64 %7
}

LLVM IR (-O2):
define i64 @uint16ReadFromFD(i32 %0, i32* %1) {
%3 = tail call i64 @read_FD_BE(i32 %0, i32* %1, i32 4)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ do_withfile(int, char *);
void xcallwi(void) { do_withfile(0x0001, "r"); }


x86 assembly (clang, -O0):
<xcallwi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <do_withfile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcallwi>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <do_withfile@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define void @xcallwi() {
%1 = tail call i32 @do_withfile(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char const *const, char const *const);
int lexsort(const void *c1, const void *c2) {
  const char *const *cpp1;
  const char *const *cpp2;
  cpp1 = c1;
  cpp2 = c2;
  return (strcmp(*cpp1, *cpp2));
}


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

x86 assembly (clang, -O2):
<lexsort>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @lexsort(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @lexsort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
double modf(double, double *);
double astro_range(double v, double max) {
  double i;
  double f = modf(v / max, &i);
  if (f < 0.0)
    f += 1.0;
  return f * max;
}


x86 assembly (clang, -O0):
<astro_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    115a <astro_range+0x4a>
movsd  0xeb0(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astro_range>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm0
lea    0x10(%rsp),%rdi
call   1030 <modf@plt>
movsd  0xed0(%rip),%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
mulsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @astro_range(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
%10 = call double @modf(double %9, double* %5)
store double %10, double* %6
%11 = load double, double* %6
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load double, double* %6
%15 = fadd double %14, 1.000000e+00
store double %15, double* %6
br label %16
16: ; preds = %13, %2
%17 = load double, double* %6
%18 = load double, double* %4
%19 = fmul double %17, %18
ret double %19
}

LLVM IR (-O2):
define double @astro_range(double %0, double %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = fdiv double %0, %1
%6 = call double @modf(double %5, double* %3)
%7 = fcmp olt double %6, 0.000000e+00
%8 = fadd double %6, 1.000000e+00
%9 = select i1 %7, double %8, double %6
%10 = fmul double %9, %1
ret double %10
}
void X509_CRL_sign(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_CRL_sign() {
ret void
}
int f8(int x, int y) {
  if (y >= -13 && y <= -2)
    __builtin_unreachable();
  return x % -y;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xfffffff3,-0x8(%rbp)
jl     111e <f8+0x1e>
cmpl   $0xfffffffe,-0x8(%rbp)
jg     111e <f8+0x1e>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
mov    %edi,%eax
neg    %esi
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @f8(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 sge i32 %5, -13
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, -2
br i1 %9, label %10, label %11
10: ; preds = %7
unreachable
11: ; preds = %7, %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 0, %13
%15 = srem i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f8(i32 %0, i32 %1) {
%3 = add i32 %1, 1
%4 = icmp ult i32 %3, -12
tail call void @llvm.assume(i1 %4)
%5 = sub nsw i32 0, %1
%6 = srem i32 %0, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/
__softboundmpx_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
int /*<<< orphan*/ __softboundmpx_store_null_return_metadata();
char *strpbrk(char const *, char const *);
__attribute__((__weak__, __always___)) char *
softboundmpx_strpbrk(const char *s, const char *accept) {
  char *ret_ptr = strpbrk(s, accept);
  if (ret_ptr != NULL) {
    __softboundmpx_propagate_metadata_shadow_stack_from(1, 0);
  } else {
    __softboundmpx_store_null_return_metadata();
  }
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_strpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strpbrk@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116d <softboundmpx_strpbrk+0x3d>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundmpx_propagate_metadata_shadow_stack_from@plt>
jmp    1174 <softboundmpx_strpbrk+0x44>
mov    $0x0,%al
call   1050 <__softboundmpx_store_null_return_metadata@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_strpbrk>:
push   %rbx
call   1040 <strpbrk@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114c <softboundmpx_strpbrk+0x1c>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundmpx_propagate_metadata_shadow_stack_from@plt>
jmp    1153 <softboundmpx_strpbrk+0x23>
xor    %eax,%eax
call   1050 <__softboundmpx_store_null_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_strpbrk(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
%7 = load i8*, i8** %4
%8 = call i8* @strpbrk(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @__softboundmpx_propagate_metadata_shadow_stack_from(i32 1, i32 0)
br label %15
13: ; preds = %2
%14 = call i32 (...) @__softboundmpx_store_null_return_metadata()
br label %15
15: ; preds = %13, %11
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define weak i8* @softboundmpx_strpbrk(i8* %0, i8* %1) {
%3 = tail call i8* @strpbrk(i8* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @__softboundmpx_propagate_metadata_shadow_stack_from(i32 1, i32 0)
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @__softboundmpx_store_null_return_metadata()
br label %9
9: ; preds = %7, %5
ret i8* %3
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ get_time_ms();
uint64_t get_delta(void) {
  static uint64_t oldtime = 0;
  uint64_t timediff, newtime;
  newtime = get_time_ms();
  timediff = newtime - oldtime;
  oldtime = newtime;
  return timediff;
}


x86 assembly (clang, -O0):
<get_delta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_time_ms@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    0x2f02(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,0x2ef3(%rip)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_delta>:
push   %rax
xor    %eax,%eax
call   1030 <get_time_ms@plt>
mov    %rax,%rcx
sub    0x2f0e(%rip),%rcx
mov    %rax,0x2f07(%rip)
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@get_delta.oldtime = internal global i64 0
define i64 @get_delta() {
%1 = alloca i64
%2 = alloca i64
%3 = call i64 (...) @get_time_ms()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = load i64, i64* @get_delta.oldtime
%6 = sub nsw i64 %4, %5
store i64 %6, i64* %1
%7 = load i64, i64* %2
store i64 %7, i64* @get_delta.oldtime
%8 = load i64, i64* %1
ret i64 %8
}

LLVM IR (-O2):
@get_delta.oldtime = internal unnamed_addr global i64 0
define i64 @get_delta() {
%1 = tail call i64 (...) @get_time_ms()
%2 = load i64, i64* @get_delta.oldtime
%3 = sub nsw i64 %1, %2
store i64 %1, i64* @get_delta.oldtime
ret i64 %3
}
void g_type_module_add_interface() {}


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

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

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

LLVM IR (-O2):
define void @g_type_module_add_interface() {
ret void
}
int __cmdmatch(char *src, char *match) {
  while (*match) {
    if (*src == 0)
      return -1;
    if (*match != *src)
      return -1;
    match++;
    src++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<__cmdmatch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1174 <__cmdmatch+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1135 <__cmdmatch+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <__cmdmatch+0x7b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1157 <__cmdmatch+0x57>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <__cmdmatch+0x7b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <__cmdmatch+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cmdmatch>:
mov    (%rsi),%r8b
test   %r8b,%r8b
je     112c <__cmdmatch+0x2c>
xor    %ecx,%ecx
mov    $0xffffffff,%eax
nop
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
je     112e <__cmdmatch+0x2e>
cmp    %dl,%r8b
jne    112e <__cmdmatch+0x2e>
movzbl 0x1(%rsi,%rcx,1),%r8d
add    $0x1,%rcx
test   %r8b,%r8b
jne    1110 <__cmdmatch+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @__cmdmatch(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %13
%6 = phi i8 [ %16, %13 ], [ %3, %2 ]
%7 = phi i8* [ %14, %13 ], [ %1, %2 ]
%8 = phi i8* [ %15, %13 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
%11 = icmp eq i8 %6, %9
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = getelementptr inbounds i8, i8* %8, i64 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %5, %13, %2
%19 = phi i32 [ 0, %2 ], [ 0, %13 ], [ -1, %5 ]
ret i32 %19
}
/* Variables and functions */
int Scl_ConHasOutLoads_(int /*<<< orphan*/);
int /*<<< orphan*/ Scl_ConReadMan();
int Scl_ConHasOutLoads() { return Scl_ConHasOutLoads_(Scl_ConReadMan()); }


x86 assembly (clang, -O0):
<Scl_ConHasOutLoads>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Scl_ConReadMan@plt>
mov    %eax,%edi
call   1030 <Scl_ConHasOutLoads_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Scl_ConHasOutLoads>:
push   %rax
xor    %eax,%eax
call   1040 <Scl_ConReadMan@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Scl_ConHasOutLoads_@plt>

LLVM IR (-O0):
define i32 @Scl_ConHasOutLoads() {
%1 = call i32 (...) @Scl_ConReadMan()
%2 = call i32 @Scl_ConHasOutLoads_(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @Scl_ConHasOutLoads() {
%1 = tail call i32 (...) @Scl_ConReadMan()
%2 = tail call i32 @Scl_ConHasOutLoads_(i32 %1)
ret i32 %2
}
/* Variables and functions */
long long PAPI_get_virt_usec();
void papif_get_virt_usec(long long *time) { *time = PAPI_get_virt_usec(); }


x86 assembly (clang, -O0):
<papif_get_virt_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PAPI_get_virt_usec@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_get_virt_usec>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_get_virt_usec@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_get_virt_usec(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_get_virt_usec()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @papif_get_virt_usec(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_get_virt_usec()
store i64 %2, i64* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dumpTaskQueue();
int /*<<< orphan*/ flushDebugUart();
int /*<<< orphan*/ reportSystemFrequency();
int /*<<< orphan*/ reportSystemState();
int /*<<< orphan*/ unwindStack();
void dumpCore() {
  reportSystemFrequency();
  reportSystemState();
  unwindStack();
  dumpTaskQueue();
  flushDebugUart();
}


x86 assembly (clang, -O0):
<dumpCore>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <reportSystemFrequency@plt>
mov    $0x0,%al
call   1030 <reportSystemState@plt>
mov    $0x0,%al
call   1060 <unwindStack@plt>
mov    $0x0,%al
call   1050 <dumpTaskQueue@plt>
mov    $0x0,%al
call   1070 <flushDebugUart@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpCore>:
push   %rax
xor    %eax,%eax
call   1040 <reportSystemFrequency@plt>
xor    %eax,%eax
call   1030 <reportSystemState@plt>
xor    %eax,%eax
call   1060 <unwindStack@plt>
xor    %eax,%eax
call   1050 <dumpTaskQueue@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <flushDebugUart@plt>

LLVM IR (-O0):
define void @dumpCore() {
%1 = call i32 (...) @reportSystemFrequency()
%2 = call i32 (...) @reportSystemState()
%3 = call i32 (...) @unwindStack()
%4 = call i32 (...) @dumpTaskQueue()
%5 = call i32 (...) @flushDebugUart()
ret void
}

LLVM IR (-O2):
define void @dumpCore() {
%1 = tail call i32 (...) @reportSystemFrequency()
%2 = tail call i32 (...) @reportSystemState()
%3 = tail call i32 (...) @unwindStack()
%4 = tail call i32 (...) @dumpTaskQueue()
%5 = tail call i32 (...) @flushDebugUart()
ret void
}
void error_retain_count_overflow(void *client_state, void *retainable) {}


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

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

LLVM IR (-O0):
define void @error_retain_count_overflow(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @error_retain_count_overflow(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int bitInvertSourcewith(int sourceWord, int destinationWord) {
  return ~sourceWord;
}


x86 assembly (clang, -O0):
<bitInvertSourcewith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitInvertSourcewith>:
mov    %edi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @bitInvertSourcewith(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 = xor i32 %5, -1
ret i32 %6
}

LLVM IR (-O2):
define i32 @bitInvertSourcewith(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_result(int result) {
  if (result)
    printf("Bitmap is enabled\n");
  else
    printf("Bitmap is disabled\n");
}


x86 assembly (clang, -O0):
<print_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <print_result+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <print_result+0x32>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_result>:
test   %edi,%edi
lea    0xee7(%rip),%rax
lea    0xef3(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Bitmap is enabled\0A\00"
@.str.1 = [20 x i8] c"Bitmap is disabled\0A\00"
define void @print_result(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Bitmap is disabled\00"
@str.2 = [18 x i8] c"Bitmap is enabled\00"
define void @print_result(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
unsigned long get_XCrossingEvent_serial(void *_p) {
  return (unsigned long)((XCrossingEvent *)_p)->serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XCrossingEvent_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XCrossingEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void valPrint(void *v) {
  int *val = (int *)v;
  printf("%d", *val);
}


x86 assembly (clang, -O0):
<valPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valPrint>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @valPrint(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @valPrint(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void av_opt_eval_double() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_eval_double() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
prologue() { ol(".align\t1"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c".align\091\00"
define i32 @prologue() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int fopen() {}


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

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

LLVM IR (-O0):
define i32 @fopen() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

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

/* Variables and functions */
int /*<<< orphan*/ *__wrap_fopen64(char const *, char const *);
FILE *__wrap_fopen(const char *path, const char *mode) {
  return __wrap_fopen64(path, mode);
}


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

x86 assembly (clang, -O2):
<__wrap_fopen>:
jmp    1030 <__wrap_fopen64@plt>

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

LLVM IR (-O2):
define i32* @__wrap_fopen(i8* %0, i8* %1) {
%3 = tail call i32* @__wrap_fopen64(i8* %0, i8* %1)
ret i32* %3
}
unsigned int upper_power_of_two(unsigned int v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  return ++v;
}


x86 assembly (clang, -O0):
<upper_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper_power_of_two>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @upper_power_of_two(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = lshr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = lshr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = lshr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add i32 %25, 1
store i32 %26, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @upper_power_of_two(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
ret i32 %13
}
int pointer_and_pointer_to_pointer(int **ipp, int *ip) {
  int *p = *ipp;
  *p = 5;
  *ip = 10;
  return **ipp;
}


x86 assembly (clang, -O0):
<pointer_and_pointer_to_pointer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_and_pointer_to_pointer>:
mov    (%rdi),%rax
movl   $0x5,(%rax)
movl   $0xa,(%rsi)
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
define i32 @pointer_and_pointer_to_pointer(i32** nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32*, i32** %0
store i32 5, i32* %3
store i32 10, i32* %1
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
char *mk_copy_string(int /*<<< orphan*/);
int /*<<< orphan*/ string_from_args(char const *, int, char **, char *);
char *mk_string_from_args(const char *key, int argc, char *argv[],
                          char *default_value) {
  return (mk_copy_string(string_from_args(key, argc, argv, default_value)));
}


x86 assembly (clang, -O0):
<mk_string_from_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <string_from_args@plt>
mov    %eax,%edi
call   1040 <mk_copy_string@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @mk_string_from_args(i8* %0, i32 %1, i8** %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8**, i8*** %7
%12 = load i8*, i8** %8
%13 = call i32 @string_from_args(i8* %9, i32 %10, i8** %11, i8* %12)
%14 = call i8* @mk_copy_string(i32 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @mk_string_from_args(i8* %0, i32 %1, i8** %2, i8* %3) {
%5 = tail call i32 @string_from_args(i8* %0, i32 %1, i8** %2, i8* %3)
%6 = tail call i8* @mk_copy_string(i32 %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void Visit(char ch) { printf("%c", ch); }


x86 assembly (clang, -O0):
<Visit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Visit>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @Visit(i8 signext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void delay(struct timespec time) { nanosleep(&time, NULL); }


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

x86 assembly (clang, -O2):
<delay>:
push   %rax
mov    %edi,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define void @delay(i32 %0) {
%2 = alloca %struct.timespec
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define void @delay(i32 %0) {
%2 = alloca %struct.timespec
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %0, i32* %3
%4 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}