xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int __setxid(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int setgid(gid_t gid) { return __setxid(214, gid, 0, 0); }


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

x86 assembly (clang, -O2):
<setgid>:
mov    %edi,%esi
mov    $0xd6,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <__setxid@plt>

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

LLVM IR (-O2):
define i32 @setgid(i32 %0) {
%2 = tail call i32 @__setxid(i32 214, i32 %0, i32 0, i32 0)
ret i32 %2
}
int nunits(int b, int n) { return ((n - 1) / b); }


x86 assembly (clang, -O0):
<nunits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nunits>:
lea    -0x1(%rsi),%eax
cltd
idiv   %edi
ret

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

LLVM IR (-O2):
define i32 @nunits(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sdiv i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gms_styled_string(int, char const *);
void gms_header_string(const char *message) { gms_styled_string((3), message); }


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

x86 assembly (clang, -O2):
<gms_header_string>:
mov    %rdi,%rsi
mov    $0x3,%edi
jmp    1030 <gms_styled_string@plt>

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

LLVM IR (-O2):
define void @gms_header_string(i8* %0) {
%2 = tail call i32 @gms_styled_string(i32 3, i8* %0)
ret void
}
void av_des_crypt() {}


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

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

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

LLVM IR (-O2):
define void @av_des_crypt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s", "Hola a todos\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [14 x i8] c"Hola a todos\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [14 x i8] c"Hola a todos\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr == NULL)
    err(1, "malloc");
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <xmalloc+0x35>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xmalloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int prot_send(struct message *msg, struct peer *peer, struct node *node) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.message = type opaque
%struct.peer = type opaque
%struct.node = type opaque
define i32 @prot_send(%struct.message* nocapture readnone %0, %struct.peer* nocapture readnone %1, %struct.node* nocapture readnone %2) {
ret i32 0
}
char *Py_GetPrefix() { return "/"; }


x86 assembly (clang, -O0):
<Py_GetPrefix>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Py_GetPrefix>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @Py_GetPrefix() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @Py_GetPrefix() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void default_free(void *ptr, void *pvt) { free(ptr); }


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

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

LLVM IR (-O0):
define void @default_free(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 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @default_free(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void pwmSetClockSys(int divisor) { return; }


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

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

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

LLVM IR (-O2):
define void @pwmSetClockSys(i32 %0) {
ret void
}
/* Variables and functions */
int BUFSIZ;
void clear_buf(char buf[]) {
  int i;
  i = 0;
  for (i = 0; i < BUFSIZ; i++) {
    buf[i] = 0;
  }
}


x86 assembly (clang, -O0):
<clear_buf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ec0(%rip),%rcx
cmp    (%rcx),%eax
jge    1142 <clear_buf+0x42>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <clear_buf+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_buf>:
mov    0x2ed9(%rip),%rax
cmpl   $0x0,(%rax)
jle    1120 <clear_buf+0x20>
xor    %ecx,%ecx
xchg   %ax,%ax
movb   $0x0,(%rdi,%rcx,1)
add    $0x1,%rcx
movslq (%rax),%rdx
cmp    %rdx,%rcx
jl     1110 <clear_buf+0x10>
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
define void @clear_buf(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = load i32, i32* @BUFSIZ
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
define void @clear_buf(i8* nocapture writeonly %0) {
%2 = load i32, i32* @BUFSIZ
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
%7 = add nuw nsw i64 %5, 1
%8 = load i32, i32* @BUFSIZ
%9 = sext i32 %8 to i64
%10 = icmp slt i64 %7, %9
br i1 %10, label %4, label %11
11: ; preds = %4, %1
ret void
}
void yaffs_handle_chunk_update(struct yaffs_dev *dev, int nand_chunk,
                               const struct yaffs_ext_tags *tags) {
  (void)dev;
  (void)nand_chunk;
  (void)tags;
}


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

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

LLVM IR (-O0):
%struct.yaffs_dev = type opaque
%struct.yaffs_ext_tags = type opaque
define void @yaffs_handle_chunk_update(%struct.yaffs_dev* %0, i32 %1, %struct.yaffs_ext_tags* %2) {
%4 = alloca %struct.yaffs_dev*
%5 = alloca i32
%6 = alloca %struct.yaffs_ext_tags*
store %struct.yaffs_dev* %0, %struct.yaffs_dev** %4
store i32 %1, i32* %5
store %struct.yaffs_ext_tags* %2, %struct.yaffs_ext_tags** %6
%7 = load %struct.yaffs_dev*, %struct.yaffs_dev** %4
%8 = load i32, i32* %5
%9 = load %struct.yaffs_ext_tags*, %struct.yaffs_ext_tags** %6
ret void
}

LLVM IR (-O2):
%struct.yaffs_dev = type opaque
%struct.yaffs_ext_tags = type opaque
define void @yaffs_handle_chunk_update(%struct.yaffs_dev* nocapture %0, i32 %1, %struct.yaffs_ext_tags* nocapture %2) {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_set_allow_interactive_authorization(void *m, int b) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_set_allow_interactive_authorization>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_set_allow_interactive_authorization>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_set_allow_interactive_authorization(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_set_allow_interactive_authorization(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int x = 12;
  x /= 3;
  printf("4: %d \t3: %d\t2: %d\n", x, 11 / 3, 11 % 3);
  return (x == 4) && (11 / 3 == 3) && (11 % 3 == 2) ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xc,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
mov    $0x3,%edx
mov    $0x2,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
cmpl   $0x4,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jne    1166 <main+0x56>
mov    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    1166 <main+0x56>
mov    -0x9(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"4: %d \093: %d\092: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 12, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 3
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 3, i32 2)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 4
br i1 %8, label %9, label %10
9: ; preds = %0
br label %10
10: ; preds = %9, %0
%11 = phi i1 [ false, %0 ], [ true, %9 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 1
ret i32 %13
}

LLVM IR (-O2):
@.str = [20 x i8] c"4: %d \093: %d\092: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4, i32 3, i32 2)
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void AnsiTerm_cursor_down(uint16_t cells) { printf("\x1B[%dB", cells); }


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

x86 assembly (clang, -O2):
<AnsiTerm_cursor_down>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dB\00"
define void @AnsiTerm_cursor_down(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void rotr(int *a, int *b, int *c) {
  int swp;
  swp = *c;
  *c = *b;
  *b = *a;
  *a = swp;
}


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

x86 assembly (clang, -O2):
<rotr>:
mov    (%rdx),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdx)
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @rotr(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i32*, i32** %6
%9 = load i32, i32* %8
store i32 %9, i32* %7
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = load i32*, i32** %6
store i32 %11, i32* %12
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = load i32*, i32** %5
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = load i32*, i32** %4
store i32 %16, i32* %17
ret void
}

LLVM IR (-O2):
define void @rotr(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = load i32, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %0
store i32 %6, i32* %1
store i32 %4, i32* %0
ret void
}
int symbols_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @symbols_shutdown() {
ret i32 0
}
/* Variables and functions */
double exp(double);
double pow(double const, double);
double HO_1(const double L, const double x) {
  double retval = 0.1062251932e1 * x * pow(L, -0.3e1 / 0.2e1) *
                  exp(-0.5000000000e0 * x * x * pow(L, -0.2e1));
  return retval;
}


x86 assembly (clang, -O0):
<HO_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xede(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe99(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe75(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HO_1>:
sub    $0x18,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  0xec9(%rip),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0xebf(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xeae(%rip),%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0xe9c(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
mulsd  (%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @HO_1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = fmul double 0x3FF0FEFBE1C0D855, %6
%8 = load double, double* %3
%9 = call double @pow(double %8, double -1.500000e+00)
%10 = fmul double %7, %9
%11 = load double, double* %4
%12 = fmul double -5.000000e-01, %11
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = load double, double* %3
%16 = call double @pow(double %15, double -2.000000e+00)
%17 = fmul double %14, %16
%18 = call double @exp(double %17)
%19 = fmul double %10, %18
store double %19, double* %5
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @HO_1(double %0, double %1) {
%3 = fmul double %1, 0x3FF0FEFBE1C0D855
%4 = tail call double @pow(double %0, double -1.500000e+00)
%5 = fmul double %3, %4
%6 = fmul double %1, -5.000000e-01
%7 = fmul double %6, %1
%8 = tail call double @pow(double %0, double -2.000000e+00)
%9 = fmul double %7, %8
%10 = tail call double @exp(double %9)
%11 = fmul double %5, %10
ret double %11
}
int hybris_is_pointer_in_shm(void *ptr) {
  if ((unsigned int)ptr >= 0xFF000000UL)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<hybris_is_pointer_in_shm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%eax
mov    $0xff000000,%ecx
cmp    %rcx,%rax
jb     1128 <hybris_is_pointer_in_shm+0x28>
movl   $0x1,-0x4(%rbp)
jmp    112f <hybris_is_pointer_in_shm+0x2f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hybris_is_pointer_in_shm>:
not    %edi
xor    %eax,%eax
test   $0xff000000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @hybris_is_pointer_in_shm(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i32
%6 = zext i32 %5 to i64
%7 = icmp uge i64 %6, 4278190080
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @hybris_is_pointer_in_shm(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 4278190080
%4 = icmp eq i64 %3, 4278190080
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
void lc75710_display_hal_cursor_visibility(bool visible) {}


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

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

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

LLVM IR (-O2):
define void @lc75710_display_hal_cursor_visibility(i32 %0) {
ret void
}
/* Type definitions */
struct user_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct user_data *);
void user_data_free(void *data) {
  struct user_data *user = data;
  free(user);
}


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

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

LLVM IR (-O0):
%struct.user_data = type { i32 }
define void @user_data_free(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.user_data*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.user_data*
store %struct.user_data* %5, %struct.user_data** %3
%6 = load %struct.user_data*, %struct.user_data** %3
%7 = call i32 @free(%struct.user_data* %6)
ret void
}

LLVM IR (-O2):
%struct.user_data = type { i32 }
define void @user_data_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.user_data*
%3 = tail call i32 @free(%struct.user_data* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dotest(int, char *);
int main() {
  {
    dotest(0, "[0]");
    dotest(1, "[1, 2]");
    dotest(8, "[32]");
    dotest(40, "[800]");
    dotest(101, "[10201, 2]");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
call   1030 <dotest@plt>
mov    $0x1,%edi
lea    0xed6(%rip),%rsi
call   1030 <dotest@plt>
mov    $0x8,%edi
lea    0xecc(%rip),%rsi
call   1030 <dotest@plt>
mov    $0x28,%edi
lea    0xec0(%rip),%rsi
call   1030 <dotest@plt>
mov    $0x65,%edi
lea    0xeb5(%rip),%rsi
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %edi,%edi
call   1030 <dotest@plt>
lea    0xede(%rip),%rsi
mov    $0x1,%edi
call   1030 <dotest@plt>
lea    0xed4(%rip),%rsi
mov    $0x8,%edi
call   1030 <dotest@plt>
lea    0xec8(%rip),%rsi
mov    $0x28,%edi
call   1030 <dotest@plt>
lea    0xebd(%rip),%rsi
mov    $0x65,%edi
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"[0]\00"
@.str.1 = [7 x i8] c"[1, 2]\00"
@.str.2 = [5 x i8] c"[32]\00"
@.str.3 = [6 x i8] c"[800]\00"
@.str.4 = [11 x i8] c"[10201, 2]\00"
define i32 @main() {
%1 = call i32 @dotest(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @dotest(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @dotest(i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @dotest(i32 40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @dotest(i32 101, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"[0]\00"
@.str.1 = [7 x i8] c"[1, 2]\00"
@.str.2 = [5 x i8] c"[32]\00"
@.str.3 = [6 x i8] c"[800]\00"
@.str.4 = [11 x i8] c"[10201, 2]\00"
define i32 @main() {
%1 = tail call i32 @dotest(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @dotest(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @dotest(i32 8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @dotest(i32 40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @dotest(i32 101, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int read(int, void *, size_t);
ssize_t xxread(int fd, void *buf, size_t count) {
  int ret = read(fd, buf, count);
  if (count != ret) {
    ;
  }
  return ret;
}


x86 assembly (clang, -O0):
<xxread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmp    %rcx,%rax
je     114c <xxread+0x3c>
jmp    114c <xxread+0x3c>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xxread>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @xxread(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
char *dou2pre(double);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double a = -72.1;
  scanf("%lf", &a);
  char *ai;
  ai = dou2pre(a);
  printf("%s\n", ai);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xeb5(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <dou2pre@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0xc052066666666666,%rax
06 52 c0
mov    %rax,(%rsp)
lea    0xeba(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
call   1050 <dou2pre@plt>
lea    0xea5(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i8*
store i32 0, i32* %1
store double -7.210000e+01, double* %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call i8* @dou2pre(double %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double -7.210000e+01, double* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i8* @dou2pre(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void bswap40(uint8_t *buf) { (void)buf; }


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

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

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

LLVM IR (-O2):
define void @bswap40(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char c = 'A';
  char *p, **q;
  p = &c;
  q = &p;
  printf("Value of c : %c\n", c);
  printf("Value of c : %c\n", *p);
  printf("Value of c : %c\n", **q);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xec6(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
lea    0xeb2(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
lea    0xe9c(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"Value of c : %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 signext 65)
ret i32 0
}
void isakmp_ph2resend_stub(p) void *p;
{ (void)isakmp_ph2resend((struct ph2handle *)p); }


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

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

LLVM IR (-O0):
%struct.ph2handle = type opaque
define void @isakmp_ph2resend_stub(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.ph2handle*
%5 = call i32 (%struct.ph2handle*, ...) bitcast (i32 (...)* @isakmp_ph2resend to i32 (%struct.ph2handle*, ...)*)(%struct.ph2handle* %4)
ret void
}

LLVM IR (-O2):
%struct.ph2handle = type opaque
define void @isakmp_ph2resend_stub(i8* %0) {
%2 = bitcast i8* %0 to %struct.ph2handle*
%3 = tail call i32 (%struct.ph2handle*, ...) bitcast (i32 (...)* @isakmp_ph2resend to i32 (%struct.ph2handle*, ...)*)(%struct.ph2handle* %2)
ret void
}
int main() {
  int sum = 1 || 2;
  sum = !(!!1 && 1 || 2 && 3);
  sum += sum || !sum && 0;
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jne    1147 <main+0x47>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xa(%rbp)
jne    1141 <main+0x41>
xor    %eax,%eax
mov    %al,-0xa(%rbp)
jmp    1141 <main+0x41>
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %0
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %5
br label %9
9: ; preds = %8, %5
%10 = phi i1 [ false, %5 ], [ false, %8 ]
br label %11
11: ; preds = %9, %0
%12 = phi i1 [ true, %0 ], [ %10, %9 ]
%13 = zext i1 %12 to i32
%14 = load i32, i32* %2
%15 = add nsw i32 %14, %13
store i32 %15, i32* %2
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ calc_tree(struct tree *);
double sqrt(int /*<<< orphan*/);
double fun_sqrt(struct tree *tree) { return sqrt(calc_tree(tree)); }


x86 assembly (clang, -O0):
<fun_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <calc_tree@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_sqrt>:
push   %rax
call   1030 <calc_tree@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
%struct.tree = type { i32 }
define double @fun_sqrt(%struct.tree* %0) {
%2 = alloca %struct.tree*
store %struct.tree* %0, %struct.tree** %2
%3 = load %struct.tree*, %struct.tree** %2
%4 = call i32 @calc_tree(%struct.tree* %3)
%5 = call double @sqrt(i32 %4)
ret double %5
}

LLVM IR (-O2):
%struct.tree = type { i32 }
define double @fun_sqrt(%struct.tree* %0) {
%2 = tail call i32 @calc_tree(%struct.tree* %0)
%3 = tail call double @sqrt(i32 %2)
ret double %3
}
long VMM_IS_ERR(const void *ptr) {
  return ((unsigned long)((unsigned long)ptr) <= (unsigned long)4095);
}


x86 assembly (clang, -O0):
<VMM_IS_ERR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0xfff,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMM_IS_ERR>:
xor    %eax,%eax
cmp    $0x1000,%rdi
setb   %al
ret

LLVM IR (-O0):
define i64 @VMM_IS_ERR(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = icmp ule i64 %4, 4095
%6 = zext i1 %5 to i32
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @VMM_IS_ERR(i8* readnone %0) {
%2 = icmp ult i8* %0, inttoptr (i64 4096 to i8*)
%3 = zext i1 %2 to i64
ret i64 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_stage_in_tweak(uint8_t *tweak, const uint8_t value) {
  tweak[0] = (tweak[0] & 0x0f) ^ value;
}


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

x86 assembly (clang, -O2):
<set_stage_in_tweak>:
mov    (%rdi),%eax
and    $0xf,%eax
xor    %esi,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_stage_in_tweak(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, 15
%5 = xor i32 %4, %1
store i32 %5, i32* %0
ret void
}
_Bool sour_bool(_Bool *p) { return *p; }


x86 assembly (clang, -O0):
<sour_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sour_bool>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i1 @sour_bool(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = trunc i8 %4 to i1
ret i1 %5
}

LLVM IR (-O2):
define zeroext i1 @sour_bool(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ne i8 %2, 0
ret i1 %3
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ this_comparison_is_false();
void bla1le(int var) {
  if (var + 10 <= INT_MIN + 9)
    this_comparison_is_false();
}


x86 assembly (clang, -O0):
<bla1le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0x9,%ecx
cmp    %ecx,%eax
jg     113c <bla1le+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla1le>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jle    1122 <bla1le+0x12>
xor    %eax,%eax
jmp    1030 <this_comparison_is_false@plt>
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define void @bla1le(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 10
%5 = load i32, i32* @INT_MIN
%6 = add nsw i32 %5, 9
%7 = icmp sle i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @this_comparison_is_false()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define void @bla1le(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = icmp sgt i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_false()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
double exp(double);
double sin(double);
double d(double x) { return exp(3.0 * x) * sin(2.0 * x); }


x86 assembly (clang, -O0):
<d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xed3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb4(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0xeca(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @d(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 3.000000e+00, %3
%5 = call double @exp(double %4)
%6 = load double, double* %2
%7 = fmul double 2.000000e+00, %6
%8 = call double @sin(double %7)
%9 = fmul double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @d(double %0) {
%2 = fmul double %0, 3.000000e+00
%3 = tail call double @exp(double %2)
%4 = fmul double %0, 2.000000e+00
%5 = tail call double @sin(double %4)
%6 = fmul double %3, %5
ret double %6
}
void limpiar_cadena(char morse[], int k) {
  int i = 0;
  for (i = 0; i < k; i++) {
    morse[i] = ' ';
  }
}


x86 assembly (clang, -O0):
<limpiar_cadena>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113f <limpiar_cadena+0x3f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <limpiar_cadena+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<limpiar_cadena>:
test   %esi,%esi
jle    1125 <limpiar_cadena+0x15>
push   %rax
mov    %esi,%edx
mov    $0x20,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @limpiar_cadena(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
void ff_hevc_put_hevc_uni_epel_h6_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h6_10_sse4() {
ret void
}
/* Type definitions */
struct generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wh_ch(struct generator *, int);
void wh(struct generator *g, int i) {
  if (i >> 4)
    wh(g, i >> 4);
  wh_ch(g, i);
}


x86 assembly (clang, -O0):
<wh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
cmp    $0x0,%eax
je     114d <wh+0x2d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sar    $0x4,%esi
call   1030 <wh@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <wh_ch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wh>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
cmp    $0x10,%esi
jb     113b <wh+0x1b>
mov    %ebx,%esi
sar    $0x4,%esi
mov    %r14,%rdi
call   1030 <wh@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <wh_ch@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
define void @wh(%struct.generator* %0, i32 %1) {
%3 = alloca %struct.generator*
%4 = alloca i32
store %struct.generator* %0, %struct.generator** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load %struct.generator*, %struct.generator** %3
%10 = load i32, i32* %4
%11 = ashr i32 %10, 4
br label %12
12: ; preds = %8, %2
%13 = load %struct.generator*, %struct.generator** %3
%14 = load i32, i32* %4
%15 = call i32 @wh_ch(%struct.generator* %13, i32 %14)
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
define void @wh(%struct.generator* %0, i32 %1) {
%3 = icmp ult i32 %1, 16
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = ashr i32 %1, 4
tail call void @wh(%struct.generator* %0, i32 %5)
br label %6
6: ; preds = %4, %2
%7 = tail call i32 @wh_ch(%struct.generator* %0, i32 %1)
ret void
}
void SSMR3PutStrZ(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3PutStrZ() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ask_y_n(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ exit_handler();
int /*<<< orphan*/ log_message(int, char *);
void signal_handler(int sig) {
  if (!ask_y_n("\nDo you want to stop wiping (y/[n])?")) {
    return;
  }
  log_message(4, "Process was interrupted by user\n");
  exit_handler();
  exit(-1);
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1040 <ask_y_n@plt>
cmp    $0x0,%eax
jne    1166 <signal_handler+0x26>
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x4,%edi
lea    0xeb3(%rip),%rsi
call   1050 <log_message@plt>
mov    $0x0,%al
call   1030 <exit_handler@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <ask_y_n@plt>
test   %eax,%eax
jne    1153 <signal_handler+0x13>
pop    %rax
ret
lea    0xecb(%rip),%rsi
mov    $0x4,%edi
call   1050 <log_message@plt>
xor    %eax,%eax
call   1030 <exit_handler@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0ADo you want to stop wiping (y/[n])?\00"
@.str.1 = [33 x i8] c"Process was interrupted by user\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ask_y_n(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
ret void
6: ; preds = %1
%7 = call i32 @log_message(i32 4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @exit_handler()
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0ADo you want to stop wiping (y/[n])?\00"
@.str.1 = [33 x i8] c"Process was interrupted by user\0A\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @ask_y_n(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
ret void
5: ; preds = %1
%6 = tail call i32 @log_message(i32 4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (...) @exit_handler()
%8 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void instructionsQueue(void) {
  printf("Enter your choice:\n"
         "       1 to add an item to the queue\n"
         "       2 to remove an item from the queue\n"
         "       3 to end\n");
}


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

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

LLVM IR (-O0):
@.str = [115 x i8] c"Enter your choice:\0A 1 to add an item to the queue\0A 2 to remove an item from the queue\0A 3 to end\0A\00"
define void @instructionsQueue() {
%1 = call i32 @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [114 x i8] c"Enter your choice:\0A 1 to add an item to the queue\0A 2 to remove an item from the queue\0A 3 to end\00"
define void @instructionsQueue() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("hello world \\c");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
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 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"hello world \\c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}