#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*/ printf(char *, int, int, int, int, int, int);
int f6(int x, int y, int z, int w, int u, int v) {
  printf("f6 received: %d %d %d %d %d %d\n", x, y, z, w, u, v);
  return (x * y) + (z * w) + (u * v);
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xeb9(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
mov    -0x14(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%r13d
mov    %r9d,(%rsp)
lea    0xec9(%rip),%rdi
mov    %r13d,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %ebp,%r8d
mov    %r14d,%r9d
call   1030 <printf@plt>
imul   %r13d,%r12d
imul   %r15d,%ebp
add    %r12d,%ebp
imul   %r14d,%ebx
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"f6 received: %d %d %d %d %d %d\0A\00"
define i32 @f6(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = mul nsw i32 %20, %21
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = mul nsw i32 %23, %24
%26 = add nsw i32 %22, %25
%27 = load i32, i32* %11
%28 = load i32, i32* %12
%29 = mul nsw i32 %27, %28
%30 = add nsw i32 %26, %29
ret i32 %30
}

LLVM IR (-O2):
@.str = [32 x i8] c"f6 received: %d %d %d %d %d %d\0A\00"
define i32 @f6(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%8 = mul nsw i32 %1, %0
%9 = mul nsw i32 %3, %2
%10 = add nsw i32 %9, %8
%11 = mul nsw i32 %5, %4
%12 = add nsw i32 %10, %11
ret i32 %12
}