#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ factrl(int);
int main() {
  int i, j;
  for (j = 0; j < 50000; j++) {
    for (i = 10; i < 33; i++)
      factrl(i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc350,-0xc(%rbp)
jge    116d <main+0x5d>
movl   $0xa,-0x8(%rbp)
cmpl   $0x21,-0x8(%rbp)
jge    115a <main+0x4a>
mov    -0x8(%rbp),%edi
call   1030 <factrl@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
jmp    115f <main+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xc350,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <factrl@plt>
mov    $0xb,%edi
call   1030 <factrl@plt>
mov    $0xc,%edi
call   1030 <factrl@plt>
mov    $0xd,%edi
call   1030 <factrl@plt>
mov    $0xe,%edi
call   1030 <factrl@plt>
mov    $0xf,%edi
call   1030 <factrl@plt>
mov    $0x10,%edi
call   1030 <factrl@plt>
mov    $0x11,%edi
call   1030 <factrl@plt>
mov    $0x12,%edi
call   1030 <factrl@plt>
mov    $0x13,%edi
call   1030 <factrl@plt>
mov    $0x14,%edi
call   1030 <factrl@plt>
mov    $0x15,%edi
call   1030 <factrl@plt>
mov    $0x16,%edi
call   1030 <factrl@plt>
mov    $0x17,%edi
call   1030 <factrl@plt>
mov    $0x18,%edi
call   1030 <factrl@plt>
mov    $0x19,%edi
call   1030 <factrl@plt>
mov    $0x1a,%edi
call   1030 <factrl@plt>
mov    $0x1b,%edi
call   1030 <factrl@plt>
mov    $0x1c,%edi
call   1030 <factrl@plt>
mov    $0x1d,%edi
call   1030 <factrl@plt>
mov    $0x1e,%edi
call   1030 <factrl@plt>
mov    $0x1f,%edi
call   1030 <factrl@plt>
mov    $0x20,%edi
call   1030 <factrl@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %26, %1 ]
%3 = tail call i32 @factrl(i32 10)
%4 = tail call i32 @factrl(i32 11)
%5 = tail call i32 @factrl(i32 12)
%6 = tail call i32 @factrl(i32 13)
%7 = tail call i32 @factrl(i32 14)
%8 = tail call i32 @factrl(i32 15)
%9 = tail call i32 @factrl(i32 16)
%10 = tail call i32 @factrl(i32 17)
%11 = tail call i32 @factrl(i32 18)
%12 = tail call i32 @factrl(i32 19)
%13 = tail call i32 @factrl(i32 20)
%14 = tail call i32 @factrl(i32 21)
%15 = tail call i32 @factrl(i32 22)
%16 = tail call i32 @factrl(i32 23)
%17 = tail call i32 @factrl(i32 24)
%18 = tail call i32 @factrl(i32 25)
%19 = tail call i32 @factrl(i32 26)
%20 = tail call i32 @factrl(i32 27)
%21 = tail call i32 @factrl(i32 28)
%22 = tail call i32 @factrl(i32 29)
%23 = tail call i32 @factrl(i32 30)
%24 = tail call i32 @factrl(i32 31)
%25 = tail call i32 @factrl(i32 32)
%26 = add nuw nsw i32 %2, 1
%27 = icmp eq i32 %26, 50000
br i1 %27, label %28, label %1
28: ; preds = %1
ret i32 0
}