xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ Widget;

/* Variables and functions */
int /*<<< orphan*/ DoLayout(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ True;
void ChangeManaged(Widget w) { DoLayout(w, True); }


x86 assembly (clang, -O0):
<ChangeManaged>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <DoLayout@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChangeManaged>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <DoLayout@plt>

LLVM IR (-O0):
@True = global i32 0
define void @ChangeManaged(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @True
%5 = call i32 @DoLayout(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@True = global i32 0
define void @ChangeManaged(i32 %0) {
%2 = load i32, i32* @True
%3 = tail call i32 @DoLayout(i32 %0, i32 %2)
ret void
}
void ntv() {
  asm volatile("popq %%rsi\n\t"
               "popq %%rdi\n\t"
               "movq 16(%%rbp), %%rdx\n\t"
               "mov (%%rbp), %%rax\n\t"
               "callq *(%%rax)\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<ntv>:
push   %rbp
mov    %rsp,%rbp
pop    %rsi
pop    %rdi
mov    0x10(%rbp),%rdx
mov    0x0(%rbp),%rax
call   *(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntv>:
pop    %rsi
pop    %rdi
mov    0x10(%rbp),%rdx
mov    0x0(%rbp),%rax
call   *(%rax)
ret

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

LLVM IR (-O2):
define void @ntv() {
tail call void asm sideeffect "popq %rsi\0A\09popq %rdi\0A\09movq 16(%rbp), %rdx\0A\09mov (%rbp), %rax\0A\09callq *(%rax)\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int __builtin_btf_type_id(int *, int /*<<< orphan*/);
unsigned test2(int a) { return __builtin_btf_type_id(&a, 0); }


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

x86 assembly (clang, -O2):
<test2>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
call   1030 <__builtin_btf_type_id@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @__builtin_btf_type_id(i32* %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
char getchar();
int /*<<< orphan*/ print_foot();
int /*<<< orphan*/ print_head();
int /*<<< orphan*/ processing_instruction(char);
int main() {
  char instr_cache = '\0';
  print_head();
  instr_cache = getchar();
  while (instr_cache != '#') {
    processing_instruction(instr_cache);
    instr_cache = getchar();
  }
  print_foot();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    $0x0,%al
call   1060 <print_head@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x23,%eax
je     1189 <main+0x49>
movsbl -0x5(%rbp),%edi
call   1040 <processing_instruction@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x5(%rbp)
jmp    1164 <main+0x24>
mov    $0x0,%al
call   1030 <print_foot@plt>
mov    0x2e49(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <print_head@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0x23,%al
je     1165 <main+0x25>
movsbl %al,%edi
call   1040 <processing_instruction@plt>
jmp    1150 <main+0x10>
xor    %eax,%eax
call   1030 <print_foot@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
%3 = call i32 (...) @print_head()
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
br label %5
5: ; preds = %9, %0
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 35
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8, i8* %2
%11 = call i32 @processing_instruction(i8 signext %10)
%12 = call signext i8 (...) @getchar()
store i8 %12, i8* %2
br label %5
13: ; preds = %5
%14 = call i32 (...) @print_foot()
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @print_head()
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 35
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = phi i8 [ %7, %4 ], [ %2, %0 ]
%6 = tail call i32 @processing_instruction(i8 signext %5)
%7 = tail call signext i8 (...) @getchar()
%8 = icmp eq i8 %7, 35
br i1 %8, label %9, label %4
9: ; preds = %4, %0
%10 = tail call i32 (...) @print_foot()
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
__attribute__((no)) unsigned int main1() {
  unsigned short i;
  unsigned int intsum = 0;
  for (i = 0; i < 26; i++) {
    intsum += i;
  }
  return intsum;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movw   $0x0,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x1a,%eax
jge    1139 <main1+0x39>
movzwl -0x2(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x2(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2(%rbp)
jmp    1111 <main1+0x11>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main1() {
%1 = alloca i16
%2 = alloca i32
store i32 0, i32* %2
store i16 0, i16* %1
br label %3
3: ; preds = %12, %0
%4 = load i16, i16* %1
%5 = zext i16 %4 to i32
%6 = icmp slt i32 %5, 26
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load i16, i16* %1
%9 = zext i16 %8 to i32
%10 = load i32, i32* %2
%11 = add i32 %10, %9
store i32 %11, i32* %2
br label %12
12: ; preds = %7
%13 = load i16, i16* %1
%14 = add i16 %13, 1
store i16 %14, i16* %1
br label %3
15: ; preds = %3
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @main1() {
ret i32 325
}
int exact_square(int number) {
  int counter;
  for (counter = 0; counter <= number; counter++) {
    if (number == counter * counter) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114b <exact_square+0x4b>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1138 <exact_square+0x38>
movl   $0x1,-0x4(%rbp)
jmp    1152 <exact_square+0x52>
jmp    113d <exact_square+0x3d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
test   %edi,%edi
js     1120 <exact_square+0x20>
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
cmp    %edi,%edx
je     1123 <exact_square+0x23>
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1110 <exact_square+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %10, label %6
3: ; preds = %6
%4 = add nuw i32 %7, 1
%5 = icmp eq i32 %7, %0
br i1 %5, label %10, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %4, %3 ], [ 0, %1 ]
%8 = mul nsw i32 %7, %7
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %6 ]
ret i32 %11
}
void testClosureLLDrV(void (*closure)(long long, double), long long a1,
                      double a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureLLDrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureLLDrV>:
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureLLDrV(void (i64, double)* %0, i64 %1, double %2) {
%4 = alloca void (i64, double)*
%5 = alloca i64
%6 = alloca double
store void (i64, double)* %0, void (i64, double)** %4
store i64 %1, i64* %5
store double %2, double* %6
%7 = load void (i64, double)*, void (i64, double)** %4
%8 = load i64, i64* %5
%9 = load double, double* %6
ret void
}

LLVM IR (-O2):
define void @testClosureLLDrV(void (i64, double)* nocapture %0, i64 %1, double %2) {
tail call void %0(i64 %1, double %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debugPrint(char *);
int /*<<< orphan*/ next_glEndTransformFeedback();
int /*<<< orphan*/ printGLError();
void glEndTransformFeedback() {
  next_glEndTransformFeedback();
  printGLError();
  debugPrint("glEndTransformFeedback()\n");
}


x86 assembly (clang, -O0):
<glEndTransformFeedback>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <next_glEndTransformFeedback@plt>
mov    $0x0,%al
call   1030 <printGLError@plt>
lea    0xeb7(%rip),%rdi
call   1050 <debugPrint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glEndTransformFeedback>:
push   %rax
xor    %eax,%eax
call   1040 <next_glEndTransformFeedback@plt>
xor    %eax,%eax
call   1030 <printGLError@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1050 <debugPrint@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"glEndTransformFeedback()\0A\00"
define void @glEndTransformFeedback() {
%1 = call i32 (...) @next_glEndTransformFeedback()
%2 = call i32 (...) @printGLError()
%3 = call i32 @debugPrint(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"glEndTransformFeedback()\0A\00"
define void @glEndTransformFeedback() {
%1 = tail call i32 (...) @next_glEndTransformFeedback()
%2 = tail call i32 (...) @printGLError()
%3 = tail call i32 @debugPrint(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("7/3 = %d\n", 7 / 3);
  printf("8/3 = %d\n", 8 / 3);
  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)
lea    0xed3(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"7/3 = %d\0A\00"
@.str.1 = [10 x i8] c"8/3 = %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 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"7/3 = %d\0A\00"
@.str.1 = [10 x i8] c"8/3 = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _c_setbyte(int);
void POP_SS() {
  ;
  _c_setbyte(0x17);
  ;
}


x86 assembly (clang, -O0):
<POP_SS>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
call   1030 <_c_setbyte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<POP_SS>:
mov    $0x17,%edi
jmp    1030 <_c_setbyte@plt>

LLVM IR (-O0):
define void @POP_SS() {
%1 = call i32 @_c_setbyte(i32 23)
ret void
}

LLVM IR (-O2):
define void @POP_SS() {
%1 = tail call i32 @_c_setbyte(i32 23)
ret void
}
int min(int a, int b, int c) {
  if (a < b) {
    return a < c ? a : c;
  }
  return b < c ? b : c;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1141 <min+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1130 <min+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <min+0x36>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <min+0x64>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1158 <min+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115e <min+0x5e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edx,%eax
cmp    %edx,%edi
cmovl  %edi,%eax
cmp    %esi,%eax
cmovge %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %2
%5 = select i1 %4, i32 %0, i32 %2
%6 = icmp slt i32 %5, %1
%7 = select i1 %6, i32 %5, i32 %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello Split Module Table world (2)\n");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"Hello Split Module Table world (2)\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"Hello Split Module Table world (2)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ nrf_drv_usbd_errata_type_52840_eng_a();
bool nrf_drv_usbd_errata_154(void) {
  return (1 && nrf_drv_usbd_errata_type_52840_eng_a());
}


x86 assembly (clang, -O0):
<nrf_drv_usbd_errata_154>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrf_drv_usbd_errata_type_52840_eng_a@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_drv_usbd_errata_154>:
push   %rax
xor    %eax,%eax
call   1030 <nrf_drv_usbd_errata_type_52840_eng_a@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrf_drv_usbd_errata_154() {
%1 = call i64 (...) @nrf_drv_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_154() {
%1 = tail call i64 (...) @nrf_drv_usbd_errata_type_52840_eng_a()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
double PowN(double x, int n) {
  double value = x;
  for (int i = 1; i < n; i++) {
    value *= x;
  }
  return value;
}


x86 assembly (clang, -O0):
<PowN>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1146 <PowN+0x46>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111d <PowN+0x1d>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<PowN>:
cmp    $0x2,%edi
jl     115d <PowN+0x5d>
lea    -0x1(%rdi),%ecx
add    $0xfffffffe,%edi
mov    %ecx,%eax
and    $0x7,%eax
movapd %xmm0,%xmm1
cmp    $0x7,%edi
jb     1145 <PowN+0x45>
and    $0xfffffff8,%ecx
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
add    $0xfffffff8,%ecx
jne    1120 <PowN+0x20>
test   %eax,%eax
je     1159 <PowN+0x59>
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
add    $0xffffffff,%eax
jne    1150 <PowN+0x50>
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @PowN(double %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %21
4: ; preds = %2
%5 = add i32 %1, -1
%6 = add i32 %1, -2
%7 = and i32 %5, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = and i32 %5, -8
br label %23
11: ; preds = %23, %4
%12 = phi double [ undef, %4 ], [ %33, %23 ]
%13 = phi double [ %0, %4 ], [ %33, %23 ]
%14 = icmp eq i32 %7, 0
br i1 %14, label %21, label %15
15: ; preds = %11, %15
%16 = phi double [ %18, %15 ], [ %13, %11 ]
%17 = phi i32 [ %19, %15 ], [ 0, %11 ]
%18 = fmul double %16, %0
%19 = add i32 %17, 1
%20 = icmp eq i32 %19, %7
br i1 %20, label %21, label %15
21: ; preds = %11, %15, %2
%22 = phi double [ %0, %2 ], [ %12, %11 ], [ %18, %15 ]
ret double %22
23: ; preds = %23, %9
%24 = phi double [ %0, %9 ], [ %33, %23 ]
%25 = phi i32 [ 0, %9 ], [ %34, %23 ]
%26 = fmul double %24, %0
%27 = fmul double %26, %0
%28 = fmul double %27, %0
%29 = fmul double %28, %0
%30 = fmul double %29, %0
%31 = fmul double %30, %0
%32 = fmul double %31, %0
%33 = fmul double %32, %0
%34 = add i32 %25, 8
%35 = icmp eq i32 %34, %10
br i1 %35, label %11, label %23
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(char const *s) {
  int i;
  i = 0;
  while (s[i] != '\0')
    i++;
  write(1, s, i);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1146 <ft_putstr+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
mov    %rdi,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr+0x10>
add    $0xffffffff,%edx
mov    $0x1,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = tail call i32 @write(i32 1, i8* %0, i32 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_min_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_min_pd(__m128d A, __m128d B) { return _mm_min_pd(A, B); }


x86 assembly (clang, -O0):
<test_mm_min_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_min_pd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_min_pd>:
jmp    1030 <_mm_min_pd@plt>

LLVM IR (-O0):
define i32 @test_mm_min_pd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @_mm_min_pd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_min_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_min_pd(i32 %0, i32 %1)
ret i32 %3
}
void CFGMR3QueryGCPtrUDef(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryGCPtrUDef() {
ret void
}
void test_case_setup(void **state) {}


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

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

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

LLVM IR (-O2):
define void @test_case_setup(i8** nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int is_hex(char *s) {
  int rc = -1;
  if ((rc = (int)strtol(s, NULL, 0)) == 0 || rc == -1) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1148 <is_hex+0x38>
cmpl   $0xffffffff,-0x14(%rbp)
jne    1154 <is_hex+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <is_hex+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hex>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
add    $0x1,%eax
cmp    $0x2,%eax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_hex(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 -1, i32* %4
%5 = load i8*, i8** %3
%6 = call i64 @strtol(i8* %5, i32* null, i32 0)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, -1
br i1 %11, label %12, label %13
12: ; preds = %9, %1
store i32 -1, i32* %2
br label %14
13: ; preds = %9
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_hex(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i32* null, i32 0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = icmp ult i32 %4, 2
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void fortune_cookie(char msg[]) {
  printf("Message reads: %s\n", msg);
  printf("Message is in position %p\n", msg);
  printf("Message occupies %li bytes\n", sizeof(msg));
}


x86 assembly (clang, -O0):
<fortune_cookie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fortune_cookie>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Message reads: %s\0A\00"
@.str.1 = [27 x i8] c"Message is in position %p\0A\00"
@.str.2 = [28 x i8] c"Message occupies %li bytes\0A\00"
define void @fortune_cookie(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 8)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Message reads: %s\0A\00"
@.str.1 = [27 x i8] c"Message is in position %p\0A\00"
@.str.2 = [28 x i8] c"Message occupies %li bytes\0A\00"
define void @fortune_cookie(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i64 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ munlock(void *, int);
void freeRealMemPage(void *vAddr) {
  munlock(vAddr, 4096);
  free(vAddr);
}


x86 assembly (clang, -O0):
<freeRealMemPage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1000,%esi
call   1030 <munlock@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeRealMemPage>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1000,%esi
call   1030 <munlock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>

LLVM IR (-O0):
define void @freeRealMemPage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @munlock(i8* %3, i32 4096)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @freeRealMemPage(i8* %0) {
%2 = tail call i32 @munlock(i8* %0, i32 4096)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void _exit(int r) { exit(r); }


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

x86 assembly (clang, -O2):
<_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
unsigned long HibernateRTCSSGet(void) {
  return ((*((volatile unsigned long *)(0x400FC028))) & 0x00007FFF);
}


x86 assembly (clang, -O0):
<HibernateRTCSSGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc028,%eax
mov    (%rax),%rax
and    $0x7fff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCSSGet>:
mov    0x400fc028,%rax
40
and    $0x7fff,%eax
ret

LLVM IR (-O0):
define i64 @HibernateRTCSSGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074774056 to i64*)
%2 = and i64 %1, 32767
ret i64 %2
}

LLVM IR (-O2):
define i64 @HibernateRTCSSGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074774056 to i64*)
%2 = and i64 %1, 32767
ret i64 %2
}
/* Type definitions */
struct i40e_ring {
  int dummy;
};

/* Variables and functions */
int I40E_DESC_UNUSED(struct i40e_ring *);
int __i40evf_maybe_stop_tx(struct i40e_ring *, int);
scalar_t__ likely(int);
int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) {
  if (likely(I40E_DESC_UNUSED(tx_ring) >= size))
    return 0;
  return __i40evf_maybe_stop_tx(tx_ring, size);
}


x86 assembly (clang, -O0):
<i40e_maybe_stop_tx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <I40E_DESC_UNUSED@plt>
cmp    -0x14(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <likely@plt>
cmp    $0x0,%rax
je     116e <i40e_maybe_stop_tx+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    117d <i40e_maybe_stop_tx+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <__i40evf_maybe_stop_tx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i40e_maybe_stop_tx>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <I40E_DESC_UNUSED@plt>
xor    %edi,%edi
cmp    %ebp,%eax
setge  %dil
call   1050 <likely@plt>
test   %rax,%rax
je     1158 <i40e_maybe_stop_tx+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__i40evf_maybe_stop_tx@plt>

LLVM IR (-O0):
%struct.i40e_ring = type { i32 }
define i32 @i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.i40e_ring*
%5 = alloca i32
store %struct.i40e_ring* %0, %struct.i40e_ring** %4
store i32 %1, i32* %5
%6 = load %struct.i40e_ring*, %struct.i40e_ring** %4
%7 = call i32 @I40E_DESC_UNUSED(%struct.i40e_ring* %6)
%8 = load i32, i32* %5
%9 = icmp sge i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i64 @likely(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %18
14: ; preds = %2
%15 = load %struct.i40e_ring*, %struct.i40e_ring** %4
%16 = load i32, i32* %5
%17 = call i32 @__i40evf_maybe_stop_tx(%struct.i40e_ring* %15, i32 %16)
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %13
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.i40e_ring = type { i32 }
define i32 @i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1) {
%3 = tail call i32 @I40E_DESC_UNUSED(%struct.i40e_ring* %0)
%4 = icmp sge i32 %3, %1
%5 = zext i1 %4 to i32
%6 = tail call i64 @likely(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @__i40evf_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, double *);
double PRT_getDouble(char opt[128]) {
  double ret;
  sscanf(opt, "%lf", &ret);
  return ret;
}


x86 assembly (clang, -O0):
<PRT_getDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRT_getDouble>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @PRT_getDouble(i8* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ FRGL_Codec_Init();
int FRGL_AVI_Init() {
  FRGL_Codec_Init();
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @FRGL_AVI_Init() {
%1 = call i32 (...) @FRGL_Codec_Init()
ret i32 0
}

LLVM IR (-O2):
define i32 @FRGL_AVI_Init() {
%1 = tail call i32 (...) @FRGL_Codec_Init()
ret i32 0
}
void exarg_disable_help() { return; }


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

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

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

LLVM IR (-O2):
define void @exarg_disable_help() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char const *, char *, double *);
double atof1(const char *str) {
  double result;
  sscanf(str, "%lf", &result);
  return result;
}


x86 assembly (clang, -O0):
<atof1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atof1>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @atof1(i8* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
ret double %5
}
int f(int c, int i) {
  int a1, a2, a3, x1, x2, x3, x;
  a1 = i * 16;
  x1 = c + a1;
  i = i - 2;
  a2 = i * 16;
  x2 = c + a2;
  if (x2 > 6)
    i = i - 2;
  i = i - 2;
  a3 = i * 16;
  x3 = c + a3;
  x = x1 + x2 + x3;
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jle    114a <f+0x4a>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    -0x2(%rsi),%eax
mov    %eax,%ecx
shl    $0x4,%ecx
add    %edi,%ecx
lea    0xffffffc(%rsi),%edx
cmp    $0x7,%ecx
cmovl  %eax,%edx
add    %esi,%edx
shl    $0x4,%edx
lea    (%rcx,%rdi,2),%eax
add    %edx,%eax
add    $0xffffffe0,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%12 = load i32, i32* %4
%13 = mul nsw i32 %12, 16
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
store i32 %16, i32* %8
%17 = load i32, i32* %4
%18 = sub nsw i32 %17, 2
store i32 %18, i32* %4
%19 = load i32, i32* %4
%20 = mul nsw i32 %19, 16
store i32 %20, i32* %6
%21 = load i32, i32* %3
%22 = load i32, i32* %6
%23 = add nsw i32 %21, %22
store i32 %23, i32* %9
%24 = load i32, i32* %9
%25 = icmp sgt i32 %24, 6
br i1 %25, label %26, label %29
26: ; preds = %2
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 2
store i32 %28, i32* %4
br label %29
29: ; preds = %26, %2
%30 = load i32, i32* %4
%31 = sub nsw i32 %30, 2
store i32 %31, i32* %4
%32 = load i32, i32* %4
%33 = mul nsw i32 %32, 16
store i32 %33, i32* %7
%34 = load i32, i32* %3
%35 = load i32, i32* %7
%36 = add nsw i32 %34, %35
store i32 %36, i32* %10
%37 = load i32, i32* %8
%38 = load i32, i32* %9
%39 = add nsw i32 %37, %38
%40 = load i32, i32* %10
%41 = add nsw i32 %39, %40
store i32 %41, i32* %11
%42 = load i32, i32* %11
ret i32 %42
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -2
%4 = shl nsw i32 %3, 4
%5 = add nsw i32 %4, %0
%6 = icmp sgt i32 %5, 6
%7 = add i32 %1, 268435452
%8 = select i1 %6, i32 %7, i32 %3
%9 = shl i32 %0, 1
%10 = add i32 %8, %1
%11 = shl i32 %10, 4
%12 = add i32 %9, -32
%13 = add i32 %12, %5
%14 = add i32 %13, %11
ret i32 %14
}
void hit(buf, val) char *buf;
int val;
{ *buf = '0' + val % 10; }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x30,%edx
mov    %dl,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
movslq %esi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x30,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @hit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = srem i32 %5, 10
%7 = add nsw i32 48, %6
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
store i8 %8, i8* %9
ret void
}

LLVM IR (-O2):
define void @hit(i8* nocapture writeonly %0, i32 %1) {
%3 = srem i32 %1, 10
%4 = trunc i32 %3 to i8
%5 = add nsw i8 %4, 48
store i8 %5, i8* %0
ret void
}
/* Variables and functions */
size_t strcspn(char *, char *);
char *sanitizeNick(char *nick) {
  size_t diff = strcspn(nick, "-&@+%");
  nick += (diff == 0);
  return nick;
}


x86 assembly (clang, -O0):
<sanitizeNick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcspn@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sanitizeNick>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcspn@plt>
cmp    $0x1,%rax
adc    $0x0,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"-&@+%\00"
define i8* @sanitizeNick(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strcspn(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = load i8*, i8** %2
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %2
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"-&@+%\00"
define i8* @sanitizeNick(i8* %0) {
%2 = tail call i64 @strcspn(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
ret i8* %5
}
int main() {
  int *x, *y;
  int *res = &x;
  res = noprotofun(&x);
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <noprotofun@plt>
cltq
mov    %rax,-0x20(%rbp)
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
xor    %eax,%eax
call   1040 <noprotofun@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
%5 = bitcast i32** %2 to i32*
store i32* %5, i32** %4
%6 = call i32 (i32**, ...) bitcast (i32 (...)* @noprotofun to i32 (i32**, ...)*)(i32** %2)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
%3 = call i32 (i32**, ...) bitcast (i32 (...)* @noprotofun to i32 (i32**, ...)*)(i32** %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M122_f(char *s) {
  debug("M122_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M122_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M122_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M122_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M122_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M122_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M122_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
struct __lwt_queue_t__ {
  int dummy;
};

/* Variables and functions */
scalar_t__ lwt_queue_size(struct __lwt_queue_t__ *);
int lwt_queue_empty(struct __lwt_queue_t__ *queue) {
  return lwt_queue_size(queue) == 0;
}


x86 assembly (clang, -O0):
<lwt_queue_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lwt_queue_size@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwt_queue_empty>:
push   %rax
call   1030 <lwt_queue_size@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.__lwt_queue_t__ = type { i32 }
define i32 @lwt_queue_empty(%struct.__lwt_queue_t__* %0) {
%2 = alloca %struct.__lwt_queue_t__*
store %struct.__lwt_queue_t__* %0, %struct.__lwt_queue_t__** %2
%3 = load %struct.__lwt_queue_t__*, %struct.__lwt_queue_t__** %2
%4 = call i64 @lwt_queue_size(%struct.__lwt_queue_t__* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.__lwt_queue_t__ = type { i32 }
define i32 @lwt_queue_empty(%struct.__lwt_queue_t__* %0) {
%2 = tail call i64 @lwt_queue_size(%struct.__lwt_queue_t__* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
__attribute__((noreturn)) void perror_exit(const char *s) {
  perror(s);
  exit(1);
}


x86 assembly (clang, -O0):
<perror_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<perror_exit>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @perror_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @perror_exit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}