xunge/DecIR huggingface dataset:
/* Variables and functions */
int xtod(char);
int hex2dec(char *hex, int l) {
  if (*hex == 0)
    return l;
  return hex2dec(hex + 1, l * 16 + xtod(*hex));
}


x86 assembly (clang, -O0):
<hex2dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    114a <hex2dec+0x2a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117c <hex2dec+0x5c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <xtod@plt>
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdi
add    %eax,%esi
call   1030 <hex2dec@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2dec>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    (%rdi),%al
test   %al,%al
je     1149 <hex2dec+0x39>
mov    %rdi,%r14
add    $0x1,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
shl    $0x4,%ebx
movsbl %al,%edi
call   1030 <xtod@plt>
add    %eax,%ebx
movzbl (%r14),%eax
add    $0x1,%r14
test   %al,%al
jne    1130 <hex2dec+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @hex2dec(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = shl nsw i32 %7, 4
%11 = tail call i32 @xtod(i8 signext %6)
%12 = add nsw i32 %11, %10
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ %1, %2 ], [ %12, %5 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ F_SETLKW;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ errx(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ str_type(int);
int /*<<< orphan*/ try_lock(int /*<<< orphan*/, int, int /*<<< orphan*/, long,
                            long);
void lock_wait_ok(int type, long int start, long int len) {
  if (!try_lock(F_SETLKW, type, SEEK_SET, start, len))
    errx(1, "waiting for %s failed", str_type(type));
}


x86 assembly (clang, -O0):
<lock_wait_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    0x2e82(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1030 <try_lock@plt>
cmp    $0x0,%eax
jne    1189 <lock_wait_ok+0x59>
mov    -0x4(%rbp),%edi
call   1050 <str_type@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe7c(%rip),%rsi
call   1040 <errx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_wait_ok>:
push   %rbx
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %edi,%ebx
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%esi
call   1030 <try_lock@plt>
test   %eax,%eax
je     1158 <lock_wait_ok+0x28>
pop    %rbx
ret
mov    %ebx,%edi
call   1050 <str_type@plt>
lea    0xe9a(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
pop    %rbx
jmp    1040 <errx@plt>

LLVM IR (-O0):
@F_SETLKW = global i32 0
@SEEK_SET = global i32 0
@.str = [22 x i8] c"waiting for %s failed\00"
define void @lock_wait_ok(i32 %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
store i32 %0, i32* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32, i32* @F_SETLKW
%8 = load i32, i32* %4
%9 = load i32, i32* @SEEK_SET
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = call i32 @try_lock(i32 %7, i32 %8, i32 %9, i64 %10, i64 %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %3
%15 = load i32, i32* %4
%16 = call i32 @str_type(i32 %15)
%17 = call i32 @errx(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
@F_SETLKW = global i32 0
@SEEK_SET = global i32 0
@.str = [22 x i8] c"waiting for %s failed\00"
define void @lock_wait_ok(i32 %0, i64 %1, i64 %2) {
%4 = load i32, i32* @F_SETLKW
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @try_lock(i32 %4, i32 %0, i32 %5, i64 %1, i64 %2)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = tail call i32 @str_type(i32 %0)
%10 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %3
ret void
}
void od_restore_fpu_c(void) {}


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

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

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

LLVM IR (-O2):
define void @od_restore_fpu_c() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
int is_word_sep(char c) {
  return (c == '\0' || isspace((unsigned char)c) || c == ',');
}


x86 assembly (clang, -O0):
<is_word_sep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     1158 <is_word_sep+0x48>
movzbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1158 <is_word_sep+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x2c,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_word_sep>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x1,%ebx
test   %bpl,%bpl
je     1136 <is_word_sep+0x26>
movzbl %bpl,%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    1136 <is_word_sep+0x26>
xor    %ebx,%ebx
cmp    $0x2c,%bpl
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_word_sep(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isspace(i8 zeroext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 44
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_word_sep(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @isspace(i8 zeroext %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = icmp eq i8 %0, 44
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %6, %3, %1
%10 = phi i32 [ 1, %3 ], [ 1, %1 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void call_memcpy_nonnull(void *p, void *q, int sz) { memcpy(p, q, sz); }


x86 assembly (clang, -O0):
<call_memcpy_nonnull>:
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 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_memcpy_nonnull>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @call_memcpy_nonnull(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 @memcpy(i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @call_memcpy_nonnull(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void WatchdogIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  ;
  IntRegister(34, pfnHandler);
  IntEnable(34);
}


x86 assembly (clang, -O0):
<WatchdogIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x22,%edi
call   1040 <IntRegister@plt>
mov    $0x22,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntRegister>:
push   %rax
mov    $0x22,%edi
call   1040 <IntRegister@plt>
mov    $0x22,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @WatchdogIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %4
%6 = bitcast void ()* %5 to void (...)*
%7 = call i32 @IntRegister(i32 34, void (...)* %6)
%8 = call i32 @IntEnable(i32 34)
ret void
}

LLVM IR (-O2):
define void @WatchdogIntRegister(i64 %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @IntRegister(i32 34, void (...)* %3)
%5 = tail call i32 @IntEnable(i32 34)
ret void
}
/* Type definitions */
struct litehash {
  int dummy;
};

/* Variables and functions */
void *lh_getval(struct litehash *, void *);
void *lh_getval2(struct litehash *lh, void *key1, void *key2) {
  struct litehash *lh2 = lh_getval(lh, key1);
  if (!lh2)
    return NULL;
  return lh_getval(lh2, key2);
}


x86 assembly (clang, -O0):
<lh_getval2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <lh_getval@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    114d <lh_getval2+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    115e <lh_getval2+0x4e>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <lh_getval@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lh_getval2>:
push   %rbx
mov    %rdx,%rbx
call   1030 <lh_getval@plt>
test   %rax,%rax
je     112a <lh_getval2+0x1a>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <lh_getval@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.litehash = type { i32 }
define i8* @lh_getval2(%struct.litehash* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.litehash*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca %struct.litehash*
store %struct.litehash* %0, %struct.litehash** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = load %struct.litehash*, %struct.litehash** %5
%10 = load i8*, i8** %6
%11 = call i8* @lh_getval(%struct.litehash* %9, i8* %10)
%12 = bitcast i8* %11 to %struct.litehash*
store %struct.litehash* %12, %struct.litehash** %8
%13 = load %struct.litehash*, %struct.litehash** %8
%14 = icmp ne %struct.litehash* %13, null
br i1 %14, label %16, label %15
15: ; preds = %3
store i8* null, i8** %4
br label %20
16: ; preds = %3
%17 = load %struct.litehash*, %struct.litehash** %8
%18 = load i8*, i8** %7
%19 = call i8* @lh_getval(%struct.litehash* %17, i8* %18)
store i8* %19, i8** %4
br label %20
20: ; preds = %16, %15
%21 = load i8*, i8** %4
ret i8* %21
}

LLVM IR (-O2):
%struct.litehash = type { i32 }
define i8* @lh_getval2(%struct.litehash* %0, i8* %1, i8* %2) {
%4 = tail call i8* @lh_getval(%struct.litehash* %0, i8* %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = bitcast i8* %4 to %struct.litehash*
%8 = tail call i8* @lh_getval(%struct.litehash* %7, i8* %2)
br label %9
9: ; preds = %3, %6
%10 = phi i8* [ %8, %6 ], [ null, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int, float, double);
int /*<<< orphan*/ scanf(char *, char *, int *, float *, double *);
int main() {
  char input_1;
  int input_2;
  float input_3;
  double input_4;
  scanf("%c %d %f %lf", &input_1, &input_2, &input_3, &input_4);
  printf("%c %d %.6f %.6lf", input_1, input_2, input_3, input_4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
lea    -0x1(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x18(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
movss  -0xc(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xeb2(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0x10(%rsp),%r8
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
mov    0xc(%rsp),%edx
movss  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%c %d %f %lf\00"
@.str.1 = [17 x i8] c"%c %d %.6f %.6lf\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2, float* %3, double* %4)
%6 = load i8, i8* %1
%7 = load i32, i32* %2
%8 = load float, float* %3
%9 = load double, double* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8 signext %6, i32 %7, float %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%c %d %f %lf\00"
@.str.1 = [17 x i8] c"%c %d %.6f %.6lf\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca float
%4 = alloca double
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = bitcast double* %4 to i8*
%8 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2, float* %3, double* %4)
%9 = load i8, i8* %1
%10 = load i32, i32* %2
%11 = load float, float* %3
%12 = load double, double* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8 signext %9, i32 %10, float %11, double %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void NeverValue(int value) {
  printf("FAIL: NeverValue most be NOT visible\n");
  exit(1);
}


x86 assembly (clang, -O0):
<NeverValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<NeverValue>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"FAIL: NeverValue most be NOT visible\0A\00"
define void @NeverValue(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [37 x i8] c"FAIL: NeverValue most be NOT visible\00"
define void @NeverValue(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *trim_index(char *, char *);
char *timlib_trim_index(char *destination, char *attribute_name) {
  return trim_index(destination, attribute_name);
}


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

x86 assembly (clang, -O2):
<timlib_trim_index>:
jmp    1030 <trim_index@plt>

LLVM IR (-O0):
define i8* @timlib_trim_index(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 = call i8* @trim_index(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @timlib_trim_index(i8* %0, i8* %1) {
%3 = tail call i8* @trim_index(i8* %0, i8* %1)
ret i8* %3
}
int aagwrap(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @aagwrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @aagwrap() {
ret i32 1
}
void _stp_hrtimer_init(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct moon *);
int moon_free(struct moon *self) {
  free(self);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.moon = type { i32 }
define i32 @moon_free(%struct.moon* nocapture %0) {
%2 = tail call i32 @free(%struct.moon* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_pi16(short, short, short, short);
__m64 test_mm_set_pi16(short a, short b, short c, short d) {
  return _mm_set_pi16(a, b, c, d);
}


x86 assembly (clang, -O0):
<test_mm_set_pi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %si,%dx
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %dx,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x4(%rbp),%cx
mov    -0x6(%rbp),%ax
movswl %dx,%edi
movswl %cx,%esi
movswl %ax,%edx
movswl -0x8(%rbp),%ecx
call   1030 <_mm_set_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_set_pi16>:
jmp    1030 <_mm_set_pi16@plt>

LLVM IR (-O0):
define i32 @test_mm_set_pi16(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
store i16 %0, i16* %5
store i16 %1, i16* %6
store i16 %2, i16* %7
store i16 %3, i16* %8
%9 = load i16, i16* %5
%10 = load i16, i16* %6
%11 = load i16, i16* %7
%12 = load i16, i16* %8
%13 = call i32 @_mm_set_pi16(i16 signext %9, i16 signext %10, i16 signext %11, i16 signext %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_mm_set_pi16(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = tail call i32 @_mm_set_pi16(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3)
ret i32 %5
}
int test_imm_04int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x04 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_04int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_04int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 262144
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int strcmp(char const *, char const *);
int _assert_strcmp_(const char *p1, const char *p2) {
  if (!p1 || !p2)
    return p1 != p2;
  return strcmp(p1, p2);
}


x86 assembly (clang, -O0):
<_assert_strcmp_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <_assert_strcmp_+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    114e <_assert_strcmp_+0x3e>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    115e <_assert_strcmp_+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_strcmp_>:
test   %rdi,%rdi
je     111f <_assert_strcmp_+0xf>
test   %rsi,%rsi
je     111f <_assert_strcmp_+0xf>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @_assert_strcmp_(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = icmp ne i8* %0, %1
%8 = zext i1 %7 to i32
br label %11
9: ; preds = %2
%10 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %10, %9 ], [ %8, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(void const *, int, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strlen(void const *);
void frw_debugPrint(const void *sz) {
  fwrite(sz, 1, strlen(sz), stdout);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<frw_debugPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
mov    0x2e86(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1050 <fwrite@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frw_debugPrint>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    0x2e9d(%rip),%r14
mov    (%r14),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1050 <fwrite@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @frw_debugPrint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fwrite(i8* %3, i32 1, i32 %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @frw_debugPrint(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fwrite(i8* %0, i32 1, i32 %2, i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ num;

/* Variables and functions */
int /*<<< orphan*/ SwapWord(char *, int);
long big2littlel(long num) {
  SwapWord((char *)&num, sizeof(num));
  return num;
}


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

x86 assembly (clang, -O2):
<big2littlel>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x8,%esi
call   1030 <SwapWord@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @big2littlel(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = bitcast i64* %2 to i8*
%4 = call i32 @SwapWord(i8* %3, i32 8)
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @big2littlel(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = bitcast i64* %2 to i8*
%4 = call i32 @SwapWord(i8* %3, i32 8)
%5 = load i64, i64* %2
ret i64 %5
}
void passByRef(int *x) {}


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

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

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

LLVM IR (-O2):
define void @passByRef(i32* nocapture %0) {
ret void
}
void gtk_text_tag_table_lookup() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_tag_table_lookup() {
ret void
}
int func5() { return 1; }


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

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

LLVM IR (-O0):
define i32 @func5() {
ret i32 1
}

LLVM IR (-O2):
define i32 @func5() {
ret i32 1
}
void rop3_146_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = *D | T;
  stk3 = S & stk4;
  stk2 = T ^ stk3;
  stk1 = *D ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_146_0_0>:
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
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xe(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xe(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_146_0_0(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
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %10
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = load i8, i8* %10
%21 = zext i8 %20 to i32
%22 = and i32 %19, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %6
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8*, i8** %4
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = load i8, i8* %8
%34 = zext i8 %33 to i32
%35 = xor i32 %32, %34
%36 = trunc i32 %35 to i8
store i8 %36, i8* %7
%37 = load i8, i8* %7
%38 = load i8*, i8** %4
store i8 %37, i8* %38
ret void
}

LLVM IR (-O2):
define void @rop3_146_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %4, %2
%8 = xor i8 %7, %6
store i8 %8, i8* %0
ret void
}
void iis_init(void) {
  int N;
  (*(volatile unsigned int *)0xE0200220) = 0x22222222;
  (*(volatile unsigned int *)0xe0100110) = 0xa8430303;
  (*(volatile unsigned int *)0xe0100114) = 0xbcee;
  (*(volatile unsigned int *)0xE0100200) = 0x10001111;
  (*(volatile unsigned int *)0xEEE10000) = 0x1;
  N = 5;
  (*(volatile unsigned int *)0xEEE3000C) = 1 << 15 | N << 8;
  (*(volatile unsigned int *)0xEEE30000) |= 1 << 0 | (unsigned)1 << 31;
  (*(volatile unsigned int *)0xEEE30004) = 1 << 9 | 0 << 8 | 1 << 10;
}


x86 assembly (clang, -O0):
<iis_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0200220,%eax
movl   $0x22222222,(%rax)
mov    $0xe0100110,%eax
movl   $0xa8430303,(%rax)
mov    $0xe0100114,%eax
movl   $0xbcee,(%rax)
mov    $0xe0100200,%eax
movl   $0x10001111,(%rax)
mov    $0xeee10000,%eax
movl   $0x1,(%rax)
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     $0x8000,%ecx
mov    $0xeee3000c,%eax
mov    %ecx,(%rax)
mov    $0xeee30000,%eax
mov    (%rax),%ecx
or     $0x80000001,%ecx
mov    $0xeee30000,%eax
mov    %ecx,(%rax)
mov    $0xeee30004,%eax
movl   $0x600,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<iis_init>:
mov    $0xeee30000,%eax
movl   $0x22222222,-0xec2fde0(%rax)
22 22 22
movl   $0xa8430303,-0xed2fef0(%rax)
03 43 a8
movl   $0xbcee,-0xed2feec(%rax)
movl   $0x10001111,-0xed2fe00(%rax)
movl   $0x1,-0x20000(%rax)
movl   $0x8500,0xc(%rax)
orl    $0x80000001,(%rax)
movl   $0x600,0x4(%rax)
ret

LLVM IR (-O0):
define void @iis_init() {
%1 = alloca i32
store volatile i32 572662306, i32* inttoptr (i64 3760194080 to i32*)
store volatile i32 -1472003325, i32* inttoptr (i64 3759145232 to i32*)
store volatile i32 48366, i32* inttoptr (i64 3759145236 to i32*)
store volatile i32 268439825, i32* inttoptr (i64 3759145472 to i32*)
store volatile i32 1, i32* inttoptr (i64 4007723008 to i32*)
store i32 5, i32* %1
%2 = load i32, i32* %1
%3 = shl i32 %2, 8
%4 = or i32 32768, %3
store volatile i32 %4, i32* inttoptr (i64 4007854092 to i32*)
%5 = load volatile i32, i32* inttoptr (i64 4007854080 to i32*)
%6 = or i32 %5, -2147483647
store volatile i32 %6, i32* inttoptr (i64 4007854080 to i32*)
store volatile i32 1536, i32* inttoptr (i64 4007854084 to i32*)
ret void
}

LLVM IR (-O2):
define void @iis_init() {
store volatile i32 572662306, i32* inttoptr (i64 3760194080 to i32*)
store volatile i32 -1472003325, i32* inttoptr (i64 3759145232 to i32*)
store volatile i32 48366, i32* inttoptr (i64 3759145236 to i32*)
store volatile i32 268439825, i32* inttoptr (i64 3759145472 to i32*)
store volatile i32 1, i32* inttoptr (i64 4007723008 to i32*)
store volatile i32 34048, i32* inttoptr (i64 4007854092 to i32*)
%1 = load volatile i32, i32* inttoptr (i64 4007854080 to i32*)
%2 = or i32 %1, -2147483647
store volatile i32 %2, i32* inttoptr (i64 4007854080 to i32*)
store volatile i32 1536, i32* inttoptr (i64 4007854084 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main() {
  sleep(3);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ synchronize_sched_expedited();
void synchronize_rcu_bh_expedited(void) { synchronize_sched_expedited(); }


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

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

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

LLVM IR (-O2):
define void @synchronize_rcu_bh_expedited() {
%1 = tail call i32 (...) @synchronize_sched_expedited()
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_win_wchstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_win_wchstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_win_wchstr+0x2a>
jmp    1170 <cmd_win_wchstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_win_wchstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_win_wchstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_win_wchstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_win_wchstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
void witem_cache_cleanup(void *value) {}


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

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

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

LLVM IR (-O2):
define void @witem_cache_cleanup(i8* nocapture %0) {
ret void
}
char *hash_plugin_detailed(void) {
  return ("whirlpool - Whirlpool plugin\n"
          "------------------------\n"
          "Use this module to crack WHIRLPOOL hashes\n"
          "Input should be in form: \'user:hash\' or just \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "Unknown\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [257 x i8] c"whirlpool - Whirlpool plugin\0A------------------------\0AUse this module to crack WHIRLPOOL hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AUnknown\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([257 x i8], [257 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [257 x i8] c"whirlpool - Whirlpool plugin\0A------------------------\0AUse this module to crack WHIRLPOOL hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AUnknown\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([257 x i8], [257 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef char *uint64_t;
struct perf_event_mmap_page {
  int /*<<< orphan*/ data_head;
};

/* Variables and functions */
uint64_t read_data_head(struct perf_event_mmap_page *perf_header) {
  uint64_t data_head = *((volatile uint64_t *)&perf_header->data_head);
  asm volatile("" ::: "memory");
  return data_head;
}


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

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

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

LLVM IR (-O2):
%struct.perf_event_mmap_page = type { i32 }
define i8* @read_data_head(%struct.perf_event_mmap_page* %0) {
%2 = bitcast %struct.perf_event_mmap_page* %0 to i8**
%3 = load volatile i8*, i8** %2
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret i8* %3
}
void ASN1_BIT_STRING_free(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_BIT_STRING_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ lngtxt(int);
int /*<<< orphan*/ p_log(int, int, int /*<<< orphan*/);
void killed() {
  p_log(0x0002, -1, lngtxt(702));
  exit(0x0);
}


x86 assembly (clang, -O0):
<killed>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2be,%edi
call   1040 <lngtxt@plt>
mov    %eax,%edx
mov    $0x2,%edi
mov    $0xffffffff,%esi
call   1030 <p_log@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<killed>:
push   %rax
mov    $0x2be,%edi
call   1040 <lngtxt@plt>
mov    $0x2,%edi
mov    $0xffffffff,%esi
mov    %eax,%edx
call   1030 <p_log@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @killed() {
%1 = call i32 @lngtxt(i32 702)
%2 = call i32 @p_log(i32 2, i32 -1, i32 %1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @killed() {
%1 = tail call i32 @lngtxt(i32 702)
%2 = tail call i32 @p_log(i32 2, i32 -1, i32 %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_1Bint32_mem(int *val) {
  return ((*val) & (0x1B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Bint32_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, 27
%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_1Bint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 27
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int blastzScoreToNcbiScore(int bzScore) {
  return ((int)((bzScore * 0.0529) + 0.5));
}


x86 assembly (clang, -O0):
<blastzScoreToNcbiScore>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blastzScoreToNcbiScore>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @blastzScoreToNcbiScore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call double @llvm.fmuladd.f64(double %4, double 5.290000e-02, double 5.000000e-01)
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @blastzScoreToNcbiScore(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 5.290000e-02, double 5.000000e-01)
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int masqmod_main(int argc, const char *argv[]) {
  printf("\n%s: MODhello\n", argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<masqmod_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"\0A%s: MODhello\0A\00"
define i32 @masqmod_main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Type definitions */
struct kowhai_node_t {
  int dummy;
};

/* Variables and functions */
int get_node_size(struct kowhai_node_t const *, int *, int *);
int kowhai_get_node_size(const struct kowhai_node_t *node, int *size) {
  int num_nodes_processed;
  return get_node_size(node, size, &num_nodes_processed);
}


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

x86 assembly (clang, -O2):
<kowhai_get_node_size>:
push   %rax
lea    0x4(%rsp),%rdx
call   1030 <get_node_size@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.kowhai_node_t = type { i32 }
define i32 @kowhai_get_node_size(%struct.kowhai_node_t* %0, i32* %1) {
%3 = alloca %struct.kowhai_node_t*
%4 = alloca i32*
%5 = alloca i32
store %struct.kowhai_node_t* %0, %struct.kowhai_node_t** %3
store i32* %1, i32** %4
%6 = load %struct.kowhai_node_t*, %struct.kowhai_node_t** %3
%7 = load i32*, i32** %4
%8 = call i32 @get_node_size(%struct.kowhai_node_t* %6, i32* %7, i32* %5)
ret i32 %8
}

LLVM IR (-O2):
%struct.kowhai_node_t = type { i32 }
define i32 @kowhai_get_node_size(%struct.kowhai_node_t* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @get_node_size(%struct.kowhai_node_t* %0, i32* %1, i32* %3)
ret i32 %5
}
/* Variables and functions */
int rand();
float rnd(float num) { return (((rand() % 10)) * 0.01 + 1) * num; }


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec4(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xeb6(%rip),%xmm0
addsd  0xeb6(%rip),%xmm0
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @rnd(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 10
%5 = sitofp i32 %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.000000e-02, double 1.000000e+00)
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double %6, %8
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
define float @rnd(float %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 10
%4 = sitofp i32 %3 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.000000e-02, double 1.000000e+00)
%6 = fpext float %0 to double
%7 = fmul double %5, %6
%8 = fptrunc double %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ RecursiveReturn();
int /*<<< orphan*/ TXTOUT(char *);
void EndBOLD() {
  TXTOUT("}");
  RecursiveReturn();
}


x86 assembly (clang, -O0):
<EndBOLD>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <TXTOUT@plt>
mov    $0x0,%al
call   1040 <RecursiveReturn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndBOLD>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <TXTOUT@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <RecursiveReturn@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"}\00"
define void @EndBOLD() {
%1 = call i32 @TXTOUT(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @RecursiveReturn()
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"}\00"
define void @EndBOLD() {
%1 = tail call i32 @TXTOUT(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @RecursiveReturn()
ret void
}
/* Variables and functions */
scalar_t__ ya_random();
float myrandom(float up) { return (((float)ya_random() / 0xFFFFFFFF) * up); }


x86 assembly (clang, -O0):
<myrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <ya_random@plt>
cvtsi2ss %rax,%xmm0
movss  0xecf(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrandom>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <ya_random@plt>
cvtsi2ss %rax,%xmm1
mulss  0xed5(%rip),%xmm1
movss  0x4(%rsp),%xmm0
mulss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @myrandom(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i64 (...) @ya_random()
%4 = sitofp i64 %3 to float
%5 = fdiv float %4, 0x41F0000000000000
%6 = load float, float* %2
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @myrandom(float %0) {
%2 = tail call i64 (...) @ya_random()
%3 = sitofp i64 %2 to float
%4 = fmul float %3, 0x3DF0000000000000
%5 = fmul float %4, %0
ret float %5
}