#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 /*<<< orphan*/);
int /*<<< orphan*/ get_carry_flag();
int /*<<< orphan*/ get_parity_flag();
int /*<<< orphan*/ get_sign_flag();
int /*<<< orphan*/ get_zero_flag();
void generic_asserts_and() {
  assert(!get_zero_flag() && "generic_asserts_and failed");
  assert(!get_sign_flag() && "generic_asserts_and failed");
  assert(!get_parity_flag() && "generic_asserts_and failed");
  assert(!get_carry_flag() && "generic_asserts_and failed");
}


x86 assembly (clang, -O0):
<generic_asserts_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get_zero_flag@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1(%rbp)
jne    1179 <generic_asserts_and+0x29>
mov    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1179 <generic_asserts_and+0x29>
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x0,%al
call   1050 <get_sign_flag@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    11a7 <generic_asserts_and+0x57>
mov    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    11a7 <generic_asserts_and+0x57>
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x0,%al
call   1070 <get_parity_flag@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x3(%rbp)
jne    11d5 <generic_asserts_and+0x85>
mov    $0x1,%al
mov    %al,-0x3(%rbp)
jmp    11d5 <generic_asserts_and+0x85>
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x0,%al
call   1060 <get_carry_flag@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x4(%rbp)
jne    1203 <generic_asserts_and+0xb3>
mov    $0x1,%al
mov    %al,-0x4(%rbp)
jmp    1203 <generic_asserts_and+0xb3>
mov    -0x4(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_asserts_and>:
push   %rax
xor    %eax,%eax
call   1030 <get_zero_flag@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
call   1050 <get_sign_flag@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
call   1070 <get_parity_flag@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
call   1060 <get_carry_flag@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"generic_asserts_and failed\00"
define void @generic_asserts_and() {
%1 = call i32 (...) @get_zero_flag()
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %4
4: ; preds = %3, %0
%5 = phi i1 [ false, %0 ], [ true, %3 ]
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 (...) @get_sign_flag()
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %4
br label %11
11: ; preds = %10, %4
%12 = phi i1 [ false, %4 ], [ true, %10 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 (...) @get_parity_flag()
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %11
br label %18
18: ; preds = %17, %11
%19 = phi i1 [ false, %11 ], [ true, %17 ]
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call i32 (...) @get_carry_flag()
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %18
br label %25
25: ; preds = %24, %18
%26 = phi i1 [ false, %18 ], [ true, %24 ]
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
ret void
}

LLVM IR (-O2):
define void @generic_asserts_and() {
%1 = tail call i32 (...) @get_zero_flag()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 (...) @get_sign_flag()
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 (...) @get_parity_flag()
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 (...) @get_carry_flag()
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret void
}