#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*/ test(int /*<<< orphan*/, int /*<<< orphan*/, int, int, int);
void bar(int parm1, int parm2) {
  int i;
  for (i = 0; i < 10; i++) {
    test(0, 0, parm1, parm2, i);
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1150 <bar+0x40>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%r8d
xor    %esi,%esi
mov    %esi,%edi
call   1030 <test@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <bar+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
xor    %r8d,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x1,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x2,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x3,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x4,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x5,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x6,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x7,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x8,%r8d
call   1030 <test@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    $0x9,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <test@plt>

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

LLVM IR (-O2):
define void @bar(i32 %0, i32 %1) {
%3 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 0)
%4 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 1)
%5 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 2)
%6 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 3)
%7 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 4)
%8 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 5)
%9 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 6)
%10 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 7)
%11 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 8)
%12 = tail call i32 @test(i32 0, i32 0, i32 %0, i32 %1, i32 9)
ret void
}