xunge/DecIR huggingface dataset:
/* Variables and functions */
int SQLITE_OK;
int atoi(char *);
int hgd_get_db_vers_cb(void *arg, int argc, char **data, char **names) {
  int *vers;
  (void)argc;
  (void)names;
  vers = (int *)arg;
  *vers = atoi(data[0]);
  return (SQLITE_OK);
}


x86 assembly (clang, -O0):
<hgd_get_db_vers_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hgd_get_db_vers_cb>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdx),%rdi
call   1030 <atoi@plt>
mov    %eax,(%rbx)
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@SQLITE_OK = global i32 0
define i32 @hgd_get_db_vers_cb(i8* %0, i32 %1, i8** %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8**
%9 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
%10 = load i32, i32* %6
%11 = load i8**, i8*** %8
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i32*
store i32* %13, i32** %9
%14 = load i8**, i8*** %7
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = load i32*, i32** %9
store i32 %17, i32* %18
%19 = load i32, i32* @SQLITE_OK
ret i32 %19
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @hgd_get_db_vers_cb(i8* nocapture writeonly %0, i32 %1, i8** nocapture %2, i8** nocapture readnone %3) {
%5 = bitcast i8* %0 to i32*
%6 = load i8*, i8** %2
%7 = tail call i32 @atoi(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* @SQLITE_OK
ret i32 %8
}
int number_alphas(int alpha_result, int current_number_alphas) {
  if (alpha_result == 4) {
    current_number_alphas++;
  }
  return current_number_alphas;
}


x86 assembly (clang, -O0):
<number_alphas>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x4,-0x4(%rbp)
jne    111d <number_alphas+0x1d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_alphas>:
xor    %eax,%eax
cmp    $0x4,%edi
sete   %al
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @number_alphas(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 = icmp eq i32 %5, 4
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
br label %10
10: ; preds = %7, %2
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @number_alphas(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 4
%4 = zext i1 %3 to i32
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
void timespecCopy(struct timespec *destTime, const struct timespec *srcTime) {
  destTime->tv_sec = srcTime->tv_sec;
  destTime->tv_nsec = srcTime->tv_nsec;
}


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

x86 assembly (clang, -O2):
<timespecCopy>:
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    (%rsi),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @timespecCopy(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %5, i32 0, i32 1
%7 = load i32, i32* %6
%8 = load %struct.timespec*, %struct.timespec** %3
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
store i32 %7, i32* %9
%10 = load %struct.timespec*, %struct.timespec** %4
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = load %struct.timespec*, %struct.timespec** %3
%14 = getelementptr inbounds %struct.timespec, %struct.timespec* %13, i32 0, i32 0
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @timespecCopy(%struct.timespec* nocapture writeonly %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i32 %7, i32* %8
ret void
}
/* Type definitions */
struct rte_ring {
  int dummy;
};

/* Variables and functions */
int rte_ring_mp_enqueue_bulk(struct rte_ring *, void **, int);
int rte_ring_mp_enqueue(struct rte_ring *r, void *obj) {
  return rte_ring_mp_enqueue_bulk(r, &obj, 1);
}


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

x86 assembly (clang, -O2):
<rte_ring_mp_enqueue>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edx
call   1030 <rte_ring_mp_enqueue_bulk@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.rte_ring = type { i32 }
define i32 @rte_ring_mp_enqueue(%struct.rte_ring* %0, i8* %1) {
%3 = alloca %struct.rte_ring*
%4 = alloca i8*
store %struct.rte_ring* %0, %struct.rte_ring** %3
store i8* %1, i8** %4
%5 = load %struct.rte_ring*, %struct.rte_ring** %3
%6 = call i32 @rte_ring_mp_enqueue_bulk(%struct.rte_ring* %5, i8** %4, i32 1)
ret i32 %6
}

LLVM IR (-O2):
%struct.rte_ring = type { i32 }
define i32 @rte_ring_mp_enqueue(%struct.rte_ring* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = call i32 @rte_ring_mp_enqueue_bulk(%struct.rte_ring* %0, i8** %3, i32 1)
ret i32 %4
}
int gpu_enable_node(void *blob, const char *gpupath) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gpu_enable_node(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ i286_interrupt(int);
void i286_trap2(int number) { i286_interrupt(number); }


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

x86 assembly (clang, -O2):
<i286_trap2>:
jmp    1030 <i286_interrupt@plt>

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

LLVM IR (-O2):
define void @i286_trap2(i32 %0) {
%2 = tail call i32 @i286_interrupt(i32 %0)
ret void
}
int is_digit(char c) { return (c > 47 && c < 58) ? 1 : 0; }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
jle    1129 <is_digit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x3a,%eax
setl   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sgt i32 %4, 47
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp slt i32 %8, 58
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_digit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void t3() {
  int *array = 0;
  char sudirript = 0;
  int val = array[sudirript];
}


x86 assembly (clang, -O0):
<t3>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbq -0x9(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @t3() {
%1 = alloca i32*
%2 = alloca i8
%3 = alloca i32
store i32* null, i32** %1
store i8 0, i8* %2
%4 = load i32*, i32** %1
%5 = load i8, i8* %2
%6 = sext i8 %5 to i64
%7 = getelementptr inbounds i32, i32* %4, i64 %6
%8 = load i32, i32* %7
store i32 %8, i32* %3
ret void
}

LLVM IR (-O2):
define void @t3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_reverse(char const *, char *);
int /*<<< orphan*/ reverse(char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
void test(const char *str) {
  int str_len = strlen(str);
  char r[str_len + 1];
  strcpy(r, str);
  reverse(r);
  assert_reverse(str, r);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rdi
call   1030 <reverse@plt>
mov    -0x28(%rbp),%rsi
mov    -0x8(%rbp),%rdi
call   1050 <assert_reverse@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1060 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <assert_reverse@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @test(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %4
%12 = alloca i8, i64 %10
store i64 %10, i64* %5
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
%15 = call i32 @reverse(i8* %12)
%16 = load i8*, i8** %2
%17 = call i32 @assert_reverse(i8* %16, i8* %12)
%18 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @test(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = call i32 @strcpy(i8* %5, i8* %0)
%7 = call i32 @reverse(i8* %5)
%8 = call i32 @assert_reverse(i8* %0, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void od_free_2d(void *_ptr) { free(_ptr); }


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

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

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

LLVM IR (-O2):
define void @od_free_2d(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display();
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Hello\n");
  display();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <display@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @display()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
scalar_t__ memmove(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, size_t);
wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) {
  assert(d != NULL);
  assert(s != NULL);
  return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
}


x86 assembly (clang, -O0):
<wmemmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shl    $0x2,%rdx
call   1040 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmemmove>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
shl    $0x2,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <memmove@plt>

LLVM IR (-O0):
define i32* @wmemmove(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32*, i32** %5
%12 = icmp ne i32* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32*, i32** %4
%16 = load i32*, i32** %5
%17 = load i64, i64* %6
%18 = mul i64 %17, 4
%19 = call i64 @memmove(i32* %15, i32* %16, i64 %18)
%20 = inttoptr i64 %19 to i32*
ret i32* %20
}

LLVM IR (-O2):
define i32* @wmemmove(i32* %0, i32* %1, i64 %2) {
%4 = icmp ne i32* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp ne i32* %1, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = shl i64 %2, 2
%11 = tail call i64 @memmove(i32* %0, i32* %1, i64 %10)
%12 = inttoptr i64 %11 to i32*
ret i32* %12
}
void foo_2_1_2_2_1_1_1_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_1_1_1_2_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRED_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRED_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRED_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void print_usage(const char *argv0) {
  fprintf(stderr,
          "Usage: %s --device=/dev/video0 [options]\n\n"
          "-d | --device  The video capture device to use\n"
          "-f | --format  The pixel format of the video (YUYV, MJPEG, etc)\n"
          "-w | --width   The frame width, in pixels\n"
          "-h | --height  The frame height, in pixels\n"
          "-c | --count   The number of frames to grab from the camera\n"
          "-o | --output  The filename to output data to (stdout normally)\n",
          argv0);
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [363 x i8] c"Usage: %s --device=/dev/video0 [options]\0A\0A-d | --device The video capture device to use\0A-f | --format The pixel format of the video (YUYV, MJPEG, etc)\0A-w | --width The frame width, in pixels\0A-h | --height The frame height, in pixels\0A-c | --count The number of frames to grab from the camera\0A-o | --output The filename to output data to (stdout normally)\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([363 x i8], [363 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [363 x i8] c"Usage: %s --device=/dev/video0 [options]\0A\0A-d | --device The video capture device to use\0A-f | --format The pixel format of the video (YUYV, MJPEG, etc)\0A-w | --width The frame width, in pixels\0A-h | --height The frame height, in pixels\0A-c | --count The number of frames to grab from the camera\0A-o | --output The filename to output data to (stdout normally)\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([363 x i8], [363 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
extern unsigned get_major_version_SM_SOCKET() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_major_version_SM_SOCKET() {
ret i32 0
}
void outportl(unsigned short port, unsigned int data) {
  asm volatile("outl %1, %0" : : "d"(port), "a"(data));
}


x86 assembly (clang, -O0):
<outportl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x8(%rbp),%eax
out    %eax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outportl>:
mov    %esi,%eax
mov    %edi,%edx
out    %eax,(%dx)
ret

LLVM IR (-O0):
define void @outportl(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @outportl(i16 zeroext %0, i32 %1) {
tail call void asm sideeffect "outl $1, $0", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_relax(uintptr_t, uintptr_t);
void fiat_25519_relax(uint64_t out1[5], const uint64_t arg1[5]) {
  internal_fiat_25519_relax((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_25519_relax>:
jmp    1030 <internal_fiat_25519_relax@plt>

LLVM IR (-O0):
define void @fiat_25519_relax(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_25519_relax(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_relax(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_25519_relax(i64 %3, i64 %4)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void USBDMAChannelConfigSet(uint32_t ui32Base, uint32_t ui32Channel,
                            uint32_t ui32Endpoint, uint32_t ui32Config) {
  ;
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) = 0;
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) =
      ui32Config | ui32Endpoint;
}


x86 assembly (clang, -O0):
<USBDMAChannelConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
movl   $0x0,(%rax)
mov    -0x10(%rbp),%ecx
or     -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%edx
shl    $0x4,%edx
add    %edx,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelConfigSet>:
movslq %edi,%rax
movslq %esi,%rsi
shl    $0x4,%rsi
movl   $0x0,0x204(%rax,%rsi,1)
or     %ecx,%edx
mov    %edx,0x204(%rax,%rsi,1)
ret

LLVM IR (-O0):
define void @USBDMAChannelConfigSet(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 516
%11 = load i32, i32* %6
%12 = mul nsw i32 16, %11
%13 = add nsw i32 %10, %12
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 0, i32* %15
%16 = load i32, i32* %8
%17 = load i32, i32* %7
%18 = or i32 %16, %17
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 516
%21 = load i32, i32* %6
%22 = mul nsw i32 16, %21
%23 = add nsw i32 %20, %22
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i32*
store volatile i32 %18, i32* %25
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelConfigSet(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %0, 516
%6 = shl nsw i32 %1, 4
%7 = add nsw i32 %5, %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store volatile i32 0, i32* %9
%10 = or i32 %3, %2
store volatile i32 %10, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Com_Error(int /*<<< orphan*/, char *, char const *);
void CL_UIModule_Error(const char *msg) { Com_Error(0, "%s", msg); }


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

x86 assembly (clang, -O2):
<CL_UIModule_Error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
xor    %edi,%edi
jmp    1030 <Com_Error@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @CL_UIModule_Error(i8* %0) {
%2 = tail call i32 @Com_Error(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
_Bool explicit_signed_int_to_bool(signed int src) { return (_Bool)src; }


x86 assembly (clang, -O0):
<explicit_signed_int_to_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<explicit_signed_int_to_bool>:
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define zeroext i1 @explicit_signed_int_to_bool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
ret i1 %4
}

LLVM IR (-O2):
define zeroext i1 @explicit_signed_int_to_bool(i32 %0) {
%2 = icmp ne i32 %0, 0
ret i1 %2
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBHostPwrFaultDisable(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint16_t *)(ui32Base + 0x00000400))) &= ~0x00000010;
}


x86 assembly (clang, -O0):
<USBHostPwrFaultDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x400,%eax
cltq
mov    (%rax),%ecx
and    $0xffffffef,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostPwrFaultDisable>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
andl   $0xffffffef,0x400(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBHostPwrFaultDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1024
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -17
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @USBHostPwrFaultDisable(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 1024
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -17
store volatile i32 %9, i32* %7
ret void
}
void dump_cpu_state(int cpufd, char *vm_mem) {}


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

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

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

LLVM IR (-O2):
define void @dump_cpu_state(i32 %0, i8* nocapture %1) {
ret void
}
int test_imm_C7int32_mem(int *val) {
  return ((*val) & (0xC7 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C7int32_mem>:
testb  $0xc7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C7int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 199
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, size_t,
                           size_t);
int /*<<< orphan*/ stderr;
void check_size_(size_t real_size, size_t intended_size, const char *name) {
  if (real_size != intended_size) {
    fprintf(stderr, "sizeof(%s) is %zi; expected %zi\n", name, real_size,
            intended_size);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<check_size_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1171 <check_size_+0x51>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_size_>:
cmp    %rsi,%rdi
jne    1126 <check_size_+0x6>
ret
push   %rax
mov    %rsi,%r8
mov    %rdi,%rcx
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"sizeof(%s) is %zi; expected %zi\0A\00"
@EXIT_FAILURE = global i32 0
define void @check_size_(i64 %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp ne i64 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %6
%13 = load i64, i64* %4
%14 = load i64, i64* %5
%15 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %12, i64 %13, i64 %14)
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"sizeof(%s) is %zi; expected %zi\0A\00"
@EXIT_FAILURE = global i32 0
define void @check_size_(i64 %0, i64 %1, i8* %2) {
%4 = icmp eq i64 %0, %1
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %2, i64 %0, i64 %1)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret void
}
int list_rtrue(const void *one, const void *two) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @list_rtrue(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
int socket_v_api(void) { return 0x20161213; }


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

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

LLVM IR (-O0):
define i32 @socket_v_api() {
ret i32 538317331
}

LLVM IR (-O2):
define i32 @socket_v_api() {
ret i32 538317331
}
unsigned long ftrace_call_adjust(unsigned long addr) { return addr - 8; }


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

x86 assembly (clang, -O2):
<ftrace_call_adjust>:
lea    -0x8(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @ftrace_call_adjust(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 8
ret i64 %4
}

LLVM IR (-O2):
define i64 @ftrace_call_adjust(i64 %0) {
%2 = add i64 %0, -8
ret i64 %2
}
int ned_qno(no)
int *no;
{ return (ned_getint(no)); }


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

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

LLVM IR (-O0):
define i32 @ned_qno(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (i32*, ...) bitcast (i32 (...)* @ned_getint to i32 (i32*, ...)*)(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @ned_qno(i32* %0) {
%2 = tail call i32 (i32*, ...) bitcast (i32 (...)* @ned_getint to i32 (i32*, ...)*)(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recv(int, void *, size_t, int /*<<< orphan*/);
ssize_t myread_swift_blc_fwd(int fd, void *buf, size_t len) {
  return recv(fd, buf, len, 0);
}


x86 assembly (clang, -O0):
<myread_swift_blc_fwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myread_swift_blc_fwd>:
xor    %ecx,%ecx
jmp    1030 <recv@plt>

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

LLVM IR (-O2):
define i32 @myread_swift_blc_fwd(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ set1();
int /*<<< orphan*/ set2();
int main() {
  set1();
  set2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @set1()
%2 = tail call i32 (...) @set2()
ret i32 0
}
/* Variables and functions */
size_t size_minus(size_t from, size_t subtract_by) {
  if (subtract_by >= from)
    return 0;
  else
    return from - subtract_by;
}


x86 assembly (clang, -O0):
<size_minus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1127 <size_minus+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1133 <size_minus+0x33>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_minus>:
xor    %eax,%eax
sub    %rsi,%rdi
cmovae %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @size_minus(i64 %0, i64 %1) {
%3 = tail call i64 @llvm.usub.sat.i64(i64 %0, i64 %1)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hashfn_uint32_rj(int /*<<< orphan*/);
uint32_t hashtable_hashfn_uint32(void *k) {
  uint32_t i = *((uint32_t *)k);
  return hashfn_uint32_rj(i);
}


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

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

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

LLVM IR (-O2):
define i32 @hashtable_hashfn_uint32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @hashfn_uint32_rj(i32 %3)
ret i32 %4
}
int test_imm_00uint32_reg(unsigned int val) {
  return ((val) & (0x00 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0xffffffd8,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_00uint32_reg(i32 %0) {
ret i32 -40
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ acceptConnection(int);
int establishConnection();
int main(void) {
  int socket_fd;
  socket_fd = establishConnection();
  acceptConnection(socket_fd);
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <establishConnection@plt>
mov    %eax,%edi
call   1030 <acceptConnection@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @establishConnection()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @acceptConnection(i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @establishConnection()
%2 = tail call i32 @acceptConnection(i32 %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
unsigned long twhash_32(unsigned long, unsigned int);
unsigned long twhash_ptr(const void *ptr, unsigned int bits) {
  return twhash_32((unsigned long)ptr, bits);
}


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

x86 assembly (clang, -O2):
<twhash_ptr>:
jmp    1030 <twhash_32@plt>

LLVM IR (-O0):
define i64 @twhash_ptr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i32, i32* %4
%8 = call i64 @twhash_32(i64 %6, i32 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @twhash_ptr(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i64 @twhash_32(i64 %3, i32 %1)
ret i64 %4
}
void bound_mpi_dim(int dim, int ispack,
                   double prim[][(((128) > 1) ? ((128) + 2 * (2)) : (1))]
                              [(((1) > 1) ? ((1) + 2 * (2)) : (1))][(9)],
                   int pflag[][(((128) > 1) ? ((128) + 2 * (2)) : (1))]
                            [(((1) > 1) ? ((1) + 2 * (2)) : (1))]) {}


x86 assembly (clang, -O0):
<bound_mpi_dim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bound_mpi_dim(i32 %0, i32 %1, [132 x [1 x [9 x double]]]* %2, [132 x [1 x i32]]* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca [132 x [1 x [9 x double]]]*
%8 = alloca [132 x [1 x i32]]*
store i32 %0, i32* %5
store i32 %1, i32* %6
store [132 x [1 x [9 x double]]]* %2, [132 x [1 x [9 x double]]]** %7
store [132 x [1 x i32]]* %3, [132 x [1 x i32]]** %8
ret void
}

LLVM IR (-O2):
define void @bound_mpi_dim(i32 %0, i32 %1, [132 x [1 x [9 x double]]]* nocapture %2, [132 x [1 x i32]]* nocapture %3) {
ret void
}
/* Type definitions */
struct oscap_string {
  int dummy;
};
struct oscap_buffer {
  int dummy;
};

/* Variables and functions */
char const *oscap_buffer_get_raw(struct oscap_buffer *);
const char *oscap_string_get_cstr(const struct oscap_string *s) {
  return oscap_buffer_get_raw((struct oscap_buffer *)s);
}


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

x86 assembly (clang, -O2):
<oscap_string_get_cstr>:
jmp    1030 <oscap_buffer_get_raw@plt>

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

LLVM IR (-O2):
%struct.oscap_string = type { i32 }
%struct.oscap_buffer = type { i32 }
define i8* @oscap_string_get_cstr(%struct.oscap_string* %0) {
%2 = bitcast %struct.oscap_string* %0 to %struct.oscap_buffer*
%3 = tail call i8* @oscap_buffer_get_raw(%struct.oscap_buffer* %2)
ret i8* %3
}
void ff_hevc_put_hevc_uni_w_epel_v12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_v12_10_sse4() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xcolormap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcolormap_type(void *_p) {
  return (int)((XEvent *)_p)->xcolormap.type;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xcolormap_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
char *NativeFileSelection(const char *title, const char *basedir,
                          const char *filepattern, const char *patternname,
                          const char *defaultname, int style, int kind) {
  return (char *)0;
}


x86 assembly (clang, -O0):
<NativeFileSelection>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @NativeFileSelection(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @NativeFileSelection(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i32 %5, i32 %6) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ get_next(char const *, int *);
int get_pos(char const *, char const *, int *);
int strlen(char const *);
int kmp(const char *t, const char *p) {
  int next[strlen(p)];
  get_next(p, next);
  return get_pos(t, p, next);
}


x86 assembly (clang, -O0):
<kmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x28(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <get_next@plt>
mov    -0x28(%rbp),%rdx
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <get_pos@plt>
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmp>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <get_next@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <get_pos@plt>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @kmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %5
%11 = alloca i32, i64 %9
store i64 %9, i64* %6
%12 = load i8*, i8** %4
%13 = call i32 @get_next(i8* %12, i32* %11)
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = call i32 @get_pos(i8* %14, i8* %15, i32* %11)
%17 = load i8*, i8** %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @kmp(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = zext i32 %3 to i64
%5 = alloca i32, i64 %4
%6 = call i32 @get_next(i8* %1, i32* %5)
%7 = call i32 @get_pos(i8* %0, i8* %1, i32* %5)
ret i32 %7
}