#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*/ assert(int);
void foo(int a, int b, int c, int d, int e, int f, int g, int h) {
  assert(a == 0);
  assert(b == 1);
  assert(c == 2);
  assert(d == 3);
  assert(e == 4);
  assert(f == 5);
  assert(g == 6);
  assert(h == 7);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
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   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x4,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x5,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x6,0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x7,0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%ebp
mov    %esi,%ebx
mov    0x48(%rsp),%eax
mov    %eax,0x4(%rsp)
mov    0x40(%rsp),%r13d
xor    %eax,%eax
test   %edi,%edi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x1,%ebx
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x2,%ebp
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x3,%r12d
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x4,%r15d
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x5,%r14d
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x6,%r13d
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmpl   $0x7,0x4(%rsp)
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <assert@plt>

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

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