xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(struct tm *, struct tm *, int);
struct tm *localtime_r(time_t const *t, struct tm *tp) {
  struct tm *copy = localtime(t);
  if (!copy)
    return NULL;
  memcpy(tp, copy, sizeof(*tp));
  return tp;
}


x86 assembly (clang, -O0):
<localtime_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <localtime_r+0x35>
movq   $0x0,-0x8(%rbp)
jmp    116f <localtime_r+0x4f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<localtime_r>:
push   %rbx
mov    %rsi,%rbx
call   1030 <localtime@plt>
test   %rax,%rax
je     1140 <localtime_r+0x20>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
jmp    1142 <localtime_r+0x22>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* %0, %struct.tm* %1) {
%3 = alloca %struct.tm*
%4 = alloca i32*
%5 = alloca %struct.tm*
%6 = alloca %struct.tm*
store i32* %0, i32** %4
store %struct.tm* %1, %struct.tm** %5
%7 = load i32*, i32** %4
%8 = call %struct.tm* @localtime(i32* %7)
store %struct.tm* %8, %struct.tm** %6
%9 = load %struct.tm*, %struct.tm** %6
%10 = icmp ne %struct.tm* %9, null
br i1 %10, label %12, label %11
11: ; preds = %2
store %struct.tm* null, %struct.tm** %3
br label %17
12: ; preds = %2
%13 = load %struct.tm*, %struct.tm** %5
%14 = load %struct.tm*, %struct.tm** %6
%15 = call i32 @memcpy(%struct.tm* %13, %struct.tm* %14, i32 4)
%16 = load %struct.tm*, %struct.tm** %5
store %struct.tm* %16, %struct.tm** %3
br label %17
17: ; preds = %12, %11
%18 = load %struct.tm*, %struct.tm** %3
ret %struct.tm* %18
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* %0, %struct.tm* %1) {
%3 = tail call %struct.tm* @localtime(i32* %0)
%4 = icmp eq %struct.tm* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(%struct.tm* %1, %struct.tm* %3, i32 4)
br label %7
7: ; preds = %2, %5
%8 = phi %struct.tm* [ %1, %5 ], [ null, %2 ]
ret %struct.tm* %8
}
void g_key_file_set_boolean() {}


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

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

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

LLVM IR (-O2):
define void @g_key_file_set_boolean() {
ret void
}
void initarray(int arr[], int n) {
  while (n >= 0)
    arr[n--] = 0;
}


x86 assembly (clang, -O0):
<initarray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1133 <initarray+0x33>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    110b <initarray+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initarray>:
test   %esi,%esi
js     112a <initarray+0x1a>
push   %rax
mov    %esi,%eax
lea    0x4(,%rax,4),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @initarray(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
%8 = add nuw nsw i64 %7, 4
br label %9
9: ; preds = %4, %2
ret void
}
double rq_pricing_single_barrier_greeks_continuous(
    short in, short call, double S, double X, double B, double r_dom,
    double r_for, double sigma, double tau_e, double tau_d, double *delta,
    double *gamma, double *vega, double *theta, double *rho_dom,
    double *rho_for) {
  return 0;
}


x86 assembly (clang, -O0):
<rq_pricing_single_barrier_greeks_continuous>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%si
mov    0x18(%rbp),%rdi
mov    0x10(%rbp),%rdi
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x58(%rbp)
mov    %r8,-0x60(%rbp)
mov    %r9,-0x68(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_single_barrier_greeks_continuous>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @rq_pricing_single_barrier_greeks_continuous(i16 signext %0, i16 signext %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double* %10, double* %11, double* %12, double* %13, double* %14, double* %15) {
%17 = alloca i16
%18 = alloca i16
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double*
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
%32 = alloca double*
store i16 %0, i16* %17
store i16 %1, i16* %18
store double %2, double* %19
store double %3, double* %20
store double %4, double* %21
store double %5, double* %22
store double %6, double* %23
store double %7, double* %24
store double %8, double* %25
store double %9, double* %26
store double* %10, double** %27
store double* %11, double** %28
store double* %12, double** %29
store double* %13, double** %30
store double* %14, double** %31
store double* %15, double** %32
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @rq_pricing_single_barrier_greeks_continuous(i16 signext %0, i16 signext %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double* nocapture readnone %10, double* nocapture readnone %11, double* nocapture readnone %12, double* nocapture readnone %13, double* nocapture readnone %14, double* nocapture readnone %15) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ m2_parser_get_val();
int /*<<< orphan*/ m2_parser_inc_str();
scalar_t__ m2_parser_is_digit();
int /*<<< orphan*/ m2_parser_skip_space();
void m2_parser_skip_cmd(void) {
  m2_parser_inc_str();
  m2_parser_skip_space();
  if (m2_parser_is_digit())
    m2_parser_get_val();
}


x86 assembly (clang, -O0):
<m2_parser_skip_cmd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <m2_parser_inc_str@plt>
mov    $0x0,%al
call   1030 <m2_parser_skip_space@plt>
mov    $0x0,%al
call   1040 <m2_parser_is_digit@plt>
cmp    $0x0,%rax
je     116a <m2_parser_skip_cmd+0x2a>
mov    $0x0,%al
call   1050 <m2_parser_get_val@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m2_parser_skip_cmd>:
push   %rax
xor    %eax,%eax
call   1060 <m2_parser_inc_str@plt>
xor    %eax,%eax
call   1030 <m2_parser_skip_space@plt>
xor    %eax,%eax
call   1040 <m2_parser_is_digit@plt>
test   %rax,%rax
je     1163 <m2_parser_skip_cmd+0x23>
xor    %eax,%eax
pop    %rcx
jmp    1050 <m2_parser_get_val@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @m2_parser_skip_cmd() {
%1 = call i32 (...) @m2_parser_inc_str()
%2 = call i32 (...) @m2_parser_skip_space()
%3 = call i64 (...) @m2_parser_is_digit()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @m2_parser_get_val()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @m2_parser_skip_cmd() {
%1 = tail call i32 (...) @m2_parser_inc_str()
%2 = tail call i32 (...) @m2_parser_skip_space()
%3 = tail call i64 (...) @m2_parser_is_digit()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 (...) @m2_parser_get_val()
br label %7
7: ; preds = %5, %0
ret void
}
/* Variables and functions */
int TextScreen_RestoreTerm();
int /*<<< orphan*/ TextScreen_SetCursorVisible(int);
int TextScreen_End(void) {
  int ret = 0;
  ret = TextScreen_RestoreTerm();
  TextScreen_SetCursorVisible(1);
  return ret;
}


x86 assembly (clang, -O0):
<TextScreen_End>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <TextScreen_RestoreTerm@plt>
mov    %eax,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <TextScreen_SetCursorVisible@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TextScreen_End>:
push   %rbx
xor    %eax,%eax
call   1040 <TextScreen_RestoreTerm@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1030 <TextScreen_SetCursorVisible@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @TextScreen_End() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @TextScreen_RestoreTerm()
store i32 %2, i32* %1
%3 = call i32 @TextScreen_SetCursorVisible(i32 1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @TextScreen_End() {
%1 = tail call i32 (...) @TextScreen_RestoreTerm()
%2 = tail call i32 @TextScreen_SetCursorVisible(i32 1)
ret i32 %1
}
int test(int *fd) {
  int t = *fd;
  printf("The t is: %d in %s.\n", t, __FUNCTION__);
  *fd = 1024;
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed1(%rip),%rdi
lea    0xedf(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movl   $0x400,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee3(%rip),%rdi
lea    0xef1(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x400,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"The t is: %d in %s.\0A\00"
@__FUNCTION__.test = [5 x i8] c"test\00"
define i32 @test(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.test, i64 0, i64 0))
%8 = load i32*, i32** %2
store i32 1024, i32* %8
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"The t is: %d in %s.\0A\00"
@__FUNCTION__.test = [5 x i8] c"test\00"
define i32 @test(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.test, i64 0, i64 0))
store i32 1024, i32* %0
ret i32 0
}
int ft_strln(int n) {
  int i;
  int size;
  i = 1;
  size = 0;
  if (n == -2147483648) {
    size = 11;
    return (size);
  }
  if (n < 0) {
    size = 1;
    n = n * -1;
  }
  while (n >= i) {
    size++;
    i = i * 10;
  }
  return (size);
}


x86 assembly (clang, -O0):
<ft_strln>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0xffffffff80000000,%rax
jne    1137 <ft_strln+0x37>
movl   $0xb,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <ft_strln+0x7b>
cmpl   $0x0,-0x8(%rbp)
jge    114f <ft_strln+0x4f>
movl   $0x1,-0x10(%rbp)
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <ft_strln+0x54>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1175 <ft_strln+0x75>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <ft_strln+0x54>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strln>:
mov    $0xb,%eax
cmp    $0x80000000,%edi
je     112c <ft_strln+0x2c>
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
jae    112d <ft_strln+0x2d>
shr    $0x1f,%edi
mov    $0x1,%edx
mov    %edi,%eax
add    $0x1,%eax
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
cmp    %edx,%ecx
jae    1120 <ft_strln+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_strln(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = icmp eq i64 %7, -2147483648
br i1 %8, label %9, label %11
9: ; preds = %1
store i32 11, i32* %5
%10 = load i32, i32* %5
store i32 %10, i32* %2
br label %29
11: ; preds = %1
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
store i32 1, i32* %5
%15 = load i32, i32* %3
%16 = mul nsw i32 %15, -1
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %11
br label %18
18: ; preds = %22, %17
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = icmp sge i32 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
%25 = load i32, i32* %4
%26 = mul nsw i32 %25, 10
store i32 %26, i32* %4
br label %18
27: ; preds = %18
%28 = load i32, i32* %5
store i32 %28, i32* %2
br label %29
29: ; preds = %27, %9
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @ft_strln(i32 %0) {
%2 = icmp eq i32 %0, -2147483648
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = icmp eq i32 %0, 0
br i1 %5, label %14, label %6
6: ; preds = %3
%7 = lshr i32 %0, 31
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %11, %8 ], [ %7, %6 ]
%10 = phi i32 [ %12, %8 ], [ 1, %6 ]
%11 = add nuw nsw i32 %9, 1
%12 = mul nsw i32 %10, 10
%13 = icmp ult i32 %4, %12
br i1 %13, label %14, label %8
14: ; preds = %8, %3, %1
%15 = phi i32 [ 11, %1 ], [ 0, %3 ], [ %11, %8 ]
ret i32 %15
}
int ccio_noconv_destroy(void *noconv) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ccio_noconv_destroy(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_motion_unmask_y(void) {
  char int_ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1F, &int_ctrl_reg2, 1) == 0) {
    int_ctrl_reg2 &= ~0x40;
    KIONIX_ACCEL_write_byte(0x1F, int_ctrl_reg2);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_motion_unmask_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1f,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116d <KIONIX_ACCEL_motion_unmask_y+0x4d>
movsbl -0x1(%rbp),%eax
and    $0xffffffbf,%eax
mov    %al,-0x1(%rbp)
mov    $0x1f,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1174 <KIONIX_ACCEL_motion_unmask_y+0x54>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_motion_unmask_y>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1f,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_motion_unmask_y+0x41>
movsbl 0xf(%rsp),%esi
and    $0xffffffbf,%esi
mov    %sil,0xf(%rsp)
mov    $0x1f,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_motion_unmask_y() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 31, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = and i32 %7, -65
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 31, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_motion_unmask_y() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 31, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = and i8 %5, -65
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 31, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
char *get_cwd(char *path, int maxlen) {
  getcwd(path, maxlen);
  ;
  return path;
}


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

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

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

LLVM IR (-O2):
define i8* @get_cwd(i8* returned %0, i32 %1) {
%3 = tail call i32 @getcwd(i8* %0, i32 %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ dpop();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ to_fixnum(int /*<<< orphan*/);
void primitive_exit(void) { exit(to_fixnum(dpop())); }


x86 assembly (clang, -O0):
<primitive_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <to_fixnum@plt>
mov    %eax,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<primitive_exit>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1040 <to_fixnum@plt>
mov    %eax,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @primitive_exit() {
%1 = call i32 (...) @dpop()
%2 = call i32 @to_fixnum(i32 %1)
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
define void @primitive_exit() {
%1 = tail call i32 (...) @dpop()
%2 = tail call i32 @to_fixnum(i32 %1)
%3 = tail call i32 @exit(i32 %2)
unreachable
}
adrx0reg1_set(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (((char *)10000000)[x0]) = r1; }


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

x86 assembly (clang, -O2):
<adrx0reg1_set>:
movslq %edx,%rax
mov    %sil,0x989680(%rax)
ret

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

LLVM IR (-O2):
define i32 @adrx0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = trunc i32 %1 to i8
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* inttoptr (i64 10000000 to i8*), i64 %8
store i8 %7, i8* %9
ret i32 undef
}
void DrawVolumeAsIsosurface(void) {}


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

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

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

LLVM IR (-O2):
define void @DrawVolumeAsIsosurface() {
ret void
}
void callMe2() {
  const int foo = 2;
  const int bar = 3;
  (void)foo;
  (void)bar;
  *((volatile int *)0) = 0xdead;
}


x86 assembly (clang, -O0):
<callMe2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
xor    %eax,%eax
movl   $0xdead,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<callMe2>:
movl   $0xdead,0x0
ret

LLVM IR (-O0):
define void @callMe2() {
%1 = alloca i32
%2 = alloca i32
store i32 2, i32* %1
store i32 3, i32* %2
store volatile i32 57005, i32* null
ret void
}

LLVM IR (-O2):
define void @callMe2() {
store volatile i32 57005, i32* null
ret void
}
float celsius2fahrenheit(float celsius) { return celsius * 9 / 5 + 32; }


x86 assembly (clang, -O0):
<celsius2fahrenheit>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee6(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xed6(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsius2fahrenheit>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
addss  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @celsius2fahrenheit(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 9.000000e+00
%5 = fdiv float %4, 5.000000e+00
%6 = fadd float %5, 3.200000e+01
ret float %6
}

LLVM IR (-O2):
define float @celsius2fahrenheit(float %0) {
%2 = fmul float %0, 9.000000e+00
%3 = fdiv float %2, 5.000000e+00
%4 = fadd float %3, 3.200000e+01
ret float %4
}
/* Variables and functions */
double modf(double, double *);
int /*<<< orphan*/ printf(char *, double, double);
int main(int argc, const char *argv[]) {
  double pi = 3.14;
  double integerPart;
  double fractionPart;
  fractionPart = modf(pi, &integerPart);
  printf("integerPart = %.0f, fractionPart = %.2f\n", integerPart,
         fractionPart);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
call   1040 <modf@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    %rsp,%rdi
call   1040 <modf@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"integerPart = %.0f, fractionPart = %.2f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 3.140000e+00, double* %6
%9 = load double, double* %6
%10 = call double @modf(double %9, double* %7)
store double %10, double* %8
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), double %11, double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"integerPart = %.0f, fractionPart = %.2f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call double @modf(double 3.140000e+00, double* %3)
%6 = load double, double* %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), double %6, double %5)
ret i32 0
}
int check_wakeup_irqs(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_wakeup_irqs() {
ret i32 0
}
void XcmsCIELuvToCIEuvY() {}


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

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

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

LLVM IR (-O2):
define void @XcmsCIELuvToCIEuvY() {
ret void
}
int sm_request_login(const char *text, char *login, char *password, int len) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sm_request_login(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rte_arch_bswap32(uint32_t _x) {
  return (_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) |
         ((_x << 24) & 0xff000000);
}


x86 assembly (clang, -O0):
<rte_arch_bswap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_arch_bswap32>:
mov    %edi,%eax
sar    $0x18,%eax
mov    %edi,%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
mov    %edi,%edx
shl    $0x8,%edx
and    $0xff0000,%edx
shl    $0x18,%edi
or     %edi,%eax
or     %ecx,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @rte_arch_bswap32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 24
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = and i32 %6, 65280
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = shl i32 %9, 8
%11 = and i32 %10, 16711680
%12 = or i32 %8, %11
%13 = load i32, i32* %2
%14 = shl i32 %13, 24
%15 = and i32 %14, -16777216
%16 = or i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @rte_arch_bswap32(i32 %0) {
%2 = ashr i32 %0, 24
%3 = lshr i32 %0, 8
%4 = and i32 %3, 65280
%5 = shl i32 %0, 8
%6 = and i32 %5, 16711680
%7 = shl i32 %0, 24
%8 = or i32 %7, %2
%9 = or i32 %8, %4
%10 = or i32 %9, %6
ret i32 %10
}
long gcd(long a, long b) {
  if (a == 0) {
    return b;
  } else {
    return gcd(b % a, a);
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <gcd+0x28>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <gcd+0x42>
mov    -0x18(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %rsi,%rax
test   %rdi,%rdi
je     1135 <gcd+0x35>
mov    %rdi,%rdx
jmp    111d <gcd+0x1d>
nopl   (%rax)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <gcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <gcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <gcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @gcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %1, %2 ]
%6 = phi i64 [ %7, %4 ], [ %0, %2 ]
%7 = srem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %1, %2 ], [ %6, %4 ]
ret i64 %10
}
int slen(char s[]) {
  int n = 0;
  while (s[n] != 0)
    n++;
  return n;
}


x86 assembly (clang, -O0):
<slen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <slen+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <slen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <slen+0x10>
ret

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

LLVM IR (-O2):
define i32 @slen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
__attribute__((visibility("default"))) unsigned long long int
udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.udev_queue = type opaque
define i64 @udev_queue_get_udev_seqnum(%struct.udev_queue* %0) {
%2 = alloca %struct.udev_queue*
store %struct.udev_queue* %0, %struct.udev_queue** %2
ret i64 0
}

LLVM IR (-O2):
%struct.udev_queue = type opaque
define i64 @udev_queue_get_udev_seqnum(%struct.udev_queue* nocapture readnone %0) {
ret i64 0
}
int test_imm_AAint8_reg(signed char val) {
  return ((val) & (-0xAA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AAint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff56,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_AAint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -170
%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_AAint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -170
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ calEma(double const *, int const, int const, double *);
void calEXPMEMA(const double dataX[], const int countX, const int N,
                const double smooth, double expmema[]) {
  expmema[0] = smooth;
  calEma(dataX, countX, N, expmema);
}


x86 assembly (clang, -O0):
<calEXPMEMA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <calEma@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calEXPMEMA>:
movsd  %xmm0,(%rcx)
jmp    1030 <calEma@plt>

LLVM IR (-O0):
define void @calEXPMEMA(double* %0, i32 %1, i32 %2, double %3, double* %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double*
store double* %0, double** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double %3, double* %9
store double* %4, double** %10
%11 = load double, double* %9
%12 = load double*, double** %10
%13 = getelementptr inbounds double, double* %12, i64 0
store double %11, double* %13
%14 = load double*, double** %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = load double*, double** %10
%18 = call i32 @calEma(double* %14, i32 %15, i32 %16, double* %17)
ret void
}

LLVM IR (-O2):
define void @calEXPMEMA(double* %0, i32 %1, i32 %2, double %3, double* %4) {
store double %3, double* %4
%6 = tail call i32 @calEma(double* %0, i32 %1, i32 %2, double* %4)
ret void
}
void INT_Excep_TPU3_TGI3B(void) {}


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

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

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

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

/* Variables and functions */
int32_t tms_fetch_iddata(int32_t fd, uint8_t *msg, int32_t n) { return 0; }


x86 assembly (clang, -O0):
<tms_fetch_iddata>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @tms_fetch_iddata(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 0
}

LLVM IR (-O2):
define i32 @tms_fetch_iddata(i32 %0, i32* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
unsigned long long gcd(unsigned long, unsigned long);
unsigned long lcm(unsigned long n, unsigned long m) {
  return ((unsigned long long)n * m / gcd(n, m));
}


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <gcd@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %edx,%edx
div    %rcx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbx
mov    %rsi,%rbx
imul   %rdi,%rbx
call   1030 <gcd@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     1133 <lcm+0x23>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i64 @lcm(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul i64 %5, %6
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = call i64 @gcd(i64 %8, i64 %9)
%11 = udiv i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @lcm(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i64 @gcd(i64 %0, i64 %1)
%5 = udiv i64 %3, %4
ret i64 %5
}
int lm_hosts_dlm(struct lockspace *ls, int notify) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.lockspace = type opaque
define i32 @lm_hosts_dlm(%struct.lockspace* nocapture readnone %0, i32 %1) {
ret i32 0
}
void foo_1_2_2_2_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_1_1_2_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
void *malloc(size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *xmalloc(size_t len) {
  void *p;
  if (!(p = malloc(len)))
    die("malloc: %s\n", strerror(errno));
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    116f <xmalloc+0x3f>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115a <xmalloc+0x2a>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"malloc: %s\0A\00"
@errno = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @strerror(i32 %5)
%7 = tail call i32 @die(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ gettext(char *);
void print_usage(FILE *stream) {
  fputs(
      gettext(
          "Usage: yptest [-q] [-d domain] [-h hostname] [-m map] [-u user]\n"),
      stream);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <gettext@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Usage: yptest [-q] [-d domain] [-h hostname] [-m map] [-u user]\0A\00"
define void @print_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @gettext(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%4 = load i32*, i32** %2
%5 = call i32 @fputs(i32 %3, i32* %4)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"Usage: yptest [-q] [-d domain] [-h hostname] [-m map] [-u user]\0A\00"
define void @print_usage(i32* %0) {
%2 = tail call i32 @gettext(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @fputs(i32 %2, i32* %0)
ret void
}
main() {
  int f();
  int x[2];
  q(&f);
  q(&x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rdi
mov    $0x0,%al
call   1030 <q@plt>
lea    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <q@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rdi
xor    %eax,%eax
call   1030 <q@plt>
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <q@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = call i32 (i32 (...)*, ...) bitcast (i32 (...)* @q to i32 (i32 (...)*, ...)*)(i32 (...)* @f)
%3 = call i32 ([2 x i32]*, ...) bitcast (i32 (...)* @q to i32 ([2 x i32]*, ...)*)([2 x i32]* %1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = tail call i32 (i32 (...)*, ...) bitcast (i32 (...)* @q to i32 (i32 (...)*, ...)*)(i32 (...)* @f)
%4 = call i32 ([2 x i32]*, ...) bitcast (i32 (...)* @q to i32 ([2 x i32]*, ...)*)([2 x i32]* %1)
ret i32 0
}
void gtk_cell_editable_remove_widget() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int fputc(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int escribir(FILE *fp, int *seek, int c) {
  fseek(fp, *seek, SEEK_SET);
  int out = fputc(c, fp);
  *seek = ftell(fp);
  return out;
}


x86 assembly (clang, -O0):
<escribir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    0x2e8c(%rip),%rax
mov    (%rax),%edx
call   1050 <fseek@plt>
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fputc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escribir>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    (%rsi),%esi
mov    0x2e9a(%rip),%rax
mov    (%rax),%edx
call   1050 <fseek@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
call   1030 <fputc@plt>
mov    %eax,%r14d
mov    %rbp,%rdi
call   1040 <ftell@plt>
mov    %eax,(%rbx)
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @escribir(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32, i32* @SEEK_SET
%12 = call i32 @fseek(i32* %8, i32 %10, i32 %11)
%13 = load i32, i32* %6
%14 = load i32*, i32** %4
%15 = call i32 @fputc(i32 %13, i32* %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = call i32 @ftell(i32* %16)
%18 = load i32*, i32** %5
store i32 %17, i32* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @escribir(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i32 %4, i32 %5)
%7 = tail call i32 @fputc(i32 %2, i32* %0)
%8 = tail call i32 @ftell(i32* %0)
store i32 %8, i32* %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ PWM3_FAULT_DriverIRQHandler();
__attribute__((weak)) void PWM3_FAULT_IRQHandler(void) {
  PWM3_FAULT_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @PWM3_FAULT_IRQHandler() {
%1 = call i32 (...) @PWM3_FAULT_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @PWM3_FAULT_IRQHandler() {
%1 = tail call i32 (...) @PWM3_FAULT_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void genksyms_usage(void) {
  fputs(
      "Usage:\n"
      "genksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\n"
      "\n"
      "  -a                    Select architecture\n"
      "  -d                    Increment the debug level (repeatable)\n"
      "  -D                    Dump expanded symbol defs (for debugging only)\n"
      "  -T file               Dump expanded types into file (for debugging "
      "only)\n"
      "  -w                    Enable warnings\n"
      "  -q                    Disable warnings (default)\n"
      "  -h                    Print this message\n"
      "  -V                    Print the release version\n",
      stderr);
}


x86 assembly (clang, -O0):
<genksyms_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<genksyms_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [491 x i8] c"Usage:\0Agenksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\0A\0A -a Select architecture\0A -d Increment the debug level (repeatable)\0A -D Dump expanded symbol defs (for debugging only)\0A -T file Dump expanded types into file (for debugging only)\0A -w Enable warnings\0A -q Disable warnings (default)\0A -h Print this message\0A -V Print the release version\0A\00"
@stderr = global i32 0
define void @genksyms_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([491 x i8], [491 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [491 x i8] c"Usage:\0Agenksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\0A\0A -a Select architecture\0A -d Increment the debug level (repeatable)\0A -D Dump expanded symbol defs (for debugging only)\0A -T file Dump expanded types into file (for debugging only)\0A -w Enable warnings\0A -q Disable warnings (default)\0A -h Print this message\0A -V Print the release version\0A\00"
@stderr = global i32 0
define void @genksyms_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([491 x i8], [491 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
short h_abs(short *);
short intr_wrap_101(short p1) { return h_abs(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_101>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
call   1030 <h_abs@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_101>:
push   %rax
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
call   1030 <h_abs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_101(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call signext i16 @h_abs(i16* %2)
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @intr_wrap_101(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = call signext i16 @h_abs(i16* %2)
ret i16 %3
}