xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ using_library_function();
int /*<<< orphan*/ without_using_library_function();
int main() {
  without_using_library_function();
  using_library_function();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @without_using_library_function()
%2 = tail call i32 (...) @using_library_function()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char *str = "Chalk";
  unsigned long hash = 5381;
  printf("%s\n", str);
  int c;
  while (c = *str++)
    hash = ((hash << 5) + hash) + c;
  printf("%lu\n", hash);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     117e <main+0x6e>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1144 <main+0x34>
mov    -0x18(%rbp),%rsi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Chalk\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
store i64 5381, i64* %3
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %13, %0
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
store i32 %11, i32* %4
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %7
%14 = load i64, i64* %3
%15 = shl i64 %14, 5
%16 = load i64, i64* %3
%17 = add i64 %15, %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = add i64 %17, %19
store i64 %20, i64* %3
br label %7
21: ; preds = %7
%22 = load i64, i64* %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 %22)
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [6 x i8] c"Chalk\00"
@.str.2 = [5 x i8] c"%lu\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 210670853192)
ret i32 0
}
void glReadBuffer(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glReadBuffer() {
ret void
}
struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) {
  return (struct s3c24x0_gpio *)0x15600000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_gpio = type opaque
define %struct.s3c24x0_gpio* @s3c24x0_get_base_gpio() {
ret %struct.s3c24x0_gpio* inttoptr (i64 358612992 to %struct.s3c24x0_gpio*)
}

LLVM IR (-O2):
%struct.s3c24x0_gpio = type opaque
define %struct.s3c24x0_gpio* @s3c24x0_get_base_gpio() {
ret %struct.s3c24x0_gpio* inttoptr (i64 358612992 to %struct.s3c24x0_gpio*)
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};

/* Variables and functions */
int /*<<< orphan*/ CEC_MSG_REPORT_ARC_INITIATED;
void cec_msg_report_arc_initiated(struct cec_msg *msg) {
  msg->len = 2;
  msg->msg[1] = CEC_MSG_REPORT_ARC_INITIATED;
}


x86 assembly (clang, -O0):
<cec_msg_report_arc_initiated>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    0x2ecf(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_msg_report_arc_initiated>:
movl   $0x2,(%rdi)
mov    0x2edb(%rip),%rax
mov    (%rax),%eax
mov    0x8(%rdi),%rcx
mov    %eax,0x4(%rcx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_REPORT_ARC_INITIATED = global i32 0
define void @cec_msg_report_arc_initiated(%struct.cec_msg* %0) {
%2 = alloca %struct.cec_msg*
store %struct.cec_msg* %0, %struct.cec_msg** %2
%3 = load %struct.cec_msg*, %struct.cec_msg** %2
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %3, i32 0, i32 0
store i32 2, i32* %4
%5 = load i32, i32* @CEC_MSG_REPORT_ARC_INITIATED
%6 = load %struct.cec_msg*, %struct.cec_msg** %2
%7 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %6, i32 0, i32 1
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_REPORT_ARC_INITIATED = global i32 0
define void @cec_msg_report_arc_initiated(%struct.cec_msg* nocapture %0) {
%2 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
store i32 2, i32* %2
%3 = load i32, i32* @CEC_MSG_REPORT_ARC_INITIATED
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 %3, i32* %6
ret void
}
AR0IR1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (p0[10000000]) = (*p1); }


x86 assembly (clang, -O0):
<AR0IR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x989680(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0IR1>:
mov    (%r9),%al
mov    %al,0x989680(%r8)
ret

LLVM IR (-O0):
define i32 @AR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %13
%17 = load i8, i8* %16
%18 = load i8*, i8** %12
%19 = getelementptr inbounds i8, i8* %18, i64 10000000
store i8 %17, i8* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @AR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4, i8* nocapture %5) {
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 10000000
store i8 %7, i8* %8
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, int /*<<< orphan*/);
int pthread_mutex_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ strerror(int);
void checked_mutex_destroy(pthread_mutex_t *m) {
  int err = pthread_mutex_destroy(m);
  if (err != 0) {
    errx(1, "Failed to destroy a mutex: %s", strerror(err));
  }
}


x86 assembly (clang, -O0):
<checked_mutex_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_destroy@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     116d <checked_mutex_destroy+0x3d>
mov    -0xc(%rbp),%edi
call   1050 <strerror@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe98(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_mutex_destroy>:
push   %rax
call   1040 <pthread_mutex_destroy@plt>
test   %eax,%eax
je     1155 <checked_mutex_destroy+0x25>
mov    %eax,%edi
call   1050 <strerror@plt>
lea    0xeb8(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
pop    %rax
jmp    1030 <errx@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Failed to destroy a mutex: %s\00"
define void @checked_mutex_destroy(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_mutex_destroy(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @strerror(i32 %9)
%11 = call i32 @errx(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Failed to destroy a mutex: %s\00"
define void @checked_mutex_destroy(i32* %0) {
%2 = tail call i32 @pthread_mutex_destroy(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strerror(i32 %2)
%6 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}
unsigned char RtcRead(struct tm *timeptr) {
  timeptr;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.tm = type opaque
define zeroext i8 @RtcRead(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = load %struct.tm*, %struct.tm** %2
ret i8 0
}

LLVM IR (-O2):
%struct.tm = type opaque
define zeroext i8 @RtcRead(%struct.tm* nocapture readnone %0) {
ret i8 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t a52_get_bsmod(const uint8_t *p_a52) { return (p_a52[5] & 0x7); }


x86 assembly (clang, -O0):
<a52_get_bsmod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a52_get_bsmod>:
mov    0x14(%rdi),%eax
and    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @a52_get_bsmod(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
%6 = and i32 %5, 7
ret i32 %6
}

LLVM IR (-O2):
define i32 @a52_get_bsmod(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = and i32 %3, 7
ret i32 %4
}
/* Variables and functions */
int epoll_create(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int init_epoll(void) {
  int epfd;
  epfd = epoll_create(2048);
  if (epfd < 0) {
    perror("epoll_create fail\n");
    exit(1);
  }
  return epfd;
}


x86 assembly (clang, -O0):
<init_epoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x800,%edi
call   1040 <epoll_create@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1165 <init_epoll+0x35>
lea    0xeaa(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_epoll>:
push   %rax
mov    $0x800,%edi
call   1040 <epoll_create@plt>
test   %eax,%eax
js     1141 <init_epoll+0x11>
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"epoll_create fail\0A\00"
define i32 @init_epoll() {
%1 = alloca i32
%2 = call i32 @epoll_create(i32 2048)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [19 x i8] c"epoll_create fail\0A\00"
define i32 @init_epoll() {
%1 = tail call i32 @epoll_create(i32 2048)
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("numbers");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"numbers\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"numbers\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}
int create_ht(p)
char ***p;
{
  *p = (char **)calloc(1024, sizeof(char *));
  return (0);
}


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

x86 assembly (clang, -O2):
<create_ht>:
push   %rbx
mov    %rdi,%rbx
mov    $0x400,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @create_ht(i8*** %0) {
%2 = alloca i8***
store i8*** %0, i8**** %2
%3 = call i8* @calloc(i64 1024, i64 8)
%4 = bitcast i8* %3 to i8**
%5 = load i8***, i8**** %2
store i8** %4, i8*** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @create_ht(i8*** nocapture writeonly %0) {
%2 = tail call dereferenceable_or_null(8192) i8* @calloc(i64 1024, i64 8)
%3 = bitcast i8*** %0 to i8**
store i8* %2, i8** %3
ret i32 0
}
/* Type definitions */
struct sembuf {
  int sem_op;
  scalar_t__ sem_flg;
  scalar_t__ sem_num;
};

/* Variables and functions */
int /*<<< orphan*/ die(char *);
int semop(int, struct sembuf *, int);
void v(int semid) {
  struct sembuf sem_v;
  sem_v.sem_op = 1;
  sem_v.sem_num = 0;
  sem_v.sem_flg = 0;
  if (semop(semid, &sem_v, 1) == -1) {
    die("semop");
  }
}


x86 assembly (clang, -O0):
<v>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
jne    1168 <v+0x48>
lea    0xe9d(%rip),%rdi
call   1030 <die@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v>:
sub    $0x18,%rsp
movl   $0x1,(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
je     114a <v+0x2a>
add    $0x18,%rsp
ret
lea    0xeaf(%rip),%rdi
call   1030 <die@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i64, i64 }
@.str = [6 x i8] c"semop\00"
define void @v(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sembuf
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 0
store i32 1, i32* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 2
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i32 0, i32 1
store i64 0, i64* %6
%7 = load i32, i32* %2
%8 = call i32 @semop(i32 %7, %struct.sembuf* %3, i32 1)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @die(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i64, i64 }
@.str = [6 x i8] c"semop\00"
define void @v(i32 %0) {
%2 = alloca %struct.sembuf
%3 = bitcast %struct.sembuf* %2 to i8*
%4 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 0
store i32 1, i32* %4
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %2, i64 0, i32 1
%6 = bitcast i64* %5 to i8*
%7 = call i32 @semop(i32 %0, %struct.sembuf* %2, i32 1)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @die(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  const double SCALE = 0.333;
  double shoe, foot;
  shoe = 9.0;
  foot = SCALE * shoe + 7.31;
  printf("Shoe size (men's)    foot lenth\n");
  printf("%10.1f %15.2f inches\n", shoe, foot);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xeba(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xebf(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
movsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Shoe size (men's) foot lenth\0A\00"
@.str.1 = [22 x i8] c"%10.1f %15.2f inches\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 3.330000e-01, double* %2
store double 9.000000e+00, double* %3
%5 = load double, double* %3
%6 = call double @llvm.fmuladd.f64(double 3.330000e-01, double %5, double 7.310000e+00)
store double %6, double* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"%10.1f %15.2f inches\0A\00"
@str = [32 x i8] c"Shoe size (men's) foot lenth\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double 9.000000e+00, double 1.030700e+01)
ret i32 0
}
int to_disp(int c) {
  if (c < ' ' || c >= 127)
    c = '.';
  return c;
}


x86 assembly (clang, -O0):
<to_disp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jl     111b <to_disp+0x1b>
cmpl   $0x7f,-0x4(%rbp)
jl     1122 <to_disp+0x22>
movl   $0x2e,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_disp>:
lea    -0x7f(%rdi),%eax
cmp    $0xffffffa1,%eax
mov    $0x2e,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @to_disp(i32 %0) {
%2 = add i32 %0, -127
%3 = icmp ult i32 %2, -95
%4 = select i1 %3, i32 46, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ mdelay(int);
int /*<<< orphan*/ printk(char *);
void arch_wdt_reset(void) {
  printk("arch_reset: attempting watchdog reset\n");
  mdelay(50);
}


x86 assembly (clang, -O0):
<arch_wdt_reset>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printk@plt>
mov    $0x32,%edi
call   1040 <mdelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_wdt_reset>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printk@plt>
mov    $0x32,%edi
pop    %rax
jmp    1040 <mdelay@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"arch_reset: attempting watchdog reset\0A\00"
define void @arch_wdt_reset() {
%1 = call i32 @printk(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mdelay(i32 50)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"arch_reset: attempting watchdog reset\0A\00"
define void @arch_wdt_reset() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @mdelay(i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void _init_rand_lassert(void) {
  static int not_init = 1;
  if (not_init) {
    not_init = 0;
    srand(time(NULL));
  }
}


x86 assembly (clang, -O0):
<_init_rand_lassert>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f05(%rip)
je     114b <_init_rand_lassert+0x2b>
movl   $0x0,0x2ef5(%rip)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_init_rand_lassert>:
push   %rax
cmpb   $0x0,0x2f0c(%rip)
je     112c <_init_rand_lassert+0xc>
pop    %rax
ret
movb   $0x1,0x2f01(%rip)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
@_init_rand_lassert.not_init = internal global i32 1
define void @_init_rand_lassert() {
%1 = load i32, i32* @_init_rand_lassert.not_init
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
store i32 0, i32* @_init_rand_lassert.not_init
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@_init_rand_lassert.not_init = internal unnamed_addr global i1 false
define void @_init_rand_lassert() {
%1 = load i1, i1* @_init_rand_lassert.not_init
br i1 %1, label %5, label %2
2: ; preds = %0
store i1 true, i1* @_init_rand_lassert.not_init
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
br label %5
5: ; preds = %2, %0
ret void
}
void ramster_cpu_down(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @ramster_cpu_down(i32 %0) {
ret void
}
short int shortint_ignoring_longint(short int x, long int y) { return x; }


x86 assembly (clang, -O0):
<shortint_ignoring_longint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @shortint_ignoring_longint(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @shortint_ignoring_longint(i16 returned signext %0, i64 %1) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ test_parse_cpu_set();
int main(int argc, char *argv[]) {
  test_parse_cpu_set();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_parse_cpu_set()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_parse_cpu_set()
ret i32 0
}
int HTTPWrapperSSLRecvPending(int s) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @HTTPWrapperSSLRecvPending(i32 %0) {
ret i32 -1
}
int fcntl(int fd, int cmd, long arg) {
  (void)fd;
  (void)cmd;
  (void)arg;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @fcntl(i32 %0, i32 %1, i64 %2) {
ret i32 0
}
/* Type definitions */
struct key {
  int dummy;
};
struct block {
  int dummy;
};

/* Variables and functions */
int encrypt(struct key *, struct block *);
unsigned decrypt(struct key *k, struct block *message) {
  return encrypt(k, message);
}


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

x86 assembly (clang, -O2):
<decrypt>:
jmp    1030 <encrypt@plt>

LLVM IR (-O0):
%struct.key = type { i32 }
%struct.block = type { i32 }
define i32 @decrypt(%struct.key* %0, %struct.block* %1) {
%3 = alloca %struct.key*
%4 = alloca %struct.block*
store %struct.key* %0, %struct.key** %3
store %struct.block* %1, %struct.block** %4
%5 = load %struct.key*, %struct.key** %3
%6 = load %struct.block*, %struct.block** %4
%7 = call i32 @encrypt(%struct.key* %5, %struct.block* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.key = type { i32 }
%struct.block = type { i32 }
define i32 @decrypt(%struct.key* %0, %struct.block* %1) {
%3 = tail call i32 @encrypt(%struct.key* %0, %struct.block* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) { printf("Hello World\n"); }


x86 assembly (clang, -O0):
<main>:
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):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @main(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 ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int my_compare(const void *a, const void *b) {
  const char *cha = a;
  const char *chb = b;
  return *cha - *chb;
}


x86 assembly (clang, -O0):
<my_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x20(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_compare>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @my_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
__attribute__((always_)) int register_cpu_under_node(unsigned int cpu,
                                                     unsigned int nid) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @register_cpu_under_node(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMREC_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

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

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

LLVM IR (-O2):
define void @U_WMREC_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
void f(char *d) {
  static const char a[] = {
      'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
      'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
  };
  memcpy(d, a, 20);
}


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

x86 assembly (clang, -O2):
<f>:
lea    0xee9(%rip),%rsi
mov    $0x14,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@f.a = internal constant [26 x i8] c"abcdefghijklmnopqrstuvwxyz"
define void @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @memcpy(i8* %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @f.a, i64 0, i64 0), i32 20)
ret void
}

LLVM IR (-O2):
@f.a = internal constant [26 x i8] c"abcdefghijklmnopqrstuvwxyz"
define void @f(i8* %0) {
%2 = tail call i32 @memcpy(i8* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @f.a, i64 0, i64 0), i32 20)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
double ldexp(int, int);
double av_int2dbl(int64_t v) {
  if (v + v > 0xFFEULL << 52)
    return (0.0 / 0.0);
  return ldexp(((v & ((1LL << 52) - 1)) + (1LL << 52)) * (v >> 63 | 1),
               (v >> 52 & 0x7FF) - 1075);
}


x86 assembly (clang, -O0):
<av_int2dbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
movabs $0xffe0000000000000,%rcx
cmp    %rcx,%rax
jbe    1148 <av_int2dbl+0x38>
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119e <av_int2dbl+0x8e>
movslq -0xc(%rbp),%rax
movabs $0xfffffffffffff,%rcx
and    %rcx,%rax
movabs $0x10000000000000,%rcx
add    %rcx,%rax
mov    -0xc(%rbp),%edx
mov    $0x3f,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     $0x1,%ecx
movslq %ecx,%rcx
imul   %rcx,%rax
mov    %eax,%edi
mov    -0xc(%rbp),%esi
mov    $0x34,%ecx
sar    %cl,%esi
and    $0x7ff,%esi
sub    $0x433,%esi
call   1030 <ldexp@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_int2dbl>:
test   %edi,%edi
js     1119 <av_int2dbl+0x9>
jmp    1030 <ldexp@plt>
movsd  0xedf(%rip),%xmm0
ret

LLVM IR (-O0):
define double @av_int2dbl(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %3
%6 = add nsw i32 %4, %5
%7 = sext i32 %6 to i64
%8 = icmp ugt i64 %7, -9007199254740992
br i1 %8, label %9, label %10
9: ; preds = %1
store double 0x7FF8000000000000, double* %2
br label %26
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = and i64 %12, 4503599627370495
%14 = add nsw i64 %13, 4503599627370496
%15 = load i32, i32* %3
%16 = ashr i32 %15, 63
%17 = or i32 %16, 1
%18 = sext i32 %17 to i64
%19 = mul nsw i64 %14, %18
%20 = trunc i64 %19 to i32
%21 = load i32, i32* %3
%22 = ashr i32 %21, 52
%23 = and i32 %22, 2047
%24 = sub nsw i32 %23, 1075
%25 = call double @ldexp(i32 %20, i32 %24)
store double %25, double* %2
br label %26
26: ; preds = %10, %9
%27 = load double, double* %2
ret double %27
}

LLVM IR (-O2):
define double @av_int2dbl(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @ldexp(i32 poison, i32 poison)
br label %5
5: ; preds = %1, %3
%6 = phi double [ %4, %3 ], [ 0x7FF8000000000000, %1 ]
ret double %6
}
/* Variables and functions */
double pow(double, double);
double val_r(double tau) {
  return pow(1.5, 2.0 / 3.0) * pow(tau * tau, 1.0 / 3.0);
}


x86 assembly (clang, -O0):
<val_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  0xee3(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<val_r>:
push   %rax
mulsd  %xmm0,%xmm0
movsd  0xee3(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @val_r(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @pow(double 1.500000e+00, double 0x3FE5555555555555)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = call double @pow(double %6, double 0x3FD5555555555555)
%8 = fmul double %3, %7
ret double %8
}

LLVM IR (-O2):
define double @val_r(double %0) {
%2 = fmul double %0, %0
%3 = tail call double @pow(double %2, double 0x3FD5555555555555)
%4 = fmul double %3, 0x3FF4F747439B348A
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int trap(int *, int);
int main(int argc, char const *argv[]) {
  int A[] = {0, 1, 2, 3, 4, 5, 0, 7, 8, 9, 12, 13};
  printf("%d\n", trap(A, 12));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xc,%esi
call   1050 <trap@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xc,%esi
call   1040 <trap@plt>
lea    0xed5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.A = [12 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 0, i32 7, i32 8, i32 9, i32 12, i32 13]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [12 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [12 x i32]* %6 to i8*
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %6, i64 0, i64 0
%9 = call i32 @trap(i32* %8, i32 12)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [12 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 0, i32 7, i32 8, i32 9, i32 12, i32 13]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [12 x i32]
%4 = bitcast [12 x i32]* %3 to i8*
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 @trap(i32* %5, i32 12)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
int untouched_c_array(char *ca) {
  char *tmp = (ca - 100);
  for (; ca >= tmp; ca--)
    if (*ca != '\0')
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<untouched_c_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffff9c,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     1154 <untouched_c_array+0x54>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113e <untouched_c_array+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    115b <untouched_c_array+0x5b>
jmp    1143 <untouched_c_array+0x43>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <untouched_c_array+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<untouched_c_array>:
xor    %eax,%eax
xor    %ecx,%ecx
cmpb   $0x0,(%rdi,%rcx,1)
jne    1135 <untouched_c_array+0x35>
nopw   0x0(%rax,%rax,1)
cmp    $0xffffffffffffff9d,%rcx
jl     1136 <untouched_c_array+0x36>
cmpb   $0x0,-0x1(%rdi,%rcx,1)
jne    1135 <untouched_c_array+0x35>
cmpb   $0x0,-0x2(%rdi,%rcx,1)
jne    1135 <untouched_c_array+0x35>
cmpb   $0x0,-0x3(%rdi,%rcx,1)
jne    1135 <untouched_c_array+0x35>
add    $0xfffffffffffffffc,%rcx
cmpb   $0x0,(%rdi,%rcx,1)
je     1110 <untouched_c_array+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @untouched_c_array(i8* nocapture %0) {
br label %21
2: ; preds = %21
%3 = icmp slt i64 %22, -99
br i1 %3, label %26, label %4
4: ; preds = %2
%5 = add nsw i64 %22, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %4
%10 = add nsw i64 %22, -2
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %26
14: ; preds = %9
%15 = add nsw i64 %22, -3
%16 = getelementptr inbounds i8, i8* %0, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %14
%20 = add nsw i64 %22, -4
br label %21
21: ; preds = %19, %1
%22 = phi i64 [ 0, %1 ], [ %20, %19 ]
%23 = getelementptr inbounds i8, i8* %0, i64 %22
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 0
br i1 %25, label %2, label %26
26: ; preds = %14, %9, %4, %2, %21
%27 = phi i32 [ 0, %21 ], [ 1, %2 ], [ 0, %4 ], [ 0, %9 ], [ 0, %14 ]
ret i32 %27
}
/* Variables and functions */
int strcmp(char const *, char const *);
int qsort_cmp_decr(const void *a, const void *b) {
  return -strcmp(*(const char **)a, *(const char **)b);
}


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

x86 assembly (clang, -O2):
<qsort_cmp_decr>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
neg    %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @qsort_cmp_decr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
%8 = sub nsw i32 0, %7
ret i32 %8
}
int f0r_init() { return 1; }


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

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

LLVM IR (-O0):
define i32 @f0r_init() {
ret i32 1
}

LLVM IR (-O2):
define i32 @f0r_init() {
ret i32 1
}
/* Variables and functions */
int check_hyphenation(char *, char *, char *);
int /*<<< orphan*/ lou_free();
int main(int argc, char **argv) {
  int result = check_hyphenation("en-us-g1.ctb,hyph_en_US.dic",
                                 "straightforward", "010000001001000");
  lou_free();
  return result;
}


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)
lea    0xec3(%rip),%rdi
lea    0xed8(%rip),%rsi
lea    0xee1(%rip),%rdx
call   1030 <check_hyphenation@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <lou_free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xef6(%rip),%rdx
call   1030 <check_hyphenation@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <lou_free@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"en-us-g1.ctb,hyph_en_US.dic\00"
@.str.1 = [16 x i8] c"straightforward\00"
@.str.2 = [16 x i8] c"010000001001000\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @check_hyphenation(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
store i32 %7, i32* %6
%8 = call i32 (...) @lou_free()
%9 = load i32, i32* %6
ret i32 %9
}

LLVM IR (-O2):
@.str = [28 x i8] c"en-us-g1.ctb,hyph_en_US.dic\00"
@.str.1 = [16 x i8] c"straightforward\00"
@.str.2 = [16 x i8] c"010000001001000\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_hyphenation(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @lou_free()
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_dl_save_symbolic(void *, char *);
void umf4ssym(void **Symbolic, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "s", filename);
  *status = umfpack_dl_save_symbolic(*Symbolic, filename);
}


x86 assembly (clang, -O0):
<umf4ssym>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1030 <make_filename@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <umfpack_dl_save_symbolic@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4ssym>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1030 <make_filename@plt>
mov    (%rbx),%rdi
mov    %r15,%rsi
call   1040 <umfpack_dl_save_symbolic@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"s\00"
define void @umf4ssym(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%15 = call i64 @umfpack_dl_save_symbolic(i8* %13, i8* %14)
%16 = load i64*, i64** %6
store i64 %15, i64* %16
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define void @umf4ssym(i8** nocapture %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i8*, i8** %0
%9 = call i64 @umfpack_dl_save_symbolic(i8* %8, i8* %5)
store i64 %9, i64* %2
ret void
}