xunge/DecIR huggingface dataset:
void user_init(flags) int flags;
{}


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

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

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

LLVM IR (-O2):
define void @user_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(unsigned char, unsigned char);
void SensorSetReg_OV6680(unsigned char uAddr, unsigned short uVal) {
  VIM_SIF_I2cWriteByte((unsigned char)uAddr, (unsigned char)uVal);
}


x86 assembly (clang, -O0):
<SensorSetReg_OV6680>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x4(%rbp),%ax
movzbl %cl,%edi
movzbl %al,%esi
call   1030 <VIM_SIF_I2cWriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorSetReg_OV6680>:
movzbl %sil,%esi
jmp    1030 <VIM_SIF_I2cWriteByte@plt>

LLVM IR (-O0):
define void @SensorSetReg_OV6680(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
%7 = trunc i16 %6 to i8
%8 = call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %5, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @SensorSetReg_OV6680(i8 zeroext %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
%4 = tail call i32 @VIM_SIF_I2cWriteByte(i8 zeroext %0, i8 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _irqack();
void irq1() { _irqack(); }


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

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

LLVM IR (-O0):
define void @irq1() {
%1 = call i32 (...) @_irqack()
ret void
}

LLVM IR (-O2):
define void @irq1() {
%1 = tail call i32 (...) @_irqack()
ret void
}
void STAMR3Enum(void) {}


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

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

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

LLVM IR (-O2):
define void @STAMR3Enum() {
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  unsigned int local2;
  unsigned int local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> 3U;
    local1 = 0UL;
    while (local1 < input[1UL]) {
      local2 = 0UL;
      while (local2 < input[1UL]) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] | 238489436UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jae    116b <RandomFunc+0x6b>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x4(%rcx),%eax
jae    115c <RandomFunc+0x5c>
mov    -0x18(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x18(%rbp)
jmp    113d <RandomFunc+0x3d>
mov    -0x1c(%rbp),%eax
add    $0x2,%rax
mov    %eax,-0x1c(%rbp)
jmp    1126 <RandomFunc+0x26>
mov    -0x14(%rbp),%eax
or     $0xe370f5c,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
shr    $0x3,%eax
or     $0xe77bffd,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = zext i32 %10 to i64
%12 = or i64 %11, 51238316
%13 = lshr i64 %12, 3
%14 = trunc i64 %13 to i32
%15 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %14, i32* %15
store i32 0, i32* %7
br label %16
16: ; preds = %34, %2
%17 = load i32, i32* %7
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* %19
%21 = icmp ult i32 %17, %20
br i1 %21, label %22, label %39
22: ; preds = %16
store i32 0, i32* %6
br label %23
23: ; preds = %29, %22
%24 = load i32, i32* %6
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = icmp ult i32 %24, %27
br i1 %28, label %29, label %34
29: ; preds = %23
%30 = load i32, i32* %6
%31 = zext i32 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i32
store i32 %33, i32* %6
br label %23
34: ; preds = %23
%35 = load i32, i32* %7
%36 = zext i32 %35 to i64
%37 = add i64 %36, 2
%38 = trunc i64 %37 to i32
store i32 %38, i32* %7
br label %16
39: ; preds = %16
%40 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%41 = load i32, i32* %40
%42 = zext i32 %41 to i64
%43 = or i64 %42, 238489436
%44 = trunc i64 %43 to i32
%45 = load i32*, i32** %4
%46 = getelementptr inbounds i32, i32* %45, i64 0
store i32 %44, i32* %46
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = lshr i32 %3, 3
%5 = or i32 %4, 242728957
store i32 %5, i32* %1
ret void
}
/* Variables and functions */
double gauss_rand(double, double);
void fill_rand_vec(int n, double *vec) {
  int i;
  for (i = 0; i < n; i++) {
    vec[i] = gauss_rand(0.0, 1.0);
  }
}


x86 assembly (clang, -O0):
<fill_rand_vec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115d <fill_rand_vec+0x4d>
xorps  %xmm0,%xmm0
movsd  0xec3(%rip),%xmm1
call   1030 <gauss_rand@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <fill_rand_vec+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_rand_vec>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    114f <fill_rand_vec+0x3f>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
movsd  0xec5(%rip),%xmm1
call   1030 <gauss_rand@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fill_rand_vec+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fill_rand_vec(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i32
store i32 %0, i32* %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call double @gauss_rand(double 0.000000e+00, double 1.000000e+00)
%12 = load double*, double** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
store double %11, double* %15
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @fill_rand_vec(i32 %0, double* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call double @gauss_rand(double 0.000000e+00, double 1.000000e+00)
%9 = getelementptr inbounds double, double* %1, i64 %7
store double %8, double* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
void CRYPTO_get_mem_debug_functions(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_get_mem_debug_functions() {
ret void
}
int GetBit(const int number) {
  int n = number;
  int bit = 0;
  while (n > 0) {
    n /= 10;
  }
  return bit;
}


x86 assembly (clang, -O0):
<GetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1131 <GetBit+0x31>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1114 <GetBit+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @GetBit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
store i32 %5, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sdiv i32 %10, 10
store i32 %11, i32* %3
br label %6
12: ; preds = %6
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @GetBit(i32 %0) {
ret i32 0
}
/* Variables and functions */
int *malloc(int);
int *table() {
  long long i, end = 10000000 + 10;
  int *r = malloc(sizeof(int) * end);
  for (i = 0; i < end; i++) {
    r[i] = -1;
  }
  return r;
}


x86 assembly (clang, -O0):
<table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x98968a,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1169 <table+0x59>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    113b <table+0x2b>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table>:
push   %rbx
mov    $0x2625a28,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x2625a28,%edx
mov    %rax,%rdi
mov    $0xff,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @table() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32*
store i64 10000010, i64* %2
%4 = load i64, i64* %2
%5 = mul i64 4, %4
%6 = trunc i64 %5 to i32
%7 = call i32* @malloc(i32 %6)
store i32* %7, i32** %3
store i64 0, i64* %1
br label %8
8: ; preds = %16, %0
%9 = load i64, i64* %1
%10 = load i64, i64* %2
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i32*, i32** %3
%14 = load i64, i64* %1
%15 = getelementptr inbounds i32, i32* %13, i64 %14
store i32 -1, i32* %15
br label %16
16: ; preds = %12
%17 = load i64, i64* %1
%18 = add nsw i64 %17, 1
store i64 %18, i64* %1
br label %8
19: ; preds = %8
%20 = load i32*, i32** %3
ret i32* %20
}

LLVM IR (-O2):
define noalias i32* @table() {
%1 = tail call i32* @malloc(i32 40000040)
%2 = bitcast i32* %1 to i8*
ret i32* %1
}
void testDifferentTypes(int arg) {
  switch (arg) {
  case -1U ... 400000000LL:
    clang_analyzer_warnIfReached();
    break;
  default:
    clang_analyzer_warnIfReached();
    break;
  }
}


x86 assembly (clang, -O0):
<testDifferentTypes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <testDifferentTypes+0x22>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
jmp    114a <testDifferentTypes+0x3a>
mov    -0x8(%rbp),%eax
sub    $0xffffffff,%eax
cmp    $0x17d78401,%eax
jbe    1126 <testDifferentTypes+0x16>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testDifferentTypes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
]
4: ; preds = %6
%5 = call i32 (...) @clang_analyzer_warnIfReached()
br label %11
6: ; preds = %1
%7 = sub i32 %3, -1
%8 = icmp ule i32 %7, 400000001
br i1 %8, label %4, label %9
9: ; preds = %6
%10 = call i32 (...) @clang_analyzer_warnIfReached()
br label %11
11: ; preds = %9, %4
ret void
}

LLVM IR (-O2):
define void @testDifferentTypes(i32 %0) {
%2 = tail call i32 (...) @clang_analyzer_warnIfReached()
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
int stat(char *, struct stat *);
int isDirectory(char *pathName) {
  struct stat statbuf;
  if (stat(pathName, &statbuf) == -1)
    return 0;
  else
    return S_ISDIR(statbuf.st_mode);
}


x86 assembly (clang, -O0):
<isDirectory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
jne    114e <isDirectory+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1159 <isDirectory+0x39>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDirectory>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
cmp    $0xffffffff,%eax
je     1137 <isDirectory+0x17>
mov    (%rsp),%edi
pop    %rax
jmp    1030 <S_ISDIR@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @isDirectory(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isDirectory(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ 0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ base_run_tests();
int /*<<< orphan*/ collections_run_tests();
int /*<<< orphan*/ cryptography_run_tests();
int /*<<< orphan*/ media_run_tests();
int /*<<< orphan*/ memory_run_tests();
int /*<<< orphan*/ numeric_run_tests();
int /*<<< orphan*/ text_run_tests();
int main(void) {
  base_run_tests();
  collections_run_tests();
  cryptography_run_tests();
  media_run_tests();
  memory_run_tests();
  numeric_run_tests();
  text_run_tests();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <base_run_tests@plt>
mov    $0x0,%al
call   1070 <collections_run_tests@plt>
mov    $0x0,%al
call   1090 <cryptography_run_tests@plt>
mov    $0x0,%al
call   1040 <media_run_tests@plt>
mov    $0x0,%al
call   1080 <memory_run_tests@plt>
mov    $0x0,%al
call   1030 <numeric_run_tests@plt>
mov    $0x0,%al
call   1050 <text_run_tests@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <base_run_tests@plt>
xor    %eax,%eax
call   1070 <collections_run_tests@plt>
xor    %eax,%eax
call   1090 <cryptography_run_tests@plt>
xor    %eax,%eax
call   1040 <media_run_tests@plt>
xor    %eax,%eax
call   1080 <memory_run_tests@plt>
xor    %eax,%eax
call   1030 <numeric_run_tests@plt>
xor    %eax,%eax
call   1050 <text_run_tests@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @base_run_tests()
%3 = call i32 (...) @collections_run_tests()
%4 = call i32 (...) @cryptography_run_tests()
%5 = call i32 (...) @media_run_tests()
%6 = call i32 (...) @memory_run_tests()
%7 = call i32 (...) @numeric_run_tests()
%8 = call i32 (...) @text_run_tests()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @base_run_tests()
%2 = tail call i32 (...) @collections_run_tests()
%3 = tail call i32 (...) @cryptography_run_tests()
%4 = tail call i32 (...) @media_run_tests()
%5 = tail call i32 (...) @memory_run_tests()
%6 = tail call i32 (...) @numeric_run_tests()
%7 = tail call i32 (...) @text_run_tests()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void encode_be32(uint8_t *dest, uint32_t v) {
  *dest++ = v >> 24;
  *dest++ = (v >> 16) & 0xFF;
  *dest++ = (v >> 8) & 0xFF;
  *dest = v & 0xFF;
}


x86 assembly (clang, -O0):
<encode_be32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_be32>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
sar    $0x18,%eax
mov    %eax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rdi)
mov    %edx,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @encode_be32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i32 1
store i32* %8, i32** %3
store i32 %6, i32* %7
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i32 1
store i32* %13, i32** %3
store i32 %11, i32* %12
%14 = load i32, i32* %4
%15 = ashr i32 %14, 8
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %3
store i32 %16, i32* %17
%19 = load i32, i32* %4
%20 = and i32 %19, 255
%21 = load i32*, i32** %3
store i32 %20, i32* %21
ret void
}

LLVM IR (-O2):
define void @encode_be32(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %0
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %6, i32* %4
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %9, i32* %7
%11 = and i32 %1, 255
store i32 %11, i32* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __p3dfft_MOD_p3dfft_using_stride1(int *);
int p3dfft_using_stride1() {
  int using_stride1;
  __p3dfft_MOD_p3dfft_using_stride1(&using_stride1);
  return using_stride1;
}


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

x86 assembly (clang, -O2):
<p3dfft_using_stride1>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <__p3dfft_MOD_p3dfft_using_stride1@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @p3dfft_using_stride1() {
%1 = alloca i32
%2 = call i32 @__p3dfft_MOD_p3dfft_using_stride1(i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @p3dfft_using_stride1() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @__p3dfft_MOD_p3dfft_using_stride1(i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
void ice_u16s16(int x) {
  register long reg __asm("20");
  __asm volatile(" " ::"r"(reg = (long)x * 0x1234u));
}


x86 assembly (clang, -O0):
<ice_u16s16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
imul   $0x1234,%rax,%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ice_u16s16>:
movslq %edi,%rax
imul   $0x1234,%rax,%rax
ret

LLVM IR (-O0):
define void @ice_u16s16(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul nsw i64 %5, 4660
store i64 %6, i64* %3
ret void
}

LLVM IR (-O2):
define void @ice_u16s16(i32 %0) {
%2 = sext i32 %0 to i64
%3 = mul nsw i64 %2, 4660
tail call void asm sideeffect " ", "r,~{dirflag},~{fpsr},~{flags}"(i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  sleep(2);
  remove(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    0x8(%rbx),%rdi
call   1030 <remove@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @sleep(i32 2)
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @remove(i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t const);
void print_performance(const double t, const size_t m) {
  printf(": %.0lf Kops/s\n", m / t / 1000);
}


x86 assembly (clang, -O0):
<print_performance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movaps 0xed8(%rip),%xmm1
movq   -0x10(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xed7(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rsi
mov    %rsi,%rcx
sar    $0x3f,%rcx
movsd  0xeb4(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
and    %rcx,%rax
or     %rax,%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_performance>:
movq   %rdi,%xmm1
punpckldq 0xee3(%rip),%xmm1
subpd  0xeeb(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
divsd  0xee3(%rip),%xmm2
cvttsd2si %xmm2,%rax
mov    %rax,%rcx
subsd  0xedb(%rip),%xmm2
cvttsd2si %xmm2,%rsi
sar    $0x3f,%rcx
and    %rcx,%rsi
or     %rax,%rsi
lea    0xecd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c": %.0lf Kops/s\0A\00"
define void @print_performance(double %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
store double %0, double* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = uitofp i64 %5 to double
%7 = load double, double* %3
%8 = fdiv double %6, %7
%9 = fdiv double %8, 1.000000e+03
%10 = fptoui double %9 to i64
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %10)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c": %.0lf Kops/s\0A\00"
define void @print_performance(double %0, i64 %1) {
%3 = uitofp i64 %1 to double
%4 = fdiv double %3, %0
%5 = fdiv double %4, 1.000000e+03
%6 = fptoui double %5 to i64
%7 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
const double solve_linear_equation(const double a, const double b) {
  if (a == 0)
    error("a == 0 in solve_linear_equation()\n");
  return -b / a;
}


x86 assembly (clang, -O0):
<solve_linear_equation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1146 <solve_linear_equation+0x36>
jp     1146 <solve_linear_equation+0x36>
lea    0xebf(%rip),%rdi
call   1030 <error@plt>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_linear_equation>:
sub    $0x28,%rsp
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    1143 <solve_linear_equation+0x33>
jp     1143 <solve_linear_equation+0x33>
lea    0xee9(%rip),%rdi
movaps %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <error@plt>
movsd  0x8(%rsp),%xmm0
movapd 0x10(%rsp),%xmm1
xorpd  0xeb5(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"a == 0 in solve_linear_equation()\0A\00"
define double @solve_linear_equation(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp oeq double %5, 0.000000e+00
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @error(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load double, double* %4
%11 = fneg double %10
%12 = load double, double* %3
%13 = fdiv double %11, %12
ret double %13
}

LLVM IR (-O2):
@.str = [35 x i8] c"a == 0 in solve_linear_equation()\0A\00"
define double @solve_linear_equation(double %0, double %1) {
%3 = fcmp oeq double %0, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @error(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = fneg double %1
%8 = fdiv double %7, %0
ret double %8
}
/* Variables and functions */
int h1(int);
int h2(int);
int h(int key, int i) { return ((h1(key) + i * h2(key)) % 8495); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <h1@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <h2@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
mov    $0x212f,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
call   1040 <h1@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <h2@plt>
imul   %r14d,%eax
add    %ebx,%eax
cltq
imul   $0x1edbceb3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2a,%rcx
add    %edx,%ecx
imul   $0x212f,%ecx,%ecx
sub    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @h(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @h1(i32 %5)
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = call i32 @h2(i32 %8)
%10 = mul nsw i32 %7, %9
%11 = add nsw i32 %6, %10
%12 = srem i32 %11, 8495
ret i32 %12
}

LLVM IR (-O2):
define i32 @h(i32 %0, i32 %1) {
%3 = tail call i32 @h1(i32 %0)
%4 = tail call i32 @h2(i32 %0)
%5 = mul nsw i32 %4, %1
%6 = add nsw i32 %5, %3
%7 = srem i32 %6, 8495
ret i32 %7
}
void Cyc_Dict_count_elem(int *cnt, void *a, void *b) { *cnt = *cnt + 1; }


x86 assembly (clang, -O0):
<Cyc_Dict_count_elem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Dict_count_elem>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @Cyc_Dict_count_elem(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
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
%10 = load i32*, i32** %4
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @Cyc_Dict_count_elem(i32* nocapture %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 1
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leon2_irqctrl_set_pending(int);
void leon2_set_int(int irq) { leon2_irqctrl_set_pending(irq); }


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

x86 assembly (clang, -O2):
<leon2_set_int>:
jmp    1030 <leon2_irqctrl_set_pending@plt>

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

LLVM IR (-O2):
define void @leon2_set_int(i32 %0) {
%2 = tail call i32 @leon2_irqctrl_set_pending(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ efree(void *);
void xx_wrapper_free(void *pointer) { efree(pointer); }


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

x86 assembly (clang, -O2):
<xx_wrapper_free>:
jmp    1030 <efree@plt>

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

LLVM IR (-O2):
define void @xx_wrapper_free(i8* %0) {
%2 = tail call i32 @efree(i8* %0)
ret void
}
/* Variables and functions */
short *malloc(int);
void f2() {
  int a[2];
  a[1] = 42;
  short *b = malloc(64);
  b[5] = *a + a[1] + 2;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2a,-0x4(%rbp)
mov    $0x40,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0xa(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    $0x40,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @f2() {
%1 = alloca [2 x i32]
%2 = alloca i16*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 42, i32* %3
%4 = call i16* @malloc(i32 64)
store i16* %4, i16** %2
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = add nsw i32 %9, 2
%11 = trunc i32 %10 to i16
%12 = load i16*, i16** %2
%13 = getelementptr inbounds i16, i16* %12, i64 5
store i16 %11, i16* %13
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i16* @malloc(i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a = 0;
  int b = 123;
  printf("Hello World!\n");
  printf("a = %d\n", a);
  printf("b = %d\n", b);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [8 x i8] c"a = %d\0A\00"
@.str.2 = [8 x i8] c"b = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 123, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"a = %d\0A\00"
@.str.2 = [8 x i8] c"b = %d\0A\00"
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 123)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int semctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int semid_destory(int semid) { return semctl(semid, 0, IPC_RMID); }


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

x86 assembly (clang, -O2):
<semid_destory>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
jmp    1030 <semctl@plt>

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

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @semid_destory(i32 %0) {
%2 = load i32, i32* @IPC_RMID
%3 = tail call i32 @semctl(i32 %0, i32 0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double stdlib_strided_dsemch(int, int, double *, int);
int main() {
  double x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  double v = stdlib_strided_dsemch(N, 1, x, stride);
  printf("standard error of the mean: %lf\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x40,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x44(%rbp)
movl   $0x2,-0x48(%rbp)
mov    -0x44(%rbp),%edi
lea    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%ecx
mov    $0x1,%esi
call   1050 <stdlib_strided_dsemch@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x2,%ecx
call   1040 <stdlib_strided_dsemch@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [33 x i8] c"standard error of the mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = bitcast [8 x double]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call double @stdlib_strided_dsemch(i32 %6, i32 1, double* %7, i32 %8)
store double %9, double* %4
%10 = load double, double* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00, double 8.000000e+00]
@.str = [33 x i8] c"standard error of the mean: %lf\0A\00"
define i32 @main() {
%1 = alloca [8 x double]
%2 = bitcast [8 x double]* %1 to i8*
%3 = getelementptr inbounds [8 x double], [8 x double]* %1, i64 0, i64 0
%4 = call double @stdlib_strided_dsemch(i32 4, i32 1, double* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ t_mixprocess(int /*<<< orphan*/, unsigned int,
                                unsigned char const *, unsigned char *,
                                unsigned long const, unsigned char const *,
                                unsigned char const *);
void t_mixdecrypt(unsigned int thr, const unsigned char *data,
                  unsigned char *out, const unsigned long size,
                  const unsigned char *key, const unsigned char *iv) {
  t_mixprocess(0, thr, data, out, size, key, iv);
}


x86 assembly (clang, -O0):
<t_mixdecrypt>:
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),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
xor    %edi,%edi
mov    %rax,(%rsp)
call   1030 <t_mixprocess@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_mixdecrypt>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    %r9,(%rsp)
xor    %edi,%edi
mov    %rax,%r9
call   1030 <t_mixprocess@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @t_mixdecrypt(i32 %0, i8* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i32 @t_mixprocess(i32 0, i32 %13, i8* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @t_mixdecrypt(i32 %0, i8* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i32 @t_mixprocess(i32 0, i32 %0, i8* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret void
}
/* Variables and functions */
int atoi(unsigned char *);
int getWidthFix(unsigned char *ptr) {
  for (int i = 0; i < 1; i++) {
    while (*ptr != '\n') {
      ptr += sizeof(char);
    }
    ptr += sizeof(char);
  }
  return atoi(ptr);
}


x86 assembly (clang, -O0):
<getWidthFix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    116d <getWidthFix+0x5d>
jmp    1132 <getWidthFix+0x22>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xa,%eax
je     1153 <getWidthFix+0x43>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <getWidthFix+0x22>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <getWidthFix+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWidthFix>:
cmpb   $0xa,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <getWidthFix>
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @getWidthFix(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %6, %2 ], [ %0, %1 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 10
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = tail call i32 @atoi(i8* %6)
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t mpeg2_detect_accel(void) {
  uint32_t accel;
  accel = 0;
  return accel;
}


x86 assembly (clang, -O0):
<mpeg2_detect_accel>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @mpeg2_detect_accel() {
%1 = alloca i64
store i64 0, i64* %1
%2 = load i64, i64* %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @mpeg2_detect_accel() {
ret i64 0
}
void set_cntfreq(void) {}


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

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

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

LLVM IR (-O2):
define void @set_cntfreq() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void freestring(char **ss) {
  if (*ss == NULL)
    return;
  free(*ss);
  *ss = NULL;
}


x86 assembly (clang, -O0):
<freestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    112f <freestring+0x1f>
jmp    1146 <freestring+0x36>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freestring>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <freestring+0x18>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @freestring(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %1, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void ps_footer(FILE *file) { fprintf(file, "showpage\ngr\n"); }


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

x86 assembly (clang, -O2):
<ps_footer>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"showpage\0Agr\0A\00"
define void @ps_footer(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 12, i64 1, i32* %0)
ret void
}
void test9() {}


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

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

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

LLVM IR (-O2):
define void @test9() {
ret void
}
void RB_StageIteratorGeneric(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int write(int, int /*<<< orphan*/ *, int);
void write_buf(char *name, int fd, uint8_t *buf, int len) {
  if (write(fd, buf, len) != len) {
    perror(name);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<write_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <write@plt>
cmp    -0x1c(%rbp),%eax
je     1171 <write_buf+0x41>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_buf>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdi,%rbx
mov    %esi,%edi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <write@plt>
cmp    %ebp,%eax
jne    114f <write_buf+0x1f>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
define void @write_buf(i8* nocapture %0, i32 %1, i32* nocapture %2, i32 %3) {
%5 = tail call i32 @write(i32 %1, i32* %2, i32 %3)
%6 = icmp eq i32 %5, %3
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @perror(i8* %0)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %4
ret void
}
XMaskEvent() {}


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

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

LLVM IR (-O0):
define i32 @XMaskEvent() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XMaskEvent() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ PreConnection(char *, char, int /*<<< orphan*/);
void Appe(char *param) { PreConnection(param, 'a', 0); }


x86 assembly (clang, -O0):
<Appe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x61,%esi
xor    %edx,%edx
call   1030 <PreConnection@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Appe>:
mov    $0x61,%esi
xor    %edx,%edx
jmp    1030 <PreConnection@plt>

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

LLVM IR (-O2):
define void @Appe(i8* %0) {
%2 = tail call i32 @PreConnection(i8* %0, i8 signext 97, i32 0)
ret void
}