#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*/ im_a_minion_01();
void testFuncLoopFor(void) {
  int i = 1U;
  for (i = 1; i < 10; i++) {
    im_a_minion_01();
  }
  i = 1U;
  for (i = 1; i < 10; i++) {
    if (1U == (i % 2U)) {
      im_a_minion_01();
    }
  }
}


x86 assembly (clang, -O0):
<testFuncLoopFor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1145 <testFuncLoopFor+0x35>
mov    $0x0,%al
call   1030 <im_a_minion_01@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <testFuncLoopFor+0x16>
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    118a <testFuncLoopFor+0x7a>
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jne    1177 <testFuncLoopFor+0x67>
mov    $0x0,%al
call   1030 <im_a_minion_01@plt>
jmp    117c <testFuncLoopFor+0x6c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <testFuncLoopFor+0x43>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFuncLoopFor>:
push   %rax
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
call   1030 <im_a_minion_01@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <im_a_minion_01@plt>

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

LLVM IR (-O2):
define void @testFuncLoopFor() {
%1 = tail call i32 (...) @im_a_minion_01()
%2 = tail call i32 (...) @im_a_minion_01()
%3 = tail call i32 (...) @im_a_minion_01()
%4 = tail call i32 (...) @im_a_minion_01()
%5 = tail call i32 (...) @im_a_minion_01()
%6 = tail call i32 (...) @im_a_minion_01()
%7 = tail call i32 (...) @im_a_minion_01()
%8 = tail call i32 (...) @im_a_minion_01()
%9 = tail call i32 (...) @im_a_minion_01()
%10 = tail call i32 (...) @im_a_minion_01()
%11 = tail call i32 (...) @im_a_minion_01()
%12 = tail call i32 (...) @im_a_minion_01()
%13 = tail call i32 (...) @im_a_minion_01()
%14 = tail call i32 (...) @im_a_minion_01()
ret void
}