#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 */
typedef int /*<<< orphan*/ uint_fast64_t;
typedef int uint_fast32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ mod_mac(int, int, int);
int mod_mac2(int /*<<< orphan*/, int, int, int, int);
uint_fast32_t mod_mac3(uint_fast32_t sum, uint_fast32_t a, uint_fast32_t b,
                       uint_fast32_t c, uint_fast32_t d, uint_fast32_t e,
                       uint_fast32_t f) {
  uint_fast64_t temp;
  assert(sum <= 0x7FFFFFFE);
  assert(a <= 0x7FFFFFFE);
  assert(b <= 0x7FFFFFFE);
  assert(c <= 0x7FFFFFFE);
  assert(d <= 0x7FFFFFFE);
  assert(e <= 0x7FFFFFFE);
  assert(f <= 0x7FFFFFFE);
  return mod_mac2(mod_mac(sum, a, b), c, d, e, f);
}


x86 assembly (clang, -O0):
<mod_mac3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cmpl   $0x7ffffffe,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x7ffffffe,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x7ffffffe,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x7ffffffe,-0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x7ffffffe,-0x14(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x7ffffffe,-0x18(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
cmpl   $0x7ffffffe,0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <mod_mac@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1030 <mod_mac2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_mac3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r15d
mov    %r8d,%r12d
mov    %ecx,%r13d
mov    %edx,%ebp
mov    %esi,%r14d
mov    %edi,%eax
mov    %edi,0x4(%rsp)
mov    0x40(%rsp),%ebx
xor    %edi,%edi
cmp    $0x7fffffff,%eax
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r14d
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebp
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r13d
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r12d
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r15d
setne  %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebx
setne  %dil
call   1050 <assert@plt>
mov    0x4(%rsp),%edi
mov    %r14d,%esi
mov    %ebp,%edx
call   1040 <mod_mac@plt>
mov    %eax,%edi
mov    %r13d,%esi
mov    %r12d,%edx
mov    %r15d,%ecx
mov    %ebx,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <mod_mac2@plt>

LLVM IR (-O0):
define i32 @mod_mac3(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%16 = load i32, i32* %8
%17 = icmp sle i32 %16, 2147483646
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* %9
%21 = icmp sle i32 %20, 2147483646
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i32, i32* %10
%25 = icmp sle i32 %24, 2147483646
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i32, i32* %11
%29 = icmp sle i32 %28, 2147483646
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i32, i32* %12
%33 = icmp sle i32 %32, 2147483646
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
%36 = load i32, i32* %13
%37 = icmp sle i32 %36, 2147483646
%38 = zext i1 %37 to i32
%39 = call i32 @assert(i32 %38)
%40 = load i32, i32* %14
%41 = icmp sle i32 %40, 2147483646
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = load i32, i32* %8
%45 = load i32, i32* %9
%46 = load i32, i32* %10
%47 = call i32 @mod_mac(i32 %44, i32 %45, i32 %46)
%48 = load i32, i32* %11
%49 = load i32, i32* %12
%50 = load i32, i32* %13
%51 = load i32, i32* %14
%52 = call i32 @mod_mac2(i32 %47, i32 %48, i32 %49, i32 %50, i32 %51)
ret i32 %52
}

LLVM IR (-O2):
define i32 @mod_mac3(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = icmp ne i32 %0, 2147483647
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = icmp ne i32 %1, 2147483647
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = icmp ne i32 %2, 2147483647
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = icmp ne i32 %3, 2147483647
%18 = zext i1 %17 to i32
%19 = tail call i32 @assert(i32 %18)
%20 = icmp ne i32 %4, 2147483647
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = icmp ne i32 %5, 2147483647
%24 = zext i1 %23 to i32
%25 = tail call i32 @assert(i32 %24)
%26 = icmp ne i32 %6, 2147483647
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @mod_mac(i32 %0, i32 %1, i32 %2)
%30 = tail call i32 @mod_mac2(i32 %29, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %30
}