xunge/DecIR huggingface dataset:
/* Type definitions */
struct h264_vui {
  int dummy;
};
struct bitstream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
int h264_mvc_vui_parameters(struct bitstream *str, struct h264_vui *vui) {
  abort();
  return 0;
}


x86 assembly (clang, -O0):
<h264_mvc_vui_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<h264_mvc_vui_parameters>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.bitstream = type { i32 }
%struct.h264_vui = type { i32 }
define i32 @h264_mvc_vui_parameters(%struct.bitstream* %0, %struct.h264_vui* %1) {
%3 = alloca %struct.bitstream*
%4 = alloca %struct.h264_vui*
store %struct.bitstream* %0, %struct.bitstream** %3
store %struct.h264_vui* %1, %struct.h264_vui** %4
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.bitstream = type { i32 }
%struct.h264_vui = type { i32 }
define i32 @h264_mvc_vui_parameters(%struct.bitstream* nocapture readnone %0, %struct.h264_vui* nocapture readnone %1) {
%3 = tail call i32 (...) @abort()
unreachable
}
char *get_bts_user() { return "user\0"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"user\00\00"
define i8* @get_bts_user() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void crc64_init(uint64_t *crc) { *crc = 0xffffffffffffffffULL; }


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

x86 assembly (clang, -O2):
<crc64_init>:
movl   $0xffffffff,(%rdi)
ret

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

LLVM IR (-O2):
define void @crc64_init(i32* nocapture writeonly %0) {
store i32 -1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ISB();
unsigned long __get_SCTLR();
int /*<<< orphan*/ __set_SCTLR(unsigned long);
__attribute__((always_)) void L1C_DisableBTAC(void) {
  __set_SCTLR(__get_SCTLR() & (~(1UL << 11U)));
  __ISB();
}


x86 assembly (clang, -O0):
<L1C_DisableBTAC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__get_SCTLR@plt>
mov    %rax,%rdi
and    $0xfffffffffffff7ff,%rdi
call   1050 <__set_SCTLR@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<L1C_DisableBTAC>:
push   %rax
xor    %eax,%eax
call   1040 <__get_SCTLR@plt>
and    $0xfffffffffffff7ff,%rax
mov    %rax,%rdi
call   1050 <__set_SCTLR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ISB@plt>

LLVM IR (-O0):
define void @L1C_DisableBTAC() {
%1 = call i64 (...) @__get_SCTLR()
%2 = and i64 %1, -2049
%3 = call i32 @__set_SCTLR(i64 %2)
%4 = call i32 (...) @__ISB()
ret void
}

LLVM IR (-O2):
define void @L1C_DisableBTAC() {
%1 = tail call i64 (...) @__get_SCTLR()
%2 = and i64 %1, -2049
%3 = tail call i32 @__set_SCTLR(i64 %2)
%4 = tail call i32 (...) @__ISB()
ret void
}
unsigned long long foo(unsigned int a, unsigned int b, unsigned int c) {
  return a ? b : c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1122 <foo+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <foo+0x28>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %esi,%eax
test   %edi,%edi
cmove  %edx,%eax
ret

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

LLVM IR (-O2):
define i64 @foo(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 %2, i32 %1
%6 = zext i32 %5 to i64
ret i64 %6
}
unsigned char Clamp(int i) {
  if (i < 0)
    return 0;
  else if (i > 255)
    return 255;
  else
    return i;
}


x86 assembly (clang, -O0):
<Clamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111a <Clamp+0x1a>
movb   $0x0,-0x1(%rbp)
jmp    1136 <Clamp+0x36>
cmpl   $0xff,-0x8(%rbp)
jle    1130 <Clamp+0x30>
movb   $0xff,-0x1(%rbp)
jmp    1136 <Clamp+0x36>
mov    -0x8(%rbp),%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clamp>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @Clamp(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 0, i8* %2
br label %14
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 255
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 -1, i8* %2
br label %14
11: ; preds = %7
%12 = load i32, i32* %3
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %14
14: ; preds = %11, %10, %6
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @Clamp(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
%6 = trunc i32 %5 to i8
ret i8 %6
}
/* Type definitions */
struct RNAinverse_args_info {
  int dummy;
};

/* Variables and functions */
int RNAinverse_cmdline_parser2(int, char **, struct RNAinverse_args_info *,
                               int /*<<< orphan*/, int, int);
int RNAinverse_cmdline_parser(int argc, char **argv,
                              struct RNAinverse_args_info *args_info) {
  return RNAinverse_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<RNAinverse_cmdline_parser>:
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
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <RNAinverse_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAinverse_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <RNAinverse_cmdline_parser2@plt>

LLVM IR (-O0):
%struct.RNAinverse_args_info = type { i32 }
define i32 @RNAinverse_cmdline_parser(i32 %0, i8** %1, %struct.RNAinverse_args_info* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.RNAinverse_args_info*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.RNAinverse_args_info* %2, %struct.RNAinverse_args_info** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.RNAinverse_args_info*, %struct.RNAinverse_args_info** %6
%10 = call i32 @RNAinverse_cmdline_parser2(i32 %7, i8** %8, %struct.RNAinverse_args_info* %9, i32 0, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.RNAinverse_args_info = type { i32 }
define i32 @RNAinverse_cmdline_parser(i32 %0, i8** %1, %struct.RNAinverse_args_info* %2) {
%4 = tail call i32 @RNAinverse_cmdline_parser2(i32 %0, i8** %1, %struct.RNAinverse_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int atoi(char *);
int fib(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int n;
  assert(argc == 2);
  n = atoi(argv[1]);
  assert(n > 0);
  printf("%d\n", fib(n));
  return 0;
}


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)
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x14(%rbp),%edi
call   1050 <fib@plt>
mov    %eax,%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
mov    %eax,%edi
call   1040 <assert@plt>
mov    0x8(%rbx),%rdi
call   1060 <atoi@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1040 <assert@plt>
mov    %ebx,%edi
call   1050 <fib@plt>
lea    0xe87(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %6
%20 = call i32 @fib(i32 %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = icmp sgt i32 %8, 0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = tail call i32 @fib(i32 %8)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}
/* Type definitions */
struct vnic_intr {
  int dummy;
};

/* Variables and functions */
unsigned int vnic_intr_credits(struct vnic_intr *);
int /*<<< orphan*/ vnic_intr_return_credits(struct vnic_intr *, unsigned int,
                                            int, int);
void vnic_intr_return_all_credits(struct vnic_intr *intr) {
  unsigned int credits = vnic_intr_credits(intr);
  int unmask = 1;
  int reset_timer = 1;
  vnic_intr_return_credits(intr, credits, unmask, reset_timer);
}


x86 assembly (clang, -O0):
<vnic_intr_return_all_credits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <vnic_intr_credits@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <vnic_intr_return_credits@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnic_intr_return_all_credits>:
push   %rbx
mov    %rdi,%rbx
call   1040 <vnic_intr_credits@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rbx
jmp    1030 <vnic_intr_return_credits@plt>

LLVM IR (-O0):
%struct.vnic_intr = type { i32 }
define void @vnic_intr_return_all_credits(%struct.vnic_intr* %0) {
%2 = alloca %struct.vnic_intr*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store %struct.vnic_intr* %0, %struct.vnic_intr** %2
%6 = load %struct.vnic_intr*, %struct.vnic_intr** %2
%7 = call i32 @vnic_intr_credits(%struct.vnic_intr* %6)
store i32 %7, i32* %3
store i32 1, i32* %4
store i32 1, i32* %5
%8 = load %struct.vnic_intr*, %struct.vnic_intr** %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @vnic_intr_return_credits(%struct.vnic_intr* %8, i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.vnic_intr = type { i32 }
define void @vnic_intr_return_all_credits(%struct.vnic_intr* %0) {
%2 = tail call i32 @vnic_intr_credits(%struct.vnic_intr* %0)
%3 = tail call i32 @vnic_intr_return_credits(%struct.vnic_intr* %0, i32 %2, i32 1, i32 1)
ret void
}
void foo230(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo230(i32 %0) {
ret void
}
/* Variables and functions */
unsigned char VIM_HIF_GetReg8(int);
unsigned char VIM_MARB_GetStatus(void) {
  return VIM_HIF_GetReg8((0x2400 + 0x078));
}


x86 assembly (clang, -O0):
<VIM_MARB_GetStatus>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2478,%edi
call   1030 <VIM_HIF_GetReg8@plt>
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_MARB_GetStatus>:
mov    $0x2478,%edi
jmp    1030 <VIM_HIF_GetReg8@plt>

LLVM IR (-O0):
define zeroext i8 @VIM_MARB_GetStatus() {
%1 = call zeroext i8 @VIM_HIF_GetReg8(i32 9336)
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @VIM_MARB_GetStatus() {
%1 = tail call zeroext i8 @VIM_HIF_GetReg8(i32 9336)
ret i8 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc > 1) {
    printf("Hello");
  }
  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)
cmpl   $0x1,-0x8(%rbp)
jle    113c <main+0x2c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1126 <main+0x16>
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ groestl(void const *, size_t, int /*<<< orphan*/ *);
void hash_extra_groestl(const void *data, size_t length, char *hash) {
  groestl(data, length * 8, (uint8_t *)hash);
}


x86 assembly (clang, -O0):
<hash_extra_groestl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
shl    $0x3,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <groestl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_extra_groestl>:
shl    $0x3,%rsi
jmp    1030 <groestl@plt>

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

LLVM IR (-O2):
define void @hash_extra_groestl(i8* %0, i64 %1, i8* %2) {
%4 = shl i64 %1, 3
%5 = bitcast i8* %2 to i32*
%6 = tail call i32 @groestl(i8* %0, i64 %4, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char const *);
int /*<<< orphan*/ stderr;
void die(int status, const char *msg) {
  if (msg) {
    fprintf(stderr, "%s: %s\n", "mkcmain", msg);
  }
  exit(status);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115a <die+0x3a>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rcx
lea    0xeb2(%rip),%rsi
lea    0xeb3(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %edi,%ebx
test   %rsi,%rsi
je     1147 <die+0x27>
mov    %rsi,%rcx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
lea    0xec6(%rip),%rdx
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [8 x i8] c"mkcmain\00"
define void @die(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* %3
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [8 x i8] c"mkcmain\00"
define void @die(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
%8 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int _nodelist_common_string_get_token_common(char *, char *, int *, int,
                                             char **);
int nodelist_common_string_get_token(char *string, char *separators_list,
                                     int token_id, char **p_token) {
  int fstatus = -1;
  int token_nb = 0;
  fstatus = _nodelist_common_string_get_token_common(
      string, separators_list, &token_nb, token_id, p_token);
  if (*p_token != NULL)
    fstatus = 0;
  else
    fstatus = -1;
  return fstatus;
}


x86 assembly (clang, -O0):
<nodelist_common_string_get_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0xffffffff,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
lea    -0x28(%rbp),%rdx
call   1030 <_nodelist_common_string_get_token_common@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     116a <nodelist_common_string_get_token+0x5a>
movl   $0x0,-0x24(%rbp)
jmp    1171 <nodelist_common_string_get_token+0x61>
movl   $0xffffffff,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nodelist_common_string_get_token>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%rbx
mov    %edx,%ecx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rdx
mov    %rbx,%r8
call   1030 <_nodelist_common_string_get_token_common@plt>
cmpq   $0x1,(%rbx)
sbb    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @nodelist_common_string_get_token(i8* %0, i8* %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%7 = call i32 @_nodelist_common_string_get_token_common(i8* %0, i8* %1, i32* %5, i32 %2, i8** %3)
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
%10 = sext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ vdso_has_gettimeofday();
void gettimeofday_notes(struct ctx *ctx) {
  if (!vdso_has_gettimeofday())
    printf("Note: vDSO version of gettimeofday not found\n");
}


x86 assembly (clang, -O0):
<gettimeofday_notes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <vdso_has_gettimeofday@plt>
cmp    $0x0,%eax
jne    1148 <gettimeofday_notes+0x28>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday_notes>:
push   %rax
xor    %eax,%eax
call   1040 <vdso_has_gettimeofday@plt>
test   %eax,%eax
je     112e <gettimeofday_notes+0xe>
pop    %rax
ret
lea    0xecb(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.ctx = type { i32 }
@.str = [46 x i8] c"Note: vDSO version of gettimeofday not found\0A\00"
define void @gettimeofday_notes(%struct.ctx* %0) {
%2 = alloca %struct.ctx*
store %struct.ctx* %0, %struct.ctx** %2
%3 = call i32 (...) @vdso_has_gettimeofday()
%4 = icmp ne i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.ctx = type { i32 }
@str = [45 x i8] c"Note: vDSO version of gettimeofday not found\00"
define void @gettimeofday_notes(%struct.ctx* nocapture readnone %0) {
%2 = tail call i32 (...) @vdso_has_gettimeofday()
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int f12(int *);
int f13(int *p) { return f12(p); }


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

x86 assembly (clang, -O2):
<f13>:
jmp    1030 <f12@plt>

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

LLVM IR (-O2):
define i32 @f13(i32* %0) {
%2 = tail call i32 @f12(i32* %0)
ret i32 %2
}
/* Variables and functions */
int OK;
int /*<<< orphan*/ PDC_set_keyboard_default();
int PDC_reset_shell_mode(void) {
  PDC_set_keyboard_default();
  return OK;
}


x86 assembly (clang, -O0):
<PDC_reset_shell_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <PDC_set_keyboard_default@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PDC_reset_shell_mode>:
push   %rax
xor    %eax,%eax
call   1030 <PDC_set_keyboard_default@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@OK = global i32 0
define i32 @PDC_reset_shell_mode() {
%1 = call i32 (...) @PDC_set_keyboard_default()
%2 = load i32, i32* @OK
ret i32 %2
}

LLVM IR (-O2):
@OK = global i32 0
define i32 @PDC_reset_shell_mode() {
%1 = tail call i32 (...) @PDC_set_keyboard_default()
%2 = load i32, i32* @OK
ret i32 %2
}
/* Variables and functions */
double M_1_PI;
const double deg(double rad) { return (180.0 * M_1_PI * rad); }


x86 assembly (clang, -O0):
<deg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mov    0x2ec8(%rip),%rax
mulsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg>:
mov    0x2ed9(%rip),%rax
movsd  (%rax),%xmm1
mulsd  0xeed(%rip),%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_1_PI = global double 0.000000e+00
define double @deg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* @M_1_PI
%4 = fmul double 1.800000e+02, %3
%5 = load double, double* %2
%6 = fmul double %4, %5
ret double %6
}

LLVM IR (-O2):
@M_1_PI = global double 0.000000e+00
define double @deg(double %0) {
%2 = load double, double* @M_1_PI
%3 = fmul double %2, 1.800000e+02
%4 = fmul double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("getrandom syscall not supported!");
  return -1;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"getrandom syscall not supported!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [33 x i8] c"getrandom syscall not supported!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void bye(int ret) {
  endwin();
  printf("\n");
  exit(ret);
}


x86 assembly (clang, -O0):
<bye>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <endwin@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<bye>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <endwin@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @bye(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @endwin()
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
define void @bye(i32 %0) {
%2 = tail call i32 (...) @endwin()
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ runAllTests_ntjoin();
int main(void) {
  runAllTests_ntjoin();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @runAllTests_ntjoin()
ret i32 0
}
double rgaunt2(double x) { return 1001.0 - (1000.0 * x); }


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

x86 assembly (clang, -O2):
<rgaunt2>:
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @rgaunt2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double -1.000000e+03, double %3, double 1.001000e+03)
ret double %4
}

LLVM IR (-O2):
define double @rgaunt2(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double -1.000000e+03, double 1.001000e+03)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void break_intr(const int intr, const int count) {
  if (intr == count)
    exit(0);
}


x86 assembly (clang, -O0):
<break_intr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1131 <break_intr+0x21>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<break_intr>:
cmp    %esi,%edi
je     1115 <break_intr+0x5>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @break_intr(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @break_intr(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %2
ret void
}
char *stradd(char *buf, char *to_append) {
  while (*to_append) {
    *(buf++) = *(to_append++);
  }
  *buf = '\0';
  return buf;
}


x86 assembly (clang, -O0):
<stradd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <stradd+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <stradd+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stradd>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <stradd+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <stradd+0x10>
movb   $0x0,(%rax)
ret

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

LLVM IR (-O2):
define i8* @stradd(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret i8* %14
}
void foo51() {}


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

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

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

LLVM IR (-O2):
define void @foo51() {
ret void
}
/* Variables and functions */
float cosf(float const);
void glmCos3f(float out[3], const float angle[3]) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = cosf(angle[i]);
}


x86 assembly (clang, -O0):
<glmCos3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    1163 <glmCos3f+0x53>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <cosf@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <glmCos3f+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmCos3f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movss  (%rsi),%xmm0
call   1030 <cosf@plt>
movss  %xmm0,(%r14)
movss  0x4(%rbx),%xmm0
call   1030 <cosf@plt>
movss  %xmm0,0x4(%r14)
movss  0x8(%rbx),%xmm0
call   1030 <cosf@plt>
movss  %xmm0,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @glmCos3f(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = tail call float @cosf(float %3)
store float %4, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = tail call float @cosf(float %6)
%8 = getelementptr inbounds float, float* %0, i64 1
store float %7, float* %8
%9 = getelementptr inbounds float, float* %1, i64 2
%10 = load float, float* %9
%11 = tail call float @cosf(float %10)
%12 = getelementptr inbounds float, float* %0, i64 2
store float %11, float* %12
ret void
}
/* Variables and functions */
scalar_t__ TestByteOrder();
int /*<<< orphan*/ printf(char *);
int main() {
  if (TestByteOrder())
    printf("Little Endian\n");
  else
    printf("Big Endian\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <TestByteOrder@plt>
cmp    $0x0,%rax
je     1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <main+0x3d>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <TestByteOrder@plt>
test   %rax,%rax
lea    0xece(%rip),%rax
lea    0xed2(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Little Endian\0A\00"
@.str.1 = [12 x i8] c"Big Endian\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @TestByteOrder()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Big Endian\00"
@str.2 = [14 x i8] c"Little Endian\00"
define i32 @main() {
%1 = tail call i64 (...) @TestByteOrder()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void suspend_wifi(void) {
  system("/etc/init.d/network stop");
  system("echo timer > /sys/class/leds/longsys\:wifi\:led/trigger ");
  system("echo 100 > /sys/class/leds/longsys\:wifi\:led/delay_on ");
  system("echo 1000 > /sys/class/leds/longsys\:wifi\:led/delay_off ");
}


x86 assembly (clang, -O0):
<suspend_wifi>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xef2(%rip),%rdi
call   1030 <system@plt>
lea    0xf1d(%rip),%rdi
call   1030 <system@plt>
lea    0xf47(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<suspend_wifi>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xef5(%rip),%rdi
call   1030 <system@plt>
lea    0xf20(%rip),%rdi
call   1030 <system@plt>
lea    0xf4a(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"/etc/init.d/network stop\00"
@.str.1 = [55 x i8] c"echo timer > /sys/class/leds/longsys:wifi:led/trigger \00"
@.str.2 = [54 x i8] c"echo 100 > /sys/class/leds/longsys:wifi:led/delay_on \00"
@.str.3 = [56 x i8] c"echo 1000 > /sys/class/leds/longsys:wifi:led/delay_off \00"
define void @suspend_wifi() {
%1 = call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"/etc/init.d/network stop\00"
@.str.1 = [55 x i8] c"echo timer > /sys/class/leds/longsys:wifi:led/trigger \00"
@.str.2 = [54 x i8] c"echo 100 > /sys/class/leds/longsys:wifi:led/delay_on \00"
@.str.3 = [56 x i8] c"echo 1000 > /sys/class/leds/longsys:wifi:led/delay_off \00"
define void @suspend_wifi() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ arf(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void frob() {
  uint64_t num[859];
  uint64_t den[859];
  arf(den, num);
}


x86 assembly (clang, -O0):
<frob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1ae0,%rsp
lea    -0x1ae0(%rbp),%rdi
lea    -0xd70(%rbp),%rsi
call   1030 <arf@plt>
add    $0x1ae0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frob>:
sub    $0x1ae8,%rsp
mov    %rsp,%rdi
lea    0xd70(%rsp),%rsi
call   1030 <arf@plt>
add    $0x1ae8,%rsp
ret

LLVM IR (-O0):
define void @frob() {
%1 = alloca [859 x i32]
%2 = alloca [859 x i32]
%3 = getelementptr inbounds [859 x i32], [859 x i32]* %2, i64 0, i64 0
%4 = getelementptr inbounds [859 x i32], [859 x i32]* %1, i64 0, i64 0
%5 = call i32 @arf(i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @frob() {
%1 = alloca [859 x i32]
%2 = alloca [859 x i32]
%3 = bitcast [859 x i32]* %1 to i8*
%4 = bitcast [859 x i32]* %2 to i8*
%5 = getelementptr inbounds [859 x i32], [859 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [859 x i32], [859 x i32]* %1, i64 0, i64 0
%7 = call i32 @arf(i32* %5, i32* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_lottery_swithc_context();
void my_lottery_Q_Ended(int pSignal) { my_lottery_swithc_context(); }


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

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

LLVM IR (-O0):
define void @my_lottery_Q_Ended(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @my_lottery_swithc_context()
ret void
}

LLVM IR (-O2):
define void @my_lottery_Q_Ended(i32 %0) {
%2 = tail call i32 (...) @my_lottery_swithc_context()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ SHA256_CTX;

/* Variables and functions */
int /*<<< orphan*/ SHA256_Final(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Update(int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ const *, size_t);
void tbHashTokenBindingID(const uint8_t *tokbind_id, size_t tokbind_id_len,
                          uint8_t hash_out[32]) {
  SHA256_CTX sha256;
  SHA256_Init(&sha256);
  SHA256_Update(&sha256, tokbind_id, tokbind_id_len);
  SHA256_Final(hash_out, &sha256);
}


x86 assembly (clang, -O0):
<tbHashTokenBindingID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <SHA256_Init@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0x1c(%rbp),%rdi
call   1050 <SHA256_Update@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <SHA256_Final@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tbHashTokenBindingID>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0x4(%rsp),%r12
mov    %r12,%rdi
call   1030 <SHA256_Init@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <SHA256_Update@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1040 <SHA256_Final@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @tbHashTokenBindingID(i32* %0, i64 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%8 = call i32 @SHA256_Init(i32* %7)
%9 = load i32*, i32** %4
%10 = load i64, i64* %5
%11 = call i32 @SHA256_Update(i32* %7, i32* %9, i64 %10)
%12 = load i32*, i32** %6
%13 = call i32 @SHA256_Final(i32* %12, i32* %7)
ret void
}

LLVM IR (-O2):
define void @tbHashTokenBindingID(i32* %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @SHA256_Init(i32* %4)
%7 = call i32 @SHA256_Update(i32* %4, i32* %0, i64 %1)
%8 = call i32 @SHA256_Final(i32* %2, i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int x = 3;
  int y;
  y = (++x) + (x++) + (x++);
  printf("%d", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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


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

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

LLVM IR (-O0):
define void @bound_error() {
%1 = alloca [7 x i32]
%2 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 7
store i32 4, i32* %2
ret void
}

LLVM IR (-O2):
define void @bound_error() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *strip_act(char *str) {
  memmove(str, str + 4, strlen(str));
  return str;
}


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

x86 assembly (clang, -O2):
<strip_act>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rdi),%r14
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <memmove@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strip_act(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 4
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @memmove(i8* %3, i8* %5, i32 %7)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
define i8* @strip_act(i8* returned %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @memmove(i8* %0, i8* %2, i32 %3)
ret i8* %0
}
int tripleCreate_bound(int UNUSED_a __attribute__((__unused__)),
                       int UNUSED_b __attribute__((__unused__)),
                       int UNUSED_c __attribute__((__unused__))) {
  return 3;
}


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

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

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

LLVM IR (-O2):
define i32 @tripleCreate_bound(i32 %0, i32 %1, i32 %2) {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_WRLCK;
int _fd_get_lock(int, int /*<<< orphan*/, int /*<<< orphan*/);
int fd_get_write_lock(int fd) { return (_fd_get_lock(fd, F_SETLK, F_WRLCK)); }


x86 assembly (clang, -O0):
<fd_get_write_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
call   1030 <_fd_get_lock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_get_write_lock>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <_fd_get_lock@plt>

LLVM IR (-O0):
@F_SETLK = global i32 0
@F_WRLCK = global i32 0
define i32 @fd_get_write_lock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETLK
%5 = load i32, i32* @F_WRLCK
%6 = call i32 @_fd_get_lock(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@F_SETLK = global i32 0
@F_WRLCK = global i32 0
define i32 @fd_get_write_lock(i32 %0) {
%2 = load i32, i32* @F_SETLK
%3 = load i32, i32* @F_WRLCK
%4 = tail call i32 @_fd_get_lock(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef int int16_t;

/* Variables and functions */
int ms_bigendianhost(void) {
  int16_t host = 1;
  return !(*((int8_t *)(&host)));
}


x86 assembly (clang, -O0):
<ms_bigendianhost>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ms_bigendianhost() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ms_bigendianhost() {
ret i32 0
}