#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 const AF_INET;
int const AF_INET6;
int const AF_UNSPEC;
int EXIT_SUCCESS;
int /*<<< orphan*/ assert(int);
int main_c(const int net_fam, const char *const rootdir, const char *const host,
           const char *const port) {
  assert(net_fam == AF_INET || net_fam == AF_INET6 || net_fam == AF_UNSPEC);
  assert(rootdir != NULL);
  assert(host != NULL);
  assert(port != NULL);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2eb5(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x21(%rbp)
je     1167 <main_c+0x57>
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2e8e(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x21(%rbp)
je     1167 <main_c+0x57>
mov    -0x4(%rbp),%eax
mov    0x2e81(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_c>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
xor    %eax,%eax
test   %edi,%edi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@AF_INET = constant i32 0
@AF_INET6 = constant i32 0
@AF_UNSPEC = constant i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main_c(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* @AF_INET
%11 = icmp eq i32 %9, %10
br i1 %11, label %20, label %12
12: ; preds = %4
%13 = load i32, i32* %5
%14 = load i32, i32* @AF_INET6
%15 = icmp eq i32 %13, %14
br i1 %15, label %20, label %16
16: ; preds = %12
%17 = load i32, i32* %5
%18 = load i32, i32* @AF_UNSPEC
%19 = icmp eq i32 %17, %18
br label %20
20: ; preds = %16, %12, %4
%21 = phi i1 [ true, %12 ], [ true, %4 ], [ %19, %16 ]
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load i8*, i8** %6
%25 = icmp ne i8* %24, null
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i8*, i8** %7
%29 = icmp ne i8* %28, null
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i8*, i8** %8
%33 = icmp ne i8* %32, null
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
}

LLVM IR (-O2):
@AF_INET = constant i32 0
@AF_INET6 = constant i32 0
@AF_UNSPEC = constant i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main_c(i32 %0, i8* readnone %1, i8* readnone %2, i8* readnone %3) {
%5 = icmp eq i32 %0, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = icmp ne i8* %1, null
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = icmp ne i8* %2, null
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = icmp ne i8* %3, null
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = load i32, i32* @EXIT_SUCCESS
ret i32 %17
}