xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ perf_env_bool(char *, int /*<<< orphan*/);
int perf_config_system(void) {
  return !perf_env_bool("PERF_CONFIG_NOSYSTEM", 0);
}


x86 assembly (clang, -O0):
<perf_config_system>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %esi,%esi
call   1030 <perf_env_bool@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<perf_config_system>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <perf_env_bool@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"PERF_CONFIG_NOSYSTEM\00"
define i32 @perf_config_system() {
%1 = call i32 @perf_env_bool(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
@.str = [21 x i8] c"PERF_CONFIG_NOSYSTEM\00"
define i32 @perf_config_system() {
%1 = tail call i32 @perf_env_bool(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void hi_stacktrace_fd(int fd) {
  if (fd > 0) {
  }
}


x86 assembly (clang, -O0):
<hi_stacktrace_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1116 <hi_stacktrace_fd+0x16>
jmp    1116 <hi_stacktrace_fd+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @hi_stacktrace_fd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @hi_stacktrace_fd(i32 %0) {
ret void
}
unsigned char hextochar(char a, char b) {
  unsigned char hn, ln;
  hn = a > '9' ? a - 'a' + 10 : a - '0';
  ln = b > '9' ? b - 'a' + 10 : b - '0';
  return ((hn << 4) | ln);
}


x86 assembly (clang, -O0):
<hextochar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jle    112f <hextochar+0x2f>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1139 <hextochar+0x39>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jle    115e <hextochar+0x5e>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
jmp    1168 <hextochar+0x68>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0x4(%rbp)
movzbl -0x3(%rbp),%eax
shl    $0x4,%eax
movzbl -0x4(%rbp),%ecx
or     %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hextochar>:
xor    %ecx,%ecx
cmp    $0x3a,%dil
mov    $0x39,%eax
cmovl  %ecx,%eax
add    %dil,%al
cmp    $0x3a,%sil
mov    $0xa9,%ecx
mov    $0xd0,%edx
cmovge %ecx,%edx
add    %sil,%dl
shl    $0x4,%al
or     %dl,%al
ret

LLVM IR (-O0):
define zeroext i8 @hextochar(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp sgt i32 %8, 57
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 97
%14 = add nsw i32 %13, 10
br label %19
15: ; preds = %2
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 48
br label %19
19: ; preds = %15, %10
%20 = phi i32 [ %14, %10 ], [ %18, %15 ]
%21 = trunc i32 %20 to i8
store i8 %21, i8* %5
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp sgt i32 %23, 57
br i1 %24, label %25, label %30
25: ; preds = %19
%26 = load i8, i8* %4
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %27, 97
%29 = add nsw i32 %28, 10
br label %34
30: ; preds = %19
%31 = load i8, i8* %4
%32 = sext i8 %31 to i32
%33 = sub nsw i32 %32, 48
br label %34
34: ; preds = %30, %25
%35 = phi i32 [ %29, %25 ], [ %33, %30 ]
%36 = trunc i32 %35 to i8
store i8 %36, i8* %6
%37 = load i8, i8* %5
%38 = zext i8 %37 to i32
%39 = shl i32 %38, 4
%40 = load i8, i8* %6
%41 = zext i8 %40 to i32
%42 = or i32 %39, %41
%43 = trunc i32 %42 to i8
ret i8 %43
}

LLVM IR (-O2):
define zeroext i8 @hextochar(i8 signext %0, i8 signext %1) {
%3 = icmp sgt i8 %0, 57
%4 = select i1 %3, i8 57, i8 0
%5 = add i8 %4, %0
%6 = icmp sgt i8 %1, 57
%7 = select i1 %6, i8 -87, i8 -48
%8 = add i8 %7, %1
%9 = shl i8 %5, 4
%10 = or i8 %9, %8
ret i8 %10
}
int are_bytes_reversed(void) {
  typedef unsigned long multi_t;
  unsigned char multibyte_integral_bytes[sizeof(multi_t)];
  multi_t *multibyte_integral;
  multibyte_integral = (multi_t *)(&multibyte_integral_bytes[0]);
  *multibyte_integral = 0x01;
  if (multibyte_integral_bytes[0] == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<are_bytes_reversed>:
push   %rbp
mov    %rsp,%rbp
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x1,(%rax)
movzbl -0xc(%rbp),%eax
cmp    $0x0,%eax
jne    1130 <are_bytes_reversed+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <are_bytes_reversed+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @are_bytes_reversed() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca i64*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
store i64 1, i64* %6
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %0
store i32 1, i32* %1
br label %13
12: ; preds = %0
store i32 0, i32* %1
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @are_bytes_reversed() {
ret i32 0
}
/* Type definitions */
struct node_operations {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *, int);
void example_enter(void *node, void *object, struct node_operations *ops) {
  int *ctx = (int *)object;
  *ctx = *ctx + 1;
  printf("example_enter %p %d\n", node, *ctx);
}


x86 assembly (clang, -O0):
<example_enter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example_enter>:
mov    %rdi,%rax
mov    (%rsi),%edx
add    $0x1,%edx
mov    %edx,(%rsi)
lea    0xedf(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.node_operations = type { i32 }
@.str = [21 x i8] c"example_enter %p %d\0A\00"
define void @example_enter(i8* %0, i8* %1, %struct.node_operations* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.node_operations*
%7 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.node_operations* %2, %struct.node_operations** %6
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i8*, i8** %4
%15 = load i32*, i32** %7
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %14, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.node_operations = type { i32 }
@.str = [21 x i8] c"example_enter %p %d\0A\00"
define void @example_enter(i8* %0, i8* nocapture %1, %struct.node_operations* nocapture readnone %2) {
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ size;

/* Variables and functions */
int /*<<< orphan*/ memcpy(long long *, unsigned char const *, int);
long long unpackValueLongLong(unsigned char const **data) {
  long long size;
  memcpy(&size, *data, sizeof(size));
  *data += sizeof(size);
  return size;
}


x86 assembly (clang, -O0):
<unpackValueLongLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0x10(%rbp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpackValueLongLong>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
addq   $0x8,(%rbx)
mov    0x8(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @unpackValueLongLong(i8** nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i8*, i8** %0
%5 = call i32 @memcpy(i64* %2, i8* %4, i32 8)
%6 = load i8*, i8** %0
%7 = getelementptr inbounds i8, i8* %6, i64 8
store i8* %7, i8** %0
%8 = load i64, i64* %2
ret i64 %8
}
double s(double x, double y, double (*f)(double, double), double i) {
  return f(x, y) < 0 ? i : 0;
}


x86 assembly (clang, -O0):

:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   *%rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    114a <s+0x4a>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1157 <s+0x57>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1157 <s+0x57>
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):

:
sub    $0x18,%rsp
movaps %xmm2,(%rsp)
call   *%rdi
xorpd  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
andpd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @s(double %0, double %1, double (double, double)* %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double (double, double)*
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double (double, double)* %2, double (double, double)** %7
store double %3, double* %8
%9 = load double (double, double)*, double (double, double)** %7
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call double %9(double %10, double %11)
%13 = fcmp olt double %12, 0.000000e+00
br i1 %13, label %14, label %16
14: ; preds = %4
%15 = load double, double* %8
br label %17
16: ; preds = %4
br label %17
17: ; preds = %16, %14
%18 = phi double [ %15, %14 ], [ 0.000000e+00, %16 ]
ret double %18
}

LLVM IR (-O2):
define double @s(double %0, double %1, double (double, double)* nocapture %2, double %3) {
%5 = tail call double %2(double %0, double %1)
%6 = fcmp olt double %5, 0.000000e+00
%7 = select i1 %6, double %3, double 0.000000e+00
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ str_ltrim(char *);
int /*<<< orphan*/ str_rtrim(char *);
int str_trim(char *s) {
  if (!s || !*s) {
    return -1;
  }
  str_ltrim(s);
  str_rtrim(s);
  return 0;
}


x86 assembly (clang, -O0):
<str_trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1144 <str_trim+0x24>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1150 <str_trim+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <str_trim+0x49>
mov    -0x10(%rbp),%rdi
call   1040 <str_ltrim@plt>
mov    -0x10(%rbp),%rdi
call   1030 <str_rtrim@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_trim>:
push   %rbx
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     1145 <str_trim+0x25>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1145 <str_trim+0x25>
mov    %rbx,%rdi
call   1040 <str_ltrim@plt>
mov    %rbx,%rdi
call   1030 <str_rtrim@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @str_trim(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%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** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %6, %1
store i32 -1, i32* %2
br label %16
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = call i32 @str_ltrim(i8* %12)
%14 = load i8*, i8** %3
%15 = call i32 @str_rtrim(i8* %14)
store i32 0, i32* %2
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @str_trim(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @str_ltrim(i8* %0)
%8 = tail call i32 @str_rtrim(i8* %0)
br label %9
9: ; preds = %1, %3, %6
%10 = phi i32 [ 0, %6 ], [ -1, %3 ], [ -1, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void main(int argc, char **argv) {
  int i = 0;
  for (i = 1; i < argc; i++)
    printf("%s\n", argv[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1145 <main+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xed1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
store i32 1, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8**, i8*** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %11, i64 %13
%15 = load i8*, i8** %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[] = {1, 3, 4, 5, 1, 3, 4, 5, 6, 7, 8, 7, 8, 9, 9, 10, 10};
  int n = sizeof(a) / sizeof(int);
  int b = 0;
  for (int i = 0; i < n; i++) {
    b ^= a[i];
  }
  printf("%d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x44,%edx
call   1040 <memcpy@plt>
movl   $0x11,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1181 <main+0x61>
movslq -0x5c(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%eax
xor    -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1159 <main+0x39>
mov    -0x58(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [17 x i32] [i32 1, i32 3, i32 4, i32 5, i32 1, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 7, i32 8, i32 9, i32 9, i32 10, i32 10]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [17 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [17 x i32]* %2 to i8*
store i32 17, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [17 x i32], [17 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %4
%17 = xor i32 %16, %15
store i32 %17, i32* %4
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
%22 = load i32, i32* %4
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int nummer = 105;
  printf("Ist %d eine Primzahl?\n", nummer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x69,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%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
mov    $0x69,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"Ist %d eine Primzahl?\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 105)
ret i32 0
}
int xtensa_op2p1(v)
int v;
{
  switch (v) {
  case 1:
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
  case 10:
  case 11:
  case 12:
  case 13:
  case 14:
  case 15:
  case 16: {
    return 1;
  } break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<xtensa_op2p1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
sub    $0xf,%eax
ja     1127 <xtensa_op2p1+0x27>
jmp    111b <xtensa_op2p1+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <xtensa_op2p1+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtensa_op2p1>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x10,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @xtensa_op2p1(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 16
%4 = zext i1 %3 to i32
ret i32 %4
}
int decode_utf8_length(unsigned char data) {
  int n;
  for (n = 2; n < 7; ++n) {
    if (((data >> (7 - n)) & 0x07) == 0x06) {
      return n;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<decode_utf8_length>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1153 <decode_utf8_length+0x53>
movzbl -0x5(%rbp),%eax
mov    $0x7,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x7,%eax
cmp    $0x6,%eax
jne    1140 <decode_utf8_length+0x40>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <decode_utf8_length+0x5a>
jmp    1145 <decode_utf8_length+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <decode_utf8_length+0x11>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_utf8_length>:
mov    %edi,%ecx
and    $0xffffffe0,%ecx
mov    $0x2,%eax
cmp    $0xc0,%ecx
je     114f <decode_utf8_length+0x4f>
mov    %edi,%ecx
and    $0x70,%ecx
mov    $0x3,%eax
cmp    $0x60,%ecx
je     114f <decode_utf8_length+0x4f>
mov    %edi,%ecx
and    $0x38,%ecx
mov    $0x4,%eax
cmp    $0x30,%ecx
je     114f <decode_utf8_length+0x4f>
mov    %edi,%ecx
and    $0x1c,%ecx
mov    $0x5,%eax
cmp    $0x18,%ecx
je     114f <decode_utf8_length+0x4f>
and    $0xe,%edi
xor    %ecx,%ecx
cmp    $0xc,%edi
mov    $0x6,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @decode_utf8_length(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 224
%4 = icmp eq i32 %3, 192
br i1 %4, label %18, label %5
5: ; preds = %1
%6 = and i32 %2, 112
%7 = icmp eq i32 %6, 96
br i1 %7, label %18, label %8
8: ; preds = %5
%9 = and i32 %2, 56
%10 = icmp eq i32 %9, 48
br i1 %10, label %18, label %11
11: ; preds = %8
%12 = and i32 %2, 28
%13 = icmp eq i32 %12, 24
br i1 %13, label %18, label %14
14: ; preds = %11
%15 = and i32 %2, 14
%16 = icmp eq i32 %15, 12
%17 = select i1 %16, i32 6, i32 0
br label %18
18: ; preds = %14, %11, %8, %5, %1
%19 = phi i32 [ 2, %1 ], [ 3, %5 ], [ 4, %8 ], [ 5, %11 ], [ %17, %14 ]
ret i32 %19
}
double POW10(int exp) {
  double result = 1;
  while (exp) {
    result *= 10;
    exp--;
  }
  return result;
}


x86 assembly (clang, -O0):
<POW10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <POW10+0x3e>
movsd  0xee2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1114 <POW10+0x14>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<POW10>:
test   %edi,%edi
je     1134 <POW10+0x34>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
je     113d <POW10+0x3d>
xor    %edx,%edx
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x1,%edx
cmp    %edx,%ecx
jne    1120 <POW10+0x20>
sub    %edx,%edi
cmp    $0x7,%eax
jae    114a <POW10+0x4a>
jmp    1185 <POW10+0x85>
movsd  0xec4(%rip),%xmm0
ret
movsd  0xebb(%rip),%xmm0
cmp    $0x7,%eax
jb     1185 <POW10+0x85>
movsd  0xeb6(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
add    $0xfffffff8,%edi
jne    1160 <POW10+0x60>
ret

LLVM IR (-O0):
define double @POW10(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
store double 1.000000e+00, double* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load double, double* %3
%9 = fmul double %8, 1.000000e+01
store double %9, double* %3
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @POW10(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %33, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp eq i32 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %3, %7
%8 = phi double [ %11, %7 ], [ 1.000000e+00, %3 ]
%9 = phi i32 [ %12, %7 ], [ %0, %3 ]
%10 = phi i32 [ %13, %7 ], [ 0, %3 ]
%11 = fmul double %8, 1.000000e+01
%12 = add nsw i32 %9, -1
%13 = add i32 %10, 1
%14 = icmp eq i32 %13, %5
br i1 %14, label %15, label %7
15: ; preds = %7, %3
%16 = phi double [ undef, %3 ], [ %11, %7 ]
%17 = phi double [ 1.000000e+00, %3 ], [ %11, %7 ]
%18 = phi i32 [ %0, %3 ], [ %12, %7 ]
%19 = icmp ult i32 %4, 7
br i1 %19, label %33, label %20
20: ; preds = %15, %20
%21 = phi double [ %30, %20 ], [ %17, %15 ]
%22 = phi i32 [ %31, %20 ], [ %18, %15 ]
%23 = fmul double %21, 1.000000e+01
%24 = fmul double %23, 1.000000e+01
%25 = fmul double %24, 1.000000e+01
%26 = fmul double %25, 1.000000e+01
%27 = fmul double %26, 1.000000e+01
%28 = fmul double %27, 1.000000e+01
%29 = fmul double %28, 1.000000e+01
%30 = fmul double %29, 1.000000e+01
%31 = add nsw i32 %22, -8
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %20
33: ; preds = %15, %20, %1
%34 = phi double [ 1.000000e+00, %1 ], [ %16, %15 ], [ %30, %20 ]
ret double %34
}
/* Variables and functions */
int /*<<< orphan*/ test_match_prefix();
int /*<<< orphan*/ test_mg_fetch();
int /*<<< orphan*/ test_parse_http_request();
int /*<<< orphan*/ test_remove_double_dots();
int /*<<< orphan*/ test_should_keep_alive();
int main(void) {
  test_match_prefix();
  test_remove_double_dots();
  test_should_keep_alive();
  test_parse_http_request();
  test_mg_fetch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_match_prefix@plt>
mov    $0x0,%al
call   1050 <test_remove_double_dots@plt>
mov    $0x0,%al
call   1070 <test_should_keep_alive@plt>
mov    $0x0,%al
call   1040 <test_parse_http_request@plt>
mov    $0x0,%al
call   1060 <test_mg_fetch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_match_prefix@plt>
xor    %eax,%eax
call   1050 <test_remove_double_dots@plt>
xor    %eax,%eax
call   1070 <test_should_keep_alive@plt>
xor    %eax,%eax
call   1040 <test_parse_http_request@plt>
xor    %eax,%eax
call   1060 <test_mg_fetch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_match_prefix()
%3 = call i32 (...) @test_remove_double_dots()
%4 = call i32 (...) @test_should_keep_alive()
%5 = call i32 (...) @test_parse_http_request()
%6 = call i32 (...) @test_mg_fetch()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_match_prefix()
%2 = tail call i32 (...) @test_remove_double_dots()
%3 = tail call i32 (...) @test_should_keep_alive()
%4 = tail call i32 (...) @test_parse_http_request()
%5 = tail call i32 (...) @test_mg_fetch()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int randint(int p, int r) {
  srand((unsigned int)time(NULL));
  int randi = (rand() % (r - p + 1)) + p;
  printf("\n randint = %d \n", randi);
  return randi;
}


x86 assembly (clang, -O0):
<randint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
add    -0x4(%rbp),%edx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randint>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
sub    %ebx,%ebp
add    $0x1,%ebp
cltd
idiv   %ebp
add    %edx,%ebx
lea    0xe93(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0A randint = %d \0A\00"
define i32 @randint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 @time(i32* null)
%7 = trunc i64 %6 to i32
%8 = call i32 @srand(i32 %7)
%9 = call i32 (...) @rand()
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
%13 = add nsw i32 %12, 1
%14 = srem i32 %9, %13
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@.str = [17 x i8] c"\0A randint = %d \0A\00"
define i32 @randint(i32 %0, i32 %1) {
%3 = tail call i64 @time(i32* null)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = sub i32 1, %0
%8 = add i32 %7, %1
%9 = srem i32 %6, %8
%10 = add nsw i32 %9, %0
%11 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 %10
}
void foo503(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo503(i32 %0) {
ret void
}
int up_window_open(void) {}


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

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

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

LLVM IR (-O2):
define i32 @up_window_open() {
ret i32 undef
}
/* Variables and functions */
scalar_t__ VIM_HIF_GetReg8(int);
unsigned long VIM_JPEG_GetTargetWordCount(void) {
  unsigned long value32;
  value32 = (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x00B));
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x00A)) << 8;
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x009)) << 16;
  value32 |= (unsigned long)VIM_HIF_GetReg8((0x0000 + 0x008)) << 24;
  value32 <<= 2;
  return value32;
}


x86 assembly (clang, -O0):
<VIM_JPEG_GetTargetWordCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xb,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,-0x8(%rbp)
mov    $0xa,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x8,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x9,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x10,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x18,%rax
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_JPEG_GetTargetWordCount>:
push   %r15
push   %r14
push   %rbx
mov    $0xb,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%r15
mov    $0xa,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%r14
mov    $0x9,%edi
call   1030 <VIM_HIF_GetReg8@plt>
mov    %rax,%rbx
mov    $0x8,%edi
call   1030 <VIM_HIF_GetReg8@plt>
shl    $0x1a,%rax
shl    $0x12,%rbx
or     %rbx,%rax
shl    $0xa,%r14
shl    $0x2,%r15
or     %r14,%r15
or     %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @VIM_JPEG_GetTargetWordCount() {
%1 = alloca i64
%2 = call i64 @VIM_HIF_GetReg8(i32 11)
store i64 %2, i64* %1
%3 = call i64 @VIM_HIF_GetReg8(i32 10)
%4 = shl i64 %3, 8
%5 = load i64, i64* %1
%6 = or i64 %5, %4
store i64 %6, i64* %1
%7 = call i64 @VIM_HIF_GetReg8(i32 9)
%8 = shl i64 %7, 16
%9 = load i64, i64* %1
%10 = or i64 %9, %8
store i64 %10, i64* %1
%11 = call i64 @VIM_HIF_GetReg8(i32 8)
%12 = shl i64 %11, 24
%13 = load i64, i64* %1
%14 = or i64 %13, %12
store i64 %14, i64* %1
%15 = load i64, i64* %1
%16 = shl i64 %15, 2
store i64 %16, i64* %1
%17 = load i64, i64* %1
ret i64 %17
}

LLVM IR (-O2):
define i64 @VIM_JPEG_GetTargetWordCount() {
%1 = tail call i64 @VIM_HIF_GetReg8(i32 11)
%2 = tail call i64 @VIM_HIF_GetReg8(i32 10)
%3 = tail call i64 @VIM_HIF_GetReg8(i32 9)
%4 = tail call i64 @VIM_HIF_GetReg8(i32 8)
%5 = shl i64 %4, 26
%6 = shl i64 %3, 18
%7 = shl i64 %2, 10
%8 = shl i64 %1, 2
%9 = or i64 %7, %8
%10 = or i64 %9, %6
%11 = or i64 %10, %5
ret i64 %11
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int strlen(char *);
char *copy_string(char *s1) {
  int l1;
  char *s;
  if (!s1)
    return NULL;
  l1 = strlen(s1);
  s = (char *)malloc(l1 + 1);
  memcpy(s, s1, l1 + 1);
  return s;
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <copy_string+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118a <copy_string+0x5a>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
je     115d <copy_string+0x2d>
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
jmp    1160 <copy_string+0x30>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @memcpy(i8* %7, i8* %0, i32 %5)
br label %9
9: ; preds = %1, %3
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: accton [file]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"usage: accton [file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"usage: accton [file]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double strtod(char const *, int /*<<< orphan*/ *);
double atof(const char *nptr) { return strtod(nptr, NULL); }


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

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define double @atof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @strtod(i8* %3, i32* null)
ret double %4
}

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i32* null)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ cgiMakeDropListClass(char *, char **, int, char *, char *);
void cgiMakeDropList(char *name, char *menu[], int menuSize, char *checked) {
  cgiMakeDropListClass(name, menu, menuSize, checked, "normalText");
}


x86 assembly (clang, -O0):
<cgiMakeDropList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    0xec3(%rip),%r8
call   1030 <cgiMakeDropListClass@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeDropList>:
lea    0xee9(%rip),%r8
jmp    1030 <cgiMakeDropListClass@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"normalText\00"
define void @cgiMakeDropList(i8* %0, i8** %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8**, i8*** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @cgiMakeDropListClass(i8* %9, i8** %10, i32 %11, i8* %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"normalText\00"
define void @cgiMakeDropList(i8* %0, i8** %1, i32 %2, i8* %3) {
%5 = tail call i32 @cgiMakeDropListClass(i8* %0, i8** %1, i32 %2, i8* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key;

/* Variables and functions */
scalar_t__ ini_getbool(int *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
int ini_getbool_default(int *value, char *param) {
  char key[256];
  snprintf(key, (sizeof(key)), "%s:%s", "default", param);
  if (ini_getbool(value, key))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ini_getbool_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%r8
mov    $0x100,%esi
lea    0xeb6(%rip),%rdx
lea    0xeb5(%rip),%rcx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1040 <ini_getbool@plt>
cmp    $0x0,%rax
je     117c <ini_getbool_default+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1183 <ini_getbool_default+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_getbool_default>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rsi,%r8
mov    %rdi,%rbx
lea    0xec9(%rip),%rdx
lea    0xec8(%rip),%rcx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x100,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <ini_getbool@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s:%s\00"
@.str.1 = [8 x i8] c"default\00"
define i32 @ini_getbool_default(i32* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 256, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%6 = call i64 @ini_getbool(i32* %0, i8* %4)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
BOOST_AUTO_TEST_CASE(factorial) {
  TESTCASE1(factorial, 1, 1);
  TESTCASE1(factorial, 3, 6);
  TESTCASE1(factorial, 10, 3628800);
}


x86 assembly (clang, -O0):
<BOOST_AUTO_TEST_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
mov    $0x6,%edx
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
mov    $0xa,%esi
mov    $0x375f00,%edx
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOOST_AUTO_TEST_CASE>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <TESTCASE1@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1030 <TESTCASE1@plt>
mov    %ebx,%edi
mov    $0xa,%esi
mov    $0x375f00,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <TESTCASE1@plt>

LLVM IR (-O0):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %4, i32 1, i32 1)
%6 = load i32, i32* %3
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %6, i32 3, i32 6)
%8 = load i32, i32* %3
%9 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %8, i32 10, i32 3628800)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 1, i32 1)
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 3, i32 6)
%4 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 10, i32 3628800)
ret i32 undef
}
unsigned long revbin_0(unsigned long x) {
  unsigned long s = (8UL * sizeof(unsigned long)) >> 1;
  unsigned long m = ~0UL >> s;
  while (s) {
    x = ((x & m) << s) ^ ((x & (~m)) >> s);
    s >>= 1;
    m ^= (m << s);
  }
  return x;
}


x86 assembly (clang, -O0):
<revbin_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x20,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0xffffffffffffffff,%rax
shr    %cl,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1180 <revbin_0+0x80>
mov    -0x8(%rbp),%rax
and    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rdx
mov    -0x10(%rbp),%rcx
shr    %cl,%rdx
mov    %rdx,%rcx
xor    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1122 <revbin_0+0x22>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<revbin_0>:
bswap  %rdi
mov    %rdi,%rax
shr    $0x4,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
and    %rcx,%rdi
shl    $0x4,%rdi
or     %rax,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rax,%rdi
lea    (%rdi,%rcx,4),%rax
movabs $0x5555555555555555,%rcx
55 55 55
mov    %rax,%rdx
and    %rcx,%rdx
shr    %rax
and    %rcx,%rax
lea    (%rax,%rdx,2),%rax
ret

LLVM IR (-O0):
define i64 @revbin_0(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 32, i64* %3
%5 = load i64, i64* %3
%6 = lshr i64 -1, %5
store i64 %6, i64* %4
br label %7
7: ; preds = %10, %1
%8 = load i64, i64* %3
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %30
10: ; preds = %7
%11 = load i64, i64* %2
%12 = load i64, i64* %4
%13 = and i64 %11, %12
%14 = load i64, i64* %3
%15 = shl i64 %13, %14
%16 = load i64, i64* %2
%17 = load i64, i64* %4
%18 = xor i64 %17, -1
%19 = and i64 %16, %18
%20 = load i64, i64* %3
%21 = lshr i64 %19, %20
%22 = xor i64 %15, %21
store i64 %22, i64* %2
%23 = load i64, i64* %3
%24 = lshr i64 %23, 1
store i64 %24, i64* %3
%25 = load i64, i64* %4
%26 = load i64, i64* %3
%27 = shl i64 %25, %26
%28 = load i64, i64* %4
%29 = xor i64 %28, %27
store i64 %29, i64* %4
br label %7
30: ; preds = %7
%31 = load i64, i64* %2
ret i64 %31
}

LLVM IR (-O2):
define i64 @revbin_0(i64 %0) {
%2 = call i64 @llvm.bitreverse.i64(i64 %0)
ret i64 %2
}
void hal_swi_init(void) {}


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

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

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

LLVM IR (-O2):
define void @hal_swi_init() {
ret void
}
/* Type definitions */
struct netfpga {
  int dummy;
};

/* Variables and functions */
void *nf2_linux_open(struct netfpga *nf) {
  (void)nf;
  return (NULL);
}


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

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

LLVM IR (-O0):
%struct.netfpga = type { i32 }
define i8* @nf2_linux_open(%struct.netfpga* %0) {
%2 = alloca %struct.netfpga*
store %struct.netfpga* %0, %struct.netfpga** %2
%3 = load %struct.netfpga*, %struct.netfpga** %2
ret i8* null
}

LLVM IR (-O2):
%struct.netfpga = type { i32 }
define noalias i8* @nf2_linux_open(%struct.netfpga* nocapture readnone %0) {
ret i8* null
}