#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 do_other_job(int, int, int, int, int, int, int, int, int, int, int, int,
                 int, int, int, int);
int do_some_job(int, int, int, int);
int prologue_epilogue_16_long(int a0, int a1, int a2, int a3, int a4, int a5,
                              int a6, int a7, int a8, int a9, int a10, int a11,
                              int a12, int a13, int a14, int a15) {
  int v0, v1, v2, v3, v4;
  v0 = do_some_job(a0, a1, a2, a3);
  v1 = do_some_job(a4, a5, a6, a7);
  v2 = do_some_job(a8, a9, a10, a11);
  v3 = do_some_job(a12, a13, a14, a15);
  v4 = do_other_job(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
                    a14, a15);
  return do_some_job(v0, v1, v2, v3) + v4;
}


x86 assembly (clang, -O0):
<prologue_epilogue_16_long>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x2c(%rbp)
mov    %esi,-0x30(%rbp)
mov    %edx,-0x34(%rbp)
mov    %ecx,-0x38(%rbp)
mov    %r8d,-0x3c(%rbp)
mov    %r9d,-0x40(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
call   1040 <do_some_job@plt>
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    0x10(%rbp),%edx
mov    0x18(%rbp),%ecx
call   1040 <do_some_job@plt>
mov    %eax,-0x48(%rbp)
mov    0x20(%rbp),%edi
mov    0x28(%rbp),%esi
mov    0x30(%rbp),%edx
mov    0x38(%rbp),%ecx
call   1040 <do_some_job@plt>
mov    %eax,-0x4c(%rbp)
mov    0x40(%rbp),%edi
mov    0x48(%rbp),%esi
mov    0x50(%rbp),%edx
mov    0x58(%rbp),%ecx
call   1040 <do_some_job@plt>
mov    %eax,-0x50(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    -0x40(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    0x20(%rbp),%r13d
mov    0x28(%rbp),%r12d
mov    0x30(%rbp),%r15d
mov    0x38(%rbp),%r14d
mov    0x40(%rbp),%ebx
mov    0x48(%rbp),%r11d
mov    0x50(%rbp),%r10d
mov    0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,(%rsp)
mov    -0x5c(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x58(%rbp),%eax
mov    %r13d,0x10(%rsp)
mov    %r12d,0x18(%rsp)
mov    %r15d,0x20(%rsp)
mov    %r14d,0x28(%rsp)
mov    %ebx,0x30(%rsp)
mov    %r11d,0x38(%rsp)
mov    %r10d,0x40(%rsp)
mov    %eax,0x48(%rsp)
call   1030 <do_other_job@plt>
mov    %eax,-0x54(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x48(%rbp),%esi
mov    -0x4c(%rbp),%edx
mov    -0x50(%rbp),%ecx
call   1040 <do_some_job@plt>
add    -0x54(%rbp),%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<prologue_epilogue_16_long>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%ebp
mov    %r9d,0x4(%rsp)
mov    %r8d,%ebx
mov    %ecx,(%rsp)
mov    %edx,%r15d
mov    %esi,%r13d
mov    %edi,%r12d
call   1040 <do_some_job@plt>
mov    %eax,0x14(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
mov    0x50(%rsp),%edx
mov    0x58(%rsp),%ecx
call   1040 <do_some_job@plt>
mov    %eax,0x10(%rsp)
mov    0x60(%rsp),%edi
mov    0x68(%rsp),%esi
mov    0x70(%rsp),%edx
mov    0x78(%rsp),%ecx
call   1040 <do_some_job@plt>
mov    %eax,0xc(%rsp)
mov    0x80(%rsp),%edi
mov    0x88(%rsp),%esi
mov    0x90(%rsp),%edx
mov    0x98(%rsp),%r14d
mov    %r14d,%ecx
call   1040 <do_some_job@plt>
mov    %eax,0x8(%rsp)
mov    %r12d,%edi
mov    %r13d,%esi
mov    %r15d,%edx
mov    (%rsp),%ecx
mov    %ebx,%r8d
mov    0x4(%rsp),%r9d
push   %r14
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
mov    0x98(%rsp),%eax
push   %rax
call   1030 <do_other_job@plt>
add    $0x50,%rsp
mov    %eax,%ebx
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1040 <do_some_job@plt>
add    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @prologue_epilogue_16_long(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15) {
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
store i32 %0, i32* %17
store i32 %1, i32* %18
store i32 %2, i32* %19
store i32 %3, i32* %20
store i32 %4, i32* %21
store i32 %5, i32* %22
store i32 %6, i32* %23
store i32 %7, i32* %24
store i32 %8, i32* %25
store i32 %9, i32* %26
store i32 %10, i32* %27
store i32 %11, i32* %28
store i32 %12, i32* %29
store i32 %13, i32* %30
store i32 %14, i32* %31
store i32 %15, i32* %32
%38 = load i32, i32* %17
%39 = load i32, i32* %18
%40 = load i32, i32* %19
%41 = load i32, i32* %20
%42 = call i32 @do_some_job(i32 %38, i32 %39, i32 %40, i32 %41)
store i32 %42, i32* %33
%43 = load i32, i32* %21
%44 = load i32, i32* %22
%45 = load i32, i32* %23
%46 = load i32, i32* %24
%47 = call i32 @do_some_job(i32 %43, i32 %44, i32 %45, i32 %46)
store i32 %47, i32* %34
%48 = load i32, i32* %25
%49 = load i32, i32* %26
%50 = load i32, i32* %27
%51 = load i32, i32* %28
%52 = call i32 @do_some_job(i32 %48, i32 %49, i32 %50, i32 %51)
store i32 %52, i32* %35
%53 = load i32, i32* %29
%54 = load i32, i32* %30
%55 = load i32, i32* %31
%56 = load i32, i32* %32
%57 = call i32 @do_some_job(i32 %53, i32 %54, i32 %55, i32 %56)
store i32 %57, i32* %36
%58 = load i32, i32* %17
%59 = load i32, i32* %18
%60 = load i32, i32* %19
%61 = load i32, i32* %20
%62 = load i32, i32* %21
%63 = load i32, i32* %22
%64 = load i32, i32* %23
%65 = load i32, i32* %24
%66 = load i32, i32* %25
%67 = load i32, i32* %26
%68 = load i32, i32* %27
%69 = load i32, i32* %28
%70 = load i32, i32* %29
%71 = load i32, i32* %30
%72 = load i32, i32* %31
%73 = load i32, i32* %32
%74 = call i32 @do_other_job(i32 %58, i32 %59, i32 %60, i32 %61, i32 %62, i32 %63, i32 %64, i32 %65, i32 %66, i32 %67, i32 %68, i32 %69, i32 %70, i32 %71, i32 %72, i32 %73)
store i32 %74, i32* %37
%75 = load i32, i32* %33
%76 = load i32, i32* %34
%77 = load i32, i32* %35
%78 = load i32, i32* %36
%79 = call i32 @do_some_job(i32 %75, i32 %76, i32 %77, i32 %78)
%80 = load i32, i32* %37
%81 = add nsw i32 %79, %80
ret i32 %81
}

LLVM IR (-O2):
define i32 @prologue_epilogue_16_long(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15) {
%17 = tail call i32 @do_some_job(i32 %0, i32 %1, i32 %2, i32 %3)
%18 = tail call i32 @do_some_job(i32 %4, i32 %5, i32 %6, i32 %7)
%19 = tail call i32 @do_some_job(i32 %8, i32 %9, i32 %10, i32 %11)
%20 = tail call i32 @do_some_job(i32 %12, i32 %13, i32 %14, i32 %15)
%21 = tail call i32 @do_other_job(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
%22 = tail call i32 @do_some_job(i32 %17, i32 %18, i32 %19, i32 %20)
%23 = add nsw i32 %22, %21
ret i32 %23
}