#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 */
scalar_t__ proc0();
long proc1(long);
long proc2(long, int);
long proc3(long, int, short);
long proc4(long, int, short, char);
int /*<<< orphan*/ proc5(long, int, short, char, long *);
scalar_t__ proc6(long, int, short, char, long *, long);
scalar_t__ proc7(long, int, short, char, long *, long, long);
scalar_t__ proc8(long, int, short, char, long *, long, long, long);
int /*<<< orphan*/ proc9(long, int, short, char, long *, long, long, long,
                         long *);
int main() {
  long p1 = 1;
  int p2 = 2;
  short p3 = 3;
  char p4 = 4;
  long *p5 = 5;
  long p6 = 6, p7 = 7, p8 = 8;
  long *p9 = 9;
  int a = 0;
  a += proc0();
  long b = 2;
  b *= proc1(p1);
  b *= proc2(p1, p2);
  b *= proc3(p1, p2, p3);
  b *= proc4(p1, p2, p3, p4);
  proc5(p1, p2, p3, p4, p5);
  b += proc6(p1, p2, p3, p4, p5, p6);
  b += proc7(p1, p2, p3, p4, p5, p6, p7);
  b += proc8(p1, p2, p3, p4, p5, p6, p7, p8);
  proc9(p1, p2, p3, p4, p5, p6, p7, p8, p9);
  return b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movw   $0x3,-0x16(%rbp)
movb   $0x4,-0x17(%rbp)
mov    $0x5,%eax
mov    %rax,-0x20(%rbp)
movq   $0x6,-0x28(%rbp)
movq   $0x7,-0x30(%rbp)
movq   $0x8,-0x38(%rbp)
mov    $0x9,%eax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    $0x0,%al
call   1050 <proc0@plt>
mov    %rax,%rcx
movslq -0x44(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x44(%rbp)
movq   $0x2,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <proc1@plt>
imul   -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1060 <proc2@plt>
imul   -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
movswl -0x16(%rbp),%edx
call   10c0 <proc3@plt>
imul   -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x16(%rbp),%ax
movswl %ax,%edx
movsbl -0x17(%rbp),%ecx
call   1070 <proc4@plt>
imul   -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x16(%rbp),%cx
mov    -0x17(%rbp),%al
mov    -0x20(%rbp),%r8
movswl %cx,%edx
movsbl %al,%ecx
call   10b0 <proc5@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x16(%rbp),%cx
mov    -0x17(%rbp),%al
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
movswl %cx,%edx
movsbl %al,%ecx
call   1030 <proc6@plt>
add    -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x16(%rbp),%dx
mov    -0x17(%rbp),%cl
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
movswl %dx,%edx
movsbl %cl,%ecx
mov    %rax,(%rsp)
call   1080 <proc7@plt>
add    -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x16(%rbp),%dx
mov    -0x17(%rbp),%cl
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    -0x38(%rbp),%rax
movswl %dx,%edx
movsbl %cl,%ecx
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <proc8@plt>
add    -0x50(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x16(%rbp),%dx
mov    -0x17(%rbp),%cl
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r11
mov    -0x38(%rbp),%r10
mov    -0x40(%rbp),%rax
movswl %dx,%edx
movsbl %cl,%ecx
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1090 <proc9@plt>
mov    -0x50(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <proc0@plt>
mov    $0x1,%edi
call   10a0 <proc1@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <proc2@plt>
mov    %rax,%r15
imul   %r14d,%r15d
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   10c0 <proc3@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1070 <proc4@plt>
mov    %rax,%rbx
imul   %r14d,%ebx
imul   %r15d,%ebx
mov    $0x1,%edi
mov    $0x5,%r8d
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   10b0 <proc5@plt>
mov    $0x1,%edi
mov    $0x5,%r8d
mov    $0x6,%r9d
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <proc6@plt>
lea    (%rax,%rbx,2),%ebx
sub    $0x8,%rsp
mov    $0x1,%edi
mov    $0x5,%r8d
mov    $0x6,%r9d
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
push   $0x7
call   1080 <proc7@plt>
add    $0x10,%rsp
mov    %rax,%r14
add    %ebx,%r14d
mov    $0x1,%edi
mov    $0x5,%r8d
mov    $0x6,%r9d
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
push   $0x8
push   $0x7
call   1040 <proc8@plt>
add    $0x10,%rsp
mov    %rax,%rbx
add    %r14d,%ebx
sub    $0x8,%rsp
mov    $0x1,%edi
mov    $0x5,%r8d
mov    $0x6,%r9d
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
push   $0x9
push   $0x8
push   $0x7
call   1090 <proc9@plt>
add    $0x20,%rsp
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i16
%5 = alloca i8
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64*
%11 = alloca i32
%12 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
store i32 2, i32* %3
store i16 3, i16* %4
store i8 4, i8* %5
store i64* inttoptr (i64 5 to i64*), i64** %6
store i64 6, i64* %7
store i64 7, i64* %8
store i64 8, i64* %9
store i64* inttoptr (i64 9 to i64*), i64** %10
store i32 0, i32* %11
%13 = call i64 (...) @proc0()
%14 = load i32, i32* %11
%15 = sext i32 %14 to i64
%16 = add nsw i64 %15, %13
%17 = trunc i64 %16 to i32
store i32 %17, i32* %11
store i64 2, i64* %12
%18 = load i64, i64* %2
%19 = call i64 @proc1(i64 %18)
%20 = load i64, i64* %12
%21 = mul nsw i64 %20, %19
store i64 %21, i64* %12
%22 = load i64, i64* %2
%23 = load i32, i32* %3
%24 = call i64 @proc2(i64 %22, i32 %23)
%25 = load i64, i64* %12
%26 = mul nsw i64 %25, %24
store i64 %26, i64* %12
%27 = load i64, i64* %2
%28 = load i32, i32* %3
%29 = load i16, i16* %4
%30 = call i64 @proc3(i64 %27, i32 %28, i16 signext %29)
%31 = load i64, i64* %12
%32 = mul nsw i64 %31, %30
store i64 %32, i64* %12
%33 = load i64, i64* %2
%34 = load i32, i32* %3
%35 = load i16, i16* %4
%36 = load i8, i8* %5
%37 = call i64 @proc4(i64 %33, i32 %34, i16 signext %35, i8 signext %36)
%38 = load i64, i64* %12
%39 = mul nsw i64 %38, %37
store i64 %39, i64* %12
%40 = load i64, i64* %2
%41 = load i32, i32* %3
%42 = load i16, i16* %4
%43 = load i8, i8* %5
%44 = load i64*, i64** %6
%45 = call i32 @proc5(i64 %40, i32 %41, i16 signext %42, i8 signext %43, i64* %44)
%46 = load i64, i64* %2
%47 = load i32, i32* %3
%48 = load i16, i16* %4
%49 = load i8, i8* %5
%50 = load i64*, i64** %6
%51 = load i64, i64* %7
%52 = call i64 @proc6(i64 %46, i32 %47, i16 signext %48, i8 signext %49, i64* %50, i64 %51)
%53 = load i64, i64* %12
%54 = add nsw i64 %53, %52
store i64 %54, i64* %12
%55 = load i64, i64* %2
%56 = load i32, i32* %3
%57 = load i16, i16* %4
%58 = load i8, i8* %5
%59 = load i64*, i64** %6
%60 = load i64, i64* %7
%61 = load i64, i64* %8
%62 = call i64 @proc7(i64 %55, i32 %56, i16 signext %57, i8 signext %58, i64* %59, i64 %60, i64 %61)
%63 = load i64, i64* %12
%64 = add nsw i64 %63, %62
store i64 %64, i64* %12
%65 = load i64, i64* %2
%66 = load i32, i32* %3
%67 = load i16, i16* %4
%68 = load i8, i8* %5
%69 = load i64*, i64** %6
%70 = load i64, i64* %7
%71 = load i64, i64* %8
%72 = load i64, i64* %9
%73 = call i64 @proc8(i64 %65, i32 %66, i16 signext %67, i8 signext %68, i64* %69, i64 %70, i64 %71, i64 %72)
%74 = load i64, i64* %12
%75 = add nsw i64 %74, %73
store i64 %75, i64* %12
%76 = load i64, i64* %2
%77 = load i32, i32* %3
%78 = load i16, i16* %4
%79 = load i8, i8* %5
%80 = load i64*, i64** %6
%81 = load i64, i64* %7
%82 = load i64, i64* %8
%83 = load i64, i64* %9
%84 = load i64*, i64** %10
%85 = call i32 @proc9(i64 %76, i32 %77, i16 signext %78, i8 signext %79, i64* %80, i64 %81, i64 %82, i64 %83, i64* %84)
%86 = load i64, i64* %12
%87 = trunc i64 %86 to i32
ret i32 %87
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @proc0()
%2 = tail call i64 @proc1(i64 1)
%3 = shl nsw i64 %2, 1
%4 = tail call i64 @proc2(i64 1, i32 2)
%5 = mul nsw i64 %3, %4
%6 = tail call i64 @proc3(i64 1, i32 2, i16 signext 3)
%7 = mul nsw i64 %5, %6
%8 = tail call i64 @proc4(i64 1, i32 2, i16 signext 3, i8 signext 4)
%9 = mul nsw i64 %7, %8
%10 = tail call i32 @proc5(i64 1, i32 2, i16 signext 3, i8 signext 4, i64* inttoptr (i64 5 to i64*))
%11 = tail call i64 @proc6(i64 1, i32 2, i16 signext 3, i8 signext 4, i64* inttoptr (i64 5 to i64*), i64 6)
%12 = add nsw i64 %11, %9
%13 = tail call i64 @proc7(i64 1, i32 2, i16 signext 3, i8 signext 4, i64* inttoptr (i64 5 to i64*), i64 6, i64 7)
%14 = add nsw i64 %12, %13
%15 = tail call i64 @proc8(i64 1, i32 2, i16 signext 3, i8 signext 4, i64* inttoptr (i64 5 to i64*), i64 6, i64 7, i64 8)
%16 = add nsw i64 %14, %15
%17 = tail call i32 @proc9(i64 1, i32 2, i16 signext 3, i8 signext 4, i64* inttoptr (i64 5 to i64*), i64 6, i64 7, i64 8, i64* inttoptr (i64 9 to i64*))
%18 = trunc i64 %16 to i32
ret i32 %18
}