#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 mod_mac2(int, int, int, int, int);
uint_fast32_t mod_mac4(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_fast32_t g, uint_fast32_t h) {
  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);
  assert(g <= 0x7FFFFFFE);
  assert(h <= 0x7FFFFFFE);
  return mod_mac2(mod_mac2(sum, a, b, c, d), e, f, g, h);
}


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

x86 assembly (clang, -O2):
<mod_mac4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9d,%ebp
mov    %r8d,%r14d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %edx,0x4(%rsp)
mov    %esi,%ebx
mov    %esi,0xc(%rsp)
mov    %edi,%eax
mov    %edi,0x14(%rsp)
mov    0x60(%rsp),%ecx
mov    %ecx,0x10(%rsp)
mov    0x58(%rsp),%ecx
mov    %ecx,0x8(%rsp)
mov    0x50(%rsp),%r15d
xor    %edi,%edi
cmp    $0x7fffffff,%eax
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r13d
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r12d
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r14d
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%ebp
mov    %ebp,%r13d
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmp    $0x7fffffff,%r15d
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
mov    0x8(%rsp),%ebp
cmp    $0x7fffffff,%ebp
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
mov    0x10(%rsp),%ebx
cmp    $0x7fffffff,%ebx
setne  %dil
call   1040 <assert@plt>
mov    0x14(%rsp),%edi
mov    0xc(%rsp),%esi
mov    0x4(%rsp),%edx
mov    %r12d,%ecx
mov    %r14d,%r8d
call   1030 <mod_mac2@plt>
mov    %eax,%edi
mov    %r13d,%esi
mov    %r15d,%edx
mov    %ebp,%ecx
mov    %ebx,%r8d
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <mod_mac2@plt>

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

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