#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 */
struct sockaddr_storage {
  void *ss_family;
};
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};

/* Variables and functions */
void *AF_INET;
void *AF_INET6;
int /*<<< orphan*/ addr_mask(struct sockaddr_storage *, int);
int /*<<< orphan*/ addr_match(struct sockaddr_storage *,
                              struct sockaddr_storage *, int);
int /*<<< orphan*/ assert_int(int, int /*<<< orphan*/, char *);
int /*<<< orphan*/ assert_ip(char *, struct sockaddr_storage *, char *);
int /*<<< orphan*/ assert_ip6(char *, struct sockaddr_storage *, char *);
int /*<<< orphan*/ fct_init();
int /*<<< orphan*/ fct_send();
int /*<<< orphan*/ inet_pton(void *, char *, int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  fct_init();
  struct sockaddr_storage ss_addr;
  ss_addr.ss_family = AF_INET;
  inet_pton(AF_INET, "192.168.0.1",
            &((struct sockaddr_in *)&ss_addr)->sin_addr);
  struct sockaddr_storage ss_addr2;
  ss_addr2.ss_family = AF_INET;
  inet_pton(AF_INET, "127.168.0.1",
            &((struct sockaddr_in *)&ss_addr2)->sin_addr);
  struct sockaddr_storage ss_net;
  ss_net.ss_family = AF_INET;
  inet_pton(AF_INET, "192.168.54.78",
            &((struct sockaddr_in *)&ss_net)->sin_addr);
  struct sockaddr_storage ss_mask;
  ss_mask.ss_family = AF_INET;
  inet_pton(AF_INET, "255.0.0.0", &((struct sockaddr_in *)&ss_mask)->sin_addr);
  addr_mask(&ss_net, 8);
  assert_ip("192.0.0.0", &ss_net, "IPv4 masking");
  assert_int(1, addr_match(&ss_addr, &ss_net, 8), "IPv4 matching subnet");
  assert_int(0, addr_match(&ss_addr2, &ss_net, 8), "IPv4 non-matching subnet");
  addr_mask(&ss_net, 0);
  assert_ip("0.0.0.0", &ss_net, "IPv4 wildcard subnet mask");
  assert_int(1, addr_match(&ss_addr, &ss_net, 0),
             "IPv4 wildcard subnet matching");
  inet_pton(AF_INET, "255.255.255.255",
            &((struct sockaddr_in *)&ss_addr)->sin_addr);
  addr_mask(&ss_addr, 1);
  assert_ip("128.0.0.0", &ss_addr, "CIDR mask /1");
  ss_addr.ss_family = AF_INET6;
  inet_pton(AF_INET6, "2001:db8::1428:57ab",
            &((struct sockaddr_in6 *)&ss_addr)->sin6_addr);
  ss_addr2.ss_family = AF_INET6;
  inet_pton(AF_INET6, "2002:db8::1428:57ab",
            &((struct sockaddr_in6 *)&ss_addr2)->sin6_addr);
  ss_net.ss_family = AF_INET6;
  inet_pton(AF_INET6, "2001::cdef",
            &((struct sockaddr_in6 *)&ss_net)->sin6_addr);
  ss_mask.ss_family = AF_INET6;
  inet_pton(AF_INET6, "ffff::", &((struct sockaddr_in6 *)&ss_mask)->sin6_addr);
  addr_mask(&ss_net, 16);
  assert_ip6("2001::", &ss_net, "IPv6 masking");
  assert_int(1, addr_match(&ss_addr, &ss_net, 16), "IPv6 matching subnet");
  assert_int(0, addr_match(&ss_addr2, &ss_net, 16), "IPv6 non-matching subnet");
  fct_send();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   10a0 <fct_init@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e36(%rip),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rdx
lea    0xe40(%rip),%rsi
call   1070 <inet_pton@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e0e(%rip),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rdx
lea    0xe24(%rip),%rsi
call   1070 <inet_pton@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    0x2de6(%rip),%rax
mov    (%rax),%rdi
lea    -0x28(%rbp),%rdx
lea    0xe08(%rip),%rsi
call   1070 <inet_pton@plt>
mov    0x2dcc(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2dbe(%rip),%rax
mov    (%rax),%rdi
lea    -0x30(%rbp),%rdx
lea    0xdee(%rip),%rsi
call   1070 <inet_pton@plt>
lea    -0x28(%rbp),%rdi
mov    $0x8,%esi
call   1090 <addr_mask@plt>
lea    0xdde(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    0xddd(%rip),%rdx
call   1030 <assert_ip@plt>
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   1040 <addr_match@plt>
mov    %eax,%esi
mov    $0x1,%edi
lea    0xdc5(%rip),%rdx
call   1080 <assert_int@plt>
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x8,%edx
call   1040 <addr_match@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xdb8(%rip),%rdx
call   1080 <assert_int@plt>
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
call   1090 <addr_mask@plt>
lea    0xdba(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    0xdb7(%rip),%rdx
call   1030 <assert_ip@plt>
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1040 <addr_match@plt>
mov    %eax,%esi
mov    $0x1,%edi
lea    0xdaf(%rip),%rdx
call   1080 <assert_int@plt>
mov    0x2cf4(%rip),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rdx
lea    0xdb3(%rip),%rsi
call   1070 <inet_pton@plt>
lea    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1090 <addr_mask@plt>
lea    0xda9(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    0xda8(%rip),%rdx
call   1030 <assert_ip@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0x2c9f(%rip),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rdx
lea    0xd8d(%rip),%rsi
call   1070 <inet_pton@plt>
mov    0x2c85(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c77(%rip),%rax
mov    (%rax),%rdi
lea    -0x20(%rbp),%rdx
lea    0xd79(%rip),%rsi
call   1070 <inet_pton@plt>
mov    0x2c5d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    0x2c4f(%rip),%rax
mov    (%rax),%rdi
lea    -0x28(%rbp),%rdx
lea    0xd65(%rip),%rsi
call   1070 <inet_pton@plt>
mov    0x2c35(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c27(%rip),%rax
mov    (%rax),%rdi
lea    -0x30(%rbp),%rdx
lea    0xd48(%rip),%rsi
call   1070 <inet_pton@plt>
lea    -0x28(%rbp),%rdi
mov    $0x10,%esi
call   1090 <addr_mask@plt>
lea    0xd35(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    0xd31(%rip),%rdx
call   1060 <assert_ip6@plt>
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x10,%edx
call   1040 <addr_match@plt>
mov    %eax,%esi
mov    $0x1,%edi
lea    0xd19(%rip),%rdx
call   1080 <assert_int@plt>
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x10,%edx
call   1040 <addr_match@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xd0c(%rip),%rdx
call   1080 <assert_int@plt>
mov    $0x0,%al
call   1050 <fct_send@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %eax,%eax
call   10a0 <fct_init@plt>
mov    0x2e4c(%rip),%r13
mov    0x0(%r13),%rdi
mov    %rdi,0x20(%rsp)
lea    0xe54(%rip),%rsi
lea    0x20(%rsp),%r15
mov    %r15,%rdx
call   1070 <inet_pton@plt>
mov    0x0(%r13),%rdi
mov    %rdi,0x18(%rsp)
lea    0xe43(%rip),%rsi
lea    0x18(%rsp),%r14
mov    %r14,%rdx
call   1070 <inet_pton@plt>
mov    0x0(%r13),%rdi
mov    %rdi,0x10(%rsp)
lea    0xe32(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdx
call   1070 <inet_pton@plt>
mov    0x0(%r13),%rdi
mov    %rdi,0x8(%rsp)
lea    0xe23(%rip),%rsi
lea    0x8(%rsp),%r12
mov    %r12,%rdx
call   1070 <inet_pton@plt>
mov    %rbp,%rdi
mov    $0x8,%esi
call   1090 <addr_mask@plt>
lea    0xe0c(%rip),%rdi
lea    0xe0f(%rip),%rdx
mov    %rbp,%rsi
call   1030 <assert_ip@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
call   1040 <addr_match@plt>
lea    0xdfd(%rip),%rdx
mov    $0x1,%edi
mov    %eax,%esi
call   1080 <assert_int@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x8,%edx
call   1040 <addr_match@plt>
lea    0xdef(%rip),%rdx
xor    %edi,%edi
mov    %eax,%esi
call   1080 <assert_int@plt>
mov    %rbp,%rdi
xor    %esi,%esi
call   1090 <addr_mask@plt>
lea    0xdee(%rip),%rdi
lea    0xdef(%rip),%rdx
mov    %rbp,%rsi
call   1030 <assert_ip@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %edx,%edx
call   1040 <addr_match@plt>
lea    0xded(%rip),%rdx
mov    $0x1,%edi
mov    %eax,%esi
call   1080 <assert_int@plt>
mov    0x0(%r13),%rdi
lea    0xdf4(%rip),%rsi
mov    %r15,%rdx
call   1070 <inet_pton@plt>
mov    %r15,%rdi
mov    $0x1,%esi
call   1090 <addr_mask@plt>
lea    0xde8(%rip),%rdi
lea    0xdeb(%rip),%rdx
mov    %r15,%rsi
call   1030 <assert_ip@plt>
mov    0x2ced(%rip),%rbx
mov    (%rbx),%rdi
mov    %rdi,0x20(%rsp)
lea    0xdda(%rip),%rsi
mov    %r15,%rdx
call   1070 <inet_pton@plt>
mov    (%rbx),%rdi
mov    %rdi,0x18(%rsp)
lea    0xdd7(%rip),%rsi
mov    %r14,%rdx
call   1070 <inet_pton@plt>
mov    (%rbx),%rdi
mov    %rdi,0x10(%rsp)
lea    0xdd4(%rip),%rsi
mov    %rbp,%rdx
call   1070 <inet_pton@plt>
mov    (%rbx),%rdi
mov    %rdi,0x8(%rsp)
lea    0xdc8(%rip),%rsi
mov    %r12,%rdx
call   1070 <inet_pton@plt>
mov    %rbp,%rdi
mov    $0x10,%esi
call   1090 <addr_mask@plt>
lea    0xdb3(%rip),%rdi
lea    0xdb3(%rip),%rdx
mov    %rbp,%rsi
call   1060 <assert_ip6@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    $0x10,%edx
call   1040 <addr_match@plt>
lea    0xda1(%rip),%rdx
mov    $0x1,%edi
mov    %eax,%esi
call   1080 <assert_int@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x10,%edx
call   1040 <addr_match@plt>
lea    0xd93(%rip),%rdx
xor    %edi,%edi
mov    %eax,%esi
call   1080 <assert_int@plt>
xor    %eax,%eax
call   1050 <fct_send@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_storage = type { i8* }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@AF_INET = global i8* null
@.str = [12 x i8] c"192.168.0.1\00"
@.str.1 = [12 x i8] c"127.168.0.1\00"
@.str.2 = [14 x i8] c"192.168.54.78\00"
@.str.3 = [10 x i8] c"255.0.0.0\00"
@.str.4 = [10 x i8] c"192.0.0.0\00"
@.str.5 = [13 x i8] c"IPv4 masking\00"
@.str.6 = [21 x i8] c"IPv4 matching subnet\00"
@.str.7 = [25 x i8] c"IPv4 non-matching subnet\00"
@.str.8 = [8 x i8] c"0.0.0.0\00"
@.str.9 = [26 x i8] c"IPv4 wildcard subnet mask\00"
@.str.10 = [30 x i8] c"IPv4 wildcard subnet matching\00"
@.str.11 = [16 x i8] c"255.255.255.255\00"
@.str.12 = [10 x i8] c"128.0.0.0\00"
@.str.13 = [13 x i8] c"CIDR mask /1\00"
@AF_INET6 = global i8* null
@.str.14 = [20 x i8] c"2001:db8::1428:57ab\00"
@.str.15 = [20 x i8] c"2002:db8::1428:57ab\00"
@.str.16 = [11 x i8] c"2001::cdef\00"
@.str.17 = [7 x i8] c"ffff::\00"
@.str.18 = [7 x i8] c"2001::\00"
@.str.19 = [13 x i8] c"IPv6 masking\00"
@.str.20 = [21 x i8] c"IPv6 matching subnet\00"
@.str.21 = [25 x i8] c"IPv6 non-matching subnet\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.sockaddr_storage
%7 = alloca %struct.sockaddr_storage
%8 = alloca %struct.sockaddr_storage
%9 = alloca %struct.sockaddr_storage
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (...) @fct_init()
%11 = load i8*, i8** @AF_INET
%12 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %6, i32 0, i32 0
store i8* %11, i8** %12
%13 = load i8*, i8** @AF_INET
%14 = bitcast %struct.sockaddr_storage* %6 to %struct.sockaddr_in*
%15 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 0
%16 = call i32 @inet_pton(i8* %13, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = load i8*, i8** @AF_INET
%18 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %7, i32 0, i32 0
store i8* %17, i8** %18
%19 = load i8*, i8** @AF_INET
%20 = bitcast %struct.sockaddr_storage* %7 to %struct.sockaddr_in*
%21 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %20, i32 0, i32 0
%22 = call i32 @inet_pton(i8* %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %21)
%23 = load i8*, i8** @AF_INET
%24 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %8, i32 0, i32 0
store i8* %23, i8** %24
%25 = load i8*, i8** @AF_INET
%26 = bitcast %struct.sockaddr_storage* %8 to %struct.sockaddr_in*
%27 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %26, i32 0, i32 0
%28 = call i32 @inet_pton(i8* %25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %27)
%29 = load i8*, i8** @AF_INET
%30 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %9, i32 0, i32 0
store i8* %29, i8** %30
%31 = load i8*, i8** @AF_INET
%32 = bitcast %struct.sockaddr_storage* %9 to %struct.sockaddr_in*
%33 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %32, i32 0, i32 0
%34 = call i32 @inet_pton(i8* %31, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32* %33)
%35 = call i32 @addr_mask(%struct.sockaddr_storage* %8, i32 8)
%36 = call i32 @assert_ip(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %struct.sockaddr_storage* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 @addr_match(%struct.sockaddr_storage* %6, %struct.sockaddr_storage* %8, i32 8)
%38 = call i32 @assert_int(i32 1, i32 %37, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%39 = call i32 @addr_match(%struct.sockaddr_storage* %7, %struct.sockaddr_storage* %8, i32 8)
%40 = call i32 @assert_int(i32 0, i32 %39, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%41 = call i32 @addr_mask(%struct.sockaddr_storage* %8, i32 0)
%42 = call i32 @assert_ip(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), %struct.sockaddr_storage* %8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
%43 = call i32 @addr_match(%struct.sockaddr_storage* %6, %struct.sockaddr_storage* %8, i32 0)
%44 = call i32 @assert_int(i32 1, i32 %43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
%45 = load i8*, i8** @AF_INET
%46 = bitcast %struct.sockaddr_storage* %6 to %struct.sockaddr_in*
%47 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %46, i32 0, i32 0
%48 = call i32 @inet_pton(i8* %45, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32* %47)
%49 = call i32 @addr_mask(%struct.sockaddr_storage* %6, i32 1)
%50 = call i32 @assert_ip(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), %struct.sockaddr_storage* %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
%51 = load i8*, i8** @AF_INET6
%52 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %6, i32 0, i32 0
store i8* %51, i8** %52
%53 = load i8*, i8** @AF_INET6
%54 = bitcast %struct.sockaddr_storage* %6 to %struct.sockaddr_in6*
%55 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %54, i32 0, i32 0
%56 = call i32 @inet_pton(i8* %53, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32* %55)
%57 = load i8*, i8** @AF_INET6
%58 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %7, i32 0, i32 0
store i8* %57, i8** %58
%59 = load i8*, i8** @AF_INET6
%60 = bitcast %struct.sockaddr_storage* %7 to %struct.sockaddr_in6*
%61 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %60, i32 0, i32 0
%62 = call i32 @inet_pton(i8* %59, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32* %61)
%63 = load i8*, i8** @AF_INET6
%64 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %8, i32 0, i32 0
store i8* %63, i8** %64
%65 = load i8*, i8** @AF_INET6
%66 = bitcast %struct.sockaddr_storage* %8 to %struct.sockaddr_in6*
%67 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %66, i32 0, i32 0
%68 = call i32 @inet_pton(i8* %65, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32* %67)
%69 = load i8*, i8** @AF_INET6
%70 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %9, i32 0, i32 0
store i8* %69, i8** %70
%71 = load i8*, i8** @AF_INET6
%72 = bitcast %struct.sockaddr_storage* %9 to %struct.sockaddr_in6*
%73 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %72, i32 0, i32 0
%74 = call i32 @inet_pton(i8* %71, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i32* %73)
%75 = call i32 @addr_mask(%struct.sockaddr_storage* %8, i32 16)
%76 = call i32 @assert_ip6(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), %struct.sockaddr_storage* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
%77 = call i32 @addr_match(%struct.sockaddr_storage* %6, %struct.sockaddr_storage* %8, i32 16)
%78 = call i32 @assert_int(i32 1, i32 %77, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%79 = call i32 @addr_match(%struct.sockaddr_storage* %7, %struct.sockaddr_storage* %8, i32 16)
%80 = call i32 @assert_int(i32 0, i32 %79, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
%81 = call i32 (...) @fct_send()
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr_storage = type { i8* }
@AF_INET = global i8* null
@.str = [12 x i8] c"192.168.0.1\00"
@.str.1 = [12 x i8] c"127.168.0.1\00"
@.str.2 = [14 x i8] c"192.168.54.78\00"
@.str.3 = [10 x i8] c"255.0.0.0\00"
@.str.4 = [10 x i8] c"192.0.0.0\00"
@.str.5 = [13 x i8] c"IPv4 masking\00"
@.str.6 = [21 x i8] c"IPv4 matching subnet\00"
@.str.7 = [25 x i8] c"IPv4 non-matching subnet\00"
@.str.8 = [8 x i8] c"0.0.0.0\00"
@.str.9 = [26 x i8] c"IPv4 wildcard subnet mask\00"
@.str.10 = [30 x i8] c"IPv4 wildcard subnet matching\00"
@.str.11 = [16 x i8] c"255.255.255.255\00"
@.str.12 = [10 x i8] c"128.0.0.0\00"
@.str.13 = [13 x i8] c"CIDR mask /1\00"
@AF_INET6 = global i8* null
@.str.14 = [20 x i8] c"2001:db8::1428:57ab\00"
@.str.15 = [20 x i8] c"2002:db8::1428:57ab\00"
@.str.16 = [11 x i8] c"2001::cdef\00"
@.str.17 = [7 x i8] c"ffff::\00"
@.str.18 = [7 x i8] c"2001::\00"
@.str.19 = [13 x i8] c"IPv6 masking\00"
@.str.20 = [21 x i8] c"IPv6 matching subnet\00"
@.str.21 = [25 x i8] c"IPv6 non-matching subnet\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr_storage
%4 = alloca %struct.sockaddr_storage
%5 = alloca %struct.sockaddr_storage
%6 = alloca %struct.sockaddr_storage
%7 = tail call i32 (...) @fct_init()
%8 = bitcast %struct.sockaddr_storage* %3 to i8*
%9 = load i8*, i8** @AF_INET
%10 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %3, i64 0, i32 0
store i8* %9, i8** %10
%11 = bitcast %struct.sockaddr_storage* %3 to i32*
%12 = call i32 @inet_pton(i8* %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = bitcast %struct.sockaddr_storage* %4 to i8*
%14 = load i8*, i8** @AF_INET
%15 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %4, i64 0, i32 0
store i8* %14, i8** %15
%16 = bitcast %struct.sockaddr_storage* %4 to i32*
%17 = call i32 @inet_pton(i8* %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32* %16)
%18 = bitcast %struct.sockaddr_storage* %5 to i8*
%19 = load i8*, i8** @AF_INET
%20 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %5, i64 0, i32 0
store i8* %19, i8** %20
%21 = bitcast %struct.sockaddr_storage* %5 to i32*
%22 = call i32 @inet_pton(i8* %19, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32* %21)
%23 = bitcast %struct.sockaddr_storage* %6 to i8*
%24 = load i8*, i8** @AF_INET
%25 = getelementptr inbounds %struct.sockaddr_storage, %struct.sockaddr_storage* %6, i64 0, i32 0
store i8* %24, i8** %25
%26 = bitcast %struct.sockaddr_storage* %6 to i32*
%27 = call i32 @inet_pton(i8* %24, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32* %26)
%28 = call i32 @addr_mask(%struct.sockaddr_storage* %5, i32 8)
%29 = call i32 @assert_ip(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %struct.sockaddr_storage* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 @addr_match(%struct.sockaddr_storage* %3, %struct.sockaddr_storage* %5, i32 8)
%31 = call i32 @assert_int(i32 1, i32 %30, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%32 = call i32 @addr_match(%struct.sockaddr_storage* %4, %struct.sockaddr_storage* %5, i32 8)
%33 = call i32 @assert_int(i32 0, i32 %32, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%34 = call i32 @addr_mask(%struct.sockaddr_storage* %5, i32 0)
%35 = call i32 @assert_ip(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), %struct.sockaddr_storage* %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
%36 = call i32 @addr_match(%struct.sockaddr_storage* %3, %struct.sockaddr_storage* %5, i32 0)
%37 = call i32 @assert_int(i32 1, i32 %36, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
%38 = load i8*, i8** @AF_INET
%39 = call i32 @inet_pton(i8* %38, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32* %11)
%40 = call i32 @addr_mask(%struct.sockaddr_storage* %3, i32 1)
%41 = call i32 @assert_ip(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), %struct.sockaddr_storage* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
%42 = load i8*, i8** @AF_INET6
store i8* %42, i8** %10
%43 = call i32 @inet_pton(i8* %42, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32* %11)
%44 = load i8*, i8** @AF_INET6
store i8* %44, i8** %15
%45 = call i32 @inet_pton(i8* %44, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32* %16)
%46 = load i8*, i8** @AF_INET6
store i8* %46, i8** %20
%47 = call i32 @inet_pton(i8* %46, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32* %21)
%48 = load i8*, i8** @AF_INET6
store i8* %48, i8** %25
%49 = call i32 @inet_pton(i8* %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i32* %26)
%50 = call i32 @addr_mask(%struct.sockaddr_storage* %5, i32 16)
%51 = call i32 @assert_ip6(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0), %struct.sockaddr_storage* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
%52 = call i32 @addr_match(%struct.sockaddr_storage* %3, %struct.sockaddr_storage* %5, i32 16)
%53 = call i32 @assert_int(i32 1, i32 %52, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%54 = call i32 @addr_match(%struct.sockaddr_storage* %4, %struct.sockaddr_storage* %5, i32 16)
%55 = call i32 @assert_int(i32 0, i32 %54, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
%56 = call i32 (...) @fct_send()
ret i32 0
}