#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*/ is_valid_ipv4(char *);
int /*<<< orphan*/ is_valid_ipv6(char *);
void test_() {
  is_valid_ipv4("69.89.31.226");
  is_valid_ipv4("98.139.180.149");
  is_valid_ipv4("192.168.1.98");
  is_valid_ipv4("127.0.0.0");
  is_valid_ipv4("0.0.0.0");
  is_valid_ipv4("");
  is_valid_ipv6("2002:4559:1FE2::4559:1FE2");
  is_valid_ipv6("fe80::9e2a:70ff:fe53:c949/64");
  is_valid_ipv6("");
}


x86 assembly (clang, -O0):
<test_>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xed6(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xed9(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xeda(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xed8(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xed3(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xec8(%rip),%rdi
call   1030 <is_valid_ipv6@plt>
lea    0xed6(%rip),%rdi
call   1030 <is_valid_ipv6@plt>
lea    0xeaf(%rip),%rdi
call   1030 <is_valid_ipv6@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xed9(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xedc(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xedd(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xedb(%rip),%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xed6(%rip),%rbx
mov    %rbx,%rdi
call   1040 <is_valid_ipv4@plt>
lea    0xec8(%rip),%rdi
call   1030 <is_valid_ipv6@plt>
lea    0xed6(%rip),%rdi
call   1030 <is_valid_ipv6@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <is_valid_ipv6@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"69.89.31.226\00"
@.str.1 = [15 x i8] c"98.139.180.149\00"
@.str.2 = [13 x i8] c"192.168.1.98\00"
@.str.3 = [10 x i8] c"127.0.0.0\00"
@.str.4 = [8 x i8] c"0.0.0.0\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [26 x i8] c"2002:4559:1FE2::4559:1FE2\00"
@.str.7 = [29 x i8] c"fe80::9e2a:70ff:fe53:c949/64\00"
define void @test_() {
%1 = call i32 @is_valid_ipv4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @is_valid_ipv4(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @is_valid_ipv4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @is_valid_ipv4(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @is_valid_ipv4(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @is_valid_ipv4(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @is_valid_ipv6(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @is_valid_ipv6(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @is_valid_ipv6(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"69.89.31.226\00"
@.str.1 = [15 x i8] c"98.139.180.149\00"
@.str.2 = [13 x i8] c"192.168.1.98\00"
@.str.3 = [10 x i8] c"127.0.0.0\00"
@.str.4 = [8 x i8] c"0.0.0.0\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [26 x i8] c"2002:4559:1FE2::4559:1FE2\00"
@.str.7 = [29 x i8] c"fe80::9e2a:70ff:fe53:c949/64\00"
define void @test_() {
%1 = tail call i32 @is_valid_ipv4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @is_valid_ipv4(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @is_valid_ipv4(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @is_valid_ipv4(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @is_valid_ipv4(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @is_valid_ipv4(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @is_valid_ipv6(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @is_valid_ipv6(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @is_valid_ipv6(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
ret void
}