xunge/DecIR huggingface dataset:
void vbiosRefresh() {}


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

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

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

LLVM IR (-O2):
define void @vbiosRefresh() {
ret void
}
void XcmsTekHVCWhiteShiftColors() {}


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

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

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

LLVM IR (-O2):
define void @XcmsTekHVCWhiteShiftColors() {
ret void
}
const char *vpx_codec_version_str(void) { return "v1.8.2-125-g667138e1f"; }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"v1.8.2-125-g667138e1f\00"
define i8* @vpx_codec_version_str() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"v1.8.2-125-g667138e1f\00"
define i8* @vpx_codec_version_str() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float r;
  float a, b;
  scanf("%f", &r);
  a = 3.14 * r * r;
  b = 2 * 3.14 * r;
  printf("%.2f %.2f", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe85(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mulsd  0xeb0(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [10 x i8] c"%.2f %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = fmul double 3.140000e+00, %7
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fmul double %8, %10
%12 = fptrunc double %11 to float
store float %12, float* %3
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fmul double 6.280000e+00, %14
%16 = fptrunc double %15 to float
store float %16, float* %4
%17 = load float, float* %3
%18 = load float, float* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), float %17, float %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [10 x i8] c"%.2f %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fmul double %5, 3.140000e+00
%7 = fmul double %6, %5
%8 = fptrunc double %7 to float
%9 = fmul double %5, 6.280000e+00
%10 = fptrunc double %9 to float
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), float %8, float %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ log_error(char *, ...);
void usage(char *invoked_as) {
  log_error("Usage: %s <message type>\n", invoked_as);
  log_error("  message type: status | quit\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <log_error@plt>
lea    0xef1(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <log_error@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: %s <message type>\0A\00"
@.str.1 = [31 x i8] c" message type: status | quit\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @log_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @log_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Usage: %s <message type>\0A\00"
@.str.1 = [31 x i8] c" message type: status | quit\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @log_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @log_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double tmap_time_realtime() {
  struct timeval tp;
  struct timezone tzp;
  gettimeofday(&tp, &tzp);
  return tp.tv_sec + tp.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<tmap_time_realtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmap_time_realtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
%struct.timezone = type { i32 }
define double @tmap_time_realtime() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
%struct.timezone = type { i32 }
define double @tmap_time_realtime() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to double
%11 = tail call double @llvm.fmuladd.f64(double %10, double 0x3EB0C6F7A0B5ED8D, double %7)
ret double %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
scalar_t__ bitcount_SSE2(int);
uint32_t count_states_SSE2(uint32_t *A) {
  uint32_t count = 0;
  for (uint32_t i = 0; i < (1 << 19); i++) {
    count += bitcount_SSE2(A[i]);
  }
  return count;
}


x86 assembly (clang, -O0):
<count_states_SSE2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x80000,-0x10(%rbp)
jge    1162 <count_states_SSE2+0x52>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <bitcount_SSE2@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <count_states_SSE2+0x1a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_states_SSE2>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
call   1030 <bitcount_SSE2@plt>
add    %eax,%ebp
add    $0x1,%rbx
cmp    $0x80000,%rbx
jne    1120 <count_states_SSE2+0x10>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @count_states_SSE2(i32* nocapture %0) {
br label %3
2: ; preds = %3
ret i32 %10
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %11, %3 ]
%5 = phi i32 [ 0, %1 ], [ %10, %3 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %4
%7 = load i32, i32* %6
%8 = tail call i64 @bitcount_SSE2(i32 %7)
%9 = trunc i64 %8 to i32
%10 = add i32 %5, %9
%11 = add nuw nsw i64 %4, 1
%12 = icmp eq i64 %11, 524288
br i1 %12, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ _unsupported();
void compilerrt_abort_impl() { _unsupported(); }


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

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

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

LLVM IR (-O2):
define void @compilerrt_abort_impl() {
%1 = tail call i32 (...) @_unsupported()
ret void
}
int pgn_read_until_begin_comment(char *buffer, int index) {
  for (; buffer[index] != '{' && buffer[index] != '\0'; index++)
    ;
  return index;
}


x86 assembly (clang, -O0):
<pgn_read_until_begin_comment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x7b,%ecx
mov    %al,-0xd(%rbp)
je     113a <pgn_read_until_begin_comment+0x3a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114a <pgn_read_until_begin_comment+0x4a>
jmp    115d <pgn_read_until_begin_comment+0x5d>
jmp    114f <pgn_read_until_begin_comment+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <pgn_read_until_begin_comment+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pgn_read_until_begin_comment>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
nopl   0x0(%rax,%rax,1)
movzbl (%rcx),%edx
test   %dl,%dl
je     1125 <pgn_read_until_begin_comment+0x25>
cmp    $0x7b,%dl
je     1125 <pgn_read_until_begin_comment+0x25>
add    $0x1,%eax
add    $0x1,%rcx
jmp    1110 <pgn_read_until_begin_comment+0x10>
ret

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

LLVM IR (-O2):
define i32 @pgn_read_until_begin_comment(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %9, %8 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %8 [
i8 123, label %10
i8 0, label %10
]
8: ; preds = %4
%9 = add i64 %5, 1
br label %4
10: ; preds = %4, %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
int fn18(void) {
  static int d = 6;
  return d;
}


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

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

LLVM IR (-O0):
@fn18.d = internal global i32 6
define i32 @fn18() {
%1 = load i32, i32* @fn18.d
ret i32 %1
}

LLVM IR (-O2):
define i32 @fn18() {
ret i32 6
}
int AMCTimingEvent_Add(struct AMCTimingEvent *timeEvent,
                       struct AMCTimingEventBase *timeEvBase) {
  return -1;
}


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

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

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

LLVM IR (-O2):
%struct.AMCTimingEvent = type opaque
%struct.AMCTimingEventBase = type opaque
define i32 @AMCTimingEvent_Add(%struct.AMCTimingEvent* nocapture readnone %0, %struct.AMCTimingEventBase* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
cabecalho(char *titulo) {
  printf("\n**********************************\n");
  printf("* %s \n", titulo);
  printf("**********************************\n\n");
}


x86 assembly (clang, -O0):
<cabecalho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cabecalho>:
push   %rbx
mov    %rdi,%rbx
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str.1 = [7 x i8] c"* %s \0A\00"
@str = [36 x i8] c"\0A**********************************\00"
@str.3 = [36 x i8] c"**********************************\0A\00"
define i32 @cabecalho(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.3, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct hlist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ hlist_del(struct hlist_node *);
void hash_delete(struct hlist_node *node) { hlist_del(node); }


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

x86 assembly (clang, -O2):
<hash_delete>:
jmp    1030 <hlist_del@plt>

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

LLVM IR (-O2):
%struct.hlist_node = type { i32 }
define void @hash_delete(%struct.hlist_node* %0) {
%2 = tail call i32 @hlist_del(%struct.hlist_node* %0)
ret void
}
/* Type definitions */
struct ac_package_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct ac_package_head *);
int /*<<< orphan*/ free(struct ac_package_head *);
void package_head_free(struct ac_package_head *head) {
  assert(head);
  free(head);
}


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

x86 assembly (clang, -O2):
<package_head_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ac_package_head = type { i32 }
define void @package_head_free(%struct.ac_package_head* %0) {
%2 = alloca %struct.ac_package_head*
store %struct.ac_package_head* %0, %struct.ac_package_head** %2
%3 = load %struct.ac_package_head*, %struct.ac_package_head** %2
%4 = call i32 @assert(%struct.ac_package_head* %3)
%5 = load %struct.ac_package_head*, %struct.ac_package_head** %2
%6 = call i32 @free(%struct.ac_package_head* %5)
ret void
}

LLVM IR (-O2):
%struct.ac_package_head = type { i32 }
define void @package_head_free(%struct.ac_package_head* %0) {
%2 = tail call i32 @assert(%struct.ac_package_head* %0)
%3 = tail call i32 @free(%struct.ac_package_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DecodeDEa_xxxxdddxssmmmrrr();
int /*<<< orphan*/ DoBinOpAnd(int /*<<< orphan*/);
void DoCodeAndDEa(void) { DoBinOpAnd(DecodeDEa_xxxxdddxssmmmrrr()); }


x86 assembly (clang, -O0):
<DoCodeAndDEa>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <DecodeDEa_xxxxdddxssmmmrrr@plt>
mov    %eax,%edi
call   1030 <DoBinOpAnd@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @DoCodeAndDEa() {
%1 = call i32 (...) @DecodeDEa_xxxxdddxssmmmrrr()
%2 = call i32 @DoBinOpAnd(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DoCodeAndDEa() {
%1 = tail call i32 (...) @DecodeDEa_xxxxdddxssmmmrrr()
%2 = tail call i32 @DoBinOpAnd(i32 %1)
ret void
}
/* Variables and functions */
int f247(int *);
int f248(int *p) { return f247(p); }


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

x86 assembly (clang, -O2):
<f248>:
jmp    1030 <f247@plt>

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

LLVM IR (-O2):
define i32 @f248(i32* %0) {
%2 = tail call i32 @f247(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double *, int);
void Veccopy(double *src, double *dest, int length) {
  memcpy(dest, src, length * sizeof(double));
}


x86 assembly (clang, -O0):
<Veccopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Veccopy>:
mov    %rdi,%rax
shl    $0x3,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @Veccopy(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %5
%8 = load double*, double** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(double* %7, double* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @Veccopy(double* %0, double* %1, i32 %2) {
%4 = shl i32 %2, 3
%5 = tail call i32 @memcpy(double* %1, double* %0, i32 %4)
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
scalar_t__ send(int, char *, scalar_t__, int /*<<< orphan*/);
scalar_t__ strlen(char *);
void send_to_server(int sock, char *packet) {
  int32_t pktlen;
  pktlen = strlen(packet);
  if (send(sock, packet, pktlen, 0) != pktlen) {
    printf("send_to_server(): failure");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<send_to_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    -0x18(%rbp),%rax
je     118e <send_to_server+0x4e>
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_to_server>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbp
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %ecx,%ecx
call   1040 <send@plt>
cmp    %rbp,%rax
jne    116f <send_to_server+0x2f>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xe8a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"send_to_server(): failure\00"
define void @send_to_server(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i64 @send(i32 %8, i8* %9, i64 %10, i32 0)
%12 = load i64, i64* %5
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"send_to_server(): failure\00"
define void @send_to_server(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @send(i32 %0, i8* %1, i64 %3, i32 0)
%5 = icmp eq i64 %4, %3
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
void close_interface(void) {}


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

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

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

LLVM IR (-O2):
define void @close_interface() {
ret void
}
int qsort_desc_rvector(const void *a, const void *b) {
  const double *aa = a;
  const double *bb = b;
  if (*aa < *bb)
    return 1;
  else if (*aa == *bb)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<qsort_desc_rvector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1142 <qsort_desc_rvector+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1176 <qsort_desc_rvector+0x76>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jne    116a <qsort_desc_rvector+0x6a>
jp     116a <qsort_desc_rvector+0x6a>
movl   $0x0,-0x4(%rbp)
jmp    1176 <qsort_desc_rvector+0x76>
jmp    116f <qsort_desc_rvector+0x6f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_desc_rvector>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
ucomisd %xmm0,%xmm1
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rcx
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qsort_desc_rvector(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp olt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %27
18: ; preds = %2
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fcmp oeq double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 0, i32* %3
br label %27
25: ; preds = %18
br label %26
26: ; preds = %25
store i32 -1, i32* %3
br label %27
27: ; preds = %26, %24, %17
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @qsort_desc_rvector(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = fcmp une double %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int _print_nb(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int printf_handle_flag_x(va_list *parameters) {
  return _print_nb(parameters, 0, 16);
}


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

x86 assembly (clang, -O2):
<printf_handle_flag_x>:
xor    %esi,%esi
mov    $0x10,%edx
jmp    1030 <_print_nb@plt>

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

LLVM IR (-O2):
define i32 @printf_handle_flag_x(i32* %0) {
%2 = tail call i32 @_print_nb(i32* %0, i32 0, i32 16)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gx_device_finalize(void *);
void spotcmyk_device_finalize(void *vpdev) { gx_device_finalize(vpdev); }


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

x86 assembly (clang, -O2):
<spotcmyk_device_finalize>:
jmp    1030 <gx_device_finalize@plt>

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

LLVM IR (-O2):
define void @spotcmyk_device_finalize(i8* %0) {
%2 = tail call i32 @gx_device_finalize(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
int main(void) {
  long nc;
  nc = 0;
  while (getchar() != EOF)
    ++nc;
  printf("%ld\n", nc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     115f <main+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i64 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void activate_noTV(void) {
  system("xrandr --auto &> /dev/null");
  system("xrandr --output TV --off &> /dev/null");
}


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

x86 assembly (clang, -O2):
<activate_noTV>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xef7(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"xrandr --auto &> /dev/null\00"
@.str.1 = [38 x i8] c"xrandr --output TV --off &> /dev/null\00"
define void @activate_noTV() {
%1 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"xrandr --auto &> /dev/null\00"
@.str.1 = [38 x i8] c"xrandr --output TV --off &> /dev/null\00"
define void @activate_noTV() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendemail(char *, char *);
int main(int argc, char **argv) {
  char email[] = "fakessh@fakessh.eu";
  char body[] = "From: \"www\"<fakessh@fakessh.eu>\r\n"
                "To: \"w111\"<john.swilting@wanadoo.fr>\r\n"
                "Subject: Hello\r\n\r\n"
                "Hello World, Hello Email!";
  sendemail(email, body);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeba(%rip),%ax
mov    %ax,-0x20(%rbp)
mov    0xeb2(%rip),%al
mov    %al,-0x1e(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x73,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1040 <sendemail@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x98,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x75652e,0xf(%rsp)
movaps 0xf4f(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xf30(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf14(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x216c69,0x8f(%rsp)
mov    %rsp,%rdi
lea    0x20(%rsp),%rsi
call   1030 <sendemail@plt>
xor    %eax,%eax
add    $0x98,%rsp
ret

LLVM IR (-O0):
@__const.main.email = [19 x i8] c"fakessh@fakessh.eu\00"
@__const.main.body = [115 x i8] c"From: \22www\22<fakessh@fakessh.eu>\0D\0ATo: \22w111\22<john.swilting@wanadoo.fr>\0D\0ASubject: Hello\0D\0A\0D\0AHello World, Hello Email!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [19 x i8]
%7 = alloca [115 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [19 x i8]* %6 to i8*
%9 = bitcast [115 x i8]* %7 to i8*
%10 = getelementptr inbounds [19 x i8], [19 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [115 x i8], [115 x i8]* %7, i64 0, i64 0
%12 = call i32 @sendemail(i8* %10, i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.email = [19 x i8] c"fakessh@fakessh.eu\00"
@__const.main.body = [115 x i8] c"From: \22www\22<fakessh@fakessh.eu>\0D\0ATo: \22w111\22<john.swilting@wanadoo.fr>\0D\0ASubject: Hello\0D\0A\0D\0AHello World, Hello Email!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [19 x i8]
%4 = alloca [115 x i8]
%5 = getelementptr inbounds [19 x i8], [19 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [115 x i8], [115 x i8]* %4, i64 0, i64 0
%7 = call i32 @sendemail(i8* %5, i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void c_freep(void **arg) {
  if (*arg) {
    free(*arg);
  }
  *arg = NULL;
}


x86 assembly (clang, -O0):
<c_freep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <c_freep+0x26>
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):
<c_freep>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1121 <c_freep+0x11>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @c_freep(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)
br label %6
6: ; preds = %4, %1
store i8* null, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(void) {
  for (;;) {
    (void)sleep(4);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <sleep@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x4,%edi
call   1030 <sleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 @sleep(i32 4)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 4)
br label %1
}
/* Variables and functions */
void *alignup(void *p) { return (void *)(((uintptr_t)p + 32 - 1) & -32); }


x86 assembly (clang, -O0):
<alignup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rax
sub    $0x1,%rax
and    $0xffffffffffffffe0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alignup>:
lea    0x1f(%rdi),%rax
and    $0xffffffffffffffe0,%rax
ret

LLVM IR (-O0):
define i8* @alignup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = add i64 %4, 32
%6 = sub i64 %5, 1
%7 = and i64 %6, -32
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @alignup(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = add i64 %2, 31
%4 = and i64 %3, -32
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void sig_urg(int sig) {
  int n = 1;
  char buff[2048];
  printf("SIGURG recu \n");
  printf("Recepteur: recu signal SIGURG (%d): caractere urgent\n", sig);
  printf("read %d OOB octets %s\n", n, buff);
}


x86 assembly (clang, -O0):
<sig_urg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    -0x810(%rbp),%rdx
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_urg>:
push   %rbx
sub    $0x800,%rsp
mov    %edi,%ebx
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee9(%rip),%rdi
mov    %rsp,%rdx
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"SIGURG recu \0A\00"
@.str.1 = [54 x i8] c"Recepteur: recu signal SIGURG (%d): caractere urgent\0A\00"
@.str.2 = [23 x i8] c"read %d OOB octets %s\0A\00"
define void @sig_urg(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2048 x i8]
store i32 %0, i32* %2
store i32 1, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = getelementptr inbounds [2048 x i8], [2048 x i8]* %4, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [54 x i8] c"Recepteur: recu signal SIGURG (%d): caractere urgent\0A\00"
@.str.2 = [23 x i8] c"read %d OOB octets %s\0A\00"
@str = [13 x i8] c"SIGURG recu \00"
define void @sig_urg(i32 %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 1, i8* %3)
ret void
}
/* Variables and functions */
int nondet_int();
int register_blkdev(unsigned int major___0, char const *name) {
  int result;
  int tmp;
  {
    tmp = nondet_int();
    result = tmp;
    return (result);
  }
}


x86 assembly (clang, -O0):
<register_blkdev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @register_blkdev(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @nondet_int()
ret i32 %3
}
main(argc, argv) int argc;
char **argv;
{
  close(0);
  dup(2);
  execvp(argv[1], argv + 1);
  perror("could not execute program");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1040 <close@plt>
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <dup@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x0,%al
call   1060 <execvp@plt>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <perror@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %edi,%edi
xor    %eax,%eax
call   1040 <close@plt>
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <dup@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <execvp@plt>
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1050 <perror@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"could not execute program\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 0)
%6 = call i32 (i32, ...) bitcast (i32 (...)* @dup to i32 (i32, ...)*)(i32 2)
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execvp to i32 (i8*, i8**, ...)*)(i8* %9, i8** %11)
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"could not execute program\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 0)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @dup to i32 (i32, ...)*)(i32 2)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execvp to i32 (i8*, i8**, ...)*)(i8* %6, i8** %5)
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tcsendbreak(int, int /*<<< orphan*/);
int main() { tcsendbreak(1, 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <tcsendbreak@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @tcsendbreak(i32 1, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @tcsendbreak(i32 1, i32 0)
ret i32 0
}
/* Variables and functions */
double const exp(double);
double get_damp_tt_grad(double r) {
  static const double a = 1.5;
  double ra = r * a;
  double ra2 = ra * ra;
  double ra6 = ra2 * ra2 * ra2;
  return a * exp(-ra) * ra6 / 720.0;
}


x86 assembly (clang, -O0):
<get_damp_tt_grad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe8a(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe71(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_damp_tt_grad>:
sub    $0x18,%rsp
mulsd  0xee4(%rip),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,(%rsp)
xorpd  0xed3(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xeb6(%rip),%xmm0
mulsd  (%rsp),%xmm0
divsd  0xeb1(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@get_damp_tt_grad.a = internal constant double 1.500000e+00
define double @get_damp_tt_grad(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = fmul double %6, 1.500000e+00
store double %7, double* %3
%8 = load double, double* %3
%9 = load double, double* %3
%10 = fmul double %8, %9
store double %10, double* %4
%11 = load double, double* %4
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = load double, double* %4
%15 = fmul double %13, %14
store double %15, double* %5
%16 = load double, double* %3
%17 = fneg double %16
%18 = call double @exp(double %17)
%19 = fmul double 1.500000e+00, %18
%20 = load double, double* %5
%21 = fmul double %19, %20
%22 = fdiv double %21, 7.200000e+02
ret double %22
}

LLVM IR (-O2):
define double @get_damp_tt_grad(double %0) {
%2 = fmul double %0, 1.500000e+00
%3 = fmul double %2, %2
%4 = fmul double %3, %3
%5 = fmul double %3, %4
%6 = fneg double %2
%7 = tail call double @exp(double %6)
%8 = fmul double %7, 1.500000e+00
%9 = fmul double %5, %8
%10 = fdiv double %9, 7.200000e+02
ret double %10
}
int f17(int x) { return x * 17; }


x86 assembly (clang, -O0):
<f17>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x11,-0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f17>:
mov    %edi,%eax
shl    $0x4,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f17(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 17
ret i32 %4
}

LLVM IR (-O2):
define i32 @f17(i32 %0) {
%2 = mul nsw i32 %0, 17
ret i32 %2
}
/* Variables and functions */
int shell_main();
int main(int argc, char *argv[]) {
  int status = 0;
  while (1) {
    status = shell_main();
    if (status == (-1)) {
      break;
    }
  }
  return status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <shell_main@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1146 <main+0x36>
jmp    114b <main+0x3b>
jmp    112d <main+0x1d>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <shell_main@plt>
cmp    $0xffffffff,%eax
jne    1120 <main+0x10>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 (...) @shell_main()
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
ret i32 -1
}