xunge/DecIR huggingface dataset:
short short_fetch_xor_acq_rel(short *ptr, int value) {
  return __atomic_fetch_xor(ptr, value, 4);
}


x86 assembly (clang, -O0):
<short_fetch_xor_acq_rel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
mov    %cx,-0xe(%rbp)
mov    -0xe(%rbp),%cx
mov    %cx,-0x14(%rbp)
mov    (%rax),%ax
mov    %ax,-0x12(%rbp)
mov    -0x12(%rbp),%ax
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x2c(%rbp)
xor    %esi,%edx
mov    %edx,-0x28(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x22(%rbp)
test   $0x1,%cl
mov    %ax,-0x12(%rbp)
jne    1161 <short_fetch_xor_acq_rel+0x61>
jmp    1129 <short_fetch_xor_acq_rel+0x29>
mov    -0x22(%rbp),%ax
mov    %ax,-0x10(%rbp)
movswl -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<short_fetch_xor_acq_rel>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
xor    %esi,%ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <short_fetch_xor_acq_rel+0x10>
ret

LLVM IR (-O0):
define signext i16 @short_fetch_xor_acq_rel(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
store i16* %0, i16** %3
store i32 %1, i32* %4
%7 = load i16*, i16** %3
%8 = load i32, i32* %4
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i16, i16* %5
%11 = atomicrmw xor i16* %7, i16 %10 acq_rel
store i16 %11, i16* %6
%12 = load i16, i16* %6
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @short_fetch_xor_acq_rel(i16* nocapture %0, i32 %1) {
%3 = trunc i32 %1 to i16
%4 = atomicrmw xor i16* %0, i16 %3 acq_rel
ret i16 %4
}
/* Variables and functions */
int strcmp(char *, char const *);
int str_util_cmp(char *dest, const char *from) {
  if (from == NULL || dest == NULL) {
    return 0;
  }
  return strcmp(dest, from);
}


x86 assembly (clang, -O0):
<str_util_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1136 <str_util_cmp+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    1142 <str_util_cmp+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1152 <str_util_cmp+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_util_cmp>:
test   %rdi,%rdi
je     111f <str_util_cmp+0xf>
test   %rsi,%rsi
je     111f <str_util_cmp+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @str_util_cmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
%4 = icmp eq i8* %0, null
%5 = or i1 %4, %3
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
unsigned int irq_disable();
int /*<<< orphan*/ irq_restore(unsigned int);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void __atomic_store_c(size_t size, void *dest, const void *src, int memorder) {
  (void)memorder;
  unsigned int mask = irq_disable();
  memcpy(dest, src, size);
  irq_restore(mask);
}


x86 assembly (clang, -O0):
<__atomic_store_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <irq_disable@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%edi
call   1050 <irq_restore@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_store_c>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %eax,%eax
call   1030 <irq_disable@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <irq_restore@plt>

LLVM IR (-O0):
define void @__atomic_store_c(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i32, i32* %8
%11 = call i32 (...) @irq_disable()
store i32 %11, i32* %9
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i64, i64* %5
%15 = call i32 @memcpy(i8* %12, i8* %13, i64 %14)
%16 = load i32, i32* %9
%17 = call i32 @irq_restore(i32 %16)
ret void
}

LLVM IR (-O2):
define void @__atomic_store_c(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 (...) @irq_disable()
%6 = tail call i32 @memcpy(i8* %1, i8* %2, i64 %0)
%7 = tail call i32 @irq_restore(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printfArr(int *, int);
int /*<<< orphan*/ zero(int *, int, int);
int main(void) {
  int listOfDigits[10];
  zero(listOfDigits, 10, 11);
  printfArr(listOfDigits, 10);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
mov    $0xb,%edx
call   1040 <zero@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <printfArr@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0xb,%edx
call   1040 <zero@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <printfArr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @zero(i32* %3, i32 10, i32 11)
%5 = call i32 @printfArr(i32* %3, i32 10)
%6 = call i32 @putchar(i32 10)
ret i32 0
}
int test_imm_EAint16_reg(short val) {
  return ((val) & (-0xEA << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_EAint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -234
%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_EAint16_reg(i16 signext %0) {
%2 = and i16 %0, -234
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
float M_PI;
int cos(float);
float inOutSine(float t, float b, float c, float d) {
  return -c / 2 * (cos(M_PI * t / d) - 1) + b;
}


x86 assembly (clang, -O0):
<inOutSine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xeba(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    0x2e92(%rip),%rax
movss  (%rax),%xmm0
mulss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
call   1030 <cos@plt>
movss  -0x14(%rbp),%xmm0
sub    $0x1,%eax
cvtsi2ss %eax,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inOutSine>:
push   %rax
movss  %xmm1,0x4(%rsp)
mulss  0xee1(%rip),%xmm2
movss  %xmm2,(%rsp)
mov    0x2ebd(%rip),%rax
mulss  (%rax),%xmm0
divss  %xmm3,%xmm0
call   1030 <cos@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @inOutSine(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = fneg float %9
%11 = fdiv float %10, 2.000000e+00
%12 = load float, float* @M_PI
%13 = load float, float* %5
%14 = fmul float %12, %13
%15 = load float, float* %8
%16 = fdiv float %14, %15
%17 = call i32 @cos(float %16)
%18 = sub nsw i32 %17, 1
%19 = sitofp i32 %18 to float
%20 = load float, float* %6
%21 = call float @llvm.fmuladd.f32(float %11, float %19, float %20)
ret float %21
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @inOutSine(float %0, float %1, float %2, float %3) {
%5 = fmul float %2, -5.000000e-01
%6 = load float, float* @M_PI
%7 = fmul float %6, %0
%8 = fdiv float %7, %3
%9 = tail call i32 @cos(float %8)
%10 = add nsw i32 %9, -1
%11 = sitofp i32 %10 to float
%12 = tail call float @llvm.fmuladd.f32(float %5, float %11, float %1)
ret float %12
}
char *cnv_set_option(int ddash, char *variable, char *value) {
  return "No options.";
}


x86 assembly (clang, -O0):
<cnv_set_option>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xeea(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"No options.\00"
define i8* @cnv_set_option(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"No options.\00"
define i8* @cnv_set_option(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int __builtin_bfin_ones(int);
int _llcountones(long long a) {
  union {
    long b[2];
    long long bb;
  } v;
  int onecount;
  v.bb = a;
  onecount = __builtin_bfin_ones((int)v.b[0]);
  onecount += __builtin_bfin_ones((int)v.b[1]);
  return onecount;
}


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

x86 assembly (clang, -O2):
<_llcountones>:
push   %rbx
call   1030 <__builtin_bfin_ones@plt>
mov    %eax,%ebx
call   1030 <__builtin_bfin_ones@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%union.anon = type { [2 x i64] }
define i32 @_llcountones(i64 %0) {
%2 = alloca i64
%3 = alloca %union.anon
%4 = alloca i32
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = bitcast %union.anon* %3 to i64*
store i64 %5, i64* %6
%7 = bitcast %union.anon* %3 to [2 x i64]*
%8 = getelementptr inbounds [2 x i64], [2 x i64]* %7, i64 0, i64 0
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = call i32 @__builtin_bfin_ones(i32 %10)
store i32 %11, i32* %4
%12 = bitcast %union.anon* %3 to [2 x i64]*
%13 = getelementptr inbounds [2 x i64], [2 x i64]* %12, i64 0, i64 1
%14 = load i64, i64* %13
%15 = trunc i64 %14 to i32
%16 = call i32 @__builtin_bfin_ones(i32 %15)
%17 = load i32, i32* %4
%18 = add nsw i32 %17, %16
store i32 %18, i32* %4
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @_llcountones(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @__builtin_bfin_ones(i32 %2)
%4 = tail call i32 @__builtin_bfin_ones(i32 undef)
%5 = add nsw i32 %4, %3
ret i32 %5
}
void X509at_delete_attr(void) {}


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

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

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

LLVM IR (-O2):
define void @X509at_delete_attr() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct option_w {
  int dummy;
};
struct _getopt_data_w {
  int dummy;
};

/* Variables and functions */
int _getopt_internal_r_w(int, int /*<<< orphan*/ *const *,
                         int /*<<< orphan*/ const *, struct option_w const *,
                         int *, int /*<<< orphan*/, struct _getopt_data_w *,
                         int /*<<< orphan*/);
int _getopt_long_r_w(int argc, wchar_t *const *argv, const wchar_t *options,
                     const struct option_w *long_options, int *opt_index,
                     struct _getopt_data_w *d) {
  return _getopt_internal_r_w(argc, argv, options, long_options, opt_index, 0,
                              d, 0);
}


x86 assembly (clang, -O0):
<_getopt_long_r_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
xor    %r9d,%r9d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <_getopt_internal_r_w@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getopt_long_r_w>:
push   %rax
mov    %r9,%rax
xor    %r9d,%r9d
push   $0x0
push   %rax
call   1030 <_getopt_internal_r_w@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.option_w = type { i32 }
%struct._getopt_data_w = type { i32 }
define i32 @_getopt_long_r_w(i32 %0, i32** %1, i32* %2, %struct.option_w* %3, i32* %4, %struct._getopt_data_w* %5) {
%7 = alloca i32
%8 = alloca i32**
%9 = alloca i32*
%10 = alloca %struct.option_w*
%11 = alloca i32*
%12 = alloca %struct._getopt_data_w*
store i32 %0, i32* %7
store i32** %1, i32*** %8
store i32* %2, i32** %9
store %struct.option_w* %3, %struct.option_w** %10
store i32* %4, i32** %11
store %struct._getopt_data_w* %5, %struct._getopt_data_w** %12
%13 = load i32, i32* %7
%14 = load i32**, i32*** %8
%15 = load i32*, i32** %9
%16 = load %struct.option_w*, %struct.option_w** %10
%17 = load i32*, i32** %11
%18 = load %struct._getopt_data_w*, %struct._getopt_data_w** %12
%19 = call i32 @_getopt_internal_r_w(i32 %13, i32** %14, i32* %15, %struct.option_w* %16, i32* %17, i32 0, %struct._getopt_data_w* %18, i32 0)
ret i32 %19
}

LLVM IR (-O2):
%struct.option_w = type { i32 }
%struct._getopt_data_w = type { i32 }
define i32 @_getopt_long_r_w(i32 %0, i32** %1, i32* %2, %struct.option_w* %3, i32* %4, %struct._getopt_data_w* %5) {
%7 = tail call i32 @_getopt_internal_r_w(i32 %0, i32** %1, i32* %2, %struct.option_w* %3, i32* %4, i32 0, %struct._getopt_data_w* %5, i32 0)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ crc16_byte(int /*<<< orphan*/, int /*<<< orphan*/);
uint16_t bd_crc16(uint16_t crc, uint8_t const *buffer, uint16_t len) {
  while (len--)
    crc = crc16_byte(crc, *buffer++);
  return crc;
}


x86 assembly (clang, -O0):
<bd_crc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1157 <bd_crc16+0x47>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%esi
call   1030 <crc16_byte@plt>
mov    %eax,-0x4(%rbp)
jmp    1122 <bd_crc16+0x12>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bd_crc16>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%eax
test   %edx,%edx
je     1144 <bd_crc16+0x34>
mov    %rsi,%r14
mov    %edx,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14,%rbx,4),%esi
mov    %eax,%edi
call   1030 <crc16_byte@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <bd_crc16+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @bd_crc16(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
br label %7
7: ; preds = %11, %3
%8 = load i32, i32* %6
%9 = add nsw i32 %8, -1
store i32 %9, i32* %6
%10 = icmp ne i32 %8, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %5
%15 = load i32, i32* %13
%16 = call i32 @crc16_byte(i32 %12, i32 %15)
store i32 %16, i32* %4
br label %7
17: ; preds = %7
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @bd_crc16(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %14, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %2, %3 ]
%7 = phi i32* [ %10, %5 ], [ %1, %3 ]
%8 = phi i32 [ %12, %5 ], [ %0, %3 ]
%9 = add nsw i32 %6, -1
%10 = getelementptr inbounds i32, i32* %7, i64 1
%11 = load i32, i32* %7
%12 = tail call i32 @crc16_byte(i32 %8, i32 %11)
%13 = icmp eq i32 %9, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %3
%15 = phi i32 [ %0, %3 ], [ %12, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *);
void cred_hash2(unsigned char *out, unsigned char *in, unsigned char *key) {
  unsigned char buf[8];
  static unsigned char key2[8];
  smbhash(buf, in, key);
  key2[0] = key[7];
  smbhash(out, buf, key2);
}


x86 assembly (clang, -O0):
<cred_hash2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <smbhash@plt>
mov    -0x18(%rbp),%rax
mov    0x7(%rax),%al
mov    %al,0x2ee7(%rip)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    0x2ed8(%rip),%rdx
call   1030 <smbhash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cred_hash2>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rdi,%r14
lea    0x8(%rsp),%r15
mov    %r15,%rdi
call   1030 <smbhash@plt>
mov    0x7(%rbx),%al
mov    %al,0x2ef4(%rip)
lea    0x2eed(%rip),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <smbhash@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@cred_hash2.key2 = internal global [8 x i8] zeroinitializer
define void @cred_hash2(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [8 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @smbhash(i8* %8, i8* %9, i8* %10)
%12 = load i8*, i8** %6
%13 = getelementptr inbounds i8, i8* %12, i64 7
%14 = load i8, i8* %13
store i8 %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0)
%15 = load i8*, i8** %4
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%17 = call i32 @smbhash(i8* %15, i8* %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@cred_hash2.key2 = internal global [8 x i8] zeroinitializer
define void @cred_hash2(i8* %0, i8* %1, i8* %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = call i32 @smbhash(i8* %5, i8* %1, i8* %2)
%7 = getelementptr inbounds i8, i8* %2, i64 7
%8 = load i8, i8* %7
store i8 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0)
%9 = call i32 @smbhash(i8* %0, i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(void *);
short gshortminus(short x, short y) {
  x -= y;
  if (!x)
    foo((void *)0);
  return x;
}


x86 assembly (clang, -O0):
<gshortminus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%ecx
movswl -0x2(%rbp),%eax
sub    %ecx,%eax
mov    %ax,-0x2(%rbp)
cmpw   $0x0,-0x2(%rbp)
jne    1148 <gshortminus+0x38>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <foo@plt>
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gshortminus>:
push   %rbx
mov    %edi,%ebx
sub    %si,%bx
jne    111f <gshortminus+0xf>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @gshortminus(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = load i16, i16* %3
%8 = sext i16 %7 to i32
%9 = sub nsw i32 %8, %6
%10 = trunc i32 %9 to i16
store i16 %10, i16* %3
%11 = load i16, i16* %3
%12 = icmp ne i16 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %2
%14 = call i32 @foo(i8* null)
br label %15
15: ; preds = %13, %2
%16 = load i16, i16* %3
ret i16 %16
}

LLVM IR (-O2):
define signext i16 @gshortminus(i16 signext %0, i16 signext %1) {
%3 = sub i16 %0, %1
%4 = icmp eq i16 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i8* null)
br label %7
7: ; preds = %5, %2
ret i16 %3
}
void remove_wait_queue(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<remove_wait_queue>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_wait_queue>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.remove_wait_queue = [18 x i8] c"remove_wait_queue\00"
define void @remove_wait_queue() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.remove_wait_queue, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.remove_wait_queue = [18 x i8] c"remove_wait_queue\00"
define void @remove_wait_queue() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__func__.remove_wait_queue, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int /*<<< orphan*/ fegetenv(int /*<<< orphan*/ *);
int /*<<< orphan*/ fesetenv(int /*<<< orphan*/ *);
float rintf(float);
float nearbyintf(float x) {
  float ret;
  fenv_t env;
  fegetenv(&env);
  ret = rintf(x);
  fesetenv(&env);
  return (ret);
}


x86 assembly (clang, -O0):
<nearbyintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1050 <fegetenv@plt>
movss  -0x4(%rbp),%xmm0
call   1030 <rintf@plt>
movss  %xmm0,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <fesetenv@plt>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearbyintf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0x8(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <fegetenv@plt>
mov    %rbx,%rdi
call   1040 <fesetenv@plt>
movss  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1030 <rintf@plt>

LLVM IR (-O0):
define float @nearbyintf(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %2
%5 = call i32 @fegetenv(i32* %4)
%6 = load float, float* %2
%7 = call float @llvm.rint.f32(float %6)
store float %7, float* %3
%8 = call i32 @fesetenv(i32* %4)
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @nearbyintf(float %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fegetenv(i32* %2)
%5 = call float @llvm.rint.f32(float %0)
%6 = call i32 @fesetenv(i32* %2)
ret float %5
}
esc(s) char *s;
{ printf("%c%s", 27, s); }


x86 assembly (clang, -O0):
<esc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xed9(%rip),%rdi
mov    $0x1b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esc>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    $0x1b,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%c%s\00"
define i32 @esc(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 27, i8* %0)
ret i32 undef
}
int sumDivisibleBy(int n) {
  int limit = 999;
  int p = limit / n;
  return n * (p * (p + 1)) / 2;
}


x86 assembly (clang, -O0):
<sumDivisibleBy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x3e7,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumDivisibleBy>:
mov    $0x3e7,%eax
xor    %edx,%edx
idiv   %edi
lea    0x1(%rax),%ecx
imul   %edi,%eax
imul   %ecx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @sumDivisibleBy(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 999, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = sdiv i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
%12 = mul nsw i32 %9, %11
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %13, 2
ret i32 %14
}

LLVM IR (-O2):
define i32 @sumDivisibleBy(i32 %0) {
%2 = sdiv i32 999, %0
%3 = add nsw i32 %2, 1
%4 = mul i32 %2, %0
%5 = mul i32 %4, %3
%6 = sdiv i32 %5, 2
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int numbtrop_dobldobl_clear(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(727, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<numbtrop_dobldobl_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2d7,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numbtrop_dobldobl_clear>:
mov    $0x2d7,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @numbtrop_dobldobl_clear() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 727, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @numbtrop_dobldobl_clear() {
%1 = tail call i32 @_ada_use_c2phc(i32 727, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void ModelicaIO_freeRealTable(double *table) { free(table); }


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

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

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

LLVM IR (-O2):
define void @ModelicaIO_freeRealTable(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMREF_get(void) { return U_WMRCORENONE_get("U_WMREF"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMREF\00"
define i32 @U_WMREF_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMREF\00"
define i32 @U_WMREF_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
char *dir_to_string(int dirq) {
  switch (dirq) {
  case 1:
    return "Src";
  case 2:
    return "Dst";
  case 4:
    return "SrcAndDst";
  case 3:
  default:
    return "SrcOrDst";
  }
}


x86 assembly (clang, -O0):
<dir_to_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     1165 <dir_to_string+0x65>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xed9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <dir_to_string+0x70>
lea    0xed3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <dir_to_string+0x70>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1170 <dir_to_string+0x70>
jmp    1165 <dir_to_string+0x65>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dir_to_string>:
add    $0xffffffff,%edi
cmp    $0x3,%edi
ja     111a <dir_to_string+0x1a>
movslq %edi,%rax
lea    0xf06(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xeed(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Src\00"
@.str.1 = [4 x i8] c"Dst\00"
@.str.2 = [10 x i8] c"SrcAndDst\00"
@.str.3 = [9 x i8] c"SrcOrDst\00"
define i8* @dir_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 3, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
br label %9
9: ; preds = %1, %8
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"Src\00"
@.str.1 = [4 x i8] c"Dst\00"
@.str.2 = [10 x i8] c"SrcAndDst\00"
@.str.3 = [9 x i8] c"SrcOrDst\00"
@reltable.dir_to_string = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.dir_to_string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.dir_to_string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.dir_to_string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.dir_to_string to i64)) to i32)]
define i8* @dir_to_string(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.dir_to_string to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %9
}
/* Type definitions */
struct nmpa_s {
  int dummy;
};

/* Variables and functions */
int nmpa_vector_reserve_one(struct nmpa_s *, void **, int, size_t);
int nmpa_vector_reserve_one_ptr(struct nmpa_s *nmpa, void **v, size_t n) {
  return nmpa_vector_reserve_one(nmpa, v, sizeof(void *), n);
}


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

x86 assembly (clang, -O2):
<nmpa_vector_reserve_one_ptr>:
mov    %rdx,%rcx
mov    $0x8,%edx
jmp    1030 <nmpa_vector_reserve_one@plt>

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

LLVM IR (-O2):
%struct.nmpa_s = type { i32 }
define i32 @nmpa_vector_reserve_one_ptr(%struct.nmpa_s* %0, i8** %1, i64 %2) {
%4 = tail call i32 @nmpa_vector_reserve_one(%struct.nmpa_s* %0, i8** %1, i32 8, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ getTotalXorOfSubarrayXors(int *, int);
int main() {
  int array[] = {3, 5, 2, 4, 6};
  int n = sizeof(array) / sizeof(array[0]);
  getTotalXorOfSubarrayXors(array, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x5,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <getTotalXorOfSubarrayXors@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <getTotalXorOfSubarrayXors@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [5 x i32] [i32 3, i32 5, i32 2, i32 4, i32 6]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
store i32 5, i32* %3
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @getTotalXorOfSubarrayXors(i32* %5, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [5 x i32] [i32 3, i32 5, i32 2, i32 4, i32 6]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @getTotalXorOfSubarrayXors(i32* %3, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *getBraceParam();
int /*<<< orphan*/ skipSpaces();
void CmdHline(int code) {
  char *s;
  if (code == 1) {
    s = getBraceParam();
    free(s);
    skipSpaces();
  }
}


x86 assembly (clang, -O0):
<CmdHline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1160 <CmdHline+0x30>
mov    $0x0,%al
call   1040 <getBraceParam@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   1050 <skipSpaces@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdHline>:
cmp    $0x1,%edi
jne    114d <CmdHline+0x1d>
push   %rax
xor    %eax,%eax
call   1040 <getBraceParam@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <skipSpaces@plt>
ret

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

LLVM IR (-O2):
define void @CmdHline(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i8* (...) @getBraceParam()
%5 = tail call i32 @free(i8* %4)
%6 = tail call i32 (...) @skipSpaces()
br label %7
7: ; preds = %3, %1
ret void
}
void pari_err_BUG() {}


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

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

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

LLVM IR (-O2):
define void @pari_err_BUG() {
ret void
}
/* Variables and functions */
double _XcmsModuloF(double, double *);
double _XcmsModulo(double value, double base) {
  auto double intpart;
  value /= base;
  value = _XcmsModuloF(value, &intpart);
  value *= base;
  return (value);
}


x86 assembly (clang, -O0):
<_XcmsModulo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <_XcmsModuloF@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_XcmsModulo>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm0
lea    0x10(%rsp),%rdi
call   1030 <_XcmsModuloF@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @_XcmsModulo(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fdiv double %7, %6
store double %8, double* %3
%9 = load double, double* %3
%10 = call double @_XcmsModuloF(double %9, double* %5)
store double %10, double* %3
%11 = load double, double* %4
%12 = load double, double* %3
%13 = fmul double %12, %11
store double %13, double* %3
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @_XcmsModulo(double %0, double %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = fdiv double %0, %1
%6 = call double @_XcmsModuloF(double %5, double* %3)
%7 = fmul double %6, %1
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i = 5, j;
  float k;
  j = 40000;
  printf("The value of i is %d\n", i);
  printf("Size of an integer is %d\n", sizeof(int));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x9c40,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [22 x i8] c"The value of i is %d\0A\00"
@.str.1 = [26 x i8] c"Size of an integer is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %1
store i32 5, i32* %2
store i32 40000, i32* %3
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"The value of i is %d\0A\00"
@.str.1 = [26 x i8] c"Size of an integer is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 0
}
void port_timer_stop_alarm(void) {}


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

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

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

LLVM IR (-O2):
define void @port_timer_stop_alarm() {
ret void
}
void module_dummy_free(void) { ; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ERR_unload_DEADCAFE_strings();
int deadcafe_destroy(ENGINE *e __attribute__((unused))) {
  ERR_unload_DEADCAFE_strings();
  return 1;
}


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

x86 assembly (clang, -O2):
<deadcafe_destroy>:
push   %rax
xor    %eax,%eax
call   1030 <ERR_unload_DEADCAFE_strings@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @deadcafe_destroy(i32* nocapture readnone %0) {
%2 = tail call i32 (...) @ERR_unload_DEADCAFE_strings()
ret i32 1
}
/* Variables and functions */
bool check_padding(char *buffer, size_t size, char pad) {
  char *end = buffer + size;
  while (buffer < end) {
    if (*buffer != pad)
      return false;
    ++buffer;
  }
  return true;
}


x86 assembly (clang, -O0):
<check_padding>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    115b <check_padding+0x5b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
je     114a <check_padding+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <check_padding+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111d <check_padding+0x1d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_padding>:
mov    $0x1,%eax
test   %rsi,%rsi
jle    111d <check_padding+0x1d>
add    %rdi,%rsi
nopl   (%rax)
cmp    %dl,(%rdi)
jne    111e <check_padding+0x1e>
add    $0x1,%rdi
cmp    %rsi,%rdi
jb     1110 <check_padding+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @check_padding(i8* %0, i64 %1, i8 signext %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %1
%5 = icmp sgt i64 %1, 0
br i1 %5, label %8, label %13
6: ; preds = %8
%7 = icmp ult i8* %12, %4
br i1 %7, label %8, label %13
8: ; preds = %3, %6
%9 = phi i8* [ %12, %6 ], [ %0, %3 ]
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %2
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %6, label %13
13: ; preds = %8, %6, %3
%14 = phi i32 [ 1, %3 ], [ 1, %6 ], [ 0, %8 ]
ret i32 %14
}
/* Variables and functions */
int rom_present(char *);
int s3_phoenix_trio32_available() { return rom_present("86c732p.bin"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"86c732p.bin\00"
define i32 @s3_phoenix_trio32_available() {
%1 = call i32 @rom_present(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [12 x i8] c"86c732p.bin\00"
define i32 @s3_phoenix_trio32_available() {
%1 = tail call i32 @rom_present(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ subwindow;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
unsigned long get_XButtonEvent_subwindow(void *_p) {
  return (unsigned long)((XButtonEvent *)_p)->subwindow;
}


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

x86 assembly (clang, -O2):
<get_XButtonEvent_subwindow>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XButtonEvent_subwindow(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}