xunge/DecIR huggingface dataset:
void foo(int x) {
  volatile int b;
  b = 0xffffffff;
}


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

x86 assembly (clang, -O2):
<foo>:
movl   $0xffffffff,-0x4(%rsp)
ff
ret

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store volatile i32 -1, i32* %2
ret void
}
void warning(subject, name) char *subject, *name;
{ message_1("Warning: ", subject, name); }


x86 assembly (clang, -O0):
<warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <message_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warning>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
xor    %eax,%eax
jmp    1030 <message_1@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Warning: \00"
define void @warning(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 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @message_1 to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Warning: \00"
define void @warning(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @message_1 to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
scalar_t__ rename(char *, char *);
int main(int argc, char *argv[]) {
  if (rename(argv[1], argv[2]) < 0) {
    perror("rename");
    exit(1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <rename@plt>
cmp    $0x0,%rax
jge    117b <main+0x4b>
lea    0xe94(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <rename@plt>
test   %rax,%rax
jns    1159 <main+0x29>
lea    0xeb6(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"rename\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i64 @rename(i8* %8, i8* %11)
%13 = icmp slt i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"rename\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i64 @rename(i8* %4, i8* %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ im_a_minion_01();
int /*<<< orphan*/ im_a_minion_02();
int /*<<< orphan*/ im_a_minion_03();
void testFuncCompOpti4(void) {
  im_a_minion_01();
  im_a_minion_02();
  im_a_minion_03();
}


x86 assembly (clang, -O0):
<testFuncCompOpti4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <im_a_minion_01@plt>
mov    $0x0,%al
call   1050 <im_a_minion_02@plt>
mov    $0x0,%al
call   1030 <im_a_minion_03@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFuncCompOpti4>:
push   %rax
xor    %eax,%eax
call   1040 <im_a_minion_01@plt>
xor    %eax,%eax
call   1050 <im_a_minion_02@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <im_a_minion_03@plt>

LLVM IR (-O0):
define void @testFuncCompOpti4() {
%1 = call i32 (...) @im_a_minion_01()
%2 = call i32 (...) @im_a_minion_02()
%3 = call i32 (...) @im_a_minion_03()
ret void
}

LLVM IR (-O2):
define void @testFuncCompOpti4() {
%1 = tail call i32 (...) @im_a_minion_01()
%2 = tail call i32 (...) @im_a_minion_02()
%3 = tail call i32 (...) @im_a_minion_03()
ret void
}
void reset_page_owner(struct page *page, unsigned int order) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define void @reset_page_owner(%struct.page* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char string[3] = "abc";
  printf("Here's your string: '%s'\n", string);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x63,0x6(%rsp)
movw   $0x6261,0x4(%rsp)
lea    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.string = [3 x i8] c"abc"
@.str = [26 x i8] c"Here's your string: '%s'\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8]
store i32 0, i32* %1
%3 = bitcast [3 x i8]* %2 to i8*
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [3 x i8] c"abc"
@.str = [26 x i8] c"Here's your string: '%s'\0A\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct timeval {
  unsigned int tv_sec;
  unsigned int tv_usec;
  int /*<<< orphan*/ member_0;
};
struct timespec {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
extern unsigned int tickget(void) {
  struct timespec tp = {0};
  struct timeval tv = {0};
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000u + tv.tv_usec / 1000u;
}


x86 assembly (clang, -O0):
<tickget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1040 <memset@plt>
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tickget>:
sub    $0x18,%rsp
movl   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,0x8(%rsp),%ecx
mov    0xc(%rsp),%eax
imul   $0x10624dd3,%rax,%rax
shr    $0x26,%rax
add    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
%struct.timeval = type { i32, i32, i32 }
define i32 @tickget() {
%1 = alloca %struct.timespec
%2 = alloca %struct.timeval
%3 = bitcast %struct.timespec* %1 to i8*
%4 = bitcast %struct.timeval* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%10 = load i32, i32* %9
%11 = udiv i32 %10, 1000
%12 = add i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32, i32 }
define i32 @tickget() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = udiv i32 %8, 1000
%10 = add i32 %9, %6
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ z_stream;

/* Variables and functions */
int /*<<< orphan*/ deflateEnd(int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void streaming_commons_free_z_stream_deflate(z_stream *stream) {
  deflateEnd(stream);
  free(stream);
}


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

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

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

LLVM IR (-O2):
define void @streaming_commons_free_z_stream_deflate(i32* %0) {
%2 = tail call i32 @deflateEnd(i32* %0)
%3 = tail call i32 @free(i32* %0)
ret void
}
int is_eol(char blah) { return (blah == '\0' || blah == '#'); }


x86 assembly (clang, -O0):
<is_eol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_eol+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x23,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eol>:
test   %dil,%dil
sete   %al
cmp    $0x23,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_eol(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 35
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_eol(i8 signext %0) {
%2 = icmp eq i8 %0, 0
%3 = icmp eq i8 %0, 35
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int factorial(int);
void factorial_test(void) {
  assert(factorial(0) == 1);
  assert(factorial(1) == 1);
  assert(factorial(2) == 2);
  assert(factorial(10) == 3628800);
}


x86 assembly (clang, -O0):
<factorial_test>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <factorial@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1030 <factorial@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x2,%edi
call   1030 <factorial@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0xa,%edi
call   1030 <factorial@plt>
cmp    $0x375f00,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<factorial_test>:
push   %rax
xor    %edi,%edi
call   1030 <factorial@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
call   1030 <factorial@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x2,%edi
call   1030 <factorial@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0xa,%edi
call   1030 <factorial@plt>
xor    %edi,%edi
cmp    $0x375f00,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @factorial_test() {
%1 = call i32 @factorial(i32 0)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @factorial(i32 1)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @factorial(i32 2)
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @factorial(i32 10)
%14 = icmp eq i32 %13, 3628800
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret void
}

LLVM IR (-O2):
define void @factorial_test() {
%1 = tail call i32 @factorial(i32 0)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @factorial(i32 1)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @factorial(i32 2)
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @factorial(i32 10)
%14 = icmp eq i32 %13, 3628800
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret void
}
int track_minor_axis(int ch, int i) {}


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

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

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

LLVM IR (-O2):
define i32 @track_minor_axis(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void error(const char *msg) {
  perror(msg);
  exit(1);
  return;
}


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

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

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void polfil_(mask, npix, nrast) float mask[];
int *npix, *nrast;
{ polygon_fill(mask, *npix, *nrast); }


x86 assembly (clang, -O0):
<polfil_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    $0x0,%al
call   1030 <polygon_fill@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polfil_>:
mov    (%rsi),%esi
mov    (%rdx),%edx
xor    %eax,%eax
jmp    1030 <polygon_fill@plt>

LLVM IR (-O0):
define void @polfil_(float* %0, i32* %1, i32* %2) {
%4 = alloca float*
%5 = alloca i32*
%6 = alloca i32*
store float* %0, float** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load float*, float** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = call i32 (float*, i32, i32, ...) bitcast (i32 (...)* @polygon_fill to i32 (float*, i32, i32, ...)*)(float* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @polfil_(float* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = tail call i32 (float*, i32, i32, ...) bitcast (i32 (...)* @polygon_fill to i32 (float*, i32, i32, ...)*)(float* %0, i32 %4, i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_kcmp;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/, int,
            unsigned long, unsigned long);
int sys_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1,
             unsigned long idx2) {
  return syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2);
}


x86 assembly (clang, -O0):
<sys_kcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_kcmp>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_kcmp = global i32 0
define i32 @sys_kcmp(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i64
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i32, i32* @__NR_kcmp
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i64, i64* %9
%16 = load i64, i64* %10
%17 = call i32 @syscall(i32 %11, i32 %12, i32 %13, i32 %14, i64 %15, i64 %16)
ret i32 %17
}

LLVM IR (-O2):
@__NR_kcmp = global i32 0
define i32 @sys_kcmp(i32 %0, i32 %1, i32 %2, i64 %3, i64 %4) {
%6 = load i32, i32* @__NR_kcmp
%7 = tail call i32 @syscall(i32 %6, i32 %0, i32 %1, i32 %2, i64 %3, i64 %4)
ret i32 %7
}
void ConsoleSetCur(int x, int y) {}


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

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

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

LLVM IR (-O2):
define void @ConsoleSetCur(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
double logf(double);
double log(double arg) { return logf(arg); }


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

x86 assembly (clang, -O2):
<log>:
jmp    1030 <logf@plt>

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

LLVM IR (-O2):
define double @log(double %0) {
%2 = tail call double @logf(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int _synctex_path_is_absolute(const char *name) {
  if (!strlen(name)) {
    return 0;
  }
  return ('/' == name[0]) ? -1 : 0;
}


x86 assembly (clang, -O0):
<_synctex_path_is_absolute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jne    113a <_synctex_path_is_absolute+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1155 <_synctex_path_is_absolute+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
mov    $0x2f,%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_synctex_path_is_absolute>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
je     1129 <_synctex_path_is_absolute+0x19>
xor    %eax,%eax
cmpb   $0x2f,(%rbx)
sete   %al
neg    %eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_synctex_path_is_absolute(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 47, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 -1, i32 0
store i32 %15, i32* %2
br label %16
16: ; preds = %8, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @_synctex_path_is_absolute(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 47
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ft_is_delimeter(char);
int ft_advance(char **str) {
  while (!ft_is_delimeter(**str))
    ++(*str);
  return (1);
}


x86 assembly (clang, -O0):
<ft_advance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <ft_is_delimeter@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1140 <ft_advance+0x30>
jmp    1153 <ft_advance+0x43>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <ft_advance+0xc>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_advance>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <ft_is_delimeter@plt>
test   %eax,%eax
jne    1139 <ft_advance+0x29>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <ft_advance+0x10>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_advance(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %10, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = call i32 @ft_is_delimeter(i8 signext %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i8**, i8*** %2
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %11
br label %3
14: ; preds = %3
ret i32 1
}

LLVM IR (-O2):
define i32 @ft_advance(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i32 @ft_is_delimeter(i8 signext %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i32 @ft_is_delimeter(i8 signext %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %6, label %12
12: ; preds = %6, %1
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int chunk_univ_multi_modify(int /*<<< orphan*/, int, int /*<<< orphan*/ *,
                            int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/ *);
int chunk_mr_multi_modify(uint32_t ts, uint64_t *nchunkid, uint64_t ochunkid,
                          uint8_t lsetid, uint8_t opflag) {
  return chunk_univ_multi_modify(ts, 1, nchunkid, ochunkid, lsetid, &opflag);
}


x86 assembly (clang, -O0):
<chunk_mr_multi_modify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x1,%esi
lea    -0x1c(%rbp),%r9
call   1030 <chunk_univ_multi_modify@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chunk_mr_multi_modify>:
push   %rax
mov    %ecx,%eax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %r8d,0x4(%rsp)
lea    0x4(%rsp),%r9
mov    $0x1,%esi
mov    %eax,%r8d
call   1030 <chunk_univ_multi_modify@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @chunk_mr_multi_modify(i32 %0, i32* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
store i32 %4, i32* %6
%7 = call i32 @chunk_univ_multi_modify(i32 %0, i32 1, i32* %1, i32 %2, i32 %3, i32* %6)
ret i32 %7
}
/* Variables and functions */
unsigned char protocol_request(unsigned char *, unsigned char);
unsigned char assignRequest(unsigned char *data, unsigned char nbytes) {
  return protocol_request(data, nbytes);
}


x86 assembly (clang, -O0):
<assignRequest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%esi
call   1030 <protocol_request@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assignRequest>:
jmp    1030 <protocol_request@plt>

LLVM IR (-O0):
define zeroext i8 @assignRequest(i8* %0, i8 zeroext %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 zeroext i8 @protocol_request(i8* %5, i8 zeroext %6)
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @assignRequest(i8* %0, i8 zeroext %1) {
%3 = tail call zeroext i8 @protocol_request(i8* %0, i8 zeroext %1)
ret i8 %3
}
void odog_finish() {}


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

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

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

LLVM IR (-O2):
define void @odog_finish() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int agrc, char *argv[]) {
  printf("%d\n", 5 / 2);
  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    0xed3(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca 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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define void @NV12ToARGBRow_SSSE3() {
ret void
}
void option2optionStart_option_unset_group_optionEnd() {}


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

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

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

LLVM IR (-O2):
define void @option2optionStart_option_unset_group_optionEnd() {
ret void
}
unsigned int f90(unsigned int x, long int y) {
  return (x << (8 * sizeof(unsigned int) - y)) + (x >> y);
}


x86 assembly (clang, -O0):
<f90>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f90>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f90(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = sub i64 32, %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %5, %8
%10 = load i32, i32* %3
%11 = load i64, i64* %4
%12 = trunc i64 %11 to i32
%13 = lshr i32 %10, %12
%14 = add i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f90(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = sub i32 32, %3
%5 = shl i32 %0, %4
%6 = lshr i32 %0, %3
%7 = add i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int mus_open_read(char *);
int mus_read_header_with_fd(int);
int mus_read_header(char *name) {
  int chan, err = 0;
  chan = mus_open_read(name);
  if (chan == -1)
    return (-1);
  err = mus_read_header_with_fd(chan);
  close(chan);
  return (err);
}


x86 assembly (clang, -O0):
<mus_read_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mus_open_read@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1165 <mus_read_header+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <mus_read_header+0x4e>
mov    -0x14(%rbp),%edi
call   1030 <mus_read_header_with_fd@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <close@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_read_header>:
push   %rbp
push   %rbx
push   %rax
call   1040 <mus_open_read@plt>
cmp    $0xffffffff,%eax
je     1153 <mus_read_header+0x23>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <mus_read_header_with_fd@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <close@plt>
mov    %ebp,%eax
jmp    1158 <mus_read_header+0x28>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mus_read_header(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %5
%6 = load i8*, i8** %3
%7 = call i32 @mus_open_read(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @mus_read_header_with_fd(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @close(i32 %14)
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @mus_read_header(i8* %0) {
%2 = tail call i32 @mus_open_read(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @mus_read_header_with_fd(i32 %2)
%6 = tail call i32 @close(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ md5_hash_hex_ex(char *, char *, int);
void NAS_Hash_Hex_Ex(char *in, char *out, int o_size, int algm) {
  if (algm == 1)
    md5_hash_hex_ex(in, out, o_size);
}


x86 assembly (clang, -O0):
<NAS_Hash_Hex_Ex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    1140 <NAS_Hash_Hex_Ex+0x30>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <md5_hash_hex_ex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NAS_Hash_Hex_Ex>:
cmp    $0x1,%ecx
jne    111a <NAS_Hash_Hex_Ex+0xa>
jmp    1030 <md5_hash_hex_ex@plt>
ret

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

LLVM IR (-O2):
define void @NAS_Hash_Hex_Ex(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @md5_hash_hex_ex(i8* %0, i8* %1, i32 %2)
br label %8
8: ; preds = %6, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bym(int /*<<< orphan*/);
void and_bym(uint32_t x) {
  bym(x);
  and();
}


x86 assembly (clang, -O0):
<and_bym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <bym@plt>
mov    $0x0,%al
call   1030 <and@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_bym>:
push   %rax
call   1040 <bym@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <and@plt>

LLVM IR (-O0):
define void @and_bym(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bym(i32 %3)
%5 = call i32 (...) @and()
ret void
}

LLVM IR (-O2):
define void @and_bym(i32 %0) {
%2 = tail call i32 @bym(i32 %0)
%3 = tail call i32 (...) @and()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void a52e_set_lfeon(uint8_t *p_a52, uint8_t i_lfeon) {
  p_a52[4] &= ~0x1;
  p_a52[4] |= i_lfeon & 0x1;
}


x86 assembly (clang, -O0):
<a52e_set_lfeon>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
or     0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a52e_set_lfeon>:
mov    0x10(%rdi),%eax
and    $0xfffffffe,%eax
and    $0x1,%esi
or     %eax,%esi
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @a52e_set_lfeon(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 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = and i32 %7, -2
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 1
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 4
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @a52e_set_lfeon(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = load i32, i32* %3
%5 = and i32 %4, -2
%6 = and i32 %1, 1
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
/* Variables and functions */
void IN_Frame(void) {}


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

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

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

LLVM IR (-O2):
define void @IN_Frame() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int _close(int file) {
  errno = ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<_close>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_close>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOTSUP
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_close(i32 %0) {
%2 = load i32, i32* @ENOTSUP
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
int strlen(char *);
void cutto(char *str, int len) {
  memmove(str, str + len, strlen(str) - len + 1);
}


x86 assembly (clang, -O0):
<cutto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
sub    -0xc(%rbp),%edx
add    $0x1,%edx
call   1040 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutto>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
movslq %esi,%r15
lea    (%rdi,%r15,1),%r14
call   1030 <strlen@plt>
sub    %r15d,%eax
lea    0x1(%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <memmove@plt>

LLVM IR (-O0):
define void @cutto(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 i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = load i32, i32* %4
%13 = sub nsw i32 %11, %12
%14 = add nsw i32 %13, 1
%15 = call i32 @memmove(i8* %5, i8* %9, i32 %14)
ret void
}

LLVM IR (-O2):
define void @cutto(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @strlen(i8* %0)
%6 = sub i32 1, %1
%7 = add i32 %6, %5
%8 = tail call i32 @memmove(i8* %0, i8* %4, i32 %7)
ret void
}
/* Variables and functions */
bool nrf53_errata_15(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_15() {
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x;
  int y;
  x = __VERIFIER_nondet_int();
  while (x > 0) {
    y = 0;
    while (y < x) {
      y = y + 1;
    }
    x = x - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1162 <main+0x52>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1154 <main+0x44>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %13, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %9
16: ; preds = %9
%17 = load i32, i32* %2
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %2
br label %5
19: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
int isNoteValid(int note) {
  if (note >= 0 && note < 12) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<isNoteValid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1127 <isNoteValid+0x27>
cmpl   $0xc,-0x8(%rbp)
jge    1127 <isNoteValid+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <isNoteValid+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNoteValid>:
xor    %eax,%eax
cmp    $0xc,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isNoteValid(i32 %0) {
%2 = icmp ult i32 %0, 12
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ start_uls();
void start_ols() { start_uls(); }


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

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

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

LLVM IR (-O2):
define void @start_ols() {
%1 = tail call i32 (...) @start_uls()
ret void
}
void transfer_ARGB8888_to_RGBA8888(unsigned char *(*output),
                                   unsigned char *input) {
  (*output)[0] = input[1];
  (*output)[1] = input[2];
  (*output)[2] = input[3];
  (*output)[3] = input[0];
  (*output) += 4;
}


x86 assembly (clang, -O0):
<transfer_ARGB8888_to_RGBA8888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_ARGB8888_to_RGBA8888>:
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x1(%rcx)
mov    0x3(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x2(%rcx)
mov    (%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x3(%rcx)
addq   $0x4,(%rdi)
ret

LLVM IR (-O0):
define void @transfer_ARGB8888_to_RGBA8888(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %7, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %13, i8* %16
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 3
%19 = load i8, i8* %18
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %19, i8* %22
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = load i8**, i8*** %3
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i64 3
store i8 %25, i8* %28
%29 = load i8**, i8*** %3
%30 = load i8*, i8** %29
%31 = getelementptr inbounds i8, i8* %30, i64 4
store i8* %31, i8** %29
ret void
}

LLVM IR (-O2):
define void @transfer_ARGB8888_to_RGBA8888(i8** nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = load i8, i8* %3
%5 = load i8*, i8** %0
store i8 %4, i8* %5
%6 = getelementptr inbounds i8, i8* %1, i64 2
%7 = load i8, i8* %6
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %7, i8* %9
%10 = getelementptr inbounds i8, i8* %1, i64 3
%11 = load i8, i8* %10
%12 = load i8*, i8** %0
%13 = getelementptr inbounds i8, i8* %12, i64 2
store i8 %11, i8* %13
%14 = load i8, i8* %1
%15 = load i8*, i8** %0
%16 = getelementptr inbounds i8, i8* %15, i64 3
store i8 %14, i8* %16
%17 = load i8*, i8** %0
%18 = getelementptr inbounds i8, i8* %17, i64 4
store i8* %18, i8** %0
ret void
}
/* Variables and functions */
unsigned int rand();
unsigned rand_interval(unsigned min, unsigned max) {
  return rand() % (max - min + 1) + min;
}


x86 assembly (clang, -O0):
<rand_interval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_interval>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
xor    %edx,%edx
div    %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @rand_interval(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = urem i32 %3, %5
%7 = add i32 %6, %0
ret i32 %7
}
void ff_hevc_put_hevc_bi_w_epel_hv4_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv4_8_sse4() {
ret void
}