xunge/DecIR huggingface dataset:
char *stpcpy(dest, src)
char *dest;
const char *src;
{
  register char *d = dest;
  register const char *s = src;
  do
    *d++ = *s;
  while (*s++ != '\0');
  return d - 1;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    111c <stpcpy+0x1c>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
mov    %cl,0x1(%rax)
add    $0x1,%rax
cmpb   $0x0,(%rsi)
lea    0x1(%rsi),%rsi
jne    1110 <stpcpy+0x10>
ret

LLVM IR (-O0):
define i8* @stpcpy(i8* %0, i8* %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
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
br label %9
9: ; preds = %14, %2
%10 = load i8*, i8** %6
%11 = load i8, i8* %10
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
store i8 %11, i8* %12
br label %14
14: ; preds = %9
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %6
%17 = load i8, i8* %15
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 0
br i1 %19, label %9, label %20
20: ; preds = %14
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 -1
ret i8* %22
}

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = phi i8* [ %1, %2 ], [ %8, %3 ]
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %6, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ goto_xy(int, int);
int /*<<< orphan*/ write(char *);
void write_at(int x, int y, char *message) {
  goto_xy(x, y);
  write(message);
}


x86 assembly (clang, -O0):
<write_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <goto_xy@plt>
mov    -0x10(%rbp),%rdi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_at>:
push   %rbx
mov    %rdx,%rbx
call   1040 <goto_xy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @write_at(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @goto_xy(i32 %7, i32 %8)
%10 = load i8*, i8** %6
%11 = call i32 @write(i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_at(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @goto_xy(i32 %0, i32 %1)
%5 = tail call i32 @write(i8* %2)
ret void
}
int match_string(char *a, char *b) {
  int match = 1;
  char test;
  while ((test = *a++)) {
    if (test != *b++) {
      match = 0;
      break;
    }
  }
  return match;
}


x86 assembly (clang, -O0):
<match_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x15(%rbp)
cmp    $0x0,%al
je     115e <match_string+0x5e>
movsbl -0x15(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1159 <match_string+0x59>
movl   $0x0,-0x14(%rbp)
jmp    115e <match_string+0x5e>
jmp    1113 <match_string+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_string>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1127 <match_string+0x27>
lea    0x1(%rax),%rdx
cmp    (%rsi,%rax,1),%cl
mov    %rdx,%rax
je     1110 <match_string+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @match_string(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %1, %2 ], [ %10, %8 ]
%5 = phi i8* [ %0, %2 ], [ %9, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = load i8, i8* %4
%12 = icmp eq i8 %6, %11
br i1 %12, label %3, label %13
13: ; preds = %8, %3
%14 = phi i32 [ 1, %3 ], [ 0, %8 ]
ret i32 %14
}
/* Variables and functions */
double pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  double b;
  printf("请输入一个整数:");
  scanf("%d", &a);
  b = pow(a, 5);
  printf("%d的5次方的值是:%.2f \n", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
call   1050 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xea3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x5,%esi
call   1050 <pow@plt>
mov    0x4(%rsp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E6\95\B4\E6\95\B0:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"%d\E7\9A\845\E6\AC\A1\E6\96\B9\E7\9A\84\E5\80\BC\E6\98\AF:%.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call double @pow(i32 %5, i32 5)
store double %6, double* %2
%7 = load i32, i32* %1
%8 = load double, double* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %7, double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E6\95\B4\E6\95\B0:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"%d\E7\9A\845\E6\AC\A1\E6\96\B9\E7\9A\84\E5\80\BC\E6\98\AF:%.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call double @pow(i32 %5, i32 5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %7, double %6)
ret i32 0
}
unsigned short int f30(unsigned short int x, unsigned long int y) {
  return (x >> ((-y) & (8 * sizeof(unsigned short) - 1))) ^ (x << y);
}


x86 assembly (clang, -O0):
<f30>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f30>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f30(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 0, %7
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
%11 = ashr i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = shl i32 %13, %15
%17 = xor i32 %11, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f30(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 15
%7 = lshr i32 %3, %6
%8 = shl i32 %3, %4
%9 = xor i32 %7, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}
extern void inc_atomic_float(float *loc, float inc) {
  int *p = (int *)loc;
  int val = __atomic_load_n(p, 2);
  void *pp1 = (void *)&val;
  float *pp2 = (float *)pp1;
  *pp2 += inc;
  __atomic_store_n(p, val, 0);
}


x86 assembly (clang, -O0):
<inc_atomic_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x1c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
movss  -0xc(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<inc_atomic_float>:
addss  (%rdi),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @inc_atomic_float(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca float*
%10 = alloca i32
store float* %0, float** %3
store float %1, float* %4
%11 = load float*, float** %3
%12 = bitcast float* %11 to i32*
store i32* %12, i32** %5
%13 = load i32*, i32** %5
%14 = load atomic i32, i32* %13 acquire
store i32 %14, i32* %7
%15 = load i32, i32* %7
store i32 %15, i32* %6
%16 = bitcast i32* %6 to i8*
store i8* %16, i8** %8
%17 = load i8*, i8** %8
%18 = bitcast i8* %17 to float*
store float* %18, float** %9
%19 = load float, float* %4
%20 = load float*, float** %9
%21 = load float, float* %20
%22 = fadd float %21, %19
store float %22, float* %20
%23 = load i32*, i32** %5
%24 = load i32, i32* %6
store i32 %24, i32* %10
%25 = load i32, i32* %10
store atomic i32 %25, i32* %23 monotonic
ret void
}

LLVM IR (-O2):
define void @inc_atomic_float(float* nocapture %0, float %1) {
%3 = bitcast float* %0 to i32*
%4 = load atomic i32, i32* %3 acquire
%5 = bitcast i32 %4 to float
%6 = fadd float %5, %1
%7 = bitcast float %6 to i32
store atomic i32 %7, i32* %3 monotonic
ret void
}
/* Variables and functions */
char toupper(char);
void str_toupper(char *s) {
  while (*s) {
    *s = toupper(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<str_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <str_toupper+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <str_toupper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_toupper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <str_toupper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <str_toupper+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @str_toupper(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call signext i8 @toupper(i8 signext %9)
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @str_toupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @toupper(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int gprc_get_actuators(int ADF_module, int actuators) {
  if (ADF_module == 0) {
    return actuators;
  }
  return 1;
}


x86 assembly (clang, -O0):
<gprc_get_actuators>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <gprc_get_actuators+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <gprc_get_actuators+0x26>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gprc_get_actuators>:
test   %edi,%edi
mov    $0x1,%eax
cmove  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @gprc_get_actuators(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 %1, i32 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ strncmp(char *, char const *, int);
void example5Func(const char *s1, char *s2) {
  assert(strncmp("s1", s1, 5) == 0);
  assert(strncmp("s2", s2, 5) == 0);
}


x86 assembly (clang, -O0):
<example5Func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rsi
lea    0xea2(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example5Func>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"s1\00"
@.str.1 = [3 x i8] c"s2\00"
define void @example5Func(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5, i32 5)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %4
%11 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10, i32 5)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"s1\00"
@.str.1 = [3 x i8] c"s2\00"
define void @example5Func(i8* %0, i8* %1) {
%3 = tail call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0, i32 5)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32 5)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
u_char *align_hi(u_char *ptr, size_t align) {
  return (u_char *)(((uintptr_t)(ptr + (align - 1))) & ~(align - 1));
}


x86 assembly (clang, -O0):
<align_hi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<align_hi>:
lea    (%rdi,%rsi,4),%rax
add    $0xfffffffffffffffc,%rax
neg    %rsi
and    %rsi,%rax
ret

LLVM IR (-O0):
define i32* @align_hi(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = sub i64 %6, 1
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = ptrtoint i32* %8 to i64
%10 = load i64, i64* %4
%11 = sub i64 %10, 1
%12 = xor i64 %11, -1
%13 = and i64 %9, %12
%14 = inttoptr i64 %13 to i32*
ret i32* %14
}

LLVM IR (-O2):
define i32* @align_hi(i32* %0, i64 %1) {
%3 = add i64 %1, -1
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = ptrtoint i32* %4 to i64
%6 = sub i64 0, %1
%7 = and i64 %5, %6
%8 = inttoptr i64 %7 to i32*
ret i32* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_INTEGER;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_STRING_dup(int /*<<< orphan*/ const *);
ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x) {
  return ASN1_STRING_dup(x);
}


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

x86 assembly (clang, -O2):
<ASN1_INTEGER_dup>:
jmp    1030 <ASN1_STRING_dup@plt>

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

LLVM IR (-O2):
define i32* @ASN1_INTEGER_dup(i32* %0) {
%2 = tail call i32* @ASN1_STRING_dup(i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ mb();
extern void __outb(unsigned char b, unsigned long addr) {
  *(volatile unsigned int *)((addr << 7) +
                             ((0xfffffc0000000000UL) + 0x300000000UL) + 0x00) =
      b * 0x01010101;
  mb();
}


x86 assembly (clang, -O0):
<__outb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
imul   $0x1010101,%eax,%ecx
mov    -0x10(%rbp),%rax
shl    $0x7,%rax
movabs $0xfffffc0300000000,%rdx
fc ff ff
add    %rdx,%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <mb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outb>:
imul   $0x1010101,%edi,%eax
shl    $0x7,%rsi
movabs $0xfffffc0300000000,%rcx
fc ff ff
mov    %eax,(%rsi,%rcx,1)
xor    %eax,%eax
jmp    1030 <mb@plt>

LLVM IR (-O0):
define void @__outb(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = mul nsw i32 %6, 16843009
%8 = load i64, i64* %4
%9 = shl i64 %8, 7
%10 = add i64 %9, -4385161609216
%11 = add i64 %10, 0
%12 = inttoptr i64 %11 to i32*
store volatile i32 %7, i32* %12
%13 = call i32 (...) @mb()
ret void
}

LLVM IR (-O2):
define void @__outb(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 16843009
%5 = shl i64 %1, 7
%6 = add i64 %5, -4385161609216
%7 = inttoptr i64 %6 to i32*
store volatile i32 %4, i32* %7
%8 = tail call i32 (...) @mb()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int get_offset(int block) {
  assert(block >= 0 && block < 8);
  return (8 - 5 - (5 * block) % 8);
}


x86 assembly (clang, -O0):
<get_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1134 <get_offset+0x24>
cmpl   $0x8,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
imul   $0x5,-0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    $0x3,%eax
sub    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_offset>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x8,%ebx
setb   %dil
call   1030 <assert@plt>
lea    (%rbx,%rbx,4),%ecx
lea    (%rbx,%rbx,4),%eax
add    $0x7,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
and    $0xfffffff8,%eax
sub    %ecx,%eax
add    $0x3,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_offset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 8
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = mul nsw i32 5, %12
%14 = srem i32 %13, 8
%15 = sub nsw i32 3, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_offset(i32 %0) {
%2 = icmp ult i32 %0, 8
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = mul nsw i32 %0, 5
%6 = srem i32 %5, 8
%7 = sub nsw i32 3, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ break_here();
int /*<<< orphan*/ fork();
int main() {
  fork();
  break_here();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <fork@plt>
mov    $0x0,%al
call   1030 <break_here@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
xor    %eax,%eax
call   1030 <break_here@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 (...) @break_here()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  scanf("%d", &i);
  printf("okunan deger:");
  printf("%d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"okunan deger:\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
char *decode_true_false(int x) { return (x == 0) ? "false" : "true"; }


x86 assembly (clang, -O0):
<decode_true_false>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef5(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmove  %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_true_false>:
test   %edi,%edi
lea    0xef7(%rip),%rcx
lea    0xef6(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i8* @decode_true_false(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i8* @decode_true_false(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ tu_move(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) void tu_clear(void) {
  printf("\x1b[2J");
  tu_move(0, 0);
}


x86 assembly (clang, -O0):
<tu_clear>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <tu_move@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tu_clear>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <tu_move@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @tu_clear() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @tu_move(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @tu_clear() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @tu_move(i32 0, i32 0)
ret void
}
double remainder(double x, double y) {
  unsigned short fpsr;
  do
    __asm__("fprem1; fnstsw %%ax" : "+t"(x), "=a"(fpsr) : "u"(y));
  while (fpsr & 0x400);
  return x;
}


x86 assembly (clang, -O0):
<remainder>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
fldl   -0x20(%rbp)
fldl   -0x28(%rbp)
fprem1
fnstsw %ax
fstp   %st(1)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
jne    110e <remainder+0xe>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<remainder>:
movsd  %xmm1,-0x8(%rsp)
movsd  %xmm0,-0x10(%rsp)
fldl   -0x8(%rsp)
fldl   -0x10(%rsp)
fprem1
fnstsw %ax
fstp   %st(1)
fstpl  -0x18(%rsp)
movsd  -0x18(%rsp),%xmm0
test   $0x400,%eax
jne    1100 <remainder>
ret

LLVM IR (-O0):
define double @remainder(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i16
store double %0, double* %3
store double %1, double* %4
br label %6
6: ; preds = %12, %2
%7 = load double, double* %3
%8 = load double, double* %4
%9 = call { double, i16 } asm "fprem1; fnstsw %ax", "={st},={ax},{st(1)},0,~{dirflag},~{fpsr},~{flags}"(double %8, double %7)
%10 = extractvalue { double, i16 } %9, 0
%11 = extractvalue { double, i16 } %9, 1
store double %10, double* %3
store i16 %11, i16* %5
br label %12
12: ; preds = %6
%13 = load i16, i16* %5
%14 = zext i16 %13 to i32
%15 = and i32 %14, 1024
%16 = icmp ne i32 %15, 0
br i1 %16, label %6, label %17
17: ; preds = %12
%18 = load double, double* %3
ret double %18
}

LLVM IR (-O2):
define double @remainder(double %0, double %1) {
br label %3
3: ; preds = %3, %2
%4 = phi double [ %0, %2 ], [ %6, %3 ]
%5 = tail call { double, i16 } asm "fprem1; fnstsw %ax", "={st},={ax},{st(1)},0,~{dirflag},~{fpsr},~{flags}"(double %1, double %4)
%6 = extractvalue { double, i16 } %5, 0
%7 = extractvalue { double, i16 } %5, 1
%8 = and i16 %7, 1024
%9 = icmp eq i16 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3
%11 = extractvalue { double, i16 } %5, 0
ret double %11
}
int test_imm_A6int16_reg(short val) {
  return ((val) & (-0xA6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A6int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -166
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A6int16_reg(i16 signext %0) {
%2 = and i16 %0, -166
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int new_style_hook(const struct nf_hook_ops *ops, struct sk_buff *skb,
                            const struct net_device *nf_in,
                            const struct net_device *nf_out,
                            const struct nf_hook_state *state) {
  (void)ops;
  (void)skb;
  (void)nf_in;
  (void)nf_out;
  (void)state;
  return 0;
}


x86 assembly (clang, -O0):
<new_style_hook>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.nf_hook_ops = type opaque
%struct.sk_buff = type opaque
%struct.net_device = type opaque
%struct.nf_hook_state = type opaque
define i32 @new_style_hook(%struct.nf_hook_ops* %0, %struct.sk_buff* %1, %struct.net_device* %2, %struct.net_device* %3, %struct.nf_hook_state* %4) {
%6 = alloca %struct.nf_hook_ops*
%7 = alloca %struct.sk_buff*
%8 = alloca %struct.net_device*
%9 = alloca %struct.net_device*
%10 = alloca %struct.nf_hook_state*
store %struct.nf_hook_ops* %0, %struct.nf_hook_ops** %6
store %struct.sk_buff* %1, %struct.sk_buff** %7
store %struct.net_device* %2, %struct.net_device** %8
store %struct.net_device* %3, %struct.net_device** %9
store %struct.nf_hook_state* %4, %struct.nf_hook_state** %10
%11 = load %struct.nf_hook_ops*, %struct.nf_hook_ops** %6
%12 = load %struct.sk_buff*, %struct.sk_buff** %7
%13 = load %struct.net_device*, %struct.net_device** %8
%14 = load %struct.net_device*, %struct.net_device** %9
%15 = load %struct.nf_hook_state*, %struct.nf_hook_state** %10
ret i32 0
}

LLVM IR (-O2):
%struct.nf_hook_ops = type opaque
%struct.sk_buff = type opaque
%struct.net_device = type opaque
%struct.nf_hook_state = type opaque
define i32 @new_style_hook(%struct.nf_hook_ops* nocapture readnone %0, %struct.sk_buff* nocapture readnone %1, %struct.net_device* nocapture readnone %2, %struct.net_device* nocapture readnone %3, %struct.nf_hook_state* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
void *hmac_sha_md5(char const *, size_t, char *, size_t, char *, int);
void *hmac_md5(const char *buffer, size_t len, char *key, size_t key_len,
               char *resbuf) {
  return hmac_sha_md5(buffer, len, key, key_len, resbuf, 5);
}


x86 assembly (clang, -O0):
<hmac_md5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x5,%r9d
call   1030 <hmac_sha_md5@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmac_md5>:
mov    $0x5,%r9d
jmp    1030 <hmac_sha_md5@plt>

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

LLVM IR (-O2):
define i8* @hmac_md5(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4) {
%6 = tail call i8* @hmac_sha_md5(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4, i32 5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_flag_subname(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void fgmvwrite_flag_subname_(char subname[]) {
  char type[10];
  strncpy(type, subname, 8);
  *(type + 8) = '\0';
  gmvwrite_flag_subname(type);
}


x86 assembly (clang, -O0):
<fgmvwrite_flag_subname_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0xa(%rbp)
lea    -0x12(%rbp),%rdi
call   1040 <gmvwrite_flag_subname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_flag_subname_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movb   $0x0,0xe(%rsp)
mov    %rbx,%rdi
call   1040 <gmvwrite_flag_subname@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @fgmvwrite_flag_subname_(i8* %0) {
%2 = alloca i8*
%3 = alloca [10 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @strncpy(i8* %4, i8* %5, i32 8)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds i8, i8* %7, i64 8
store i8 0, i8* %8
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%10 = call i32 @gmvwrite_flag_subname(i8* %9)
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_flag_subname_(i8* %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @strncpy(i8* %3, i8* %0, i32 8)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 8
store i8 0, i8* %5
%6 = call i32 @gmvwrite_flag_subname(i8* %3)
ret void
}
int rcu_gen_str_hash(const char *strz) {
  int hash = 0;
  while (*(strz++)) {
    int c = *strz;
    hash = (((hash << 3) + hash) << 2) + hash + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<rcu_gen_str_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     114b <rcu_gen_str_hash+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
add    -0xc(%rbp),%eax
shl    $0x2,%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <rcu_gen_str_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rcu_gen_str_hash>:
cmpb   $0x0,(%rdi)
je     1124 <rcu_gen_str_hash+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsbl (%rdi),%ecx
lea    (%rax,%rax,8),%edx
lea    (%rax,%rdx,4),%eax
add    %ecx,%eax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <rcu_gen_str_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @rcu_gen_str_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %5, i64 1
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = mul i32 %6, 37
%11 = add nsw i32 %10, %9
%12 = icmp eq i8 %8, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %14
}
void negative_size(int sz) {
  if (sz < 0) {
    int buf[sz];
  }
}


x86 assembly (clang, -O0):
<negative_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112a <negative_size+0x2a>
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @negative_size(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %3
%11 = alloca i32, i64 %9
store i64 %9, i64* %4
%12 = load i8*, i8** %3
br label %13
13: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @negative_size(i32 %0) {
ret void
}
const int const const *****const *****const *iojiofej(void **const ***a[]) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i32*********** @iojiofej(i8****** nocapture readnone %0) {
ret i32*********** null
}
/* Type definitions */
struct t_relay_dogechat_msg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ relay_dogechat_msg_add_bytes(struct t_relay_dogechat_msg *,
                                                char const *,
                                                int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void relay_dogechat_msg_add_type(struct t_relay_dogechat_msg *msg,
                                 const char *string) {
  if (string)
    relay_dogechat_msg_add_bytes(msg, string, strlen(string));
}


x86 assembly (clang, -O0):
<relay_dogechat_msg_add_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1163 <relay_dogechat_msg_add_type+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <relay_dogechat_msg_add_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<relay_dogechat_msg_add_type>:
test   %rsi,%rsi
je     114b <relay_dogechat_msg_add_type+0x2b>
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <relay_dogechat_msg_add_bytes@plt>
ret

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

LLVM IR (-O2):
%struct.t_relay_dogechat_msg = type { i32 }
define void @relay_dogechat_msg_add_type(%struct.t_relay_dogechat_msg* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @strlen(i8* %1)
%6 = tail call i32 @relay_dogechat_msg_add_bytes(%struct.t_relay_dogechat_msg* %0, i8* %1, i32 %5)
br label %7
7: ; preds = %4, %2
ret void
}
struct thread_info *(current_thread_info)(void) {
  struct thread_info *ti;
  {
    return (ti);
  }
}


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

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

LLVM IR (-O0):
%struct.thread_info = type opaque
define %struct.thread_info* @current_thread_info() {
%1 = alloca %struct.thread_info*
%2 = load %struct.thread_info*, %struct.thread_info** %1
ret %struct.thread_info* %2
}

LLVM IR (-O2):
%struct.thread_info = type opaque
define noalias %struct.thread_info* @current_thread_info() {
ret %struct.thread_info* undef
}
/* Type definitions */
struct in6_addr {
  int dummy;
};
struct dns_rr_a4 {
  int dummy;
};
struct dns_ctx {
  int dummy;
};

/* Variables and functions */
scalar_t__ dns_resolve(struct dns_ctx *, int /*<<< orphan*/);
int /*<<< orphan*/ dns_submit_a6dnsbl(struct dns_ctx *, struct in6_addr const *,
                                      char const *, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
struct dns_rr_a4 *dns_resolve_a6dnsbl(struct dns_ctx *ctx,
                                      const struct in6_addr *addr,
                                      const char *dnsbl) {
  return (struct dns_rr_a4 *)dns_resolve(
      ctx, dns_submit_a6dnsbl(ctx, addr, dnsbl, 0, 0));
}


x86 assembly (clang, -O0):
<dns_resolve_a6dnsbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1040 <dns_submit_a6dnsbl@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <dns_resolve@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_resolve_a6dnsbl>:
push   %rbx
mov    %rdi,%rbx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <dns_submit_a6dnsbl@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <dns_resolve@plt>

LLVM IR (-O0):
%struct.dns_rr_a4 = type { i32 }
%struct.dns_ctx = type { i32 }
%struct.in6_addr = type { i32 }
define %struct.dns_rr_a4* @dns_resolve_a6dnsbl(%struct.dns_ctx* %0, %struct.in6_addr* %1, i8* %2) {
%4 = alloca %struct.dns_ctx*
%5 = alloca %struct.in6_addr*
%6 = alloca i8*
store %struct.dns_ctx* %0, %struct.dns_ctx** %4
store %struct.in6_addr* %1, %struct.in6_addr** %5
store i8* %2, i8** %6
%7 = load %struct.dns_ctx*, %struct.dns_ctx** %4
%8 = load %struct.dns_ctx*, %struct.dns_ctx** %4
%9 = load %struct.in6_addr*, %struct.in6_addr** %5
%10 = load i8*, i8** %6
%11 = call i32 @dns_submit_a6dnsbl(%struct.dns_ctx* %8, %struct.in6_addr* %9, i8* %10, i32 0, i32 0)
%12 = call i64 @dns_resolve(%struct.dns_ctx* %7, i32 %11)
%13 = inttoptr i64 %12 to %struct.dns_rr_a4*
ret %struct.dns_rr_a4* %13
}

LLVM IR (-O2):
%struct.dns_rr_a4 = type { i32 }
%struct.dns_ctx = type { i32 }
%struct.in6_addr = type { i32 }
define %struct.dns_rr_a4* @dns_resolve_a6dnsbl(%struct.dns_ctx* %0, %struct.in6_addr* %1, i8* %2) {
%4 = tail call i32 @dns_submit_a6dnsbl(%struct.dns_ctx* %0, %struct.in6_addr* %1, i8* %2, i32 0, i32 0)
%5 = tail call i64 @dns_resolve(%struct.dns_ctx* %0, i32 %4)
%6 = inttoptr i64 %5 to %struct.dns_rr_a4*
ret %struct.dns_rr_a4* %6
}
int dev_redir_check_wait_objs(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @dev_redir_check_wait_objs() {
ret i32 0
}

LLVM IR (-O2):
define i32 @dev_redir_check_wait_objs() {
ret i32 0
}
/* Variables and functions */
double M_PI;
double degrees(double radians) { return radians * 180 / M_PI; }


x86 assembly (clang, -O0):
<degrees>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    0x2ecb(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<degrees>:
mulsd  0xef8(%rip),%xmm0
mov    0x2ed9(%rip),%rax
divsd  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @degrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = load double, double* @M_PI
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @degrees(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = load double, double* @M_PI
%4 = fdiv double %2, %3
ret double %4
}
/* Type definitions */
struct list_node {
  int dummy;
};
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ list_del(struct list_node *);
int /*<<< orphan*/ list_empty(struct list_head *);
void list_del_from(struct list_head *h, struct list_node *n) {
  (void)h;
  assert(!list_empty(h));
  list_del(n);
}


x86 assembly (clang, -O0):
<list_del_from>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <list_del@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_del_from>:
push   %rbx
mov    %rsi,%rbx
call   1050 <list_empty@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <list_del@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
%struct.list_node = type { i32 }
define void @list_del_from(%struct.list_head* %0, %struct.list_node* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_node*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_node* %1, %struct.list_node** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %3
%7 = call i32 @list_empty(%struct.list_head* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load %struct.list_node*, %struct.list_node** %4
%13 = call i32 @list_del(%struct.list_node* %12)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
%struct.list_node = type { i32 }
define void @list_del_from(%struct.list_head* %0, %struct.list_node* %1) {
%3 = tail call i32 @list_empty(%struct.list_head* %0)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @list_del(%struct.list_node* %1)
ret void
}