#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*/ PF_INET;
int /*<<< orphan*/ PF_INET6;
int /*<<< orphan*/ PF_LOCAL;
int /*<<< orphan*/ SOCK_DGRAM;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ dotest(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int main(void) {
  dotest(PF_INET, SOCK_DGRAM, 0);
  dotest(PF_INET, SOCK_STREAM, 0);
  dotest(PF_INET6, SOCK_DGRAM, 0);
  dotest(PF_INET6, SOCK_STREAM, 0);
  dotest(PF_LOCAL, SOCK_DGRAM, 0);
  dotest(PF_LOCAL, SOCK_STREAM, 0);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
mov    0x2e56(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
mov    0x2e4d(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
mov    0x2e24(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    0x2eac(%rip),%rbx
mov    (%rbx),%edi
mov    0x2ebb(%rip),%r14
mov    (%r14),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    (%rbx),%edi
mov    0x2e98(%rip),%r15
mov    (%r15),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e9f(%rip),%rbx
mov    (%rbx),%edi
mov    (%r14),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    (%rbx),%edi
mov    (%r15),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    0x2e58(%rip),%rbx
mov    (%rbx),%edi
mov    (%r14),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
mov    (%rbx),%edi
mov    (%r15),%esi
xor    %edx,%edx
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SOCK_STREAM = global i32 0
@PF_INET6 = global i32 0
@PF_LOCAL = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @PF_INET
%3 = load i32, i32* @SOCK_DGRAM
%4 = call i32 @dotest(i32 %2, i32 %3, i32 0)
%5 = load i32, i32* @PF_INET
%6 = load i32, i32* @SOCK_STREAM
%7 = call i32 @dotest(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* @PF_INET6
%9 = load i32, i32* @SOCK_DGRAM
%10 = call i32 @dotest(i32 %8, i32 %9, i32 0)
%11 = load i32, i32* @PF_INET6
%12 = load i32, i32* @SOCK_STREAM
%13 = call i32 @dotest(i32 %11, i32 %12, i32 0)
%14 = load i32, i32* @PF_LOCAL
%15 = load i32, i32* @SOCK_DGRAM
%16 = call i32 @dotest(i32 %14, i32 %15, i32 0)
%17 = load i32, i32* @PF_LOCAL
%18 = load i32, i32* @SOCK_STREAM
%19 = call i32 @dotest(i32 %17, i32 %18, i32 0)
ret i32 0
}

LLVM IR (-O2):
@PF_INET = global i32 0
@SOCK_DGRAM = global i32 0
@SOCK_STREAM = global i32 0
@PF_INET6 = global i32 0
@PF_LOCAL = global i32 0
define i32 @main() {
%1 = load i32, i32* @PF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @dotest(i32 %1, i32 %2, i32 0)
%4 = load i32, i32* @PF_INET
%5 = load i32, i32* @SOCK_STREAM
%6 = tail call i32 @dotest(i32 %4, i32 %5, i32 0)
%7 = load i32, i32* @PF_INET6
%8 = load i32, i32* @SOCK_DGRAM
%9 = tail call i32 @dotest(i32 %7, i32 %8, i32 0)
%10 = load i32, i32* @PF_INET6
%11 = load i32, i32* @SOCK_STREAM
%12 = tail call i32 @dotest(i32 %10, i32 %11, i32 0)
%13 = load i32, i32* @PF_LOCAL
%14 = load i32, i32* @SOCK_DGRAM
%15 = tail call i32 @dotest(i32 %13, i32 %14, i32 0)
%16 = load i32, i32* @PF_LOCAL
%17 = load i32, i32* @SOCK_STREAM
%18 = tail call i32 @dotest(i32 %16, i32 %17, i32 0)
ret i32 0
}