xunge/DecIR huggingface dataset:
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISCHR(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int _is_file_char(char *pathname) {
  struct stat st;
  if (stat(pathname, &st) != 0)
    return 0;
  return S_ISCHR(st.st_mode) ? 1 : 0;
}


x86 assembly (clang, -O0):
<_is_file_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
je     114f <_is_file_char+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    116b <_is_file_char+0x4b>
mov    -0x18(%rbp),%edi
call   1040 <S_ISCHR@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_file_char>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <_is_file_char+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISCHR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @_is_file_char(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISCHR(i32 %11)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
store i32 %15, i32* %2
br label %16
16: ; preds = %9, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @_is_file_char(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISCHR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void test(int x, int y) {
  if (x == y)
    abort();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1131 <test+0x21>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
cmp    %esi,%edi
je     1115 <test+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @test(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret void
}
/* Variables and functions */
int __builtin_abs(int);
int /*<<< orphan*/ link_error();
int foo(int i) {
  int x;
  x = i;
  if (i < -10) {
    x = __builtin_abs(i);
    if (x < 0)
      link_error();
  }
  return x;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xfffffff6,-0x4(%rbp)
jge    1151 <foo+0x41>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    %eax,%ecx
cmp    $0x0,%eax
cmovl  %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    114c <foo+0x3c>
mov    $0x0,%al
call   1030 <link_error@plt>
jmp    1151 <foo+0x41>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
neg    %eax
cmp    $0xfffffff6,%edi
cmovge %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, -10
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
%10 = icmp slt i32 %8, 0
%11 = select i1 %10, i32 %9, i32 %8
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %7
%15 = call i32 (...) @link_error()
br label %16
16: ; preds = %14, %7
br label %17
17: ; preds = %16, %1
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp slt i32 %0, -10
%3 = sub nsw i32 0, %0
%4 = select i1 %2, i32 %3, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ insert(int *, int, int);
void sort(int *arr, int size) {
  if (size < 2)
    return;
  int i;
  for (i = 1; i < size; i++) {
    insert(arr, arr[i], i);
  }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    112e <sort+0x1e>
jmp    1166 <sort+0x56>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1166 <sort+0x56>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x10(%rbp),%edx
call   1030 <insert@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1135 <sort+0x25>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1147 <sort+0x37>
mov    %rdi,%r14
mov    %esi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,4),%esi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <insert@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <sort+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @insert(i32* %0, i32 %9, i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
int find_code_offset(unsigned char *stream, int stream_length,
                     unsigned char code) {
  int is_exist = (-1);
  int i;
  for (i = 0; i < stream_length; i++) {
    if (stream[i] == code) {
      is_exist = i;
      break;
    }
  }
  return (is_exist);
}


x86 assembly (clang, -O0):
<find_code_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <find_code_offset+0x60>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzbl -0xd(%rbp),%ecx
cmp    %ecx,%eax
jne    114d <find_code_offset+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <find_code_offset+0x60>
jmp    1152 <find_code_offset+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111e <find_code_offset+0x1e>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_code_offset>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    111e <find_code_offset+0x1e>
mov    %esi,%esi
xor    %ecx,%ecx
nopl   (%rax)
cmp    %dl,(%rdi,%rcx,1)
je     111f <find_code_offset+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <find_code_offset+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @find_code_offset(i8* nocapture %0, i32 %1, i8 zeroext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
__attribute__((no)) void g(long long a) {
  f(a);
  asm("");
}


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

x86 assembly (clang, -O2):
<g>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @g(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 (i64, ...) bitcast (i32 (...)* @f to i32 (i64, ...)*)(i64 %3)
ret void
}

LLVM IR (-O2):
define void @g(i64 %0) {
%2 = tail call i32 (i64, ...) bitcast (i32 (...)* @f to i32 (i64, ...)*)(i64 %0)
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef char wint_t;

/* Variables and functions */
char towupper(char);
wint_t uppercase(wint_t c) {
  if ((c >= 'a') && (c <= 'z')) {
    c = towupper(c);
  }
  return c;
}


x86 assembly (clang, -O0):
<uppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1144 <uppercase+0x34>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1144 <uppercase+0x34>
movsbl -0x1(%rbp),%edi
call   1030 <towupper@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uppercase>:
lea    -0x61(%rdi),%eax
cmp    $0x19,%al
ja     1120 <uppercase+0x10>
movsbl %dil,%edi
jmp    1030 <towupper@plt>
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @uppercase(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8, i8* %2
%12 = call signext i8 @towupper(i8 signext %11)
store i8 %12, i8* %2
br label %13
13: ; preds = %10, %6, %1
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @uppercase(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call signext i8 @towupper(i8 signext %0)
br label %6
6: ; preds = %4, %1
%7 = phi i8 [ %5, %4 ], [ %0, %1 ]
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
uint32_t mpu_ll_id_to_addr(unsigned id) { abort(); }


x86 assembly (clang, -O0):
<mpu_ll_id_to_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<mpu_ll_id_to_addr>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @mpu_ll_id_to_addr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @mpu_ll_id_to_addr(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ border_width;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcreatewindow_border_width(void *_p) {
  return (int)((XEvent *)_p)->xcreatewindow.border_width;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcreatewindow_border_width>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xcreatewindow_border_width(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xcreatewindow_border_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
float mm_to_inch(float value) { return value * 0.0393700787f; }


x86 assembly (clang, -O0):
<mm_to_inch>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_to_inch>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @mm_to_inch(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3FA42850A0000000
ret float %4
}

LLVM IR (-O2):
define float @mm_to_inch(float %0) {
%2 = fmul float %0, 0x3FA42850A0000000
ret float %2
}
int given_comp(int a, int b) { return a > b; }


x86 assembly (clang, -O0):
<given_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<given_comp>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @given_comp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @given_comp(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void rop3_57_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_57_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_57_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
not    %cl
or     %dl,%cl
xor    %sil,%cl
mov    %edx,%eax
not    %al
or     %sil,%al
and    %cl,%al
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_57_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %9
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = xor i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %28, %30
%32 = load i8, i8* %7
%33 = zext i8 %32 to i32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = or i32 %31, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = load i8, i8* %5
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = and i32 %40, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = and i32 %44, %47
%49 = or i32 %38, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_57_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = or i8 %5, %2
%7 = xor i8 %6, %1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void foo() {
  int x = 0;
  static int staticx = 0;
  x++;
  staticx++;
  printf("x=%d\n", x);
  printf("staticx=%d\n", staticx);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    0x2efe(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef5(%rip)
mov    -0x4(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ee0(%rip),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
addl   $0x1,0x2f14(%rip)
lea    0xee7(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x2efd(%rip),%esi
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@foo.staticx = internal global i32 0
@.str = [6 x i8] c"x=%d\0A\00"
@.str.1 = [12 x i8] c"staticx=%d\0A\00"
define void @foo() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = load i32, i32* @foo.staticx
%5 = add nsw i32 %4, 1
store i32 %5, i32* @foo.staticx
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @foo.staticx
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@foo.staticx = internal unnamed_addr global i32 0
@.str = [6 x i8] c"x=%d\0A\00"
@.str.1 = [12 x i8] c"staticx=%d\0A\00"
define void @foo() {
%1 = load i32, i32* @foo.staticx
%2 = add nsw i32 %1, 1
store i32 %2, i32* @foo.staticx
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = load i32, i32* @foo.staticx
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void txt_write_in_stdout(char *string) {
  printf("%s", string);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<txt_write_in_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_write_in_stdout>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define void @txt_write_in_stdout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define void @txt_write_in_stdout(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
unsigned int FAN_MARK_ADD;
unsigned int FAN_MARK_IGNORED_MASK;
int mark_object(int, int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                unsigned int);
int set_ignored_mask(int fan_fd, int fd, uint64_t mask) {
  unsigned int flags = (FAN_MARK_ADD | FAN_MARK_IGNORED_MASK);
  return mark_object(fan_fd, NULL, fd, mask, flags);
}


x86 assembly (clang, -O0):
<set_ignored_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    0x2eb7(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%esi
call   1030 <mark_object@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_ignored_mask>:
mov    %edx,%ecx
mov    %esi,%edx
mov    0x2ebd(%rip),%rax
mov    0x2ec6(%rip),%rsi
mov    (%rsi),%r8d
or     (%rax),%r8d
xor    %esi,%esi
jmp    1030 <mark_object@plt>

LLVM IR (-O0):
@FAN_MARK_ADD = global i32 0
@FAN_MARK_IGNORED_MASK = global i32 0
define i32 @set_ignored_mask(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* @FAN_MARK_ADD
%9 = load i32, i32* @FAN_MARK_IGNORED_MASK
%10 = or i32 %8, %9
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @mark_object(i32 %11, i32* null, i32 %12, i32 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@FAN_MARK_ADD = global i32 0
@FAN_MARK_IGNORED_MASK = global i32 0
define i32 @set_ignored_mask(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @FAN_MARK_ADD
%5 = load i32, i32* @FAN_MARK_IGNORED_MASK
%6 = or i32 %5, %4
%7 = tail call i32 @mark_object(i32 %0, i32* null, i32 %1, i32 %2, i32 %6)
ret i32 %7
}
int func(void) {
  int n = 3;
  int m = 5;
  n == m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func() {
%1 = alloca i32
%2 = alloca i32
store i32 3, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 0
}

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
double RtoF(double R) {
  double f = R - 459.69;
  return f;
}


x86 assembly (clang, -O0):
<RtoF>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<RtoF>:
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @RtoF(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 4.596900e+02
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @RtoF(double %0) {
%2 = fadd double %0, -4.596900e+02
ret double %2
}
/* Variables and functions */
double exp(double);
double dAUX1bp5a(double x) { return 2.0 * (1 - x) * exp(-x); }


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

x86 assembly (clang, -O2):
<dAUX1bp5a>:
push   %rax
movsd  0xee7(%rip),%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm1,%xmm1
movsd  %xmm1,(%rsp)
xorpd  0xee2(%rip),%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dAUX1bp5a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = fmul double 2.000000e+00, %4
%6 = load double, double* %2
%7 = fneg double %6
%8 = call double @exp(double %7)
%9 = fmul double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @dAUX1bp5a(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fmul double %2, 2.000000e+00
%4 = fneg double %0
%5 = tail call double @exp(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void Quit() {
  fprintf(stdout, "Aborting.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Quit>:
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):
<Quit>:
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):
@stdout = global i32 0
@.str = [11 x i8] c"Aborting.\0A\00"
define void @Quit() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [11 x i8] c"Aborting.\0A\00"
define void @Quit() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ ext_data;
};
typedef TYPE_1__ Visual;

/* Variables and functions */
void *get_Visual_ext_data(void *_p) { return (void *)((Visual *)_p)->ext_data; }


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

x86 assembly (clang, -O2):
<get_Visual_ext_data>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_Visual_ext_data(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_Visual_ext_data(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ EDIPARTYNAME;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ EDIPARTYNAME_it;
void EDIPARTYNAME_free(EDIPARTYNAME *a) {
  ASN1_item_free((ASN1_VALUE *)a, &EDIPARTYNAME_it);
}


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

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

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

LLVM IR (-O2):
@EDIPARTYNAME_it = global i32 0
define void @EDIPARTYNAME_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @EDIPARTYNAME_it)
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
extern int ast_tvdiff_ms(struct timeval end, struct timeval start) {
  return ((end.tv_sec - start.tv_sec) * 1000) +
         (((1000000 + end.tv_usec - start.tv_usec) / 1000) - 1000);
}


x86 assembly (clang, -O0):
<ast_tvdiff_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf4240,%eax
sub    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    $0x3e8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ast_tvdiff_ms>:
mov    %rdi,%rax
shr    $0x20,%rax
sub    %esi,%edi
shr    $0x20,%rsi
imul   $0x3e8,%edi,%ecx
sub    %esi,%eax
add    $0xf4240,%eax
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
add    $0xfffffc18,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @ast_tvdiff_ms(i64 %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = bitcast %struct.timeval* %3 to i64*
store i64 %0, i64* %5
%6 = bitcast %struct.timeval* %4 to i64*
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %8, %10
%12 = mul nsw i32 %11, 1000
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%14 = load i32, i32* %13
%15 = add nsw i32 1000000, %14
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
%17 = load i32, i32* %16
%18 = sub nsw i32 %15, %17
%19 = sdiv i32 %18, 1000
%20 = sub nsw i32 %19, 1000
%21 = add nsw i32 %12, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @ast_tvdiff_ms(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = lshr i64 %0, 32
%5 = trunc i64 %4 to i32
%6 = trunc i64 %1 to i32
%7 = lshr i64 %1, 32
%8 = trunc i64 %7 to i32
%9 = sub nsw i32 %3, %6
%10 = mul nsw i32 %9, 1000
%11 = add nsw i32 %5, 1000000
%12 = sub i32 %11, %8
%13 = sdiv i32 %12, 1000
%14 = add i32 %10, -1000
%15 = add i32 %14, %13
ret i32 %15
}
/* Variables and functions */
int xxh32_feed(void *, void const *, int);
int XXH32_feed(void *state, const void *input, int len) {
  return xxh32_feed(state, input, len);
}


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

x86 assembly (clang, -O2):
<XXH32_feed>:
jmp    1030 <xxh32_feed@plt>

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

LLVM IR (-O2):
define i32 @XXH32_feed(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @xxh32_feed(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
long kmr_tick() {
  unsigned int ax, dx;
  __asm__ __volatile__("rdtscp" : "=a"(ax), "=d"(dx));
  return (((long)ax) | (((long)dx) << 32));
}


x86 assembly (clang, -O0):
<kmr_tick>:
push   %rbp
mov    %rsp,%rbp
rdtscp
mov    %eax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmr_tick>:
rdtscp
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @kmr_tick() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtscp", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @kmr_tick() {
%1 = tail call { i32, i32 } asm sideeffect "rdtscp", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ test_sha3();
scalar_t__ test_shake();
int /*<<< orphan*/ test_speed();
int main(int argc, char **argv) {
  if (test_sha3() == 0 && test_shake() == 0)
    printf("FIPS 202 / SHA3, SHAKE128, SHAKE256 Self-Tests OK!\n");
  test_speed();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <test_sha3@plt>
cmp    $0x0,%rax
jne    1184 <main+0x44>
mov    $0x0,%al
call   1030 <test_shake@plt>
cmp    $0x0,%rax
jne    1184 <main+0x44>
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <test_speed@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_sha3@plt>
test   %rax,%rax
jne    1165 <main+0x25>
xor    %eax,%eax
call   1040 <test_shake@plt>
test   %rax,%rax
jne    1165 <main+0x25>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <test_speed@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"FIPS 202 / SHA3, SHAKE128, SHAKE256 Self-Tests OK!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 (...) @test_sha3()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = call i64 (...) @test_shake()
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %8, %2
%14 = call i32 (...) @test_speed()
ret i32 0
}

LLVM IR (-O2):
@str = [51 x i8] c"FIPS 202 / SHA3, SHAKE128, SHAKE256 Self-Tests OK!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @test_sha3()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i64 (...) @test_shake()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5, %2
%11 = tail call i32 (...) @test_speed()
ret i32 0
}
void YUY2ToARGBRow_Any_AVX2() {}


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

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

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

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

/* Variables and functions */
struct String *auto_lltoa(long long);
struct String *String_0_toString_2_Integer(long long value) {
  return auto_lltoa(value);
}


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

x86 assembly (clang, -O2):
<String_0_toString_2_Integer>:
jmp    1030 <auto_lltoa@plt>

LLVM IR (-O0):
%struct.String = type { i32 }
define %struct.String* @String_0_toString_2_Integer(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call %struct.String* @auto_lltoa(i64 %3)
ret %struct.String* %4
}

LLVM IR (-O2):
%struct.String = type { i32 }
define %struct.String* @String_0_toString_2_Integer(i64 %0) {
%2 = tail call %struct.String* @auto_lltoa(i64 %0)
ret %struct.String* %2
}
/* Type definitions */
struct INI {
  int dummy;
};

/* Variables and functions */
struct INI *_ini_open_mem(char const *, size_t, int);
struct INI *ini_open_mem(const char *buf, size_t len) {
  return _ini_open_mem(buf, len, false);
}


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

x86 assembly (clang, -O2):
<ini_open_mem>:
xor    %edx,%edx
jmp    1030 <_ini_open_mem@plt>

LLVM IR (-O0):
%struct.INI = type { i32 }
define %struct.INI* @ini_open_mem(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call %struct.INI* @_ini_open_mem(i8* %5, i64 %6, i32 0)
ret %struct.INI* %7
}

LLVM IR (-O2):
%struct.INI = type { i32 }
define %struct.INI* @ini_open_mem(i8* %0, i64 %1) {
%3 = tail call %struct.INI* @_ini_open_mem(i8* %0, i64 %1, i32 0)
ret %struct.INI* %3
}
/* Variables and functions */
int pen(int);
int sqrt(int);
int invpen(int P) {
  int n = 1 + sqrt(1 + (24 * P));
  n = n / 6;
  if (pen(n) == P) {
    return n;
  }
  return 0;
}


x86 assembly (clang, -O0):
<invpen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
imul   $0x18,-0x8(%rbp),%edi
add    $0x1,%edi
call   1040 <sqrt@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <pen@plt>
cmp    -0x8(%rbp),%eax
jne    1167 <invpen+0x47>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <invpen+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invpen>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
lea    0x0(,%r14,8),%eax
lea    (%rax,%rax,2),%edi
or     $0x1,%edi
call   1040 <sqrt@plt>
add    $0x1,%eax
cltq
imul   $0x2aaaaaab,%rax,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
shr    $0x20,%rbx
add    %eax,%ebx
mov    %ebx,%edi
call   1030 <pen@plt>
xor    %ecx,%ecx
cmp    %r14d,%eax
cmove  %ebx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @invpen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = mul nsw i32 24, %5
%7 = add nsw i32 1, %6
%8 = call i32 @sqrt(i32 %7)
%9 = add nsw i32 1, %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 6
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @pen(i32 %12)
%14 = load i32, i32* %3
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %19
18: ; preds = %1
store i32 0, i32* %2
br label %19
19: ; preds = %18, %16
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @invpen(i32 %0) {
%2 = mul nsw i32 %0, 24
%3 = or i32 %2, 1
%4 = tail call i32 @sqrt(i32 %3)
%5 = add nsw i32 %4, 1
%6 = sdiv i32 %5, 6
%7 = tail call i32 @pen(i32 %6)
%8 = icmp eq i32 %7, %0
%9 = select i1 %8, i32 %6, i32 0
ret i32 %9
}
/* Variables and functions */
char *memmove(char *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
char *strmove(char *whither, const char *whence) {
  return memmove(whither, whence, strlen(whence) + 1);
}


x86 assembly (clang, -O0):
<strmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
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    %rax,%rdx
add    $0x1,%rdx
call   1040 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strmove>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memmove@plt>

LLVM IR (-O0):
define i8* @strmove(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 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @memmove(i8* %5, i8* %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strmove(i8* returned writeonly %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %4, i1 false)
ret i8* %0
}
/* Variables and functions */
int logical_smp_processor_id();
int cpu_to_logical_apicid(int cpu) { return logical_smp_processor_id(); }


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

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

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

LLVM IR (-O2):
define i32 @cpu_to_logical_apicid(i32 %0) {
%2 = tail call i32 (...) @logical_smp_processor_id()
ret i32 %2
}
int test_imm_3Cint32_mem(int *val) {
  return ((*val) & (0x3C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Cint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x3c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Cint32_mem>:
testb  $0x3c,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Cint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 60
%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_3Cint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 60
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
__attribute__((no_sanitize_undefined)) void vla_bound(void) {
  int i = -1;
  volatile int a[i];
}


x86 assembly (clang, -O0):
<vla_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xffffffff,-0x4(%rbp)
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):
<vla_bound>:
ret

LLVM IR (-O0):
define void @vla_bound() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 -1, i32* %1
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %2
%7 = alloca i32, i64 %5
store i64 %5, i64* %3
%8 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @vla_bound() {
ret void
}
void g_markup_parse_context_new() {}


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

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

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

LLVM IR (-O2):
define void @g_markup_parse_context_new() {
ret void
}
/* Variables and functions */
int unlink(char *);
int remove_pid(char *pid_file) { return unlink(pid_file); }


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

x86 assembly (clang, -O2):
<remove_pid>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @remove_pid(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
void g1(void) { __typeof__(f1()) x; }


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

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

LLVM IR (-O0):
define void @g1() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @g1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printstrarray(char **list, int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%s\n", list[i]);
  }
}


x86 assembly (clang, -O0):
<printstrarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <printstrarray+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printstrarray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printstrarray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printstrarray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printstrarray+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 @printstrarray(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8**, i8*** %3
%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 @printstrarray(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, 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
}