xunge/DecIR huggingface dataset:
int cbp71_init_modemctl_device(struct modem_ctl *mc, struct modem_data *pdata) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @cbp71_init_modemctl_device(%struct.modem_ctl* nocapture readnone %0, %struct.modem_data* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ helper_double_29_recursive(double *, int);
void helper_double_29(double *buf) { helper_double_29_recursive(buf, 29); }


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

x86 assembly (clang, -O2):
<helper_double_29>:
mov    $0x1d,%esi
jmp    1030 <helper_double_29_recursive@plt>

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

LLVM IR (-O2):
define void @helper_double_29(double* %0) {
%2 = tail call i32 @helper_double_29_recursive(double* %0, i32 29)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ consumerStop();
void consumerShutdown() { consumerStop(); }


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

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

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

LLVM IR (-O2):
define void @consumerShutdown() {
%1 = tail call i32 (...) @consumerStop()
ret void
}
/* Type definitions */
struct lte_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void sky_lte_endian_swap(struct lte_t *p) {
  assert(p != NULL);
  ;
  ;
  ;
  ;
}


x86 assembly (clang, -O0):
<sky_lte_endian_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sky_lte_endian_swap>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
%struct.lte_t = type { i32 }
define void @sky_lte_endian_swap(%struct.lte_t* %0) {
%2 = alloca %struct.lte_t*
store %struct.lte_t* %0, %struct.lte_t** %2
%3 = load %struct.lte_t*, %struct.lte_t** %2
%4 = icmp ne %struct.lte_t* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.lte_t = type { i32 }
define void @sky_lte_endian_swap(%struct.lte_t* readnone %0) {
%2 = icmp ne %struct.lte_t* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_int(int);
int /*<<< orphan*/ disp_str(char *);
void spurious_inter(int inter) {
  disp_str("spurious_inter: ");
  disp_int(inter);
  disp_str("\n");
}


x86 assembly (clang, -O0):
<spurious_inter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <disp_str@plt>
mov    -0x4(%rbp),%edi
call   1040 <disp_int@plt>
lea    0xecb(%rip),%rdi
call   1030 <disp_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spurious_inter>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <disp_str@plt>
mov    %ebx,%edi
call   1040 <disp_int@plt>
lea    0xed4(%rip),%rdi
pop    %rbx
jmp    1030 <disp_str@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"spurious_inter: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @spurious_inter(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @disp_str(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @disp_int(i32 %4)
%6 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"spurious_inter: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @spurious_inter(i32 %0) {
%2 = tail call i32 @disp_str(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @disp_int(i32 %0)
%4 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dumpdatafile(unsigned char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void dumpdata(unsigned char *data, size_t size) {
  dumpdatafile(data, size, stdout);
}


x86 assembly (clang, -O0):
<dumpdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
call   1030 <dumpdatafile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpdata>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <dumpdatafile@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @dumpdata(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = load i32, i32* @stdout
%8 = call i32 @dumpdatafile(i8* %5, i64 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @dumpdata(i8* %0, i64 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @dumpdatafile(i8* %0, i64 %1, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;
typedef int /*<<< orphan*/ cpu_set;

/* Variables and functions */
int CPU_COUNT(int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ sched_getaffinity(int /*<<< orphan*/, int,
                                     int /*<<< orphan*/ *);
int get_cpu_count(void) {
  cpu_set_t cpu_set;
  CPU_ZERO(&cpu_set);
  sched_getaffinity(0, sizeof(cpu_set), &cpu_set);
  return CPU_COUNT(&cpu_set);
}


x86 assembly (clang, -O0):
<get_cpu_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x4(%rbp),%rdx
call   1050 <sched_getaffinity@plt>
lea    -0x4(%rbp),%rdi
call   1030 <CPU_COUNT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cpu_count>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <CPU_ZERO@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1050 <sched_getaffinity@plt>
mov    %rbx,%rdi
call   1030 <CPU_COUNT@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_cpu_count() {
%1 = alloca i32
%2 = call i32 @CPU_ZERO(i32* %1)
%3 = call i32 @sched_getaffinity(i32 0, i32 4, i32* %1)
%4 = call i32 @CPU_COUNT(i32* %1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @get_cpu_count() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @CPU_ZERO(i32* %1)
%4 = call i32 @sched_getaffinity(i32 0, i32 4, i32* %1)
%5 = call i32 @CPU_COUNT(i32* %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void f3(int size) {
  char src[10];
  if (size < 0)
    memset(src, 0, size);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1133 <f3+0x23>
lea    -0xe(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
test   %edi,%edi
js     1115 <f3+0x5>
ret
sub    $0x18,%rsp
mov    %edi,%edx
lea    0xe(%rsp),%rdi
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* %2
%9 = call i32 @memset(i8* %7, i32 0, i32 %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @f3(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp slt i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @memset(i8* %3, i32 0, i32 %0)
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef char *uint16_t;

/* Variables and functions */
uint16_t inport16(uint16_t port) {
  uint16_t _v;
  asm volatile("inw %%dx,%%ax" : "=a"(_v) : "d"(port));
  return _v;
}


x86 assembly (clang, -O0):
<inport16>:
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):
<inport16>:
mov    %rdi,%rdx
in     (%dx),%ax
ret

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

LLVM IR (-O2):
define i8* @inport16(i8* %0) {
%2 = tail call i8* asm sideeffect "inw %dx,%ax", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
void caller_2_1_2_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_2_1_1_2_2() {
ret void
}
/* Variables and functions */
int close(int);
int ytcpsocket_close(int socketfd) { return close(socketfd); }


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

x86 assembly (clang, -O2):
<ytcpsocket_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @ytcpsocket_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void msm_cpr_disable(void) {}


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

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

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

LLVM IR (-O2):
define void @msm_cpr_disable() {
ret void
}
/* Variables and functions */
int isThere(int, int, char, char);
int isEnemyRaw(int level, char x, char y, int whichEnemy) {
  if ((whichEnemy < 0) || (whichEnemy > (1 - 1))) {
    return 0;
  }
  return isThere(level, (3 + whichEnemy), x, y);
}


x86 assembly (clang, -O0):
<isEnemyRaw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%dl
mov    %edi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     113d <isEnemyRaw+0x2d>
cmpl   $0x0,-0x10(%rbp)
jle    1149 <isEnemyRaw+0x39>
movl   $0x0,-0x4(%rbp)
jmp    1164 <isEnemyRaw+0x54>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
add    $0x3,%esi
mov    -0x9(%rbp),%al
movsbl %al,%edx
movsbl -0xa(%rbp),%ecx
call   1030 <isThere@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEnemyRaw>:
test   %ecx,%ecx
je     1117 <isEnemyRaw+0x7>
xor    %eax,%eax
ret
movsbl %sil,%eax
movsbl %dl,%ecx
mov    $0x3,%esi
mov    %eax,%edx
jmp    1030 <isThere@plt>

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

LLVM IR (-O2):
define i32 @isEnemyRaw(i32 %0, i8 signext %1, i8 signext %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @isThere(i32 %0, i32 3, i8 signext %1, i8 signext %2)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ 0, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Sleep(unsigned long);
void usleep(unsigned long usec) { Sleep(usec / 1000); }


x86 assembly (clang, -O0):
<usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
call   1030 <Sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep>:
mov    %rdi,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
mov    %rdx,%rdi
shr    $0x4,%rdi
jmp    1030 <Sleep@plt>

LLVM IR (-O0):
define void @usleep(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = udiv i64 %3, 1000
%5 = call i32 @Sleep(i64 %4)
ret void
}

LLVM IR (-O2):
define void @usleep(i64 %0) {
%2 = udiv i64 %0, 1000
%3 = tail call i32 @Sleep(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void print_error() {
  fprintf(stderr, "%s", strerror(errno));
  exit(1);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_error>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeb1(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@errno = global i32 0
define void @print_error() {
%1 = load i32, i32* @stderr
%2 = load i32, i32* @errno
%3 = call i8* @strerror(i32 %2)
%4 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@errno = global i32 0
define void @print_error() {
%1 = load i32, i32* @stderr
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ execve(char *, int /*<<< orphan*/, char **);
int main(void) {
  char *args[] = {NULL, NULL}, *envir[] = {NULL};
  execve("/bin/sh", 0, envir);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x28(%rbp),%rdx
lea    0xea6(%rip),%rdi
xor    %esi,%esi
call   1040 <execve@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x0,(%rsp)
lea    0xee0(%rip),%rdi
mov    %rsp,%rdx
xor    %esi,%esi
call   1030 <execve@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/sh\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8*]
%3 = alloca [1 x i8*]
store i32 0, i32* %1
%4 = bitcast [2 x i8*]* %2 to i8*
%5 = bitcast [1 x i8*]* %3 to i8*
%6 = getelementptr inbounds [1 x i8*], [1 x i8*]* %3, i64 0, i64 0
%7 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0, i8** %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/sh\00"
define i32 @main() {
%1 = alloca [1 x i8*]
%2 = bitcast [1 x i8*]* %1 to i8*
%3 = bitcast [1 x i8*]* %1 to i64*
store i64 0, i64* %3
%4 = getelementptr inbounds [1 x i8*], [1 x i8*]* %1, i64 0, i64 0
%5 = call i32 @execve(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0, i8** %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putcar(char);
void print(char *string) {
  while (*string != 0) {
    putcar(*string);
    string++;
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <print+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putcar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <print+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <print+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putcar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @putcar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int test_imm_3Dint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x3D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Dint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 61
%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_3Dint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 261993005056
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
unsigned int run();
int main() {
  unsigned int f;
  int i;
  for (i = 0; i < 1000; i++) {
    f = run();
  }
  printf("%d", f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    115b <main+0x3b>
mov    $0x0,%al
call   1030 <run@plt>
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3e8,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <run@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i32 (...) @run()
store i32 %8, i32* %2
br label %9
9: ; preds = %7
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @run()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 1000
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int stdout_normal(void) {
  printf("\033[0m");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[0m\00"
define i32 @stdout_normal() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
define i32 @stdout_normal() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ GP_del(short);
scalar_t__ getParLong(long *);
void IF_gplot_del(void) {
  long t;
  if (getParLong(&t)) {
    GP_del((short)t);
  }
}


x86 assembly (clang, -O0):
<IF_gplot_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1040 <getParLong@plt>
cmp    $0x0,%rax
je     1147 <IF_gplot_del+0x27>
mov    -0x8(%rbp),%rax
movswl %ax,%edi
call   1030 <GP_del@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_gplot_del>:
push   %rax
mov    %rsp,%rdi
call   1040 <getParLong@plt>
test   %rax,%rax
je     1137 <IF_gplot_del+0x17>
movswl (%rsp),%edi
call   1030 <GP_del@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @IF_gplot_del() {
%1 = alloca i64
%2 = call i64 @getParLong(i64* %1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i64, i64* %1
%6 = trunc i64 %5 to i16
%7 = call i32 @GP_del(i16 signext %6)
br label %8
8: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @IF_gplot_del() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i64 @getParLong(i64* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = load i64, i64* %1
%7 = trunc i64 %6 to i16
%8 = call i32 @GP_del(i16 signext %7)
br label %9
9: ; preds = %5, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setresizable(int, int);
void j_setresizable(int arg0, int arg1) { japi_setresizable(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setresizable>:
jmp    1030 <japi_setresizable@plt>

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

LLVM IR (-O2):
define void @j_setresizable(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setresizable(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _assert_string_equal(char const *, char const *, char *,
                                        int);
scalar_t__ disemvowel(char *);
void test_my_name(void) {
  _assert_string_equal(
      (const char *)"Nchls Frtg McPh",
      (const char *)disemvowel("Nicholas Freitag McPhee"),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/"
      "master/disemvowel/disemvowel_test.c",
      21);
}


x86 assembly (clang, -O0):
<test_my_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <disemvowel@plt>
mov    %rax,%rsi
lea    0xec6(%rip),%rdi
lea    0xee7(%rip),%rdx
mov    $0x15,%ecx
call   1040 <_assert_string_equal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_my_name>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <disemvowel@plt>
lea    0xecc(%rip),%rdi
lea    0xeed(%rip),%rdx
mov    %rax,%rsi
mov    $0x15,%ecx
pop    %rax
jmp    1040 <_assert_string_equal@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Nchls Frtg McPh\00"
@.str.1 = [24 x i8] c"Nicholas Freitag McPhee\00"
@.str.2 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/disemvowel/disemvowel_test.c\00"
define void @test_my_name() {
%1 = call i64 @disemvowel(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%2 = inttoptr i64 %1 to i8*
%3 = call i32 @_assert_string_equal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 21)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Nchls Frtg McPh\00"
@.str.1 = [24 x i8] c"Nicholas Freitag McPhee\00"
@.str.2 = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/disemvowel/disemvowel_test.c\00"
define void @test_my_name() {
%1 = tail call i64 @disemvowel(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @_assert_string_equal(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 21)
ret void
}
char *test_math() {
  do {
    if (!(2 + 2 == 4))
      return "[ERROR] 2+2 != 4";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_math>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <test_math+0x9>
jmp    110e <test_math+0xe>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @test_math() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_math() {
ret i8* null
}
void grail(void) { return; }


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

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

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

LLVM IR (-O2):
define void @grail() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int /*<<< orphan*/);
void getpmsg(int f, void *p, void *p2, void *p3, void *p4) { sleep(0); }


x86 assembly (clang, -O0):
<getpmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %edi,%edi
call   1030 <sleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @getpmsg(i32 %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = call i32 @sleep(i32 0)
ret void
}

LLVM IR (-O2):
define void @getpmsg(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
%6 = tail call i32 @sleep(i32 0)
ret void
}
void TestDot(void) {
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  (void)0;
  (void)0;
}


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

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

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

LLVM IR (-O2):
define void @TestDot() {
ret void
}
/* Type definitions */
typedef void DIR;

/* Variables and functions */
int errno;
void *opendir(char *);
void *open_dir(char *path, int *err_out) {
  DIR *dir;
  dir = opendir(path);
  *err_out = errno;
  return dir;
}


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

x86 assembly (clang, -O2):
<open_dir>:
push   %rbx
mov    %rsi,%rbx
call   1030 <opendir@plt>
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i32 0
define i8* @open_dir(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = call i8* @opendir(i8* %6)
store i8* %7, i8** %5
%8 = load i32, i32* @errno
%9 = load i32*, i32** %4
store i32 %8, i32* %9
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
@errno = global i32 0
define noalias i8* @open_dir(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @opendir(i8* %0)
%4 = load i32, i32* @errno
store i32 %4, i32* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ display_message(char *);
void unknown_action() { display_message("?"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"?\00"
define void @unknown_action() {
%1 = tail call i32 @display_message(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  extern char *__progname;
  fprintf(stderr, "usage: %s filepath\n", __progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%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
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s filepath\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"usage: %s filepath\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t add_int32_t(int32_t a, int32_t b) { return a + b; }


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

x86 assembly (clang, -O2):
<add_int32_t>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @add_int32_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @add_int32_t(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
double f5(double x) { return x + 1. / x; }


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @f5(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fdiv double 1.000000e+00, %4
%6 = fadd double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @f5(double %0) {
%2 = fdiv double 1.000000e+00, %0
%3 = fadd double %2, %0
ret double %3
}
long long _mpyhill(int src1, int src2) {
  short s1 = src1 >> 16;
  return ((long long)src2) * s1;
}


x86 assembly (clang, -O0):
<_mpyhill>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    %ax,-0xa(%rbp)
movslq -0x8(%rbp),%rax
movswq -0xa(%rbp),%rcx
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mpyhill>:
shr    $0x10,%edi
movslq %esi,%rcx
movswq %di,%rax
imul   %rcx,%rax
ret

LLVM IR (-O0):
define i64 @_mpyhill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = ashr i32 %6, 16
%8 = trunc i32 %7 to i16
store i16 %8, i16* %5
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = load i16, i16* %5
%12 = sext i16 %11 to i64
%13 = mul nsw i64 %10, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @_mpyhill(i32 %0, i32 %1) {
%3 = lshr i32 %0, 16
%4 = zext i32 %3 to i64
%5 = sext i32 %1 to i64
%6 = shl nuw i64 %4, 48
%7 = ashr exact i64 %6, 48
%8 = mul nsw i64 %7, %5
ret i64 %8
}
/* Variables and functions */
double __nv_round(double);
double round(double __a) { return __nv_round(__a); }


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

x86 assembly (clang, -O2):
<round>:
jmp    1030 <__nv_round@plt>

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

LLVM IR (-O2):
define double @round(double %0) {
%2 = tail call double @__nv_round(double %0)
ret double %2
}
/* Type definitions */
struct hostent {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int _nss_hoof_gethostbyname2_r(char const *, int /*<<< orphan*/,
                               struct hostent *, char *, size_t, int *, int *);
enum nss_status _nss_hoof_gethostbyname_r(const char *name,
                                          struct hostent *result, char *buffer,
                                          size_t buflen, int *errnop,
                                          int *h_errnop) {
  return _nss_hoof_gethostbyname2_r(name, AF_INET, result, buffer, buflen,
                                    errnop, h_errnop);
}


x86 assembly (clang, -O0):
<_nss_hoof_gethostbyname_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <_nss_hoof_gethostbyname2_r@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_hoof_gethostbyname_r>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2ec4(%rip),%rsi
mov    (%rsi),%esi
mov    %r9,(%rsp)
mov    %rax,%r9
call   1030 <_nss_hoof_gethostbyname2_r@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@AF_INET = global i32 0
define i32 @_nss_hoof_gethostbyname_r(i8* %0, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca %struct.hostent*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32*
%12 = alloca i32*
store i8* %0, i8** %7
store %struct.hostent* %1, %struct.hostent** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i32, i32* @AF_INET
%15 = load %struct.hostent*, %struct.hostent** %8
%16 = load i8*, i8** %9
%17 = load i64, i64* %10
%18 = load i32*, i32** %11
%19 = load i32*, i32** %12
%20 = call i32 @_nss_hoof_gethostbyname2_r(i8* %13, i32 %14, %struct.hostent* %15, i8* %16, i64 %17, i32* %18, i32* %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@AF_INET = global i32 0
define i32 @_nss_hoof_gethostbyname_r(i8* %0, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5) {
%7 = load i32, i32* @AF_INET
%8 = tail call i32 @_nss_hoof_gethostbyname2_r(i8* %0, i32 %7, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void username() { printf("Corbettn17 likes sushi and lasagna! \n"); }


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Corbettn17 likes sushi and lasagna! \0A\00"
define void @username() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"Corbettn17 likes sushi and lasagna! \00"
define void @username() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double __nv_fmin(double, double);
double fmin(double __a, double __b) { return __nv_fmin(__a, __b); }


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

x86 assembly (clang, -O2):
<fmin>:
jmp    1030 <__nv_fmin@plt>

LLVM IR (-O0):
define double @fmin(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 @__nv_fmin(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @fmin(double %0, double %1) {
%3 = tail call double @__nv_fmin(double %0, double %1)
ret double %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void ts_set_cc(uint8_t *p_ts, uint8_t i_cc) {
  p_ts[3] &= ~0xf;
  p_ts[3] |= (i_cc & 0xf);
}


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

x86 assembly (clang, -O2):
<ts_set_cc>:
mov    0xc(%rdi),%eax
and    $0xfffffff0,%eax
and    $0xf,%esi
or     %eax,%esi
mov    %esi,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @ts_set_cc(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = load i32, i32* %3
%5 = and i32 %4, -16
%6 = and i32 %1, 15
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
int dwt_getgain(int orient) {
  if (orient == 0)
    return 0;
  if (orient == 1 || orient == 2)
    return 1;
  return 2;
}


x86 assembly (clang, -O0):
<dwt_getgain>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <dwt_getgain+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1144 <dwt_getgain+0x44>
cmpl   $0x1,-0x8(%rbp)
je     1131 <dwt_getgain+0x31>
cmpl   $0x2,-0x8(%rbp)
jne    113d <dwt_getgain+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <dwt_getgain+0x44>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dwt_getgain>:
lea    -0x1(%rdi),%eax
cmp    $0x2,%eax
mov    $0x2,%ecx
sbb    $0x0,%ecx
xor    %eax,%eax
cmp    $0x1,%edi
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @dwt_getgain(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 2
%5 = select i1 %4, i32 1, i32 2
%6 = select i1 %2, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
char *mymalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *mystrdup(char *name) {
  char *p = mymalloc(strlen(name) + 1);
  strcpy(p, name);
  return p;
}


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <mymalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <mymalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mystrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @mymalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @mystrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @mymalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
__attribute__((no, noclone)) int foo(unsigned char b) {
  if (0x0 <= b && b <= 0x8)
    goto lab;
  if (b == 0x0b)
    goto lab;
  if (0x0e <= b && b <= 0x1a)
    goto lab;
  if (0x1c <= b && b <= 0x1f)
    goto lab;
  return 0;
lab:
  return 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jg     112a <foo+0x2a>
movzbl -0x5(%rbp),%eax
cmp    $0x8,%eax
jg     112a <foo+0x2a>
jmp    118e <foo+0x8e>
movzbl -0x5(%rbp),%eax
cmp    $0xb,%eax
jne    113c <foo+0x3c>
jmp    118e <foo+0x8e>
movzbl -0x5(%rbp),%ecx
mov    $0xe,%eax
cmp    %ecx,%eax
jg     115f <foo+0x5f>
movzbl -0x5(%rbp),%eax
cmp    $0x1a,%eax
jg     115f <foo+0x5f>
jmp    118e <foo+0x8e>
movzbl -0x5(%rbp),%ecx
mov    $0x1c,%eax
cmp    %ecx,%eax
jg     1182 <foo+0x82>
movzbl -0x5(%rbp),%eax
cmp    $0x1f,%eax
jg     1182 <foo+0x82>
jmp    118e <foo+0x8e>
movl   $0x0,-0x4(%rbp)
jmp    1195 <foo+0x95>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x9,%dil
setb   %al
cmp    $0xb,%dil
sete   %cl
or     %al,%cl
lea    -0xe(%rdi),%eax
cmp    $0xd,%al
setb   %al
or     %cl,%al
and    $0xfc,%dil
cmp    $0x1c,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i8 zeroext %0) {
%2 = icmp ult i8 %0, 9
%3 = icmp eq i8 %0, 11
%4 = or i1 %2, %3
%5 = add i8 %0, -14
%6 = icmp ult i8 %5, 13
%7 = or i1 %4, %6
%8 = and i8 %0, -4
%9 = icmp eq i8 %8, 28
%10 = or i1 %9, %7
%11 = zext i1 %10 to i32
ret i32 %11
}
void debug_p(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @debug_p(i8* nocapture %0, ...) {
ret void
}