#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*/ foo(int, int, int, int *, int *, int, int *, int, int *,
                       int);
int main() {
  int _4 = 4;
  int _5 = 5;
  int _7 = 7;
  int _9 = 9;
  for (int i = 0; i < 100; i++) {
    foo(1, 2, 3, &_4, &_5, 6, &_7, 8, &_9, 10);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x7,-0x10(%rbp)
movl   $0x9,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x64,-0x18(%rbp)
jge    119d <main+0x8d>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
lea    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%r8
mov    $0x6,%r9d
lea    -0x10(%rbp),%r10
lea    -0x14(%rbp),%rax
mov    %r10,(%rsp)
movl   $0x8,0x8(%rsp)
mov    %rax,0x10(%rsp)
movl   $0xa,0x18(%rsp)
call   1030 <foo@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1142 <main+0x32>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movl   $0x4,0xc(%rsp)
movl   $0x5,0x8(%rsp)
movl   $0x7,0x4(%rsp)
movl   $0x9,(%rsp)
mov    $0x64,%ebp
mov    %rsp,%r15
lea    0x4(%rsp),%r12
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    %r14,%rcx
mov    %rbx,%r8
mov    $0x6,%r9d
push   $0xa
push   %r15
push   $0x8
push   %r12
call   1030 <foo@plt>
add    $0x20,%rsp
add    $0xffffffff,%ebp
jne    1160 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
store i32 4, i32* %1
%6 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%7 = bitcast i32* %3 to i8*
store i32 7, i32* %3
%8 = bitcast i32* %4 to i8*
store i32 9, i32* %4
br label %10
9: ; preds = %10
ret i32 0
10: ; preds = %0, %10
%11 = phi i32 [ 0, %0 ], [ %13, %10 ]
%12 = call i32 @foo(i32 1, i32 2, i32 3, i32* %1, i32* %2, i32 6, i32* %3, i32 8, i32* %4, i32 10)
%13 = add nuw nsw i32 %11, 1
%14 = icmp eq i32 %13, 100
br i1 %14, label %9, label %10
}