xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
void set_XButtonPressedEvent_serial(void *_p, unsigned long _v) {
  ((XButtonPressedEvent *)_p)->serial = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XButtonPressedEvent_serial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XButtonPressedEvent_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XButtonPressedEvent_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XButtonPressedEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int atomic_int_get_gcc(volatile int *ptr) {
  __sync_synchronize();
  return *ptr;
}


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

x86 assembly (clang, -O2):
<atomic_int_get_gcc>:
mfence
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @atomic_int_get_gcc(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
fence seq_cst
%3 = load i32*, i32** %2
%4 = load volatile i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @atomic_int_get_gcc(i32* %0) {
fence seq_cst
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int);
void scanfArg() {
  int t = 0;
  scanf("%d", t);
}


x86 assembly (clang, -O0):
<scanfArg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <scanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scanfArg>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <scanf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @scanfArg() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
unsigned long clockticks_in_msec(unsigned long b, unsigned long a) {
  return (b - a) / 4096000UL;
}


x86 assembly (clang, -O0):
<clockticks_in_msec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    $0x3e8000,%ecx
xor    %edx,%edx
div    %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<clockticks_in_msec>:
mov    %rdi,%rax
sub    %rsi,%rax
shr    $0xf,%rax
movabs $0x20c49ba5e353f7d,%rcx
49 0c 02
mul    %rcx
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @clockticks_in_msec(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 = sub i64 %5, %6
%8 = udiv i64 %7, 4096000
ret i64 %8
}

LLVM IR (-O2):
define i64 @clockticks_in_msec(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = udiv i64 %3, 4096000
ret i64 %4
}
_Bool isOdd(int n) { return n & 1; }


x86 assembly (clang, -O0):
<isOdd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOdd>:
mov    %edi,%eax
and    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i1 @isOdd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
ret i1 %5
}

LLVM IR (-O2):
define zeroext i1 @isOdd(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp ne i32 %2, 0
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ disp_filter_vec(char const *);
int /*<<< orphan*/ disp_vec(char const *);
int /*<<< orphan*/ printf(char *);
void spec_usage(const char *vec) {
  printf("\n");
  disp_vec(vec);
  disp_filter_vec(vec);
  printf("\n");
}


x86 assembly (clang, -O0):
<spec_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <disp_vec@plt>
mov    -0x8(%rbp),%rdi
call   1040 <disp_filter_vec@plt>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spec_usage>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1050 <disp_vec@plt>
mov    %rbx,%rdi
call   1040 <disp_filter_vec@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @spec_usage(i8* %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @disp_vec(i8* %0)
%4 = tail call i32 @disp_filter_vec(i8* %0)
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct xdg_surface {
  int dummy;
};
struct wl_seat {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, struct wl_seat *,
                                    int /*<<< orphan*/);
void xdg_surface_move(struct xdg_surface *xdg_surface, struct wl_seat *seat,
                      uint32_t serial) {
  wl_proxy_marshal((struct wl_proxy *)xdg_surface, 5, seat, serial);
}


x86 assembly (clang, -O0):
<xdg_surface_move>:
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),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x5,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdg_surface_move>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x5,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.xdg_surface = type { i32 }
%struct.wl_seat = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_move(%struct.xdg_surface* %0, %struct.wl_seat* %1, i32 %2) {
%4 = alloca %struct.xdg_surface*
%5 = alloca %struct.wl_seat*
%6 = alloca i32
store %struct.xdg_surface* %0, %struct.xdg_surface** %4
store %struct.wl_seat* %1, %struct.wl_seat** %5
store i32 %2, i32* %6
%7 = load %struct.xdg_surface*, %struct.xdg_surface** %4
%8 = bitcast %struct.xdg_surface* %7 to %struct.wl_proxy*
%9 = load %struct.wl_seat*, %struct.wl_seat** %5
%10 = load i32, i32* %6
%11 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %8, i32 5, %struct.wl_seat* %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.xdg_surface = type { i32 }
%struct.wl_seat = type { i32 }
%struct.wl_proxy = type { i32 }
define void @xdg_surface_move(%struct.xdg_surface* %0, %struct.wl_seat* %1, i32 %2) {
%4 = bitcast %struct.xdg_surface* %0 to %struct.wl_proxy*
%5 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 5, %struct.wl_seat* %1, i32 %2)
ret void
}
void WriteFence() { asm volatile("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @WriteFence() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
float Q_rsqrt(float number) {
  long i;
  float x2, y;
  const float threehalfs = 1.5F;
  x2 = number * 0.5F;
  y = number;
  i = *(long *)&y;
  i = 0x5f3759df - (i >> 1);
  y = *(float *)&i;
  y = y * (threehalfs - (x2 * y * y));
  return y;
}


x86 assembly (clang, -O0):
<Q_rsqrt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xee6(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
sar    $0x1,%rcx
mov    $0x5f3759df,%eax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
movss  0xe7b(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @Q_rsqrt(float %0) {
%2 = alloca float
%3 = alloca i64
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %2
store float 1.500000e+00, float* %6
%7 = load float, float* %2
%8 = fmul float %7, 5.000000e-01
store float %8, float* %4
%9 = load float, float* %2
store float %9, float* %5
%10 = bitcast float* %5 to i64*
%11 = load i64, i64* %10
store i64 %11, i64* %3
%12 = load i64, i64* %3
%13 = ashr i64 %12, 1
%14 = sub nsw i64 1597463007, %13
store i64 %14, i64* %3
%15 = bitcast i64* %3 to float*
%16 = load float, float* %15
store float %16, float* %5
%17 = load float, float* %5
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fmul float %18, %19
%21 = load float, float* %5
%22 = fneg float %20
%23 = call float @llvm.fmuladd.f32(float %22, float %21, float 1.500000e+00)
%24 = fmul float %17, %23
store float %24, float* %5
%25 = load float, float* %5
ret float %25
}

LLVM IR (-O2):
define float @Q_rsqrt(float %0) {
ret float poison
}
int expect_char_sum(char (*f)(char, char)) { return f('a', 3) == 'd'; }


x86 assembly (clang, -O0):
<expect_char_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x61,%edi
mov    $0x3,%esi
call   *-0x8(%rbp)
movsbl %al,%eax
cmp    $0x64,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_char_sum>:
push   %rax
mov    %rdi,%rax
mov    $0x61,%edi
mov    $0x3,%esi
call   *%rax
xor    %ecx,%ecx
cmp    $0x64,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @expect_char_sum(i8 (i8, i8)* %0) {
%2 = alloca i8 (i8, i8)*
store i8 (i8, i8)* %0, i8 (i8, i8)** %2
%3 = load i8 (i8, i8)*, i8 (i8, i8)** %2
%4 = call signext i8 %3(i8 signext 97, i8 signext 3)
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 100
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @expect_char_sum(i8 (i8, i8)* nocapture %0) {
%2 = tail call signext i8 %0(i8 signext 97, i8 signext 3)
%3 = icmp eq i8 %2, 100
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uintmax_t;

/* Variables and functions */
int get_width(uintmax_t size) {
  int width;
  width = 8;
  for (size >>= 32; size != 0; size >>= 8)
    width += 2;
  return width;
}


x86 assembly (clang, -O0):
<get_width>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113c <get_width+0x3c>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <get_width+0x1b>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_width(i32 %0) {
ret i32 10
}
/* Variables and functions */
char *PHYSFS_getUserDir();
int /*<<< orphan*/ printf(char *, char *);
int cmd_getuserdir(char *args) {
  printf("User dir is [%s].\n", PHYSFS_getUserDir());
  return (1);
}


x86 assembly (clang, -O0):
<cmd_getuserdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <PHYSFS_getUserDir@plt>
mov    %rax,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_getuserdir>:
push   %rax
xor    %eax,%eax
call   1040 <PHYSFS_getUserDir@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"User dir is [%s].\0A\00"
define i32 @cmd_getuserdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* (...) @PHYSFS_getUserDir()
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [19 x i8] c"User dir is [%s].\0A\00"
define i32 @cmd_getuserdir(i8* nocapture readnone %0) {
%2 = tail call i8* (...) @PHYSFS_getUserDir()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 1
}
/* Variables and functions */
int strcmp(char const *, char const *);
int str_hash_cmp(const void *x, const void *y) {
  do {
    return (((const char *)x)) == (((const char *)y))
               ? 0
               : strcmp((((const char *)x)), (((const char *)y)));
  } while (0);
}


x86 assembly (clang, -O0):
<str_hash_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1138 <str_hash_cmp+0x28>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1148 <str_hash_cmp+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_hash_cmp>:
cmp    %rsi,%rdi
je     111a <str_hash_cmp+0xa>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @str_hash_cmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %6
6: ; preds = %4, %2
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ r();
void warn_unlock2(void) {
  a();
  r();
  r();
}


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

x86 assembly (clang, -O2):
<warn_unlock2>:
push   %rax
xor    %eax,%eax
call   1040 <a@plt>
xor    %eax,%eax
call   1030 <r@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <r@plt>

LLVM IR (-O0):
define void @warn_unlock2() {
%1 = call i32 (...) @a()
%2 = call i32 (...) @r()
%3 = call i32 (...) @r()
ret void
}

LLVM IR (-O2):
define void @warn_unlock2() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @r()
%3 = tail call i32 (...) @r()
ret void
}
int kgsl_yamato_debugfs_init(struct kgsl_device *device) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.kgsl_device = type opaque
define i32 @kgsl_yamato_debugfs_init(%struct.kgsl_device* nocapture readnone %0) {
ret i32 0
}
void vexpress_spc_wfi_cluster_reset(int cluster, int enable) {}


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

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

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

LLVM IR (-O2):
define void @vexpress_spc_wfi_cluster_reset(i32 %0, i32 %1) {
ret void
}
long *IncomePlus(long *pPay) {
  long pay = 0;
  pay = *pPay + 10000L;
  return &pay;
}


x86 assembly (clang, -O0):
<IncomePlus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x2710,%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IncomePlus>:
lea    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64* @IncomePlus(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
store i64* %0, i64** %2
store i64 0, i64* %3
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = add nsw i64 %5, 10000
store i64 %6, i64* %3
ret i64* %3
}

LLVM IR (-O2):
define noalias i64* @IncomePlus(i64* nocapture %0) {
%2 = alloca i64
ret i64* %2
}
int test_imm_0Dint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x0D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Dint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xd,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_0Dint64_midword_mem>:
testb  $0xd,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_0Dint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 851968
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *cmd) {
  fprintf(stderr, "Usage: \t%s \"A test string as argument\"\n", cmd);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [40 x i8] c"Usage: \09%s \22A test string as argument\22\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [40 x i8] c"Usage: \09%s \22A test string as argument\22\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int rel(uint16_t pc, const uint8_t *ram, char *buffer) {
  int8_t delta = *ram;
  sprintf(buffer, "%04x", pc + 2 + delta);
  return 1;
}


x86 assembly (clang, -O0):
<rel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
add    $0x2,%edx
add    -0x1c(%rbp),%edx
lea    0xec0(%rip),%rsi
call   1030 <sprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rel>:
push   %rax
mov    %rdx,%rax
mov    (%rsi),%ecx
lea    (%rdi,%rcx,1),%edx
add    $0x2,%edx
lea    0xedd(%rip),%rsi
mov    %rax,%rdi
call   1030 <sprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%04x\00"
define i32 @rel(i32 %0, i32* nocapture %1, i8* nocapture writeonly %2) {
%4 = load i32, i32* %1
%5 = add nsw i32 %0, 2
%6 = add nsw i32 %5, %4
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void abort(void) { raise(SIGABRT); }


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>

LLVM IR (-O0):
@SIGABRT = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = call i32 @raise(i32 %1)
unreachable
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i32 @raise(i32 %1)
unreachable
}
/* Variables and functions */
scalar_t__ stringEq(char *, char *);
int parseSyntaxFamilyByExtension(char *extension) {
  if (stringEq(extension, "rb")) {
    return 1;
  } else if (stringEq(extension, "go")) {
    return 3;
  } else {
    return 4;
  }
}


x86 assembly (clang, -O0):
<parseSyntaxFamilyByExtension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <stringEq@plt>
cmp    $0x0,%rax
je     1142 <parseSyntaxFamilyByExtension+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <parseSyntaxFamilyByExtension+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <stringEq@plt>
cmp    $0x0,%rax
je     1168 <parseSyntaxFamilyByExtension+0x58>
movl   $0x3,-0x4(%rbp)
jmp    116f <parseSyntaxFamilyByExtension+0x5f>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parseSyntaxFamilyByExtension>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <stringEq@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <parseSyntaxFamilyByExtension+0x1f>
pop    %rbx
ret
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <stringEq@plt>
cmp    $0x1,%rax
mov    $0x3,%eax
adc    $0x0,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@.str.1 = [3 x i8] c"go\00"
define i32 @parseSyntaxFamilyByExtension(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @stringEq(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @stringEq(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 3, i32* %2
br label %14
13: ; preds = %8
store i32 4, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@.str.1 = [3 x i8] c"go\00"
define i32 @parseSyntaxFamilyByExtension(i8* %0) {
%2 = tail call i64 @stringEq(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @stringEq(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 4, i32 3
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ inbuf;

/* Variables and functions */
int /*<<< orphan*/ msg_read_string(char *, int);
int strtol(char *, char **, int);
int msg_read_int() {
  char *end;
  char inbuf[32];
  msg_read_string(inbuf, sizeof(inbuf));
  return strtol(inbuf, &end, 10);
}


x86 assembly (clang, -O0):
<msg_read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
call   1030 <msg_read_string@plt>
lea    -0x30(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_read_int>:
push   %rbx
sub    $0x30,%rsp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <msg_read_string@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strtol@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @msg_read_int() {
%1 = alloca i8*
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @msg_read_string(i8* %3, i32 32)
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%6 = call i32 @strtol(i8* %5, i8** %1, i32 10)
ret i32 %6
}

LLVM IR (-O2):
define i32 @msg_read_int() {
%1 = alloca i8*
%2 = alloca [32 x i8]
%3 = bitcast i8** %1 to i8*
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%5 = call i32 @msg_read_string(i8* %4, i32 32)
%6 = call i32 @strtol(i8* %4, i8** %1, i32 10)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ permutation(char *, int /*<<< orphan*/, scalar_t__);
scalar_t__ strlen(char *);
int main() {
  char str[] = "abc";
  permutation(str, 0, strlen(str) - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1040 <permutation@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x636261,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <permutation@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [4 x i8] c"abc\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
store i32 0, i32* %1
%3 = bitcast [4 x i8]* %2 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%6 = call i64 @strlen(i8* %5)
%7 = sub nsw i64 %6, 1
%8 = call i32 @permutation(i8* %4, i32 0, i64 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6513249, i32* %1
%3 = call i64 @strlen(i8* %2)
%4 = add nsw i64 %3, -1
%5 = call i32 @permutation(i8* %2, i32 0, i64 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ opt;

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IPV6;
int /*<<< orphan*/ IPV6_V6ONLY;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int *, int);
int main(int argc, char **argv) {
  int sock = 0, opt = 1;
  setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    0x2eb7(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
xor    %edi,%edi
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPPROTO_IPV6 = global i32 0
@IPV6_V6ONLY = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* @IPPROTO_IPV6
%10 = load i32, i32* @IPV6_V6ONLY
%11 = call i32 @setsockopt(i32 %8, i32 %9, i32 %10, i32* %7, i32 4)
ret i32 0
}

LLVM IR (-O2):
@IPPROTO_IPV6 = global i32 0
@IPV6_V6ONLY = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 1, i32* %3
%5 = load i32, i32* @IPPROTO_IPV6
%6 = load i32, i32* @IPV6_V6ONLY
%7 = call i32 @setsockopt(i32 0, i32 %5, i32 %6, i32* %3, i32 4)
ret i32 0
}
/* Type definitions */
struct S_ELEMENT {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ constructors_ops(struct S_ELEMENT *const);
void constructors_ELEMENT(struct S_ELEMENT *const ELEMENT) {
  constructors_ops(ELEMENT);
}


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

x86 assembly (clang, -O2):
<constructors_ELEMENT>:
jmp    1030 <constructors_ops@plt>

LLVM IR (-O0):
%struct.S_ELEMENT = type { i32 }
define void @constructors_ELEMENT(%struct.S_ELEMENT* %0) {
%2 = alloca %struct.S_ELEMENT*
store %struct.S_ELEMENT* %0, %struct.S_ELEMENT** %2
%3 = load %struct.S_ELEMENT*, %struct.S_ELEMENT** %2
%4 = call i32 @constructors_ops(%struct.S_ELEMENT* %3)
ret void
}

LLVM IR (-O2):
%struct.S_ELEMENT = type { i32 }
define void @constructors_ELEMENT(%struct.S_ELEMENT* %0) {
%2 = tail call i32 @constructors_ops(%struct.S_ELEMENT* %0)
ret void
}
void terminate_sequence() {}


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

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

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

LLVM IR (-O2):
define void @terminate_sequence() {
ret void
}
/* Variables and functions */
int MPI_Init(int *, char ***);
int /*<<< orphan*/ PyMPI_MPICH1_FixArgs(int **, char ****);
int PyMPI_MPICH1_MPI_Init(int *argc, char ***argv) {
  PyMPI_MPICH1_FixArgs(&argc, &argv);
  return MPI_Init(argc, argv);
}


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

x86 assembly (clang, -O2):
<PyMPI_MPICH1_MPI_Init>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <PyMPI_MPICH1_FixArgs@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1030 <MPI_Init@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @PyMPI_MPICH1_MPI_Init(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%5 = call i32 @PyMPI_MPICH1_FixArgs(i32** %3, i8**** %4)
%6 = load i32*, i32** %3
%7 = load i8***, i8**** %4
%8 = call i32 @MPI_Init(i32* %6, i8*** %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ scanline_t32cb16blend_test();
int main() {
  scanline_t32cb16blend_test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @scanline_t32cb16blend_test()
ret i32 0
}
/* Type definitions */
union i2c_smbus_data {
  int word;
};
typedef int /*<<< orphan*/ __u8;
typedef int __s32;

/* Variables and functions */
scalar_t__ i2c_smbus_access(int, int, int /*<<< orphan*/, int,
                            union i2c_smbus_data *);
__s32 i2c_smbus_read_word_data(int file, __u8 command) {
  union i2c_smbus_data data;
  if (i2c_smbus_access(file, 1, command, 3, &data))
    return -1;
  else
    return 0x0FFFF & data.word;
}


x86 assembly (clang, -O0):
<i2c_smbus_read_word_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
mov    $0x3,%ecx
lea    -0x10(%rbp),%r8
call   1030 <i2c_smbus_access@plt>
cmp    $0x0,%rax
je     114d <i2c_smbus_read_word_data+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <i2c_smbus_read_word_data+0x48>
mov    -0x10(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_read_word_data>:
push   %rax
mov    %esi,%edx
mov    %rsp,%r8
mov    $0x1,%esi
mov    $0x3,%ecx
call   1030 <i2c_smbus_access@plt>
movzwl (%rsp),%ecx
neg    %rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_read_word_data(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %union.i2c_smbus_data
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i64 @i2c_smbus_access(i32 %7, i32 1, i32 %8, i32 3, %union.i2c_smbus_data* %6)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %16
12: ; preds = %2
%13 = bitcast %union.i2c_smbus_data* %6 to i32*
%14 = load i32, i32* %13
%15 = and i32 65535, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%union.i2c_smbus_data = type { i32 }
define i32 @i2c_smbus_read_word_data(i32 %0, i32 %1) {
%3 = alloca %union.i2c_smbus_data
%4 = bitcast %union.i2c_smbus_data* %3 to i8*
%5 = call i64 @i2c_smbus_access(i32 %0, i32 1, i32 %1, i32 3, %union.i2c_smbus_data* %3)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds %union.i2c_smbus_data, %union.i2c_smbus_data* %3, i64 0, i32 0
%8 = load i32, i32* %7
%9 = and i32 %8, 65535
%10 = select i1 %6, i32 %9, i32 -1
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_get_sample_info_by_name() {
  printf("NOT IMPLEMENTED:"
         "pa_context_get_sample_info_by_name"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"NOT IMPLEMENTED:pa_context_get_sample_info_by_name\0A\00"
define i32 @pa_context_get_sample_info_by_name() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [51 x i8] c"NOT IMPLEMENTED:pa_context_get_sample_info_by_name\00"
define i32 @pa_context_get_sample_info_by_name() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void textformat(char *a) { printf("%s", a); }


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

x86 assembly (clang, -O2):
<textformat>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @textformat(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ struct_by_value_22_x();
int main() {
  struct_by_value_22_x();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <struct_by_value_22_x@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <struct_by_value_22_x@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @struct_by_value_22_x()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ release_message(void *);
void free_message_list_handler(void *ptr) { release_message(ptr); }


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

x86 assembly (clang, -O2):
<free_message_list_handler>:
jmp    1030 <release_message@plt>

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

LLVM IR (-O2):
define void @free_message_list_handler(i8* %0) {
%2 = tail call i32 @release_message(i8* %0)
ret void
}
void ff_hevc_put_hevc_uni_w_qpel_h64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h64_10_sse4() {
ret void
}
int IsLittleEndian(void) {
  int TestEndian = 1;
  return *(char *)&TestEndian;
}


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

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

LLVM IR (-O0):
define i32 @IsLittleEndian() {
%1 = alloca i32
store i32 1, i32* %1
%2 = bitcast i32* %1 to i8*
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @IsLittleEndian() {
ret i32 1
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ decodeMessage(struct node *);
struct node *makeTree();
int /*<<< orphan*/ traverseTree(struct node *, int /*<<< orphan*/);
int main() {
  struct node *tree = makeTree();
  traverseTree(tree, 0);
  decodeMessage(tree);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <makeTree@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <traverseTree@plt>
mov    -0x10(%rbp),%rdi
call   1050 <decodeMessage@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <makeTree@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <traverseTree@plt>
mov    %rbx,%rdi
call   1050 <decodeMessage@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
store i32 0, i32* %1
%3 = call %struct.node* (...) @makeTree()
store %struct.node* %3, %struct.node** %2
%4 = load %struct.node*, %struct.node** %2
%5 = call i32 @traverseTree(%struct.node* %4, i32 0)
%6 = load %struct.node*, %struct.node** %2
%7 = call i32 @decodeMessage(%struct.node* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* (...) @makeTree()
%2 = tail call i32 @traverseTree(%struct.node* %1, i32 0)
%3 = tail call i32 @decodeMessage(%struct.node* %1)
ret i32 0
}
int pathcon_nm2_n_in(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathcon_nm2_n_in() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathcon_nm2_n_in() {
ret i32 2
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Bool;

/* Variables and functions */
int /*<<< orphan*/ True;
Bool predicate(Display *display, XEvent *event, char *arg) { return True; }


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

x86 assembly (clang, -O2):
<predicate>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@True = global i32 0
define i32 @predicate(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32, i32* @True
ret i32 %7
}

LLVM IR (-O2):
@True = global i32 0
define i32 @predicate(i32* nocapture readnone %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @True
ret i32 %4
}
int test_imm_27uint8_reg(unsigned char val) {
  return ((val) & (0x27 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_27uint8_reg>:
test   $0x27,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_27uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 39
%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_27uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 39
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void boxmuller_init() { srand(time(NULL)); }


x86 assembly (clang, -O0):
<boxmuller_init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<boxmuller_init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @boxmuller_init() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @boxmuller_init() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char const *, int /*<<< orphan*/);
int read_int(int);
int read_int_value(const char *filename_value) {
  int fd;
  int value;
  fd = open(filename_value, O_RDONLY);
  value = read_int(fd);
  close(fd);
  return value;
}


x86 assembly (clang, -O0):
<read_int_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <read_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int_value>:
push   %rbp
push   %rbx
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <read_int@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <close@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @read_int_value(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load i32, i32* @O_RDONLY
%7 = call i32 @open(i8* %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @read_int(i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @read_int_value(i8* nocapture %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = tail call i32 @read_int(i32 %3)
%5 = tail call i32 @close(i32 %3)
ret i32 %4
}
int device_read(void *file, char *buffer, int length, int *offset) { return 0; }


x86 assembly (clang, -O0):
<device_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @device_read(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32* nocapture readnone %3) {
ret i32 0
}