xunge/DecIR huggingface dataset:
int arch_real_open(int flags) {
  if ((flags & 0x00010000) == 0 && (flags & 0x03) != 3)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<arch_real_open>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10000,%eax
cmp    $0x0,%eax
jne    1133 <arch_real_open+0x33>
mov    -0x8(%rbp),%eax
and    $0x3,%eax
cmp    $0x3,%eax
je     1133 <arch_real_open+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <arch_real_open+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_real_open>:
test   $0x10000,%edi
sete   %al
not    %edi
test   $0x3,%dil
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @arch_real_open(i32 %0) {
%2 = and i32 %0, 65536
%3 = icmp eq i32 %2, 0
%4 = and i32 %0, 3
%5 = icmp ne i32 %4, 3
%6 = and i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((visibility("hidden"))) int methodD(int a, int b) {
  printf("HiddenD used by H\n");
  return a - b;
}


x86 assembly (clang, -O0):
<methodD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<methodD>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
sub    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"HiddenD used by H\0A\00"
define hidden i32 @methodD(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@str = [18 x i8] c"HiddenD used by H\00"
define hidden i32 @methodD(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = sub nsw i32 %0, %1
ret i32 %4
}
/* Variables and functions */
float atof(char const *);
float str2float(__const char *str) { return atof(str); }


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

x86 assembly (clang, -O2):
<str2float>:
jmp    1030 <atof@plt>

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

LLVM IR (-O2):
define float @str2float(i8* nocapture %0) {
%2 = tail call float @atof(i8* %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ RTFRouteToken();
int /*<<< orphan*/ RTFSkipGroup();
void ReadInfoGroup(void) {
  RTFSkipGroup();
  RTFRouteToken();
}


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

x86 assembly (clang, -O2):
<ReadInfoGroup>:
push   %rax
xor    %eax,%eax
call   1030 <RTFSkipGroup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <RTFRouteToken@plt>

LLVM IR (-O0):
define void @ReadInfoGroup() {
%1 = call i32 (...) @RTFSkipGroup()
%2 = call i32 (...) @RTFRouteToken()
ret void
}

LLVM IR (-O2):
define void @ReadInfoGroup() {
%1 = tail call i32 (...) @RTFSkipGroup()
%2 = tail call i32 (...) @RTFRouteToken()
ret void
}
void setpackagepath(char *packagedirparm) { return; }


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

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

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

LLVM IR (-O2):
define void @setpackagepath(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int func(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  long result = 0;
  for (i = 1; i <= 100; i++) {
    result += i;
  }
  printf("result[1-100] = %ld \n", result);
  printf("result[1-250] = %d \n", func(250));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1162 <main+0x42>
movslq -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <main+0x1e>
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    $0xfa,%edi
call   1040 <func@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x13ba,%esi
call   1030 <printf@plt>
mov    $0xfa,%edi
call   1040 <func@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"result[1-100] = %ld \0A\00"
@.str.1 = [21 x i8] c"result[1-250] = %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 5050)
%2 = tail call i32 @func(i32 250)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int test(int, int);
int main(int argc, char **argv) {
  printf("1 + 1 = %d\n", test(1, 1));
  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    $0x1,%esi
mov    %esi,%edi
call   1040 <test@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"1 + 1 = %d\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 i32 @test(i32 1, i32 1)
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"1 + 1 = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test(i32 1, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
unsigned long get_peripheral_clk_rate();
unsigned long get_tmu0_clk_rate(void) { return get_peripheral_clk_rate(); }


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

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

LLVM IR (-O0):
define i64 @get_tmu0_clk_rate() {
%1 = call i64 (...) @get_peripheral_clk_rate()
ret i64 %1
}

LLVM IR (-O2):
define i64 @get_tmu0_clk_rate() {
%1 = tail call i64 (...) @get_peripheral_clk_rate()
ret i64 %1
}
int p(int n) {
  if (n >= 2)
    return 2 * p(n - 1) + p(n - 2);
  else
    return n;
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1150 <p+0x40>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <p@plt>
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <p@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1156 <p+0x46>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %r14d,%r14d
cmp    $0x2,%edi
jl     1148 <p+0x38>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%edi
call   1030 <p@plt>
lea    -0x2(%rbx),%ecx
lea    (%r14,%rax,2),%r14d
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <p+0x20>
jmp    114a <p+0x3a>
mov    %ebx,%ecx
add    %ecx,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @p(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %12
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ %0, %1 ]
%5 = phi i32 [ %10, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @p(i32 %6)
%8 = shl nsw i32 %7, 1
%9 = add nsw i32 %4, -2
%10 = add nsw i32 %8, %5
%11 = icmp ugt i32 %4, 3
br i1 %11, label %3, label %12
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %10, %3 ]
%14 = phi i32 [ %0, %1 ], [ %9, %3 ]
%15 = add nsw i32 %14, %13
ret i32 %15
}
void strLowerCase(char str[]) {
  for (; *str != '\0'; str++) {
    if (*str > 64 && *str < 91) {
      *str += 32;
    }
  }
}


x86 assembly (clang, -O0):
<strLowerCase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115a <strLowerCase+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jle    1144 <strLowerCase+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jge    1144 <strLowerCase+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
jmp    1149 <strLowerCase+0x49>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <strLowerCase+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strLowerCase>:
mov    (%rdi),%al
test   %al,%al
je     112a <strLowerCase+0x2a>
add    $0x1,%rdi
jmp    111b <strLowerCase+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <strLowerCase+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <strLowerCase+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <strLowerCase+0x10>
ret

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

LLVM IR (-O2):
define void @strLowerCase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OBJECT;

/* Variables and functions */
int obj_cmp(int /*<<< orphan*/ const *const *, unsigned int const *);
int obj_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) {
  const ASN1_OBJECT *const *a = a_;
  unsigned int const *b = b_;
  return obj_cmp(a, b);
}


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

x86 assembly (clang, -O2):
<obj_cmp_BSEARCH_CMP_FN>:
jmp    1030 <obj_cmp@plt>

LLVM IR (-O0):
define i32 @obj_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32**
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32**
store i32** %8, i32*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32**, i32*** %5
%12 = load i32*, i32** %6
%13 = call i32 @obj_cmp(i32** %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @obj_cmp_BSEARCH_CMP_FN(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32**
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @obj_cmp(i32** %3, i32* %4)
ret i32 %5
}
void cclear(unsigned char *a, unsigned char c, long n) {
  long i;
  for (i = 0; i < n; i++) {
    a[i] = c;
  }
}


x86 assembly (clang, -O0):
<cclear>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1147 <cclear+0x47>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111a <cclear+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cclear>:
test   %rdx,%rdx
jle    1123 <cclear+0x13>
push   %rax
movzbl %sil,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @cclear(i8* %0, i8 zeroext %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8 %1, i8* %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %17, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i8, i8* %5
%14 = load i8*, i8** %4
%15 = load i64, i64* %7
%16 = getelementptr inbounds i8, i8* %14, i64 %15
store i8 %13, i8* %16
br label %17
17: ; preds = %12
%18 = load i64, i64* %7
%19 = add nsw i64 %18, 1
store i64 %19, i64* %7
br label %8
20: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @cclear(i8* nocapture writeonly %0, i8 zeroext %1, i64 %2) {
%4 = icmp sgt i64 %2, 0
br i1 %4, label %5, label %6
5: ; preds = %3
br label %6
6: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef scalar_t__ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ unicode_putc(scalar_t__, int /*<<< orphan*/ *);
void wchar_puts(wchar_t *line, FILE *fout) {
  wchar_t c;
  while (*line) {
    c = *line++;
    unicode_putc(c, fout);
  }
}


x86 assembly (clang, -O0):
<wchar_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1156 <wchar_puts+0x46>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <unicode_putc@plt>
jmp    1120 <wchar_puts+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wchar_puts>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1144 <wchar_puts+0x34>
mov    %rsi,%r14
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rsi
call   1030 <unicode_putc@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <wchar_puts+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @wchar_puts(i64* nocapture %0, i32* %1) {
%3 = load i64, i64* %0
%4 = icmp eq i64 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ %3, %2 ]
%7 = phi i64* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i64, i64* %7, i64 1
%9 = tail call i32 @unicode_putc(i64 %6, i32* %1)
%10 = load i64, i64* %8
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
int f4(int a, int b) { return a == 35 && b == 20; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x23,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <f4+0x23>
cmpl   $0x14,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
xor    $0x23,%edi
xor    $0x14,%esi
xor    %eax,%eax
or     %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @f4(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 = icmp eq i32 %5, 35
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 20
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 35
%4 = icmp eq i32 %1, 20
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct fc_sockaddr_list_link {
  int dummy;
};
struct fc_sockaddr_list {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_link(struct genlist const *, int);
struct fc_sockaddr_list_link *
fc_sockaddr_list_link(const struct fc_sockaddr_list *tthis, int index) {
  return ((struct fc_sockaddr_list_link *)genlist_link(
      (const struct genlist *)tthis, index));
}


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

x86 assembly (clang, -O2):
<fc_sockaddr_list_link>:
jmp    1030 <genlist_link@plt>

LLVM IR (-O0):
%struct.fc_sockaddr_list_link = type { i32 }
%struct.fc_sockaddr_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.fc_sockaddr_list_link* @fc_sockaddr_list_link(%struct.fc_sockaddr_list* %0, i32 %1) {
%3 = alloca %struct.fc_sockaddr_list*
%4 = alloca i32
store %struct.fc_sockaddr_list* %0, %struct.fc_sockaddr_list** %3
store i32 %1, i32* %4
%5 = load %struct.fc_sockaddr_list*, %struct.fc_sockaddr_list** %3
%6 = bitcast %struct.fc_sockaddr_list* %5 to %struct.genlist*
%7 = load i32, i32* %4
%8 = call i64 @genlist_link(%struct.genlist* %6, i32 %7)
%9 = inttoptr i64 %8 to %struct.fc_sockaddr_list_link*
ret %struct.fc_sockaddr_list_link* %9
}

LLVM IR (-O2):
%struct.fc_sockaddr_list_link = type { i32 }
%struct.fc_sockaddr_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.fc_sockaddr_list_link* @fc_sockaddr_list_link(%struct.fc_sockaddr_list* %0, i32 %1) {
%3 = bitcast %struct.fc_sockaddr_list* %0 to %struct.genlist*
%4 = tail call i64 @genlist_link(%struct.genlist* %3, i32 %1)
%5 = inttoptr i64 %4 to %struct.fc_sockaddr_list_link*
ret %struct.fc_sockaddr_list_link* %5
}
R0RX1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if (r0 <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movsbl -0x5(%rbp),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jg     1142 <R0RX1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <R0RX1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0RX1>:
movsbl %dil,%edx
movslq %ecx,%rax
movsbl (%r9,%rax,1),%ecx
xor    %eax,%eax
cmp    %ecx,%edx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @R0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = shl i32 %0, 24
%8 = ashr exact i32 %7, 24
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %8, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t knot_edns_whole_rcode(uint8_t ext_rcode, uint8_t rcode) {
  uint16_t high = ext_rcode;
  return (high << 4) | rcode;
}


x86 assembly (clang, -O0):
<knot_edns_whole_rcode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x4,%eax
or     -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @knot_edns_whole_rcode(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* %3
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = shl i32 %7, 4
%9 = load i32, i32* %4
%10 = or i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @knot_edns_whole_rcode(i32 %0, i32 %1) {
%3 = shl i32 %0, 4
%4 = or i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int EOF;
int get_char();
int get_int();
repeat() {
  int count;
  int ch;
  count = get_int();
  while ((ch = get_char()) != EOF && ch != 050)
    ;
}


x86 assembly (clang, -O0):
<repeat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <get_char@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ea1(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xd(%rbp)
je     115c <repeat+0x3c>
cmpl   $0x28,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    116c <repeat+0x4c>
jmp    1171 <repeat+0x51>
jmp    1132 <repeat+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<repeat>:
push   %rbx
xor    %eax,%eax
call   1030 <get_int@plt>
mov    0x2eb9(%rip),%rbx
nop
xor    %eax,%eax
call   1040 <get_char@plt>
cmp    $0x28,%eax
je     1140 <repeat+0x20>
cmp    (%rbx),%eax
jne    1130 <repeat+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @repeat() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @get_int()
store i32 %4, i32* %2
br label %5
5: ; preds = %14, %0
%6 = call i32 (...) @get_char()
store i32 %6, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 40
br label %12
12: ; preds = %9, %5
%13 = phi i1 [ false, %5 ], [ %11, %9 ]
br i1 %13, label %14, label %15
14: ; preds = %12
br label %5
15: ; preds = %12
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @repeat() {
%1 = tail call i32 (...) @get_int()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @get_char()
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = icmp ne i32 %3, 40
%7 = and i1 %6, %5
br i1 %7, label %2, label %8
8: ; preds = %2
ret i32 undef
}
int test_imm_99uint8_reg(unsigned char val) {
  return ((val) & (0x99 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_99uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x99,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_99uint8_reg>:
test   $0x99,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_99uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 153
%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_99uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -103
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
const char *_Locale_pm_str(struct _Locale_time *ltime
                           __attribute__((__unused__))) {
  return "PM";
}


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

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

LLVM IR (-O0):
%struct._Locale_time = type opaque
@.str = [3 x i8] c"PM\00"
define i8* @_Locale_pm_str(%struct._Locale_time* %0) {
%2 = alloca %struct._Locale_time*
store %struct._Locale_time* %0, %struct._Locale_time** %2
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_time = type opaque
@.str = [3 x i8] c"PM\00"
define i8* @_Locale_pm_str(%struct._Locale_time* nocapture readnone %0) {
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter any number: ");
  scanf("%d", &n);
  printf("\nSquare root of %d is %d", n, n * n);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Enter any number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"\0ASquare root of %d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter any number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"\0ASquare root of %d is %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, %5
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
char *trim(char *src, int maxLength) { *(src + (maxLength - 1)) = '\0'; }


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
movslq %esi,%rax
movb   $0x0,-0x1(%rax,%rdi,1)
ret

LLVM IR (-O0):
define i8* @trim(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = sub nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
store i8 0, i8* %10
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @trim(i8* nocapture writeonly %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %5
ret i8* undef
}
/* Variables and functions */
int Fin_Cmnd(int, char, unsigned char *);
int Fin_Obstacle(int *left, int *right) {
  unsigned char IoBuffer[9];
  int res;
  *left = 0;
  *right = 0;
  res = Fin_Cmnd(1, 'I', IoBuffer);
  if (res > 0) {
    *left = (int)IoBuffer[0];
    *right = (int)IoBuffer[1];
  }
  return (res);
}


x86 assembly (clang, -O0):
<Fin_Obstacle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
lea    -0x19(%rbp),%rdx
mov    $0x1,%edi
mov    $0x49,%esi
call   1030 <Fin_Cmnd@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    1168 <Fin_Obstacle+0x58>
movzbl -0x19(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
movzbl -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fin_Obstacle>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movl   $0x0,(%rdi)
movl   $0x0,(%rsi)
lea    0xf(%rsp),%rdx
mov    $0x1,%edi
mov    $0x49,%esi
call   1030 <Fin_Cmnd@plt>
test   %eax,%eax
jle    1150 <Fin_Obstacle+0x40>
movzbl 0xf(%rsp),%ecx
mov    %ecx,(%rbx)
movzbl 0x10(%rsp),%ecx
mov    %ecx,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @Fin_Obstacle(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [9 x i8]
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
store i32 0, i32* %7
%8 = load i32*, i32** %4
store i32 0, i32* %8
%9 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%10 = call i32 @Fin_Cmnd(i32 1, i8 signext 73, i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %2
%14 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 0
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i32*, i32** %3
store i32 %16, i32* %17
%18 = getelementptr inbounds [9 x i8], [9 x i8]* %5, i64 0, i64 1
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i32*, i32** %4
store i32 %20, i32* %21
br label %22
22: ; preds = %13, %2
%23 = load i32, i32* %6
ret i32 %23
}

LLVM IR (-O2):
define i32 @Fin_Obstacle(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = alloca [9 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
store i32 0, i32* %0
store i32 0, i32* %1
%5 = call i32 @Fin_Cmnd(i32 1, i8 signext 73, i8* %4)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
store i32 %9, i32* %0
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
store i32 %12, i32* %1
br label %13
13: ; preds = %7, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ nothing();
int main(int argc, char **argv) {
  nothing();
  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   1030 <nothing@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 i32 (...) @nothing()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @nothing()
ret i32 0
}
int hex_len(int n) {
  int i = 0;
  while (n) {
    i++;
    n >>= 4;
  }
  return i;
}


x86 assembly (clang, -O0):
<hex_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <hex_len+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <hex_len+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_len>:
xor    %eax,%eax
test   %edi,%edi
je     111d <hex_len+0x1d>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
sar    $0x4,%ecx
cmp    $0xf,%edi
mov    %ecx,%edi
ja     1110 <hex_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @hex_len(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = ashr i32 %5, 4
%8 = icmp ult i32 %5, 16
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
double aa_fclamp(double val, double min, double max) {
  if (val > max)
    return max;
  if (val < min)
    return min;
  return val;
}


x86 assembly (clang, -O0):
<aa_fclamp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1132 <aa_fclamp+0x32>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <aa_fclamp+0x5f>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1155 <aa_fclamp+0x55>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <aa_fclamp+0x5f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_fclamp>:
maxsd  %xmm0,%xmm1
movapd %xmm2,%xmm3
cmpltsd %xmm0,%xmm3
movapd %xmm3,%xmm0
andnpd %xmm1,%xmm0
andpd  %xmm2,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @aa_fclamp(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = load double, double* %7
%10 = fcmp ogt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double, double* %7
store double %12, double* %4
br label %21
13: ; preds = %3
%14 = load double, double* %5
%15 = load double, double* %6
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double, double* %6
store double %18, double* %4
br label %21
19: ; preds = %13
%20 = load double, double* %5
store double %20, double* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load double, double* %4
ret double %22
}

LLVM IR (-O2):
define double @aa_fclamp(double %0, double %1, double %2) {
%4 = fcmp ogt double %0, %2
%5 = fcmp olt double %0, %1
%6 = select i1 %5, double %1, double %0
%7 = select i1 %4, double %2, double %6
ret double %7
}
void dec(char *path, char *allData) {}


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

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

LLVM IR (-O0):
define void @dec(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @dec(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int num_digits_lenstr(const unsigned char *len_str) { return len_str[0] + 2; }


x86 assembly (clang, -O0):
<num_digits_lenstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_digits_lenstr>:
movzbl (%rdi),%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @num_digits_lenstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = add nsw i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @num_digits_lenstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = add nuw nsw i32 %3, 2
ret i32 %4
}
/* Variables and functions */
int __ocml_signbit_f32(float);
int __signbitf(float x) { return __ocml_signbit_f32(x); }


x86 assembly (clang, -O0):
<__signbitf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__ocml_signbit_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__signbitf>:
jmp    1030 <__ocml_signbit_f32@plt>

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

LLVM IR (-O2):
define i32 @__signbitf(float %0) {
%2 = tail call i32 @__ocml_signbit_f32(float %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
void swap(uint x, uint y) {
  x ^= y;
  y ^= x;
  x ^= y;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = xor i32 %6, %5
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = xor i32 %9, %8
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = xor i32 %12, %11
store i32 %13, i32* %3
ret void
}

LLVM IR (-O2):
define void @swap(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
int cmp_uint16_t(uint16_t *x, uint16_t *y) {
  if ((*x) < (*y))
    return -1;
  else if ((*x) > (*y))
    return +1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmp_uint16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jge    112c <cmp_uint16_t+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <cmp_uint16_t+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jle    114c <cmp_uint16_t+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <cmp_uint16_t+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_uint16_t>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_uint16_t(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = icmp slt i64 %3, %4
%6 = icmp sgt i64 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
char *hash_plugin_summary(void) {
  return ("nsldaps \tLDAP SSHA (salted SHA) plugin");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"nsldaps \09LDAP SSHA (salted SHA) plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [39 x i8] c"nsldaps \09LDAP SSHA (salted SHA) plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t f16u(uint16_t x) { return x ^ 1; }


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

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

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

LLVM IR (-O2):
define i32 @f16u(i32 %0) {
%2 = xor i32 %0, 1
ret i32 %2
}
int next_power_of_2_(int i) {
  int j;
  for (j = 1; j < i; j *= 2)
    ;
  return j;
}


x86 assembly (clang, -O0):
<next_power_of_2_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <next_power_of_2_+0x2d>
jmp    111f <next_power_of_2_+0x1f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <next_power_of_2_+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_power_of_2_>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <next_power_of_2_+0x10>
ret

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

LLVM IR (-O2):
define i32 @next_power_of_2_(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl nsw i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void li(int i) { printf("%2d) ", i); }


x86 assembly (clang, -O0):
<li>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<li>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%2d) \00"
define void @li(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glColor3iv(int *);
void Color3iv(int v[3]) { glColor3iv(v); }


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

x86 assembly (clang, -O2):
<Color3iv>:
jmp    1030 <glColor3iv@plt>

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

LLVM IR (-O2):
define void @Color3iv(i32* %0) {
%2 = tail call i32 @glColor3iv(i32* %0)
ret void
}