xunge/DecIR huggingface dataset:
/* Variables and functions */
float copysignf(float, float);
float smenvgv(float, float, float);
float smenvg_attackv(float y1, float x, float xo, float T) {
  return smenvgv(y1, x + copysignf(x - xo, x - y1) * 0.045165705363684115f, T);
}


x86 assembly (clang, -O0):
<smenvg_attackv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm3
subss  -0x4(%rbp),%xmm3
movaps 0xebf(%rip),%xmm4
pand   %xmm4,%xmm3
movaps 0xec4(%rip),%xmm4
pand   %xmm4,%xmm1
por    %xmm3,%xmm1
movss  0xe94(%rip),%xmm3
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
movss  -0x10(%rbp),%xmm2
call   1030 <smenvgv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smenvg_attackv>:
movaps %xmm1,%xmm4
subss  %xmm2,%xmm4
movaps %xmm1,%xmm2
subss  %xmm0,%xmm2
andps  0xedb(%rip),%xmm2
andps  0xee4(%rip),%xmm4
orps   %xmm2,%xmm4
mulss  0xee9(%rip),%xmm4
addss  %xmm4,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <smenvgv@plt>

LLVM IR (-O0):
define float @smenvg_attackv(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* %5
%10 = load float, float* %6
%11 = load float, float* %6
%12 = load float, float* %7
%13 = fsub float %11, %12
%14 = load float, float* %6
%15 = load float, float* %5
%16 = fsub float %14, %15
%17 = call float @llvm.copysign.f32(float %13, float %16)
%18 = call float @llvm.fmuladd.f32(float %17, float 0x3FA71FF5A0000000, float %10)
%19 = load float, float* %8
%20 = call float @smenvgv(float %9, float %18, float %19)
ret float %20
}

LLVM IR (-O2):
define float @smenvg_attackv(float %0, float %1, float %2, float %3) {
%5 = fsub float %1, %2
%6 = fsub float %1, %0
%7 = tail call float @llvm.copysign.f32(float %5, float %6)
%8 = tail call float @llvm.fmuladd.f32(float %7, float 0x3FA71FF5A0000000, float %1)
%9 = tail call float @smenvgv(float %0, float %8, float %3)
ret float %9
}
int _stat(char *file, struct stat *st) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @_stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 0
}
int gen_alignment(int n, int align) {
  int remainder = n % align;
  return (remainder == 0) ? n : n - remainder + align;
}


x86 assembly (clang, -O0):
<gen_alignment>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1129 <gen_alignment+0x29>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1135 <gen_alignment+0x35>
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_alignment>:
mov    %edi,%eax
cltd
idiv   %esi
lea    (%rsi,%rdi,1),%eax
sub    %edx,%eax
test   %edx,%edx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @gen_alignment(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %3
br label %19
13: ; preds = %2
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = sub nsw i32 %14, %15
%17 = load i32, i32* %4
%18 = add nsw i32 %16, %17
br label %19
19: ; preds = %13, %11
%20 = phi i32 [ %12, %11 ], [ %18, %13 ]
ret i32 %20
}

LLVM IR (-O2):
define i32 @gen_alignment(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp eq i32 %3, 0
%5 = add i32 %1, %0
%6 = sub i32 %5, %3
%7 = select i1 %4, i32 %0, i32 %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ curr_path;

/* Variables and functions */
int chdir(char const *);
char *getcwd(char *, int);
scalar_t__ stroscmp(char *, char const *);
int vifm_chdir(const char path[]) {
  char curr_path[4096];
  if (getcwd(curr_path, sizeof(curr_path)) == curr_path) {
    if (stroscmp(curr_path, path) == 0) {
      return 0;
    }
  }
  return chdir(path);
}


x86 assembly (clang, -O0):
<vifm_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x1010(%rbp),%rdi
mov    $0x1000,%esi
call   1040 <getcwd@plt>
lea    -0x1010(%rbp),%rcx
cmp    %rcx,%rax
jne    118b <vifm_chdir+0x5b>
lea    -0x1010(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <stroscmp@plt>
cmp    $0x0,%rax
jne    1186 <vifm_chdir+0x56>
movl   $0x0,-0x4(%rbp)
jmp    1197 <vifm_chdir+0x67>
jmp    118b <vifm_chdir+0x5b>
mov    -0x10(%rbp),%rdi
call   1030 <chdir@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vifm_chdir>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %rdi,%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1040 <getcwd@plt>
cmp    %rbx,%rax
jne    1162 <vifm_chdir+0x32>
mov    %rsp,%rdi
mov    %r14,%rsi
call   1050 <stroscmp@plt>
test   %rax,%rax
je     1175 <vifm_chdir+0x45>
mov    %r14,%rdi
call   1030 <chdir@plt>
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
jmp    116a <vifm_chdir+0x3a>

LLVM IR (-O0):
define i32 @vifm_chdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [4096 x i8]
store i8* %0, i8** %3
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%6 = call i8* @getcwd(i8* %5, i32 4096)
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%11 = load i8*, i8** %3
%12 = call i64 @stroscmp(i8* %10, i8* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 0, i32* %2
br label %19
15: ; preds = %9
br label %16
16: ; preds = %15, %1
%17 = load i8*, i8** %3
%18 = call i32 @chdir(i8* %17)
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %14
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @vifm_chdir(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i8* @getcwd(i8* %3, i32 4096)
%5 = icmp eq i8* %4, %3
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i64 @stroscmp(i8* %3, i8* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6, %1
%10 = call i32 @chdir(i8* %0)
br label %11
11: ; preds = %6, %9
%12 = phi i32 [ %10, %9 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int mwsp_send_command(int, int, int);
int mwsp_bind(int fd) { return mwsp_send_command(fd, 241, 0x1); }


x86 assembly (clang, -O0):
<mwsp_bind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xf1,%esi
mov    $0x1,%edx
call   1030 <mwsp_send_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mwsp_bind>:
mov    $0xf1,%esi
mov    $0x1,%edx
jmp    1030 <mwsp_send_command@plt>

LLVM IR (-O0):
define i32 @mwsp_bind(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @mwsp_send_command(i32 %3, i32 241, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @mwsp_bind(i32 %0) {
%2 = tail call i32 @mwsp_send_command(i32 %0, i32 241, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ prefix(char *, char *);
int is_table_end(char *s) {
  if (!prefix(".TE", s))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_table_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <prefix@plt>
cmp    $0x0,%eax
jne    1141 <is_table_end+0x31>
movl   $0x0,-0x4(%rbp)
jmp    1148 <is_table_end+0x38>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_table_end>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <prefix@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c".TE\00"
define i32 @is_table_end(i8* %0) {
%2 = tail call i32 @prefix(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ DAC_ISR();
int /*<<< orphan*/ SPI_ISR();
void SPI_DAC_ISR(void) {
  SPI_ISR();
  DAC_ISR();
}


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

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

LLVM IR (-O0):
define void @SPI_DAC_ISR() {
%1 = call i32 (...) @SPI_ISR()
%2 = call i32 (...) @DAC_ISR()
ret void
}

LLVM IR (-O2):
define void @SPI_DAC_ISR() {
%1 = tail call i32 (...) @SPI_ISR()
%2 = tail call i32 (...) @DAC_ISR()
ret void
}
/* Variables and functions */
double StandardExponential();
double transformedExponential(double scale, double lag) {
  double value;
  value = StandardExponential() * scale + lag;
  return (value);
}


x86 assembly (clang, -O0):
<transformedExponential>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <StandardExponential@plt>
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transformedExponential>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <StandardExponential@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @transformedExponential(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call double (...) @StandardExponential()
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call double @llvm.fmuladd.f64(double %6, double %7, double %8)
store double %9, double* %5
%10 = load double, double* %5
ret double %10
}

LLVM IR (-O2):
define double @transformedExponential(double %0, double %1) {
%3 = tail call double (...) @StandardExponential()
%4 = tail call double @llvm.fmuladd.f64(double %3, double %0, double %1)
ret double %4
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t override_field(int64_t d, int64_t s) { return (s > -1) ? s : d; }


x86 assembly (clang, -O0):
<override_field>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jle    111f <override_field+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <override_field+0x25>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<override_field>:
mov    %edi,%eax
test   %esi,%esi
cmovns %esi,%eax
ret

LLVM IR (-O0):
define i32 @override_field(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 = icmp sgt i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %4
br label %11
9: ; preds = %2
%10 = load i32, i32* %3
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @override_field(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
char *Py_GetPath() { return "/"; }


x86 assembly (clang, -O0):
<Py_GetPath>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @Py_GetPath() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @Py_GetPath() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
void s32_to_bigendian(uint8_t *dst, int32_t s32) {
  dst[0] = (s32 >> 24) & 0xFF;
  dst[1] = (s32 >> 16) & 0xFF;
  dst[2] = (s32 >> 8) & 0xFF;
  dst[3] = s32 & 0xFF;
}


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

x86 assembly (clang, -O2):
<s32_to_bigendian>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $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 @s32_to_bigendian(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 = and i32 %6, 255
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 2
store i32 %17, i32* %19
%20 = load i32, i32* %4
%21 = and i32 %20, 255
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 3
store i32 %21, i32* %23
ret void
}

LLVM IR (-O2):
define void @s32_to_bigendian(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
store i32 %3, i32* %0
%4 = lshr i32 %1, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = and i32 %1, 255
%11 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %10, i32* %11
ret void
}
/* Variables and functions */
int close(int);
int pe_exit(int handle) { return close(handle); }


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

x86 assembly (clang, -O2):
<pe_exit>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @pe_exit(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int f3(char *);
int f4(void) {
  char buf[16384];
  return f3(buf);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4000,%rsp
lea    -0x4000(%rbp),%rdi
call   1030 <f3@plt>
add    $0x4000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
sub    $0x4008,%rsp
mov    %rsp,%rdi
call   1030 <f3@plt>
add    $0x4008,%rsp
ret

LLVM IR (-O0):
define i32 @f4() {
%1 = alloca [16384 x i8]
%2 = getelementptr inbounds [16384 x i8], [16384 x i8]* %1, i64 0, i64 0
%3 = call i32 @f3(i8* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @f4() {
%1 = alloca [16384 x i8]
%2 = getelementptr inbounds [16384 x i8], [16384 x i8]* %1, i64 0, i64 0
%3 = call i32 @f3(i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fftss_init_threads();
void DFFTSS_INIT_THREADS(void) { fftss_init_threads(); }


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

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

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

LLVM IR (-O2):
define void @DFFTSS_INIT_THREADS() {
%1 = tail call i32 (...) @fftss_init_threads()
ret void
}
void XDefaultGCOfScreen() {}


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

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

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

LLVM IR (-O2):
define void @XDefaultGCOfScreen() {
ret void
}
int main(argc, argv)
int argc;
char *argv[];
{
  G__setothermain(0);
  return (G__main(argc, argv));
}


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)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <G__setothermain@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <G__main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
xor    %eax,%eax
call   1030 <G__setothermain@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <G__main@plt>

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 (i32, ...) bitcast (i32 (...)* @G__setothermain to i32 (i32, ...)*)(i32 0)
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @G__main to i32 (i32, i8**, ...)*)(i32 %7, i8** %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @G__setothermain to i32 (i32, ...)*)(i32 0)
%4 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @G__main to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
ret i32 %4
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_get_property_strv(void *bus, const char *destination, const char *path,
                         const char *interface, const char *member,
                         void *ret_error, char ***ret) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_get_property_strv>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xor    %eax,%eax
mov    0x2eb7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_get_property_strv>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_get_property_strv(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8*** %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8***
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
store i8*** %6, i8**** %14
%15 = load i32, i32* @EINVAL
%16 = sub nsw i32 0, %15
ret i32 %16
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_get_property_strv(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i8*** nocapture readnone %6) {
%8 = load i32, i32* @EINVAL
%9 = sub nsw i32 0, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ draw_symbol(int, char);
int /*<<< orphan*/ printf(char *);
void draw_inner_line(int spaces_count, int hashtags_count) {
  draw_symbol(spaces_count, ' ');
  printf("*");
  draw_symbol(hashtags_count, '#');
  printf("*");
  draw_symbol(spaces_count, ' ');
}


x86 assembly (clang, -O0):
<draw_inner_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x20,%esi
call   1040 <draw_symbol@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x23,%esi
call   1040 <draw_symbol@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x20,%esi
call   1040 <draw_symbol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_inner_line>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x20,%esi
call   1040 <draw_symbol@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
mov    $0x23,%esi
call   1040 <draw_symbol@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
mov    $0x20,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <draw_symbol@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
define void @draw_inner_line(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 @draw_symbol(i32 %5, i8 signext 32)
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = call i32 @draw_symbol(i32 %8, i8 signext 35)
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %3
%12 = call i32 @draw_symbol(i32 %11, i8 signext 32)
ret void
}

LLVM IR (-O2):
define void @draw_inner_line(i32 %0, i32 %1) {
%3 = tail call i32 @draw_symbol(i32 %0, i8 signext 32)
%4 = tail call i32 @putchar(i32 42)
%5 = tail call i32 @draw_symbol(i32 %1, i8 signext 35)
%6 = tail call i32 @putchar(i32 42)
%7 = tail call i32 @draw_symbol(i32 %0, i8 signext 32)
ret void
}
/* Variables and functions */
scalar_t__ read_char(char);
void skip_blanks() {
  while (read_char('\n') || read_char(' ') || read_char('\t')) {
  }
}


x86 assembly (clang, -O0):
<skip_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
jmp    111d <skip_blanks+0xd>
mov    $0xa,%edi
call   1030 <read_char@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    1169 <skip_blanks+0x59>
mov    $0x20,%edi
call   1030 <read_char@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    1169 <skip_blanks+0x59>
mov    $0x9,%edi
call   1030 <read_char@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
test   $0x1,%al
jne    1179 <skip_blanks+0x69>
jmp    117e <skip_blanks+0x6e>
jmp    111d <skip_blanks+0xd>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_blanks>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <read_char@plt>
test   %rax,%rax
jne    1120 <skip_blanks+0x10>
mov    $0x20,%edi
call   1030 <read_char@plt>
test   %rax,%rax
jne    1120 <skip_blanks+0x10>
mov    $0x9,%edi
call   1030 <read_char@plt>
test   %rax,%rax
jne    1120 <skip_blanks+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @skip_blanks() {
br label %1
1: ; preds = %12, %0
%2 = call i64 @read_char(i8 signext 10)
%3 = icmp ne i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = call i64 @read_char(i8 signext 32)
%6 = icmp ne i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = call i64 @read_char(i8 signext 9)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %7, %4, %1
%11 = phi i1 [ true, %4 ], [ true, %1 ], [ %9, %7 ]
br i1 %11, label %12, label %13
12: ; preds = %10
br label %1
13: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @skip_blanks() {
br label %1
1: ; preds = %4, %0
%2 = tail call i64 @read_char(i8 signext 10)
%3 = icmp eq i64 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %1, %5, %8
br label %1
5: ; preds = %1
%6 = tail call i64 @read_char(i8 signext 32)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %5
%9 = tail call i64 @read_char(i8 signext 9)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %8
ret void
}
void wifi_evt_tcpip_dns_gethostbyname_result(
    const struct wifi_msg_tcpip_dns_gethostbyname_result_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_tcpip_dns_gethostbyname_result_evt_t = type opaque
define void @wifi_evt_tcpip_dns_gethostbyname_result(%struct.wifi_msg_tcpip_dns_gethostbyname_result_evt_t* nocapture %0) {
ret void
}
void ff_hevc_put_hevc_bi_epel_v24_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v24_10_avx2() {
ret void
}
/* Variables and functions */
int inportb(int);
int serial_received() { return inportb(0x3f8 + 5) & 1; }


x86 assembly (clang, -O0):
<serial_received>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fd,%edi
call   1030 <inportb@plt>
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_received>:
push   %rax
mov    $0x3fd,%edi
call   1030 <inportb@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_received() {
%1 = call i32 @inportb(i32 1021)
%2 = and i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @serial_received() {
%1 = tail call i32 @inportb(i32 1021)
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *lglversion();
int /*<<< orphan*/ printf(char *, char *);
void version() {
  printf("%s\n", lglversion());
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <lglversion@plt>
mov    %rax,%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
xor    %eax,%eax
call   1050 <lglversion@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @version() {
%1 = call i8* (...) @lglversion()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @version() {
%1 = tail call i8* (...) @lglversion()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void GPMCNANDForcePostedWriteFeatureConfig(unsigned int baseAddr,
                                           unsigned int flag) {
  if (flag == (1)) {
    (*((volatile unsigned int *)(baseAddr + (0x50)))) |= ((0x00000001u));
  } else if (flag == (0)) {
    (*((volatile unsigned int *)(baseAddr + (0x50)))) &= (~(0x00000001u));
  }
}


x86 assembly (clang, -O0):
<GPMCNANDForcePostedWriteFeatureConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1128 <GPMCNANDForcePostedWriteFeatureConfig+0x28>
mov    -0x4(%rbp),%eax
add    $0x50,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    %ecx,(%rax)
jmp    1146 <GPMCNANDForcePostedWriteFeatureConfig+0x46>
cmpl   $0x0,-0x8(%rbp)
jne    1141 <GPMCNANDForcePostedWriteFeatureConfig+0x41>
mov    -0x4(%rbp),%eax
add    $0x50,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
jmp    1146 <GPMCNANDForcePostedWriteFeatureConfig+0x46>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCNANDForcePostedWriteFeatureConfig>:
test   %esi,%esi
je     1110 <GPMCNANDForcePostedWriteFeatureConfig+0x10>
cmp    $0x1,%esi
jne    1116 <GPMCNANDForcePostedWriteFeatureConfig+0x16>
add    $0x50,%edi
orl    $0x1,(%rdi)
ret
add    $0x50,%edi
andl   $0xfffffffe,(%rdi)
ret

LLVM IR (-O0):
define void @GPMCNANDForcePostedWriteFeatureConfig(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 = icmp eq i32 %5, 1
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add i32 %8, 80
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = or i32 %12, 1
store volatile i32 %13, i32* %11
br label %25
14: ; preds = %2
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %3
%19 = add i32 %18, 80
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
%23 = and i32 %22, -2
store volatile i32 %23, i32* %21
br label %24
24: ; preds = %17, %14
br label %25
25: ; preds = %24, %7
ret void
}

LLVM IR (-O2):
define void @GPMCNANDForcePostedWriteFeatureConfig(i32 %0, i32 %1) {
switch i32 %1, label %15 [
i32 1, label %3
i32 0, label %9
]
3: ; preds = %2
%4 = add i32 %0, 80
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 1
store volatile i32 %8, i32* %6
br label %15
9: ; preds = %2
%10 = add i32 %0, 80
%11 = zext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = and i32 %13, -2
store volatile i32 %14, i32* %12
br label %15
15: ; preds = %2, %9, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ noWarnAbort();
int /*<<< orphan*/ pwarn(char *, int);
void perr(char *function, int err) {
  if (err != 0) {
    pwarn(function, err);
    noWarnAbort();
  }
}


x86 assembly (clang, -O0):
<perr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114c <perr+0x2c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <pwarn@plt>
mov    $0x0,%al
call   1040 <noWarnAbort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perr>:
test   %esi,%esi
je     1132 <perr+0x12>
push   %rax
call   1030 <pwarn@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <noWarnAbort@plt>
ret

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

LLVM IR (-O2):
define void @perr(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @pwarn(i8* %0, i32 %1)
%6 = tail call i32 (...) @noWarnAbort()
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sys_call(int, int, int);
int /*<<< orphan*/ undoBackwards();
void changeToUserEnvirnment() {
  sys_call(8, 6, 4);
  undoBackwards();
}


x86 assembly (clang, -O0):
<changeToUserEnvirnment>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x6,%esi
mov    $0x4,%edx
call   1030 <sys_call@plt>
mov    $0x0,%al
call   1040 <undoBackwards@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeToUserEnvirnment>:
push   %rax
mov    $0x8,%edi
mov    $0x6,%esi
mov    $0x4,%edx
call   1030 <sys_call@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <undoBackwards@plt>

LLVM IR (-O0):
define void @changeToUserEnvirnment() {
%1 = call i32 @sys_call(i32 8, i32 6, i32 4)
%2 = call i32 (...) @undoBackwards()
ret void
}

LLVM IR (-O2):
define void @changeToUserEnvirnment() {
%1 = tail call i32 @sys_call(i32 8, i32 6, i32 4)
%2 = tail call i32 (...) @undoBackwards()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main() {
  setuid(0);
  system("/usr/sbin/ntpdate -b -p 8 vise4");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xec3(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"/usr/sbin/ntpdate -b -p 8 vise4\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @setuid(i32 0)
%3 = call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"/usr/sbin/ntpdate -b -p 8 vise4\00"
define i32 @main() {
%1 = tail call i32 @setuid(i32 0)
%2 = tail call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void count_to_hundred(int count) {
  printf("%d ", count);
  if (count < 100)
    count_to_hundred(count + 1);
}


x86 assembly (clang, -O0):
<count_to_hundred>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x64,-0x4(%rbp)
jge    114f <count_to_hundred+0x2f>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <count_to_hundred@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_to_hundred>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
cmp    $0x65,%edi
mov    $0x64,%ebp
cmovge %edi,%ebp
add    $0x1,%ebp
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1130 <count_to_hundred+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @count_to_hundred(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
br label %10
10: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @count_to_hundred(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 100)
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %6, %3 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add i32 %4, 1
%7 = icmp eq i32 %4, %2
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
void RTLockValidatorSetQuiet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorSetQuiet() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
void carmen_set_random_seed(unsigned int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<carmen_set_random_seed>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @carmen_set_random_seed(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
int qtst(int argc, void *argv[]) {
  float *a;
  unsigned char *dum;
  float *b;
  a = (float *)argv[0];
  dum = (unsigned char *)argv[1];
  b = (float *)argv[2];
  b[1] = 1.;
  return 1;
}


x86 assembly (clang, -O0):
<qtst>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  0xec6(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qtst>:
mov    0x10(%rsi),%rax
movl   $0x3f800000,0x4(%rax)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @qtst(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca float*
%6 = alloca i8*
%7 = alloca float*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = bitcast i8* %10 to float*
store float* %11, float** %5
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
store i8* %14, i8** %6
%15 = load i8**, i8*** %4
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = bitcast i8* %17 to float*
store float* %18, float** %7
%19 = load float*, float** %7
%20 = getelementptr inbounds float, float* %19, i64 1
store float 1.000000e+00, float* %20
ret i32 1
}

LLVM IR (-O2):
define i32 @qtst(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 2
%4 = bitcast i8** %3 to float**
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 1
store float 1.000000e+00, float* %6
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ CRL_DIST_POINTS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ CRL_DIST_POINTS_it;
void CRL_DIST_POINTS_free(CRL_DIST_POINTS *a) {
  ASN1_item_free((ASN1_VALUE *)a, &CRL_DIST_POINTS_it);
}


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

x86 assembly (clang, -O2):
<CRL_DIST_POINTS_free>:
mov    0x2ed9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@CRL_DIST_POINTS_it = global i32 0
define void @CRL_DIST_POINTS_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @CRL_DIST_POINTS_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core3_print(char *, char *, char const *);
void U_EMRSETLAYOUT_print(const char *contents) {
  core3_print("U_EMRSETLAYOUT", "iMode:", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRSETLAYOUT_print>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <core3_print@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"U_EMRSETLAYOUT\00"
@.str.1 = [7 x i8] c"iMode:\00"
define void @U_EMRSETLAYOUT_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core3_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"U_EMRSETLAYOUT\00"
@.str.1 = [7 x i8] c"iMode:\00"
define void @U_EMRSETLAYOUT_print(i8* %0) {
%2 = tail call i32 @core3_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void foo(void) {
  int i;
  printf("%d\n", i);
  i = 777;
}


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

x86 assembly (clang, -O2):
<foo>:
lea    0xee9(%rip),%rdi
mov    $0x309,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @foo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 777)
ret void
}
/* Type definitions */
struct track_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ track_info_ref(struct track_info *);
int get_one_ti(void *data, struct track_info *ti) {
  struct track_info **sel_ti = data;
  track_info_ref(ti);
  *sel_ti = ti;
  return 1;
}


x86 assembly (clang, -O0):
<get_one_ti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <track_info_ref@plt>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_one_ti>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <track_info_ref@plt>
mov    %rbx,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.track_info = type { i32 }
define i32 @get_one_ti(i8* nocapture writeonly %0, %struct.track_info* %1) {
%3 = bitcast i8* %0 to %struct.track_info**
%4 = tail call i32 @track_info_ref(%struct.track_info* %1)
store %struct.track_info* %1, %struct.track_info** %3
ret i32 1
}
/* Variables and functions */
size_t do_reads(void *, size_t, int);
size_t do_read(void *buf, size_t count) { return do_reads(buf, count, 1); }


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

x86 assembly (clang, -O2):
<do_read>:
mov    $0x1,%edx
jmp    1030 <do_reads@plt>

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

LLVM IR (-O2):
define i64 @do_read(i8* %0, i64 %1) {
%3 = tail call i64 @do_reads(i8* %0, i64 %1, i32 1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
void exec_overlay(void) { error(2); }


x86 assembly (clang, -O0):
<exec_overlay>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_overlay>:
mov    $0x2,%edi
jmp    1030 <error@plt>

LLVM IR (-O0):
define void @exec_overlay() {
%1 = call i32 @error(i32 2)
ret void
}

LLVM IR (-O2):
define void @exec_overlay() {
%1 = tail call i32 @error(i32 2)
ret void
}
int new_cusp(int icusp, int cusplist[], int ncusps) {
  int i;
  for (i = 0; i < ncusps; ++i) {
    if (cusplist[i] == icusp)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<new_cusp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <new_cusp+0x54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    1141 <new_cusp+0x41>
movl   $0x0,-0x4(%rbp)
jmp    115b <new_cusp+0x5b>
jmp    1146 <new_cusp+0x46>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <new_cusp+0x15>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_cusp>:
mov    $0x1,%eax
test   %edx,%edx
jle    111e <new_cusp+0x1e>
mov    %edx,%ecx
xor    %edx,%edx
nopl   (%rax)
cmp    %edi,(%rsi,%rdx,4)
je     111f <new_cusp+0x1f>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <new_cusp+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @new_cusp(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %16
}
/* Variables and functions */
int resta(int, int);
int suma(int, int);
int main(int argc, char *argv[]) { return suma(1, 2) + resta(20, 10); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <suma@plt>
mov    %eax,-0x14(%rbp)
mov    $0x14,%edi
mov    $0xa,%esi
call   1040 <resta@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <suma@plt>
mov    %eax,%ebx
mov    $0x14,%edi
mov    $0xa,%esi
call   1040 <resta@plt>
add    %ebx,%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 @suma(i32 1, i32 2)
%7 = call i32 @resta(i32 20, i32 10)
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @suma(i32 1, i32 2)
%4 = tail call i32 @resta(i32 20, i32 10)
%5 = add nsw i32 %4, %3
ret i32 %5
}