#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*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ itc_net_setsockopt_n_invalid_opt_name(int);
int /*<<< orphan*/ itc_net_setsockopt_p_ip_ttl(int);
int /*<<< orphan*/ itc_net_setsockopt_p_multicast_ttl_loop(int);
int /*<<< orphan*/ itc_net_setsockopt_p_multicast_ttl_loop_own(int);
int /*<<< orphan*/ itc_net_setsockopt_p_no_check(int);
int /*<<< orphan*/ itc_net_setsockopt_p_rcvbuf(int);
int /*<<< orphan*/ itc_net_setsockopt_p_rcvtimo(int);
int /*<<< orphan*/ itc_net_setsockopt_p_reuseaddr(int);
int /*<<< orphan*/ itc_net_setsockopt_p_reuseport(int);
int /*<<< orphan*/ itc_net_setsockopt_p_sndtimo(int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int itc_net_setsockopt_main(void) {
  int fd = -1;
  fd = socket(AF_INET, SOCK_STREAM, 0);
  itc_net_setsockopt_n_invalid_opt_name(fd);
  itc_net_setsockopt_p_rcvbuf(fd);
  itc_net_setsockopt_p_reuseport(fd);
  itc_net_setsockopt_p_reuseaddr(fd);
  itc_net_setsockopt_p_rcvtimo(fd);
  itc_net_setsockopt_p_sndtimo(fd);
  itc_net_setsockopt_p_no_check(fd);
  itc_net_setsockopt_p_ip_ttl(fd);
  itc_net_setsockopt_p_multicast_ttl_loop(fd);
  itc_net_setsockopt_p_multicast_ttl_loop_own(fd);
  close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<itc_net_setsockopt_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
mov    0x2df9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1080 <itc_net_setsockopt_n_invalid_opt_name@plt>
mov    -0x4(%rbp),%edi
call   1030 <itc_net_setsockopt_p_rcvbuf@plt>
mov    -0x4(%rbp),%edi
call   1090 <itc_net_setsockopt_p_reuseport@plt>
mov    -0x4(%rbp),%edi
call   1050 <itc_net_setsockopt_p_reuseaddr@plt>
mov    -0x4(%rbp),%edi
call   10a0 <itc_net_setsockopt_p_rcvtimo@plt>
mov    -0x4(%rbp),%edi
call   10b0 <itc_net_setsockopt_p_sndtimo@plt>
mov    -0x4(%rbp),%edi
call   1070 <itc_net_setsockopt_p_no_check@plt>
mov    -0x4(%rbp),%edi
call   1040 <itc_net_setsockopt_p_ip_ttl@plt>
mov    -0x4(%rbp),%edi
call   10c0 <itc_net_setsockopt_p_multicast_ttl_loop@plt>
mov    -0x4(%rbp),%edi
call   10d0 <itc_net_setsockopt_p_multicast_ttl_loop_own@plt>
mov    -0x4(%rbp),%edi
call   1060 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itc_net_setsockopt_main>:
push   %rbx
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
mov    0x2e07(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   10e0 <socket@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1080 <itc_net_setsockopt_n_invalid_opt_name@plt>
mov    %ebx,%edi
call   1030 <itc_net_setsockopt_p_rcvbuf@plt>
mov    %ebx,%edi
call   1090 <itc_net_setsockopt_p_reuseport@plt>
mov    %ebx,%edi
call   1050 <itc_net_setsockopt_p_reuseaddr@plt>
mov    %ebx,%edi
call   10a0 <itc_net_setsockopt_p_rcvtimo@plt>
mov    %ebx,%edi
call   10b0 <itc_net_setsockopt_p_sndtimo@plt>
mov    %ebx,%edi
call   1070 <itc_net_setsockopt_p_no_check@plt>
mov    %ebx,%edi
call   1040 <itc_net_setsockopt_p_ip_ttl@plt>
mov    %ebx,%edi
call   10c0 <itc_net_setsockopt_p_multicast_ttl_loop@plt>
mov    %ebx,%edi
call   10d0 <itc_net_setsockopt_p_multicast_ttl_loop_own@plt>
mov    %ebx,%edi
call   1060 <close@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @itc_net_setsockopt_main() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = load i32, i32* @AF_INET
%3 = load i32, i32* @SOCK_STREAM
%4 = call i32 @socket(i32 %2, i32 %3, i32 0)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @itc_net_setsockopt_n_invalid_opt_name(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @itc_net_setsockopt_p_rcvbuf(i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @itc_net_setsockopt_p_reuseport(i32 %9)
%11 = load i32, i32* %1
%12 = call i32 @itc_net_setsockopt_p_reuseaddr(i32 %11)
%13 = load i32, i32* %1
%14 = call i32 @itc_net_setsockopt_p_rcvtimo(i32 %13)
%15 = load i32, i32* %1
%16 = call i32 @itc_net_setsockopt_p_sndtimo(i32 %15)
%17 = load i32, i32* %1
%18 = call i32 @itc_net_setsockopt_p_no_check(i32 %17)
%19 = load i32, i32* %1
%20 = call i32 @itc_net_setsockopt_p_ip_ttl(i32 %19)
%21 = load i32, i32* %1
%22 = call i32 @itc_net_setsockopt_p_multicast_ttl_loop(i32 %21)
%23 = load i32, i32* %1
%24 = call i32 @itc_net_setsockopt_p_multicast_ttl_loop_own(i32 %23)
%25 = load i32, i32* %1
%26 = call i32 @close(i32 %25)
ret i32 0
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @itc_net_setsockopt_main() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = tail call i32 @itc_net_setsockopt_n_invalid_opt_name(i32 %3)
%5 = tail call i32 @itc_net_setsockopt_p_rcvbuf(i32 %3)
%6 = tail call i32 @itc_net_setsockopt_p_reuseport(i32 %3)
%7 = tail call i32 @itc_net_setsockopt_p_reuseaddr(i32 %3)
%8 = tail call i32 @itc_net_setsockopt_p_rcvtimo(i32 %3)
%9 = tail call i32 @itc_net_setsockopt_p_sndtimo(i32 %3)
%10 = tail call i32 @itc_net_setsockopt_p_no_check(i32 %3)
%11 = tail call i32 @itc_net_setsockopt_p_ip_ttl(i32 %3)
%12 = tail call i32 @itc_net_setsockopt_p_multicast_ttl_loop(i32 %3)
%13 = tail call i32 @itc_net_setsockopt_p_multicast_ttl_loop_own(i32 %3)
%14 = tail call i32 @close(i32 %3)
ret i32 0
}