#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*/ srand(int);
int /*<<< orphan*/ verifica02(int, int, int);
int main() {
  srand(2017);
  for (int i = 10; i < 1000; i += i / 2)
    for (int j = 0; j < 13; j++)
      verifica02(i, 2000 + 10 * i, 500 + j * i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7e1,%edi
call   1040 <srand@plt>
movl   $0xa,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    11a6 <main+0x86>
movl   $0x0,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jge    118b <main+0x6b>
mov    -0x8(%rbp),%edi
imul   $0xa,-0x8(%rbp),%esi
add    $0x7d0,%esi
mov    -0xc(%rbp),%edx
imul   -0x8(%rbp),%edx
add    $0x1f4,%edx
call   1030 <verifica02@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <main+0x34>
jmp    1190 <main+0x70>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x7e1,%edi
call   1040 <srand@plt>
mov    $0xa,%ebx
cs nopw 0x0(%rax,%rax,1)
lea    (%rbx,%rbx,1),%r14d
lea    (%r14,%r14,4),%ebp
add    $0x7d0,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x1f4,%edx
call   1030 <verifica02@plt>
lea    0x1f4(%rbx),%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%rbx,%rbx,1),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%rbx,%rbx,2),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    0x1f4(,%rbx,4),%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%rbx,%rbx,4),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%rbx,%rbx,2),%r15d
lea    (%r15,%r15,1),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    0x0(,%rbx,8),%edx
sub    %ebx,%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    0x1f4(,%rbx,8),%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%rbx,%rbx,8),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%r14,%r14,4),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    (%rbx,%rbx,4),%eax
lea    (%rbx,%rax,2),%edx
add    $0x1f4,%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
lea    0x1f4(,%r15,4),%edx
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <verifica02@plt>
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
add    %ebx,%eax
mov    %eax,%ebx
cmp    $0x3e8,%eax
jl     1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @srand(i32 2017)
store i32 10, i32* %2
br label %5
5: ; preds = %26, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1000
br i1 %7, label %8, label %31
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 13
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %2
%14 = load i32, i32* %2
%15 = mul nsw i32 10, %14
%16 = add nsw i32 2000, %15
%17 = load i32, i32* %3
%18 = load i32, i32* %2
%19 = mul nsw i32 %17, %18
%20 = add nsw i32 500, %19
%21 = call i32 @verifica02(i32 %13, i32 %16, i32 %20)
br label %22
22: ; preds = %12
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %9
25: ; preds = %9
br label %26
26: ; preds = %25
%27 = load i32, i32* %2
%28 = sdiv i32 %27, 2
%29 = load i32, i32* %2
%30 = add nsw i32 %29, %28
store i32 %30, i32* %2
br label %5
31: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @srand(i32 2017)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 10, %0 ], [ %42, %2 ]
%4 = mul nsw i32 %3, 10
%5 = add nsw i32 %4, 2000
%6 = tail call i32 @verifica02(i32 %3, i32 %5, i32 500)
%7 = add nsw i32 %3, 500
%8 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %7)
%9 = shl nsw i32 %3, 1
%10 = add nsw i32 %9, 500
%11 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %10)
%12 = mul nsw i32 %3, 3
%13 = add nsw i32 %12, 500
%14 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %13)
%15 = shl nsw i32 %3, 2
%16 = add nsw i32 %15, 500
%17 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %16)
%18 = mul nsw i32 %3, 5
%19 = add nsw i32 %18, 500
%20 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %19)
%21 = mul nsw i32 %3, 6
%22 = add nsw i32 %21, 500
%23 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %22)
%24 = mul nsw i32 %3, 7
%25 = add nsw i32 %24, 500
%26 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %25)
%27 = shl nsw i32 %3, 3
%28 = add nsw i32 %27, 500
%29 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %28)
%30 = mul nsw i32 %3, 9
%31 = add nsw i32 %30, 500
%32 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %31)
%33 = add nsw i32 %4, 500
%34 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %33)
%35 = mul nsw i32 %3, 11
%36 = add nsw i32 %35, 500
%37 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %36)
%38 = mul nsw i32 %3, 12
%39 = add nsw i32 %38, 500
%40 = tail call i32 @verifica02(i32 %3, i32 %5, i32 %39)
%41 = sdiv i32 %3, 2
%42 = add nsw i32 %41, %3
%43 = icmp slt i32 %42, 1000
br i1 %43, label %2, label %44
44: ; preds = %2
ret i32 0
}