#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 a(int, int, int, int, int, int, int, int, int, int);
int b(int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9,
      int i10) {
  for (;;)
    if (i1)
      return a(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10 + 1);
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x38,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1185 <b+0x75>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    0x10(%rbp),%ebx
mov    0x18(%rbp),%r11d
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
add    $0x1,%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <a@plt>
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret
jmp    1139 <b+0x29>

x86 assembly (clang, -O2):
<b>:
test   %edi,%edi
je     1140 <b+0x30>
push   %rbx
mov    0x28(%rsp),%eax
mov    0x20(%rsp),%r10d
mov    0x18(%rsp),%r11d
mov    0x10(%rsp),%ebx
add    $0x1,%eax
push   %rax
push   %r10
push   %r11
push   %rbx
call   1030 <a@plt>
add    $0x20,%rsp
pop    %rbx
ret
nopl   0x0(%rax,%rax,1)
jmp    1140 <b+0x30>

LLVM IR (-O0):
define i32 @b(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
br label %21
21: ; preds = %37, %10
%22 = load i32, i32* %11
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %37
24: ; preds = %21
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = load i32, i32* %13
%28 = load i32, i32* %14
%29 = load i32, i32* %15
%30 = load i32, i32* %16
%31 = load i32, i32* %17
%32 = load i32, i32* %18
%33 = load i32, i32* %19
%34 = load i32, i32* %20
%35 = add nsw i32 %34, 1
%36 = call i32 @a(i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30, i32 %31, i32 %32, i32 %33, i32 %35)
ret i32 %36
37: ; preds = %21
br label %21
}

LLVM IR (-O2):
define i32 @b(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = icmp eq i32 %0, 0
br i1 %11, label %12, label %13
12: ; preds = %10, %12
br label %12
13: ; preds = %10
%14 = add nsw i32 %9, 1
%15 = tail call i32 @a(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %14)
ret i32 %15
}