xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __create_tag(char *);
int /*<<< orphan*/ __process_args(char *);
int /*<<< orphan*/ printf(char *);
void __print_str(char *argv[]) {
  if (argv) {
    __process_args(argv[1]);
    printf("\nShut your fucking face, uncle fucka! \n");
  } else {
    __create_tag(argv[0]);
    printf("\n +-+ Bang ! +-+ \n");
  }
}


x86 assembly (clang, -O0):
<__print_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1165 <__print_str+0x35>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <__process_args@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <__print_str+0x4d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1050 <__create_tag@plt>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__print_str>:
push   %rax
test   %rdi,%rdi
je     114c <__print_str+0x1c>
mov    0x8(%rdi),%rdi
call   1040 <__process_args@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
call   1050 <__create_tag@plt>
lea    0xea8(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"\0AShut your fucking face, uncle fucka! \0A\00"
@.str.1 = [19 x i8] c"\0A +-+ Bang ! +-+ \0A\00"
define void @__print_str(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = icmp ne i8** %3, null
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @__process_args(i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %17
11: ; preds = %1
%12 = load i8**, i8*** %2
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @__create_tag(i8* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %11, %5
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"\0A +-+ Bang ! +-+ \00"
@str.2 = [39 x i8] c"\0AShut your fucking face, uncle fucka! \00"
define void @__print_str(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @__process_args(i8* %5)
br label %9
7: ; preds = %1
%8 = tail call i32 @__create_tag(i8* undef)
br label %9
9: ; preds = %7, %3
%10 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0), %7 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @str.2, i64 0, i64 0), %3 ]
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ slick_fatal(char *);
void sfree(void *ptr) {
  if (!ptr) {
    slick_fatal("attempt to free NULL pointer");
  }
  free(ptr);
  return;
}


x86 assembly (clang, -O0):
<sfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <sfree+0x23>
lea    0xec2(%rip),%rdi
call   1040 <slick_fatal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfree>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1135 <sfree+0x15>
lea    0xed0(%rip),%rdi
call   1040 <slick_fatal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"attempt to free NULL pointer\00"
define void @sfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @slick_fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"attempt to free NULL pointer\00"
define void @sfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @slick_fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
int /*<<< orphan*/ savetty();
void cmd_savetty(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_return(savetty());
}


x86 assembly (clang, -O0):
<cmd_savetty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_savetty+0x27>
jmp    117f <cmd_savetty+0x3f>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    $0x0,%al
call   1030 <savetty@plt>
mov    %eax,%edi
call   1040 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_savetty>:
push   %rax
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_savetty+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1060 <report_count@plt>
xor    %eax,%eax
call   1030 <savetty@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <report_return@plt>

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

LLVM IR (-O2):
define void @cmd_savetty(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @savetty()
%8 = tail call i32 @report_return(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
double cdfgam_(double *, double *);
double ccdfgam(double *x, double *para) { return cdfgam_(x, para); }


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

x86 assembly (clang, -O2):
<ccdfgam>:
jmp    1030 <cdfgam_@plt>

LLVM IR (-O0):
define double @ccdfgam(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call double @cdfgam_(double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @ccdfgam(double* %0, double* %1) {
%3 = tail call double @cdfgam_(double* %0, double* %1)
ret double %3
}
void ExttCDRAuxTable(void) {}


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

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

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

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

/* Variables and functions */
void Decrypt(uint8_t *block, uint8_t *roundKeys) {}


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

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

LLVM IR (-O0):
define void @Decrypt(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 @Decrypt(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
typedef char *uint16_t;

/* Variables and functions */
uint16_t in16(unsigned long port) {
  uint16_t tmp;
  __asm__ __volatile__("inw %w1, %w0" : "=a"(tmp) : "Nd"(port));
  return tmp;
}


x86 assembly (clang, -O0):
<in16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
in     (%dx),%ax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in16>:
mov    %rdi,%rdx
in     (%dx),%ax
ret

LLVM IR (-O0):
define i8* @in16(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @in16(i64 %0) {
%2 = tail call i8* asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int dup2(int, int);
int errno;
int main(int argc, char const *argv[]) {
  int oldfd = 1;
  int newfd = 1000;
  newfd = dup2(oldfd, 1000);
  assert(newfd == -1);
  newfd = dup2(oldfd, 1000);
  assert(newfd == -1);
  return errno;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x3e8,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x3e8,%esi
call   1030 <dup2@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x14(%rbp),%edi
mov    $0x3e8,%esi
call   1030 <dup2@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x3e8,%esi
call   1030 <dup2@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0x3e8,%esi
call   1030 <dup2@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
call   1040 <assert@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 1000, i32* %7
%8 = load i32, i32* %6
%9 = call i32 @dup2(i32 %8, i32 1000)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = icmp eq i32 %10, -1
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @dup2(i32 %14, i32 1000)
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = icmp eq i32 %16, -1
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* @errno
ret i32 %20
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dup2(i32 1, i32 1000)
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @dup2(i32 1, i32 1000)
%8 = icmp eq i32 %7, -1
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = load i32, i32* @errno
ret i32 %11
}
/* Variables and functions */
int prussdrv_pru_enable_at(unsigned int, int /*<<< orphan*/);
int prussdrv_pru_enable(unsigned int prunum) {
  return prussdrv_pru_enable_at(prunum, 0);
}


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

x86 assembly (clang, -O2):
<prussdrv_pru_enable>:
xor    %esi,%esi
jmp    1030 <prussdrv_pru_enable_at@plt>

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

LLVM IR (-O2):
define i32 @prussdrv_pru_enable(i32 %0) {
%2 = tail call i32 @prussdrv_pru_enable_at(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _fail(char const *const, int const);
int /*<<< orphan*/ integers_equal_display_error(int const, int const);
void _assert_int_equal(const int a, const int b, const char *const file,
                       const int line) {
  if (!integers_equal_display_error(a, b)) {
    _fail(file, line);
  }
}


x86 assembly (clang, -O0):
<_assert_int_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <integers_equal_display_error@plt>
cmp    $0x0,%eax
jne    1155 <_assert_int_equal+0x35>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_int_equal>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1040 <integers_equal_display_error@plt>
test   %eax,%eax
je     1138 <_assert_int_equal+0x18>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_fail@plt>

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

LLVM IR (-O2):
define void @_assert_int_equal(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @integers_equal_display_error(i32 %0, i32 %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @_fail(i8* %2, i32 %3)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void help() {
  puts("create/update package database\n"
       "Usage: update [OPTION] < [FILE] \n"
       "   FILE            Metadata file to read\n"
       "   -h              help menu (this screen)\n"
       "   -d[path]        path to database file\n"
       "   -c              chained call (don't erase or vacuum)\n"
       "   -s              print SQL statements instead of executing them\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [312 x i8] c"create/update package database\0AUsage: update [OPTION] < [FILE] \0A FILE Metadata file to read\0A -h help menu (this screen)\0A -d[path] path to database file\0A -c chained call (don't erase or vacuum)\0A -s print SQL statements instead of executing them\0A\00"
define void @help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [312 x i8] c"create/update package database\0AUsage: update [OPTION] < [FILE] \0A FILE Metadata file to read\0A -h help menu (this screen)\0A -d[path] path to database file\0A -c chained call (don't erase or vacuum)\0A -s print SQL statements instead of executing them\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([312 x i8], [312 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
unsigned long get_cr0(void) {
  unsigned long cr0;
  __asm__ volatile("mov %%cr0, %0" : "=r"(cr0));
  return (cr0);
}


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

x86 assembly (clang, -O2):
<get_cr0>:
mov    %cr0,%rax
ret

LLVM IR (-O0):
define i64 @get_cr0() {
%1 = alloca i64
%2 = call i64 asm sideeffect "mov %cr0, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @get_cr0() {
%1 = tail call i64 asm sideeffect "mov %cr0, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
int srv_rcv_padt(struct session *ses, struct pppoe_packet *p_in,
                 struct pppoe_packet **p_out) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.session = type opaque
%struct.pppoe_packet = type opaque
define i32 @srv_rcv_padt(%struct.session* %0, %struct.pppoe_packet* %1, %struct.pppoe_packet** %2) {
%4 = alloca %struct.session*
%5 = alloca %struct.pppoe_packet*
%6 = alloca %struct.pppoe_packet**
store %struct.session* %0, %struct.session** %4
store %struct.pppoe_packet* %1, %struct.pppoe_packet** %5
store %struct.pppoe_packet** %2, %struct.pppoe_packet*** %6
ret i32 0
}

LLVM IR (-O2):
%struct.session = type opaque
%struct.pppoe_packet = type opaque
define i32 @srv_rcv_padt(%struct.session* nocapture readnone %0, %struct.pppoe_packet* nocapture readnone %1, %struct.pppoe_packet** nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_send_revoke() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_send_revoke"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"NOT IMPLEMENTED:pa_pstream_send_revoke\0A\00"
define i32 @pa_pstream_send_revoke() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_pstream_send_revoke\00"
define i32 @pa_pstream_send_revoke() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int indexof(char);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  printf("%d %d\n", indexof('e'), indexof('v'));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x65,%edi
call   1040 <indexof@plt>
mov    %eax,%ebx
mov    $0x76,%edi
call   1040 <indexof@plt>
lea    0xec2(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @indexof(i8 signext 101)
%2 = tail call i32 @indexof(i8 signext 118)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
unsigned f2(unsigned x, int y) {
  unsigned a = (int)x + y;
  return a - x;
}


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

x86 assembly (clang, -O2):
<f2>:
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x_root;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
int get_XKeyPressedEvent_x_root(void *_p) {
  return (int)((XKeyPressedEvent *)_p)->x_root;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XKeyPressedEvent_x_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cgdiv();
int /*<<< orphan*/ gen(char *);
void cgmod(void) {
  cgdiv();
  gen("movl\t%edx,%eax");
}


x86 assembly (clang, -O0):
<cgmod>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cgdiv@plt>
lea    0xece(%rip),%rdi
call   1030 <gen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgmod>:
push   %rax
xor    %eax,%eax
call   1040 <cgdiv@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"movl\09%edx,%eax\00"
define void @cgmod() {
%1 = call i32 (...) @cgdiv()
%2 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"movl\09%edx,%eax\00"
define void @cgmod() {
%1 = tail call i32 (...) @cgdiv()
%2 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
void bfill(void *s, long unsigned int n, int ch) {
  char *p;
  for (p = s; n-- > 0; p++)
    *p = ch;
}


x86 assembly (clang, -O0):
<bfill>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
jbe    114c <bfill+0x4c>
mov    -0x14(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <bfill+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfill>:
test   %rsi,%rsi
je     1127 <bfill+0x17>
push   %rax
mov    %rsi,%rax
mov    %edx,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @bfill(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
store i8* %8, i8** %7
br label %9
9: ; preds = %17, %3
%10 = load i64, i64* %5
%11 = add i64 %10, -1
store i64 %11, i64* %5
%12 = icmp ugt i64 %10, 0
br i1 %12, label %13, label %20
13: ; preds = %9
%14 = load i32, i32* %6
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %7
store i8 %15, i8* %16
br label %17
17: ; preds = %13
%18 = load i8*, i8** %7
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %7
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @bfill(i8* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %2 to i8
br label %7
7: ; preds = %5, %3
ret void
}
void bezier_split(double t, unsigned int N, double coeffA[N + 1],
                  double coeffB[N + 1], const double coeff[N + 1]) {
  de_casteljau_split(t, N, coeffA, coeffB, coeff);
}


x86 assembly (clang, -O0):
<bezier_split>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x1,%al
call   1030 <de_casteljau_split@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bezier_split>:
mov    $0x1,%al
jmp    1030 <de_casteljau_split@plt>

LLVM IR (-O0):
define void @bezier_split(double %0, i32 %1, double* %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
store double %0, double* %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load i32, i32* %7
%12 = add i32 %11, 1
%13 = zext i32 %12 to i64
%14 = load i32, i32* %7
%15 = add i32 %14, 1
%16 = zext i32 %15 to i64
%17 = load i32, i32* %7
%18 = add i32 %17, 1
%19 = zext i32 %18 to i64
%20 = load double, double* %6
%21 = load i32, i32* %7
%22 = load double*, double** %8
%23 = load double*, double** %9
%24 = load double*, double** %10
%25 = call i32 (double, i32, double*, double*, double*, ...) bitcast (i32 (...)* @de_casteljau_split to i32 (double, i32, double*, double*, double*, ...)*)(double %20, i32 %21, double* %22, double* %23, double* %24)
ret void
}

LLVM IR (-O2):
define void @bezier_split(double %0, i32 %1, double* %2, double* %3, double* %4) {
%6 = tail call i32 (double, i32, double*, double*, double*, ...) bitcast (i32 (...)* @de_casteljau_split to i32 (double, i32, double*, double*, double*, ...)*)(double %0, i32 %1, double* %2, double* %3, double* %4)
ret void
}
/* Variables and functions */
scalar_t__ getpid();
int get_pid(void) { return (int)getpid(); }


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

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

LLVM IR (-O0):
define i32 @get_pid() {
%1 = call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_pid() {
%1 = tail call i64 (...) @getpid()
%2 = trunc i64 %1 to i32
ret i32 %2
}
/* Variables and functions */
double j1(double);
double c_j1(double arg0) { return j1(arg0); }


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

x86 assembly (clang, -O2):
<c_j1>:
jmp    1030 <j1@plt>

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

LLVM IR (-O2):
define double @c_j1(double %0) {
%2 = tail call double @j1(double %0)
ret double %2
}
void foo(void) {
  static char a[0] = "";
  static char b[0] = "b";
  static char c[1] = "c";
  static char d[1] = "de";
}


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

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

LLVM IR (-O0):
@foo.a = internal global [0 x i8] zeroinitializer
@foo.b = internal global [0 x i8] zeroinitializer
@foo.c = internal global [1 x i8] c"c"
@foo.d = internal global [1 x i8] c"d"
define void @foo() {
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
int test_csneg_cmp(int x) {
  if (x > 3)
    x = -x;
  return x;
}


x86 assembly (clang, -O0):
<test_csneg_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    1119 <test_csneg_cmp+0x19>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_csneg_cmp>:
mov    %edi,%eax
neg    %eax
cmp    $0x4,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_csneg_cmp(i32 %0) {
%2 = icmp sgt i32 %0, 3
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 %3, i32 %0
ret i32 %4
}
int test_imm_58uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x58,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_58uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 5767168
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void INT_Excep_MTU6_TGIB6(void) {}


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

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

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

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


x86 assembly (clang, -O0):
<f77>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %ecx,%esi
mov    $0x10,%ecx
sub    %rsi,%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f77>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x10,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f77(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 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = shl i32 %6, %7
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = sub i64 16, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %10, %14
%16 = add nsw i32 %8, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f77(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = shl i32 %3, %1
%5 = sub i32 16, %1
%6 = lshr i32 %3, %5
%7 = add nsw i32 %6, %4
%8 = trunc i32 %7 to i16
ret i16 %8
}
int test_imm_D3uint32_mem(unsigned int *val) {
  return ((*val) & (0xD3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D3uint32_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, 211
%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_D3uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 211
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void abort() { _exit(1); }


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <_exit@plt>

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

LLVM IR (-O0):
define void @abort() {
%1 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @abort() {
%1 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int printSetNeighborDeprecation(int argc, char *argv[]) {
  printf("\nInfo: setra neighbor replaced with:\n"
         "      - setra nparams (config neighbor assessment params)\n\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [97 x i8] c"\0AInfo: setra neighbor replaced with:\0A - setra nparams (config neighbor assessment params)\0A\0A\00"
define i32 @printSetNeighborDeprecation(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [96 x i8] c"\0AInfo: setra neighbor replaced with:\0A - setra nparams (config neighbor assessment params)\0A\00"
define i32 @printSetNeighborDeprecation(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
char encode(char);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ testEncode();
int main(int argc, char *argv[]) {
  testEncode();
  char letter;
  char cipherText;
  scanf("%c", &letter);
  cipherText = encode(letter);
  printf("%c\n", cipherText);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <testEncode@plt>
lea    0xe9c(%rip),%rdi
lea    -0x11(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x11(%rbp),%edi
call   1030 <encode@plt>
mov    %al,-0x12(%rbp)
lea    0xe83(%rip),%rdi
movsbl -0x12(%rbp),%esi
call   1040 <printf@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <testEncode@plt>
lea    0xeb1(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1060 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1030 <encode@plt>
movsbl %al,%esi
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @testEncode()
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%10 = load i8, i8* %6
%11 = call signext i8 @encode(i8 signext %10)
store i8 %11, i8* %7
%12 = load i8, i8* %7
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = tail call i32 (...) @testEncode()
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = load i8, i8* %3
%7 = call signext i8 @encode(i8 signext %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
void foo(void) {
#pragma omp task depend(inout : d)
  ;
#pragma omp task depend(out : d[2])
  ;
#pragma omp task depend(in : d[:])
  ;
#pragma omp task depend(in : d [2:2])
  ;
#pragma omp task depend(in : d[:2])
  ;
#pragma omp task depend(inout : d[1].b->c[2])
  ;
#pragma omp task depend(out : d[0].a)
  ;
#pragma omp task depend(in : e[3]->a)
  ;
#pragma omp task depend(inout : e[2]->b->c)
  ;
#pragma omp task depend(in : e[1]->b->c[2])
  ;
#pragma omp task depend(out : (*f).a)
  ;
#pragma omp task depend(inout : f->b->c[0])
  ;
#pragma omp task depend(in : f)
  ;
#pragma omp task depend(out : *f)
  ;
#pragma omp task depend(inout : f[0])
  ;
#pragma omp task depend(in : f[0].a)
  ;
#pragma omp task depend(inout : h.g.c[2])
  ;
}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "cat [OPTION]...  [FILE...]\n"
                  "Try \"man cat\" for more information\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"cat [OPTION]... [FILE...]\0ATry \22man cat\22 for more information\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"cat [OPTION]... [FILE...]\0ATry \22man cat\22 for more information\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
int main() {
  float x, y, z, media;
  scanf("%f%f%f", &x, &y, &z);
  media = (x + y + z) / 3;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1030 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xeb2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f%f%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %2, float* %3, float* %4)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fadd float %7, %8
%10 = load float, float* %4
%11 = fadd float %9, %10
%12 = fdiv float %11, 3.000000e+00
store float %12, float* %5
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f%f%f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
ret i32 0
}
/* Variables and functions */
unsigned int ReadWriteData(int);
unsigned int ReadData(void) { return ReadWriteData(0x00); }


x86 assembly (clang, -O0):
<ReadData>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <ReadWriteData@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ReadData() {
%1 = call i32 @ReadWriteData(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @ReadData() {
%1 = tail call i32 @ReadWriteData(i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int getSQLResultInt(int /*<<< orphan*/ *, char *);
char *sqlite3_mprintf(char *, char *);
int doesUserExist(sqlite3 *db, char *username) {
  int result;
  char *sql = sqlite3_mprintf("Select EXISTS(Select * From Database "
                              "Where Username = '%q');",
                              username);
  result = getSQLResultInt(db, sql);
  return result;
}


x86 assembly (clang, -O0):
<doesUserExist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <getSQLResultInt@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doesUserExist>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <sqlite3_mprintf@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <getSQLResultInt@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"Select EXISTS(Select * From Database Where Username = '%q');\00"
define i32 @doesUserExist(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %7)
store i8* %8, i8** %6
%9 = load i32*, i32** %3
%10 = load i8*, i8** %6
%11 = call i32 @getSQLResultInt(i32* %9, i8* %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
@.str = [61 x i8] c"Select EXISTS(Select * From Database Where Username = '%q');\00"
define i32 @doesUserExist(i32* %0, i8* %1) {
%3 = tail call i8* @sqlite3_mprintf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @getSQLResultInt(i32* %0, i8* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, unsigned char, int, int);
int /*<<< orphan*/ stdout;
void keyboard(unsigned char key, int x, int y) {
  printf("key: %d %d %d\n", key, x, y);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xebc(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"key: %d %d %d\0A\00"
@stdout = global i32 0
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 zeroext %7, i32 %8, i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"key: %d %d %d\0A\00"
@stdout = global i32 0
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 zeroext %0, i32 %1, i32 %2)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}
unsigned short rol16(unsigned short value) {
  if (value & 0x8000)
    return value * 2 + 1;
  return value * 2;
}


x86 assembly (clang, -O0):
<rol16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
and    $0x8000,%eax
cmp    $0x0,%eax
je     1130 <rol16+0x30>
movzwl -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %ax,-0x2(%rbp)
jmp    113b <rol16+0x3b>
movzwl -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol16>:
mov    %edi,%eax
rol    %ax
ret

LLVM IR (-O0):
define zeroext i16 @rol16(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 32768
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = mul nsw i32 %10, 2
%12 = add nsw i32 %11, 1
%13 = trunc i32 %12 to i16
store i16 %13, i16* %2
br label %19
14: ; preds = %1
%15 = load i16, i16* %3
%16 = zext i16 %15 to i32
%17 = mul nsw i32 %16, 2
%18 = trunc i32 %17 to i16
store i16 %18, i16* %2
br label %19
19: ; preds = %14, %8
%20 = load i16, i16* %2
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @rol16(i16 zeroext %0) {
%2 = tail call i16 @llvm.fshl.i16(i16 %0, i16 %0, i16 1)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ TB_init(char *);
void TB_free(void) { TB_init(""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @TB_free() {
%1 = call i32 @TB_init(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @TB_free() {
%1 = tail call i32 @TB_init(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_F5uint32_mem(unsigned int *val) {
  return ((*val) & (0xF5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F5uint32_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, 245
%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_F5uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 245
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void some_c_symbol() {}


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

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

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

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