#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*/ cat2(char *, char *);
char *cat5(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
           int /*<<< orphan*/, char *);
char *cat9(char *str1, char *str2, char *str3, char *str4, char *str5,
           char *str6, char *str7, char *str8, char *str9) {
  return cat5(cat2(str1, str2), cat2(str3, str4), cat2(str5, str6),
              cat2(str7, str8), str9);
}


x86 assembly (clang, -O0):
<cat9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <cat2@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <cat2@plt>
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <cat2@plt>
mov    %eax,-0x34(%rbp)
mov    0x10(%rbp),%rdi
mov    0x18(%rbp),%rsi
call   1040 <cat2@plt>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    %eax,%ecx
mov    0x20(%rbp),%r8
call   1030 <cat5@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cat9>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,%rbp
mov    %r8,%r12
mov    %rcx,%r13
mov    %rdx,%rbx
mov    0x60(%rsp),%rax
mov    %rax,0x10(%rsp)
mov    0x50(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x58(%rsp),%r14
call   1040 <cat2@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <cat2@plt>
mov    %eax,%ebx
mov    %r12,%rdi
mov    %rbp,%rsi
call   1040 <cat2@plt>
mov    %eax,%ebp
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1040 <cat2@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
mov    0x10(%rsp),%r8
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <cat5@plt>

LLVM IR (-O0):
define i8* @cat9(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8) {
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
store i8* %0, i8** %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i8* %3, i8** %13
store i8* %4, i8** %14
store i8* %5, i8** %15
store i8* %6, i8** %16
store i8* %7, i8** %17
store i8* %8, i8** %18
%19 = load i8*, i8** %10
%20 = load i8*, i8** %11
%21 = call i32 @cat2(i8* %19, i8* %20)
%22 = load i8*, i8** %12
%23 = load i8*, i8** %13
%24 = call i32 @cat2(i8* %22, i8* %23)
%25 = load i8*, i8** %14
%26 = load i8*, i8** %15
%27 = call i32 @cat2(i8* %25, i8* %26)
%28 = load i8*, i8** %16
%29 = load i8*, i8** %17
%30 = call i32 @cat2(i8* %28, i8* %29)
%31 = load i8*, i8** %18
%32 = call i8* @cat5(i32 %21, i32 %24, i32 %27, i32 %30, i8* %31)
ret i8* %32
}

LLVM IR (-O2):
define i8* @cat9(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8) {
%10 = tail call i32 @cat2(i8* %0, i8* %1)
%11 = tail call i32 @cat2(i8* %2, i8* %3)
%12 = tail call i32 @cat2(i8* %4, i8* %5)
%13 = tail call i32 @cat2(i8* %6, i8* %7)
%14 = tail call i8* @cat5(i32 %10, i32 %11, i32 %12, i32 %13, i8* %8)
ret i8* %14
}