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

/* Variables and functions */
int /*<<< orphan*/ _FPU_GETCW(int /*<<< orphan*/);
int __fegetenv(fenv_t *envp) {
  _FPU_GETCW(*envp);
  return 0;
}


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

x86 assembly (clang, -O2):
<__fegetenv>:
push   %rax
mov    (%rdi),%edi
call   1030 <_FPU_GETCW@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @__fegetenv(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @_FPU_GETCW(i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_from_bytes(uintptr_t, uintptr_t);
void fiat_p224_from_bytes(uint32_t out1[7], const uint8_t arg1[28]) {
  internal_fiat_p224_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p224_from_bytes>:
jmp    1030 <internal_fiat_p224_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_p224_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p224_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p224_from_bytes(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int __connect_server();
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int connect_server() {
  int ret;
  if (access("~/modbus_socket", F_OK)) {
    printf("Can't find %s, make sure mbtd has been running\n",
           "~/modbus_socket");
    return -1;
  }
  return __connect_server();
}


x86 assembly (clang, -O0):
<connect_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1050 <access@plt>
cmp    $0x0,%rax
je     1176 <connect_server+0x46>
lea    0xeb2(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1180 <connect_server+0x50>
mov    $0x0,%al
call   1030 <__connect_server@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connect_server>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1050 <access@plt>
test   %rax,%rax
je     1165 <connect_server+0x35>
lea    0xebe(%rip),%rdi
lea    0xea7(%rip),%rsi
call   1040 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <__connect_server@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"~/modbus_socket\00"
@F_OK = global i32 0
@.str.1 = [48 x i8] c"Can't find %s, make sure mbtd has been running\0A\00"
define i32 @connect_server() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @F_OK
%4 = call i64 @access(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %10
8: ; preds = %0
%9 = call i32 (...) @__connect_server()
store i32 %9, i32* %1
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [16 x i8] c"~/modbus_socket\00"
@F_OK = global i32 0
@.str.1 = [48 x i8] c"Can't find %s, make sure mbtd has been running\0A\00"
define i32 @connect_server() {
%1 = load i32, i32* @F_OK
%2 = tail call i64 @access(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = tail call i32 (...) @__connect_server()
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ -1, %4 ], [ %7, %6 ]
ret i32 %9
}
int test_imm_AFuint16_reg(unsigned short val) {
  return ((val) & (-0xAF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AFuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff51,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_AFuint16_reg>:
test   $0xff51,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_AFuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -175
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ signal_handler2(int, int /*<<< orphan*/ *);
void signal_handler(int sig) { signal_handler2(sig, NULL); }


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

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

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

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = tail call i32 @signal_handler2(i32 %0, i32* null)
ret void
}
int f3(int x, int *y, double z, double w) {
  int a[*y];
  if (x)
    __builtin_unreachable();
  asm volatile("" : : "r"(&a[0]));
  return z / w;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114d <f3+0x4d>
mov    -0x38(%rbp),%rax
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    -0x28(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    (%rsi),%eax
mov    %rsp,%rcx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f3(i32 %0, i32* %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca double
%8 = alloca double
%9 = alloca i8*
%10 = alloca i64
store i32 %0, i32* %5
store i32* %1, i32** %6
store double %2, double* %7
store double %3, double* %8
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %9
%15 = alloca i32, i64 %13
store i64 %13, i64* %10
%16 = load i32, i32* %5
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %4
unreachable
19: ; preds = %4
%20 = getelementptr inbounds i32, i32* %15, i64 0
%21 = load double, double* %7
%22 = load double, double* %8
%23 = fdiv double %21, %22
%24 = fptosi double %23 to i32
%25 = load i8*, i8** %9
ret i32 %24
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32* nocapture %1, double %2, double %3) {
%5 = load i32, i32* %1
%6 = zext i32 %5 to i64
%7 = alloca i32, i64 %6
%8 = icmp eq i32 %0, 0
tail call void @llvm.assume(i1 %8)
%9 = fdiv double %2, %3
%10 = fptosi double %9 to i32
ret i32 %10
}
/* Variables and functions */
size_t strnlen(const char *str, size_t maxlen) {
  for (size_t i = 0; i < maxlen; ++i) {
    if (!str[i])
      return i;
  }
  return maxlen;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1157 <strnlen+0x57>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
jne    1141 <strnlen+0x41>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115f <strnlen+0x5f>
jmp    1146 <strnlen+0x46>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1114 <strnlen+0x14>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <strnlen+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rax,1)
je     1122 <strnlen+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <strnlen+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @strnlen(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i64 [ %10, %9 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %2
%13 = phi i64 [ 0, %2 ], [ %5, %4 ], [ %1, %9 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ read_buffer(void *, int);
int /*<<< orphan*/ set_offset(int /*<<< orphan*/);
void do_read_oemdbg_header(void *buff, int size) {
  set_offset(0);
  read_buffer(buff, size);
}


x86 assembly (clang, -O0):
<do_read_oemdbg_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
call   1030 <set_offset@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <read_buffer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_read_oemdbg_header>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <set_offset@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <read_buffer@plt>

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

LLVM IR (-O2):
define void @do_read_oemdbg_header(i8* %0, i32 %1) {
%3 = tail call i32 @set_offset(i32 0)
%4 = tail call i32 @read_buffer(i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ tcdrain(int);
int /*<<< orphan*/ write(int, char const *, size_t);
ssize_t serial_write(int serial_fd, const char *buf, size_t len) {
  ssize_t cwritten;
  cwritten = write(serial_fd, buf, len);
  tcdrain(serial_fd);
  return cwritten;
}


x86 assembly (clang, -O0):
<serial_write>:
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   1040 <write@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <tcdrain@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <write@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <tcdrain@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @serial_write(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 @write(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %4
%13 = call i32 @tcdrain(i32 %12)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
define i32 @serial_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
%5 = tail call i32 @tcdrain(i32 %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f();
main() {
  if (f() != 1)
    abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x1,%eax
je     113b <main+0x1b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
cmp    $0x1,%eax
jne    1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f()
%2 = icmp ne i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
double rate_br(t)
double t;
{
  double gf = 1.1 + 0.34 * exp(-pow(5.5 - log10(t), 2.0) / 3.0);
  return sqrt(t) * 1.42e-27 * gf;
}


x86 assembly (clang, -O0):
<rate_br>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xeb2(%rip),%xmm1
call   1040 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe86(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe65(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe61(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  0xe36(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rate_br>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <log10@plt>
movsd  0xebd(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm1
divsd  0xeb5(%rip),%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
mulsd  0xea8(%rip),%xmm1
addsd  0xea8(%rip),%xmm1
xorpd  %xmm0,%xmm0
movsd  (%rsp),%xmm2
ucomisd %xmm0,%xmm2
movapd %xmm2,%xmm0
jb     1189 <rate_br+0x59>
sqrtsd %xmm0,%xmm0
jmp    1198 <rate_br+0x68>
movsd  %xmm1,(%rsp)
call   1050 <sqrt@plt>
movsd  (%rsp),%xmm1
mulsd  0xe80(%rip),%xmm0
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rate_br(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @log10(double %4)
%6 = fsub double 5.500000e+00, %5
%7 = call double @pow(double %6, double 2.000000e+00)
%8 = fneg double %7
%9 = fdiv double %8, 3.000000e+00
%10 = call double @exp(double %9)
%11 = call double @llvm.fmuladd.f64(double 3.400000e-01, double %10, double 1.100000e+00)
store double %11, double* %3
%12 = load double, double* %2
%13 = call double @sqrt(double %12)
%14 = fmul double %13, 1.420000e-27
%15 = load double, double* %3
%16 = fmul double %14, %15
ret double %16
}

LLVM IR (-O2):
define double @rate_br(double %0) {
%2 = tail call double @log10(double %0)
%3 = fsub double 5.500000e+00, %2
%4 = fneg double %3
%5 = fmul double %3, %4
%6 = fdiv double %5, 3.000000e+00
%7 = tail call double @exp(double %6)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 3.400000e-01, double 1.100000e+00)
%9 = tail call double @sqrt(double %0)
%10 = fmul double %9, 1.420000e-27
%11 = fmul double %8, %10
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
int /*<<< orphan*/ MAXPATHLEN;
int /*<<< orphan*/ lsystem(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void help() {
  char cmd[MAXPATHLEN + 20];
  (void)snprintf(cmd, sizeof(cmd), "-more %s", "/usr/share/misc/more.help");
  lsystem(cmd);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
add    $0x14,%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x18(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x10(%rbp)
mov    %eax,%esi
lea    0xea0(%rip),%rdx
lea    0xea2(%rip),%rcx
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <lsystem@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
add    $0x14,%esi
mov    %rsp,%rbx
lea    0xf(%rsi),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xeb6(%rip),%rdx
lea    0xeb8(%rip),%rcx
mov    %rbx,%rdi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <lsystem@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@MAXPATHLEN = global i32 0
@.str = [9 x i8] c"-more %s\00"
@.str.1 = [26 x i8] c"/usr/share/misc/more.help\00"
define void @help() {
%1 = alloca i8*
%2 = alloca i64
%3 = load i32, i32* @MAXPATHLEN
%4 = add nsw i32 %3, 20
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %1
%7 = alloca i8, i64 %5
store i64 %5, i64* %2
%8 = trunc i64 %5 to i32
%9 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @lsystem(i8* %7)
%11 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@MAXPATHLEN = global i32 0
@.str = [9 x i8] c"-more %s\00"
@.str.1 = [26 x i8] c"/usr/share/misc/more.help\00"
define void @help() {
%1 = load i32, i32* @MAXPATHLEN
%2 = add nsw i32 %1, 20
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = call i32 @snprintf(i8* %4, i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @lsystem(i8* %4)
ret void
}
void EVP_aes_128_xts(void) {}


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

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

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

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

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, int, double, double);
int /*<<< orphan*/ pxf2geo(double, double, double *, double *);
int kap_fprint_ply(FILE *f, int ref, double x, double y) {
  double lat, lon;
  pxf2geo(x, y, &lon, &lat);
  return fprintf(f, "PLY/%d,%.8f,%.8f\r\n", ref, lat, lon);
}


x86 assembly (clang, -O0):
<kap_fprint_ply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    -0x30(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <pxf2geo@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0xe98(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kap_fprint_ply>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <pxf2geo@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"PLY/%d,%.8f,%.8f\0D\0A\00"
define i32 @kap_fprint_ply(i32* %0, i32 %1, double %2, double %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32* %0, i32** %5
store i32 %1, i32* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @pxf2geo(double %11, double %12, double* %10, double* %9)
%14 = load i32*, i32** %5
%15 = load i32, i32* %6
%16 = load double, double* %9
%17 = load double, double* %10
%18 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %15, double %16, double %17)
ret i32 %18
}

LLVM IR (-O2):
@.str = [19 x i8] c"PLY/%d,%.8f,%.8f\0D\0A\00"
define i32 @kap_fprint_ply(i32* nocapture %0, i32 %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %5 to i8*
%8 = bitcast double* %6 to i8*
%9 = call i32 @pxf2geo(double %2, double %3, double* %6, double* %5)
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %1, double %10, double %11)
ret i32 %12
}
int main() {
  int a[200] = {0};
  int b[100] = {3};
  int c[100] = {0};
  int i;
  for (i = 0; i < 100; i++) {
    a[2 * i] = b[i];
    c[i] = a[4 * i + 1];
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x660,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x330(%rbp),%rdi
xor    %esi,%esi
mov    $0x320,%edx
call   1030 <memset@plt>
lea    -0x4c0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1030 <memset@plt>
movl   $0x3,-0x4c0(%rbp)
lea    -0x650(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1030 <memset@plt>
movl   $0x0,-0x654(%rbp)
cmpl   $0x64,-0x654(%rbp)
jge    11d3 <main+0xc3>
movslq -0x654(%rbp),%rax
mov    -0x4c0(%rbp,%rax,4),%ecx
mov    -0x654(%rbp),%eax
shl    $0x1,%eax
cltq
mov    %ecx,-0x330(%rbp,%rax,4)
mov    -0x654(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
cltq
mov    -0x330(%rbp,%rax,4),%ecx
movslq -0x654(%rbp),%rax
mov    %ecx,-0x650(%rbp,%rax,4)
mov    -0x654(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x654(%rbp)
jmp    116f <main+0x5f>
xor    %eax,%eax
add    $0x660,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i32]
%3 = alloca [100 x i32]
%4 = alloca [100 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [200 x i32]* %2 to i8*
%7 = bitcast [100 x i32]* %3 to i8*
%8 = bitcast i8* %7 to <{ i32, [99 x i32] }>*
%9 = getelementptr inbounds <{ i32, [99 x i32] }>, <{ i32, [99 x i32] }>* %8, i32 0, i32 0
store i32 3, i32* %9
%10 = bitcast [100 x i32]* %4 to i8*
store i32 0, i32* %5
br label %11
11: ; preds = %32, %0
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 100
br i1 %13, label %14, label %35
14: ; preds = %11
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = load i32, i32* %5
%20 = mul nsw i32 2, %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 %21
store i32 %18, i32* %22
%23 = load i32, i32* %5
%24 = mul nsw i32 4, %23
%25 = add nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %30
store i32 %28, i32* %31
br label %32
32: ; preds = %14
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %11
35: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ get_uint16(int const *);
uint32_t get_uint32(const uint8_t *p) {
  return (uint32_t)(get_uint16(p) + (1 << 16) * p[2] + (1 << 24) * p[3]);
}


x86 assembly (clang, -O0):
<get_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_uint16@plt>
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
mov    0xc(%rcx),%ecx
shl    $0x18,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint32>:
push   %rbx
mov    %rdi,%rbx
call   1030 <get_uint16@plt>
mov    0x8(%rbx),%ecx
mov    0xc(%rbx),%edx
shl    $0x10,%ecx
shl    $0x18,%edx
add    %ecx,%eax
add    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_uint32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @get_uint16(i32* %3)
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 2
%7 = load i32, i32* %6
%8 = mul nsw i32 65536, %7
%9 = sext i32 %8 to i64
%10 = add nsw i64 %4, %9
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 3
%13 = load i32, i32* %12
%14 = mul nsw i32 16777216, %13
%15 = sext i32 %14 to i64
%16 = add nsw i64 %10, %15
%17 = trunc i64 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @get_uint32(i32* %0) {
%2 = tail call i64 @get_uint16(i32* %0)
%3 = getelementptr inbounds i32, i32* %0, i64 2
%4 = load i32, i32* %3
%5 = shl nsw i32 %4, 16
%6 = getelementptr inbounds i32, i32* %0, i64 3
%7 = load i32, i32* %6
%8 = shl nsw i32 %7, 24
%9 = trunc i64 %2 to i32
%10 = add i32 %5, %9
%11 = add i32 %10, %8
ret i32 %11
}
/* Variables and functions */
scalar_t__ _sys_call(int, int /*<<< orphan*/, int /*<<< orphan*/,
                     int /*<<< orphan*/);
void *process_status(void) { return (void *)_sys_call(0x60, 0, 0, 0); }


x86 assembly (clang, -O0):
<process_status>:
push   %rbp
mov    %rsp,%rbp
mov    $0x60,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <_sys_call@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @process_status() {
%1 = call i64 @_sys_call(i32 96, i32 0, i32 0, i32 0)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @process_status() {
%1 = tail call i64 @_sys_call(i32 96, i32 0, i32 0, i32 0)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, char *);
int /*<<< orphan*/ func1();
int /*<<< orphan*/ func2();
int main(void) {
  func1();
  execlp("ls", "-l", "-h", (char *)0);
  func2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <func1@plt>
lea    0xeb3(%rip),%rdi
lea    0xeaf(%rip),%rsi
lea    0xeab(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1050 <execlp@plt>
mov    $0x0,%al
call   1040 <func2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func1@plt>
lea    0xec1(%rip),%rdi
lea    0xebd(%rip),%rsi
lea    0xeb9(%rip),%rdx
xor    %ecx,%ecx
call   1050 <execlp@plt>
xor    %eax,%eax
call   1040 <func2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ls\00"
@.str.1 = [3 x i8] c"-l\00"
@.str.2 = [3 x i8] c"-h\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func1()
%3 = call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* null)
%4 = call i32 (...) @func2()
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"ls\00"
@.str.1 = [3 x i8] c"-l\00"
@.str.2 = [3 x i8] c"-h\00"
define i32 @main() {
%1 = tail call i32 (...) @func1()
%2 = tail call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* null)
%3 = tail call i32 (...) @func2()
ret i32 0
}
int no_swizzle(const int swizzle) { return (swizzle == 0xE4); }


x86 assembly (clang, -O0):
<no_swizzle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xe4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_swizzle>:
xor    %eax,%eax
cmp    $0xe4,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @no_swizzle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 228
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @no_swizzle(i32 %0) {
%2 = icmp eq i32 %0, 228
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ run_godo(char *, char *);
int main(int argc, char **argv) {
  assert(argc == 3);
  run_godo(argv[1], argv[2]);
  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   $0x3,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <run_godo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x3,%edi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
call   1040 <run_godo@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 3
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @run_godo(i8* %12, i8* %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
%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 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @run_godo(i8* %7, i8* %9)
ret i32 0
}
int foo(int a) {
  int b = 2;
  return b + a * 3;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,2),%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 3
%7 = add nsw i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = mul nsw i32 %0, 3
%3 = add nsw i32 %2, 2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, size_t, char const *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void util_get_current_time(char *timestr, size_t max, const char *format) {
  time_t timer = time(NULL);
  struct tm *tm_info = localtime(&timer);
  strftime(timestr, max, format, tm_info);
}


x86 assembly (clang, -O0):
<util_get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1050 <strftime@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_get_current_time>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @util_get_current_time(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.tm*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%9 = call i32 @time(i32* null)
store i32 %9, i32* %7
%10 = call %struct.tm* @localtime(i32* %7)
store %struct.tm* %10, %struct.tm** %8
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = load i8*, i8** %6
%14 = load %struct.tm*, %struct.tm** %8
%15 = call i32 @strftime(i8* %11, i64 %12, i8* %13, %struct.tm* %14)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @util_get_current_time(i8* %0, i64 %1, i8* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 @time(i32* null)
store i32 %6, i32* %4
%7 = call %struct.tm* @localtime(i32* %4)
%8 = call i32 @strftime(i8* %0, i64 %1, i8* %2, %struct.tm* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ inputx_post_utf8_rate(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ make_mame_time(int /*<<< orphan*/, int /*<<< orphan*/);
void inputx_post_utf8(const char *text) {
  inputx_post_utf8_rate(text, make_mame_time(0, 0));
}


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

x86 assembly (clang, -O2):
<inputx_post_utf8>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <make_mame_time@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <inputx_post_utf8_rate@plt>

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

LLVM IR (-O2):
define void @inputx_post_utf8(i8* %0) {
%2 = tail call i32 @make_mame_time(i32 0, i32 0)
%3 = tail call i32 @inputx_post_utf8_rate(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EIO;
int /*<<< orphan*/ errno;
int _close(int fd) {
  (void)fd;
  errno = EIO;
  return -1;
}


x86 assembly (clang, -O0):
<_close>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_close>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EIO = global i32 0
@errno = global i32 0
define i32 @_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @EIO
store i32 %4, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EIO = global i32 0
@errno = global i32 0
define i32 @_close(i32 %0) {
%2 = load i32, i32* @EIO
store i32 %2, i32* @errno
ret i32 -1
}
__attribute__((__weak__, __always___)) char *
softboundcets_strdup(const char *s) {
  void *ret_ptr = strdup(s);
  __softboundcets_strdup_handler(ret_ptr);
  return ret_ptr;
}


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

x86 assembly (clang, -O2):
<softboundcets_strdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %eax,%eax
call   1030 <__softboundcets_strdup_handler@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundcets_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @__softboundcets_strdup_handler to i32 (i8*, ...)*)(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define weak i8* @softboundcets_strdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @__softboundcets_strdup_handler to i32 (i8*, ...)*)(i8* %2)
ret i8* %2
}
double cpu2slot(int cpu) { return 2 * cpu + 1; }


x86 assembly (clang, -O0):
<cpu2slot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu2slot>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @cpu2slot(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = add nsw i32 %4, 1
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @cpu2slot(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
%4 = sitofp i32 %3 to double
ret double %4
}
void ff_hevc_put_hevc_bi_pel_pixels32_8_avx2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ mat3_scaling(float *, float *);
__attribute__((always_)) struct mat3 *psmat3_scaling(struct mat3 *result,
                                                     struct mat3 *v) {
  mat3_scaling((float *)result, (float *)v);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat3_scaling>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat3_scaling@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_scaling(%struct.mat3* %0, %struct.mat3* %1) {
%3 = alloca %struct.mat3*
%4 = alloca %struct.mat3*
store %struct.mat3* %0, %struct.mat3** %3
store %struct.mat3* %1, %struct.mat3** %4
%5 = load %struct.mat3*, %struct.mat3** %3
%6 = bitcast %struct.mat3* %5 to float*
%7 = load %struct.mat3*, %struct.mat3** %4
%8 = bitcast %struct.mat3* %7 to float*
%9 = call i32 @mat3_scaling(float* %6, float* %8)
%10 = load %struct.mat3*, %struct.mat3** %3
ret %struct.mat3* %10
}

LLVM IR (-O2):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_scaling(%struct.mat3* returned %0, %struct.mat3* %1) {
%3 = bitcast %struct.mat3* %0 to float*
%4 = bitcast %struct.mat3* %1 to float*
%5 = tail call i32 @mat3_scaling(float* %3, float* %4)
ret %struct.mat3* %0
}
void __ftrace_enabled_restore(int enabled) {}


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

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

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

LLVM IR (-O2):
define void @__ftrace_enabled_restore(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ echo(char *);
fuu() {
omg:
  echo("aaa");
  if (1)
    goto omg;
}


x86 assembly (clang, -O0):
<fuu>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <fuu+0x9>
lea    0xee0(%rip),%rdi
call   1030 <echo@plt>
jmp    1119 <fuu+0x9>

x86 assembly (clang, -O2):
<fuu>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <echo@plt>
jmp    1120 <fuu+0x10>

LLVM IR (-O0):
@.str = [4 x i8] c"aaa\00"
define i32 @fuu() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @echo(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %1
}

LLVM IR (-O2):
@.str = [4 x i8] c"aaa\00"
define i32 @fuu() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @echo(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M908_f(char *s) {
  debug("M908_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M908_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M908_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M908_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M908_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M908_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M908_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
scalar_t__ isalpha(int);
int issymbol(int chr) { return isalpha(chr) || chr == '@' || chr == '_'; }


x86 assembly (clang, -O0):
<issymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    114e <issymbol+0x3e>
mov    $0x1,%al
cmpl   $0x40,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114e <issymbol+0x3e>
cmpl   $0x5f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<issymbol>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
test   %rax,%rax
setne  %al
cmp    $0x40,%ebx
sete   %cl
cmp    $0x5f,%ebx
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @issymbol(i32 %0) {
%2 = tail call i64 @isalpha(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i32 %0, 64
%5 = or i1 %4, %3
%6 = icmp eq i32 %0, 95
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
char tolower(char);
char *convLow(char *v, int dim) {
  int i = 0;
  for (i = 0; i < dim; i++)
    v[i] = tolower(v[i]);
  return v;
}


x86 assembly (clang, -O0):
<convLow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
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    1165 <convLow+0x55>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <convLow+0x1d>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convLow>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
test   %esi,%esi
jle    1147 <convLow+0x37>
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <convLow+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @convLow(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 = %21, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %24
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
%15 = load i8, i8* %14
%16 = call signext i8 @tolower(i8 signext %15)
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 %16, i8* %20
br label %21
21: ; preds = %10
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @convLow(i8* returned %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @tolower(i8 signext %9)
store i8 %10, i8* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i8* %0
}