Created
February 20, 2020 10:41
-
-
Save arichardson/0aa805540dc2b51443b0728b3622017a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'reproducer.c' | |
source_filename = "reproducer.c" | |
target datalayout = "E-m:e-pf200:128:128:128:64-i8:8:32-i16:16:32-i64:64-n32:64-S128-A200-P200-G200" | |
target triple = "mips64c128-unknown-freebsd13.0-purecap" | |
%struct.explore = type { i32, i32, i32, i32 } | |
%struct._ns_dtab = type { i8 addrspace(200)*, i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)*, i8 addrspace(200)* } | |
%struct.addrinfo = type { i32, i32, i32, i32, i32, i8 addrspace(200)*, %struct.sockaddr addrspace(200)*, %struct.addrinfo addrspace(200)* } | |
%struct.sockaddr = type { i8, i8, [14 x i8] } | |
%struct.in6_ndireq = type { [16 x i8], %struct.nd_ifinfo } | |
%struct.nd_ifinfo = type { i32, i32, i32, i32, i32, i32, i32, i8, i8, [8 x i8], [8 x i8], [8 x i8] } | |
%struct.ifaddrs = type { %struct.ifaddrs addrspace(200)*, i8 addrspace(200)*, i32, %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)*, i8 addrspace(200)* } | |
%struct.afd = type { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32, [12 x i8] } | |
%struct._ns_src = type { i8 addrspace(200)*, i32, [12 x i8] } | |
%struct.in6_addr = type { %union.anon } | |
%union.anon = type { [4 x i32] } | |
%struct.servent = type { i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)*, i32, i8 addrspace(200)* } | |
%struct.sockaddr_in = type { i8, i8, i16, %struct.in_addr, [8 x i8] } | |
%struct.in_addr = type { i32 } | |
%struct.sockaddr_in6 = type { i8, i8, i16, i32, %struct.in6_addr, i32 } | |
%struct.__sFILE = type { i8 addrspace(200)*, i32, i32, i16, i16, %struct.__sbuf, i32, i8 addrspace(200)*, i32 (i8 addrspace(200)*) addrspace(200)*, i32 (i8 addrspace(200)*, i8 addrspace(200)*, i32) addrspace(200)*, i64 (i8 addrspace(200)*, i64, i32) addrspace(200)*, i32 (i8 addrspace(200)*, i8 addrspace(200)*, i32) addrspace(200)*, %struct.__sbuf, i8 addrspace(200)*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64, %struct.pthread_mutex addrspace(200)*, %struct.pthread addrspace(200)*, i32, i32, %union.__mbstate_t, i32, [12 x i8] } | |
%struct.__sbuf = type { i8 addrspace(200)*, i32, [12 x i8] } | |
%struct.pthread_mutex = type opaque | |
%struct.pthread = type opaque | |
%union.__mbstate_t = type { i8 addrspace(200)*, [112 x i8] } | |
%struct.res_target = type { %struct.res_target addrspace(200)*, i8 addrspace(200)*, i32, i32, i8 addrspace(200)*, i32, i32, [8 x i8] } | |
%struct.__res_state = type { i32, i32, i64, i32, [3 x %struct.sockaddr_in], i16, [7 x i8 addrspace(200)*], [256 x i8], i64, i8, [3 x i8], [10 x %struct.anon], i32 (%struct.sockaddr addrspace(200)* addrspace(200)*, i8 addrspace(200)* addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32 addrspace(200)*) addrspace(200)*, i32 (%struct.sockaddr addrspace(200)*, i8 addrspace(200)*, i32, i8 addrspace(200)*, i32, i32 addrspace(200)*) addrspace(200)*, i32, i32, i32, i32, %union.anon.0, i8 addrspace(200)* } | |
%struct.anon = type { %struct.in_addr, i32 } | |
%union.anon.0 = type { %struct.anon.1 } | |
%struct.anon.1 = type { i16, [3 x i16], [3 x i32], %struct.__res_state_ext addrspace(200)* } | |
%struct.__res_state_ext = type opaque | |
%union.querybuf = type { [65536 x i8] } | |
%struct.HEADER = type { [12 x i8] } | |
@explore = internal unnamed_addr addrspace(200) constant [16 x %struct.explore] [%struct.explore { i32 28, i32 2, i32 17, i32 7 }, %struct.explore { i32 28, i32 1, i32 6, i32 7 }, %struct.explore { i32 28, i32 1, i32 132, i32 3 }, %struct.explore { i32 28, i32 5, i32 132, i32 7 }, %struct.explore { i32 28, i32 2, i32 136, i32 3 }, %struct.explore { i32 28, i32 3, i32 0, i32 5 }, %struct.explore { i32 2, i32 2, i32 17, i32 7 }, %struct.explore { i32 2, i32 1, i32 6, i32 7 }, %struct.explore { i32 2, i32 1, i32 132, i32 3 }, %struct.explore { i32 2, i32 5, i32 132, i32 7 }, %struct.explore { i32 2, i32 2, i32 136, i32 3 }, %struct.explore { i32 2, i32 3, i32 0, i32 5 }, %struct.explore { i32 1, i32 2, i32 0, i32 7 }, %struct.explore { i32 1, i32 1, i32 0, i32 7 }, %struct.explore { i32 1, i32 5, i32 0, i32 7 }, %struct.explore { i32 -1, i32 0, i32 0, i32 0 }], align 4 | |
@.str = private unnamed_addr addrspace(200) constant [3 x i8] c"22\00", align 1 | |
@in6_addrany = internal addrspace(200) constant [16 x i8] zeroinitializer, align 1 | |
@in6_loopback = internal addrspace(200) constant [16 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01", align 1 | |
@in_addrany = internal addrspace(200) constant [4 x i8] zeroinitializer, align 1 | |
@in_loopback = internal addrspace(200) constant [4 x i8] c"\7F\00\00\01", align 1 | |
@afdl = internal addrspace(200) constant [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] [{ i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } { i32 28, i32 16, i32 28, i32 8, i8 addrspace(200)* getelementptr inbounds ([16 x i8], [16 x i8] addrspace(200)* @in6_addrany, i32 0, i32 0), i8 addrspace(200)* getelementptr inbounds ([16 x i8], [16 x i8] addrspace(200)* @in6_loopback, i32 0, i32 0), i32 1 }, { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } { i32 2, i32 4, i32 16, i32 4, i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @in_addrany, i32 0, i32 0), i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @in_loopback, i32 0, i32 0), i32 0 }, { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } { i32 1, i32 104, i32 106, i32 2, i8 addrspace(200)* null, i8 addrspace(200)* null, i32 0 }, { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } zeroinitializer], align 16 | |
@.str.4 = private unnamed_addr addrspace(200) constant [4 x i8] c"udp\00", align 1 | |
@.str.5 = private unnamed_addr addrspace(200) constant [4 x i8] c"tcp\00", align 1 | |
@.str.6 = private unnamed_addr addrspace(200) constant [5 x i8] c"sctp\00", align 1 | |
@.str.7 = private unnamed_addr addrspace(200) constant [8 x i8] c"udplite\00", align 1 | |
@explore_fqdn.dtab = internal addrspace(200) constant [4 x %struct._ns_dtab] [%struct._ns_dtab { i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.8, i32 0, i32 0), i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)* @_files_getaddrinfo, i8 addrspace(200)* null }, %struct._ns_dtab { i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.9, i32 0, i32 0), i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)* @_dns_getaddrinfo, i8 addrspace(200)* null }, %struct._ns_dtab { i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.10, i32 0, i32 0), i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)* @_yp_getaddrinfo, i8 addrspace(200)* null }, %struct._ns_dtab zeroinitializer], align 16 | |
@.str.8 = private unnamed_addr addrspace(200) constant [6 x i8] c"files\00", align 1 | |
@.str.9 = private unnamed_addr addrspace(200) constant [4 x i8] c"dns\00", align 1 | |
@.str.10 = private unnamed_addr addrspace(200) constant [4 x i8] c"nis\00", align 1 | |
@.str.11 = private unnamed_addr addrspace(200) constant [6 x i8] c"hosts\00", align 1 | |
@.str.12 = private unnamed_addr addrspace(200) constant [12 x i8] c"getaddrinfo\00", align 1 | |
@.str.13 = private unnamed_addr addrspace(200) constant [11 x i8] c"/etc/hosts\00", align 1 | |
@.str.14 = private unnamed_addr addrspace(200) constant [3 x i8] c"re\00", align 1 | |
@.str.15 = private unnamed_addr addrspace(200) constant [3 x i8] c"#\0A\00", align 1 | |
@.str.16 = private unnamed_addr addrspace(200) constant [3 x i8] c" \09\00", align 1 | |
@.str.17 = private unnamed_addr addrspace(200) constant [2 x i8] c"0\00", align 1 | |
@.str.19 = private unnamed_addr addrspace(200) constant [6 x i8] c"%s.%s\00", align 1 | |
@.str.20 = private unnamed_addr addrspace(200) constant [15 x i8] c"ipnodes.byname\00", align 1 | |
@.str.21 = private unnamed_addr addrspace(200) constant [13 x i8] c"hosts.byname\00", align 1 | |
@default_dns_files = internal addrspace(200) constant [3 x { i8 addrspace(200)*, i32 }] [{ i8 addrspace(200)*, i32 } { i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.8, i32 0, i32 0), i32 1 }, { i8 addrspace(200)*, i32 } { i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.9, i32 0, i32 0), i32 1 }, { i8 addrspace(200)*, i32 } zeroinitializer], align 16 | |
@str = private unnamed_addr addrspace(200) constant [23 x i8] c"my_getaddrinfo worked!\00", align 1 | |
@str.23 = private unnamed_addr addrspace(200) constant [23 x i8] c"my_getaddrinfo failed!\00", align 1 | |
@str.24 = private unnamed_addr addrspace(200) constant [35 x i8] c";; res_nquery: retry without EDNS0\00", align 1 | |
; Function Attrs: nounwind uwtable | |
define void @_map_v4v6_address(i8 addrspace(200)* nocapture readonly %src, i8 addrspace(200)* nocapture %dst) local_unnamed_addr addrspace(200) #0 { | |
entry: | |
%arrayidx = getelementptr inbounds i8, i8 addrspace(200)* %dst, i64 12 | |
%0 = bitcast i8 addrspace(200)* %src to i32 addrspace(200)* | |
%1 = bitcast i8 addrspace(200)* %arrayidx to i32 addrspace(200)* | |
%2 = load i32, i32 addrspace(200)* %0, align 1 | |
store i32 %2, i32 addrspace(200)* %1, align 1 | |
%arrayidx1 = getelementptr inbounds i8, i8 addrspace(200)* %dst, i64 10 | |
%3 = bitcast i8 addrspace(200)* %arrayidx1 to i16 addrspace(200)* | |
store i16 -1, i16 addrspace(200)* %3, align 1 | |
tail call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 1 dereferenceable(10) %dst, i8 0, i64 10, i1 false) | |
ret void | |
} | |
; Function Attrs: argmemonly nounwind willreturn writeonly | |
declare void @llvm.memset.p200i8.i64(i8 addrspace(200)* nocapture writeonly, i8, i64, i1 immarg) addrspace(200) #1 | |
; Function Attrs: nofree nounwind uwtable | |
define void @freeaddrinfo(%struct.addrinfo addrspace(200)* %ai) local_unnamed_addr addrspace(200) #2 { | |
entry: | |
%cmp5 = icmp eq %struct.addrinfo addrspace(200)* %ai, null | |
br i1 %cmp5, label %while.end, label %while.body | |
while.body: ; preds = %entry, %while.body | |
%ai.addr.06 = phi %struct.addrinfo addrspace(200)* [ %0, %while.body ], [ %ai, %entry ] | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06, i64 0, i32 7 | |
%0 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%ai_canonname = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06, i64 0, i32 5 | |
%1 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa !9 | |
tail call void @free(i8 addrspace(200)* %1) | |
%2 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06 to i8 addrspace(200)* | |
tail call void @free(i8 addrspace(200)* nonnull %2) | |
%cmp = icmp eq %struct.addrinfo addrspace(200)* %0, null | |
br i1 %cmp, label %while.end, label %while.body | |
while.end: ; preds = %while.body, %entry | |
ret void | |
} | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.lifetime.start.p200i8(i64 immarg, i8 addrspace(200)* nocapture) addrspace(200) #3 | |
; Function Attrs: nofree nounwind | |
declare void @free(i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.lifetime.end.p200i8(i64 immarg, i8 addrspace(200)* nocapture) addrspace(200) #3 | |
; Function Attrs: nounwind uwtable | |
define signext i32 @my_getaddrinfo(i8 addrspace(200)* %hostname, i8 addrspace(200)* %servname, %struct.addrinfo addrspace(200)* readonly %hints, %struct.addrinfo addrspace(200)* addrspace(200)* nocapture %res) local_unnamed_addr addrspace(200) #0 { | |
entry: | |
%result.i = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%nd.i.i = alloca %struct.in6_ndireq, align 4, addrspace(200) | |
%ifaddrs.i = alloca %struct.ifaddrs addrspace(200)*, align 16, addrspace(200) | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ai = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ai0.sroa.0 = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%tmpcast = bitcast i8 addrspace(200)* addrspace(200)* %ai0.sroa.0 to { i32, i32, i32, i32 } addrspace(200)* | |
%ai0.sroa.16 = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%afailist = alloca [4 x %struct.addrinfo addrspace(200)*], align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%ai0.sroa.0.0..sroa_cast654 = bitcast i8 addrspace(200)* addrspace(200)* %ai0.sroa.0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.0.0..sroa_cast654) | |
%ai0.sroa.16.0..sroa_idx646 = bitcast i8 addrspace(200)* addrspace(200)* %ai0.sroa.16 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.16.0..sroa_idx646) | |
%2 = bitcast [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 64, i8 addrspace(200)* nonnull %2) #18 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 0, i64 32, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(64) %2, i8 0, i64 64, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 0 | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 1 | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 2 | |
%ai_protocol = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 3 | |
%ai_addrlen = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 4 | |
%ai_canonname = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 5 | |
%ai_addr = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 6 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 7 | |
%cmp = icmp eq i8 addrspace(200)* %hostname, null | |
%cmp1 = icmp eq i8 addrspace(200)* %servname, null | |
%or.cond = and i1 %cmp, %cmp1 | |
%3 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(20) %3, i8 0, i64 20, i1 false) | |
%4 = bitcast i8 addrspace(200)* addrspace(200)* %ai_canonname to i8 addrspace(200)* | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(48) %4, i8 0, i64 48, i1 false) | |
br i1 %or.cond, label %cleanup, label %if.end | |
if.end: ; preds = %entry | |
%tobool = icmp eq %struct.addrinfo addrspace(200)* %hints, null | |
br i1 %tobool, label %if.end83, label %if.then2 | |
if.then2: ; preds = %if.end | |
%ai_addrlen3 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 4 | |
%5 = load i32, i32 addrspace(200)* %ai_addrlen3, align 16, !tbaa !11 | |
%tobool4 = icmp eq i32 %5, 0 | |
br i1 %tobool4, label %lor.lhs.false, label %if.end298 | |
lor.lhs.false: ; preds = %if.then2 | |
%ai_canonname5 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 5 | |
%6 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname5, align 16, !tbaa !9 | |
%tobool6 = icmp eq i8 addrspace(200)* %6, null | |
br i1 %tobool6, label %lor.lhs.false7, label %if.end298 | |
lor.lhs.false7: ; preds = %lor.lhs.false | |
%ai_addr8 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 6 | |
%7 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr8, align 16, !tbaa !12 | |
%tobool9 = icmp eq %struct.sockaddr addrspace(200)* %7, null | |
br i1 %tobool9, label %lor.lhs.false10, label %if.end298 | |
lor.lhs.false10: ; preds = %lor.lhs.false7 | |
%ai_next11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 7 | |
%8 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next11, align 16, !tbaa !3 | |
%tobool12 = icmp eq %struct.addrinfo addrspace(200)* %8, null | |
br i1 %tobool12, label %if.end14, label %if.end298 | |
if.end14: ; preds = %lor.lhs.false10 | |
%ai_flags15 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 0 | |
%9 = load i32, i32 addrspace(200)* %ai_flags15, align 16, !tbaa !13 | |
%and = and i32 %9, -3344 | |
%tobool16 = icmp eq i32 %and, 0 | |
br i1 %tobool16, label %if.end21, label %if.end298 | |
if.end21: ; preds = %if.end14 | |
%ai_family22 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 1 | |
%10 = load i32, i32 addrspace(200)* %ai_family22, align 4, !tbaa !14 | |
switch i32 %10, label %if.end298 [ | |
i32 0, label %sw.epilog | |
i32 1, label %sw.epilog | |
i32 2, label %sw.epilog | |
i32 28, label %sw.epilog | |
] | |
sw.epilog: ; preds = %if.end21, %if.end21, %if.end21, %if.end21 | |
%11 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %11, i64 80, i1 false) #19 | |
%12 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%cmp27 = icmp eq i32 %12, 0 | |
%13 = load i32, i32 addrspace(200)* %ai_protocol, align 4 | |
%cmp30 = icmp eq i32 %13, 0 | |
%or.cond483 = or i1 %cmp27, %cmp30 | |
br i1 %or.cond483, label %if.end83, label %for.cond.preheader | |
for.cond.preheader: ; preds = %sw.epilog | |
%14 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp41 = icmp eq i32 %14, 0 | |
br label %for.body | |
for.body: ; preds = %for.cond.preheader, %for.inc | |
%15 = phi i32 [ 28, %for.cond.preheader ], [ %21, %for.inc ] | |
%ex.0702 = phi %struct.explore addrspace(200)* [ getelementptr inbounds ([16 x %struct.explore], [16 x %struct.explore] addrspace(200)* @explore, i64 0, i64 0), %for.cond.preheader ], [ %incdec.ptr, %for.inc ] | |
%cmp35 = icmp eq i32 %14, %15 | |
br i1 %cmp35, label %if.end46, label %lor.lhs.false36 | |
lor.lhs.false36: ; preds = %for.body | |
%e_wild = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 3 | |
%16 = load i32, i32 addrspace(200)* %e_wild, align 4, !tbaa !16 | |
%and37 = and i32 %16, 1 | |
%tobool38 = icmp ne i32 %and37, 0 | |
%cmp44 = icmp eq i32 %15, 0 | |
%or.cond484 = or i1 %cmp44, %cmp41 | |
%or.cond706 = and i1 %tobool38, %or.cond484 | |
br i1 %or.cond706, label %if.end46, label %for.inc | |
if.end46: ; preds = %lor.lhs.false36, %for.body | |
%e_socktype = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 1 | |
%17 = load i32, i32 addrspace(200)* %e_socktype, align 4, !tbaa !18 | |
%cmp48 = icmp eq i32 %12, %17 | |
br i1 %cmp48, label %if.end60, label %lor.lhs.false49 | |
lor.lhs.false49: ; preds = %if.end46 | |
%e_wild50 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 3 | |
%18 = load i32, i32 addrspace(200)* %e_wild50, align 4, !tbaa !16 | |
%and51 = and i32 %18, 2 | |
%tobool52 = icmp ne i32 %and51, 0 | |
%cmp58 = icmp eq i32 %17, 0 | |
%or.cond676 = and i1 %cmp58, %tobool52 | |
br i1 %or.cond676, label %if.end60, label %for.inc | |
if.end60: ; preds = %lor.lhs.false49, %if.end46 | |
%e_protocol = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 2 | |
%19 = load i32, i32 addrspace(200)* %e_protocol, align 4, !tbaa !19 | |
%cmp62 = icmp eq i32 %13, %19 | |
br i1 %cmp62, label %if.end83, label %lor.lhs.false63 | |
lor.lhs.false63: ; preds = %if.end60 | |
%e_wild64 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 3 | |
%20 = load i32, i32 addrspace(200)* %e_wild64, align 4, !tbaa !16 | |
%and65 = and i32 %20, 4 | |
%tobool66 = icmp ne i32 %and65, 0 | |
%cmp72 = icmp eq i32 %19, 0 | |
%or.cond677 = and i1 %cmp72, %tobool66 | |
br i1 %or.cond677, label %if.end83, label %for.inc | |
for.inc: ; preds = %lor.lhs.false36, %lor.lhs.false63, %lor.lhs.false49 | |
%incdec.ptr = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 1 | |
%e_af = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %incdec.ptr, i64 0, i32 0 | |
%21 = load i32, i32 addrspace(200)* %e_af, align 4, !tbaa !20 | |
%cmp32 = icmp sgt i32 %21, -1 | |
br i1 %cmp32, label %for.body, label %if.end298 | |
if.end83: ; preds = %lor.lhs.false63, %if.end60, %sw.epilog, %if.end | |
%22 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and85 = and i32 %22, 2304 | |
switch i32 %and85, label %sw.epilog96thread-pre-split [ | |
i32 2048, label %sw.bb86 | |
i32 2304, label %sw.bb86 | |
i32 256, label %sw.bb93 | |
] | |
sw.bb86: ; preds = %if.end83, %if.end83 | |
%23 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp88 = icmp eq i32 %23, 28 | |
br i1 %cmp88, label %if.then108, label %if.then89 | |
if.then89: ; preds = %sw.bb86 | |
%and91 = and i32 %22, -2305 | |
store i32 %and91, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
br label %sw.epilog96 | |
sw.bb93: ; preds = %if.end83 | |
%and95 = and i32 %22, -2305 | |
store i32 %and95, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
br label %sw.epilog96thread-pre-split | |
sw.epilog96thread-pre-split: ; preds = %sw.bb93, %if.end83 | |
%.pr = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
br label %sw.epilog96 | |
sw.epilog96: ; preds = %sw.epilog96thread-pre-split, %if.then89 | |
%24 = phi i32 [ %.pr, %sw.epilog96thread-pre-split ], [ %23, %if.then89 ] | |
switch i32 %24, label %if.end117 [ | |
i32 2, label %if.then108 | |
i32 0, label %if.then108 | |
i32 28, label %if.then108 | |
] | |
if.then108: ; preds = %sw.bb86, %sw.epilog96, %sw.epilog96, %sw.epilog96 | |
%25 = phi i32 [ %24, %sw.epilog96 ], [ %24, %sw.epilog96 ], [ %24, %sw.epilog96 ], [ 28, %sw.bb86 ] | |
%26 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* addrspace(200)* | |
%27 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %26, align 16 | |
store i8 addrspace(200)* %27, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
%28 = bitcast i32 addrspace(200)* %ai_addrlen to i8 addrspace(200)* addrspace(200)* | |
%29 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %28, align 16 | |
store i8 addrspace(200)* %29, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
%ai0.sroa.22.0.copyload585 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
%ai0.sroa.28.0.copyload602 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
%ai0.sroa.34.0.copyload619 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%cmp110 = icmp eq i32 %25, 0 | |
br i1 %cmp110, label %if.then111, label %if.end113 | |
if.then111: ; preds = %if.then108 | |
store i32 28, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
br label %if.end113 | |
if.end113: ; preds = %if.then111, %if.then108 | |
%call.i = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %ai, i8 addrspace(200)* %servname, i32 signext 1) #18 | |
%tobool114 = icmp eq i32 %call.i, 0 | |
br i1 %tobool114, label %if.end116, label %if.end298 | |
if.end116: ; preds = %if.end113 | |
%30 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
store i8 addrspace(200)* %30, i8 addrspace(200)* addrspace(200)* %26, align 16 | |
%31 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
store i8 addrspace(200)* %31, i8 addrspace(200)* addrspace(200)* %28, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload585, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload602, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload619, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
br label %if.end117 | |
if.end117: ; preds = %sw.epilog96, %if.end116 | |
%32 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* addrspace(200)* | |
%33 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
store i8 addrspace(200)* %33, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
%34 = bitcast i32 addrspace(200)* %ai_addrlen to i8 addrspace(200)* addrspace(200)* | |
%35 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %35, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
%ai0.sroa.22.0.copyload587 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
%ai0.sroa.28.0.copyload604 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
%ai0.sroa.34.0.copyload621 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
br label %if.end137 | |
if.end137: ; preds = %if.end117, %for.inc152 | |
%found.0700 = phi i32 [ 0, %if.end117 ], [ %spec.select, %for.inc152 ] | |
%afd.0698 = phi %struct.afd addrspace(200)* [ bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to %struct.afd addrspace(200)*), %if.end117 ], [ %incdec.ptr153, %for.inc152 ] | |
store i8 addrspace(200)* %33, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
store i8 addrspace(200)* %35, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload587, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload604, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload621, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
br i1 %cmp, label %if.then139, label %for.inc152 | |
if.then139: ; preds = %if.end137 | |
%36 = bitcast %struct.afd addrspace(200)* %afd.0698 to i8 addrspace(200)* | |
%37 = tail call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* %36, i8 addrspace(200)* bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to i8 addrspace(200)*)) | |
%sub.ptr.div = ashr exact i64 %37, 6 | |
%arrayidx = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 %sub.ptr.div | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx, align 16, !tbaa !10 | |
%38 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp.i = icmp eq i32 %38, 1 | |
br i1 %cmp.i, label %for.inc152, label %if.end.i | |
if.end.i: ; preds = %if.then139 | |
%call.i492 = tail call signext i32 @_socket(i32 signext %38, i32 signext 268435458, i32 signext 0) #18 | |
%cmp2.i = icmp slt i32 %call.i492, 0 | |
br i1 %cmp2.i, label %if.then3.i, label %if.else.i | |
if.then3.i: ; preds = %if.end.i | |
%call4.i = tail call i32 addrspace(200)* @__error() #18 | |
%39 = load i32, i32 addrspace(200)* %call4.i, align 4, !tbaa !22 | |
%cmp5.i = icmp eq i32 %39, 24 | |
br i1 %cmp5.i, label %if.end9.i, label %for.inc152 | |
if.else.i: ; preds = %if.end.i | |
%call8.i = tail call signext i32 @_close(i32 signext %call.i492) #18 | |
br label %if.end9.i | |
if.end9.i: ; preds = %if.else.i, %if.then3.i | |
%40 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%call11.i = tail call fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %40) #18 | |
%cmp12.i = icmp eq %struct.afd addrspace(200)* %call11.i, null | |
br i1 %cmp12.i, label %for.inc152, label %if.end14.i | |
if.end14.i: ; preds = %if.end9.i | |
%41 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and.i = and i32 %41, 1 | |
%tobool.i = icmp eq i32 %and.i, 0 | |
br i1 %tobool.i, label %do.body28.i, label %do.body.i | |
do.body.i: ; preds = %if.end14.i | |
%a_addrany.i = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %call11.i, i64 0, i32 4 | |
%42 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %a_addrany.i, align 16, !tbaa !23 | |
%call16.i = call fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.afd addrspace(200)* nonnull %call11.i, i8 addrspace(200)* %42) #18 | |
%cmp17.i = icmp eq %struct.addrinfo addrspace(200)* %call16.i, null | |
br i1 %cmp17.i, label %if.end298, label %do.body20.i | |
do.body20.i: ; preds = %do.body.i | |
%call21.i = tail call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %call16.i, i8 addrspace(200)* %servname, i32 signext 0) #18 | |
%cmp22.i = icmp eq i32 %call21.i, 0 | |
br i1 %cmp22.i, label %if.end42.i, label %while.body.preheader.i.i | |
do.body28.i: ; preds = %if.end14.i | |
%a_loopback.i = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %call11.i, i64 0, i32 5 | |
%43 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %a_loopback.i, align 16, !tbaa !25 | |
%call29.i = call fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.afd addrspace(200)* nonnull %call11.i, i8 addrspace(200)* %43) #18 | |
%cmp30.i = icmp eq %struct.addrinfo addrspace(200)* %call29.i, null | |
br i1 %cmp30.i, label %if.end298, label %do.body35.i | |
do.body35.i: ; preds = %do.body28.i | |
%call36.i = tail call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %call29.i, i8 addrspace(200)* %servname, i32 signext 0) #18 | |
%cmp37.i = icmp eq i32 %call36.i, 0 | |
br i1 %cmp37.i, label %if.end42.i, label %while.body.preheader.i.i | |
if.end42.i: ; preds = %do.body35.i, %do.body20.i | |
%ai.0.i = phi %struct.addrinfo addrspace(200)* [ %call16.i, %do.body20.i ], [ %call29.i, %do.body35.i ] | |
store %struct.addrinfo addrspace(200)* %ai.0.i, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx, align 16, !tbaa !10 | |
br label %for.inc152 | |
while.body.preheader.i.i: ; preds = %do.body35.i, %do.body20.i | |
%ai.1.i = phi %struct.addrinfo addrspace(200)* [ %call16.i, %do.body20.i ], [ %call29.i, %do.body35.i ] | |
%error.0.i = phi i32 [ %call21.i, %do.body20.i ], [ %call36.i, %do.body35.i ] | |
br label %while.body.i.i | |
while.body.i.i: ; preds = %while.body.i.i, %while.body.preheader.i.i | |
%ai.addr.06.i.i = phi %struct.addrinfo addrspace(200)* [ %44, %while.body.i.i ], [ %ai.1.i, %while.body.preheader.i.i ] | |
%ai_next.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 7 | |
%44 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i.i, align 16, !tbaa !3 | |
%ai_canonname.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 5 | |
%45 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i.i, align 16, !tbaa !9 | |
tail call void @free(i8 addrspace(200)* %45) #18 | |
%46 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i.i to i8 addrspace(200)* | |
tail call void @free(i8 addrspace(200)* nonnull %46) #18 | |
%cmp.i.i = icmp eq %struct.addrinfo addrspace(200)* %44, null | |
br i1 %cmp.i.i, label %explore_null.exit, label %while.body.i.i | |
explore_null.exit: ; preds = %while.body.i.i | |
%cmp141 = icmp eq i32 %error.0.i, 0 | |
br i1 %cmp141, label %for.inc152, label %if.end298 | |
for.inc152: ; preds = %if.end137, %explore_null.exit, %if.end42.i, %if.then139, %if.then3.i, %if.end9.i | |
%47 = bitcast %struct.afd addrspace(200)* %afd.0698 to i8 addrspace(200)* | |
%48 = tail call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* %47, i8 addrspace(200)* bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to i8 addrspace(200)*)) | |
%sub.ptr.div147 = ashr exact i64 %48, 6 | |
%arrayidx148 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 %sub.ptr.div147 | |
%49 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx148, align 16, !tbaa !10 | |
%tobool149 = icmp ne %struct.addrinfo addrspace(200)* %49, null | |
%inc = zext i1 %tobool149 to i32 | |
%spec.select = add nuw nsw i32 %found.0700, %inc | |
%incdec.ptr153 = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.0698, i64 1 | |
%a_af = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %incdec.ptr153, i64 0, i32 0 | |
%50 = load i32, i32 addrspace(200)* %a_af, align 16, !tbaa !26 | |
%tobool119 = icmp eq i32 %50, 0 | |
br i1 %tobool119, label %for.end154, label %if.end137 | |
for.end154: ; preds = %for.inc152 | |
%tobool155 = icmp eq i32 %spec.select, 0 | |
br i1 %tobool155, label %if.end157, label %globcopy | |
if.end157: ; preds = %for.end154 | |
br i1 %cmp, label %if.end298, label %if.end163 | |
if.end163: ; preds = %if.end157 | |
%51 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and165 = and i32 %51, 4 | |
%tobool166 = icmp eq i32 %and165, 0 | |
br i1 %tobool166, label %if.end171, label %if.end298 | |
if.end171: ; preds = %if.end163 | |
%and173 = and i32 %51, 1024 | |
%cmp174 = icmp eq i32 %and173, 0 | |
br i1 %cmp174, label %if.end182, label %land.lhs.true175 | |
land.lhs.true175: ; preds = %if.end171 | |
%52 = bitcast %struct.ifaddrs addrspace(200)* addrspace(200)* %ifaddrs.i to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %52) #18 | |
%call.i493 = call signext i32 @getifaddrs(%struct.ifaddrs addrspace(200)* addrspace(200)* nonnull %ifaddrs.i) #18 | |
%cmp.i494 = icmp eq i32 %call.i493, 0 | |
br i1 %cmp.i494, label %for.cond.preheader.i, label %addrconfig.exit.thread666 | |
addrconfig.exit.thread666: ; preds = %land.lhs.true175 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %52) #18 | |
br label %if.end298 | |
for.cond.preheader.i: ; preds = %land.lhs.true175 | |
%ifa.0112.i = load %struct.ifaddrs addrspace(200)*, %struct.ifaddrs addrspace(200)* addrspace(200)* %ifaddrs.i, align 16, !tbaa !10 | |
%cmp1113.i = icmp eq %struct.ifaddrs addrspace(200)* %ifa.0112.i, null | |
br i1 %cmp1113.i, label %for.end.i, label %for.body.lr.ph.i | |
for.body.lr.ph.i: ; preds = %for.cond.preheader.i | |
%53 = getelementptr inbounds %struct.in6_ndireq, %struct.in6_ndireq addrspace(200)* %nd.i.i, i64 0, i32 0, i64 0 | |
%flags.i.i = getelementptr inbounds %struct.in6_ndireq, %struct.in6_ndireq addrspace(200)* %nd.i.i, i64 0, i32 1, i32 5 | |
br label %for.body.i | |
for.body.i: ; preds = %for.inc.i, %for.body.lr.ph.i | |
%ifa.0117.i = phi %struct.ifaddrs addrspace(200)* [ %ifa.0112.i, %for.body.lr.ph.i ], [ %ifa.0.i, %for.inc.i ] | |
%seen_inet6.0116.i = phi i32 [ 0, %for.body.lr.ph.i ], [ %seen_inet6.1.i, %for.inc.i ] | |
%seen_inet.0114.i = phi i32 [ 0, %for.body.lr.ph.i ], [ %seen_inet.1.i, %for.inc.i ] | |
%ifa_addr.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 3 | |
%54 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ifa_addr.i, align 16, !tbaa !27 | |
%cmp2.i495 = icmp eq %struct.sockaddr addrspace(200)* %54, null | |
br i1 %cmp2.i495, label %for.inc.i, label %lor.lhs.false.i | |
lor.lhs.false.i: ; preds = %for.body.i | |
%ifa_flags.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 2 | |
%55 = load i32, i32 addrspace(200)* %ifa_flags.i, align 16, !tbaa !29 | |
%and.i496 = and i32 %55, 1 | |
%cmp3.i = icmp eq i32 %and.i496, 0 | |
br i1 %cmp3.i, label %for.inc.i, label %if.end5.i | |
if.end5.i: ; preds = %lor.lhs.false.i | |
%sa_family.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 1 | |
%56 = load i8, i8 addrspace(200)* %sa_family.i, align 1, !tbaa !30 | |
switch i8 %56, label %for.inc.i [ | |
i8 2, label %sw.bb.i | |
i8 28, label %sw.bb14.i | |
] | |
sw.bb.i: ; preds = %if.end5.i | |
%tobool.i497 = icmp eq i32 %seen_inet.0114.i, 0 | |
br i1 %tobool.i497, label %if.end8.i, label %for.inc.i | |
if.end8.i: ; preds = %sw.bb.i | |
%sin_addr.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 2, i64 2 | |
%s_addr.i = bitcast i8 addrspace(200)* %sin_addr.i to i32 addrspace(200)* | |
%57 = load i32, i32 addrspace(200)* %s_addr.i, align 4, !tbaa !32 | |
%cmp10.i = icmp ne i32 %57, 2130706433 | |
%spec.select.i = zext i1 %cmp10.i to i32 | |
br label %for.inc.i | |
sw.bb14.i: ; preds = %if.end5.i | |
%tobool15.i = icmp eq i32 %seen_inet6.0116.i, 0 | |
br i1 %tobool15.i, label %if.end17.i, label %for.inc.i | |
if.end17.i: ; preds = %sw.bb14.i | |
%sin6_addr.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 2, i64 6 | |
%arrayidx.i = bitcast i8 addrspace(200)* %sin6_addr.i to i32 addrspace(200)* | |
%58 = load i32, i32 addrspace(200)* %arrayidx.i, align 4, !tbaa !36 | |
%cmp19.i = icmp eq i32 %58, 0 | |
br i1 %cmp19.i, label %land.lhs.true.i, label %if.end42.i498 | |
land.lhs.true.i: ; preds = %if.end17.i | |
%arrayidx24.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 2, i64 10 | |
%59 = bitcast i8 addrspace(200)* %arrayidx24.i to i32 addrspace(200)* | |
%60 = load i32, i32 addrspace(200)* %59, align 4, !tbaa !36 | |
%cmp25.i = icmp eq i32 %60, 0 | |
br i1 %cmp25.i, label %land.lhs.true27.i, label %if.end42.i498 | |
land.lhs.true27.i: ; preds = %land.lhs.true.i | |
%arrayidx31.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 2, i64 14 | |
%61 = bitcast i8 addrspace(200)* %arrayidx31.i to i32 addrspace(200)* | |
%62 = load i32, i32 addrspace(200)* %61, align 4, !tbaa !36 | |
%cmp32.i = icmp eq i32 %62, 0 | |
br i1 %cmp32.i, label %land.lhs.true34.i, label %if.end42.i498 | |
land.lhs.true34.i: ; preds = %land.lhs.true27.i | |
%arrayidx38.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 2, i64 18 | |
%63 = bitcast i8 addrspace(200)* %arrayidx38.i to i32 addrspace(200)* | |
%64 = load i32, i32 addrspace(200)* %63, align 4, !tbaa !36 | |
%cmp39.i = icmp eq i32 %64, 1 | |
br i1 %cmp39.i, label %for.inc.i, label %if.end42.i498 | |
if.end42.i498: ; preds = %land.lhs.true34.i, %land.lhs.true27.i, %land.lhs.true.i, %if.end17.i | |
%and44.i = and i32 %55, 24 | |
%cmp45.i = icmp eq i32 %and44.i, 0 | |
br i1 %cmp45.i, label %if.end64.i, label %land.lhs.true47.i | |
land.lhs.true47.i: ; preds = %if.end42.i498 | |
%65 = load i8, i8 addrspace(200)* %sin6_addr.i, align 4, !tbaa !36 | |
%cmp52.i = icmp eq i8 %65, -2 | |
br i1 %cmp52.i, label %land.lhs.true54.i, label %if.end64.i | |
land.lhs.true54.i: ; preds = %land.lhs.true47.i | |
%arrayidx58.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %54, i64 0, i32 2, i64 7 | |
%66 = load i8, i8 addrspace(200)* %arrayidx58.i, align 1, !tbaa !36 | |
%67 = and i8 %66, -64 | |
%cmp61.i = icmp eq i8 %67, -128 | |
br i1 %cmp61.i, label %for.inc.i, label %if.end64.i | |
if.end64.i: ; preds = %land.lhs.true54.i, %land.lhs.true47.i, %if.end42.i498 | |
%ifa_name.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 1 | |
%68 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ifa_name.i, align 16, !tbaa !37 | |
call void @llvm.lifetime.start.p200i8(i64 72, i8 addrspace(200)* nonnull %53) #18 | |
%call.i.i = call signext i32 @_socket(i32 signext 28, i32 signext 268435458, i32 signext 0) #18 | |
%cmp.i.i499 = icmp slt i32 %call.i.i, 0 | |
br i1 %cmp.i.i499, label %is_ifdisabled.exit.thread.i, label %if.end.i.i | |
if.end.i.i: ; preds = %if.end64.i | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 4 dereferenceable(72) %53, i8 0, i64 72, i1 false) #18 | |
%call1.i.i = call i64 @strlcpy(i8 addrspace(200)* nonnull %53, i8 addrspace(200)* %68, i64 zeroext 16) #18 | |
%call2.i.i = call signext i32 (i32, i64, ...) @_ioctl(i32 signext %call.i.i, i64 zeroext 3225971052, %struct.in6_ndireq addrspace(200)* nonnull %nd.i.i) #18 | |
%cmp3.i.i = icmp slt i32 %call2.i.i, 0 | |
%call5.i.i = call signext i32 @_close(i32 signext %call.i.i) #18 | |
br i1 %cmp3.i.i, label %is_ifdisabled.exit.thread.i, label %is_ifdisabled.exit.i | |
is_ifdisabled.exit.thread.i: ; preds = %if.end.i.i, %if.end64.i | |
call void @llvm.lifetime.end.p200i8(i64 72, i8 addrspace(200)* nonnull %53) #18 | |
br label %for.inc.i | |
is_ifdisabled.exit.i: ; preds = %if.end.i.i | |
%69 = load i32, i32 addrspace(200)* %flags.i.i, align 4, !tbaa !38 | |
call void @llvm.lifetime.end.p200i8(i64 72, i8 addrspace(200)* nonnull %53) #18 | |
%and.lobit.i.i = lshr i32 %69, 3 | |
%and.lobit.i.lobit.i = and i32 %and.lobit.i.i, 1 | |
%70 = xor i32 %and.lobit.i.lobit.i, 1 | |
br label %for.inc.i | |
for.inc.i: ; preds = %is_ifdisabled.exit.i, %is_ifdisabled.exit.thread.i, %land.lhs.true54.i, %land.lhs.true34.i, %sw.bb14.i, %if.end8.i, %sw.bb.i, %if.end5.i, %lor.lhs.false.i, %for.body.i | |
%seen_inet.1.i = phi i32 [ %seen_inet.0114.i, %for.body.i ], [ %seen_inet.0114.i, %lor.lhs.false.i ], [ %seen_inet.0114.i, %if.end5.i ], [ %seen_inet.0114.i, %sw.bb14.i ], [ %seen_inet.0114.i, %land.lhs.true34.i ], [ %seen_inet.0114.i, %land.lhs.true54.i ], [ %seen_inet.0114.i, %sw.bb.i ], [ %spec.select.i, %if.end8.i ], [ %seen_inet.0114.i, %is_ifdisabled.exit.thread.i ], [ %seen_inet.0114.i, %is_ifdisabled.exit.i ] | |
%seen_inet6.1.i = phi i32 [ %seen_inet6.0116.i, %for.body.i ], [ %seen_inet6.0116.i, %lor.lhs.false.i ], [ %seen_inet6.0116.i, %if.end5.i ], [ %seen_inet6.0116.i, %sw.bb14.i ], [ 0, %land.lhs.true34.i ], [ 0, %land.lhs.true54.i ], [ %seen_inet6.0116.i, %sw.bb.i ], [ %seen_inet6.0116.i, %if.end8.i ], [ 0, %is_ifdisabled.exit.thread.i ], [ %70, %is_ifdisabled.exit.i ] | |
%ifa_next.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 0 | |
%ifa.0.i = load %struct.ifaddrs addrspace(200)*, %struct.ifaddrs addrspace(200)* addrspace(200)* %ifa_next.i, align 16, !tbaa !10 | |
%cmp1.i = icmp eq %struct.ifaddrs addrspace(200)* %ifa.0.i, null | |
br i1 %cmp1.i, label %for.end.i, label %for.body.i | |
for.end.i: ; preds = %for.inc.i, %for.cond.preheader.i | |
%seen_inet.0.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %seen_inet.1.i, %for.inc.i ] | |
%seen_inet6.0.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %seen_inet6.1.i, %for.inc.i ] | |
%71 = load %struct.ifaddrs addrspace(200)*, %struct.ifaddrs addrspace(200)* addrspace(200)* %ifaddrs.i, align 16, !tbaa !10 | |
call void @freeifaddrs(%struct.ifaddrs addrspace(200)* %71) #18 | |
%ai0.sroa.0.4.ai_family.i500.sroa_idx655 = getelementptr inbounds { i32, i32, i32, i32 }, { i32, i32, i32, i32 } addrspace(200)* %tmpcast, i64 0, i32 1 | |
%ai0.sroa.0.4.ai0.sroa.0.4. = load i32, i32 addrspace(200)* %ai0.sroa.0.4.ai_family.i500.sroa_idx655, align 4, !tbaa !14 | |
switch i32 %ai0.sroa.0.4.ai0.sroa.0.4., label %addrconfig.exit.thread [ | |
i32 28, label %addrconfig.exit | |
i32 2, label %sw.bb70.i | |
i32 0, label %sw.bb71.i | |
] | |
sw.bb70.i: ; preds = %for.end.i | |
br label %addrconfig.exit | |
sw.bb71.i: ; preds = %for.end.i | |
%cmp72.i = icmp eq i32 %seen_inet.0.lcssa.i, %seen_inet6.0.lcssa.i | |
br i1 %cmp72.i, label %addrconfig.exit, label %if.end75.i | |
if.end75.i: ; preds = %sw.bb71.i | |
%tobool76.i = icmp eq i32 %seen_inet.0.lcssa.i, 0 | |
%cond.i = select i1 %tobool76.i, i32 28, i32 2 | |
store i32 %cond.i, i32 addrspace(200)* %ai0.sroa.0.4.ai_family.i500.sroa_idx655, align 4, !tbaa !14 | |
br label %addrconfig.exit.thread | |
addrconfig.exit.thread: ; preds = %if.end75.i, %for.end.i | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %52) #18 | |
br label %if.end182 | |
addrconfig.exit: ; preds = %for.end.i, %sw.bb70.i, %sw.bb71.i | |
%retval.0.i501 = phi i32 [ %seen_inet.0.lcssa.i, %sw.bb70.i ], [ %seen_inet6.0.lcssa.i, %for.end.i ], [ %seen_inet.0.lcssa.i, %sw.bb71.i ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %52) #18 | |
%tobool177 = icmp eq i32 %retval.0.i501, 0 | |
br i1 %tobool177, label %if.end298, label %if.end182 | |
if.end182: ; preds = %addrconfig.exit.thread, %addrconfig.exit, %if.end171 | |
%72 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
store i8 addrspace(200)* %72, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
%73 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
store i8 addrspace(200)* %73, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload587, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload604, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload621, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%74 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %result.i to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %74) #18 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
%call.i.i502 = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %ai, i8 addrspace(200)* %servname, i32 signext 1) #18 | |
%cmp.i503 = icmp eq i32 %call.i.i502, 0 | |
br i1 %cmp.i503, label %if.end.i504, label %explore_fqdn.exit | |
if.end.i504: ; preds = %if.end182 | |
%call1.i = call signext i32 (i8 addrspace(200)*, %struct._ns_dtab addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, %struct._ns_src addrspace(200)*, ...) @_nsdispatch(i8 addrspace(200)* nonnull %74, %struct._ns_dtab addrspace(200)* getelementptr inbounds ([4 x %struct._ns_dtab], [4 x %struct._ns_dtab] addrspace(200)* @explore_fqdn.dtab, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.11, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([12 x i8], [12 x i8] addrspace(200)* @.str.12, i64 0, i64 0), %struct._ns_src addrspace(200)* bitcast ([3 x { i8 addrspace(200)*, i32 }] addrspace(200)* @default_dns_files to %struct._ns_src addrspace(200)*), i8 addrspace(200)* nonnull %hostname, %struct.addrinfo addrspace(200)* nonnull %ai) #18 | |
switch i32 %call1.i, label %sw.epilog.i [ | |
i32 8, label %free.i | |
i32 2, label %sw.bb2.i | |
i32 4, label %sw.bb3.i | |
i32 1, label %for.cond.preheader.i505 | |
] | |
for.cond.preheader.i505: ; preds = %if.end.i504 | |
%cur.021.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
%tobool22.i = icmp eq %struct.addrinfo addrspace(200)* %cur.021.i, null | |
br i1 %tobool22.i, label %sw.epilog.i, label %do.body.i507 | |
sw.bb2.i: ; preds = %if.end.i504 | |
br label %free.i | |
sw.bb3.i: ; preds = %if.end.i504 | |
br label %free.i | |
for.cond.i: ; preds = %do.body.i507 | |
%ai_next.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.023.i, i64 0, i32 7 | |
%cur.0.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i, align 16, !tbaa !10 | |
%tobool.i506 = icmp eq %struct.addrinfo addrspace(200)* %cur.0.i, null | |
br i1 %tobool.i506, label %sw.epilog.i, label %do.body.i507 | |
do.body.i507: ; preds = %for.cond.preheader.i505, %for.cond.i | |
%cur.023.i = phi %struct.addrinfo addrspace(200)* [ %cur.0.i, %for.cond.i ], [ %cur.021.i, %for.cond.preheader.i505 ] | |
%call5.i = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %cur.023.i, i8 addrspace(200)* %servname, i32 signext 0) #18 | |
%cmp6.i = icmp eq i32 %call5.i, 0 | |
br i1 %cmp6.i, label %for.cond.i, label %free.i | |
sw.epilog.i: ; preds = %for.cond.i, %for.cond.preheader.i505, %if.end.i504 | |
%75 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
br label %explore_fqdn.exit | |
free.i: ; preds = %do.body.i507, %sw.bb3.i, %sw.bb2.i, %if.end.i504 | |
%error.0.i508 = phi i32 [ 8, %sw.bb3.i ], [ 4, %sw.bb2.i ], [ 2, %if.end.i504 ], [ %call5.i, %do.body.i507 ] | |
%76 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
%tobool9.i = icmp eq %struct.addrinfo addrspace(200)* %76, null | |
br i1 %tobool9.i, label %explore_fqdn.exit, label %while.body.i.i513 | |
while.body.i.i513: ; preds = %free.i, %while.body.i.i513 | |
%ai.addr.06.i.i509 = phi %struct.addrinfo addrspace(200)* [ %77, %while.body.i.i513 ], [ %76, %free.i ] | |
%ai_next.i.i510 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i509, i64 0, i32 7 | |
%77 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i.i510, align 16, !tbaa !3 | |
%ai_canonname.i.i511 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i509, i64 0, i32 5 | |
%78 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i.i511, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %78) #18 | |
%79 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i.i509 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %79) #18 | |
%cmp.i.i512 = icmp eq %struct.addrinfo addrspace(200)* %77, null | |
br i1 %cmp.i.i512, label %explore_fqdn.exit, label %while.body.i.i513 | |
explore_fqdn.exit: ; preds = %while.body.i.i513, %if.end182, %sw.epilog.i, %free.i | |
%afai_unspec.0 = phi %struct.addrinfo addrspace(200)* [ %75, %sw.epilog.i ], [ null, %free.i ], [ null, %if.end182 ], [ null, %while.body.i.i513 ] | |
%retval.0.i515 = phi i32 [ 0, %sw.epilog.i ], [ %error.0.i508, %free.i ], [ 0, %if.end182 ], [ %error.0.i508, %while.body.i.i513 ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %74) #18 | |
br label %globcopy | |
globcopy: ; preds = %for.end154, %explore_fqdn.exit | |
%afai_unspec.1 = phi %struct.addrinfo addrspace(200)* [ %afai_unspec.0, %explore_fqdn.exit ], [ null, %for.end154 ] | |
%error.4 = phi i32 [ %retval.0.i515, %explore_fqdn.exit ], [ 0, %for.end154 ] | |
%tobool261 = icmp eq %struct.addrinfo addrspace(200)* %afai_unspec.1, null | |
br label %lor.lhs.false191 | |
lor.lhs.false191: ; preds = %for.inc284, %globcopy | |
%ex.1692 = phi %struct.explore addrspace(200)* [ getelementptr inbounds ([16 x %struct.explore], [16 x %struct.explore] addrspace(200)* @explore, i64 0, i64 0), %globcopy ], [ %incdec.ptr285, %for.inc284 ] | |
%error.5690 = phi i32 [ %error.4, %globcopy ], [ %error.6, %for.inc284 ] | |
%cur.0687 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %globcopy ], [ %cur.2, %for.inc284 ] | |
%80 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
store i8 addrspace(200)* %80, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
%81 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
store i8 addrspace(200)* %81, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload587, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload604, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload621, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%e_wild192 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 3 | |
%82 = load i32, i32 addrspace(200)* %e_wild192, align 4, !tbaa !16 | |
%and193 = and i32 %82, 1 | |
%tobool194 = icmp eq i32 %and193, 0 | |
br i1 %tobool194, label %for.inc284, label %if.end202 | |
if.end202: ; preds = %lor.lhs.false191 | |
%83 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%e_socktype204 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 1 | |
%84 = load i32, i32 addrspace(200)* %e_socktype204, align 4, !tbaa !18 | |
%cmp205 = icmp eq i32 %83, %84 | |
br i1 %cmp205, label %if.end217, label %lor.lhs.false206 | |
lor.lhs.false206: ; preds = %if.end202 | |
%e_wild207 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 3 | |
%85 = load i32, i32 addrspace(200)* %e_wild207, align 4, !tbaa !16 | |
%and208 = and i32 %85, 2 | |
%tobool209 = icmp eq i32 %and208, 0 | |
br i1 %tobool209, label %for.inc284, label %land.lhs.true210 | |
land.lhs.true210: ; preds = %lor.lhs.false206 | |
%cmp212 = icmp eq i32 %83, 0 | |
%cmp215 = icmp eq i32 %84, 0 | |
%or.cond490 = or i1 %cmp212, %cmp215 | |
br i1 %or.cond490, label %if.end217, label %for.inc284 | |
if.end217: ; preds = %land.lhs.true210, %if.end202 | |
%86 = load i32, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
%e_protocol219 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 2 | |
%87 = load i32, i32 addrspace(200)* %e_protocol219, align 4, !tbaa !19 | |
%cmp220 = icmp eq i32 %86, %87 | |
br i1 %cmp220, label %if.end238, label %lor.lhs.false221 | |
lor.lhs.false221: ; preds = %if.end217 | |
%e_wild222 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 3 | |
%88 = load i32, i32 addrspace(200)* %e_wild222, align 4, !tbaa !16 | |
%and223 = and i32 %88, 4 | |
%tobool224 = icmp eq i32 %and223, 0 | |
br i1 %tobool224, label %for.inc284, label %land.lhs.true225 | |
land.lhs.true225: ; preds = %lor.lhs.false221 | |
%cmp227 = icmp eq i32 %86, 0 | |
%cmp230 = icmp eq i32 %87, 0 | |
%or.cond491 = or i1 %cmp227, %cmp230 | |
br i1 %or.cond491, label %if.end238, label %for.inc284 | |
if.end238: ; preds = %if.end217, %land.lhs.true225 | |
%cmp240 = icmp ne i32 %83, 0 | |
%cmp243 = icmp eq i32 %84, 0 | |
%or.cond678 = or i1 %cmp240, %cmp243 | |
br i1 %or.cond678, label %if.end247, label %if.then244 | |
if.then244: ; preds = %if.end238 | |
store i32 %84, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
br label %if.end247 | |
if.end247: ; preds = %if.end238, %if.then244 | |
%cmp249 = icmp ne i32 %86, 0 | |
%cmp252 = icmp eq i32 %87, 0 | |
%or.cond679 = or i1 %cmp249, %cmp252 | |
br i1 %or.cond679, label %if.end256, label %if.then253 | |
if.then253: ; preds = %if.end247 | |
store i32 %87, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
br label %if.end256 | |
if.end256: ; preds = %if.end247, %if.then253 | |
%call.i516 = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %ai, i8 addrspace(200)* %servname, i32 signext 1) #18 | |
%cmp258 = icmp eq i32 %call.i516, 0 | |
br i1 %cmp258, label %if.end260, label %for.inc284 | |
if.end260: ; preds = %if.end256 | |
br i1 %tobool261, label %if.else263, label %if.end274 | |
if.else263: ; preds = %if.end260 | |
%89 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%call265 = call fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %89) | |
%cmp266 = icmp eq %struct.afd addrspace(200)* %call265, null | |
br i1 %cmp266, label %for.inc284, label %if.end271 | |
if.end271: ; preds = %if.else263 | |
%90 = bitcast %struct.afd addrspace(200)* %call265 to i8 addrspace(200)* | |
%91 = call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* nonnull %90, i8 addrspace(200)* bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to i8 addrspace(200)*)) | |
%sub.ptr.div269 = ashr exact i64 %91, 6 | |
%arrayidx270 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 %sub.ptr.div269 | |
%92 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx270, align 16, !tbaa !10 | |
%tobool272 = icmp eq %struct.addrinfo addrspace(200)* %92, null | |
br i1 %tobool272, label %for.inc284, label %if.end274 | |
if.end274: ; preds = %if.end260, %if.end271 | |
%afai.0671 = phi %struct.addrinfo addrspace(200)* [ %92, %if.end271 ], [ %afai_unspec.1, %if.end260 ] | |
%ai_next275 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0687, i64 0, i32 7 | |
%call276 = call fastcc signext i32 @explore_copy(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.addrinfo addrspace(200)* nonnull %afai.0671, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %ai_next275) | |
%cmp277 = icmp eq i32 %call276, 0 | |
br i1 %cmp277, label %while.cond, label %bad | |
while.cond: ; preds = %if.end274, %land.rhs | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %93, %land.rhs ], [ %cur.0687, %if.end274 ] | |
%tobool280 = icmp eq %struct.addrinfo addrspace(200)* %cur.1, null | |
br i1 %tobool280, label %for.inc284, label %land.rhs | |
land.rhs: ; preds = %while.cond | |
%ai_next281 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1, i64 0, i32 7 | |
%93 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next281, align 16, !tbaa !3 | |
%tobool282 = icmp eq %struct.addrinfo addrspace(200)* %93, null | |
br i1 %tobool282, label %for.inc284, label %while.cond | |
for.inc284: ; preds = %land.rhs, %while.cond, %land.lhs.true225, %land.lhs.true210, %if.end271, %if.end256, %lor.lhs.false221, %lor.lhs.false206, %lor.lhs.false191, %if.else263 | |
%cur.2 = phi %struct.addrinfo addrspace(200)* [ %cur.0687, %if.end256 ], [ %cur.0687, %if.end271 ], [ %cur.0687, %if.else263 ], [ %cur.0687, %lor.lhs.false221 ], [ %cur.0687, %lor.lhs.false206 ], [ %cur.0687, %lor.lhs.false191 ], [ %cur.0687, %land.lhs.true210 ], [ %cur.0687, %land.lhs.true225 ], [ null, %while.cond ], [ %cur.1, %land.rhs ] | |
%error.6 = phi i32 [ %error.5690, %if.end256 ], [ %error.5690, %if.end271 ], [ %error.5690, %if.else263 ], [ %error.5690, %lor.lhs.false221 ], [ %error.5690, %lor.lhs.false206 ], [ %error.5690, %lor.lhs.false191 ], [ %error.5690, %land.lhs.true210 ], [ %error.5690, %land.lhs.true225 ], [ 0, %while.cond ], [ 0, %land.rhs ] | |
%incdec.ptr285 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 1 | |
%e_af185 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %incdec.ptr285, i64 0, i32 0 | |
%94 = load i32, i32 addrspace(200)* %e_af185, align 4, !tbaa !20 | |
%cmp186 = icmp sgt i32 %94, -1 | |
br i1 %cmp186, label %lor.lhs.false191, label %for.end286 | |
for.end286: ; preds = %for.inc284 | |
%cmp287 = icmp eq i32 %error.6, 0 | |
br i1 %cmp287, label %if.then288, label %bad | |
if.then288: ; preds = %for.end286 | |
%ai_next289 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%95 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next289, align 16, !tbaa !3 | |
%tobool290 = icmp eq %struct.addrinfo addrspace(200)* %95, null | |
br i1 %tobool290, label %bad, label %if.then291 | |
if.then291: ; preds = %if.then288 | |
store %struct.addrinfo addrspace(200)* %95, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
br label %bad | |
bad: ; preds = %if.end274, %if.then288, %for.end286, %if.then291 | |
%error.7 = phi i32 [ 0, %if.then291 ], [ %error.6, %for.end286 ], [ 4, %if.then288 ], [ %call276, %if.end274 ] | |
br i1 %tobool261, label %if.end298, label %while.body.i | |
while.body.i: ; preds = %bad, %while.body.i | |
%ai.addr.06.i = phi %struct.addrinfo addrspace(200)* [ %96, %while.body.i ], [ %afai_unspec.1, %bad ] | |
%ai_next.i518 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 7 | |
%96 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i518, align 16, !tbaa !3 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 5 | |
%97 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %97) #18 | |
%98 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %98) #18 | |
%cmp.i519 = icmp eq %struct.addrinfo addrspace(200)* %96, null | |
br i1 %cmp.i519, label %if.end298, label %while.body.i | |
if.end298: ; preds = %for.inc, %do.body28.i, %do.body.i, %explore_null.exit, %while.body.i, %addrconfig.exit.thread666, %if.then2, %lor.lhs.false, %lor.lhs.false7, %lor.lhs.false10, %if.end14, %if.end21, %if.end113, %if.end163, %addrconfig.exit, %if.end157, %bad | |
%error.7675 = phi i32 [ %error.7, %bad ], [ 4, %addrconfig.exit.thread666 ], [ 4, %addrconfig.exit ], [ 8, %if.end163 ], [ 8, %if.end157 ], [ 5, %if.end21 ], [ 3, %if.end14 ], [ 12, %if.then2 ], [ 12, %lor.lhs.false ], [ 12, %lor.lhs.false7 ], [ 12, %lor.lhs.false10 ], [ %call.i, %if.end113 ], [ %error.7, %while.body.i ], [ 6, %do.body28.i ], [ 6, %do.body.i ], [ %error.0.i, %explore_null.exit ], [ 12, %for.inc ] | |
%arrayidx304 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 0 | |
%99 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx304, align 16, !tbaa !10 | |
%tobool305 = icmp eq %struct.addrinfo addrspace(200)* %99, null | |
br i1 %tobool305, label %for.inc310, label %while.body.i526 | |
while.body.i526: ; preds = %if.end298, %while.body.i526 | |
%ai.addr.06.i522 = phi %struct.addrinfo addrspace(200)* [ %100, %while.body.i526 ], [ %99, %if.end298 ] | |
%ai_next.i523 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522, i64 0, i32 7 | |
%100 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i523, align 16, !tbaa !3 | |
%ai_canonname.i524 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522, i64 0, i32 5 | |
%101 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i524, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %101) #18 | |
%102 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i522 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %102) #18 | |
%cmp.i525 = icmp eq %struct.addrinfo addrspace(200)* %100, null | |
br i1 %cmp.i525, label %for.inc310, label %while.body.i526 | |
for.inc310: ; preds = %while.body.i526, %if.end298 | |
%arrayidx304.1 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 1 | |
%103 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx304.1, align 16, !tbaa !10 | |
%tobool305.1 = icmp eq %struct.addrinfo addrspace(200)* %103, null | |
br i1 %tobool305.1, label %for.inc310.1, label %while.body.i526.1 | |
if.then314: ; preds = %for.inc310.2 | |
%ai_next315 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%104 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next315, align 16, !tbaa !3 | |
%tobool316 = icmp eq %struct.addrinfo addrspace(200)* %104, null | |
br i1 %tobool316, label %cleanup, label %while.body.i535 | |
while.body.i535: ; preds = %if.then314, %while.body.i535 | |
%ai.addr.06.i531 = phi %struct.addrinfo addrspace(200)* [ %105, %while.body.i535 ], [ %104, %if.then314 ] | |
%ai_next.i532 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i531, i64 0, i32 7 | |
%105 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i532, align 16, !tbaa !3 | |
%ai_canonname.i533 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i531, i64 0, i32 5 | |
%106 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i533, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %106) #18 | |
%107 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i531 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %107) #18 | |
%cmp.i534 = icmp eq %struct.addrinfo addrspace(200)* %105, null | |
br i1 %cmp.i534, label %cleanup, label %while.body.i535 | |
cleanup: ; preds = %while.body.i535, %for.inc310.2, %if.then314, %entry | |
%retval.0 = phi i32 [ 8, %entry ], [ %error.7675, %if.then314 ], [ %error.7675, %for.inc310.2 ], [ %error.7675, %while.body.i535 ] | |
call void @llvm.lifetime.end.p200i8(i64 64, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.0.0..sroa_cast654) | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.16.0..sroa_idx646) | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
while.body.i526.1: ; preds = %for.inc310, %while.body.i526.1 | |
%ai.addr.06.i522.1 = phi %struct.addrinfo addrspace(200)* [ %108, %while.body.i526.1 ], [ %103, %for.inc310 ] | |
%ai_next.i523.1 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.1, i64 0, i32 7 | |
%108 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i523.1, align 16, !tbaa !3 | |
%ai_canonname.i524.1 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.1, i64 0, i32 5 | |
%109 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i524.1, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %109) #18 | |
%110 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i522.1 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %110) #18 | |
%cmp.i525.1 = icmp eq %struct.addrinfo addrspace(200)* %108, null | |
br i1 %cmp.i525.1, label %for.inc310.1, label %while.body.i526.1 | |
for.inc310.1: ; preds = %while.body.i526.1, %for.inc310 | |
%arrayidx304.2 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 2 | |
%111 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx304.2, align 16, !tbaa !10 | |
%tobool305.2 = icmp eq %struct.addrinfo addrspace(200)* %111, null | |
br i1 %tobool305.2, label %for.inc310.2, label %while.body.i526.2 | |
while.body.i526.2: ; preds = %for.inc310.1, %while.body.i526.2 | |
%ai.addr.06.i522.2 = phi %struct.addrinfo addrspace(200)* [ %112, %while.body.i526.2 ], [ %111, %for.inc310.1 ] | |
%ai_next.i523.2 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.2, i64 0, i32 7 | |
%112 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i523.2, align 16, !tbaa !3 | |
%ai_canonname.i524.2 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.2, i64 0, i32 5 | |
%113 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i524.2, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %113) #18 | |
%114 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i522.2 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %114) #18 | |
%cmp.i525.2 = icmp eq %struct.addrinfo addrspace(200)* %112, null | |
br i1 %cmp.i525.2, label %for.inc310.2, label %while.body.i526.2 | |
for.inc310.2: ; preds = %while.body.i526.2, %for.inc310.1 | |
%115 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
%tobool313 = icmp eq %struct.addrinfo addrspace(200)* %115, null | |
br i1 %tobool313, label %if.then314, label %cleanup | |
} | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* noalias nocapture writeonly, i8 addrspace(200)* noalias nocapture readonly, i64, i1 immarg) addrspace(200) #3 | |
; Function Attrs: nounwind readnone willreturn | |
declare i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200) #5 | |
; Function Attrs: noinline norecurse nounwind readonly uwtable | |
define internal fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %af) unnamed_addr addrspace(200) #6 { | |
entry: | |
switch i32 %af, label %cleanup [ | |
i32 1, label %cleanup.fold.split11 | |
i32 28, label %cleanup.fold.split | |
i32 2, label %cleanup.fold.split10 | |
] | |
cleanup.fold.split: ; preds = %entry | |
br label %cleanup | |
cleanup.fold.split10: ; preds = %entry | |
br label %cleanup | |
cleanup.fold.split11: ; preds = %entry | |
br label %cleanup | |
cleanup: ; preds = %entry, %cleanup.fold.split11, %cleanup.fold.split10, %cleanup.fold.split | |
%retval.0 = phi %struct.afd addrspace(200)* [ bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to %struct.afd addrspace(200)*), %cleanup.fold.split ], [ bitcast (i32 addrspace(200)* getelementptr inbounds ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }], [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl, i64 0, i64 1, i32 0) to %struct.afd addrspace(200)*), %cleanup.fold.split10 ], [ bitcast (i32 addrspace(200)* getelementptr inbounds ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }], [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl, i64 0, i64 2, i32 0) to %struct.afd addrspace(200)*), %cleanup.fold.split11 ], [ null, %entry ] | |
ret %struct.afd addrspace(200)* %retval.0 | |
} | |
; Function Attrs: noinline nounwind uwtable | |
define internal fastcc signext i32 @explore_copy(%struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.addrinfo addrspace(200)* readonly %src0, %struct.addrinfo addrspace(200)* addrspace(200)* nocapture %res) unnamed_addr addrspace(200) #7 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp40 = icmp eq %struct.addrinfo addrspace(200)* %src0, null | |
br i1 %cmp40, label %for.end, label %for.body.lr.ph | |
for.body.lr.ph: ; preds = %entry | |
%ai_family1 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 1 | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 2 | |
%ai_protocol = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 3 | |
br label %for.body | |
for.body: ; preds = %for.body.lr.ph, %for.inc | |
%src.043 = phi %struct.addrinfo addrspace(200)* [ %src0, %for.body.lr.ph ], [ %24, %for.inc ] | |
%cur.041 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %for.body.lr.ph ], [ %cur.1, %for.inc ] | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 1 | |
%1 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%2 = load i32, i32 addrspace(200)* %ai_family1, align 4, !tbaa !14 | |
%cmp2 = icmp eq i32 %1, %2 | |
br i1 %cmp2, label %if.end, label %for.inc | |
if.end: ; preds = %for.body | |
%ai_addrlen.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 4 | |
%3 = load i32, i32 addrspace(200)* %ai_addrlen.i, align 16, !tbaa !11 | |
%conv.i = zext i32 %3 to i64 | |
%add.i = add nuw nsw i64 %conv.i, 80 | |
%call.i = tail call noalias i8 addrspace(200)* @calloc(i64 zeroext 1, i64 zeroext %add.i) #20 | |
%4 = bitcast i8 addrspace(200)* %call.i to %struct.addrinfo addrspace(200)* | |
%cmp.i = icmp eq i8 addrspace(200)* %call.i, null | |
br i1 %cmp.i, label %copy_ai.exit.thread, label %if.end.i | |
if.end.i: ; preds = %if.end | |
%5 = bitcast %struct.addrinfo addrspace(200)* %src.043 to i8 addrspace(200)* | |
tail call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %call.i, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %5, i64 80, i1 false) #21 | |
%add.ptr.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 80 | |
%ai_addr.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 48 | |
%6 = bitcast i8 addrspace(200)* %ai_addr.i to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %add.ptr.i, i8 addrspace(200)* addrspace(200)* %6, align 16, !tbaa !12 | |
%ai_addr3.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 6 | |
%7 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr3.i to i8 addrspace(200)* addrspace(200)* | |
%8 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %7, align 16, !tbaa !12 | |
%9 = load i32, i32 addrspace(200)* %ai_addrlen.i, align 16, !tbaa !11 | |
%conv5.i = zext i32 %9 to i64 | |
tail call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 1 %add.ptr.i, i8 addrspace(200)* align 1 %8, i64 %conv5.i, i1 false) #18 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 5 | |
%10 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
%tobool.i = icmp eq i8 addrspace(200)* %10, null | |
br i1 %tobool.i, label %if.else.i, label %if.then6.i | |
if.then6.i: ; preds = %if.end.i | |
%call8.i = tail call i64 @strlen(i8 addrspace(200)* nonnull %10) #22 | |
%add9.i = add i64 %call8.i, 1 | |
%call10.i = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext %add9.i) #23 | |
%ai_canonname11.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 32 | |
%11 = bitcast i8 addrspace(200)* %ai_canonname11.i to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %call10.i, i8 addrspace(200)* addrspace(200)* %11, align 16, !tbaa !9 | |
%cmp12.i = icmp eq i8 addrspace(200)* %call10.i, null | |
br i1 %cmp12.i, label %if.then14.i, label %if.end15.i | |
if.then14.i: ; preds = %if.then6.i | |
tail call void @free(i8 addrspace(200)* nonnull %call.i) #18 | |
br label %copy_ai.exit.thread | |
if.end15.i: ; preds = %if.then6.i | |
%12 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
%call18.i = tail call i64 @strlcpy(i8 addrspace(200)* nonnull %call10.i, i8 addrspace(200)* %12, i64 zeroext %add9.i) #18 | |
br label %copy_ai.exit | |
if.else.i: ; preds = %if.end.i | |
%ai_canonname19.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 32 | |
%13 = bitcast i8 addrspace(200)* %ai_canonname19.i to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* null, i8 addrspace(200)* addrspace(200)* %13, align 16, !tbaa !9 | |
br label %copy_ai.exit | |
copy_ai.exit.thread: ; preds = %if.end, %if.then14.i | |
%ai_next334 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.041, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next334, align 16, !tbaa !3 | |
%14 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp5.i = icmp eq %struct.addrinfo addrspace(200)* %14, null | |
br i1 %cmp5.i, label %cleanup, label %while.body.i | |
copy_ai.exit: ; preds = %if.end15.i, %if.else.i | |
%ai_next.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 64 | |
%15 = bitcast i8 addrspace(200)* %ai_next.i to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %15, align 16, !tbaa !3 | |
%ai_next3 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.041, i64 0, i32 7 | |
%16 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next3 to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %call.i, i8 addrspace(200)* addrspace(200)* %16, align 16, !tbaa !3 | |
%17 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%ai_socktype8 = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 8 | |
%18 = bitcast i8 addrspace(200)* %ai_socktype8 to i32 addrspace(200)* | |
store i32 %17, i32 addrspace(200)* %18, align 8, !tbaa !15 | |
%19 = load i32, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
%ai_protocol10 = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 12 | |
%20 = bitcast i8 addrspace(200)* %ai_protocol10 to i32 addrspace(200)* | |
store i32 %19, i32 addrspace(200)* %20, align 4, !tbaa !41 | |
br label %for.inc | |
while.body.i: ; preds = %copy_ai.exit.thread, %while.body.i | |
%ai.addr.06.i = phi %struct.addrinfo addrspace(200)* [ %21, %while.body.i ], [ %14, %copy_ai.exit.thread ] | |
%ai_next.i30 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 7 | |
%21 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i30, align 16, !tbaa !3 | |
%ai_canonname.i31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 5 | |
%22 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i31, align 16, !tbaa !9 | |
tail call void @free(i8 addrspace(200)* %22) #18 | |
%23 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i to i8 addrspace(200)* | |
tail call void @free(i8 addrspace(200)* nonnull %23) #18 | |
%cmp.i32 = icmp eq %struct.addrinfo addrspace(200)* %21, null | |
br i1 %cmp.i32, label %cleanup, label %while.body.i | |
for.inc: ; preds = %for.body, %copy_ai.exit | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %cur.041, %for.body ], [ %4, %copy_ai.exit ] | |
%ai_next12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 7 | |
%24 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next12, align 16, !tbaa !3 | |
%cmp = icmp eq %struct.addrinfo addrspace(200)* %24, null | |
br i1 %cmp, label %for.end, label %for.body | |
for.end: ; preds = %for.inc, %entry | |
%25 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
store %struct.addrinfo addrspace(200)* %25, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
br label %cleanup | |
cleanup: ; preds = %while.body.i, %copy_ai.exit.thread, %for.end | |
%retval.0 = phi i32 [ 0, %for.end ], [ 6, %copy_ai.exit.thread ], [ 6, %while.body.i ] | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nounwind uwtable | |
define signext i32 @main() local_unnamed_addr addrspace(200) #8 { | |
entry: | |
%res = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%hints = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %res to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 2 | |
%2 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %2, i8 0, i64 80, i1 false) | |
store i32 1, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 0 | |
store i32 1, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%call = call signext i32 @my_getaddrinfo(i8 addrspace(200)* null, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str, i64 0, i64 0), %struct.addrinfo addrspace(200)* nonnull %hints, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %res) | |
%tobool = icmp eq i32 %call, 0 | |
%.sink = select i1 %tobool, i8 addrspace(200)* getelementptr inbounds ([23 x i8], [23 x i8] addrspace(200)* @str, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([23 x i8], [23 x i8] addrspace(200)* @str.23, i64 0, i64 0) | |
%not.tobool = xor i1 %tobool, true | |
%retval.0 = zext i1 %not.tobool to i32 | |
%puts = call i32 @puts(i8 addrspace(200)* nonnull dereferenceable(1) %.sink) | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nofree nounwind allocsize(0,1) | |
declare noalias i8 addrspace(200)* @calloc(i64 zeroext, i64 zeroext) local_unnamed_addr addrspace(200) #9 | |
; Function Attrs: argmemonly nofree nounwind readonly | |
declare i64 @strlen(i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #10 | |
; Function Attrs: nofree nounwind allocsize(0) | |
declare noalias i8 addrspace(200)* @malloc(i64 zeroext) local_unnamed_addr addrspace(200) #11 | |
; Function Attrs: nofree | |
declare i64 @strlcpy(i8 addrspace(200)*, i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #12 | |
declare signext i32 @_socket(i32 signext, i32 signext, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare i32 addrspace(200)* @__error() local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @_close(i32 signext) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.afd addrspace(200)* nocapture readonly %afd, i8 addrspace(200)* %addr) unnamed_addr addrspace(200) #0 { | |
entry: | |
%mapaddr = alloca %struct.in6_addr, align 4, addrspace(200) | |
%0 = bitcast %struct.in6_addr addrspace(200)* %mapaddr to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
%a_af = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd, i64 0, i32 0 | |
%1 = load i32, i32 addrspace(200)* %a_af, align 16, !tbaa !26 | |
%cmp = icmp eq i32 %1, 2 | |
br i1 %cmp, label %land.lhs.true, label %if.end | |
land.lhs.true: ; preds = %entry | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
%2 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %2, 2048 | |
%cmp1 = icmp eq i32 %and, 0 | |
br i1 %cmp1, label %if.end, label %if.then | |
if.then: ; preds = %land.lhs.true | |
%arrayidx.i = getelementptr inbounds %struct.in6_addr, %struct.in6_addr addrspace(200)* %mapaddr, i64 0, i32 0, i32 0, i64 3 | |
%3 = bitcast i8 addrspace(200)* %addr to i32 addrspace(200)* | |
%4 = load i32, i32 addrspace(200)* %3, align 1 | |
store i32 %4, i32 addrspace(200)* %arrayidx.i, align 4 | |
%arrayidx1.i = getelementptr inbounds i8, i8 addrspace(200)* %0, i64 10 | |
%5 = bitcast i8 addrspace(200)* %arrayidx1.i to i16 addrspace(200)* | |
store i16 -1, i16 addrspace(200)* %5, align 2 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 4 dereferenceable(10) %0, i8 0, i64 10, i1 false) #18 | |
br label %if.end | |
if.end: ; preds = %land.lhs.true, %if.then, %entry | |
%addr.addr.0 = phi i8 addrspace(200)* [ %0, %if.then ], [ %addr, %land.lhs.true ], [ %addr, %entry ] | |
%afd.addr.0 = phi %struct.afd addrspace(200)* [ bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to %struct.afd addrspace(200)*), %if.then ], [ %afd, %land.lhs.true ], [ %afd, %entry ] | |
%a_socklen = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 2 | |
%6 = load i32, i32 addrspace(200)* %a_socklen, align 8, !tbaa !42 | |
%conv = zext i32 %6 to i64 | |
%add = add nuw nsw i64 %conv, 80 | |
%call = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext %add) #24 | |
%7 = bitcast i8 addrspace(200)* %call to %struct.addrinfo addrspace(200)* | |
%cmp2 = icmp eq i8 addrspace(200)* %call, null | |
br i1 %cmp2, label %cleanup, label %if.end5 | |
if.end5: ; preds = %if.end | |
%8 = bitcast %struct.addrinfo addrspace(200)* %pai to i8 addrspace(200)* | |
tail call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %call, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %8, i64 80, i1 false) #19 | |
%add.ptr = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 80 | |
%ai_addr = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 48 | |
%9 = bitcast i8 addrspace(200)* %ai_addr to %struct.sockaddr addrspace(200)* addrspace(200)* | |
%10 = bitcast i8 addrspace(200)* %ai_addr to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %add.ptr, i8 addrspace(200)* addrspace(200)* %10, align 16, !tbaa !12 | |
%11 = load i32, i32 addrspace(200)* %a_socklen, align 8, !tbaa !42 | |
%conv8 = zext i32 %11 to i64 | |
tail call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 1 %add.ptr, i8 0, i64 %conv8, i1 false) | |
%conv10 = trunc i32 %11 to i8 | |
store i8 %conv10, i8 addrspace(200)* %add.ptr, align 1, !tbaa !43 | |
%ai_addrlen = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 16 | |
%12 = bitcast i8 addrspace(200)* %ai_addrlen to i32 addrspace(200)* | |
store i32 %11, i32 addrspace(200)* %12, align 16, !tbaa !11 | |
%ai_family = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 4 | |
%13 = bitcast i8 addrspace(200)* %ai_family to i32 addrspace(200)* | |
%14 = load i32, i32 addrspace(200)* %13, align 4, !tbaa !14 | |
%cmp13 = icmp eq i32 %14, 1 | |
br i1 %cmp13, label %if.then15, label %if.end32 | |
if.then15: ; preds = %if.end5 | |
%a_addrlen = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 1 | |
%15 = load i32, i32 addrspace(200)* %a_addrlen, align 4, !tbaa !44 | |
%conv16 = sext i32 %15 to i64 | |
%call17 = call i64 @strnlen(i8 addrspace(200)* %addr.addr.0, i64 zeroext %conv16) #22 | |
%16 = trunc i64 %call17 to i32 | |
%17 = sub i32 %11, %15 | |
%conv23 = add i32 %17, %16 | |
store i32 %conv23, i32 addrspace(200)* %12, align 16, !tbaa !11 | |
%conv2575 = zext i32 %15 to i64 | |
%18 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %9, align 16, !tbaa !12 | |
%sa_len28 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %18, i64 0, i32 0 | |
%19 = load i8, i8 addrspace(200)* %sa_len28, align 1, !tbaa !43 | |
%sub2674 = sub i64 %call17, %conv2575 | |
%20 = trunc i64 %sub2674 to i8 | |
%conv31 = add i8 %19, %20 | |
store i8 %conv31, i8 addrspace(200)* %sa_len28, align 1, !tbaa !43 | |
br label %if.end32 | |
if.end32: ; preds = %if.then15, %if.end5 | |
%a_af33 = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 0 | |
%21 = load i32, i32 addrspace(200)* %a_af33, align 16, !tbaa !26 | |
store i32 %21, i32 addrspace(200)* %13, align 4, !tbaa !14 | |
%conv35 = trunc i32 %21 to i8 | |
%22 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %9, align 16, !tbaa !12 | |
%sa_family = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %22, i64 0, i32 1 | |
store i8 %conv35, i8 addrspace(200)* %sa_family, align 1, !tbaa !30 | |
%a_off = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 3 | |
%23 = load i32, i32 addrspace(200)* %a_off, align 4, !tbaa !45 | |
%idx.ext = sext i32 %23 to i64 | |
%add.ptr38 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr, i64 %idx.ext | |
%a_addrlen39 = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 1 | |
%24 = load i32, i32 addrspace(200)* %a_addrlen39, align 4, !tbaa !44 | |
%conv40 = sext i32 %24 to i64 | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 1 %add.ptr38, i8 addrspace(200)* align 1 %addr.addr.0, i64 %conv40, i1 false) | |
br label %cleanup | |
cleanup: ; preds = %if.end, %if.end32 | |
%retval.0 = phi %struct.addrinfo addrspace(200)* [ %7, %if.end32 ], [ null, %if.end ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
ret %struct.addrinfo addrspace(200)* %retval.0 | |
} | |
; Function Attrs: nounwind uwtable | |
define internal fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nocapture readonly %ai, i8 addrspace(200)* %servname, i32 signext %matchonly) unnamed_addr addrspace(200) #0 { | |
entry: | |
%ep.i = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%cmp = icmp eq i8 addrspace(200)* %servname, null | |
br i1 %cmp, label %cleanup, label %if.end | |
if.end: ; preds = %entry | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 1 | |
%0 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
switch i32 %0, label %cleanup [ | |
i32 28, label %sw.epilog | |
i32 2, label %sw.epilog | |
] | |
sw.epilog: ; preds = %if.end, %if.end | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 2 | |
%1 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
switch i32 %1, label %sw.default9 [ | |
i32 3, label %cleanup | |
i32 2, label %sw.epilog10 | |
i32 1, label %sw.epilog10 | |
i32 5, label %sw.epilog10 | |
i32 0, label %sw.bb4 | |
] | |
sw.bb4: ; preds = %sw.epilog | |
switch i32 %0, label %sw.default7 [ | |
i32 2, label %sw.epilog10 | |
i32 28, label %sw.epilog10 | |
] | |
sw.default7: ; preds = %sw.bb4 | |
br label %sw.epilog10 | |
sw.default9: ; preds = %sw.epilog | |
br label %cleanup | |
sw.epilog10: ; preds = %sw.bb4, %sw.bb4, %sw.epilog, %sw.epilog, %sw.epilog, %sw.default7 | |
%allownumeric.0 = phi i32 [ 0, %sw.default7 ], [ 1, %sw.epilog ], [ 1, %sw.epilog ], [ 1, %sw.epilog ], [ 1, %sw.bb4 ], [ 1, %sw.bb4 ] | |
%2 = bitcast i8 addrspace(200)* addrspace(200)* %ep.i to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
%3 = load i8, i8 addrspace(200)* %servname, align 1, !tbaa !36 | |
%cmp.i = icmp eq i8 %3, 0 | |
br i1 %cmp.i, label %if.else, label %if.end.i | |
if.end.i: ; preds = %sw.epilog10 | |
store i8 addrspace(200)* null, i8 addrspace(200)* addrspace(200)* %ep.i, align 16, !tbaa !10 | |
%call.i = tail call i32 addrspace(200)* @__error() #18 | |
store i32 0, i32 addrspace(200)* %call.i, align 4, !tbaa !22 | |
%call2.i = call i64 @strtoul(i8 addrspace(200)* nonnull %servname, i8 addrspace(200)* addrspace(200)* nonnull %ep.i, i32 signext 10) #18 | |
%call3.i = tail call i32 addrspace(200)* @__error() #18 | |
%4 = load i32, i32 addrspace(200)* %call3.i, align 4, !tbaa !22 | |
%cmp4.i = icmp eq i32 %4, 0 | |
%5 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ep.i, align 16 | |
%tobool.i = icmp ne i8 addrspace(200)* %5, null | |
%or.cond.i = and i1 %cmp4.i, %tobool.i | |
br i1 %or.cond.i, label %land.lhs.true6.i, label %if.else | |
land.lhs.true6.i: ; preds = %if.end.i | |
%6 = load i8, i8 addrspace(200)* %5, align 1, !tbaa !36 | |
%cmp8.i = icmp eq i8 %6, 0 | |
%cmp11.i = icmp ult i64 %call2.i, 4294967296 | |
%or.cond16.i = and i1 %cmp11.i, %cmp8.i | |
br i1 %or.cond16.i, label %if.then12, label %if.else | |
if.then12: ; preds = %land.lhs.true6.i | |
%conv14.i = trunc i64 %call2.i to i32 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
%tobool = icmp eq i32 %allownumeric.0, 0 | |
%7 = icmp ugt i32 %conv14.i, 65535 | |
%or.cond = or i1 %tobool, %7 | |
br i1 %or.cond, label %cleanup, label %if.end34 | |
if.else: ; preds = %sw.epilog10, %land.lhs.true6.i, %if.end.i | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 0 | |
%8 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %8, 8 | |
%tobool20 = icmp eq i32 %and, 0 | |
br i1 %tobool20, label %if.end22, label %cleanup | |
if.end22: ; preds = %if.else | |
%ai_protocol = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 3 | |
%9 = load i32, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
switch i32 %9, label %sw.default27 [ | |
i32 17, label %sw.epilog28 | |
i32 6, label %sw.bb24 | |
i32 132, label %sw.bb25 | |
i32 136, label %sw.bb26 | |
] | |
sw.bb24: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.bb25: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.bb26: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.default27: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.epilog28: ; preds = %if.end22, %sw.default27, %sw.bb26, %sw.bb25, %sw.bb24 | |
%proto.0 = phi i8 addrspace(200)* [ null, %sw.default27 ], [ getelementptr inbounds ([8 x i8], [8 x i8] addrspace(200)* @.str.7, i64 0, i64 0), %sw.bb26 ], [ getelementptr inbounds ([5 x i8], [5 x i8] addrspace(200)* @.str.6, i64 0, i64 0), %sw.bb25 ], [ getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.5, i64 0, i64 0), %sw.bb24 ], [ getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.4, i64 0, i64 0), %if.end22 ] | |
%call29 = tail call %struct.servent addrspace(200)* @getservbyname(i8 addrspace(200)* nonnull %servname, i8 addrspace(200)* %proto.0) #18 | |
%cmp30 = icmp eq %struct.servent addrspace(200)* %call29, null | |
br i1 %cmp30, label %cleanup, label %if.end33 | |
if.end33: ; preds = %sw.epilog28 | |
%s_port = getelementptr inbounds %struct.servent, %struct.servent addrspace(200)* %call29, i64 0, i32 2 | |
%10 = load i32, i32 addrspace(200)* %s_port, align 16, !tbaa !46 | |
br label %if.end34 | |
if.end34: ; preds = %if.then12, %if.end33 | |
%storemerge = phi i32 [ %10, %if.end33 ], [ %conv14.i, %if.then12 ] | |
%tobool35 = icmp eq i32 %matchonly, 0 | |
br i1 %tobool35, label %if.then36, label %cleanup | |
if.then36: ; preds = %if.end34 | |
%11 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
switch i32 %11, label %cleanup [ | |
i32 2, label %sw.bb38 | |
i32 28, label %sw.bb40 | |
] | |
sw.bb38: ; preds = %if.then36 | |
%conv39 = trunc i32 %storemerge to i16 | |
%ai_addr = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 6 | |
%12 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr to %struct.sockaddr_in addrspace(200)* addrspace(200)* | |
%13 = load %struct.sockaddr_in addrspace(200)*, %struct.sockaddr_in addrspace(200)* addrspace(200)* %12, align 16, !tbaa !12 | |
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in addrspace(200)* %13, i64 0, i32 2 | |
store i16 %conv39, i16 addrspace(200)* %sin_port, align 2, !tbaa !48 | |
br label %cleanup | |
sw.bb40: ; preds = %if.then36 | |
%conv41 = trunc i32 %storemerge to i16 | |
%ai_addr42 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 6 | |
%14 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr42 to %struct.sockaddr_in6 addrspace(200)* addrspace(200)* | |
%15 = load %struct.sockaddr_in6 addrspace(200)*, %struct.sockaddr_in6 addrspace(200)* addrspace(200)* %14, align 16, !tbaa !12 | |
%sin6_port = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %15, i64 0, i32 2 | |
store i16 %conv41, i16 addrspace(200)* %sin6_port, align 2, !tbaa !49 | |
br label %cleanup | |
cleanup: ; preds = %if.then36, %sw.bb40, %sw.bb38, %if.end34, %sw.epilog28, %if.else, %if.then12, %sw.epilog, %if.end, %entry, %sw.default9 | |
%retval.0 = phi i32 [ 10, %sw.default9 ], [ 0, %entry ], [ 0, %if.end ], [ 9, %sw.epilog ], [ 9, %if.then12 ], [ 8, %if.else ], [ 9, %sw.epilog28 ], [ 0, %if.end34 ], [ 0, %sw.bb38 ], [ 0, %sw.bb40 ], [ 0, %if.then36 ] | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nounwind readonly | |
declare i64 @strnlen(i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #14 | |
declare %struct.servent addrspace(200)* @getservbyname(i8 addrspace(200)*, i8 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nofree nounwind | |
declare i64 @strtoul(i8 addrspace(200)* readonly, i8 addrspace(200)* addrspace(200)* nocapture, i32 signext) local_unnamed_addr addrspace(200) #4 | |
declare signext i32 @getifaddrs(%struct.ifaddrs addrspace(200)* addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare void @freeifaddrs(%struct.ifaddrs addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @_ioctl(i32 signext, i64 zeroext, ...) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal signext i32 @_files_getaddrinfo(i8 addrspace(200)* nocapture %rv, i8 addrspace(200)* nocapture readnone %cb_data, i8 addrspace(200)* %ap) addrspace(200) #0 { | |
_sethtent.exit: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%hostf = alloca %struct.__sFILE addrspace(200)*, align 16, addrspace(200) | |
%ai0 = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.__sFILE addrspace(200)* addrspace(200)* %hostf to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
%2 = tail call i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)* %ap) | |
%3 = add i64 %2, 15 | |
%4 = and i64 %3, -16 | |
%5 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* %ap, i64 %4) | |
%argp.next = getelementptr inbounds i8, i8 addrspace(200)* %5, i64 16 | |
%6 = bitcast i8 addrspace(200)* %5 to i8 addrspace(200)* addrspace(200)* | |
%7 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %6, align 16 | |
%8 = add i64 %4, 31 | |
%9 = and i64 %8, -16 | |
%10 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* nonnull %argp.next, i64 %9) | |
%11 = bitcast i8 addrspace(200)* %10 to %struct.addrinfo addrspace(200)* addrspace(200)* | |
%12 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %11, align 16 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%call.i = tail call %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* getelementptr inbounds ([11 x i8], [11 x i8] addrspace(200)* @.str.13, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.14, i64 0, i64 0)) #18 | |
store %struct.__sFILE addrspace(200)* %call.i, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %12, i64 0, i32 1 | |
%13 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp = icmp eq i32 %13, 28 | |
br i1 %cmp, label %land.lhs.true, label %if.else | |
land.lhs.true: ; preds = %_sethtent.exit | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %12, i64 0, i32 0 | |
%14 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %14, 2304 | |
%cmp3 = icmp eq i32 %and, 2048 | |
br i1 %cmp3, label %if.then, label %if.else | |
if.then: ; preds = %land.lhs.true | |
%15 = bitcast %struct.addrinfo addrspace(200)* %ai0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %15) #18 | |
%16 = bitcast %struct.addrinfo addrspace(200)* %12 to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %15, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %16, i64 80, i1 false), !tbaa.struct !21 | |
%ai_flags4 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai0, i64 0, i32 0 | |
%17 = load i32, i32 addrspace(200)* %ai_flags4, align 16, !tbaa !13 | |
%and5 = and i32 %17, -2049 | |
store i32 %and5, i32 addrspace(200)* %ai_flags4, align 16, !tbaa !13 | |
%call = call fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nonnull %hostf, i8 addrspace(200)* %7, %struct.addrinfo addrspace(200)* nonnull %ai0, %struct.addrinfo addrspace(200)* nonnull %sentinel) | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%18 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp6 = icmp eq %struct.addrinfo addrspace(200)* %18, null | |
br i1 %cmp6, label %if.then7, label %if.end | |
if.then7: ; preds = %if.then | |
%19 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool.i31 = icmp eq %struct.__sFILE addrspace(200)* %19, null | |
br i1 %tobool.i31, label %if.then.i33, label %if.else.i34 | |
if.then.i33: ; preds = %if.then7 | |
%call.i32 = call %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* getelementptr inbounds ([11 x i8], [11 x i8] addrspace(200)* @.str.13, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.14, i64 0, i64 0)) #18 | |
store %struct.__sFILE addrspace(200)* %call.i32, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
br label %_sethtent.exit35 | |
if.else.i34: ; preds = %if.then7 | |
call void @rewind(%struct.__sFILE addrspace(200)* nonnull %19) #18 | |
br label %_sethtent.exit35 | |
_sethtent.exit35: ; preds = %if.then.i33, %if.else.i34 | |
%or = or i32 %17, 2048 | |
store i32 %or, i32 addrspace(200)* %ai_flags4, align 16, !tbaa !13 | |
%call9 = call fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nonnull %hostf, i8 addrspace(200)* %7, %struct.addrinfo addrspace(200)* nonnull %ai0, %struct.addrinfo addrspace(200)* %call) | |
br label %if.end | |
if.end: ; preds = %_sethtent.exit35, %if.then | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %15) #18 | |
br label %if.end11 | |
if.else: ; preds = %land.lhs.true, %_sethtent.exit | |
%call10 = call fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nonnull %hostf, i8 addrspace(200)* %7, %struct.addrinfo addrspace(200)* %12, %struct.addrinfo addrspace(200)* nonnull %sentinel) | |
br label %if.end11 | |
if.end11: ; preds = %if.else, %if.end | |
%20 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool.i36 = icmp eq %struct.__sFILE addrspace(200)* %20, null | |
br i1 %tobool.i36, label %_endhtent.exit, label %if.then.i38 | |
if.then.i38: ; preds = %if.end11 | |
%call.i37 = call signext i32 @fclose(%struct.__sFILE addrspace(200)* nonnull %20) #18 | |
store %struct.__sFILE addrspace(200)* null, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
br label %_endhtent.exit | |
_endhtent.exit: ; preds = %if.end11, %if.then.i38 | |
%ai_next12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%21 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next12, align 16, !tbaa !3 | |
%22 = bitcast i8 addrspace(200)* %rv to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* %21, %struct.addrinfo addrspace(200)* addrspace(200)* %22, align 16, !tbaa !10 | |
%cmp14 = icmp eq %struct.addrinfo addrspace(200)* %21, null | |
%. = select i1 %cmp14, i32 4, i32 1 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %. | |
} | |
; Function Attrs: nounwind uwtable | |
define internal signext i32 @_dns_getaddrinfo(i8 addrspace(200)* nocapture %rv, i8 addrspace(200)* nocapture readnone %cb_data, i8 addrspace(200)* %ap) addrspace(200) #0 { | |
entry: | |
%nbuf.i.i = alloca [1025 x i8], align 1, addrspace(200) | |
%abuf.i = alloca [1025 x i8], align 1, addrspace(200) | |
%ai0 = alloca %struct.addrinfo, align 16, addrspace(200) | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%q = alloca %struct.res_target, align 16, addrspace(200) | |
%q2 = alloca %struct.res_target, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %ai0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%2 = bitcast %struct.res_target addrspace(200)* %q to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %2) #18 | |
%3 = bitcast %struct.res_target addrspace(200)* %q2 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %3) #18 | |
%4 = tail call i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)* %ap) | |
%5 = add i64 %4, 15 | |
%6 = and i64 %5, -16 | |
%7 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* %ap, i64 %6) | |
%argp.next = getelementptr inbounds i8, i8 addrspace(200)* %7, i64 16 | |
%8 = bitcast i8 addrspace(200)* %7 to i8 addrspace(200)* addrspace(200)* | |
%9 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %8, align 16 | |
%10 = add i64 %6, 31 | |
%11 = and i64 %10, -16 | |
%12 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* nonnull %argp.next, i64 %11) | |
%13 = bitcast i8 addrspace(200)* %12 to %struct.addrinfo addrspace(200)* addrspace(200)* | |
%14 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %13, align 16 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %2, i8 0, i64 80, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %3, i8 0, i64 80, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 0, i64 80, i1 false) | |
%call = tail call %struct.__res_state addrspace(200)* @__res_state() #18 | |
%call3 = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext 65536) #24 | |
%15 = bitcast i8 addrspace(200)* %call3 to %union.querybuf addrspace(200)* | |
%tobool = icmp eq i8 addrspace(200)* %call3, null | |
br i1 %tobool, label %if.then, label %if.end | |
if.then: ; preds = %entry | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext -1) #18 | |
br label %cleanup | |
if.end: ; preds = %entry | |
%call4 = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext 65536) #24 | |
%16 = bitcast i8 addrspace(200)* %call4 to %union.querybuf addrspace(200)* | |
%tobool5 = icmp eq i8 addrspace(200)* %call4, null | |
br i1 %tobool5, label %if.then6, label %if.end7 | |
if.then6: ; preds = %if.end | |
tail call void @free(i8 addrspace(200)* nonnull %call3) | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext -1) #18 | |
br label %cleanup | |
if.end7: ; preds = %if.end | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 1 | |
%17 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp = icmp eq i32 %17, 28 | |
br i1 %cmp, label %land.lhs.true, label %if.end11 | |
land.lhs.true: ; preds = %if.end7 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 0 | |
%18 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %18, 2048 | |
%cmp8 = icmp eq i32 %and, 0 | |
br i1 %cmp8, label %if.end11, label %if.then9 | |
if.then9: ; preds = %land.lhs.true | |
%19 = bitcast %struct.addrinfo addrspace(200)* %14 to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %19, i64 80, i1 false), !tbaa.struct !21 | |
%ai_family10 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai0, i64 0, i32 1 | |
store i32 0, i32 addrspace(200)* %ai_family10, align 4, !tbaa !14 | |
br label %if.end11 | |
if.end11: ; preds = %land.lhs.true, %if.then9, %if.end7 | |
%pai.0 = phi %struct.addrinfo addrspace(200)* [ %ai0, %if.then9 ], [ %14, %land.lhs.true ], [ %14, %if.end7 ] | |
%ai_family12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai.0, i64 0, i32 1 | |
%20 = load i32, i32 addrspace(200)* %ai_family12, align 4, !tbaa !14 | |
switch i32 %20, label %sw.default [ | |
i32 0, label %sw.bb | |
i32 2, label %sw.epilog | |
i32 28, label %sw.bb29 | |
] | |
sw.bb: ; preds = %if.end11 | |
%name = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 1 | |
store i8 addrspace(200)* %9, i8 addrspace(200)* addrspace(200)* %name, align 16, !tbaa !52 | |
%qclass = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 2 | |
store i32 1, i32 addrspace(200)* %qclass, align 16, !tbaa !54 | |
%qtype = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 3 | |
store i32 1, i32 addrspace(200)* %qtype, align 4, !tbaa !55 | |
%answer = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 4 | |
store i8 addrspace(200)* %call3, i8 addrspace(200)* addrspace(200)* %answer, align 16, !tbaa !56 | |
%anslen = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 5 | |
store i32 65536, i32 addrspace(200)* %anslen, align 16, !tbaa !57 | |
%next = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 0 | |
store %struct.res_target addrspace(200)* %q2, %struct.res_target addrspace(200)* addrspace(200)* %next, align 16, !tbaa !58 | |
br label %sw.epilog | |
sw.bb29: ; preds = %if.end11 | |
br label %sw.epilog | |
sw.default: ; preds = %if.end11 | |
tail call void @free(i8 addrspace(200)* nonnull %call3) | |
tail call void @free(i8 addrspace(200)* nonnull %call4) | |
br label %cleanup | |
sw.epilog: ; preds = %if.end11, %sw.bb29, %sw.bb | |
%q.sink170 = phi %struct.res_target addrspace(200)* [ %q, %sw.bb29 ], [ %q2, %sw.bb ], [ %q, %if.end11 ] | |
%.sink = phi i32 [ 28, %sw.bb29 ], [ 28, %sw.bb ], [ 1, %if.end11 ] | |
%call3.sink = phi i8 addrspace(200)* [ %call3, %sw.bb29 ], [ %call4, %sw.bb ], [ %call3, %if.end11 ] | |
%name30 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 1 | |
store i8 addrspace(200)* %9, i8 addrspace(200)* addrspace(200)* %name30, align 16, !tbaa !52 | |
%qclass31 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 2 | |
store i32 1, i32 addrspace(200)* %qclass31, align 16, !tbaa !54 | |
%qtype32 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 3 | |
store i32 %.sink, i32 addrspace(200)* %qtype32, align 4, !tbaa !55 | |
%answer35 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 4 | |
store i8 addrspace(200)* %call3.sink, i8 addrspace(200)* addrspace(200)* %answer35, align 16, !tbaa !56 | |
%anslen36 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 5 | |
store i32 65536, i32 addrspace(200)* %anslen36, align 16, !tbaa !57 | |
%options = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 2 | |
%21 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and37 = and i64 %21, 1 | |
%cmp38 = icmp eq i64 %and37, 0 | |
br i1 %cmp38, label %land.lhs.true39, label %if.end43 | |
land.lhs.true39: ; preds = %sw.epilog | |
%call40 = call signext i32 @__res_ninit(%struct.__res_state addrspace(200)* %call) #18 | |
%cmp41 = icmp eq i32 %call40, -1 | |
br i1 %cmp41, label %if.then42, label %if.end43 | |
if.then42: ; preds = %land.lhs.true39 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext -1) #18 | |
call void @free(i8 addrspace(200)* nonnull %call3) | |
call void @free(i8 addrspace(200)* nonnull %call4) | |
br label %cleanup | |
if.end43: ; preds = %land.lhs.true39, %sw.epilog | |
%answer.i = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 4 | |
%22 = bitcast i8 addrspace(200)* addrspace(200)* %answer.i to %struct.HEADER addrspace(200)* addrspace(200)* | |
%23 = load %struct.HEADER addrspace(200)*, %struct.HEADER addrspace(200)* addrspace(200)* %22, align 16, !tbaa !56 | |
%24 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %abuf.i, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
%call.i = call i32 addrspace(200)* @__error() #18 | |
store i32 0, i32 addrspace(200)* %call.i, align 4, !tbaa !22 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 1) #18 | |
%25 = load i8, i8 addrspace(200)* %9, align 1, !tbaa !36 | |
%tobool322.i = icmp eq i8 %25, 0 | |
br i1 %tobool322.i, label %land.lhs.true9.i, label %for.body.i | |
for.body.i: ; preds = %if.end43, %for.body.i | |
%26 = phi i8 [ %27, %for.body.i ], [ %25, %if.end43 ] | |
%dots.0324.i = phi i32 [ %add.i, %for.body.i ], [ 0, %if.end43 ] | |
%cp.0323.i = phi i8 addrspace(200)* [ %incdec.ptr.i, %for.body.i ], [ %9, %if.end43 ] | |
%cmp.i = icmp eq i8 %26, 46 | |
%conv1.i = zext i1 %cmp.i to i32 | |
%add.i = add i32 %dots.0324.i, %conv1.i | |
%incdec.ptr.i = getelementptr inbounds i8, i8 addrspace(200)* %cp.0323.i, i64 1 | |
%27 = load i8, i8 addrspace(200)* %incdec.ptr.i, align 1, !tbaa !36 | |
%tobool.i = icmp eq i8 %27, 0 | |
br i1 %tobool.i, label %for.end.i, label %for.body.i | |
for.end.i: ; preds = %for.body.i | |
%cmp2.i = icmp ugt i8 addrspace(200)* %incdec.ptr.i, %9 | |
br i1 %cmp2.i, label %land.lhs.true.i, label %if.end.i | |
land.lhs.true.i: ; preds = %for.end.i | |
%28 = load i8, i8 addrspace(200)* %cp.0323.i, align 1, !tbaa !36 | |
%cmp6.i = icmp eq i8 %28, 46 | |
%spec.select.i = zext i1 %cmp6.i to i32 | |
br label %if.end.i | |
if.end.i: ; preds = %land.lhs.true.i, %for.end.i | |
%trailing_dot.0.i = phi i32 [ 0, %for.end.i ], [ %spec.select.i, %land.lhs.true.i ] | |
%tobool8.i = icmp eq i32 %add.i, 0 | |
br i1 %tobool8.i, label %land.lhs.true9.i, label %if.end15.i | |
land.lhs.true9.i: ; preds = %if.end.i, %if.end43 | |
%trailing_dot.0338.i = phi i32 [ %trailing_dot.0.i, %if.end.i ], [ 0, %if.end43 ] | |
%call10.i = call i8 addrspace(200)* @__res_hostalias(%struct.__res_state addrspace(200)* %call, i8 addrspace(200)* nonnull %9, i8 addrspace(200)* nonnull %24, i64 zeroext 1025) #18 | |
%cmp11.i = icmp eq i8 addrspace(200)* %call10.i, null | |
br i1 %cmp11.i, label %if.end15.i, label %if.then13.i | |
if.then13.i: ; preds = %land.lhs.true9.i | |
%call14.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* nonnull %call10.i, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
br label %res_searchN.exit | |
if.end15.i: ; preds = %if.end.i, %land.lhs.true9.i | |
%tobool8341.i = phi i1 [ false, %land.lhs.true9.i ], [ true, %if.end.i ] | |
%trailing_dot.0339.i = phi i32 [ %trailing_dot.0338.i, %land.lhs.true9.i ], [ %trailing_dot.0.i, %if.end.i ] | |
%dots.0.lcssa332337.i = phi i32 [ 0, %land.lhs.true9.i ], [ %add.i, %if.end.i ] | |
%ndots.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 9 | |
%bf.load.i = load i8, i8 addrspace(200)* %ndots.i, align 8 | |
%bf.lshr.i = lshr i8 %bf.load.i, 4 | |
%bf.cast.i = zext i8 %bf.lshr.i to i32 | |
%cmp16.i = icmp uge i32 %dots.0.lcssa332337.i, %bf.cast.i | |
%tobool18.i = icmp ne i32 %trailing_dot.0339.i, 0 | |
%or.cond.i = or i1 %tobool18.i, %cmp16.i | |
br i1 %or.cond.i, label %if.then19.i, label %if.end42.i | |
if.then19.i: ; preds = %if.end15.i | |
%29 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %29) #18 | |
%call.i.i = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%cmp1.i.i = icmp ugt i64 %call.i.i, 1024 | |
br i1 %cmp1.i.i, label %if.then2.i.i, label %if.end.i.i | |
if.then2.i.i: ; preds = %if.then19.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 3) #18 | |
br label %res_querydomainN.exit.i | |
if.end.i.i: ; preds = %if.then19.i | |
%cmp3.i.i = icmp eq i64 %call.i.i, 0 | |
br i1 %cmp3.i.i, label %if.end21.i.i, label %land.lhs.true.i.i | |
land.lhs.true.i.i: ; preds = %if.end.i.i | |
%dec.i.i = add nsw i64 %call.i.i, -1 | |
%arrayidx.i.i = getelementptr inbounds i8, i8 addrspace(200)* %9, i64 %dec.i.i | |
%30 = load i8, i8 addrspace(200)* %arrayidx.i.i, align 1, !tbaa !36 | |
%cmp4.i.i = icmp eq i8 %30, 46 | |
br i1 %cmp4.i.i, label %if.then6.i.i, label %if.end21.i.i | |
if.then6.i.i: ; preds = %land.lhs.true.i.i | |
%call8.i.i = call i8 addrspace(200)* @strncpy(i8 addrspace(200)* nonnull %29, i8 addrspace(200)* nonnull %9, i64 zeroext %dec.i.i) #18 | |
%arrayidx9.i.i = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 %dec.i.i | |
store i8 0, i8 addrspace(200)* %arrayidx9.i.i, align 1, !tbaa !36 | |
br label %if.end21.i.i | |
if.end21.i.i: ; preds = %if.then6.i.i, %land.lhs.true.i.i, %if.end.i.i | |
%longname.0.i.i = phi i8 addrspace(200)* [ %29, %if.then6.i.i ], [ %9, %if.end.i.i ], [ %9, %land.lhs.true.i.i ] | |
%call22.i.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* %longname.0.i.i, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
br label %res_querydomainN.exit.i | |
res_querydomainN.exit.i: ; preds = %if.end21.i.i, %if.then2.i.i | |
%retval.0.i.i = phi i32 [ -1, %if.then2.i.i ], [ %call22.i.i, %if.end21.i.i ] | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %29) #18 | |
%cmp21.i = icmp sgt i32 %retval.0.i.i, 0 | |
%or.cond175.i = or i1 %tobool18.i, %cmp21.i | |
br i1 %or.cond175.i, label %res_searchN.exit, label %if.end26.i | |
if.end26.i: ; preds = %res_querydomainN.exit.i | |
%call27.i = call i32 addrspace(200)* @__error() #18 | |
%31 = load i32, i32 addrspace(200)* %call27.i, align 4, !tbaa !22 | |
%cmp28.i = icmp eq i32 %31, 61 | |
br i1 %cmp28.i, label %if.then30.i, label %if.end31.i | |
if.then30.i: ; preds = %if.end26.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 2) #18 | |
br label %res_searchN.exit.thread | |
if.end31.i: ; preds = %if.end26.i | |
%res_h_errno.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%32 = load i32, i32 addrspace(200)* %res_h_errno.i, align 16, !tbaa !62 | |
switch i32 %32, label %res_searchN.exit.thread [ | |
i32 4, label %if.end42.i | |
i32 1, label %if.end42.i | |
i32 2, label %sw.bb32.i | |
] | |
sw.bb32.i: ; preds = %if.end31.i | |
%33 = bitcast %struct.HEADER addrspace(200)* %23 to i96 addrspace(200)* | |
%bf.load33.i = load i96, i96 addrspace(200)* %33, align 4 | |
%bf.cast35256.i = and i96 %bf.load33.i, 276701161105643274240 | |
%cmp36.i = icmp eq i96 %bf.cast35256.i, 36893488147419103232 | |
br i1 %cmp36.i, label %if.end42.i, label %res_searchN.exit.thread | |
if.end42.i: ; preds = %sw.bb32.i, %if.end31.i, %if.end31.i, %if.end15.i | |
%saved_herrno.0.i = phi i32 [ -1, %if.end15.i ], [ 2, %sw.bb32.i ], [ %32, %if.end31.i ], [ %32, %if.end31.i ] | |
%tried_as_is.0.i = phi i32 [ 0, %if.end15.i ], [ 1, %sw.bb32.i ], [ 1, %if.end31.i ], [ 1, %if.end31.i ] | |
%34 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
br i1 %tobool8341.i, label %land.lhs.true50.i, label %land.lhs.true44.i | |
land.lhs.true44.i: ; preds = %if.end42.i | |
%and.i = and i64 %34, 128 | |
%tobool45.i = icmp eq i64 %and.i, 0 | |
br i1 %tobool45.i, label %if.end119.i, label %if.then54.i | |
land.lhs.true50.i: ; preds = %if.end42.i | |
%and52.i = and i64 %34, 512 | |
%tobool53.i = icmp eq i64 %and52.i, 0 | |
br i1 %tobool53.i, label %if.end119.i, label %if.then54.i | |
if.then54.i: ; preds = %land.lhs.true50.i, %land.lhs.true44.i | |
%arraydecay55.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 6, i64 0 | |
%35 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %arraydecay55.i, align 16, !tbaa !10 | |
%tobool57312.i = icmp eq i8 addrspace(200)* %35, null | |
br i1 %tobool57312.i, label %if.end119.i, label %for.body59.lr.ph.i | |
for.body59.lr.ph.i: ; preds = %if.then54.i | |
%tobool81.i = icmp ne i32 %tried_as_is.0.i, 0 | |
%36 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 0 | |
%res_h_errno94.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%37 = bitcast %struct.HEADER addrspace(200)* %23 to i96 addrspace(200)* | |
br label %for.body59.i | |
for.body59.i: ; preds = %for.inc116.i, %for.body59.lr.ph.i | |
%38 = phi i8 addrspace(200)* [ %35, %for.body59.lr.ph.i ], [ %47, %for.inc116.i ] | |
%root_on_list.0317.i = phi i32 [ 0, %for.body59.lr.ph.i ], [ %root_on_list.1.i, %for.inc116.i ] | |
%got_servfail.0316.i = phi i32 [ 0, %for.body59.lr.ph.i ], [ %got_servfail.3.i, %for.inc116.i ] | |
%got_nodata.0314.i = phi i32 [ 0, %for.body59.lr.ph.i ], [ %got_nodata.2.i, %for.inc116.i ] | |
%domain.0313.i = phi i8 addrspace(200)* addrspace(200)* [ %arraydecay55.i, %for.body59.lr.ph.i ], [ %incdec.ptr117.i, %for.inc116.i ] | |
%39 = load i8, i8 addrspace(200)* %38, align 1, !tbaa !36 | |
switch i8 %39, label %if.end78.i [ | |
i8 0, label %if.then76.i | |
i8 46, label %land.lhs.true70.i | |
] | |
land.lhs.true70.i: ; preds = %for.body59.i | |
%arrayidx72.i = getelementptr inbounds i8, i8 addrspace(200)* %38, i64 1 | |
%40 = load i8, i8 addrspace(200)* %arrayidx72.i, align 1, !tbaa !36 | |
%cmp74.i = icmp eq i8 %40, 0 | |
br i1 %cmp74.i, label %if.then76.i, label %if.end78.i | |
if.then76.i: ; preds = %land.lhs.true70.i, %for.body59.i | |
%inc77.i = add nsw i32 %root_on_list.0317.i, 1 | |
br label %if.end78.i | |
if.end78.i: ; preds = %if.then76.i, %land.lhs.true70.i, %for.body59.i | |
%root_on_list.1.i = phi i32 [ %inc77.i, %if.then76.i ], [ %root_on_list.0317.i, %land.lhs.true70.i ], [ %root_on_list.0317.i, %for.body59.i ] | |
%tobool79.i = icmp ne i32 %root_on_list.1.i, 0 | |
%or.cond177.i = and i1 %tobool81.i, %tobool79.i | |
br i1 %or.cond177.i, label %for.inc116.i, label %if.else11.i.i | |
if.else11.i.i: ; preds = %if.end78.i | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %36) #18 | |
%call.i277.i = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%call13.i.i = call i64 @strlen(i8 addrspace(200)* nonnull %38) #22 | |
%add.i.i = add i64 %call.i277.i, 1 | |
%add14.i.i = add i64 %add.i.i, %call13.i.i | |
%cmp15.i.i = icmp ugt i64 %add14.i.i, 1024 | |
br i1 %cmp15.i.i, label %res_querydomainN.exit293.thread.i, label %res_querydomainN.exit293.i | |
res_querydomainN.exit293.thread.i: ; preds = %if.else11.i.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %36) #18 | |
br label %if.end88.i | |
res_querydomainN.exit293.i: ; preds = %if.else11.i.i | |
%call20.i.i = call signext i32 (i8 addrspace(200)*, i64, i8 addrspace(200)*, ...) @snprintf(i8 addrspace(200)* nonnull %36, i64 zeroext 1025, i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.19, i64 0, i64 0), i8 addrspace(200)* nonnull %9, i8 addrspace(200)* nonnull %38) #18 | |
%call22.i290.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* nonnull %36, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %36) #18 | |
%cmp85.i = icmp sgt i32 %call22.i290.i, 0 | |
br i1 %cmp85.i, label %res_searchN.exit.thread152, label %if.end88.i | |
if.end88.i: ; preds = %res_querydomainN.exit293.i, %res_querydomainN.exit293.thread.i | |
%call89.i = call i32 addrspace(200)* @__error() #18 | |
%41 = load i32, i32 addrspace(200)* %call89.i, align 4, !tbaa !22 | |
%cmp90.i = icmp eq i32 %41, 61 | |
br i1 %cmp90.i, label %if.then92.i, label %if.end93.i | |
if.then92.i: ; preds = %if.end88.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 2) #18 | |
br label %res_searchN.exit.thread | |
if.end93.i: ; preds = %if.end88.i | |
%42 = load i32, i32 addrspace(200)* %res_h_errno94.i, align 16, !tbaa !62 | |
switch i32 %42, label %sw.default107.i [ | |
i32 4, label %sw.bb95.i | |
i32 1, label %sw.epilog109.i | |
i32 2, label %sw.bb97.i | |
] | |
sw.bb95.i: ; preds = %if.end93.i | |
%inc96.i = add nsw i32 %got_nodata.0314.i, 1 | |
br label %sw.epilog109.i | |
sw.bb97.i: ; preds = %if.end93.i | |
%inc98.i = add nsw i32 %got_servfail.0316.i, 1 | |
%bf.load99.i = load i96, i96 addrspace(200)* %37, align 4 | |
%bf.cast102255.i = and i96 %bf.load99.i, 276701161105643274240 | |
%cmp103.i = icmp eq i96 %bf.cast102255.i, 36893488147419103232 | |
br i1 %cmp103.i, label %sw.epilog109.i, label %sw.default107.i | |
sw.default107.i: ; preds = %sw.bb97.i, %if.end93.i | |
%got_servfail.1.i = phi i32 [ %got_servfail.0316.i, %if.end93.i ], [ %inc98.i, %sw.bb97.i ] | |
br label %sw.epilog109.i | |
sw.epilog109.i: ; preds = %sw.default107.i, %sw.bb97.i, %sw.bb95.i, %if.end93.i | |
%got_nodata.1.i = phi i32 [ %got_nodata.0314.i, %sw.default107.i ], [ %got_nodata.0314.i, %sw.bb97.i ], [ %got_nodata.0314.i, %if.end93.i ], [ %inc96.i, %sw.bb95.i ] | |
%got_servfail.2.i = phi i32 [ %got_servfail.1.i, %sw.default107.i ], [ %inc98.i, %sw.bb97.i ], [ %got_servfail.0316.i, %if.end93.i ], [ %got_servfail.0316.i, %sw.bb95.i ] | |
%done.1.i = phi i32 [ 1, %sw.default107.i ], [ 0, %sw.bb97.i ], [ 0, %if.end93.i ], [ 0, %sw.bb95.i ] | |
%43 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and111.i = lshr i64 %43, 9 | |
%44 = trunc i64 %and111.i to i32 | |
%45 = and i32 %44, 1 | |
%46 = xor i32 %45, 1 | |
%spec.select257.i = add nuw nsw i32 %46, %done.1.i | |
br label %for.inc116.i | |
for.inc116.i: ; preds = %sw.epilog109.i, %if.end78.i | |
%got_nodata.2.i = phi i32 [ %got_nodata.0314.i, %if.end78.i ], [ %got_nodata.1.i, %sw.epilog109.i ] | |
%got_servfail.3.i = phi i32 [ %got_servfail.0316.i, %if.end78.i ], [ %got_servfail.2.i, %sw.epilog109.i ] | |
%done.2.i = phi i32 [ 0, %if.end78.i ], [ %spec.select257.i, %sw.epilog109.i ] | |
%incdec.ptr117.i = getelementptr inbounds i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %domain.0313.i, i64 1 | |
%47 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %incdec.ptr117.i, align 16, !tbaa !10 | |
%tobool57.i = icmp ne i8 addrspace(200)* %47, null | |
%tobool58.i = icmp eq i32 %done.2.i, 0 | |
%48 = and i1 %tobool58.i, %tobool57.i | |
br i1 %48, label %for.body59.i, label %if.end119.i | |
if.end119.i: ; preds = %for.inc116.i, %if.then54.i, %land.lhs.true50.i, %land.lhs.true44.i | |
%got_nodata.3.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ %got_nodata.2.i, %for.inc116.i ] | |
%got_servfail.4.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ %got_servfail.3.i, %for.inc116.i ] | |
%root_on_list.3.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ %root_on_list.1.i, %for.inc116.i ] | |
%searched.2.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ 1, %for.inc116.i ] | |
%res_h_errno120.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%49 = load i32, i32 addrspace(200)* %res_h_errno120.i, align 16, !tbaa !62 | |
switch i32 %49, label %giveup.i [ | |
i32 4, label %sw.epilog132.i | |
i32 1, label %sw.epilog132.i | |
i32 2, label %sw.bb122.i | |
] | |
sw.bb122.i: ; preds = %if.end119.i | |
%50 = bitcast %struct.HEADER addrspace(200)* %23 to i96 addrspace(200)* | |
%bf.load123.i = load i96, i96 addrspace(200)* %50, align 4 | |
%bf.cast126254.i = and i96 %bf.load123.i, 276701161105643274240 | |
%cmp127.i = icmp eq i96 %bf.cast126254.i, 36893488147419103232 | |
br i1 %cmp127.i, label %sw.epilog132.i, label %giveup.i | |
sw.epilog132.i: ; preds = %sw.bb122.i, %if.end119.i, %if.end119.i | |
%tobool133.i = icmp eq i32 %dots.0.lcssa332337.i, 0 | |
%tobool135.i = icmp ne i32 %searched.2.i, 0 | |
%or.cond178.i = and i1 %tobool133.i, %tobool135.i | |
br i1 %or.cond178.i, label %lor.lhs.false136.i, label %land.lhs.true140.i | |
lor.lhs.false136.i: ; preds = %sw.epilog132.i | |
%51 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and138.i = and i64 %51, 1048576 | |
%tobool139.i = icmp eq i64 %and138.i, 0 | |
br i1 %tobool139.i, label %land.lhs.true140.i, label %giveup.i | |
land.lhs.true140.i: ; preds = %lor.lhs.false136.i, %sw.epilog132.i | |
%52 = or i32 %root_on_list.3.i, %tried_as_is.0.i | |
%53 = icmp eq i32 %52, 0 | |
br i1 %53, label %if.then144.i, label %giveup.i | |
if.then144.i: ; preds = %land.lhs.true140.i | |
%54 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %54) #18 | |
%call.i259.i = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%cmp1.i260.i = icmp ugt i64 %call.i259.i, 1024 | |
br i1 %cmp1.i260.i, label %res_querydomainN.exit275.thread.i, label %if.end.i263.i | |
res_querydomainN.exit275.thread.i: ; preds = %if.then144.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %54) #18 | |
br label %giveup.i | |
if.end.i263.i: ; preds = %if.then144.i | |
%cmp3.i262.i = icmp eq i64 %call.i259.i, 0 | |
br i1 %cmp3.i262.i, label %res_querydomainN.exit275.i, label %land.lhs.true.i267.i | |
land.lhs.true.i267.i: ; preds = %if.end.i263.i | |
%dec.i264.i = add nsw i64 %call.i259.i, -1 | |
%arrayidx.i265.i = getelementptr inbounds i8, i8 addrspace(200)* %9, i64 %dec.i264.i | |
%55 = load i8, i8 addrspace(200)* %arrayidx.i265.i, align 1, !tbaa !36 | |
%cmp4.i266.i = icmp eq i8 %55, 46 | |
br i1 %cmp4.i266.i, label %if.then6.i270.i, label %res_querydomainN.exit275.i | |
if.then6.i270.i: ; preds = %land.lhs.true.i267.i | |
%call8.i268.i = call i8 addrspace(200)* @strncpy(i8 addrspace(200)* nonnull %54, i8 addrspace(200)* nonnull %9, i64 zeroext %dec.i264.i) #18 | |
%arrayidx9.i269.i = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 %dec.i264.i | |
store i8 0, i8 addrspace(200)* %arrayidx9.i269.i, align 1, !tbaa !36 | |
br label %res_querydomainN.exit275.i | |
res_querydomainN.exit275.i: ; preds = %if.then6.i270.i, %land.lhs.true.i267.i, %if.end.i263.i | |
%longname.0.i271.i = phi i8 addrspace(200)* [ %54, %if.then6.i270.i ], [ %9, %if.end.i263.i ], [ %9, %land.lhs.true.i267.i ] | |
%call22.i272.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* %longname.0.i271.i, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %54) #18 | |
%cmp146.i = icmp sgt i32 %call22.i272.i, 0 | |
br i1 %cmp146.i, label %res_searchN.exit.thread152, label %giveup.i | |
giveup.i: ; preds = %res_querydomainN.exit275.i, %res_querydomainN.exit275.thread.i, %land.lhs.true140.i, %lor.lhs.false136.i, %sw.bb122.i, %if.end119.i | |
%cmp151.i = icmp eq i32 %saved_herrno.0.i, -1 | |
br i1 %cmp151.i, label %if.else.i, label %if.then153.i | |
if.then153.i: ; preds = %giveup.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext %saved_herrno.0.i) #18 | |
br label %res_searchN.exit.thread | |
if.else.i: ; preds = %giveup.i | |
%tobool154.i = icmp eq i32 %got_nodata.3.i, 0 | |
br i1 %tobool154.i, label %if.else156.i, label %if.then155.i | |
if.then155.i: ; preds = %if.else.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 4) #18 | |
br label %res_searchN.exit.thread | |
if.else156.i: ; preds = %if.else.i | |
%tobool157.i = icmp eq i32 %got_servfail.4.i, 0 | |
br i1 %tobool157.i, label %res_searchN.exit.thread, label %if.then158.i | |
if.then158.i: ; preds = %if.else156.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 2) #18 | |
br label %res_searchN.exit.thread | |
res_searchN.exit.thread: ; preds = %if.then30.i, %sw.bb32.i, %if.end31.i, %if.else156.i, %if.then155.i, %if.then158.i, %if.then153.i, %if.then92.i | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
br label %if.then46 | |
res_searchN.exit.thread152: ; preds = %res_querydomainN.exit293.i, %res_querydomainN.exit275.i | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
br label %if.end47 | |
res_searchN.exit: ; preds = %if.then13.i, %res_querydomainN.exit.i | |
%retval.1.i = phi i32 [ %call14.i, %if.then13.i ], [ %retval.0.i.i, %res_querydomainN.exit.i ] | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
%cmp45 = icmp slt i32 %retval.1.i, 0 | |
br i1 %cmp45, label %if.then46, label %if.end47 | |
if.then46: ; preds = %res_searchN.exit.thread, %res_searchN.exit | |
call void @free(i8 addrspace(200)* nonnull %call3) | |
call void @free(i8 addrspace(200)* nonnull %call4) | |
br label %cleanup | |
if.end47: ; preds = %res_searchN.exit.thread152, %res_searchN.exit | |
%next48 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 0 | |
%56 = load %struct.res_target addrspace(200)*, %struct.res_target addrspace(200)* addrspace(200)* %next48, align 16, !tbaa !58 | |
%tobool49 = icmp eq %struct.res_target addrspace(200)* %56, null | |
br i1 %tobool49, label %if.then69, label %if.then50 | |
if.then50: ; preds = %if.end47 | |
%n = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q2, i64 0, i32 6 | |
%57 = load i32, i32 addrspace(200)* %n, align 4, !tbaa !63 | |
%name51 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q2, i64 0, i32 1 | |
%58 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %name51, align 16, !tbaa !52 | |
%qtype52 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q2, i64 0, i32 3 | |
%59 = load i32, i32 addrspace(200)* %qtype52, align 4, !tbaa !55 | |
%call53 = call fastcc %struct.addrinfo addrspace(200)* @getanswer(%union.querybuf addrspace(200)* nonnull %16, i32 signext %57, i8 addrspace(200)* %58, i32 signext %59, %struct.addrinfo addrspace(200)* %pai.0, %struct.__res_state addrspace(200)* %call) | |
%cmp54 = icmp eq %struct.addrinfo addrspace(200)* %call53, null | |
br i1 %cmp54, label %if.then69, label %if.then55 | |
if.then55: ; preds = %if.then50 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call53, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
br label %while.cond | |
while.cond: ; preds = %while.cond, %if.then55 | |
%cur.0 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %if.then55 ], [ %60, %while.cond ] | |
%ai_next57 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0, i64 0, i32 7 | |
%60 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next57, align 16, !tbaa !3 | |
%tobool58 = icmp eq %struct.addrinfo addrspace(200)* %60, null | |
br i1 %tobool58, label %lor.lhs.false, label %while.cond | |
lor.lhs.false: ; preds = %while.cond | |
%61 = load i32, i32 addrspace(200)* %ai_family12, align 4, !tbaa !14 | |
%cmp64 = icmp eq i32 %61, 0 | |
br i1 %cmp64, label %lor.lhs.false65, label %if.then69 | |
lor.lhs.false65: ; preds = %lor.lhs.false | |
%ai_flags66 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai.0, i64 0, i32 0 | |
%62 = load i32, i32 addrspace(200)* %ai_flags66, align 16, !tbaa !13 | |
%and67 = and i32 %62, 2304 | |
%cmp68 = icmp eq i32 %and67, 2048 | |
br i1 %cmp68, label %if.end78, label %if.then69 | |
if.then69: ; preds = %if.end47, %if.then50, %lor.lhs.false65, %lor.lhs.false | |
%cur.1158 = phi %struct.addrinfo addrspace(200)* [ %cur.0, %lor.lhs.false65 ], [ %cur.0, %lor.lhs.false ], [ %sentinel, %if.then50 ], [ %sentinel, %if.end47 ] | |
%n70 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 6 | |
%63 = load i32, i32 addrspace(200)* %n70, align 4, !tbaa !63 | |
%name71 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 1 | |
%64 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %name71, align 16, !tbaa !52 | |
%qtype72 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 3 | |
%65 = load i32, i32 addrspace(200)* %qtype72, align 4, !tbaa !55 | |
%call73 = call fastcc %struct.addrinfo addrspace(200)* @getanswer(%union.querybuf addrspace(200)* nonnull %15, i32 signext %63, i8 addrspace(200)* %64, i32 signext %65, %struct.addrinfo addrspace(200)* %pai.0, %struct.__res_state addrspace(200)* %call) | |
%cmp74 = icmp eq %struct.addrinfo addrspace(200)* %call73, null | |
br i1 %cmp74, label %if.end78, label %if.then75 | |
if.then75: ; preds = %if.then69 | |
%ai_next76 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1158, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call73, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next76, align 16, !tbaa !3 | |
br label %if.end78 | |
if.end78: ; preds = %if.then69, %lor.lhs.false65, %if.then75 | |
call void @free(i8 addrspace(200)* nonnull %call3) | |
call void @free(i8 addrspace(200)* nonnull %call4) | |
%ai_next79 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%66 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next79, align 16, !tbaa !3 | |
%cmp80 = icmp eq %struct.addrinfo addrspace(200)* %66, null | |
br i1 %cmp80, label %if.then81, label %if.end85 | |
if.then81: ; preds = %if.end78 | |
%res_h_errno = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%67 = load i32, i32 addrspace(200)* %res_h_errno, align 16, !tbaa !62 | |
switch i32 %67, label %sw.default84 [ | |
i32 1, label %cleanup | |
i32 4, label %cleanup | |
i32 2, label %sw.bb83 | |
] | |
sw.bb83: ; preds = %if.then81 | |
br label %cleanup | |
sw.default84: ; preds = %if.then81 | |
br label %cleanup | |
if.end85: ; preds = %if.end78 | |
%68 = bitcast i8 addrspace(200)* %rv to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* %66, %struct.addrinfo addrspace(200)* addrspace(200)* %68, align 16, !tbaa !10 | |
br label %cleanup | |
cleanup: ; preds = %if.then81, %if.then81, %if.end85, %sw.default84, %sw.bb83, %if.then46, %if.then42, %sw.default, %if.then6, %if.then | |
%retval.0 = phi i32 [ 2, %sw.default ], [ 4, %if.then42 ], [ 4, %if.then46 ], [ 2, %sw.default84 ], [ 8, %sw.bb83 ], [ 1, %if.end85 ], [ 4, %if.then6 ], [ 4, %if.then ], [ 4, %if.then81 ], [ 4, %if.then81 ] | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nounwind uwtable | |
define internal signext i32 @_yp_getaddrinfo(i8 addrspace(200)* nocapture %rv, i8 addrspace(200)* nocapture readnone %cb_data, i8 addrspace(200)* %ap) addrspace(200) #0 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ypbuf = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%ypbuflen = alloca i32, align 4, addrspace(200) | |
%ypdomain = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%ai4 = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast i8 addrspace(200)* addrspace(200)* %ypbuf to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
%2 = bitcast i32 addrspace(200)* %ypbuflen to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 4, i8 addrspace(200)* nonnull %2) #18 | |
%3 = bitcast i8 addrspace(200)* addrspace(200)* %ypdomain to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %3) #18 | |
%call = call signext i32 @_yp_check(i8 addrspace(200)* addrspace(200)* nonnull %ypdomain) #18 | |
%cmp = icmp eq i32 %call, 0 | |
br i1 %cmp, label %cleanup95, label %if.end | |
if.end: ; preds = %entry | |
%4 = call i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)* %ap) | |
%5 = add i64 %4, 15 | |
%6 = and i64 %5, -16 | |
%7 = call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* %ap, i64 %6) | |
%argp.next = getelementptr inbounds i8, i8 addrspace(200)* %7, i64 16 | |
%8 = bitcast i8 addrspace(200)* %7 to i8 addrspace(200)* addrspace(200)* | |
%9 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %8, align 16 | |
%10 = add i64 %6, 31 | |
%11 = and i64 %10, -16 | |
%12 = call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* nonnull %argp.next, i64 %11) | |
%13 = bitcast i8 addrspace(200)* %12 to %struct.addrinfo addrspace(200)* addrspace(200)* | |
%14 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %13, align 16 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%15 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypdomain, align 16, !tbaa !10 | |
%call3 = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%conv = trunc i64 %call3 to i32 | |
%call4 = call signext i32 @yp_match(i8 addrspace(200)* %15, i8 addrspace(200)* getelementptr inbounds ([15 x i8], [15 x i8] addrspace(200)* @.str.20, i64 0, i64 0), i8 addrspace(200)* %9, i32 signext %conv, i8 addrspace(200)* addrspace(200)* nonnull %ypbuf, i32 addrspace(200)* nonnull %ypbuflen) #18 | |
%cmp5 = icmp eq i32 %call4, 0 | |
br i1 %cmp5, label %if.then7, label %if.end37 | |
if.then7: ; preds = %if.end | |
%16 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
%call8 = call fastcc %struct.addrinfo addrspace(200)* @_yphostent(i8 addrspace(200)* %16, %struct.addrinfo addrspace(200)* %14) | |
%tobool = icmp eq %struct.addrinfo addrspace(200)* %call8, null | |
br i1 %tobool, label %if.end15.thread145, label %if.then9 | |
if.end15.thread145: ; preds = %if.then7 | |
%17 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
call void @free(i8 addrspace(200)* %17) | |
br label %if.end37 | |
if.then9: ; preds = %if.then7 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call8, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
br label %while.cond | |
while.cond: ; preds = %while.cond, %if.then9 | |
%cur.0 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %if.then9 ], [ %18, %while.cond ] | |
%ai_next11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0, i64 0, i32 7 | |
%18 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next11, align 16, !tbaa !3 | |
%tobool12 = icmp eq %struct.addrinfo addrspace(200)* %18, null | |
br i1 %tobool12, label %if.end15, label %while.cond | |
if.end15: ; preds = %while.cond | |
%19 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
call void @free(i8 addrspace(200)* %19) | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %call8, i64 0, i32 1 | |
%20 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
switch i32 %20, label %if.end37 [ | |
i32 2, label %done | |
i32 28, label %sw.bb19 | |
] | |
sw.bb19: ; preds = %if.end15 | |
%ai_addr = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %call8, i64 0, i32 6 | |
%21 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr to %struct.sockaddr_in6 addrspace(200)* addrspace(200)* | |
%22 = load %struct.sockaddr_in6 addrspace(200)*, %struct.sockaddr_in6 addrspace(200)* addrspace(200)* %21, align 16, !tbaa !12 | |
%arrayidx = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %22, i64 0, i32 4, i32 0, i32 0, i64 0 | |
%23 = load i32, i32 addrspace(200)* %arrayidx, align 4, !tbaa !36 | |
%cmp20 = icmp eq i32 %23, 0 | |
br i1 %cmp20, label %land.lhs.true, label %if.end37 | |
land.lhs.true: ; preds = %sw.bb19 | |
%arrayidx25 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %22, i64 0, i32 4, i32 0, i32 0, i64 1 | |
%24 = load i32, i32 addrspace(200)* %arrayidx25, align 4, !tbaa !36 | |
%cmp26 = icmp eq i32 %24, 0 | |
br i1 %cmp26, label %land.lhs.true28, label %if.end37 | |
land.lhs.true28: ; preds = %land.lhs.true | |
%arrayidx32 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %22, i64 0, i32 4, i32 0, i32 0, i64 2 | |
%25 = load i32, i32 addrspace(200)* %arrayidx32, align 4, !tbaa !36 | |
%cmp33 = icmp eq i32 %25, 65535 | |
br i1 %cmp33, label %done, label %if.end37 | |
if.end37: ; preds = %if.end, %sw.bb19, %land.lhs.true, %land.lhs.true28, %if.end15, %if.end15.thread145 | |
%cur.2144 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %if.end15.thread145 ], [ %cur.0, %if.end15 ], [ %cur.0, %land.lhs.true28 ], [ %cur.0, %land.lhs.true ], [ %cur.0, %sw.bb19 ], [ %sentinel, %if.end ] | |
%ai.0143 = phi %struct.addrinfo addrspace(200)* [ null, %if.end15.thread145 ], [ %call8, %if.end15 ], [ %call8, %land.lhs.true28 ], [ %call8, %land.lhs.true ], [ %call8, %sw.bb19 ], [ null, %if.end ] | |
%ai_family38 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 1 | |
%26 = load i32, i32 addrspace(200)* %ai_family38, align 4, !tbaa !14 | |
switch i32 %26, label %done [ | |
i32 0, label %if.then59 | |
i32 2, label %if.then59 | |
i32 28, label %land.lhs.true48 | |
] | |
land.lhs.true48: ; preds = %if.end37 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 0 | |
%27 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %27, 2048 | |
%cmp49 = icmp eq i32 %and, 0 | |
br i1 %cmp49, label %done, label %land.lhs.true51 | |
land.lhs.true51: ; preds = %land.lhs.true48 | |
%cmp52 = icmp ne %struct.addrinfo addrspace(200)* %ai.0143, null | |
%and56 = and i32 %27, 256 | |
%cmp57 = icmp eq i32 %and56, 0 | |
%or.cond = and i1 %cmp52, %cmp57 | |
br i1 %or.cond, label %done, label %if.then59 | |
if.then59: ; preds = %land.lhs.true51, %if.end37, %if.end37 | |
%28 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypdomain, align 16, !tbaa !10 | |
%call60 = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%conv61 = trunc i64 %call60 to i32 | |
%call62 = call signext i32 @yp_match(i8 addrspace(200)* %28, i8 addrspace(200)* getelementptr inbounds ([13 x i8], [13 x i8] addrspace(200)* @.str.21, i64 0, i64 0), i8 addrspace(200)* %9, i32 signext %conv61, i8 addrspace(200)* addrspace(200)* nonnull %ypbuf, i32 addrspace(200)* nonnull %ypbuflen) #18 | |
%cmp63 = icmp eq i32 %call62, 0 | |
br i1 %cmp63, label %if.then65, label %done | |
if.then65: ; preds = %if.then59 | |
%29 = bitcast %struct.addrinfo addrspace(200)* %ai4 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %29) #18 | |
%30 = bitcast %struct.addrinfo addrspace(200)* %14 to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %29, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %30, i64 80, i1 false), !tbaa.struct !21 | |
%31 = load i32, i32 addrspace(200)* %ai_family38, align 4, !tbaa !14 | |
%cmp67 = icmp eq i32 %31, 0 | |
br i1 %cmp67, label %if.then69, label %if.end71 | |
if.then69: ; preds = %if.then65 | |
%ai_family70 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai4, i64 0, i32 1 | |
store i32 2, i32 addrspace(200)* %ai_family70, align 4, !tbaa !14 | |
br label %if.end71 | |
if.end71: ; preds = %if.then69, %if.then65 | |
%32 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
%call72 = call fastcc %struct.addrinfo addrspace(200)* @_yphostent(i8 addrspace(200)* %32, %struct.addrinfo addrspace(200)* nonnull %ai4) | |
%tobool73 = icmp eq %struct.addrinfo addrspace(200)* %call72, null | |
br i1 %tobool73, label %if.end85, label %if.then74 | |
if.then74: ; preds = %if.end71 | |
%ai_next75 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.2144, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call72, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next75, align 16, !tbaa !3 | |
br label %land.rhs78 | |
land.rhs78: ; preds = %if.then74, %land.rhs78 | |
%cur.3 = phi %struct.addrinfo addrspace(200)* [ %cur.2144, %if.then74 ], [ %33, %land.rhs78 ] | |
%ai_next79 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.3, i64 0, i32 7 | |
%33 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next79, align 16, !tbaa !3 | |
%tobool80 = icmp eq %struct.addrinfo addrspace(200)* %33, null | |
br i1 %tobool80, label %if.end85, label %land.rhs78 | |
if.end85: ; preds = %land.rhs78, %if.end71 | |
%34 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
call void @free(i8 addrspace(200)* %34) | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %29) #18 | |
br label %done | |
done: ; preds = %land.lhs.true28, %if.end15, %land.lhs.true51, %if.end37, %land.lhs.true48, %if.end85, %if.then59 | |
%ai_next88 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%35 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next88, align 16, !tbaa !3 | |
%cmp89 = icmp eq %struct.addrinfo addrspace(200)* %35, null | |
br i1 %cmp89, label %if.then91, label %if.end93 | |
if.then91: ; preds = %done | |
%call92 = call %struct.__res_state addrspace(200)* @__res_state() #18 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call92, i32 signext 1) #18 | |
br label %cleanup95 | |
if.end93: ; preds = %done | |
%36 = bitcast i8 addrspace(200)* %rv to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* %35, %struct.addrinfo addrspace(200)* addrspace(200)* %36, align 16, !tbaa !10 | |
br label %cleanup95 | |
cleanup95: ; preds = %entry, %if.end93, %if.then91 | |
%retval.0 = phi i32 [ 4, %if.then91 ], [ 1, %if.end93 ], [ 2, %entry ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 4, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
declare signext i32 @_nsdispatch(i8 addrspace(200)*, %struct._ns_dtab addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, %struct._ns_src addrspace(200)*, ...) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind readnone willreturn | |
declare i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)*) addrspace(200) #5 | |
; Function Attrs: nounwind readnone willreturn | |
declare i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)*, i64) addrspace(200) #5 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nocapture %hostf, i8 addrspace(200)* nocapture readonly %name, %struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.addrinfo addrspace(200)* %cur) unnamed_addr addrspace(200) #0 { | |
entry: | |
%hints.i = alloca %struct.addrinfo, align 16, addrspace(200) | |
%res0.i = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%hostbuf.i = alloca [8192 x i8], align 1, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %hints.i to i8 addrspace(200)* | |
%1 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i to i8 addrspace(200)* | |
%2 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf.i, i64 0, i64 0 | |
%ai_family.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 1 | |
%ai_family45.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 1 | |
%ai_socktype.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 2 | |
%ai_protocol.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 3 | |
%ai_flags.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 0 | |
%ai_flags50.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
%ai_socktype63.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 2 | |
%ai_protocol65.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 3 | |
%3 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 4 | |
%4 = bitcast i32 addrspace(200)* %3 to i8 addrspace(200)* | |
br label %while.cond | |
while.cond.loopexit: ; preds = %land.rhs, %while.cond1 | |
br label %while.cond | |
while.cond: ; preds = %while.cond.loopexit, %entry | |
%cur.addr.0 = phi %struct.addrinfo addrspace(200)* [ %cur, %entry ], [ %cur.addr.1, %while.cond.loopexit ] | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.start.p200i8(i64 8192, i8 addrspace(200)* nonnull %2) #18 | |
%5 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool.i = icmp eq %struct.__sFILE addrspace(200)* %5, null | |
br i1 %tobool.i, label %land.lhs.true.i, label %if.end.i | |
land.lhs.true.i: ; preds = %while.cond | |
%call.i = call %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* getelementptr inbounds ([11 x i8], [11 x i8] addrspace(200)* @.str.13, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.14, i64 0, i64 0)) #18 | |
store %struct.__sFILE addrspace(200)* %call.i, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool1.i = icmp eq %struct.__sFILE addrspace(200)* %call.i, null | |
br i1 %tobool1.i, label %_gethtent.exit, label %if.end.i | |
if.end.i: ; preds = %land.lhs.true.i, %while.cond | |
%6 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%call2133.i = call i8 addrspace(200)* @fgets(i8 addrspace(200)* nonnull %2, i32 signext 8192, %struct.__sFILE addrspace(200)* %6) #18 | |
%tobool3134.i = icmp eq i8 addrspace(200)* %call2133.i, null | |
br i1 %tobool3134.i, label %_gethtent.exit, label %if.end5.i | |
if.end5.i: ; preds = %if.end.i, %again.backedge.i | |
%call2135.i = phi i8 addrspace(200)* [ %call2.i, %again.backedge.i ], [ %call2133.i, %if.end.i ] | |
%7 = load i8, i8 addrspace(200)* %call2135.i, align 1, !tbaa !36 | |
%cmp.i = icmp eq i8 %7, 35 | |
br i1 %cmp.i, label %again.backedge.i, label %if.end8.i | |
if.end8.i: ; preds = %if.end5.i | |
%call9.i = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %call2135.i, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.15, i64 0, i64 0)) #22 | |
%cmp10.i = icmp eq i8 addrspace(200)* %call9.i, null | |
br i1 %cmp10.i, label %if.end13.i, label %if.then12.i | |
if.then12.i: ; preds = %if.end8.i | |
store i8 0, i8 addrspace(200)* %call9.i, align 1, !tbaa !36 | |
br label %if.end13.i | |
if.end13.i: ; preds = %if.then12.i, %if.end8.i | |
%call14.i = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %call2135.i, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%tobool15.i = icmp eq i8 addrspace(200)* %call14.i, null | |
br i1 %tobool15.i, label %again.backedge.i, label %if.end17.i | |
if.end17.i: ; preds = %if.end13.i | |
%incdec.ptr.i = getelementptr inbounds i8, i8 addrspace(200)* %call14.i, i64 1 | |
store i8 0, i8 addrspace(200)* %call14.i, align 1, !tbaa !36 | |
br label %while.cond.outer.i | |
while.cond.outer.i: ; preds = %if.end39.i, %if.end17.i | |
%cname.0.ph.i = phi i8 addrspace(200)* [ %spec.select.i, %if.end39.i ], [ null, %if.end17.i ] | |
%cp.0.ph.i = phi i8 addrspace(200)* [ %cp.1.i, %if.end39.i ], [ %incdec.ptr.i, %if.end17.i ] | |
%tobool18127.i = icmp eq i8 addrspace(200)* %cp.0.ph.i, null | |
br i1 %tobool18127.i, label %again.backedge.i, label %land.rhs.i | |
land.rhs.i: ; preds = %while.cond.outer.i, %if.then27.i | |
%cp.0128.i = phi i8 addrspace(200)* [ %incdec.ptr28.i, %if.then27.i ], [ %cp.0.ph.i, %while.cond.outer.i ] | |
%8 = load i8, i8 addrspace(200)* %cp.0128.i, align 1, !tbaa !36 | |
switch i8 %8, label %if.end29.i [ | |
i8 0, label %again.backedge.i | |
i8 32, label %if.then27.i | |
i8 9, label %if.then27.i | |
] | |
if.then27.i: ; preds = %land.rhs.i, %land.rhs.i | |
%incdec.ptr28.i = getelementptr inbounds i8, i8 addrspace(200)* %cp.0128.i, i64 1 | |
br label %land.rhs.i | |
if.end29.i: ; preds = %land.rhs.i | |
%cmp30.i = icmp eq i8 addrspace(200)* %cname.0.ph.i, null | |
%spec.select.i = select i1 %cmp30.i, i8 addrspace(200)* %cp.0128.i, i8 addrspace(200)* %cname.0.ph.i | |
%call34.i = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %cp.0128.i, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%cmp35.i = icmp eq i8 addrspace(200)* %call34.i, null | |
br i1 %cmp35.i, label %if.end39.i, label %if.then37.i | |
if.then37.i: ; preds = %if.end29.i | |
%incdec.ptr38.i = getelementptr inbounds i8, i8 addrspace(200)* %call34.i, i64 1 | |
store i8 0, i8 addrspace(200)* %call34.i, align 1, !tbaa !36 | |
br label %if.end39.i | |
if.end39.i: ; preds = %if.then37.i, %if.end29.i | |
%cp.1.i = phi i8 addrspace(200)* [ %incdec.ptr38.i, %if.then37.i ], [ null, %if.end29.i ] | |
%call40.i = call signext i32 @strcasecmp(i8 addrspace(200)* %name, i8 addrspace(200)* nonnull %cp.0128.i) #22 | |
%cmp41.i = icmp eq i32 %call40.i, 0 | |
br i1 %cmp41.i, label %found.i, label %while.cond.outer.i | |
again.backedge.i: ; preds = %while.cond.outer.i, %while.body.i.i, %land.rhs.i, %if.then74.i, %if.end55.i, %if.end13.i, %if.end5.i | |
%9 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%call2.i = call i8 addrspace(200)* @fgets(i8 addrspace(200)* nonnull %2, i32 signext 8192, %struct.__sFILE addrspace(200)* %9) #18 | |
%tobool3.i = icmp eq i8 addrspace(200)* %call2.i, null | |
br i1 %tobool3.i, label %_gethtent.exit, label %if.end5.i | |
found.i: ; preds = %if.end39.i | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %4, i8 0, i64 64, i1 false) #18 | |
%10 = load i32, i32 addrspace(200)* %ai_family.i, align 4, !tbaa !14 | |
store i32 %10, i32 addrspace(200)* %ai_family45.i, align 4, !tbaa !14 | |
store i32 2, i32 addrspace(200)* %ai_socktype.i, align 8, !tbaa !15 | |
store i32 0, i32 addrspace(200)* %ai_protocol.i, align 4, !tbaa !41 | |
store i32 4, i32 addrspace(200)* %ai_flags.i, align 16, !tbaa !13 | |
%cmp47.i = icmp eq i32 %10, 28 | |
br i1 %cmp47.i, label %land.lhs.true49.i, label %if.end55.i | |
land.lhs.true49.i: ; preds = %found.i | |
%11 = load i32, i32 addrspace(200)* %ai_flags50.i, align 16, !tbaa !13 | |
%and.i = and i32 %11, 2048 | |
%cmp51.i = icmp eq i32 %and.i, 0 | |
br i1 %cmp51.i, label %if.end55.i, label %if.then53.i | |
if.then53.i: ; preds = %land.lhs.true49.i | |
store i32 2052, i32 addrspace(200)* %ai_flags.i, align 16, !tbaa !13 | |
br label %if.end55.i | |
if.end55.i: ; preds = %if.then53.i, %land.lhs.true49.i, %found.i | |
%call56.i = call signext i32 @getaddrinfo(i8 addrspace(200)* nonnull %call2135.i, i8 addrspace(200)* getelementptr inbounds ([2 x i8], [2 x i8] addrspace(200)* @.str.17, i64 0, i64 0), %struct.addrinfo addrspace(200)* nonnull %hints.i, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %res0.i) #18 | |
%tobool57.i = icmp eq i32 %call56.i, 0 | |
br i1 %tobool57.i, label %for.cond.preheader.i, label %again.backedge.i | |
for.cond.preheader.i: ; preds = %if.end55.i | |
%res.0129.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i, align 16, !tbaa !10 | |
%tobool60130.i = icmp eq %struct.addrinfo addrspace(200)* %res.0129.i, null | |
br i1 %tobool60130.i, label %for.end.i, label %for.body.i | |
for.body.i: ; preds = %for.cond.preheader.i, %for.inc.i | |
%res.0131.i = phi %struct.addrinfo addrspace(200)* [ %res.0.i, %for.inc.i ], [ %res.0129.i, %for.cond.preheader.i ] | |
%12 = load i32, i32 addrspace(200)* %ai_flags50.i, align 16, !tbaa !13 | |
%ai_flags62.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 0 | |
store i32 %12, i32 addrspace(200)* %ai_flags62.i, align 16, !tbaa !13 | |
%13 = load i32, i32 addrspace(200)* %ai_socktype63.i, align 8, !tbaa !15 | |
%ai_socktype64.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 2 | |
store i32 %13, i32 addrspace(200)* %ai_socktype64.i, align 8, !tbaa !15 | |
%14 = load i32, i32 addrspace(200)* %ai_protocol65.i, align 4, !tbaa !41 | |
%ai_protocol66.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 3 | |
store i32 %14, i32 addrspace(200)* %ai_protocol66.i, align 4, !tbaa !41 | |
%15 = load i32, i32 addrspace(200)* %ai_flags50.i, align 16, !tbaa !13 | |
%and68.i = and i32 %15, 2 | |
%tobool69.i = icmp eq i32 %and68.i, 0 | |
br i1 %tobool69.i, label %for.inc.i, label %if.then.i.i | |
if.then.i.i: ; preds = %for.body.i | |
%call.i.i = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* %spec.select.i) #18 | |
%ai_canonname.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i.i, i8 addrspace(200)* addrspace(200)* %ai_canonname.i.i, align 16, !tbaa !9 | |
%cmp2.i.i = icmp eq i8 addrspace(200)* %call.i.i, null | |
br i1 %cmp2.i.i, label %if.then74.i, label %for.inc.i | |
if.then74.i: ; preds = %if.then.i.i | |
%16 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i, align 16, !tbaa !10 | |
%cmp5.i.i = icmp eq %struct.addrinfo addrspace(200)* %16, null | |
br i1 %cmp5.i.i, label %again.backedge.i, label %while.body.i.i | |
while.body.i.i: ; preds = %if.then74.i, %while.body.i.i | |
%ai.addr.06.i.i = phi %struct.addrinfo addrspace(200)* [ %17, %while.body.i.i ], [ %16, %if.then74.i ] | |
%ai_next.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 7 | |
%17 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i.i, align 16, !tbaa !3 | |
%ai_canonname.i122.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 5 | |
%18 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i122.i, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %18) #18 | |
%19 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i.i to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %19) #18 | |
%cmp.i123.i = icmp eq %struct.addrinfo addrspace(200)* %17, null | |
br i1 %cmp.i123.i, label %again.backedge.i, label %while.body.i.i | |
for.inc.i: ; preds = %if.then.i.i, %for.body.i | |
%ai_next.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 7 | |
%res.0.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i, align 16, !tbaa !10 | |
%tobool60.i = icmp eq %struct.addrinfo addrspace(200)* %res.0.i, null | |
br i1 %tobool60.i, label %for.end.i, label %for.body.i | |
for.end.i: ; preds = %for.cond.preheader.i, %for.inc.i | |
%20 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i, align 16, !tbaa !10 | |
br label %_gethtent.exit | |
_gethtent.exit: ; preds = %again.backedge.i, %land.lhs.true.i, %if.end.i, %for.end.i | |
%retval.0.i = phi %struct.addrinfo addrspace(200)* [ %20, %for.end.i ], [ null, %land.lhs.true.i ], [ null, %if.end.i ], [ null, %again.backedge.i ] | |
call void @llvm.lifetime.end.p200i8(i64 8192, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%cmp = icmp eq %struct.addrinfo addrspace(200)* %retval.0.i, null | |
br i1 %cmp, label %while.end6, label %while.body | |
while.body: ; preds = %_gethtent.exit | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.addr.0, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %retval.0.i, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
br label %while.cond1 | |
while.cond1: ; preds = %land.rhs, %while.body | |
%cur.addr.1 = phi %struct.addrinfo addrspace(200)* [ %cur.addr.0, %while.body ], [ %21, %land.rhs ] | |
%tobool = icmp eq %struct.addrinfo addrspace(200)* %cur.addr.1, null | |
br i1 %tobool, label %while.cond.loopexit, label %land.rhs | |
land.rhs: ; preds = %while.cond1 | |
%ai_next2 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.addr.1, i64 0, i32 7 | |
%21 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next2, align 16, !tbaa !3 | |
%tobool3 = icmp eq %struct.addrinfo addrspace(200)* %21, null | |
br i1 %tobool3, label %while.cond.loopexit, label %while.cond1 | |
while.end6: ; preds = %_gethtent.exit | |
ret %struct.addrinfo addrspace(200)* %cur.addr.0 | |
} | |
; Function Attrs: nofree nounwind | |
declare noalias %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* nocapture readonly, i8 addrspace(200)* nocapture readonly) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind | |
declare void @rewind(%struct.__sFILE addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind | |
declare i8 addrspace(200)* @fgets(i8 addrspace(200)*, i32 signext, %struct.__sFILE addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind readonly | |
declare i8 addrspace(200)* @strpbrk(i8 addrspace(200)*, i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #15 | |
; Function Attrs: nofree nounwind readonly | |
declare signext i32 @strcasecmp(i8 addrspace(200)* nocapture, i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #15 | |
declare signext i32 @getaddrinfo(i8 addrspace(200)*, i8 addrspace(200)*, %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nofree nounwind | |
declare noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* nocapture readonly) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind | |
declare signext i32 @fclose(%struct.__sFILE addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
declare %struct.__res_state addrspace(200)* @__res_state() local_unnamed_addr addrspace(200) #13 | |
declare void @__h_errno_set(%struct.__res_state addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__res_ninit(%struct.__res_state addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @getanswer(%union.querybuf addrspace(200)* %answer, i32 signext %anslen, i8 addrspace(200)* nocapture readonly %qname, i32 signext %qtype, %struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.__res_state addrspace(200)* %res) unnamed_addr addrspace(200) #0 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ai = alloca %struct.addrinfo, align 16, addrspace(200) | |
%tbuf = alloca [1025 x i8], align 1, addrspace(200) | |
%hostbuf = alloca [8192 x i8], align 1, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%2 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %tbuf, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %2) #18 | |
%3 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 8192, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%arraydecay = getelementptr inbounds %union.querybuf, %union.querybuf addrspace(200)* %answer, i64 0, i32 0, i64 0 | |
%idx.ext = sext i32 %anslen to i64 | |
%add.ptr = getelementptr inbounds %union.querybuf, %union.querybuf addrspace(200)* %answer, i64 0, i32 0, i64 %idx.ext | |
switch i32 %qtype, label %cleanup [ | |
i32 1, label %sw.bb | |
i32 28, label %sw.bb | |
i32 255, label %sw.bb | |
] | |
sw.bb: ; preds = %entry, %entry, %entry | |
%4 = bitcast %union.querybuf addrspace(200)* %answer to i96 addrspace(200)* | |
%bf.load = load i96, i96 addrspace(200)* %4, align 4 | |
%bf.lshr = lshr i96 %bf.load, 32 | |
%5 = trunc i96 %bf.lshr to i32 | |
%conv1 = and i32 %5, 65535 | |
%add.ptr10 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf, i64 0, i64 8192 | |
%add.ptr13 = getelementptr inbounds %union.querybuf, %union.querybuf addrspace(200)* %answer, i64 0, i32 0, i64 12 | |
%conv7383 = and i96 %bf.load, 18446462598732840960 | |
%cmp = icmp eq i96 %conv7383, 281474976710656 | |
br i1 %cmp, label %if.end, label %if.then | |
if.then: ; preds = %sw.bb | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 3) #18 | |
br label %cleanup | |
if.end: ; preds = %sw.bb | |
%call = call signext i32 @__dn_expand(i8 addrspace(200)* %arraydecay, i8 addrspace(200)* %add.ptr, i8 addrspace(200)* nonnull %add.ptr13, i8 addrspace(200)* nonnull %3, i32 signext 8192) #18 | |
%cmp18 = icmp slt i32 %call, 0 | |
br i1 %cmp18, label %if.then21, label %lor.lhs.false | |
lor.lhs.false: ; preds = %if.end | |
%call20 = call signext i32 @__res_hnok(i8 addrspace(200)* nonnull %3) #18 | |
%tobool = icmp eq i32 %call20, 0 | |
br i1 %tobool, label %if.then21, label %if.end22 | |
if.then21: ; preds = %lor.lhs.false, %if.end | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 3) #18 | |
br label %cleanup | |
if.end22: ; preds = %lor.lhs.false | |
%add = add nuw nsw i32 %call, 4 | |
%idx.ext23 = sext i32 %add to i64 | |
%add.ptr24 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr13, i64 %idx.ext23 | |
%cmp25 = icmp eq i32 %qtype, 1 | |
%cmp28 = icmp eq i32 %qtype, 28 | |
%or.cond = or i1 %cmp25, %cmp28 | |
%cmp31 = icmp eq i32 %qtype, 255 | |
%or.cond249 = or i1 %cmp31, %or.cond | |
switch i32 %qtype, label %if.end43 [ | |
i32 255, label %if.then33 | |
i32 28, label %if.then33 | |
i32 1, label %if.then33 | |
] | |
if.then33: ; preds = %if.end22, %if.end22, %if.end22 | |
%call34 = call i64 @strlen(i8 addrspace(200)* nonnull %3) #22 | |
%6 = trunc i64 %call34 to i32 | |
%conv36 = add i32 %6, 1 | |
%cmp37 = icmp sgt i32 %conv36, 255 | |
br i1 %cmp37, label %if.then39, label %if.end40 | |
if.then39: ; preds = %if.then33 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 3) #18 | |
br label %cleanup | |
if.end40: ; preds = %if.then33 | |
%idx.ext41 = sext i32 %conv36 to i64 | |
%add.ptr42 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf, i64 0, i64 %idx.ext41 | |
br label %if.end43 | |
if.end43: ; preds = %if.end22, %if.end40 | |
%bp.0 = phi i8 addrspace(200)* [ %add.ptr42, %if.end40 ], [ %3, %if.end22 ] | |
%canonname.0 = phi i8 addrspace(200)* [ %3, %if.end40 ], [ null, %if.end22 ] | |
%qname.addr.0 = phi i8 addrspace(200)* [ %3, %if.end40 ], [ %qname, %if.end22 ] | |
%cmp44403 = icmp ne i32 %conv1, 0 | |
%cmp46404 = icmp ult i8 addrspace(200)* %add.ptr24, %add.ptr | |
%or.cond385405 = and i1 %cmp46404, %cmp44403 | |
br i1 %or.cond385405, label %while.body.lr.ph, label %if.end220 | |
while.body.lr.ph: ; preds = %if.end43 | |
%7 = bitcast %struct.addrinfo addrspace(200)* %pai to i8 addrspace(200)* | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 1 | |
br label %while.body | |
while.body: ; preds = %while.body.lr.ph, %while.cond.backedge | |
%dec424.in = phi i32 [ %conv1, %while.body.lr.ph ], [ %dec424, %while.cond.backedge ] | |
%haveanswer.0419 = phi i32 [ 0, %while.body.lr.ph ], [ %haveanswer.0.be, %while.cond.backedge ] | |
%cur.0415 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %while.body.lr.ph ], [ %cur.0.be, %while.cond.backedge ] | |
%canonname.1411 = phi i8 addrspace(200)* [ %canonname.0, %while.body.lr.ph ], [ %canonname.1.be, %while.cond.backedge ] | |
%cp.0410 = phi i8 addrspace(200)* [ %add.ptr24, %while.body.lr.ph ], [ %cp.0.be, %while.cond.backedge ] | |
%bp.1406 = phi i8 addrspace(200)* [ %bp.0, %while.body.lr.ph ], [ %bp.1.be, %while.cond.backedge ] | |
%dec424 = add nsw i32 %dec424.in, -1 | |
%8 = call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* nonnull %add.ptr10, i8 addrspace(200)* %bp.1406) | |
%conv51 = trunc i64 %8 to i32 | |
%call52 = call signext i32 @__dn_expand(i8 addrspace(200)* %arraydecay, i8 addrspace(200)* %add.ptr, i8 addrspace(200)* nonnull %cp.0410, i8 addrspace(200)* %bp.1406, i32 signext %conv51) #18 | |
%cmp53 = icmp slt i32 %call52, 0 | |
br i1 %cmp53, label %while.end208, label %lor.lhs.false55 | |
lor.lhs.false55: ; preds = %while.body | |
%call56 = call signext i32 @__res_hnok(i8 addrspace(200)* %bp.1406) #18 | |
%tobool57 = icmp eq i32 %call56, 0 | |
br i1 %tobool57, label %while.end208, label %if.end59 | |
while.cond.backedge: ; preds = %if.then73, %if.end116, %if.then130, %if.then136, %if.then145, %if.then154, %if.then163, %if.then181, %while.end | |
%bp.1.be = phi i8 addrspace(200)* [ %bp.1406, %if.then73 ], [ %add.ptr120, %if.end116 ], [ %bp.1406, %if.then145 ], [ %bp.1406, %if.then154 ], [ %bp.1406, %if.then163 ], [ %bp.2, %if.then181 ], [ %bp.2, %while.end ], [ %bp.1406, %if.then130 ], [ %bp.1406, %if.then136 ] | |
%cp.0.be = phi i8 addrspace(200)* [ %add.ptr75, %if.then73 ], [ %add.ptr103, %if.end116 ], [ %add.ptr147, %if.then145 ], [ %add.ptr156, %if.then154 ], [ %add.ptr165, %if.then163 ], [ %add.ptr183, %if.then181 ], [ %add.ptr201, %while.end ], [ %add.ptr132, %if.then130 ], [ %add.ptr138, %if.then136 ] | |
%canonname.1.be = phi i8 addrspace(200)* [ %canonname.1411, %if.then73 ], [ %bp.1406, %if.end116 ], [ %canonname.1411, %if.then145 ], [ %canonname.1411, %if.then154 ], [ %canonname.1411, %if.then163 ], [ %canonname.2, %if.then181 ], [ %canonname.2, %while.end ], [ %canonname.1411, %if.then130 ], [ %canonname.1411, %if.then136 ] | |
%cur.0.be = phi %struct.addrinfo addrspace(200)* [ %cur.0415, %if.then73 ], [ %cur.0415, %if.end116 ], [ %cur.0415, %if.then145 ], [ %cur.0415, %if.then154 ], [ %cur.0415, %if.then163 ], [ %cur.0415, %if.then181 ], [ %cur.1, %while.end ], [ %cur.0415, %if.then130 ], [ %cur.0415, %if.then136 ] | |
%haveanswer.0.be = phi i32 [ %haveanswer.0419, %if.then73 ], [ %haveanswer.0419, %if.end116 ], [ %haveanswer.0419, %if.then145 ], [ %haveanswer.0419, %if.then154 ], [ %haveanswer.0419, %if.then163 ], [ %haveanswer.0419, %if.then181 ], [ %spec.select387, %while.end ], [ %haveanswer.0419, %if.then130 ], [ %haveanswer.0419, %if.then136 ] | |
%had_error.0.be = phi i32 [ 0, %if.then73 ], [ 0, %if.end116 ], [ 0, %if.then145 ], [ 0, %if.then154 ], [ 0, %if.then163 ], [ 0, %if.then181 ], [ %inc190, %while.end ], [ 0, %if.then130 ], [ 0, %if.then136 ] | |
%cmp44 = icmp sgt i32 %dec424.in, 1 | |
%cmp46 = icmp ult i8 addrspace(200)* %cp.0.be, %add.ptr | |
%or.cond385 = and i1 %cmp46, %cmp44 | |
%tobool48 = icmp eq i32 %had_error.0.be, 0 | |
%or.cond386 = and i1 %or.cond385, %tobool48 | |
br i1 %or.cond386, label %while.body, label %while.end208 | |
if.end59: ; preds = %lor.lhs.false55 | |
%idx.ext60398 = zext i32 %call52 to i64 | |
%add.ptr61 = getelementptr inbounds i8, i8 addrspace(200)* %cp.0410, i64 %idx.ext60398 | |
%call62 = call zeroext i16 @_getshort(i8 addrspace(200)* %add.ptr61) #18 | |
%conv63 = zext i16 %call62 to i32 | |
%add.ptr64 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr61, i64 2 | |
%call65 = call zeroext i16 @_getshort(i8 addrspace(200)* nonnull %add.ptr64) #18 | |
%add.ptr67 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr64, i64 6 | |
%call68 = call zeroext i16 @_getshort(i8 addrspace(200)* nonnull %add.ptr67) #18 | |
%add.ptr70 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr67, i64 2 | |
%cmp71 = icmp eq i16 %call65, 1 | |
br i1 %cmp71, label %if.end76, label %if.then73 | |
if.then73: ; preds = %if.end59 | |
%idx.ext74 = zext i16 %call68 to i64 | |
%add.ptr75 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext74 | |
br label %while.cond.backedge | |
if.end76: ; preds = %if.end59 | |
%cmp86 = icmp eq i16 %call62, 5 | |
%or.cond253 = and i1 %or.cond249, %cmp86 | |
br i1 %or.cond253, label %if.then88, label %if.end121 | |
if.then88: ; preds = %if.end76 | |
%call92 = call signext i32 @__dn_expand(i8 addrspace(200)* %arraydecay, i8 addrspace(200)* %add.ptr, i8 addrspace(200)* nonnull %add.ptr70, i8 addrspace(200)* nonnull %2, i32 signext 1025) #18 | |
%cmp93 = icmp slt i32 %call92, 0 | |
br i1 %cmp93, label %while.end208, label %lor.lhs.false95 | |
lor.lhs.false95: ; preds = %if.then88 | |
%call97 = call signext i32 @__res_hnok(i8 addrspace(200)* nonnull %2) #18 | |
%tobool98 = icmp eq i32 %call97, 0 | |
br i1 %tobool98, label %while.end208, label %if.end101 | |
if.end101: ; preds = %lor.lhs.false95 | |
%call105 = call i64 @strlen(i8 addrspace(200)* nonnull %2) #22 | |
%9 = trunc i64 %call105 to i32 | |
%conv107 = add i32 %9, 1 | |
%conv108 = sext i32 %conv107 to i64 | |
%cmp109 = icmp slt i64 %8, %conv108 | |
%cmp112 = icmp sgt i32 %conv107, 255 | |
%or.cond254 = or i1 %cmp112, %cmp109 | |
br i1 %or.cond254, label %while.end208, label %if.end116 | |
if.end116: ; preds = %if.end101 | |
%idx.ext102399 = zext i32 %call92 to i64 | |
%add.ptr103 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext102399 | |
%call118 = call i64 @strlcpy(i8 addrspace(200)* %bp.1406, i8 addrspace(200)* nonnull %2, i64 zeroext %8) #18 | |
%add.ptr120 = getelementptr inbounds i8, i8 addrspace(200)* %bp.1406, i64 %conv108 | |
br label %while.cond.backedge | |
if.end121: ; preds = %if.end76 | |
br i1 %cmp31, label %if.then124, label %if.else | |
if.then124: ; preds = %if.end121 | |
switch i16 %call62, label %if.then130 [ | |
i16 1, label %sw.bb141 | |
i16 28, label %sw.bb141 | |
] | |
if.then130: ; preds = %if.then124 | |
%idx.ext131 = zext i16 %call68 to i64 | |
%add.ptr132 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext131 | |
br label %while.cond.backedge | |
if.else: ; preds = %if.end121 | |
%cmp134 = icmp eq i32 %conv63, %qtype | |
br i1 %cmp134, label %if.end140, label %if.then136 | |
if.then136: ; preds = %if.else | |
%idx.ext137 = zext i16 %call68 to i64 | |
%add.ptr138 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext137 | |
br label %while.cond.backedge | |
if.end140: ; preds = %if.else | |
switch i16 %call62, label %sw.default202 [ | |
i16 1, label %sw.bb141 | |
i16 28, label %sw.bb141 | |
] | |
sw.bb141: ; preds = %if.then124, %if.then124, %if.end140, %if.end140 | |
%call142 = call signext i32 @strcasecmp(i8 addrspace(200)* %canonname.1411, i8 addrspace(200)* %bp.1406) #22 | |
%cmp143 = icmp eq i32 %call142, 0 | |
br i1 %cmp143, label %if.end148, label %if.then145 | |
if.then145: ; preds = %sw.bb141 | |
%idx.ext146 = zext i16 %call68 to i64 | |
%add.ptr147 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext146 | |
br label %while.cond.backedge | |
if.end148: ; preds = %sw.bb141 | |
%cmp149 = icmp eq i16 %call62, 1 | |
%cmp152 = icmp ne i16 %call68, 4 | |
%or.cond256 = and i1 %cmp149, %cmp152 | |
br i1 %or.cond256, label %if.then154, label %if.end157 | |
if.then154: ; preds = %if.end148 | |
%idx.ext155 = zext i16 %call68 to i64 | |
%add.ptr156 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext155 | |
br label %while.cond.backedge | |
if.end157: ; preds = %if.end148 | |
%cmp158 = icmp eq i16 %call62, 28 | |
%cmp161 = icmp ne i16 %call68, 16 | |
%or.cond257 = and i1 %cmp158, %cmp161 | |
br i1 %or.cond257, label %if.then163, label %if.end166 | |
if.then163: ; preds = %if.end157 | |
%idx.ext164 = zext i16 %call68 to i64 | |
%add.ptr165 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext164 | |
br label %while.cond.backedge | |
if.end166: ; preds = %if.end157 | |
%tobool167 = icmp eq i32 %haveanswer.0419, 0 | |
br i1 %tobool167, label %if.then168, label %if.end174 | |
if.then168: ; preds = %if.end166 | |
%call169 = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %bp.1406) #22 | |
%conv171 = shl i64 %call169, 32 | |
%sext = add i64 %conv171, 4294967296 | |
%idx.ext172 = ashr exact i64 %sext, 32 | |
%add.ptr173 = getelementptr inbounds i8, i8 addrspace(200)* %bp.1406, i64 %idx.ext172 | |
br label %if.end174 | |
if.end174: ; preds = %if.end166, %if.then168 | |
%bp.2 = phi i8 addrspace(200)* [ %bp.1406, %if.end166 ], [ %add.ptr173, %if.then168 ] | |
%canonname.2 = phi i8 addrspace(200)* [ %canonname.1411, %if.end166 ], [ %bp.1406, %if.then168 ] | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %7, i64 80, i1 false), !tbaa.struct !21 | |
%cond = select i1 %cmp149, i32 2, i32 28 | |
store i32 %cond, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%call178 = call fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %cond) | |
%cmp179 = icmp eq %struct.afd addrspace(200)* %call178, null | |
br i1 %cmp179, label %if.then181, label %if.end184 | |
if.then181: ; preds = %if.end174 | |
%idx.ext182 = zext i16 %call68 to i64 | |
%add.ptr183 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext182 | |
br label %while.cond.backedge | |
if.end184: ; preds = %if.end174 | |
%call185 = call fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.afd addrspace(200)* nonnull %call178, i8 addrspace(200)* nonnull %add.ptr70) | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0415, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call185, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp187 = icmp eq %struct.addrinfo addrspace(200)* %call185, null | |
%inc190 = zext i1 %cmp187 to i32 | |
br label %while.cond192 | |
while.cond192: ; preds = %land.rhs194, %if.end184 | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %cur.0415, %if.end184 ], [ %10, %land.rhs194 ] | |
%tobool193 = icmp eq %struct.addrinfo addrspace(200)* %cur.1, null | |
br i1 %tobool193, label %while.end, label %land.rhs194 | |
land.rhs194: ; preds = %while.cond192 | |
%ai_next195 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1, i64 0, i32 7 | |
%10 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next195, align 16, !tbaa !3 | |
%tobool196 = icmp eq %struct.addrinfo addrspace(200)* %10, null | |
br i1 %tobool196, label %while.end, label %while.cond192 | |
while.end: ; preds = %land.rhs194, %while.cond192 | |
%idx.ext200 = zext i16 %call68 to i64 | |
%add.ptr201 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext200 | |
%tobool204 = xor i1 %cmp187, true | |
%inc206 = zext i1 %tobool204 to i32 | |
%spec.select387 = add nsw i32 %haveanswer.0419, %inc206 | |
br label %while.cond.backedge | |
sw.default202: ; preds = %if.end140 | |
call void @abort() #25 | |
unreachable | |
while.end208: ; preds = %if.then88, %lor.lhs.false95, %while.body, %lor.lhs.false55, %if.end101, %while.cond.backedge | |
%canonname.1.lcssa = phi i8 addrspace(200)* [ %canonname.1.be, %while.cond.backedge ], [ %canonname.1411, %if.end101 ], [ %canonname.1411, %lor.lhs.false55 ], [ %canonname.1411, %while.body ], [ %canonname.1411, %lor.lhs.false95 ], [ %canonname.1411, %if.then88 ] | |
%haveanswer.0.lcssa = phi i32 [ %haveanswer.0.be, %while.cond.backedge ], [ %haveanswer.0419, %if.end101 ], [ %haveanswer.0419, %lor.lhs.false55 ], [ %haveanswer.0419, %while.body ], [ %haveanswer.0419, %lor.lhs.false95 ], [ %haveanswer.0419, %if.then88 ] | |
%tobool209 = icmp eq i32 %haveanswer.0.lcssa, 0 | |
br i1 %tobool209, label %if.end220, label %if.then210 | |
if.then210: ; preds = %while.end208 | |
%tobool211 = icmp eq i8 addrspace(200)* %canonname.1.lcssa, null | |
%ai_next216 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%11 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next216, align 16, !tbaa !3 | |
%ai_flags.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
%12 = load i32, i32 addrspace(200)* %ai_flags.i, align 16, !tbaa !13 | |
%and.i = and i32 %12, 2 | |
%cmp.i = icmp eq i32 %and.i, 0 | |
br i1 %tobool211, label %if.then212, label %if.else215 | |
if.then212: ; preds = %if.then210 | |
br i1 %cmp.i, label %if.end218, label %if.then.i | |
if.then.i: ; preds = %if.then212 | |
%call.i = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* %qname.addr.0) #18 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %11, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
br label %if.end218 | |
if.else215: ; preds = %if.then210 | |
br i1 %cmp.i, label %if.end218, label %if.then.i394 | |
if.then.i394: ; preds = %if.else215 | |
%call.i391 = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* nonnull %canonname.1.lcssa) #18 | |
%ai_canonname.i392 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %11, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i391, i8 addrspace(200)* addrspace(200)* %ai_canonname.i392, align 16, !tbaa !9 | |
br label %if.end218 | |
if.end218: ; preds = %if.then.i, %if.then.i394, %if.else215, %if.then212 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 0) #18 | |
%13 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next216, align 16, !tbaa !3 | |
br label %cleanup | |
if.end220: ; preds = %if.end43, %while.end208 | |
%bf.load221 = load i96, i96 addrspace(200)* %4, align 4 | |
%conv226384 = and i96 %bf.load221, 281470681743360 | |
%cmp227 = icmp eq i96 %conv226384, 0 | |
%cond229 = select i1 %cmp227, i32 3, i32 4 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext %cond229) #18 | |
br label %cleanup | |
cleanup: ; preds = %entry, %if.end220, %if.end218, %if.then39, %if.then21, %if.then | |
%retval.0 = phi %struct.addrinfo addrspace(200)* [ null, %if.then ], [ null, %if.then21 ], [ null, %if.then39 ], [ %13, %if.end218 ], [ null, %if.end220 ], [ null, %entry ] | |
call void @llvm.lifetime.end.p200i8(i64 8192, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret %struct.addrinfo addrspace(200)* %retval.0 | |
} | |
declare i8 addrspace(200)* @__res_hostalias(%struct.__res_state addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc signext i32 @res_queryN(i8 addrspace(200)* %name, %struct.res_target addrspace(200)* %target, %struct.__res_state addrspace(200)* %res) unnamed_addr addrspace(200) #0 { | |
entry: | |
%call = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext 65536) #24 | |
%tobool = icmp eq i8 addrspace(200)* %call, null | |
br i1 %tobool, label %cleanup79.sink.split, label %for.cond.preheader | |
for.cond.preheader: ; preds = %entry | |
%tobool1168 = icmp eq %struct.res_target addrspace(200)* %target, null | |
br i1 %tobool1168, label %if.then74.thread, label %for.body.lr.ph | |
if.then74.thread: ; preds = %for.cond.preheader | |
tail call void @free(i8 addrspace(200)* nonnull %call) | |
br label %sw.bb76 | |
for.body.lr.ph: ; preds = %for.cond.preheader | |
%_flags = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %res, i64 0, i32 16 | |
%options = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %res, i64 0, i32 2 | |
br label %for.body | |
for.body: ; preds = %for.body.lr.ph, %for.inc | |
%t.0173 = phi %struct.res_target addrspace(200)* [ %target, %for.body.lr.ph ], [ %13, %for.inc ] | |
%rcode.0172 = phi i32 [ 0, %for.body.lr.ph ], [ %rcode.1.ph, %for.inc ] | |
%ancount.0169 = phi i32 [ 0, %for.body.lr.ph ], [ %ancount.1.ph, %for.inc ] | |
%answer2 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 4 | |
%0 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %answer2, align 16, !tbaa !56 | |
%qclass = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 2 | |
%1 = load i32, i32 addrspace(200)* %qclass, align 16, !tbaa !54 | |
%qtype = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 3 | |
%2 = load i32, i32 addrspace(200)* %qtype, align 4, !tbaa !55 | |
%anslen4 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 5 | |
%3 = load i32, i32 addrspace(200)* %anslen4, align 16, !tbaa !57 | |
%4 = load i32, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%5 = bitcast i8 addrspace(200)* %0 to i96 addrspace(200)* | |
%bf.load161 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.clear162 = and i96 %bf.load161, -276701161105643274241 | |
store i96 %bf.clear162, i96 addrspace(200)* %5, align 4 | |
%call5163 = tail call signext i32 @__res_nmkquery(%struct.__res_state addrspace(200)* %res, i32 signext 0, i8 addrspace(200)* %name, i32 signext %1, i32 signext %2, i8 addrspace(200)* null, i32 signext 0, i8 addrspace(200)* null, i8 addrspace(200)* nonnull %call, i32 signext 65536) #18 | |
%cmp164 = icmp sgt i32 %call5163, 0 | |
br i1 %cmp164, label %land.lhs.true, label %cleanup | |
land.lhs.true: ; preds = %for.body, %if.end34 | |
%call5165 = phi i32 [ %call5, %if.end34 ], [ %call5163, %for.body ] | |
%6 = load i32, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%and = and i32 %6, 4 | |
%cmp7 = icmp eq i32 %and, 0 | |
br i1 %cmp7, label %land.lhs.true8, label %if.end16 | |
land.lhs.true8: ; preds = %land.lhs.true | |
%7 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and9 = and i64 %7, 1075838976 | |
%cmp10 = icmp eq i64 %and9, 0 | |
br i1 %cmp10, label %if.end16, label %if.end13 | |
if.end13: ; preds = %land.lhs.true8 | |
%call12 = tail call signext i32 @__res_nopt(%struct.__res_state addrspace(200)* %res, i32 signext %call5165, i8 addrspace(200)* nonnull %call, i32 signext 65536, i32 signext %3) #18 | |
%cmp14 = icmp slt i32 %call12, 1 | |
br i1 %cmp14, label %cleanup, label %if.end16 | |
if.end16: ; preds = %land.lhs.true, %land.lhs.true8, %if.end13 | |
%n.0144 = phi i32 [ %call12, %if.end13 ], [ %call5165, %land.lhs.true8 ], [ %call5165, %land.lhs.true ] | |
%call17 = tail call signext i32 @__res_nsend(%struct.__res_state addrspace(200)* %res, i8 addrspace(200)* nonnull %call, i32 signext %n.0144, i8 addrspace(200)* %0, i32 signext %3) #18 | |
%cmp18 = icmp slt i32 %call17, 0 | |
br i1 %cmp18, label %if.then19, label %if.end38 | |
if.then19: ; preds = %if.end16 | |
%8 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and21 = and i64 %8, 1075838976 | |
%cmp22 = icmp eq i64 %and21, 0 | |
br i1 %cmp22, label %if.end35, label %land.lhs.true23 | |
land.lhs.true23: ; preds = %if.then19 | |
%9 = load i32, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%xor = xor i32 %9, %4 | |
%and25 = and i32 %xor, 4 | |
%cmp26 = icmp eq i32 %and25, 0 | |
br i1 %cmp26, label %if.end35, label %if.then27 | |
if.then27: ; preds = %land.lhs.true23 | |
%or = or i32 %9, 4 | |
store i32 %or, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%and30 = and i64 %8, 2 | |
%tobool31 = icmp eq i64 %and30, 0 | |
br i1 %tobool31, label %if.end34, label %if.then32 | |
if.then32: ; preds = %if.then27 | |
%puts = tail call i32 @puts(i8 addrspace(200)* nonnull dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8] addrspace(200)* @str.24, i64 0, i64 0)) | |
br label %if.end34 | |
if.end34: ; preds = %if.then27, %if.then32 | |
%bf.load = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.clear = and i96 %bf.load, -276701161105643274241 | |
store i96 %bf.clear, i96 addrspace(200)* %5, align 4 | |
%call5 = tail call signext i32 @__res_nmkquery(%struct.__res_state addrspace(200)* %res, i32 signext 0, i8 addrspace(200)* %name, i32 signext %1, i32 signext %2, i8 addrspace(200)* null, i32 signext 0, i8 addrspace(200)* null, i8 addrspace(200)* nonnull %call, i32 signext 65536) #18 | |
%cmp = icmp sgt i32 %call5, 0 | |
br i1 %cmp, label %land.lhs.true, label %cleanup | |
if.end35: ; preds = %land.lhs.true23, %if.then19 | |
%bf.load36 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.lshr = lshr i96 %bf.load36, 64 | |
%10 = trunc i96 %bf.lshr to i32 | |
%bf.cast = and i32 %10, 15 | |
br label %for.inc | |
if.end38: ; preds = %if.end16 | |
%cmp39 = icmp sgt i32 %call17, %3 | |
br i1 %cmp39, label %if.then40, label %if.end43 | |
if.then40: ; preds = %if.end38 | |
%bf.load41 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.clear42 = and i96 %bf.load41, -276701161105643274241 | |
%bf.set = or i96 %bf.clear42, 18446744073709551616 | |
store i96 %bf.set, i96 addrspace(200)* %5, align 4 | |
br label %if.end43 | |
if.end43: ; preds = %if.then40, %if.end38 | |
%bf.load44 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.cast47141 = and i96 %bf.load44, 276701161105643274240 | |
%cmp48 = icmp eq i96 %bf.cast47141, 0 | |
br i1 %cmp48, label %lor.lhs.false, label %if.then56 | |
lor.lhs.false: ; preds = %if.end43 | |
%bf.lshr50 = lshr i96 %bf.load44, 32 | |
%11 = trunc i96 %bf.lshr50 to i32 | |
%conv53 = and i32 %11, 65535 | |
%cmp54 = icmp eq i32 %conv53, 0 | |
br i1 %cmp54, label %if.then56, label %if.end61 | |
if.then56: ; preds = %if.end43, %lor.lhs.false | |
%bf.lshr58 = lshr i96 %bf.load44, 64 | |
%12 = trunc i96 %bf.lshr58 to i32 | |
%bf.cast60 = and i32 %12, 15 | |
br label %for.inc | |
if.end61: ; preds = %lor.lhs.false | |
%add = add nsw i32 %conv53, %ancount.0169 | |
%n68 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 6 | |
store i32 %call17, i32 addrspace(200)* %n68, align 4, !tbaa !63 | |
br label %for.inc | |
cleanup: ; preds = %for.body, %if.end13, %if.end34 | |
%n.0148 = phi i32 [ %call5, %if.end34 ], [ %call12, %if.end13 ], [ %call5163, %for.body ] | |
tail call void @free(i8 addrspace(200)* nonnull %call) | |
br label %cleanup79.sink.split | |
for.inc: ; preds = %if.end35, %if.then56, %if.end61 | |
%ancount.1.ph = phi i32 [ %add, %if.end61 ], [ %ancount.0169, %if.then56 ], [ %ancount.0169, %if.end35 ] | |
%rcode.1.ph = phi i32 [ %rcode.0172, %if.end61 ], [ %bf.cast60, %if.then56 ], [ %bf.cast, %if.end35 ] | |
%next = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 0 | |
%13 = load %struct.res_target addrspace(200)*, %struct.res_target addrspace(200)* addrspace(200)* %next, align 16, !tbaa !58 | |
%tobool1 = icmp eq %struct.res_target addrspace(200)* %13, null | |
br i1 %tobool1, label %for.end, label %for.body | |
for.end: ; preds = %for.inc | |
tail call void @free(i8 addrspace(200)* nonnull %call) | |
%cmp72 = icmp eq i32 %ancount.1.ph, 0 | |
br i1 %cmp72, label %if.then74, label %cleanup79 | |
if.then74: ; preds = %for.end | |
switch i32 %rcode.1.ph, label %sw.default [ | |
i32 3, label %cleanup79.sink.split | |
i32 2, label %sw.bb75 | |
i32 0, label %sw.bb76 | |
] | |
sw.bb75: ; preds = %if.then74 | |
br label %cleanup79.sink.split | |
sw.bb76: ; preds = %if.then74.thread, %if.then74 | |
br label %cleanup79.sink.split | |
sw.default: ; preds = %if.then74 | |
br label %cleanup79.sink.split | |
cleanup79.sink.split: ; preds = %if.then74, %entry, %sw.default, %sw.bb76, %sw.bb75, %cleanup | |
%.sink = phi i32 [ 3, %cleanup ], [ 2, %sw.bb75 ], [ 4, %sw.bb76 ], [ 3, %sw.default ], [ -1, %entry ], [ 1, %if.then74 ] | |
%retval.2.ph = phi i32 [ %n.0148, %cleanup ], [ -1, %sw.bb75 ], [ -1, %sw.bb76 ], [ -1, %sw.default ], [ -1, %entry ], [ -1, %if.then74 ] | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext %.sink) #18 | |
br label %cleanup79 | |
cleanup79: ; preds = %cleanup79.sink.split, %for.end | |
%retval.2 = phi i32 [ %ancount.1.ph, %for.end ], [ %retval.2.ph, %cleanup79.sink.split ] | |
ret i32 %retval.2 | |
} | |
declare signext i32 @__res_nmkquery(%struct.__res_state addrspace(200)*, i32 signext, i8 addrspace(200)*, i32 signext, i32 signext, i8 addrspace(200)*, i32 signext, i8 addrspace(200)*, i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__res_nopt(%struct.__res_state addrspace(200)*, i32 signext, i8 addrspace(200)*, i32 signext, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__res_nsend(%struct.__res_state addrspace(200)*, i8 addrspace(200)*, i32 signext, i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare i8 addrspace(200)* @strncpy(i8 addrspace(200)*, i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nofree nounwind | |
declare signext i32 @snprintf(i8 addrspace(200)* noalias nocapture, i64 zeroext, i8 addrspace(200)* nocapture readonly, ...) local_unnamed_addr addrspace(200) #4 | |
declare signext i32 @__res_hnok(i8 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__dn_expand(i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare zeroext i16 @_getshort(i8 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: noreturn | |
declare void @abort() local_unnamed_addr addrspace(200) #16 | |
declare signext i32 @_yp_check(i8 addrspace(200)* addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @yp_match(i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i32 signext, i8 addrspace(200)* addrspace(200)*, i32 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @_yphostent(i8 addrspace(200)* %line, %struct.addrinfo addrspace(200)* nocapture readonly %pai) unnamed_addr addrspace(200) #0 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%hints = alloca %struct.addrinfo, align 16, addrspace(200) | |
%res0 = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%2 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %res0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%3 = bitcast %struct.addrinfo addrspace(200)* %pai to i8 addrspace(200)* | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 0 | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 1 | |
%ai_flags31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
br label %nextline1 | |
nextline1: ; preds = %if.end64, %entry | |
%cur.0 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %entry ], [ %cur.2, %if.end64 ] | |
%p.0 = phi i8 addrspace(200)* [ %line, %entry ], [ %nextline.0, %if.end64 ] | |
%canonname.0 = phi i8 addrspace(200)* [ null, %entry ], [ %canonname.1.ph.lcssa, %if.end64 ] | |
%call = call i8 addrspace(200)* @strchr(i8 addrspace(200)* nonnull dereferenceable(1) %p.0, i32 signext 10) #22 | |
%tobool = icmp eq i8 addrspace(200)* %call, null | |
br i1 %tobool, label %if.end, label %if.then | |
if.then: ; preds = %nextline1 | |
%incdec.ptr = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 1 | |
store i8 0, i8 addrspace(200)* %call, align 1, !tbaa !36 | |
br label %if.end | |
if.end: ; preds = %nextline1, %if.then | |
%nextline.0 = phi i8 addrspace(200)* [ %incdec.ptr, %if.then ], [ null, %nextline1 ] | |
%call2 = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* %p.0, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%cmp = icmp eq i8 addrspace(200)* %call2, null | |
br i1 %cmp, label %if.then3, label %land.rhs.lr.ph | |
if.then3: ; preds = %if.end | |
%cmp4 = icmp eq i8 addrspace(200)* %canonname.0, null | |
br i1 %cmp4, label %cleanup, label %done | |
land.rhs.lr.ph: ; preds = %if.end, %if.end19 | |
%call23.sink = phi i8 addrspace(200)* [ %call23, %if.end19 ], [ %call2, %if.end ] | |
%canonname.1.ph123 = phi i8 addrspace(200)* [ %spec.select, %if.end19 ], [ %canonname.0, %if.end ] | |
store i8 0, i8 addrspace(200)* %call23.sink, align 1, !tbaa !36 | |
br label %land.rhs | |
land.rhs: ; preds = %land.rhs.backedge, %land.rhs.lr.ph | |
%call2.pn.pn = phi i8 addrspace(200)* [ %call23.sink, %land.rhs.lr.ph ], [ %cp.0120, %land.rhs.backedge ] | |
%cp.0120 = getelementptr inbounds i8, i8 addrspace(200)* %call2.pn.pn, i64 1 | |
%4 = load i8, i8 addrspace(200)* %cp.0120, align 1, !tbaa !36 | |
switch i8 %4, label %if.end19 [ | |
i8 0, label %while.end | |
i8 32, label %land.rhs.backedge | |
i8 9, label %land.rhs.backedge | |
] | |
land.rhs.backedge: ; preds = %land.rhs, %land.rhs | |
br label %land.rhs | |
if.end19: ; preds = %land.rhs | |
%tobool20 = icmp eq i8 addrspace(200)* %canonname.1.ph123, null | |
%spec.select = select i1 %tobool20, i8 addrspace(200)* %cp.0120, i8 addrspace(200)* %canonname.1.ph123 | |
%call23 = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %cp.0120, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%cmp24 = icmp eq i8 addrspace(200)* %call23, null | |
br i1 %cmp24, label %while.end, label %land.rhs.lr.ph | |
while.end: ; preds = %if.end19, %land.rhs | |
%canonname.1.ph.lcssa = phi i8 addrspace(200)* [ %canonname.1.ph123, %land.rhs ], [ %spec.select, %if.end19 ] | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %3, i64 80, i1 false), !tbaa.struct !21 | |
store i32 4, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%5 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp29 = icmp eq i32 %5, 28 | |
br i1 %cmp29, label %land.lhs.true, label %if.end36 | |
land.lhs.true: ; preds = %while.end | |
%6 = load i32, i32 addrspace(200)* %ai_flags31, align 16, !tbaa !13 | |
%and = and i32 %6, 2048 | |
%cmp32 = icmp eq i32 %and, 0 | |
br i1 %cmp32, label %if.end36, label %if.then34 | |
if.then34: ; preds = %land.lhs.true | |
store i32 2052, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
br label %if.end36 | |
if.end36: ; preds = %land.lhs.true, %if.then34, %while.end | |
%call37 = call signext i32 @getaddrinfo(i8 addrspace(200)* %p.0, i8 addrspace(200)* null, %struct.addrinfo addrspace(200)* nonnull %hints, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %res0) #18 | |
%cmp38 = icmp eq i32 %call37, 0 | |
br i1 %cmp38, label %for.cond.preheader, label %if.end51.thread | |
for.cond.preheader: ; preds = %if.end36 | |
%res.0125 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0, align 16, !tbaa !10 | |
%tobool41126 = icmp eq %struct.addrinfo addrspace(200)* %res.0125, null | |
br i1 %tobool41126, label %if.end64, label %for.body | |
for.body: ; preds = %for.cond.preheader, %for.inc | |
%res.0127 = phi %struct.addrinfo addrspace(200)* [ %res.0, %for.inc ], [ %res.0125, %for.cond.preheader ] | |
%7 = load i32, i32 addrspace(200)* %ai_flags31, align 16, !tbaa !13 | |
%ai_flags43 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0127, i64 0, i32 0 | |
store i32 %7, i32 addrspace(200)* %ai_flags43, align 16, !tbaa !13 | |
%8 = load i32, i32 addrspace(200)* %ai_flags31, align 16, !tbaa !13 | |
%and45 = and i32 %8, 2 | |
%tobool46 = icmp eq i32 %and45, 0 | |
br i1 %tobool46, label %for.inc, label %if.then.i | |
if.then.i: ; preds = %for.body | |
%call.i = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* %canonname.1.ph.lcssa) #18 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0127, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
br label %for.inc | |
for.inc: ; preds = %if.then.i, %for.body | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0127, i64 0, i32 7 | |
%res.0 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !10 | |
%tobool41 = icmp eq %struct.addrinfo addrspace(200)* %res.0, null | |
br i1 %tobool41, label %if.end51, label %for.body | |
if.end51.thread: ; preds = %if.end36 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %res0, align 16, !tbaa !10 | |
br label %if.end64 | |
if.end51: ; preds = %for.inc | |
%.pr.pr = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0, align 16, !tbaa !10 | |
%tobool52 = icmp eq %struct.addrinfo addrspace(200)* %.pr.pr, null | |
br i1 %tobool52, label %if.end64, label %if.then53 | |
if.then53: ; preds = %if.end51 | |
%ai_next54 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %.pr.pr, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next54, align 16, !tbaa !3 | |
br label %while.cond55 | |
while.cond55: ; preds = %land.rhs57, %if.then53 | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %cur.0, %if.then53 ], [ %9, %land.rhs57 ] | |
%tobool56 = icmp eq %struct.addrinfo addrspace(200)* %cur.1, null | |
br i1 %tobool56, label %if.end64, label %land.rhs57 | |
land.rhs57: ; preds = %while.cond55 | |
%ai_next58 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1, i64 0, i32 7 | |
%9 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next58, align 16, !tbaa !3 | |
%tobool59 = icmp eq %struct.addrinfo addrspace(200)* %9, null | |
br i1 %tobool59, label %if.end64, label %while.cond55 | |
if.end64: ; preds = %land.rhs57, %while.cond55, %for.cond.preheader, %if.end51.thread, %if.end51 | |
%cur.2 = phi %struct.addrinfo addrspace(200)* [ %cur.0, %if.end51 ], [ %cur.0, %if.end51.thread ], [ %cur.0, %for.cond.preheader ], [ null, %while.cond55 ], [ %cur.1, %land.rhs57 ] | |
%tobool65 = icmp eq i8 addrspace(200)* %nextline.0, null | |
br i1 %tobool65, label %done, label %nextline1 | |
done: ; preds = %if.end64, %if.then3 | |
%ai_next68 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%10 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next68, align 16, !tbaa !3 | |
br label %cleanup | |
cleanup: ; preds = %if.then3, %done | |
%retval.0 = phi %struct.addrinfo addrspace(200)* [ %10, %done ], [ null, %if.then3 ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret %struct.addrinfo addrspace(200)* %retval.0 | |
} | |
; Function Attrs: nofree nounwind readonly | |
declare i8 addrspace(200)* @strchr(i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #15 | |
; Function Attrs: nofree nounwind | |
declare i32 @puts(i8 addrspace(200)* nocapture readonly) local_unnamed_addr addrspace(200) #17 | |
attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #1 = { argmemonly nounwind willreturn writeonly } | |
attributes #2 = { nofree nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #3 = { argmemonly nounwind willreturn } | |
attributes #4 = { nofree nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #5 = { nounwind readnone willreturn } | |
attributes #6 = { noinline norecurse nounwind readonly uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #7 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #8 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "stackrealign" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #9 = { nofree nounwind allocsize(0,1) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #10 = { argmemonly nofree nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #11 = { nofree nounwind allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #12 = { nofree "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #13 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #14 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #15 = { nofree nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #16 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #17 = { nofree nounwind } | |
attributes #18 = { nounwind } | |
attributes #19 = { "frontend-memtransfer-type"="'struct addrinfo'" "must-preserve-cheri-tags" } | |
attributes #20 = { nounwind allocsize(0,1) } | |
attributes #21 = { nounwind "frontend-memtransfer-type"="'struct addrinfo'" "must-preserve-cheri-tags" } | |
attributes #22 = { nounwind readonly } | |
attributes #23 = { nounwind allocsize(0) } | |
attributes #24 = { allocsize(0) } | |
attributes #25 = { noreturn nounwind } | |
!llvm.module.flags = !{!0, !1} | |
!llvm.ident = !{!2} | |
!0 = !{i32 1, !"wchar_size", i32 4} | |
!1 = !{i32 7, !"PIC Level", i32 1} | |
!2 = !{!"clang version 11.0.0 "} | |
!3 = !{!4, !8, i64 64} | |
!4 = !{!"addrinfo", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12, !5, i64 16, !8, i64 32, !8, i64 48, !8, i64 64} | |
!5 = !{!"int", !6, i64 0} | |
!6 = !{!"omnipotent char", !7, i64 0} | |
!7 = !{!"Simple C/C++ TBAA"} | |
!8 = !{!"any pointer", !6, i64 0} | |
!9 = !{!4, !8, i64 32} | |
!10 = !{!8, !8, i64 0} | |
!11 = !{!4, !5, i64 16} | |
!12 = !{!4, !8, i64 48} | |
!13 = !{!4, !5, i64 0} | |
!14 = !{!4, !5, i64 4} | |
!15 = !{!4, !5, i64 8} | |
!16 = !{!17, !5, i64 12} | |
!17 = !{!"explore", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12} | |
!18 = !{!17, !5, i64 4} | |
!19 = !{!17, !5, i64 8} | |
!20 = !{!17, !5, i64 0} | |
!21 = !{i64 0, i64 4, !22, i64 4, i64 4, !22, i64 8, i64 4, !22, i64 12, i64 4, !22, i64 16, i64 4, !22, i64 32, i64 16, !10, i64 48, i64 16, !10, i64 64, i64 16, !10} | |
!22 = !{!5, !5, i64 0} | |
!23 = !{!24, !8, i64 16} | |
!24 = !{!"afd", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12, !8, i64 16, !8, i64 32, !5, i64 48} | |
!25 = !{!24, !8, i64 32} | |
!26 = !{!24, !5, i64 0} | |
!27 = !{!28, !8, i64 48} | |
!28 = !{!"ifaddrs", !8, i64 0, !8, i64 16, !5, i64 32, !8, i64 48, !8, i64 64, !8, i64 80, !8, i64 96} | |
!29 = !{!28, !5, i64 32} | |
!30 = !{!31, !6, i64 1} | |
!31 = !{!"sockaddr", !6, i64 0, !6, i64 1, !6, i64 2} | |
!32 = !{!33, !5, i64 4} | |
!33 = !{!"sockaddr_in", !6, i64 0, !6, i64 1, !34, i64 2, !35, i64 4, !6, i64 8} | |
!34 = !{!"short", !6, i64 0} | |
!35 = !{!"in_addr", !5, i64 0} | |
!36 = !{!6, !6, i64 0} | |
!37 = !{!28, !8, i64 16} | |
!38 = !{!39, !5, i64 36} | |
!39 = !{!"in6_ndireq", !6, i64 0, !40, i64 16} | |
!40 = !{!"nd_ifinfo", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12, !5, i64 16, !5, i64 20, !5, i64 24, !6, i64 28, !6, i64 29, !6, i64 30, !6, i64 38, !6, i64 46} | |
!41 = !{!4, !5, i64 12} | |
!42 = !{!24, !5, i64 8} | |
!43 = !{!31, !6, i64 0} | |
!44 = !{!24, !5, i64 4} | |
!45 = !{!24, !5, i64 12} | |
!46 = !{!47, !5, i64 32} | |
!47 = !{!"servent", !8, i64 0, !8, i64 16, !5, i64 32, !8, i64 48} | |
!48 = !{!33, !34, i64 2} | |
!49 = !{!50, !34, i64 2} | |
!50 = !{!"sockaddr_in6", !6, i64 0, !6, i64 1, !34, i64 2, !5, i64 4, !51, i64 8, !5, i64 24} | |
!51 = !{!"in6_addr", !6, i64 0} | |
!52 = !{!53, !8, i64 16} | |
!53 = !{!"res_target", !8, i64 0, !8, i64 16, !5, i64 32, !5, i64 36, !8, i64 48, !5, i64 64, !5, i64 68} | |
!54 = !{!53, !5, i64 32} | |
!55 = !{!53, !5, i64 36} | |
!56 = !{!53, !8, i64 48} | |
!57 = !{!53, !5, i64 64} | |
!58 = !{!53, !8, i64 0} | |
!59 = !{!60, !61, i64 8} | |
!60 = !{!"__res_state", !5, i64 0, !5, i64 4, !61, i64 8, !5, i64 16, !6, i64 20, !34, i64 68, !6, i64 80, !6, i64 192, !61, i64 448, !5, i64 456, !5, i64 456, !6, i64 457, !6, i64 460, !8, i64 544, !8, i64 560, !5, i64 576, !5, i64 580, !5, i64 584, !5, i64 588, !6, i64 592, !8, i64 640} | |
!61 = !{!"long", !6, i64 0} | |
!62 = !{!60, !5, i64 576} | |
!63 = !{!53, !5, i64 68} | |
!64 = !{!60, !5, i64 584} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'reproducer.c' | |
source_filename = "reproducer.c" | |
target datalayout = "E-m:e-pf200:128:128:128:64-i8:8:32-i16:16:32-i64:64-n32:64-S128-A200-P200-G200" | |
target triple = "mips64c128-unknown-freebsd13.0-purecap" | |
%struct.explore = type { i32, i32, i32, i32 } | |
%struct._ns_dtab = type { i8 addrspace(200)*, i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)*, i8 addrspace(200)* } | |
%struct.addrinfo = type { i32, i32, i32, i32, i32, i8 addrspace(200)*, %struct.sockaddr addrspace(200)*, %struct.addrinfo addrspace(200)* } | |
%struct.sockaddr = type { i8, i8, [14 x i8] } | |
%struct.in6_ndireq = type { [16 x i8], %struct.nd_ifinfo } | |
%struct.nd_ifinfo = type { i32, i32, i32, i32, i32, i32, i32, i8, i8, [8 x i8], [8 x i8], [8 x i8] } | |
%struct.ifaddrs = type { %struct.ifaddrs addrspace(200)*, i8 addrspace(200)*, i32, %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)*, i8 addrspace(200)* } | |
%struct.afd = type { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32, [12 x i8] } | |
%struct._ns_src = type { i8 addrspace(200)*, i32, [12 x i8] } | |
%struct.in6_addr = type { %union.anon } | |
%union.anon = type { [4 x i32] } | |
%struct.servent = type { i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)*, i32, i8 addrspace(200)* } | |
%struct.sockaddr_in = type { i8, i8, i16, %struct.in_addr, [8 x i8] } | |
%struct.in_addr = type { i32 } | |
%struct.sockaddr_in6 = type { i8, i8, i16, i32, %struct.in6_addr, i32 } | |
%struct.__sFILE = type { i8 addrspace(200)*, i32, i32, i16, i16, %struct.__sbuf, i32, i8 addrspace(200)*, i32 (i8 addrspace(200)*) addrspace(200)*, i32 (i8 addrspace(200)*, i8 addrspace(200)*, i32) addrspace(200)*, i64 (i8 addrspace(200)*, i64, i32) addrspace(200)*, i32 (i8 addrspace(200)*, i8 addrspace(200)*, i32) addrspace(200)*, %struct.__sbuf, i8 addrspace(200)*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64, %struct.pthread_mutex addrspace(200)*, %struct.pthread addrspace(200)*, i32, i32, %union.__mbstate_t, i32, [12 x i8] } | |
%struct.__sbuf = type { i8 addrspace(200)*, i32, [12 x i8] } | |
%struct.pthread_mutex = type opaque | |
%struct.pthread = type opaque | |
%union.__mbstate_t = type { i8 addrspace(200)*, [112 x i8] } | |
%struct.res_target = type { %struct.res_target addrspace(200)*, i8 addrspace(200)*, i32, i32, i8 addrspace(200)*, i32, i32, [8 x i8] } | |
%struct.__res_state = type { i32, i32, i64, i32, [3 x %struct.sockaddr_in], i16, [7 x i8 addrspace(200)*], [256 x i8], i64, i8, [3 x i8], [10 x %struct.anon], i32 (%struct.sockaddr addrspace(200)* addrspace(200)*, i8 addrspace(200)* addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32 addrspace(200)*) addrspace(200)*, i32 (%struct.sockaddr addrspace(200)*, i8 addrspace(200)*, i32, i8 addrspace(200)*, i32, i32 addrspace(200)*) addrspace(200)*, i32, i32, i32, i32, %union.anon.0, i8 addrspace(200)* } | |
%struct.anon = type { %struct.in_addr, i32 } | |
%union.anon.0 = type { %struct.anon.1 } | |
%struct.anon.1 = type { i16, [3 x i16], [3 x i32], %struct.__res_state_ext addrspace(200)* } | |
%struct.__res_state_ext = type opaque | |
%union.querybuf = type { [65536 x i8] } | |
%struct.HEADER = type { [12 x i8] } | |
@explore = internal unnamed_addr addrspace(200) constant [16 x %struct.explore] [%struct.explore { i32 28, i32 2, i32 17, i32 7 }, %struct.explore { i32 28, i32 1, i32 6, i32 7 }, %struct.explore { i32 28, i32 1, i32 132, i32 3 }, %struct.explore { i32 28, i32 5, i32 132, i32 7 }, %struct.explore { i32 28, i32 2, i32 136, i32 3 }, %struct.explore { i32 28, i32 3, i32 0, i32 5 }, %struct.explore { i32 2, i32 2, i32 17, i32 7 }, %struct.explore { i32 2, i32 1, i32 6, i32 7 }, %struct.explore { i32 2, i32 1, i32 132, i32 3 }, %struct.explore { i32 2, i32 5, i32 132, i32 7 }, %struct.explore { i32 2, i32 2, i32 136, i32 3 }, %struct.explore { i32 2, i32 3, i32 0, i32 5 }, %struct.explore { i32 1, i32 2, i32 0, i32 7 }, %struct.explore { i32 1, i32 1, i32 0, i32 7 }, %struct.explore { i32 1, i32 5, i32 0, i32 7 }, %struct.explore { i32 -1, i32 0, i32 0, i32 0 }], align 4 | |
@.str = private unnamed_addr addrspace(200) constant [3 x i8] c"22\00", align 1 | |
@in6_addrany = internal addrspace(200) constant [16 x i8] zeroinitializer, align 1 | |
@in6_loopback = internal addrspace(200) constant [16 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01", align 1 | |
@in_addrany = internal addrspace(200) constant [4 x i8] zeroinitializer, align 1 | |
@in_loopback = internal addrspace(200) constant [4 x i8] c"\7F\00\00\01", align 1 | |
@afdl = internal addrspace(200) constant [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] [{ i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } { i32 28, i32 16, i32 28, i32 8, i8 addrspace(200)* getelementptr inbounds ([16 x i8], [16 x i8] addrspace(200)* @in6_addrany, i32 0, i32 0), i8 addrspace(200)* getelementptr inbounds ([16 x i8], [16 x i8] addrspace(200)* @in6_loopback, i32 0, i32 0), i32 1 }, { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } { i32 2, i32 4, i32 16, i32 4, i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @in_addrany, i32 0, i32 0), i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @in_loopback, i32 0, i32 0), i32 0 }, { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } { i32 1, i32 104, i32 106, i32 2, i8 addrspace(200)* null, i8 addrspace(200)* null, i32 0 }, { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 } zeroinitializer], align 16 | |
@.str.4 = private unnamed_addr addrspace(200) constant [4 x i8] c"udp\00", align 1 | |
@.str.5 = private unnamed_addr addrspace(200) constant [4 x i8] c"tcp\00", align 1 | |
@.str.6 = private unnamed_addr addrspace(200) constant [5 x i8] c"sctp\00", align 1 | |
@.str.7 = private unnamed_addr addrspace(200) constant [8 x i8] c"udplite\00", align 1 | |
@explore_fqdn.dtab = internal addrspace(200) constant [4 x %struct._ns_dtab] [%struct._ns_dtab { i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.8, i32 0, i32 0), i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)* @_files_getaddrinfo, i8 addrspace(200)* null }, %struct._ns_dtab { i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.9, i32 0, i32 0), i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)* @_dns_getaddrinfo, i8 addrspace(200)* null }, %struct._ns_dtab { i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.10, i32 0, i32 0), i32 (i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200)* @_yp_getaddrinfo, i8 addrspace(200)* null }, %struct._ns_dtab zeroinitializer], align 16 | |
@.str.8 = private unnamed_addr addrspace(200) constant [6 x i8] c"files\00", align 1 | |
@.str.9 = private unnamed_addr addrspace(200) constant [4 x i8] c"dns\00", align 1 | |
@.str.10 = private unnamed_addr addrspace(200) constant [4 x i8] c"nis\00", align 1 | |
@.str.11 = private unnamed_addr addrspace(200) constant [6 x i8] c"hosts\00", align 1 | |
@.str.12 = private unnamed_addr addrspace(200) constant [12 x i8] c"getaddrinfo\00", align 1 | |
@.str.13 = private unnamed_addr addrspace(200) constant [11 x i8] c"/etc/hosts\00", align 1 | |
@.str.14 = private unnamed_addr addrspace(200) constant [3 x i8] c"re\00", align 1 | |
@.str.15 = private unnamed_addr addrspace(200) constant [3 x i8] c"#\0A\00", align 1 | |
@.str.16 = private unnamed_addr addrspace(200) constant [3 x i8] c" \09\00", align 1 | |
@.str.17 = private unnamed_addr addrspace(200) constant [2 x i8] c"0\00", align 1 | |
@.str.19 = private unnamed_addr addrspace(200) constant [6 x i8] c"%s.%s\00", align 1 | |
@.str.20 = private unnamed_addr addrspace(200) constant [15 x i8] c"ipnodes.byname\00", align 1 | |
@.str.21 = private unnamed_addr addrspace(200) constant [13 x i8] c"hosts.byname\00", align 1 | |
@default_dns_files = internal addrspace(200) constant [3 x { i8 addrspace(200)*, i32 }] [{ i8 addrspace(200)*, i32 } { i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.8, i32 0, i32 0), i32 1 }, { i8 addrspace(200)*, i32 } { i8 addrspace(200)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.9, i32 0, i32 0), i32 1 }, { i8 addrspace(200)*, i32 } zeroinitializer], align 16 | |
@str = private unnamed_addr addrspace(200) constant [23 x i8] c"my_getaddrinfo worked!\00", align 1 | |
@str.23 = private unnamed_addr addrspace(200) constant [23 x i8] c"my_getaddrinfo failed!\00", align 1 | |
@str.24 = private unnamed_addr addrspace(200) constant [35 x i8] c";; res_nquery: retry without EDNS0\00", align 1 | |
; Function Attrs: nounwind uwtable | |
define void @_map_v4v6_address(i8 addrspace(200)* nocapture readonly %src, i8 addrspace(200)* nocapture %dst) local_unnamed_addr addrspace(200) #0 { | |
entry: | |
%arrayidx = getelementptr inbounds i8, i8 addrspace(200)* %dst, i64 12 | |
%0 = bitcast i8 addrspace(200)* %src to i32 addrspace(200)* | |
%1 = bitcast i8 addrspace(200)* %arrayidx to i32 addrspace(200)* | |
%2 = load i32, i32 addrspace(200)* %0, align 1 | |
store i32 %2, i32 addrspace(200)* %1, align 1 | |
%arrayidx1 = getelementptr inbounds i8, i8 addrspace(200)* %dst, i64 10 | |
%3 = bitcast i8 addrspace(200)* %arrayidx1 to i16 addrspace(200)* | |
store i16 -1, i16 addrspace(200)* %3, align 1 | |
tail call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 1 dereferenceable(10) %dst, i8 0, i64 10, i1 false) | |
ret void | |
} | |
; Function Attrs: argmemonly nounwind willreturn writeonly | |
declare void @llvm.memset.p200i8.i64(i8 addrspace(200)* nocapture writeonly, i8, i64, i1 immarg) addrspace(200) #1 | |
; Function Attrs: nofree nounwind uwtable | |
define void @freeaddrinfo(%struct.addrinfo addrspace(200)* %ai) local_unnamed_addr addrspace(200) #2 { | |
entry: | |
%cmp5 = icmp eq %struct.addrinfo addrspace(200)* %ai, null | |
br i1 %cmp5, label %while.end, label %while.body | |
while.body: ; preds = %entry, %while.body | |
%ai.addr.06 = phi %struct.addrinfo addrspace(200)* [ %0, %while.body ], [ %ai, %entry ] | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06, i64 0, i32 7 | |
%0 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%ai_canonname = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06, i64 0, i32 5 | |
%1 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa !9 | |
tail call void @free(i8 addrspace(200)* %1) | |
%2 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06 to i8 addrspace(200)* | |
tail call void @free(i8 addrspace(200)* nonnull %2) | |
%cmp = icmp eq %struct.addrinfo addrspace(200)* %0, null | |
br i1 %cmp, label %while.end, label %while.body | |
while.end: ; preds = %while.body, %entry | |
ret void | |
} | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.lifetime.start.p200i8(i64 immarg, i8 addrspace(200)* nocapture) addrspace(200) #3 | |
; Function Attrs: nofree nounwind | |
declare void @free(i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.lifetime.end.p200i8(i64 immarg, i8 addrspace(200)* nocapture) addrspace(200) #3 | |
; Function Attrs: nounwind uwtable | |
define signext i32 @my_getaddrinfo(i8 addrspace(200)* %hostname, i8 addrspace(200)* %servname, %struct.addrinfo addrspace(200)* readonly %hints, %struct.addrinfo addrspace(200)* addrspace(200)* nocapture %res) local_unnamed_addr addrspace(200) #0 { | |
entry: | |
%result.i = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%nd.i.i = alloca %struct.in6_ndireq, align 4, addrspace(200) | |
%ifaddrs.i = alloca %struct.ifaddrs addrspace(200)*, align 16, addrspace(200) | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ai = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ai0.sroa.0 = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%tmpcast = bitcast i8 addrspace(200)* addrspace(200)* %ai0.sroa.0 to { i32, i32, i32, i32 } addrspace(200)* | |
%ai0.sroa.16 = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%afailist = alloca [4 x %struct.addrinfo addrspace(200)*], align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%ai0.sroa.0.0..sroa_cast654 = bitcast i8 addrspace(200)* addrspace(200)* %ai0.sroa.0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.0.0..sroa_cast654) | |
%ai0.sroa.16.0..sroa_idx646 = bitcast i8 addrspace(200)* addrspace(200)* %ai0.sroa.16 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.16.0..sroa_idx646) | |
%2 = bitcast [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 64, i8 addrspace(200)* nonnull %2) #18 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 0, i64 32, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(64) %2, i8 0, i64 64, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 0 | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 1 | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 2 | |
%ai_protocol = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 3 | |
%ai_addrlen = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 4 | |
%ai_canonname = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 5 | |
%ai_addr = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 6 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 7 | |
%cmp = icmp eq i8 addrspace(200)* %hostname, null | |
%cmp1 = icmp eq i8 addrspace(200)* %servname, null | |
%or.cond = and i1 %cmp, %cmp1 | |
%3 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(20) %3, i8 0, i64 20, i1 false) | |
%4 = bitcast i8 addrspace(200)* addrspace(200)* %ai_canonname to i8 addrspace(200)* | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(48) %4, i8 0, i64 48, i1 false) | |
br i1 %or.cond, label %cleanup, label %if.end | |
if.end: ; preds = %entry | |
%tobool = icmp eq %struct.addrinfo addrspace(200)* %hints, null | |
br i1 %tobool, label %if.end83, label %if.then2 | |
if.then2: ; preds = %if.end | |
%ai_addrlen3 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 4 | |
%5 = load i32, i32 addrspace(200)* %ai_addrlen3, align 16, !tbaa !11 | |
%tobool4 = icmp eq i32 %5, 0 | |
br i1 %tobool4, label %lor.lhs.false, label %if.end298 | |
lor.lhs.false: ; preds = %if.then2 | |
%ai_canonname5 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 5 | |
%6 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname5, align 16, !tbaa !9 | |
%tobool6 = icmp eq i8 addrspace(200)* %6, null | |
br i1 %tobool6, label %lor.lhs.false7, label %if.end298 | |
lor.lhs.false7: ; preds = %lor.lhs.false | |
%ai_addr8 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 6 | |
%7 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr8, align 16, !tbaa !12 | |
%tobool9 = icmp eq %struct.sockaddr addrspace(200)* %7, null | |
br i1 %tobool9, label %lor.lhs.false10, label %if.end298 | |
lor.lhs.false10: ; preds = %lor.lhs.false7 | |
%ai_next11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 7 | |
%8 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next11, align 16, !tbaa !3 | |
%tobool12 = icmp eq %struct.addrinfo addrspace(200)* %8, null | |
br i1 %tobool12, label %if.end14, label %if.end298 | |
if.end14: ; preds = %lor.lhs.false10 | |
%ai_flags15 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 0 | |
%9 = load i32, i32 addrspace(200)* %ai_flags15, align 16, !tbaa !13 | |
%and = and i32 %9, -3344 | |
%tobool16 = icmp eq i32 %and, 0 | |
br i1 %tobool16, label %if.end21, label %if.end298 | |
if.end21: ; preds = %if.end14 | |
%ai_family22 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 1 | |
%10 = load i32, i32 addrspace(200)* %ai_family22, align 4, !tbaa !14 | |
switch i32 %10, label %if.end298 [ | |
i32 0, label %sw.epilog | |
i32 1, label %sw.epilog | |
i32 2, label %sw.epilog | |
i32 28, label %sw.epilog | |
] | |
sw.epilog: ; preds = %if.end21, %if.end21, %if.end21, %if.end21 | |
%11 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %11, i64 80, i1 false) #19 | |
%12 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%cmp27 = icmp eq i32 %12, 0 | |
%13 = load i32, i32 addrspace(200)* %ai_protocol, align 4 | |
%cmp30 = icmp eq i32 %13, 0 | |
%or.cond483 = or i1 %cmp27, %cmp30 | |
br i1 %or.cond483, label %if.end83, label %for.cond.preheader | |
for.cond.preheader: ; preds = %sw.epilog | |
%14 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp41 = icmp eq i32 %14, 0 | |
br label %for.body | |
for.body: ; preds = %for.cond.preheader, %for.inc | |
%15 = phi i32 [ 28, %for.cond.preheader ], [ %21, %for.inc ] | |
%ex.0702 = phi %struct.explore addrspace(200)* [ getelementptr inbounds ([16 x %struct.explore], [16 x %struct.explore] addrspace(200)* @explore, i64 0, i64 0), %for.cond.preheader ], [ %incdec.ptr, %for.inc ] | |
%cmp35 = icmp eq i32 %14, %15 | |
br i1 %cmp35, label %if.end46, label %lor.lhs.false36 | |
lor.lhs.false36: ; preds = %for.body | |
%e_wild = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 3 | |
%16 = load i32, i32 addrspace(200)* %e_wild, align 4, !tbaa !16 | |
%and37 = and i32 %16, 1 | |
%tobool38 = icmp ne i32 %and37, 0 | |
%cmp44 = icmp eq i32 %15, 0 | |
%or.cond484 = or i1 %cmp44, %cmp41 | |
%or.cond706 = and i1 %tobool38, %or.cond484 | |
br i1 %or.cond706, label %if.end46, label %for.inc | |
if.end46: ; preds = %lor.lhs.false36, %for.body | |
%e_socktype = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 1 | |
%17 = load i32, i32 addrspace(200)* %e_socktype, align 4, !tbaa !18 | |
%cmp48 = icmp eq i32 %12, %17 | |
br i1 %cmp48, label %if.end60, label %lor.lhs.false49 | |
lor.lhs.false49: ; preds = %if.end46 | |
%e_wild50 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 3 | |
%18 = load i32, i32 addrspace(200)* %e_wild50, align 4, !tbaa !16 | |
%and51 = and i32 %18, 2 | |
%tobool52 = icmp ne i32 %and51, 0 | |
%cmp58 = icmp eq i32 %17, 0 | |
%or.cond676 = and i1 %cmp58, %tobool52 | |
br i1 %or.cond676, label %if.end60, label %for.inc | |
if.end60: ; preds = %lor.lhs.false49, %if.end46 | |
%e_protocol = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 2 | |
%19 = load i32, i32 addrspace(200)* %e_protocol, align 4, !tbaa !19 | |
%cmp62 = icmp eq i32 %13, %19 | |
br i1 %cmp62, label %if.end83, label %lor.lhs.false63 | |
lor.lhs.false63: ; preds = %if.end60 | |
%e_wild64 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 0, i32 3 | |
%20 = load i32, i32 addrspace(200)* %e_wild64, align 4, !tbaa !16 | |
%and65 = and i32 %20, 4 | |
%tobool66 = icmp ne i32 %and65, 0 | |
%cmp72 = icmp eq i32 %19, 0 | |
%or.cond677 = and i1 %cmp72, %tobool66 | |
br i1 %or.cond677, label %if.end83, label %for.inc | |
for.inc: ; preds = %lor.lhs.false36, %lor.lhs.false63, %lor.lhs.false49 | |
%incdec.ptr = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.0702, i64 1 | |
%e_af = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %incdec.ptr, i64 0, i32 0 | |
%21 = load i32, i32 addrspace(200)* %e_af, align 4, !tbaa !20 | |
%cmp32 = icmp sgt i32 %21, -1 | |
br i1 %cmp32, label %for.body, label %if.end298 | |
if.end83: ; preds = %lor.lhs.false63, %if.end60, %sw.epilog, %if.end | |
%22 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and85 = and i32 %22, 2304 | |
switch i32 %and85, label %sw.epilog96thread-pre-split [ | |
i32 2048, label %sw.bb86 | |
i32 2304, label %sw.bb86 | |
i32 256, label %sw.bb93 | |
] | |
sw.bb86: ; preds = %if.end83, %if.end83 | |
%23 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp88 = icmp eq i32 %23, 28 | |
br i1 %cmp88, label %if.then108, label %if.then89 | |
if.then89: ; preds = %sw.bb86 | |
%and91 = and i32 %22, -2305 | |
store i32 %and91, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
br label %sw.epilog96 | |
sw.bb93: ; preds = %if.end83 | |
%and95 = and i32 %22, -2305 | |
store i32 %and95, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
br label %sw.epilog96thread-pre-split | |
sw.epilog96thread-pre-split: ; preds = %sw.bb93, %if.end83 | |
%.pr = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
br label %sw.epilog96 | |
sw.epilog96: ; preds = %sw.epilog96thread-pre-split, %if.then89 | |
%24 = phi i32 [ %.pr, %sw.epilog96thread-pre-split ], [ %23, %if.then89 ] | |
switch i32 %24, label %if.end117 [ | |
i32 2, label %if.then108 | |
i32 0, label %if.then108 | |
i32 28, label %if.then108 | |
] | |
if.then108: ; preds = %sw.bb86, %sw.epilog96, %sw.epilog96, %sw.epilog96 | |
%25 = phi i32 [ %24, %sw.epilog96 ], [ %24, %sw.epilog96 ], [ %24, %sw.epilog96 ], [ 28, %sw.bb86 ] | |
%26 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* addrspace(200)* | |
%27 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %26, align 16 | |
store i8 addrspace(200)* %27, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
%28 = bitcast i32 addrspace(200)* %ai_addrlen to i8 addrspace(200)* addrspace(200)* | |
%29 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %28, align 16 | |
store i8 addrspace(200)* %29, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
%ai0.sroa.22.0.copyload585 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
%ai0.sroa.28.0.copyload602 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
%ai0.sroa.34.0.copyload619 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%cmp110 = icmp eq i32 %25, 0 | |
br i1 %cmp110, label %if.then111, label %if.end113 | |
if.then111: ; preds = %if.then108 | |
store i32 28, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
br label %if.end113 | |
if.end113: ; preds = %if.then111, %if.then108 | |
%call.i = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %ai, i8 addrspace(200)* %servname, i32 signext 1) #18 | |
%tobool114 = icmp eq i32 %call.i, 0 | |
br i1 %tobool114, label %if.end116, label %if.end298 | |
if.end116: ; preds = %if.end113 | |
%30 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
store i8 addrspace(200)* %30, i8 addrspace(200)* addrspace(200)* %26, align 16 | |
%31 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
store i8 addrspace(200)* %31, i8 addrspace(200)* addrspace(200)* %28, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload585, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload602, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload619, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
br label %if.end117 | |
if.end117: ; preds = %sw.epilog96, %if.end116 | |
%32 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* addrspace(200)* | |
%33 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
store i8 addrspace(200)* %33, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
%34 = bitcast i32 addrspace(200)* %ai_addrlen to i8 addrspace(200)* addrspace(200)* | |
%35 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %35, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
%ai0.sroa.22.0.copyload587 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
%ai0.sroa.28.0.copyload604 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
%ai0.sroa.34.0.copyload621 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%36 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
br label %for.body120 | |
for.body120: ; preds = %if.end117, %for.inc152 | |
%a_af701 = phi i32 addrspace(200)* [ getelementptr inbounds ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }], [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl, i64 0, i64 0, i32 0), %if.end117 ], [ %a_af, %for.inc152 ] | |
%found.0700 = phi i32 [ 0, %if.end117 ], [ %found.1, %for.inc152 ] | |
%afd.0698 = phi %struct.afd addrspace(200)* [ bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to %struct.afd addrspace(200)*), %if.end117 ], [ %incdec.ptr153, %for.inc152 ] | |
store i8 addrspace(200)* %36, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
store i8 addrspace(200)* %35, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload587, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload604, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload621, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%37 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%38 = load i32, i32 addrspace(200)* %a_af701, align 16, !tbaa !23 | |
%cmp123 = icmp eq i32 %37, %38 | |
%cmp126 = icmp eq i32 %37, 0 | |
%or.cond487 = or i1 %cmp126, %cmp123 | |
%cmp129 = icmp eq i32 %38, 0 | |
%or.cond488 = or i1 %cmp129, %or.cond487 | |
br i1 %or.cond488, label %if.end131, label %for.inc152 | |
if.end131: ; preds = %for.body120 | |
br i1 %cmp126, label %if.then134, label %if.end137 | |
if.then134: ; preds = %if.end131 | |
store i32 %38, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
br label %if.end137 | |
if.end137: ; preds = %if.then134, %if.end131 | |
br i1 %cmp, label %if.then139, label %land.lhs.true146 | |
if.then139: ; preds = %if.end137 | |
%39 = bitcast %struct.afd addrspace(200)* %afd.0698 to i8 addrspace(200)* | |
%40 = tail call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* %39, i8 addrspace(200)* bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to i8 addrspace(200)*)) | |
%sub.ptr.div = ashr exact i64 %40, 6 | |
%arrayidx = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 %sub.ptr.div | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx, align 16, !tbaa !10 | |
%41 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp.i = icmp eq i32 %41, 1 | |
br i1 %cmp.i, label %land.lhs.true146, label %if.end.i | |
if.end.i: ; preds = %if.then139 | |
%call.i492 = tail call signext i32 @_socket(i32 signext %41, i32 signext 268435458, i32 signext 0) #18 | |
%cmp2.i = icmp slt i32 %call.i492, 0 | |
br i1 %cmp2.i, label %if.then3.i, label %if.else.i | |
if.then3.i: ; preds = %if.end.i | |
%call4.i = tail call i32 addrspace(200)* @__error() #18 | |
%42 = load i32, i32 addrspace(200)* %call4.i, align 4, !tbaa !22 | |
%cmp5.i = icmp eq i32 %42, 24 | |
br i1 %cmp5.i, label %if.end9.i, label %land.lhs.true146 | |
if.else.i: ; preds = %if.end.i | |
%call8.i = tail call signext i32 @_close(i32 signext %call.i492) #18 | |
br label %if.end9.i | |
if.end9.i: ; preds = %if.else.i, %if.then3.i | |
%43 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%call11.i = tail call fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %43) #18 | |
%cmp12.i = icmp eq %struct.afd addrspace(200)* %call11.i, null | |
br i1 %cmp12.i, label %land.lhs.true146, label %if.end14.i | |
if.end14.i: ; preds = %if.end9.i | |
%44 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and.i = and i32 %44, 1 | |
%tobool.i = icmp eq i32 %and.i, 0 | |
br i1 %tobool.i, label %do.body28.i, label %do.body.i | |
do.body.i: ; preds = %if.end14.i | |
%a_addrany.i = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %call11.i, i64 0, i32 4 | |
%45 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %a_addrany.i, align 16, !tbaa !25 | |
%call16.i = call fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.afd addrspace(200)* nonnull %call11.i, i8 addrspace(200)* %45) #18 | |
%cmp17.i = icmp eq %struct.addrinfo addrspace(200)* %call16.i, null | |
br i1 %cmp17.i, label %if.end298, label %do.body20.i | |
do.body20.i: ; preds = %do.body.i | |
%call21.i = tail call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %call16.i, i8 addrspace(200)* %servname, i32 signext 0) #18 | |
%cmp22.i = icmp eq i32 %call21.i, 0 | |
br i1 %cmp22.i, label %if.end42.i, label %while.body.preheader.i.i | |
do.body28.i: ; preds = %if.end14.i | |
%a_loopback.i = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %call11.i, i64 0, i32 5 | |
%46 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %a_loopback.i, align 16, !tbaa !26 | |
%call29.i = call fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.afd addrspace(200)* nonnull %call11.i, i8 addrspace(200)* %46) #18 | |
%cmp30.i = icmp eq %struct.addrinfo addrspace(200)* %call29.i, null | |
br i1 %cmp30.i, label %if.end298, label %do.body35.i | |
do.body35.i: ; preds = %do.body28.i | |
%call36.i = tail call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %call29.i, i8 addrspace(200)* %servname, i32 signext 0) #18 | |
%cmp37.i = icmp eq i32 %call36.i, 0 | |
br i1 %cmp37.i, label %if.end42.i, label %while.body.preheader.i.i | |
if.end42.i: ; preds = %do.body35.i, %do.body20.i | |
%ai.0.i = phi %struct.addrinfo addrspace(200)* [ %call16.i, %do.body20.i ], [ %call29.i, %do.body35.i ] | |
store %struct.addrinfo addrspace(200)* %ai.0.i, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx, align 16, !tbaa !10 | |
br label %land.lhs.true146 | |
while.body.preheader.i.i: ; preds = %do.body35.i, %do.body20.i | |
%ai.1.i = phi %struct.addrinfo addrspace(200)* [ %call16.i, %do.body20.i ], [ %call29.i, %do.body35.i ] | |
%error.0.i = phi i32 [ %call21.i, %do.body20.i ], [ %call36.i, %do.body35.i ] | |
br label %while.body.i.i | |
while.body.i.i: ; preds = %while.body.i.i, %while.body.preheader.i.i | |
%ai.addr.06.i.i = phi %struct.addrinfo addrspace(200)* [ %47, %while.body.i.i ], [ %ai.1.i, %while.body.preheader.i.i ] | |
%ai_next.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 7 | |
%47 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i.i, align 16, !tbaa !3 | |
%ai_canonname.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 5 | |
%48 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i.i, align 16, !tbaa !9 | |
tail call void @free(i8 addrspace(200)* %48) #18 | |
%49 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i.i to i8 addrspace(200)* | |
tail call void @free(i8 addrspace(200)* nonnull %49) #18 | |
%cmp.i.i = icmp eq %struct.addrinfo addrspace(200)* %47, null | |
br i1 %cmp.i.i, label %explore_null.exit, label %while.body.i.i | |
explore_null.exit: ; preds = %while.body.i.i | |
%cmp141 = icmp eq i32 %error.0.i, 0 | |
br i1 %cmp141, label %land.lhs.true146, label %if.end298 | |
land.lhs.true146: ; preds = %if.end9.i, %if.then3.i, %if.then139, %if.end42.i, %explore_null.exit, %if.end137 | |
%50 = bitcast %struct.afd addrspace(200)* %afd.0698 to i8 addrspace(200)* | |
%51 = tail call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* %50, i8 addrspace(200)* bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to i8 addrspace(200)*)) | |
%sub.ptr.div147 = ashr exact i64 %51, 6 | |
%arrayidx148 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 %sub.ptr.div147 | |
%52 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx148, align 16, !tbaa !10 | |
%tobool149 = icmp ne %struct.addrinfo addrspace(200)* %52, null | |
%inc = zext i1 %tobool149 to i32 | |
%spec.select = add nsw i32 %found.0700, %inc | |
br label %for.inc152 | |
for.inc152: ; preds = %land.lhs.true146, %for.body120 | |
%found.1 = phi i32 [ %found.0700, %for.body120 ], [ %spec.select, %land.lhs.true146 ] | |
%incdec.ptr153 = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.0698, i64 1 | |
%a_af = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %incdec.ptr153, i64 0, i32 0 | |
%53 = load i32, i32 addrspace(200)* %a_af, align 16, !tbaa !23 | |
%tobool119 = icmp eq i32 %53, 0 | |
br i1 %tobool119, label %for.end154, label %for.body120 | |
for.end154: ; preds = %for.inc152 | |
%tobool155 = icmp eq i32 %found.1, 0 | |
br i1 %tobool155, label %if.end157, label %globcopy | |
if.end157: ; preds = %for.end154 | |
br i1 %cmp, label %if.end298, label %if.end163 | |
if.end163: ; preds = %if.end157 | |
%54 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and165 = and i32 %54, 4 | |
%tobool166 = icmp eq i32 %and165, 0 | |
br i1 %tobool166, label %if.end171, label %if.end298 | |
if.end171: ; preds = %if.end163 | |
%and173 = and i32 %54, 1024 | |
%cmp174 = icmp eq i32 %and173, 0 | |
br i1 %cmp174, label %if.end182, label %land.lhs.true175 | |
land.lhs.true175: ; preds = %if.end171 | |
%55 = bitcast %struct.ifaddrs addrspace(200)* addrspace(200)* %ifaddrs.i to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %55) #18 | |
%call.i493 = call signext i32 @getifaddrs(%struct.ifaddrs addrspace(200)* addrspace(200)* nonnull %ifaddrs.i) #18 | |
%cmp.i494 = icmp eq i32 %call.i493, 0 | |
br i1 %cmp.i494, label %for.cond.preheader.i, label %addrconfig.exit.thread666 | |
addrconfig.exit.thread666: ; preds = %land.lhs.true175 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %55) #18 | |
br label %if.end298 | |
for.cond.preheader.i: ; preds = %land.lhs.true175 | |
%ifa.0112.i = load %struct.ifaddrs addrspace(200)*, %struct.ifaddrs addrspace(200)* addrspace(200)* %ifaddrs.i, align 16, !tbaa !10 | |
%cmp1113.i = icmp eq %struct.ifaddrs addrspace(200)* %ifa.0112.i, null | |
br i1 %cmp1113.i, label %for.end.i, label %for.body.lr.ph.i | |
for.body.lr.ph.i: ; preds = %for.cond.preheader.i | |
%56 = getelementptr inbounds %struct.in6_ndireq, %struct.in6_ndireq addrspace(200)* %nd.i.i, i64 0, i32 0, i64 0 | |
%flags.i.i = getelementptr inbounds %struct.in6_ndireq, %struct.in6_ndireq addrspace(200)* %nd.i.i, i64 0, i32 1, i32 5 | |
br label %for.body.i | |
for.body.i: ; preds = %for.inc.i, %for.body.lr.ph.i | |
%ifa.0117.i = phi %struct.ifaddrs addrspace(200)* [ %ifa.0112.i, %for.body.lr.ph.i ], [ %ifa.0.i, %for.inc.i ] | |
%seen_inet6.0116.i = phi i32 [ 0, %for.body.lr.ph.i ], [ %seen_inet6.1.i, %for.inc.i ] | |
%seen_inet.0114.i = phi i32 [ 0, %for.body.lr.ph.i ], [ %seen_inet.1.i, %for.inc.i ] | |
%ifa_addr.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 3 | |
%57 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %ifa_addr.i, align 16, !tbaa !27 | |
%cmp2.i495 = icmp eq %struct.sockaddr addrspace(200)* %57, null | |
br i1 %cmp2.i495, label %for.inc.i, label %lor.lhs.false.i | |
lor.lhs.false.i: ; preds = %for.body.i | |
%ifa_flags.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 2 | |
%58 = load i32, i32 addrspace(200)* %ifa_flags.i, align 16, !tbaa !29 | |
%and.i496 = and i32 %58, 1 | |
%cmp3.i = icmp eq i32 %and.i496, 0 | |
br i1 %cmp3.i, label %for.inc.i, label %if.end5.i | |
if.end5.i: ; preds = %lor.lhs.false.i | |
%sa_family.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 1 | |
%59 = load i8, i8 addrspace(200)* %sa_family.i, align 1, !tbaa !30 | |
switch i8 %59, label %for.inc.i [ | |
i8 2, label %sw.bb.i | |
i8 28, label %sw.bb14.i | |
] | |
sw.bb.i: ; preds = %if.end5.i | |
%tobool.i497 = icmp eq i32 %seen_inet.0114.i, 0 | |
br i1 %tobool.i497, label %if.end8.i, label %for.inc.i | |
if.end8.i: ; preds = %sw.bb.i | |
%sin_addr.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 2, i64 2 | |
%s_addr.i = bitcast i8 addrspace(200)* %sin_addr.i to i32 addrspace(200)* | |
%60 = load i32, i32 addrspace(200)* %s_addr.i, align 4, !tbaa !32 | |
%cmp10.i = icmp ne i32 %60, 2130706433 | |
%spec.select.i = zext i1 %cmp10.i to i32 | |
br label %for.inc.i | |
sw.bb14.i: ; preds = %if.end5.i | |
%tobool15.i = icmp eq i32 %seen_inet6.0116.i, 0 | |
br i1 %tobool15.i, label %if.end17.i, label %for.inc.i | |
if.end17.i: ; preds = %sw.bb14.i | |
%sin6_addr.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 2, i64 6 | |
%arrayidx.i = bitcast i8 addrspace(200)* %sin6_addr.i to i32 addrspace(200)* | |
%61 = load i32, i32 addrspace(200)* %arrayidx.i, align 4, !tbaa !36 | |
%cmp19.i = icmp eq i32 %61, 0 | |
br i1 %cmp19.i, label %land.lhs.true.i, label %if.end42.i498 | |
land.lhs.true.i: ; preds = %if.end17.i | |
%arrayidx24.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 2, i64 10 | |
%62 = bitcast i8 addrspace(200)* %arrayidx24.i to i32 addrspace(200)* | |
%63 = load i32, i32 addrspace(200)* %62, align 4, !tbaa !36 | |
%cmp25.i = icmp eq i32 %63, 0 | |
br i1 %cmp25.i, label %land.lhs.true27.i, label %if.end42.i498 | |
land.lhs.true27.i: ; preds = %land.lhs.true.i | |
%arrayidx31.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 2, i64 14 | |
%64 = bitcast i8 addrspace(200)* %arrayidx31.i to i32 addrspace(200)* | |
%65 = load i32, i32 addrspace(200)* %64, align 4, !tbaa !36 | |
%cmp32.i = icmp eq i32 %65, 0 | |
br i1 %cmp32.i, label %land.lhs.true34.i, label %if.end42.i498 | |
land.lhs.true34.i: ; preds = %land.lhs.true27.i | |
%arrayidx38.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 2, i64 18 | |
%66 = bitcast i8 addrspace(200)* %arrayidx38.i to i32 addrspace(200)* | |
%67 = load i32, i32 addrspace(200)* %66, align 4, !tbaa !36 | |
%cmp39.i = icmp eq i32 %67, 1 | |
br i1 %cmp39.i, label %for.inc.i, label %if.end42.i498 | |
if.end42.i498: ; preds = %land.lhs.true34.i, %land.lhs.true27.i, %land.lhs.true.i, %if.end17.i | |
%and44.i = and i32 %58, 24 | |
%cmp45.i = icmp eq i32 %and44.i, 0 | |
br i1 %cmp45.i, label %if.end64.i, label %land.lhs.true47.i | |
land.lhs.true47.i: ; preds = %if.end42.i498 | |
%68 = load i8, i8 addrspace(200)* %sin6_addr.i, align 4, !tbaa !36 | |
%cmp52.i = icmp eq i8 %68, -2 | |
br i1 %cmp52.i, label %land.lhs.true54.i, label %if.end64.i | |
land.lhs.true54.i: ; preds = %land.lhs.true47.i | |
%arrayidx58.i = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %57, i64 0, i32 2, i64 7 | |
%69 = load i8, i8 addrspace(200)* %arrayidx58.i, align 1, !tbaa !36 | |
%70 = and i8 %69, -64 | |
%cmp61.i = icmp eq i8 %70, -128 | |
br i1 %cmp61.i, label %for.inc.i, label %if.end64.i | |
if.end64.i: ; preds = %land.lhs.true54.i, %land.lhs.true47.i, %if.end42.i498 | |
%ifa_name.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 1 | |
%71 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ifa_name.i, align 16, !tbaa !37 | |
call void @llvm.lifetime.start.p200i8(i64 72, i8 addrspace(200)* nonnull %56) #18 | |
%call.i.i = call signext i32 @_socket(i32 signext 28, i32 signext 268435458, i32 signext 0) #18 | |
%cmp.i.i499 = icmp slt i32 %call.i.i, 0 | |
br i1 %cmp.i.i499, label %is_ifdisabled.exit.thread.i, label %if.end.i.i | |
if.end.i.i: ; preds = %if.end64.i | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 4 dereferenceable(72) %56, i8 0, i64 72, i1 false) #18 | |
%call1.i.i = call i64 @strlcpy(i8 addrspace(200)* nonnull %56, i8 addrspace(200)* %71, i64 zeroext 16) #18 | |
%call2.i.i = call signext i32 (i32, i64, ...) @_ioctl(i32 signext %call.i.i, i64 zeroext 3225971052, %struct.in6_ndireq addrspace(200)* nonnull %nd.i.i) #18 | |
%cmp3.i.i = icmp slt i32 %call2.i.i, 0 | |
%call5.i.i = call signext i32 @_close(i32 signext %call.i.i) #18 | |
br i1 %cmp3.i.i, label %is_ifdisabled.exit.thread.i, label %is_ifdisabled.exit.i | |
is_ifdisabled.exit.thread.i: ; preds = %if.end.i.i, %if.end64.i | |
call void @llvm.lifetime.end.p200i8(i64 72, i8 addrspace(200)* nonnull %56) #18 | |
br label %for.inc.i | |
is_ifdisabled.exit.i: ; preds = %if.end.i.i | |
%72 = load i32, i32 addrspace(200)* %flags.i.i, align 4, !tbaa !38 | |
call void @llvm.lifetime.end.p200i8(i64 72, i8 addrspace(200)* nonnull %56) #18 | |
%and.lobit.i.i = lshr i32 %72, 3 | |
%and.lobit.i.lobit.i = and i32 %and.lobit.i.i, 1 | |
%73 = xor i32 %and.lobit.i.lobit.i, 1 | |
br label %for.inc.i | |
for.inc.i: ; preds = %is_ifdisabled.exit.i, %is_ifdisabled.exit.thread.i, %land.lhs.true54.i, %land.lhs.true34.i, %sw.bb14.i, %if.end8.i, %sw.bb.i, %if.end5.i, %lor.lhs.false.i, %for.body.i | |
%seen_inet.1.i = phi i32 [ %seen_inet.0114.i, %for.body.i ], [ %seen_inet.0114.i, %lor.lhs.false.i ], [ %seen_inet.0114.i, %if.end5.i ], [ %seen_inet.0114.i, %sw.bb14.i ], [ %seen_inet.0114.i, %land.lhs.true34.i ], [ %seen_inet.0114.i, %land.lhs.true54.i ], [ %seen_inet.0114.i, %sw.bb.i ], [ %spec.select.i, %if.end8.i ], [ %seen_inet.0114.i, %is_ifdisabled.exit.thread.i ], [ %seen_inet.0114.i, %is_ifdisabled.exit.i ] | |
%seen_inet6.1.i = phi i32 [ %seen_inet6.0116.i, %for.body.i ], [ %seen_inet6.0116.i, %lor.lhs.false.i ], [ %seen_inet6.0116.i, %if.end5.i ], [ %seen_inet6.0116.i, %sw.bb14.i ], [ 0, %land.lhs.true34.i ], [ 0, %land.lhs.true54.i ], [ %seen_inet6.0116.i, %sw.bb.i ], [ %seen_inet6.0116.i, %if.end8.i ], [ 0, %is_ifdisabled.exit.thread.i ], [ %73, %is_ifdisabled.exit.i ] | |
%ifa_next.i = getelementptr inbounds %struct.ifaddrs, %struct.ifaddrs addrspace(200)* %ifa.0117.i, i64 0, i32 0 | |
%ifa.0.i = load %struct.ifaddrs addrspace(200)*, %struct.ifaddrs addrspace(200)* addrspace(200)* %ifa_next.i, align 16, !tbaa !10 | |
%cmp1.i = icmp eq %struct.ifaddrs addrspace(200)* %ifa.0.i, null | |
br i1 %cmp1.i, label %for.end.i, label %for.body.i | |
for.end.i: ; preds = %for.inc.i, %for.cond.preheader.i | |
%seen_inet.0.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %seen_inet.1.i, %for.inc.i ] | |
%seen_inet6.0.lcssa.i = phi i32 [ 0, %for.cond.preheader.i ], [ %seen_inet6.1.i, %for.inc.i ] | |
%74 = load %struct.ifaddrs addrspace(200)*, %struct.ifaddrs addrspace(200)* addrspace(200)* %ifaddrs.i, align 16, !tbaa !10 | |
call void @freeifaddrs(%struct.ifaddrs addrspace(200)* %74) #18 | |
%ai0.sroa.0.4.ai_family.i500.sroa_idx656 = getelementptr inbounds { i32, i32, i32, i32 }, { i32, i32, i32, i32 } addrspace(200)* %tmpcast, i64 0, i32 1 | |
%ai0.sroa.0.4.ai0.sroa.0.4. = load i32, i32 addrspace(200)* %ai0.sroa.0.4.ai_family.i500.sroa_idx656, align 4, !tbaa !14 | |
switch i32 %ai0.sroa.0.4.ai0.sroa.0.4., label %addrconfig.exit.thread [ | |
i32 28, label %addrconfig.exit | |
i32 2, label %sw.bb70.i | |
i32 0, label %sw.bb71.i | |
] | |
sw.bb70.i: ; preds = %for.end.i | |
br label %addrconfig.exit | |
sw.bb71.i: ; preds = %for.end.i | |
%cmp72.i = icmp eq i32 %seen_inet.0.lcssa.i, %seen_inet6.0.lcssa.i | |
br i1 %cmp72.i, label %addrconfig.exit, label %if.end75.i | |
if.end75.i: ; preds = %sw.bb71.i | |
%tobool76.i = icmp eq i32 %seen_inet.0.lcssa.i, 0 | |
%cond.i = select i1 %tobool76.i, i32 28, i32 2 | |
store i32 %cond.i, i32 addrspace(200)* %ai0.sroa.0.4.ai_family.i500.sroa_idx656, align 4, !tbaa !14 | |
br label %addrconfig.exit.thread | |
addrconfig.exit.thread: ; preds = %if.end75.i, %for.end.i | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %55) #18 | |
br label %if.end182 | |
addrconfig.exit: ; preds = %for.end.i, %sw.bb70.i, %sw.bb71.i | |
%retval.0.i501 = phi i32 [ %seen_inet.0.lcssa.i, %sw.bb70.i ], [ %seen_inet6.0.lcssa.i, %for.end.i ], [ %seen_inet.0.lcssa.i, %sw.bb71.i ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %55) #18 | |
%tobool177 = icmp eq i32 %retval.0.i501, 0 | |
br i1 %tobool177, label %if.end298, label %if.end182 | |
if.end182: ; preds = %addrconfig.exit.thread, %addrconfig.exit, %if.end171 | |
%75 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
store i8 addrspace(200)* %75, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
%76 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
store i8 addrspace(200)* %76, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload587, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload604, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload621, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%77 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %result.i to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %77) #18 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
%call.i.i502 = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %ai, i8 addrspace(200)* %servname, i32 signext 1) #18 | |
%cmp.i503 = icmp eq i32 %call.i.i502, 0 | |
br i1 %cmp.i503, label %if.end.i504, label %explore_fqdn.exit | |
if.end.i504: ; preds = %if.end182 | |
%call1.i = call signext i32 (i8 addrspace(200)*, %struct._ns_dtab addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, %struct._ns_src addrspace(200)*, ...) @_nsdispatch(i8 addrspace(200)* nonnull %77, %struct._ns_dtab addrspace(200)* getelementptr inbounds ([4 x %struct._ns_dtab], [4 x %struct._ns_dtab] addrspace(200)* @explore_fqdn.dtab, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.11, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([12 x i8], [12 x i8] addrspace(200)* @.str.12, i64 0, i64 0), %struct._ns_src addrspace(200)* bitcast ([3 x { i8 addrspace(200)*, i32 }] addrspace(200)* @default_dns_files to %struct._ns_src addrspace(200)*), i8 addrspace(200)* nonnull %hostname, %struct.addrinfo addrspace(200)* nonnull %ai) #18 | |
switch i32 %call1.i, label %sw.epilog.i [ | |
i32 8, label %free.i | |
i32 2, label %sw.bb2.i | |
i32 4, label %sw.bb3.i | |
i32 1, label %for.cond.preheader.i505 | |
] | |
for.cond.preheader.i505: ; preds = %if.end.i504 | |
%cur.021.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
%tobool22.i = icmp eq %struct.addrinfo addrspace(200)* %cur.021.i, null | |
br i1 %tobool22.i, label %sw.epilog.i, label %do.body.i507 | |
sw.bb2.i: ; preds = %if.end.i504 | |
br label %free.i | |
sw.bb3.i: ; preds = %if.end.i504 | |
br label %free.i | |
for.cond.i: ; preds = %do.body.i507 | |
%ai_next.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.023.i, i64 0, i32 7 | |
%cur.0.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i, align 16, !tbaa !10 | |
%tobool.i506 = icmp eq %struct.addrinfo addrspace(200)* %cur.0.i, null | |
br i1 %tobool.i506, label %sw.epilog.i, label %do.body.i507 | |
do.body.i507: ; preds = %for.cond.preheader.i505, %for.cond.i | |
%cur.023.i = phi %struct.addrinfo addrspace(200)* [ %cur.0.i, %for.cond.i ], [ %cur.021.i, %for.cond.preheader.i505 ] | |
%call5.i = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %cur.023.i, i8 addrspace(200)* %servname, i32 signext 0) #18 | |
%cmp6.i = icmp eq i32 %call5.i, 0 | |
br i1 %cmp6.i, label %for.cond.i, label %free.i | |
sw.epilog.i: ; preds = %for.cond.i, %for.cond.preheader.i505, %if.end.i504 | |
%78 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
br label %explore_fqdn.exit | |
free.i: ; preds = %do.body.i507, %sw.bb3.i, %sw.bb2.i, %if.end.i504 | |
%error.0.i508 = phi i32 [ 8, %sw.bb3.i ], [ 4, %sw.bb2.i ], [ 2, %if.end.i504 ], [ %call5.i, %do.body.i507 ] | |
%79 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %result.i, align 16, !tbaa !10 | |
%tobool9.i = icmp eq %struct.addrinfo addrspace(200)* %79, null | |
br i1 %tobool9.i, label %explore_fqdn.exit, label %while.body.i.i513 | |
while.body.i.i513: ; preds = %free.i, %while.body.i.i513 | |
%ai.addr.06.i.i509 = phi %struct.addrinfo addrspace(200)* [ %80, %while.body.i.i513 ], [ %79, %free.i ] | |
%ai_next.i.i510 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i509, i64 0, i32 7 | |
%80 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i.i510, align 16, !tbaa !3 | |
%ai_canonname.i.i511 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i509, i64 0, i32 5 | |
%81 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i.i511, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %81) #18 | |
%82 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i.i509 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %82) #18 | |
%cmp.i.i512 = icmp eq %struct.addrinfo addrspace(200)* %80, null | |
br i1 %cmp.i.i512, label %explore_fqdn.exit, label %while.body.i.i513 | |
explore_fqdn.exit: ; preds = %while.body.i.i513, %if.end182, %sw.epilog.i, %free.i | |
%afai_unspec.0 = phi %struct.addrinfo addrspace(200)* [ %78, %sw.epilog.i ], [ null, %free.i ], [ null, %if.end182 ], [ null, %while.body.i.i513 ] | |
%retval.0.i515 = phi i32 [ 0, %sw.epilog.i ], [ %error.0.i508, %free.i ], [ 0, %if.end182 ], [ %error.0.i508, %while.body.i.i513 ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %77) #18 | |
br label %globcopy | |
globcopy: ; preds = %for.end154, %explore_fqdn.exit | |
%afai_unspec.1 = phi %struct.addrinfo addrspace(200)* [ %afai_unspec.0, %explore_fqdn.exit ], [ null, %for.end154 ] | |
%error.4 = phi i32 [ %retval.0.i515, %explore_fqdn.exit ], [ 0, %for.end154 ] | |
%tobool261 = icmp eq %struct.addrinfo addrspace(200)* %afai_unspec.1, null | |
br label %for.body187 | |
for.body187: ; preds = %globcopy, %for.inc284 | |
%e_af185697 = phi i32 addrspace(200)* [ getelementptr inbounds ([16 x %struct.explore], [16 x %struct.explore] addrspace(200)* @explore, i64 0, i64 0, i32 0), %globcopy ], [ %e_af185, %for.inc284 ] | |
%ex.1692 = phi %struct.explore addrspace(200)* [ getelementptr inbounds ([16 x %struct.explore], [16 x %struct.explore] addrspace(200)* @explore, i64 0, i64 0), %globcopy ], [ %incdec.ptr285, %for.inc284 ] | |
%error.5690 = phi i32 [ %error.4, %globcopy ], [ %error.6, %for.inc284 ] | |
%cur.0687 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %globcopy ], [ %cur.2, %for.inc284 ] | |
%83 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.0, align 16 | |
store i8 addrspace(200)* %83, i8 addrspace(200)* addrspace(200)* %32, align 16 | |
%84 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai0.sroa.16, align 16 | |
store i8 addrspace(200)* %84, i8 addrspace(200)* addrspace(200)* %34, align 16 | |
store i8 addrspace(200)* %ai0.sroa.22.0.copyload587, i8 addrspace(200)* addrspace(200)* %ai_canonname, align 16, !tbaa.struct !21 | |
store %struct.sockaddr addrspace(200)* %ai0.sroa.28.0.copyload604, %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr, align 16, !tbaa.struct !21 | |
store %struct.addrinfo addrspace(200)* %ai0.sroa.34.0.copyload621, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa.struct !21 | |
%85 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%86 = load i32, i32 addrspace(200)* %e_af185697, align 4, !tbaa !20 | |
%cmp190 = icmp eq i32 %85, %86 | |
br i1 %cmp190, label %if.end202, label %lor.lhs.false191 | |
lor.lhs.false191: ; preds = %for.body187 | |
%e_wild192 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 3 | |
%87 = load i32, i32 addrspace(200)* %e_wild192, align 4, !tbaa !16 | |
%and193 = and i32 %87, 1 | |
%tobool194 = icmp eq i32 %and193, 0 | |
br i1 %tobool194, label %for.inc284, label %land.lhs.true195 | |
land.lhs.true195: ; preds = %lor.lhs.false191 | |
%cmp197 = icmp eq i32 %85, 0 | |
%cmp200 = icmp eq i32 %86, 0 | |
%or.cond489 = or i1 %cmp197, %cmp200 | |
br i1 %or.cond489, label %if.end202, label %for.inc284 | |
if.end202: ; preds = %land.lhs.true195, %for.body187 | |
%88 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%e_socktype204 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 1 | |
%89 = load i32, i32 addrspace(200)* %e_socktype204, align 4, !tbaa !18 | |
%cmp205 = icmp eq i32 %88, %89 | |
br i1 %cmp205, label %if.end217, label %lor.lhs.false206 | |
lor.lhs.false206: ; preds = %if.end202 | |
%e_wild207 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 3 | |
%90 = load i32, i32 addrspace(200)* %e_wild207, align 4, !tbaa !16 | |
%and208 = and i32 %90, 2 | |
%tobool209 = icmp eq i32 %and208, 0 | |
br i1 %tobool209, label %for.inc284, label %land.lhs.true210 | |
land.lhs.true210: ; preds = %lor.lhs.false206 | |
%cmp212 = icmp eq i32 %88, 0 | |
%cmp215 = icmp eq i32 %89, 0 | |
%or.cond490 = or i1 %cmp212, %cmp215 | |
br i1 %or.cond490, label %if.end217, label %for.inc284 | |
if.end217: ; preds = %land.lhs.true210, %if.end202 | |
%91 = load i32, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
%e_protocol219 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 2 | |
%92 = load i32, i32 addrspace(200)* %e_protocol219, align 4, !tbaa !19 | |
%cmp220 = icmp eq i32 %91, %92 | |
br i1 %cmp220, label %if.end232, label %lor.lhs.false221 | |
lor.lhs.false221: ; preds = %if.end217 | |
%e_wild222 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 0, i32 3 | |
%93 = load i32, i32 addrspace(200)* %e_wild222, align 4, !tbaa !16 | |
%and223 = and i32 %93, 4 | |
%tobool224 = icmp eq i32 %and223, 0 | |
br i1 %tobool224, label %for.inc284, label %land.lhs.true225 | |
land.lhs.true225: ; preds = %lor.lhs.false221 | |
%cmp227 = icmp eq i32 %91, 0 | |
%cmp230 = icmp eq i32 %92, 0 | |
%or.cond491 = or i1 %cmp227, %cmp230 | |
br i1 %or.cond491, label %if.end232, label %for.inc284 | |
if.end232: ; preds = %land.lhs.true225, %if.end217 | |
%cmp234 = icmp eq i32 %85, 0 | |
br i1 %cmp234, label %if.then235, label %if.end238 | |
if.then235: ; preds = %if.end232 | |
store i32 %86, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
br label %if.end238 | |
if.end238: ; preds = %if.then235, %if.end232 | |
%cmp240 = icmp ne i32 %88, 0 | |
%cmp243 = icmp eq i32 %89, 0 | |
%or.cond678 = or i1 %cmp240, %cmp243 | |
br i1 %or.cond678, label %if.end247, label %if.then244 | |
if.then244: ; preds = %if.end238 | |
store i32 %89, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
br label %if.end247 | |
if.end247: ; preds = %if.end238, %if.then244 | |
%cmp249 = icmp ne i32 %91, 0 | |
%cmp252 = icmp eq i32 %92, 0 | |
%or.cond679 = or i1 %cmp249, %cmp252 | |
br i1 %or.cond679, label %if.end256, label %if.then253 | |
if.then253: ; preds = %if.end247 | |
store i32 %92, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
br label %if.end256 | |
if.end256: ; preds = %if.end247, %if.then253 | |
%call.i516 = call fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nonnull %ai, i8 addrspace(200)* %servname, i32 signext 1) #18 | |
%cmp258 = icmp eq i32 %call.i516, 0 | |
br i1 %cmp258, label %if.end260, label %for.inc284 | |
if.end260: ; preds = %if.end256 | |
br i1 %tobool261, label %if.else263, label %if.end274 | |
if.else263: ; preds = %if.end260 | |
%94 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%call265 = call fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %94) | |
%cmp266 = icmp eq %struct.afd addrspace(200)* %call265, null | |
br i1 %cmp266, label %for.inc284, label %if.end271 | |
if.end271: ; preds = %if.else263 | |
%95 = bitcast %struct.afd addrspace(200)* %call265 to i8 addrspace(200)* | |
%96 = call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* nonnull %95, i8 addrspace(200)* bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to i8 addrspace(200)*)) | |
%sub.ptr.div269 = ashr exact i64 %96, 6 | |
%arrayidx270 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 %sub.ptr.div269 | |
%97 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx270, align 16, !tbaa !10 | |
%tobool272 = icmp eq %struct.addrinfo addrspace(200)* %97, null | |
br i1 %tobool272, label %for.inc284, label %if.end274 | |
if.end274: ; preds = %if.end260, %if.end271 | |
%afai.0671 = phi %struct.addrinfo addrspace(200)* [ %97, %if.end271 ], [ %afai_unspec.1, %if.end260 ] | |
%ai_next275 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0687, i64 0, i32 7 | |
%call276 = call fastcc signext i32 @explore_copy(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.addrinfo addrspace(200)* nonnull %afai.0671, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %ai_next275) | |
%cmp277 = icmp eq i32 %call276, 0 | |
br i1 %cmp277, label %while.cond, label %bad | |
while.cond: ; preds = %if.end274, %land.rhs | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %98, %land.rhs ], [ %cur.0687, %if.end274 ] | |
%tobool280 = icmp eq %struct.addrinfo addrspace(200)* %cur.1, null | |
br i1 %tobool280, label %for.inc284, label %land.rhs | |
land.rhs: ; preds = %while.cond | |
%ai_next281 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1, i64 0, i32 7 | |
%98 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next281, align 16, !tbaa !3 | |
%tobool282 = icmp eq %struct.addrinfo addrspace(200)* %98, null | |
br i1 %tobool282, label %for.inc284, label %while.cond | |
for.inc284: ; preds = %land.rhs, %while.cond, %land.lhs.true225, %land.lhs.true210, %land.lhs.true195, %if.end271, %if.end256, %lor.lhs.false221, %lor.lhs.false206, %lor.lhs.false191, %if.else263 | |
%cur.2 = phi %struct.addrinfo addrspace(200)* [ %cur.0687, %if.end256 ], [ %cur.0687, %if.end271 ], [ %cur.0687, %if.else263 ], [ %cur.0687, %lor.lhs.false221 ], [ %cur.0687, %lor.lhs.false206 ], [ %cur.0687, %lor.lhs.false191 ], [ %cur.0687, %land.lhs.true195 ], [ %cur.0687, %land.lhs.true210 ], [ %cur.0687, %land.lhs.true225 ], [ null, %while.cond ], [ %cur.1, %land.rhs ] | |
%error.6 = phi i32 [ %error.5690, %if.end256 ], [ %error.5690, %if.end271 ], [ %error.5690, %if.else263 ], [ %error.5690, %lor.lhs.false221 ], [ %error.5690, %lor.lhs.false206 ], [ %error.5690, %lor.lhs.false191 ], [ %error.5690, %land.lhs.true195 ], [ %error.5690, %land.lhs.true210 ], [ %error.5690, %land.lhs.true225 ], [ 0, %while.cond ], [ 0, %land.rhs ] | |
%incdec.ptr285 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %ex.1692, i64 1 | |
%e_af185 = getelementptr inbounds %struct.explore, %struct.explore addrspace(200)* %incdec.ptr285, i64 0, i32 0 | |
%99 = load i32, i32 addrspace(200)* %e_af185, align 4, !tbaa !20 | |
%cmp186 = icmp sgt i32 %99, -1 | |
br i1 %cmp186, label %for.body187, label %for.end286 | |
for.end286: ; preds = %for.inc284 | |
%cmp287 = icmp eq i32 %error.6, 0 | |
br i1 %cmp287, label %if.then288, label %bad | |
if.then288: ; preds = %for.end286 | |
%ai_next289 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%100 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next289, align 16, !tbaa !3 | |
%tobool290 = icmp eq %struct.addrinfo addrspace(200)* %100, null | |
br i1 %tobool290, label %bad, label %if.then291 | |
if.then291: ; preds = %if.then288 | |
store %struct.addrinfo addrspace(200)* %100, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
br label %bad | |
bad: ; preds = %if.end274, %if.then288, %for.end286, %if.then291 | |
%error.7 = phi i32 [ 0, %if.then291 ], [ %error.6, %for.end286 ], [ 4, %if.then288 ], [ %call276, %if.end274 ] | |
br i1 %tobool261, label %if.end298, label %while.body.i | |
while.body.i: ; preds = %bad, %while.body.i | |
%ai.addr.06.i = phi %struct.addrinfo addrspace(200)* [ %101, %while.body.i ], [ %afai_unspec.1, %bad ] | |
%ai_next.i518 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 7 | |
%101 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i518, align 16, !tbaa !3 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 5 | |
%102 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %102) #18 | |
%103 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %103) #18 | |
%cmp.i519 = icmp eq %struct.addrinfo addrspace(200)* %101, null | |
br i1 %cmp.i519, label %if.end298, label %while.body.i | |
if.end298: ; preds = %for.inc, %do.body28.i, %do.body.i, %explore_null.exit, %while.body.i, %addrconfig.exit.thread666, %if.then2, %lor.lhs.false, %lor.lhs.false7, %lor.lhs.false10, %if.end14, %if.end21, %if.end113, %if.end163, %addrconfig.exit, %if.end157, %bad | |
%error.7675 = phi i32 [ %error.7, %bad ], [ 4, %addrconfig.exit.thread666 ], [ 4, %addrconfig.exit ], [ 8, %if.end163 ], [ 8, %if.end157 ], [ 5, %if.end21 ], [ 3, %if.end14 ], [ 12, %if.then2 ], [ 12, %lor.lhs.false ], [ 12, %lor.lhs.false7 ], [ 12, %lor.lhs.false10 ], [ %call.i, %if.end113 ], [ %error.7, %while.body.i ], [ 6, %do.body28.i ], [ 6, %do.body.i ], [ %error.0.i, %explore_null.exit ], [ 12, %for.inc ] | |
%arrayidx304 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 0 | |
%104 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx304, align 16, !tbaa !10 | |
%tobool305 = icmp eq %struct.addrinfo addrspace(200)* %104, null | |
br i1 %tobool305, label %for.inc310, label %while.body.i526 | |
while.body.i526: ; preds = %if.end298, %while.body.i526 | |
%ai.addr.06.i522 = phi %struct.addrinfo addrspace(200)* [ %105, %while.body.i526 ], [ %104, %if.end298 ] | |
%ai_next.i523 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522, i64 0, i32 7 | |
%105 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i523, align 16, !tbaa !3 | |
%ai_canonname.i524 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522, i64 0, i32 5 | |
%106 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i524, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %106) #18 | |
%107 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i522 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %107) #18 | |
%cmp.i525 = icmp eq %struct.addrinfo addrspace(200)* %105, null | |
br i1 %cmp.i525, label %for.inc310, label %while.body.i526 | |
for.inc310: ; preds = %while.body.i526, %if.end298 | |
%arrayidx304.1 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 1 | |
%108 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx304.1, align 16, !tbaa !10 | |
%tobool305.1 = icmp eq %struct.addrinfo addrspace(200)* %108, null | |
br i1 %tobool305.1, label %for.inc310.1, label %while.body.i526.1 | |
if.then314: ; preds = %for.inc310.2 | |
%ai_next315 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%109 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next315, align 16, !tbaa !3 | |
%tobool316 = icmp eq %struct.addrinfo addrspace(200)* %109, null | |
br i1 %tobool316, label %cleanup, label %while.body.i535 | |
while.body.i535: ; preds = %if.then314, %while.body.i535 | |
%ai.addr.06.i531 = phi %struct.addrinfo addrspace(200)* [ %110, %while.body.i535 ], [ %109, %if.then314 ] | |
%ai_next.i532 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i531, i64 0, i32 7 | |
%110 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i532, align 16, !tbaa !3 | |
%ai_canonname.i533 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i531, i64 0, i32 5 | |
%111 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i533, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %111) #18 | |
%112 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i531 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %112) #18 | |
%cmp.i534 = icmp eq %struct.addrinfo addrspace(200)* %110, null | |
br i1 %cmp.i534, label %cleanup, label %while.body.i535 | |
cleanup: ; preds = %while.body.i535, %for.inc310.2, %if.then314, %entry | |
%retval.0 = phi i32 [ 8, %entry ], [ %error.7675, %if.then314 ], [ %error.7675, %for.inc310.2 ], [ %error.7675, %while.body.i535 ] | |
call void @llvm.lifetime.end.p200i8(i64 64, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.0.0..sroa_cast654) | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %ai0.sroa.16.0..sroa_idx646) | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
while.body.i526.1: ; preds = %for.inc310, %while.body.i526.1 | |
%ai.addr.06.i522.1 = phi %struct.addrinfo addrspace(200)* [ %113, %while.body.i526.1 ], [ %108, %for.inc310 ] | |
%ai_next.i523.1 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.1, i64 0, i32 7 | |
%113 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i523.1, align 16, !tbaa !3 | |
%ai_canonname.i524.1 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.1, i64 0, i32 5 | |
%114 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i524.1, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %114) #18 | |
%115 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i522.1 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %115) #18 | |
%cmp.i525.1 = icmp eq %struct.addrinfo addrspace(200)* %113, null | |
br i1 %cmp.i525.1, label %for.inc310.1, label %while.body.i526.1 | |
for.inc310.1: ; preds = %while.body.i526.1, %for.inc310 | |
%arrayidx304.2 = getelementptr inbounds [4 x %struct.addrinfo addrspace(200)*], [4 x %struct.addrinfo addrspace(200)*] addrspace(200)* %afailist, i64 0, i64 2 | |
%116 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %arrayidx304.2, align 16, !tbaa !10 | |
%tobool305.2 = icmp eq %struct.addrinfo addrspace(200)* %116, null | |
br i1 %tobool305.2, label %for.inc310.2, label %while.body.i526.2 | |
while.body.i526.2: ; preds = %for.inc310.1, %while.body.i526.2 | |
%ai.addr.06.i522.2 = phi %struct.addrinfo addrspace(200)* [ %117, %while.body.i526.2 ], [ %116, %for.inc310.1 ] | |
%ai_next.i523.2 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.2, i64 0, i32 7 | |
%117 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i523.2, align 16, !tbaa !3 | |
%ai_canonname.i524.2 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i522.2, i64 0, i32 5 | |
%118 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i524.2, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %118) #18 | |
%119 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i522.2 to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %119) #18 | |
%cmp.i525.2 = icmp eq %struct.addrinfo addrspace(200)* %117, null | |
br i1 %cmp.i525.2, label %for.inc310.2, label %while.body.i526.2 | |
for.inc310.2: ; preds = %while.body.i526.2, %for.inc310.1 | |
%120 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
%tobool313 = icmp eq %struct.addrinfo addrspace(200)* %120, null | |
br i1 %tobool313, label %if.then314, label %cleanup | |
} | |
; Function Attrs: argmemonly nounwind willreturn | |
declare void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* noalias nocapture writeonly, i8 addrspace(200)* noalias nocapture readonly, i64, i1 immarg) addrspace(200) #3 | |
; Function Attrs: nounwind readnone willreturn | |
declare i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)*, i8 addrspace(200)*) addrspace(200) #5 | |
; Function Attrs: noinline norecurse nounwind readonly uwtable | |
define internal fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %af) unnamed_addr addrspace(200) #6 { | |
entry: | |
switch i32 %af, label %cleanup [ | |
i32 1, label %cleanup.fold.split11 | |
i32 28, label %cleanup.fold.split | |
i32 2, label %cleanup.fold.split10 | |
] | |
cleanup.fold.split: ; preds = %entry | |
br label %cleanup | |
cleanup.fold.split10: ; preds = %entry | |
br label %cleanup | |
cleanup.fold.split11: ; preds = %entry | |
br label %cleanup | |
cleanup: ; preds = %entry, %cleanup.fold.split11, %cleanup.fold.split10, %cleanup.fold.split | |
%retval.0 = phi %struct.afd addrspace(200)* [ bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to %struct.afd addrspace(200)*), %cleanup.fold.split ], [ bitcast (i32 addrspace(200)* getelementptr inbounds ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }], [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl, i64 0, i64 1, i32 0) to %struct.afd addrspace(200)*), %cleanup.fold.split10 ], [ bitcast (i32 addrspace(200)* getelementptr inbounds ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }], [4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl, i64 0, i64 2, i32 0) to %struct.afd addrspace(200)*), %cleanup.fold.split11 ], [ null, %entry ] | |
ret %struct.afd addrspace(200)* %retval.0 | |
} | |
; Function Attrs: noinline nounwind uwtable | |
define internal fastcc signext i32 @explore_copy(%struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.addrinfo addrspace(200)* readonly %src0, %struct.addrinfo addrspace(200)* addrspace(200)* nocapture %res) unnamed_addr addrspace(200) #7 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp40 = icmp eq %struct.addrinfo addrspace(200)* %src0, null | |
br i1 %cmp40, label %for.end, label %for.body.lr.ph | |
for.body.lr.ph: ; preds = %entry | |
%ai_family1 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 1 | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 2 | |
%ai_protocol = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 3 | |
br label %for.body | |
for.body: ; preds = %for.body.lr.ph, %for.inc | |
%src.043 = phi %struct.addrinfo addrspace(200)* [ %src0, %for.body.lr.ph ], [ %24, %for.inc ] | |
%cur.041 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %for.body.lr.ph ], [ %cur.1, %for.inc ] | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 1 | |
%1 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%2 = load i32, i32 addrspace(200)* %ai_family1, align 4, !tbaa !14 | |
%cmp2 = icmp eq i32 %1, %2 | |
br i1 %cmp2, label %if.end, label %for.inc | |
if.end: ; preds = %for.body | |
%ai_addrlen.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 4 | |
%3 = load i32, i32 addrspace(200)* %ai_addrlen.i, align 16, !tbaa !11 | |
%conv.i = zext i32 %3 to i64 | |
%add.i = add nuw nsw i64 %conv.i, 80 | |
%call.i = tail call noalias i8 addrspace(200)* @calloc(i64 zeroext 1, i64 zeroext %add.i) #20 | |
%4 = bitcast i8 addrspace(200)* %call.i to %struct.addrinfo addrspace(200)* | |
%cmp.i = icmp eq i8 addrspace(200)* %call.i, null | |
br i1 %cmp.i, label %copy_ai.exit.thread, label %if.end.i | |
if.end.i: ; preds = %if.end | |
%5 = bitcast %struct.addrinfo addrspace(200)* %src.043 to i8 addrspace(200)* | |
tail call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %call.i, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %5, i64 80, i1 false) #21 | |
%add.ptr.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 80 | |
%ai_addr.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 48 | |
%6 = bitcast i8 addrspace(200)* %ai_addr.i to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %add.ptr.i, i8 addrspace(200)* addrspace(200)* %6, align 16, !tbaa !12 | |
%ai_addr3.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 6 | |
%7 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr3.i to i8 addrspace(200)* addrspace(200)* | |
%8 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %7, align 16, !tbaa !12 | |
%9 = load i32, i32 addrspace(200)* %ai_addrlen.i, align 16, !tbaa !11 | |
%conv5.i = zext i32 %9 to i64 | |
tail call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 1 %add.ptr.i, i8 addrspace(200)* align 1 %8, i64 %conv5.i, i1 false) #18 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 5 | |
%10 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
%tobool.i = icmp eq i8 addrspace(200)* %10, null | |
br i1 %tobool.i, label %if.else.i, label %if.then6.i | |
if.then6.i: ; preds = %if.end.i | |
%call8.i = tail call i64 @strlen(i8 addrspace(200)* nonnull %10) #22 | |
%add9.i = add i64 %call8.i, 1 | |
%call10.i = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext %add9.i) #23 | |
%ai_canonname11.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 32 | |
%11 = bitcast i8 addrspace(200)* %ai_canonname11.i to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %call10.i, i8 addrspace(200)* addrspace(200)* %11, align 16, !tbaa !9 | |
%cmp12.i = icmp eq i8 addrspace(200)* %call10.i, null | |
br i1 %cmp12.i, label %if.then14.i, label %if.end15.i | |
if.then14.i: ; preds = %if.then6.i | |
tail call void @free(i8 addrspace(200)* nonnull %call.i) #18 | |
br label %copy_ai.exit.thread | |
if.end15.i: ; preds = %if.then6.i | |
%12 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
%call18.i = tail call i64 @strlcpy(i8 addrspace(200)* nonnull %call10.i, i8 addrspace(200)* %12, i64 zeroext %add9.i) #18 | |
br label %copy_ai.exit | |
if.else.i: ; preds = %if.end.i | |
%ai_canonname19.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 32 | |
%13 = bitcast i8 addrspace(200)* %ai_canonname19.i to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* null, i8 addrspace(200)* addrspace(200)* %13, align 16, !tbaa !9 | |
br label %copy_ai.exit | |
copy_ai.exit.thread: ; preds = %if.end, %if.then14.i | |
%ai_next334 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.041, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next334, align 16, !tbaa !3 | |
%14 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp5.i = icmp eq %struct.addrinfo addrspace(200)* %14, null | |
br i1 %cmp5.i, label %cleanup, label %while.body.i | |
copy_ai.exit: ; preds = %if.end15.i, %if.else.i | |
%ai_next.i = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 64 | |
%15 = bitcast i8 addrspace(200)* %ai_next.i to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %15, align 16, !tbaa !3 | |
%ai_next3 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.041, i64 0, i32 7 | |
%16 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next3 to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %call.i, i8 addrspace(200)* addrspace(200)* %16, align 16, !tbaa !3 | |
%17 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%ai_socktype8 = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 8 | |
%18 = bitcast i8 addrspace(200)* %ai_socktype8 to i32 addrspace(200)* | |
store i32 %17, i32 addrspace(200)* %18, align 8, !tbaa !15 | |
%19 = load i32, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
%ai_protocol10 = getelementptr inbounds i8, i8 addrspace(200)* %call.i, i64 12 | |
%20 = bitcast i8 addrspace(200)* %ai_protocol10 to i32 addrspace(200)* | |
store i32 %19, i32 addrspace(200)* %20, align 4, !tbaa !41 | |
br label %for.inc | |
while.body.i: ; preds = %copy_ai.exit.thread, %while.body.i | |
%ai.addr.06.i = phi %struct.addrinfo addrspace(200)* [ %21, %while.body.i ], [ %14, %copy_ai.exit.thread ] | |
%ai_next.i30 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 7 | |
%21 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i30, align 16, !tbaa !3 | |
%ai_canonname.i31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i, i64 0, i32 5 | |
%22 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i31, align 16, !tbaa !9 | |
tail call void @free(i8 addrspace(200)* %22) #18 | |
%23 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i to i8 addrspace(200)* | |
tail call void @free(i8 addrspace(200)* nonnull %23) #18 | |
%cmp.i32 = icmp eq %struct.addrinfo addrspace(200)* %21, null | |
br i1 %cmp.i32, label %cleanup, label %while.body.i | |
for.inc: ; preds = %for.body, %copy_ai.exit | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %cur.041, %for.body ], [ %4, %copy_ai.exit ] | |
%ai_next12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %src.043, i64 0, i32 7 | |
%24 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next12, align 16, !tbaa !3 | |
%cmp = icmp eq %struct.addrinfo addrspace(200)* %24, null | |
br i1 %cmp, label %for.end, label %for.body | |
for.end: ; preds = %for.inc, %entry | |
%25 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
store %struct.addrinfo addrspace(200)* %25, %struct.addrinfo addrspace(200)* addrspace(200)* %res, align 16, !tbaa !10 | |
br label %cleanup | |
cleanup: ; preds = %while.body.i, %copy_ai.exit.thread, %for.end | |
%retval.0 = phi i32 [ 0, %for.end ], [ 6, %copy_ai.exit.thread ], [ 6, %while.body.i ] | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nounwind uwtable | |
define signext i32 @main() local_unnamed_addr addrspace(200) #8 { | |
entry: | |
%res = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%hints = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %res to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 2 | |
%2 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %2, i8 0, i64 80, i1 false) | |
store i32 1, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 0 | |
store i32 1, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%call = call signext i32 @my_getaddrinfo(i8 addrspace(200)* null, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str, i64 0, i64 0), %struct.addrinfo addrspace(200)* nonnull %hints, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %res) | |
%tobool = icmp eq i32 %call, 0 | |
%.sink = select i1 %tobool, i8 addrspace(200)* getelementptr inbounds ([23 x i8], [23 x i8] addrspace(200)* @str, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([23 x i8], [23 x i8] addrspace(200)* @str.23, i64 0, i64 0) | |
%not.tobool = xor i1 %tobool, true | |
%retval.0 = zext i1 %not.tobool to i32 | |
%puts = call i32 @puts(i8 addrspace(200)* nonnull dereferenceable(1) %.sink) | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nofree nounwind allocsize(0,1) | |
declare noalias i8 addrspace(200)* @calloc(i64 zeroext, i64 zeroext) local_unnamed_addr addrspace(200) #9 | |
; Function Attrs: argmemonly nofree nounwind readonly | |
declare i64 @strlen(i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #10 | |
; Function Attrs: nofree nounwind allocsize(0) | |
declare noalias i8 addrspace(200)* @malloc(i64 zeroext) local_unnamed_addr addrspace(200) #11 | |
; Function Attrs: nofree | |
declare i64 @strlcpy(i8 addrspace(200)*, i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #12 | |
declare signext i32 @_socket(i32 signext, i32 signext, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare i32 addrspace(200)* @__error() local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @_close(i32 signext) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.afd addrspace(200)* nocapture readonly %afd, i8 addrspace(200)* %addr) unnamed_addr addrspace(200) #0 { | |
entry: | |
%mapaddr = alloca %struct.in6_addr, align 4, addrspace(200) | |
%0 = bitcast %struct.in6_addr addrspace(200)* %mapaddr to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
%a_af = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd, i64 0, i32 0 | |
%1 = load i32, i32 addrspace(200)* %a_af, align 16, !tbaa !23 | |
%cmp = icmp eq i32 %1, 2 | |
br i1 %cmp, label %land.lhs.true, label %if.end | |
land.lhs.true: ; preds = %entry | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
%2 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %2, 2048 | |
%cmp1 = icmp eq i32 %and, 0 | |
br i1 %cmp1, label %if.end, label %if.then | |
if.then: ; preds = %land.lhs.true | |
%arrayidx.i = getelementptr inbounds %struct.in6_addr, %struct.in6_addr addrspace(200)* %mapaddr, i64 0, i32 0, i32 0, i64 3 | |
%3 = bitcast i8 addrspace(200)* %addr to i32 addrspace(200)* | |
%4 = load i32, i32 addrspace(200)* %3, align 1 | |
store i32 %4, i32 addrspace(200)* %arrayidx.i, align 4 | |
%arrayidx1.i = getelementptr inbounds i8, i8 addrspace(200)* %0, i64 10 | |
%5 = bitcast i8 addrspace(200)* %arrayidx1.i to i16 addrspace(200)* | |
store i16 -1, i16 addrspace(200)* %5, align 2 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 4 dereferenceable(10) %0, i8 0, i64 10, i1 false) #18 | |
br label %if.end | |
if.end: ; preds = %land.lhs.true, %if.then, %entry | |
%addr.addr.0 = phi i8 addrspace(200)* [ %0, %if.then ], [ %addr, %land.lhs.true ], [ %addr, %entry ] | |
%afd.addr.0 = phi %struct.afd addrspace(200)* [ bitcast ([4 x { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32 }] addrspace(200)* @afdl to %struct.afd addrspace(200)*), %if.then ], [ %afd, %land.lhs.true ], [ %afd, %entry ] | |
%a_socklen = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 2 | |
%6 = load i32, i32 addrspace(200)* %a_socklen, align 8, !tbaa !42 | |
%conv = zext i32 %6 to i64 | |
%add = add nuw nsw i64 %conv, 80 | |
%call = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext %add) #24 | |
%7 = bitcast i8 addrspace(200)* %call to %struct.addrinfo addrspace(200)* | |
%cmp2 = icmp eq i8 addrspace(200)* %call, null | |
br i1 %cmp2, label %cleanup, label %if.end5 | |
if.end5: ; preds = %if.end | |
%8 = bitcast %struct.addrinfo addrspace(200)* %pai to i8 addrspace(200)* | |
tail call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %call, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %8, i64 80, i1 false) #19 | |
%add.ptr = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 80 | |
%ai_addr = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 48 | |
%9 = bitcast i8 addrspace(200)* %ai_addr to %struct.sockaddr addrspace(200)* addrspace(200)* | |
%10 = bitcast i8 addrspace(200)* %ai_addr to i8 addrspace(200)* addrspace(200)* | |
store i8 addrspace(200)* %add.ptr, i8 addrspace(200)* addrspace(200)* %10, align 16, !tbaa !12 | |
%11 = load i32, i32 addrspace(200)* %a_socklen, align 8, !tbaa !42 | |
%conv8 = zext i32 %11 to i64 | |
tail call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 1 %add.ptr, i8 0, i64 %conv8, i1 false) | |
%conv10 = trunc i32 %11 to i8 | |
store i8 %conv10, i8 addrspace(200)* %add.ptr, align 1, !tbaa !43 | |
%ai_addrlen = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 16 | |
%12 = bitcast i8 addrspace(200)* %ai_addrlen to i32 addrspace(200)* | |
store i32 %11, i32 addrspace(200)* %12, align 16, !tbaa !11 | |
%ai_family = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 4 | |
%13 = bitcast i8 addrspace(200)* %ai_family to i32 addrspace(200)* | |
%14 = load i32, i32 addrspace(200)* %13, align 4, !tbaa !14 | |
%cmp13 = icmp eq i32 %14, 1 | |
br i1 %cmp13, label %if.then15, label %if.end32 | |
if.then15: ; preds = %if.end5 | |
%a_addrlen = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 1 | |
%15 = load i32, i32 addrspace(200)* %a_addrlen, align 4, !tbaa !44 | |
%conv16 = sext i32 %15 to i64 | |
%call17 = call i64 @strnlen(i8 addrspace(200)* %addr.addr.0, i64 zeroext %conv16) #22 | |
%16 = trunc i64 %call17 to i32 | |
%17 = sub i32 %11, %15 | |
%conv23 = add i32 %17, %16 | |
store i32 %conv23, i32 addrspace(200)* %12, align 16, !tbaa !11 | |
%conv2575 = zext i32 %15 to i64 | |
%18 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %9, align 16, !tbaa !12 | |
%sa_len28 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %18, i64 0, i32 0 | |
%19 = load i8, i8 addrspace(200)* %sa_len28, align 1, !tbaa !43 | |
%sub2674 = sub i64 %call17, %conv2575 | |
%20 = trunc i64 %sub2674 to i8 | |
%conv31 = add i8 %19, %20 | |
store i8 %conv31, i8 addrspace(200)* %sa_len28, align 1, !tbaa !43 | |
br label %if.end32 | |
if.end32: ; preds = %if.then15, %if.end5 | |
%a_af33 = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 0 | |
%21 = load i32, i32 addrspace(200)* %a_af33, align 16, !tbaa !23 | |
store i32 %21, i32 addrspace(200)* %13, align 4, !tbaa !14 | |
%conv35 = trunc i32 %21 to i8 | |
%22 = load %struct.sockaddr addrspace(200)*, %struct.sockaddr addrspace(200)* addrspace(200)* %9, align 16, !tbaa !12 | |
%sa_family = getelementptr inbounds %struct.sockaddr, %struct.sockaddr addrspace(200)* %22, i64 0, i32 1 | |
store i8 %conv35, i8 addrspace(200)* %sa_family, align 1, !tbaa !30 | |
%a_off = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 3 | |
%23 = load i32, i32 addrspace(200)* %a_off, align 4, !tbaa !45 | |
%idx.ext = sext i32 %23 to i64 | |
%add.ptr38 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr, i64 %idx.ext | |
%a_addrlen39 = getelementptr inbounds %struct.afd, %struct.afd addrspace(200)* %afd.addr.0, i64 0, i32 1 | |
%24 = load i32, i32 addrspace(200)* %a_addrlen39, align 4, !tbaa !44 | |
%conv40 = sext i32 %24 to i64 | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 1 %add.ptr38, i8 addrspace(200)* align 1 %addr.addr.0, i64 %conv40, i1 false) | |
br label %cleanup | |
cleanup: ; preds = %if.end, %if.end32 | |
%retval.0 = phi %struct.addrinfo addrspace(200)* [ %7, %if.end32 ], [ null, %if.end ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %0) #18 | |
ret %struct.addrinfo addrspace(200)* %retval.0 | |
} | |
; Function Attrs: nounwind uwtable | |
define internal fastcc signext i32 @get_port(%struct.addrinfo addrspace(200)* nocapture readonly %ai, i8 addrspace(200)* %servname, i32 signext %matchonly) unnamed_addr addrspace(200) #0 { | |
entry: | |
%ep.i = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%cmp = icmp eq i8 addrspace(200)* %servname, null | |
br i1 %cmp, label %cleanup, label %if.end | |
if.end: ; preds = %entry | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 1 | |
%0 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
switch i32 %0, label %cleanup [ | |
i32 28, label %sw.epilog | |
i32 2, label %sw.epilog | |
] | |
sw.epilog: ; preds = %if.end, %if.end | |
%ai_socktype = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 2 | |
%1 = load i32, i32 addrspace(200)* %ai_socktype, align 8, !tbaa !15 | |
switch i32 %1, label %sw.default9 [ | |
i32 3, label %cleanup | |
i32 2, label %sw.epilog10 | |
i32 1, label %sw.epilog10 | |
i32 5, label %sw.epilog10 | |
i32 0, label %sw.bb4 | |
] | |
sw.bb4: ; preds = %sw.epilog | |
switch i32 %0, label %sw.default7 [ | |
i32 2, label %sw.epilog10 | |
i32 28, label %sw.epilog10 | |
] | |
sw.default7: ; preds = %sw.bb4 | |
br label %sw.epilog10 | |
sw.default9: ; preds = %sw.epilog | |
br label %cleanup | |
sw.epilog10: ; preds = %sw.bb4, %sw.bb4, %sw.epilog, %sw.epilog, %sw.epilog, %sw.default7 | |
%allownumeric.0 = phi i32 [ 0, %sw.default7 ], [ 1, %sw.epilog ], [ 1, %sw.epilog ], [ 1, %sw.epilog ], [ 1, %sw.bb4 ], [ 1, %sw.bb4 ] | |
%2 = bitcast i8 addrspace(200)* addrspace(200)* %ep.i to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
%3 = load i8, i8 addrspace(200)* %servname, align 1, !tbaa !36 | |
%cmp.i = icmp eq i8 %3, 0 | |
br i1 %cmp.i, label %if.else, label %if.end.i | |
if.end.i: ; preds = %sw.epilog10 | |
store i8 addrspace(200)* null, i8 addrspace(200)* addrspace(200)* %ep.i, align 16, !tbaa !10 | |
%call.i = tail call i32 addrspace(200)* @__error() #18 | |
store i32 0, i32 addrspace(200)* %call.i, align 4, !tbaa !22 | |
%call2.i = call i64 @strtoul(i8 addrspace(200)* nonnull %servname, i8 addrspace(200)* addrspace(200)* nonnull %ep.i, i32 signext 10) #18 | |
%call3.i = tail call i32 addrspace(200)* @__error() #18 | |
%4 = load i32, i32 addrspace(200)* %call3.i, align 4, !tbaa !22 | |
%cmp4.i = icmp eq i32 %4, 0 | |
%5 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ep.i, align 16 | |
%tobool.i = icmp ne i8 addrspace(200)* %5, null | |
%or.cond.i = and i1 %cmp4.i, %tobool.i | |
br i1 %or.cond.i, label %land.lhs.true6.i, label %if.else | |
land.lhs.true6.i: ; preds = %if.end.i | |
%6 = load i8, i8 addrspace(200)* %5, align 1, !tbaa !36 | |
%cmp8.i = icmp eq i8 %6, 0 | |
%cmp11.i = icmp ult i64 %call2.i, 4294967296 | |
%or.cond16.i = and i1 %cmp11.i, %cmp8.i | |
br i1 %or.cond16.i, label %if.then12, label %if.else | |
if.then12: ; preds = %land.lhs.true6.i | |
%conv14.i = trunc i64 %call2.i to i32 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
%tobool = icmp eq i32 %allownumeric.0, 0 | |
%7 = icmp ugt i32 %conv14.i, 65535 | |
%or.cond = or i1 %tobool, %7 | |
br i1 %or.cond, label %cleanup, label %if.end34 | |
if.else: ; preds = %sw.epilog10, %land.lhs.true6.i, %if.end.i | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 0 | |
%8 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %8, 8 | |
%tobool20 = icmp eq i32 %and, 0 | |
br i1 %tobool20, label %if.end22, label %cleanup | |
if.end22: ; preds = %if.else | |
%ai_protocol = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 3 | |
%9 = load i32, i32 addrspace(200)* %ai_protocol, align 4, !tbaa !41 | |
switch i32 %9, label %sw.default27 [ | |
i32 17, label %sw.epilog28 | |
i32 6, label %sw.bb24 | |
i32 132, label %sw.bb25 | |
i32 136, label %sw.bb26 | |
] | |
sw.bb24: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.bb25: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.bb26: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.default27: ; preds = %if.end22 | |
br label %sw.epilog28 | |
sw.epilog28: ; preds = %if.end22, %sw.default27, %sw.bb26, %sw.bb25, %sw.bb24 | |
%proto.0 = phi i8 addrspace(200)* [ null, %sw.default27 ], [ getelementptr inbounds ([8 x i8], [8 x i8] addrspace(200)* @.str.7, i64 0, i64 0), %sw.bb26 ], [ getelementptr inbounds ([5 x i8], [5 x i8] addrspace(200)* @.str.6, i64 0, i64 0), %sw.bb25 ], [ getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.5, i64 0, i64 0), %sw.bb24 ], [ getelementptr inbounds ([4 x i8], [4 x i8] addrspace(200)* @.str.4, i64 0, i64 0), %if.end22 ] | |
%call29 = tail call %struct.servent addrspace(200)* @getservbyname(i8 addrspace(200)* nonnull %servname, i8 addrspace(200)* %proto.0) #18 | |
%cmp30 = icmp eq %struct.servent addrspace(200)* %call29, null | |
br i1 %cmp30, label %cleanup, label %if.end33 | |
if.end33: ; preds = %sw.epilog28 | |
%s_port = getelementptr inbounds %struct.servent, %struct.servent addrspace(200)* %call29, i64 0, i32 2 | |
%10 = load i32, i32 addrspace(200)* %s_port, align 16, !tbaa !46 | |
br label %if.end34 | |
if.end34: ; preds = %if.then12, %if.end33 | |
%storemerge = phi i32 [ %10, %if.end33 ], [ %conv14.i, %if.then12 ] | |
%tobool35 = icmp eq i32 %matchonly, 0 | |
br i1 %tobool35, label %if.then36, label %cleanup | |
if.then36: ; preds = %if.end34 | |
%11 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
switch i32 %11, label %cleanup [ | |
i32 2, label %sw.bb38 | |
i32 28, label %sw.bb40 | |
] | |
sw.bb38: ; preds = %if.then36 | |
%conv39 = trunc i32 %storemerge to i16 | |
%ai_addr = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 6 | |
%12 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr to %struct.sockaddr_in addrspace(200)* addrspace(200)* | |
%13 = load %struct.sockaddr_in addrspace(200)*, %struct.sockaddr_in addrspace(200)* addrspace(200)* %12, align 16, !tbaa !12 | |
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in addrspace(200)* %13, i64 0, i32 2 | |
store i16 %conv39, i16 addrspace(200)* %sin_port, align 2, !tbaa !48 | |
br label %cleanup | |
sw.bb40: ; preds = %if.then36 | |
%conv41 = trunc i32 %storemerge to i16 | |
%ai_addr42 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 6 | |
%14 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr42 to %struct.sockaddr_in6 addrspace(200)* addrspace(200)* | |
%15 = load %struct.sockaddr_in6 addrspace(200)*, %struct.sockaddr_in6 addrspace(200)* addrspace(200)* %14, align 16, !tbaa !12 | |
%sin6_port = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %15, i64 0, i32 2 | |
store i16 %conv41, i16 addrspace(200)* %sin6_port, align 2, !tbaa !49 | |
br label %cleanup | |
cleanup: ; preds = %if.then36, %sw.bb40, %sw.bb38, %if.end34, %sw.epilog28, %if.else, %if.then12, %sw.epilog, %if.end, %entry, %sw.default9 | |
%retval.0 = phi i32 [ 10, %sw.default9 ], [ 0, %entry ], [ 0, %if.end ], [ 9, %sw.epilog ], [ 9, %if.then12 ], [ 8, %if.else ], [ 9, %sw.epilog28 ], [ 0, %if.end34 ], [ 0, %sw.bb38 ], [ 0, %sw.bb40 ], [ 0, %if.then36 ] | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nounwind readonly | |
declare i64 @strnlen(i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #14 | |
declare %struct.servent addrspace(200)* @getservbyname(i8 addrspace(200)*, i8 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nofree nounwind | |
declare i64 @strtoul(i8 addrspace(200)* readonly, i8 addrspace(200)* addrspace(200)* nocapture, i32 signext) local_unnamed_addr addrspace(200) #4 | |
declare signext i32 @getifaddrs(%struct.ifaddrs addrspace(200)* addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare void @freeifaddrs(%struct.ifaddrs addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @_ioctl(i32 signext, i64 zeroext, ...) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal signext i32 @_files_getaddrinfo(i8 addrspace(200)* nocapture %rv, i8 addrspace(200)* nocapture readnone %cb_data, i8 addrspace(200)* %ap) addrspace(200) #0 { | |
_sethtent.exit: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%hostf = alloca %struct.__sFILE addrspace(200)*, align 16, addrspace(200) | |
%ai0 = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.__sFILE addrspace(200)* addrspace(200)* %hostf to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
%2 = tail call i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)* %ap) | |
%3 = add i64 %2, 15 | |
%4 = and i64 %3, -16 | |
%5 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* %ap, i64 %4) | |
%argp.next = getelementptr inbounds i8, i8 addrspace(200)* %5, i64 16 | |
%6 = bitcast i8 addrspace(200)* %5 to i8 addrspace(200)* addrspace(200)* | |
%7 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %6, align 16 | |
%8 = add i64 %4, 31 | |
%9 = and i64 %8, -16 | |
%10 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* nonnull %argp.next, i64 %9) | |
%11 = bitcast i8 addrspace(200)* %10 to %struct.addrinfo addrspace(200)* addrspace(200)* | |
%12 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %11, align 16 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%call.i = tail call %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* getelementptr inbounds ([11 x i8], [11 x i8] addrspace(200)* @.str.13, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.14, i64 0, i64 0)) #18 | |
store %struct.__sFILE addrspace(200)* %call.i, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %12, i64 0, i32 1 | |
%13 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp = icmp eq i32 %13, 28 | |
br i1 %cmp, label %land.lhs.true, label %if.else | |
land.lhs.true: ; preds = %_sethtent.exit | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %12, i64 0, i32 0 | |
%14 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %14, 2304 | |
%cmp3 = icmp eq i32 %and, 2048 | |
br i1 %cmp3, label %if.then, label %if.else | |
if.then: ; preds = %land.lhs.true | |
%15 = bitcast %struct.addrinfo addrspace(200)* %ai0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %15) #18 | |
%16 = bitcast %struct.addrinfo addrspace(200)* %12 to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %15, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %16, i64 80, i1 false), !tbaa.struct !21 | |
%ai_flags4 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai0, i64 0, i32 0 | |
%17 = load i32, i32 addrspace(200)* %ai_flags4, align 16, !tbaa !13 | |
%and5 = and i32 %17, -2049 | |
store i32 %and5, i32 addrspace(200)* %ai_flags4, align 16, !tbaa !13 | |
%call = call fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nonnull %hostf, i8 addrspace(200)* %7, %struct.addrinfo addrspace(200)* nonnull %ai0, %struct.addrinfo addrspace(200)* nonnull %sentinel) | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%18 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp6 = icmp eq %struct.addrinfo addrspace(200)* %18, null | |
br i1 %cmp6, label %if.then7, label %if.end | |
if.then7: ; preds = %if.then | |
%19 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool.i31 = icmp eq %struct.__sFILE addrspace(200)* %19, null | |
br i1 %tobool.i31, label %if.then.i33, label %if.else.i34 | |
if.then.i33: ; preds = %if.then7 | |
%call.i32 = call %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* getelementptr inbounds ([11 x i8], [11 x i8] addrspace(200)* @.str.13, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.14, i64 0, i64 0)) #18 | |
store %struct.__sFILE addrspace(200)* %call.i32, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
br label %_sethtent.exit35 | |
if.else.i34: ; preds = %if.then7 | |
call void @rewind(%struct.__sFILE addrspace(200)* nonnull %19) #18 | |
br label %_sethtent.exit35 | |
_sethtent.exit35: ; preds = %if.then.i33, %if.else.i34 | |
%or = or i32 %17, 2048 | |
store i32 %or, i32 addrspace(200)* %ai_flags4, align 16, !tbaa !13 | |
%call9 = call fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nonnull %hostf, i8 addrspace(200)* %7, %struct.addrinfo addrspace(200)* nonnull %ai0, %struct.addrinfo addrspace(200)* %call) | |
br label %if.end | |
if.end: ; preds = %_sethtent.exit35, %if.then | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %15) #18 | |
br label %if.end11 | |
if.else: ; preds = %land.lhs.true, %_sethtent.exit | |
%call10 = call fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nonnull %hostf, i8 addrspace(200)* %7, %struct.addrinfo addrspace(200)* %12, %struct.addrinfo addrspace(200)* nonnull %sentinel) | |
br label %if.end11 | |
if.end11: ; preds = %if.else, %if.end | |
%20 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool.i36 = icmp eq %struct.__sFILE addrspace(200)* %20, null | |
br i1 %tobool.i36, label %_endhtent.exit, label %if.then.i38 | |
if.then.i38: ; preds = %if.end11 | |
%call.i37 = call signext i32 @fclose(%struct.__sFILE addrspace(200)* nonnull %20) #18 | |
store %struct.__sFILE addrspace(200)* null, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
br label %_endhtent.exit | |
_endhtent.exit: ; preds = %if.end11, %if.then.i38 | |
%ai_next12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%21 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next12, align 16, !tbaa !3 | |
%22 = bitcast i8 addrspace(200)* %rv to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* %21, %struct.addrinfo addrspace(200)* addrspace(200)* %22, align 16, !tbaa !10 | |
%cmp14 = icmp eq %struct.addrinfo addrspace(200)* %21, null | |
%. = select i1 %cmp14, i32 4, i32 1 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %. | |
} | |
; Function Attrs: nounwind uwtable | |
define internal signext i32 @_dns_getaddrinfo(i8 addrspace(200)* nocapture %rv, i8 addrspace(200)* nocapture readnone %cb_data, i8 addrspace(200)* %ap) addrspace(200) #0 { | |
entry: | |
%nbuf.i.i = alloca [1025 x i8], align 1, addrspace(200) | |
%abuf.i = alloca [1025 x i8], align 1, addrspace(200) | |
%ai0 = alloca %struct.addrinfo, align 16, addrspace(200) | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%q = alloca %struct.res_target, align 16, addrspace(200) | |
%q2 = alloca %struct.res_target, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %ai0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%2 = bitcast %struct.res_target addrspace(200)* %q to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %2) #18 | |
%3 = bitcast %struct.res_target addrspace(200)* %q2 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %3) #18 | |
%4 = tail call i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)* %ap) | |
%5 = add i64 %4, 15 | |
%6 = and i64 %5, -16 | |
%7 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* %ap, i64 %6) | |
%argp.next = getelementptr inbounds i8, i8 addrspace(200)* %7, i64 16 | |
%8 = bitcast i8 addrspace(200)* %7 to i8 addrspace(200)* addrspace(200)* | |
%9 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %8, align 16 | |
%10 = add i64 %6, 31 | |
%11 = and i64 %10, -16 | |
%12 = tail call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* nonnull %argp.next, i64 %11) | |
%13 = bitcast i8 addrspace(200)* %12 to %struct.addrinfo addrspace(200)* addrspace(200)* | |
%14 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %13, align 16 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %2, i8 0, i64 80, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %3, i8 0, i64 80, i1 false) | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 0, i64 80, i1 false) | |
%call = tail call %struct.__res_state addrspace(200)* @__res_state() #18 | |
%call3 = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext 65536) #24 | |
%15 = bitcast i8 addrspace(200)* %call3 to %union.querybuf addrspace(200)* | |
%tobool = icmp eq i8 addrspace(200)* %call3, null | |
br i1 %tobool, label %if.then, label %if.end | |
if.then: ; preds = %entry | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext -1) #18 | |
br label %cleanup | |
if.end: ; preds = %entry | |
%call4 = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext 65536) #24 | |
%16 = bitcast i8 addrspace(200)* %call4 to %union.querybuf addrspace(200)* | |
%tobool5 = icmp eq i8 addrspace(200)* %call4, null | |
br i1 %tobool5, label %if.then6, label %if.end7 | |
if.then6: ; preds = %if.end | |
tail call void @free(i8 addrspace(200)* nonnull %call3) | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext -1) #18 | |
br label %cleanup | |
if.end7: ; preds = %if.end | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 1 | |
%17 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp = icmp eq i32 %17, 28 | |
br i1 %cmp, label %land.lhs.true, label %if.end11 | |
land.lhs.true: ; preds = %if.end7 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 0 | |
%18 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %18, 2048 | |
%cmp8 = icmp eq i32 %and, 0 | |
br i1 %cmp8, label %if.end11, label %if.then9 | |
if.then9: ; preds = %land.lhs.true | |
%19 = bitcast %struct.addrinfo addrspace(200)* %14 to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %19, i64 80, i1 false), !tbaa.struct !21 | |
%ai_family10 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai0, i64 0, i32 1 | |
store i32 0, i32 addrspace(200)* %ai_family10, align 4, !tbaa !14 | |
br label %if.end11 | |
if.end11: ; preds = %land.lhs.true, %if.then9, %if.end7 | |
%pai.0 = phi %struct.addrinfo addrspace(200)* [ %ai0, %if.then9 ], [ %14, %land.lhs.true ], [ %14, %if.end7 ] | |
%ai_family12 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai.0, i64 0, i32 1 | |
%20 = load i32, i32 addrspace(200)* %ai_family12, align 4, !tbaa !14 | |
switch i32 %20, label %sw.default [ | |
i32 0, label %sw.bb | |
i32 2, label %sw.epilog | |
i32 28, label %sw.bb29 | |
] | |
sw.bb: ; preds = %if.end11 | |
%name = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 1 | |
store i8 addrspace(200)* %9, i8 addrspace(200)* addrspace(200)* %name, align 16, !tbaa !52 | |
%qclass = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 2 | |
store i32 1, i32 addrspace(200)* %qclass, align 16, !tbaa !54 | |
%qtype = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 3 | |
store i32 1, i32 addrspace(200)* %qtype, align 4, !tbaa !55 | |
%answer = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 4 | |
store i8 addrspace(200)* %call3, i8 addrspace(200)* addrspace(200)* %answer, align 16, !tbaa !56 | |
%anslen = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 5 | |
store i32 65536, i32 addrspace(200)* %anslen, align 16, !tbaa !57 | |
%next = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 0 | |
store %struct.res_target addrspace(200)* %q2, %struct.res_target addrspace(200)* addrspace(200)* %next, align 16, !tbaa !58 | |
br label %sw.epilog | |
sw.bb29: ; preds = %if.end11 | |
br label %sw.epilog | |
sw.default: ; preds = %if.end11 | |
tail call void @free(i8 addrspace(200)* nonnull %call3) | |
tail call void @free(i8 addrspace(200)* nonnull %call4) | |
br label %cleanup | |
sw.epilog: ; preds = %if.end11, %sw.bb29, %sw.bb | |
%q.sink170 = phi %struct.res_target addrspace(200)* [ %q, %sw.bb29 ], [ %q2, %sw.bb ], [ %q, %if.end11 ] | |
%.sink = phi i32 [ 28, %sw.bb29 ], [ 28, %sw.bb ], [ 1, %if.end11 ] | |
%call3.sink = phi i8 addrspace(200)* [ %call3, %sw.bb29 ], [ %call4, %sw.bb ], [ %call3, %if.end11 ] | |
%name30 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 1 | |
store i8 addrspace(200)* %9, i8 addrspace(200)* addrspace(200)* %name30, align 16, !tbaa !52 | |
%qclass31 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 2 | |
store i32 1, i32 addrspace(200)* %qclass31, align 16, !tbaa !54 | |
%qtype32 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 3 | |
store i32 %.sink, i32 addrspace(200)* %qtype32, align 4, !tbaa !55 | |
%answer35 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 4 | |
store i8 addrspace(200)* %call3.sink, i8 addrspace(200)* addrspace(200)* %answer35, align 16, !tbaa !56 | |
%anslen36 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q.sink170, i64 0, i32 5 | |
store i32 65536, i32 addrspace(200)* %anslen36, align 16, !tbaa !57 | |
%options = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 2 | |
%21 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and37 = and i64 %21, 1 | |
%cmp38 = icmp eq i64 %and37, 0 | |
br i1 %cmp38, label %land.lhs.true39, label %if.end43 | |
land.lhs.true39: ; preds = %sw.epilog | |
%call40 = call signext i32 @__res_ninit(%struct.__res_state addrspace(200)* %call) #18 | |
%cmp41 = icmp eq i32 %call40, -1 | |
br i1 %cmp41, label %if.then42, label %if.end43 | |
if.then42: ; preds = %land.lhs.true39 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext -1) #18 | |
call void @free(i8 addrspace(200)* nonnull %call3) | |
call void @free(i8 addrspace(200)* nonnull %call4) | |
br label %cleanup | |
if.end43: ; preds = %land.lhs.true39, %sw.epilog | |
%answer.i = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 4 | |
%22 = bitcast i8 addrspace(200)* addrspace(200)* %answer.i to %struct.HEADER addrspace(200)* addrspace(200)* | |
%23 = load %struct.HEADER addrspace(200)*, %struct.HEADER addrspace(200)* addrspace(200)* %22, align 16, !tbaa !56 | |
%24 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %abuf.i, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
%call.i = call i32 addrspace(200)* @__error() #18 | |
store i32 0, i32 addrspace(200)* %call.i, align 4, !tbaa !22 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 1) #18 | |
%25 = load i8, i8 addrspace(200)* %9, align 1, !tbaa !36 | |
%tobool322.i = icmp eq i8 %25, 0 | |
br i1 %tobool322.i, label %land.lhs.true9.i, label %for.body.i | |
for.body.i: ; preds = %if.end43, %for.body.i | |
%26 = phi i8 [ %27, %for.body.i ], [ %25, %if.end43 ] | |
%dots.0324.i = phi i32 [ %add.i, %for.body.i ], [ 0, %if.end43 ] | |
%cp.0323.i = phi i8 addrspace(200)* [ %incdec.ptr.i, %for.body.i ], [ %9, %if.end43 ] | |
%cmp.i = icmp eq i8 %26, 46 | |
%conv1.i = zext i1 %cmp.i to i32 | |
%add.i = add i32 %dots.0324.i, %conv1.i | |
%incdec.ptr.i = getelementptr inbounds i8, i8 addrspace(200)* %cp.0323.i, i64 1 | |
%27 = load i8, i8 addrspace(200)* %incdec.ptr.i, align 1, !tbaa !36 | |
%tobool.i = icmp eq i8 %27, 0 | |
br i1 %tobool.i, label %for.end.i, label %for.body.i | |
for.end.i: ; preds = %for.body.i | |
%cmp2.i = icmp ugt i8 addrspace(200)* %incdec.ptr.i, %9 | |
br i1 %cmp2.i, label %land.lhs.true.i, label %if.end.i | |
land.lhs.true.i: ; preds = %for.end.i | |
%28 = load i8, i8 addrspace(200)* %cp.0323.i, align 1, !tbaa !36 | |
%cmp6.i = icmp eq i8 %28, 46 | |
%spec.select.i = zext i1 %cmp6.i to i32 | |
br label %if.end.i | |
if.end.i: ; preds = %land.lhs.true.i, %for.end.i | |
%trailing_dot.0.i = phi i32 [ 0, %for.end.i ], [ %spec.select.i, %land.lhs.true.i ] | |
%tobool8.i = icmp eq i32 %add.i, 0 | |
br i1 %tobool8.i, label %land.lhs.true9.i, label %if.end15.i | |
land.lhs.true9.i: ; preds = %if.end.i, %if.end43 | |
%trailing_dot.0338.i = phi i32 [ %trailing_dot.0.i, %if.end.i ], [ 0, %if.end43 ] | |
%call10.i = call i8 addrspace(200)* @__res_hostalias(%struct.__res_state addrspace(200)* %call, i8 addrspace(200)* nonnull %9, i8 addrspace(200)* nonnull %24, i64 zeroext 1025) #18 | |
%cmp11.i = icmp eq i8 addrspace(200)* %call10.i, null | |
br i1 %cmp11.i, label %if.end15.i, label %if.then13.i | |
if.then13.i: ; preds = %land.lhs.true9.i | |
%call14.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* nonnull %call10.i, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
br label %res_searchN.exit | |
if.end15.i: ; preds = %if.end.i, %land.lhs.true9.i | |
%tobool8341.i = phi i1 [ false, %land.lhs.true9.i ], [ true, %if.end.i ] | |
%trailing_dot.0339.i = phi i32 [ %trailing_dot.0338.i, %land.lhs.true9.i ], [ %trailing_dot.0.i, %if.end.i ] | |
%dots.0.lcssa332337.i = phi i32 [ 0, %land.lhs.true9.i ], [ %add.i, %if.end.i ] | |
%ndots.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 9 | |
%bf.load.i = load i8, i8 addrspace(200)* %ndots.i, align 8 | |
%bf.lshr.i = lshr i8 %bf.load.i, 4 | |
%bf.cast.i = zext i8 %bf.lshr.i to i32 | |
%cmp16.i = icmp uge i32 %dots.0.lcssa332337.i, %bf.cast.i | |
%tobool18.i = icmp ne i32 %trailing_dot.0339.i, 0 | |
%or.cond.i = or i1 %tobool18.i, %cmp16.i | |
br i1 %or.cond.i, label %if.then19.i, label %if.end42.i | |
if.then19.i: ; preds = %if.end15.i | |
%29 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %29) #18 | |
%call.i.i = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%cmp1.i.i = icmp ugt i64 %call.i.i, 1024 | |
br i1 %cmp1.i.i, label %if.then2.i.i, label %if.end.i.i | |
if.then2.i.i: ; preds = %if.then19.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 3) #18 | |
br label %res_querydomainN.exit.i | |
if.end.i.i: ; preds = %if.then19.i | |
%cmp3.i.i = icmp eq i64 %call.i.i, 0 | |
br i1 %cmp3.i.i, label %if.end21.i.i, label %land.lhs.true.i.i | |
land.lhs.true.i.i: ; preds = %if.end.i.i | |
%dec.i.i = add nsw i64 %call.i.i, -1 | |
%arrayidx.i.i = getelementptr inbounds i8, i8 addrspace(200)* %9, i64 %dec.i.i | |
%30 = load i8, i8 addrspace(200)* %arrayidx.i.i, align 1, !tbaa !36 | |
%cmp4.i.i = icmp eq i8 %30, 46 | |
br i1 %cmp4.i.i, label %if.then6.i.i, label %if.end21.i.i | |
if.then6.i.i: ; preds = %land.lhs.true.i.i | |
%call8.i.i = call i8 addrspace(200)* @strncpy(i8 addrspace(200)* nonnull %29, i8 addrspace(200)* nonnull %9, i64 zeroext %dec.i.i) #18 | |
%arrayidx9.i.i = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 %dec.i.i | |
store i8 0, i8 addrspace(200)* %arrayidx9.i.i, align 1, !tbaa !36 | |
br label %if.end21.i.i | |
if.end21.i.i: ; preds = %if.then6.i.i, %land.lhs.true.i.i, %if.end.i.i | |
%longname.0.i.i = phi i8 addrspace(200)* [ %29, %if.then6.i.i ], [ %9, %if.end.i.i ], [ %9, %land.lhs.true.i.i ] | |
%call22.i.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* %longname.0.i.i, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
br label %res_querydomainN.exit.i | |
res_querydomainN.exit.i: ; preds = %if.end21.i.i, %if.then2.i.i | |
%retval.0.i.i = phi i32 [ -1, %if.then2.i.i ], [ %call22.i.i, %if.end21.i.i ] | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %29) #18 | |
%cmp21.i = icmp sgt i32 %retval.0.i.i, 0 | |
%or.cond175.i = or i1 %tobool18.i, %cmp21.i | |
br i1 %or.cond175.i, label %res_searchN.exit, label %if.end26.i | |
if.end26.i: ; preds = %res_querydomainN.exit.i | |
%call27.i = call i32 addrspace(200)* @__error() #18 | |
%31 = load i32, i32 addrspace(200)* %call27.i, align 4, !tbaa !22 | |
%cmp28.i = icmp eq i32 %31, 61 | |
br i1 %cmp28.i, label %if.then30.i, label %if.end31.i | |
if.then30.i: ; preds = %if.end26.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 2) #18 | |
br label %res_searchN.exit.thread | |
if.end31.i: ; preds = %if.end26.i | |
%res_h_errno.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%32 = load i32, i32 addrspace(200)* %res_h_errno.i, align 16, !tbaa !62 | |
switch i32 %32, label %res_searchN.exit.thread [ | |
i32 4, label %if.end42.i | |
i32 1, label %if.end42.i | |
i32 2, label %sw.bb32.i | |
] | |
sw.bb32.i: ; preds = %if.end31.i | |
%33 = bitcast %struct.HEADER addrspace(200)* %23 to i96 addrspace(200)* | |
%bf.load33.i = load i96, i96 addrspace(200)* %33, align 4 | |
%bf.cast35256.i = and i96 %bf.load33.i, 276701161105643274240 | |
%cmp36.i = icmp eq i96 %bf.cast35256.i, 36893488147419103232 | |
br i1 %cmp36.i, label %if.end42.i, label %res_searchN.exit.thread | |
if.end42.i: ; preds = %sw.bb32.i, %if.end31.i, %if.end31.i, %if.end15.i | |
%saved_herrno.0.i = phi i32 [ -1, %if.end15.i ], [ 2, %sw.bb32.i ], [ %32, %if.end31.i ], [ %32, %if.end31.i ] | |
%tried_as_is.0.i = phi i32 [ 0, %if.end15.i ], [ 1, %sw.bb32.i ], [ 1, %if.end31.i ], [ 1, %if.end31.i ] | |
%34 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
br i1 %tobool8341.i, label %land.lhs.true50.i, label %land.lhs.true44.i | |
land.lhs.true44.i: ; preds = %if.end42.i | |
%and.i = and i64 %34, 128 | |
%tobool45.i = icmp eq i64 %and.i, 0 | |
br i1 %tobool45.i, label %if.end119.i, label %if.then54.i | |
land.lhs.true50.i: ; preds = %if.end42.i | |
%and52.i = and i64 %34, 512 | |
%tobool53.i = icmp eq i64 %and52.i, 0 | |
br i1 %tobool53.i, label %if.end119.i, label %if.then54.i | |
if.then54.i: ; preds = %land.lhs.true50.i, %land.lhs.true44.i | |
%arraydecay55.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 6, i64 0 | |
%35 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %arraydecay55.i, align 16, !tbaa !10 | |
%tobool57312.i = icmp eq i8 addrspace(200)* %35, null | |
br i1 %tobool57312.i, label %if.end119.i, label %for.body59.lr.ph.i | |
for.body59.lr.ph.i: ; preds = %if.then54.i | |
%tobool81.i = icmp ne i32 %tried_as_is.0.i, 0 | |
%36 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 0 | |
%res_h_errno94.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%37 = bitcast %struct.HEADER addrspace(200)* %23 to i96 addrspace(200)* | |
br label %for.body59.i | |
for.body59.i: ; preds = %for.inc116.i, %for.body59.lr.ph.i | |
%38 = phi i8 addrspace(200)* [ %35, %for.body59.lr.ph.i ], [ %47, %for.inc116.i ] | |
%root_on_list.0317.i = phi i32 [ 0, %for.body59.lr.ph.i ], [ %root_on_list.1.i, %for.inc116.i ] | |
%got_servfail.0316.i = phi i32 [ 0, %for.body59.lr.ph.i ], [ %got_servfail.3.i, %for.inc116.i ] | |
%got_nodata.0314.i = phi i32 [ 0, %for.body59.lr.ph.i ], [ %got_nodata.2.i, %for.inc116.i ] | |
%domain.0313.i = phi i8 addrspace(200)* addrspace(200)* [ %arraydecay55.i, %for.body59.lr.ph.i ], [ %incdec.ptr117.i, %for.inc116.i ] | |
%39 = load i8, i8 addrspace(200)* %38, align 1, !tbaa !36 | |
switch i8 %39, label %if.end78.i [ | |
i8 0, label %if.then76.i | |
i8 46, label %land.lhs.true70.i | |
] | |
land.lhs.true70.i: ; preds = %for.body59.i | |
%arrayidx72.i = getelementptr inbounds i8, i8 addrspace(200)* %38, i64 1 | |
%40 = load i8, i8 addrspace(200)* %arrayidx72.i, align 1, !tbaa !36 | |
%cmp74.i = icmp eq i8 %40, 0 | |
br i1 %cmp74.i, label %if.then76.i, label %if.end78.i | |
if.then76.i: ; preds = %land.lhs.true70.i, %for.body59.i | |
%inc77.i = add nsw i32 %root_on_list.0317.i, 1 | |
br label %if.end78.i | |
if.end78.i: ; preds = %if.then76.i, %land.lhs.true70.i, %for.body59.i | |
%root_on_list.1.i = phi i32 [ %inc77.i, %if.then76.i ], [ %root_on_list.0317.i, %land.lhs.true70.i ], [ %root_on_list.0317.i, %for.body59.i ] | |
%tobool79.i = icmp ne i32 %root_on_list.1.i, 0 | |
%or.cond177.i = and i1 %tobool81.i, %tobool79.i | |
br i1 %or.cond177.i, label %for.inc116.i, label %if.else11.i.i | |
if.else11.i.i: ; preds = %if.end78.i | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %36) #18 | |
%call.i277.i = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%call13.i.i = call i64 @strlen(i8 addrspace(200)* nonnull %38) #22 | |
%add.i.i = add i64 %call.i277.i, 1 | |
%add14.i.i = add i64 %add.i.i, %call13.i.i | |
%cmp15.i.i = icmp ugt i64 %add14.i.i, 1024 | |
br i1 %cmp15.i.i, label %res_querydomainN.exit293.thread.i, label %res_querydomainN.exit293.i | |
res_querydomainN.exit293.thread.i: ; preds = %if.else11.i.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %36) #18 | |
br label %if.end88.i | |
res_querydomainN.exit293.i: ; preds = %if.else11.i.i | |
%call20.i.i = call signext i32 (i8 addrspace(200)*, i64, i8 addrspace(200)*, ...) @snprintf(i8 addrspace(200)* nonnull %36, i64 zeroext 1025, i8 addrspace(200)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(200)* @.str.19, i64 0, i64 0), i8 addrspace(200)* nonnull %9, i8 addrspace(200)* nonnull %38) #18 | |
%call22.i290.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* nonnull %36, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %36) #18 | |
%cmp85.i = icmp sgt i32 %call22.i290.i, 0 | |
br i1 %cmp85.i, label %res_searchN.exit.thread152, label %if.end88.i | |
if.end88.i: ; preds = %res_querydomainN.exit293.i, %res_querydomainN.exit293.thread.i | |
%call89.i = call i32 addrspace(200)* @__error() #18 | |
%41 = load i32, i32 addrspace(200)* %call89.i, align 4, !tbaa !22 | |
%cmp90.i = icmp eq i32 %41, 61 | |
br i1 %cmp90.i, label %if.then92.i, label %if.end93.i | |
if.then92.i: ; preds = %if.end88.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 2) #18 | |
br label %res_searchN.exit.thread | |
if.end93.i: ; preds = %if.end88.i | |
%42 = load i32, i32 addrspace(200)* %res_h_errno94.i, align 16, !tbaa !62 | |
switch i32 %42, label %sw.default107.i [ | |
i32 4, label %sw.bb95.i | |
i32 1, label %sw.epilog109.i | |
i32 2, label %sw.bb97.i | |
] | |
sw.bb95.i: ; preds = %if.end93.i | |
%inc96.i = add nsw i32 %got_nodata.0314.i, 1 | |
br label %sw.epilog109.i | |
sw.bb97.i: ; preds = %if.end93.i | |
%inc98.i = add nsw i32 %got_servfail.0316.i, 1 | |
%bf.load99.i = load i96, i96 addrspace(200)* %37, align 4 | |
%bf.cast102255.i = and i96 %bf.load99.i, 276701161105643274240 | |
%cmp103.i = icmp eq i96 %bf.cast102255.i, 36893488147419103232 | |
br i1 %cmp103.i, label %sw.epilog109.i, label %sw.default107.i | |
sw.default107.i: ; preds = %sw.bb97.i, %if.end93.i | |
%got_servfail.1.i = phi i32 [ %got_servfail.0316.i, %if.end93.i ], [ %inc98.i, %sw.bb97.i ] | |
br label %sw.epilog109.i | |
sw.epilog109.i: ; preds = %sw.default107.i, %sw.bb97.i, %sw.bb95.i, %if.end93.i | |
%got_nodata.1.i = phi i32 [ %got_nodata.0314.i, %sw.default107.i ], [ %got_nodata.0314.i, %sw.bb97.i ], [ %got_nodata.0314.i, %if.end93.i ], [ %inc96.i, %sw.bb95.i ] | |
%got_servfail.2.i = phi i32 [ %got_servfail.1.i, %sw.default107.i ], [ %inc98.i, %sw.bb97.i ], [ %got_servfail.0316.i, %if.end93.i ], [ %got_servfail.0316.i, %sw.bb95.i ] | |
%done.1.i = phi i32 [ 1, %sw.default107.i ], [ 0, %sw.bb97.i ], [ 0, %if.end93.i ], [ 0, %sw.bb95.i ] | |
%43 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and111.i = lshr i64 %43, 9 | |
%44 = trunc i64 %and111.i to i32 | |
%45 = and i32 %44, 1 | |
%46 = xor i32 %45, 1 | |
%spec.select257.i = add nuw nsw i32 %46, %done.1.i | |
br label %for.inc116.i | |
for.inc116.i: ; preds = %sw.epilog109.i, %if.end78.i | |
%got_nodata.2.i = phi i32 [ %got_nodata.0314.i, %if.end78.i ], [ %got_nodata.1.i, %sw.epilog109.i ] | |
%got_servfail.3.i = phi i32 [ %got_servfail.0316.i, %if.end78.i ], [ %got_servfail.2.i, %sw.epilog109.i ] | |
%done.2.i = phi i32 [ 0, %if.end78.i ], [ %spec.select257.i, %sw.epilog109.i ] | |
%incdec.ptr117.i = getelementptr inbounds i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %domain.0313.i, i64 1 | |
%47 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %incdec.ptr117.i, align 16, !tbaa !10 | |
%tobool57.i = icmp ne i8 addrspace(200)* %47, null | |
%tobool58.i = icmp eq i32 %done.2.i, 0 | |
%48 = and i1 %tobool58.i, %tobool57.i | |
br i1 %48, label %for.body59.i, label %if.end119.i | |
if.end119.i: ; preds = %for.inc116.i, %if.then54.i, %land.lhs.true50.i, %land.lhs.true44.i | |
%got_nodata.3.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ %got_nodata.2.i, %for.inc116.i ] | |
%got_servfail.4.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ %got_servfail.3.i, %for.inc116.i ] | |
%root_on_list.3.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ %root_on_list.1.i, %for.inc116.i ] | |
%searched.2.i = phi i32 [ 0, %land.lhs.true50.i ], [ 0, %land.lhs.true44.i ], [ 0, %if.then54.i ], [ 1, %for.inc116.i ] | |
%res_h_errno120.i = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%49 = load i32, i32 addrspace(200)* %res_h_errno120.i, align 16, !tbaa !62 | |
switch i32 %49, label %giveup.i [ | |
i32 4, label %sw.epilog132.i | |
i32 1, label %sw.epilog132.i | |
i32 2, label %sw.bb122.i | |
] | |
sw.bb122.i: ; preds = %if.end119.i | |
%50 = bitcast %struct.HEADER addrspace(200)* %23 to i96 addrspace(200)* | |
%bf.load123.i = load i96, i96 addrspace(200)* %50, align 4 | |
%bf.cast126254.i = and i96 %bf.load123.i, 276701161105643274240 | |
%cmp127.i = icmp eq i96 %bf.cast126254.i, 36893488147419103232 | |
br i1 %cmp127.i, label %sw.epilog132.i, label %giveup.i | |
sw.epilog132.i: ; preds = %sw.bb122.i, %if.end119.i, %if.end119.i | |
%tobool133.i = icmp eq i32 %dots.0.lcssa332337.i, 0 | |
%tobool135.i = icmp ne i32 %searched.2.i, 0 | |
%or.cond178.i = and i1 %tobool133.i, %tobool135.i | |
br i1 %or.cond178.i, label %lor.lhs.false136.i, label %land.lhs.true140.i | |
lor.lhs.false136.i: ; preds = %sw.epilog132.i | |
%51 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and138.i = and i64 %51, 1048576 | |
%tobool139.i = icmp eq i64 %and138.i, 0 | |
br i1 %tobool139.i, label %land.lhs.true140.i, label %giveup.i | |
land.lhs.true140.i: ; preds = %lor.lhs.false136.i, %sw.epilog132.i | |
%52 = or i32 %root_on_list.3.i, %tried_as_is.0.i | |
%53 = icmp eq i32 %52, 0 | |
br i1 %53, label %if.then144.i, label %giveup.i | |
if.then144.i: ; preds = %land.lhs.true140.i | |
%54 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %54) #18 | |
%call.i259.i = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%cmp1.i260.i = icmp ugt i64 %call.i259.i, 1024 | |
br i1 %cmp1.i260.i, label %res_querydomainN.exit275.thread.i, label %if.end.i263.i | |
res_querydomainN.exit275.thread.i: ; preds = %if.then144.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %54) #18 | |
br label %giveup.i | |
if.end.i263.i: ; preds = %if.then144.i | |
%cmp3.i262.i = icmp eq i64 %call.i259.i, 0 | |
br i1 %cmp3.i262.i, label %res_querydomainN.exit275.i, label %land.lhs.true.i267.i | |
land.lhs.true.i267.i: ; preds = %if.end.i263.i | |
%dec.i264.i = add nsw i64 %call.i259.i, -1 | |
%arrayidx.i265.i = getelementptr inbounds i8, i8 addrspace(200)* %9, i64 %dec.i264.i | |
%55 = load i8, i8 addrspace(200)* %arrayidx.i265.i, align 1, !tbaa !36 | |
%cmp4.i266.i = icmp eq i8 %55, 46 | |
br i1 %cmp4.i266.i, label %if.then6.i270.i, label %res_querydomainN.exit275.i | |
if.then6.i270.i: ; preds = %land.lhs.true.i267.i | |
%call8.i268.i = call i8 addrspace(200)* @strncpy(i8 addrspace(200)* nonnull %54, i8 addrspace(200)* nonnull %9, i64 zeroext %dec.i264.i) #18 | |
%arrayidx9.i269.i = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %nbuf.i.i, i64 0, i64 %dec.i264.i | |
store i8 0, i8 addrspace(200)* %arrayidx9.i269.i, align 1, !tbaa !36 | |
br label %res_querydomainN.exit275.i | |
res_querydomainN.exit275.i: ; preds = %if.then6.i270.i, %land.lhs.true.i267.i, %if.end.i263.i | |
%longname.0.i271.i = phi i8 addrspace(200)* [ %54, %if.then6.i270.i ], [ %9, %if.end.i263.i ], [ %9, %land.lhs.true.i267.i ] | |
%call22.i272.i = call fastcc signext i32 @res_queryN(i8 addrspace(200)* %longname.0.i271.i, %struct.res_target addrspace(200)* nonnull %q, %struct.__res_state addrspace(200)* %call) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %54) #18 | |
%cmp146.i = icmp sgt i32 %call22.i272.i, 0 | |
br i1 %cmp146.i, label %res_searchN.exit.thread152, label %giveup.i | |
giveup.i: ; preds = %res_querydomainN.exit275.i, %res_querydomainN.exit275.thread.i, %land.lhs.true140.i, %lor.lhs.false136.i, %sw.bb122.i, %if.end119.i | |
%cmp151.i = icmp eq i32 %saved_herrno.0.i, -1 | |
br i1 %cmp151.i, label %if.else.i, label %if.then153.i | |
if.then153.i: ; preds = %giveup.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext %saved_herrno.0.i) #18 | |
br label %res_searchN.exit.thread | |
if.else.i: ; preds = %giveup.i | |
%tobool154.i = icmp eq i32 %got_nodata.3.i, 0 | |
br i1 %tobool154.i, label %if.else156.i, label %if.then155.i | |
if.then155.i: ; preds = %if.else.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 4) #18 | |
br label %res_searchN.exit.thread | |
if.else156.i: ; preds = %if.else.i | |
%tobool157.i = icmp eq i32 %got_servfail.4.i, 0 | |
br i1 %tobool157.i, label %res_searchN.exit.thread, label %if.then158.i | |
if.then158.i: ; preds = %if.else156.i | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call, i32 signext 2) #18 | |
br label %res_searchN.exit.thread | |
res_searchN.exit.thread: ; preds = %if.then30.i, %sw.bb32.i, %if.end31.i, %if.else156.i, %if.then155.i, %if.then158.i, %if.then153.i, %if.then92.i | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
br label %if.then46 | |
res_searchN.exit.thread152: ; preds = %res_querydomainN.exit293.i, %res_querydomainN.exit275.i | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
br label %if.end47 | |
res_searchN.exit: ; preds = %if.then13.i, %res_querydomainN.exit.i | |
%retval.1.i = phi i32 [ %call14.i, %if.then13.i ], [ %retval.0.i.i, %res_querydomainN.exit.i ] | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %24) #18 | |
%cmp45 = icmp slt i32 %retval.1.i, 0 | |
br i1 %cmp45, label %if.then46, label %if.end47 | |
if.then46: ; preds = %res_searchN.exit.thread, %res_searchN.exit | |
call void @free(i8 addrspace(200)* nonnull %call3) | |
call void @free(i8 addrspace(200)* nonnull %call4) | |
br label %cleanup | |
if.end47: ; preds = %res_searchN.exit.thread152, %res_searchN.exit | |
%next48 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 0 | |
%56 = load %struct.res_target addrspace(200)*, %struct.res_target addrspace(200)* addrspace(200)* %next48, align 16, !tbaa !58 | |
%tobool49 = icmp eq %struct.res_target addrspace(200)* %56, null | |
br i1 %tobool49, label %if.then69, label %if.then50 | |
if.then50: ; preds = %if.end47 | |
%n = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q2, i64 0, i32 6 | |
%57 = load i32, i32 addrspace(200)* %n, align 4, !tbaa !63 | |
%name51 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q2, i64 0, i32 1 | |
%58 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %name51, align 16, !tbaa !52 | |
%qtype52 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q2, i64 0, i32 3 | |
%59 = load i32, i32 addrspace(200)* %qtype52, align 4, !tbaa !55 | |
%call53 = call fastcc %struct.addrinfo addrspace(200)* @getanswer(%union.querybuf addrspace(200)* nonnull %16, i32 signext %57, i8 addrspace(200)* %58, i32 signext %59, %struct.addrinfo addrspace(200)* %pai.0, %struct.__res_state addrspace(200)* %call) | |
%cmp54 = icmp eq %struct.addrinfo addrspace(200)* %call53, null | |
br i1 %cmp54, label %if.then69, label %if.then55 | |
if.then55: ; preds = %if.then50 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call53, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
br label %while.cond | |
while.cond: ; preds = %while.cond, %if.then55 | |
%cur.0 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %if.then55 ], [ %60, %while.cond ] | |
%ai_next57 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0, i64 0, i32 7 | |
%60 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next57, align 16, !tbaa !3 | |
%tobool58 = icmp eq %struct.addrinfo addrspace(200)* %60, null | |
br i1 %tobool58, label %lor.lhs.false, label %while.cond | |
lor.lhs.false: ; preds = %while.cond | |
%61 = load i32, i32 addrspace(200)* %ai_family12, align 4, !tbaa !14 | |
%cmp64 = icmp eq i32 %61, 0 | |
br i1 %cmp64, label %lor.lhs.false65, label %if.then69 | |
lor.lhs.false65: ; preds = %lor.lhs.false | |
%ai_flags66 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai.0, i64 0, i32 0 | |
%62 = load i32, i32 addrspace(200)* %ai_flags66, align 16, !tbaa !13 | |
%and67 = and i32 %62, 2304 | |
%cmp68 = icmp eq i32 %and67, 2048 | |
br i1 %cmp68, label %if.end78, label %if.then69 | |
if.then69: ; preds = %if.end47, %if.then50, %lor.lhs.false65, %lor.lhs.false | |
%cur.1158 = phi %struct.addrinfo addrspace(200)* [ %cur.0, %lor.lhs.false65 ], [ %cur.0, %lor.lhs.false ], [ %sentinel, %if.then50 ], [ %sentinel, %if.end47 ] | |
%n70 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 6 | |
%63 = load i32, i32 addrspace(200)* %n70, align 4, !tbaa !63 | |
%name71 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 1 | |
%64 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %name71, align 16, !tbaa !52 | |
%qtype72 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %q, i64 0, i32 3 | |
%65 = load i32, i32 addrspace(200)* %qtype72, align 4, !tbaa !55 | |
%call73 = call fastcc %struct.addrinfo addrspace(200)* @getanswer(%union.querybuf addrspace(200)* nonnull %15, i32 signext %63, i8 addrspace(200)* %64, i32 signext %65, %struct.addrinfo addrspace(200)* %pai.0, %struct.__res_state addrspace(200)* %call) | |
%cmp74 = icmp eq %struct.addrinfo addrspace(200)* %call73, null | |
br i1 %cmp74, label %if.end78, label %if.then75 | |
if.then75: ; preds = %if.then69 | |
%ai_next76 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1158, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call73, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next76, align 16, !tbaa !3 | |
br label %if.end78 | |
if.end78: ; preds = %if.then69, %lor.lhs.false65, %if.then75 | |
call void @free(i8 addrspace(200)* nonnull %call3) | |
call void @free(i8 addrspace(200)* nonnull %call4) | |
%ai_next79 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%66 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next79, align 16, !tbaa !3 | |
%cmp80 = icmp eq %struct.addrinfo addrspace(200)* %66, null | |
br i1 %cmp80, label %if.then81, label %if.end85 | |
if.then81: ; preds = %if.end78 | |
%res_h_errno = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %call, i64 0, i32 14 | |
%67 = load i32, i32 addrspace(200)* %res_h_errno, align 16, !tbaa !62 | |
switch i32 %67, label %sw.default84 [ | |
i32 1, label %cleanup | |
i32 4, label %cleanup | |
i32 2, label %sw.bb83 | |
] | |
sw.bb83: ; preds = %if.then81 | |
br label %cleanup | |
sw.default84: ; preds = %if.then81 | |
br label %cleanup | |
if.end85: ; preds = %if.end78 | |
%68 = bitcast i8 addrspace(200)* %rv to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* %66, %struct.addrinfo addrspace(200)* addrspace(200)* %68, align 16, !tbaa !10 | |
br label %cleanup | |
cleanup: ; preds = %if.then81, %if.then81, %if.end85, %sw.default84, %sw.bb83, %if.then46, %if.then42, %sw.default, %if.then6, %if.then | |
%retval.0 = phi i32 [ 2, %sw.default ], [ 4, %if.then42 ], [ 4, %if.then46 ], [ 2, %sw.default84 ], [ 8, %sw.bb83 ], [ 1, %if.end85 ], [ 4, %if.then6 ], [ 4, %if.then ], [ 4, %if.then81 ], [ 4, %if.then81 ] | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
; Function Attrs: nounwind uwtable | |
define internal signext i32 @_yp_getaddrinfo(i8 addrspace(200)* nocapture %rv, i8 addrspace(200)* nocapture readnone %cb_data, i8 addrspace(200)* %ap) addrspace(200) #0 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ypbuf = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%ypbuflen = alloca i32, align 4, addrspace(200) | |
%ypdomain = alloca i8 addrspace(200)*, align 16, addrspace(200) | |
%ai4 = alloca %struct.addrinfo, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast i8 addrspace(200)* addrspace(200)* %ypbuf to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
%2 = bitcast i32 addrspace(200)* %ypbuflen to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 4, i8 addrspace(200)* nonnull %2) #18 | |
%3 = bitcast i8 addrspace(200)* addrspace(200)* %ypdomain to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %3) #18 | |
%call = call signext i32 @_yp_check(i8 addrspace(200)* addrspace(200)* nonnull %ypdomain) #18 | |
%cmp = icmp eq i32 %call, 0 | |
br i1 %cmp, label %cleanup95, label %if.end | |
if.end: ; preds = %entry | |
%4 = call i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)* %ap) | |
%5 = add i64 %4, 15 | |
%6 = and i64 %5, -16 | |
%7 = call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* %ap, i64 %6) | |
%argp.next = getelementptr inbounds i8, i8 addrspace(200)* %7, i64 16 | |
%8 = bitcast i8 addrspace(200)* %7 to i8 addrspace(200)* addrspace(200)* | |
%9 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %8, align 16 | |
%10 = add i64 %6, 31 | |
%11 = and i64 %10, -16 | |
%12 = call i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)* nonnull %argp.next, i64 %11) | |
%13 = bitcast i8 addrspace(200)* %12 to %struct.addrinfo addrspace(200)* addrspace(200)* | |
%14 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %13, align 16 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%15 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypdomain, align 16, !tbaa !10 | |
%call3 = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%conv = trunc i64 %call3 to i32 | |
%call4 = call signext i32 @yp_match(i8 addrspace(200)* %15, i8 addrspace(200)* getelementptr inbounds ([15 x i8], [15 x i8] addrspace(200)* @.str.20, i64 0, i64 0), i8 addrspace(200)* %9, i32 signext %conv, i8 addrspace(200)* addrspace(200)* nonnull %ypbuf, i32 addrspace(200)* nonnull %ypbuflen) #18 | |
%cmp5 = icmp eq i32 %call4, 0 | |
br i1 %cmp5, label %if.then7, label %if.end37 | |
if.then7: ; preds = %if.end | |
%16 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
%call8 = call fastcc %struct.addrinfo addrspace(200)* @_yphostent(i8 addrspace(200)* %16, %struct.addrinfo addrspace(200)* %14) | |
%tobool = icmp eq %struct.addrinfo addrspace(200)* %call8, null | |
br i1 %tobool, label %if.end15.thread145, label %if.then9 | |
if.end15.thread145: ; preds = %if.then7 | |
%17 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
call void @free(i8 addrspace(200)* %17) | |
br label %if.end37 | |
if.then9: ; preds = %if.then7 | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call8, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
br label %while.cond | |
while.cond: ; preds = %while.cond, %if.then9 | |
%cur.0 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %if.then9 ], [ %18, %while.cond ] | |
%ai_next11 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0, i64 0, i32 7 | |
%18 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next11, align 16, !tbaa !3 | |
%tobool12 = icmp eq %struct.addrinfo addrspace(200)* %18, null | |
br i1 %tobool12, label %if.end15, label %while.cond | |
if.end15: ; preds = %while.cond | |
%19 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
call void @free(i8 addrspace(200)* %19) | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %call8, i64 0, i32 1 | |
%20 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
switch i32 %20, label %if.end37 [ | |
i32 2, label %done | |
i32 28, label %sw.bb19 | |
] | |
sw.bb19: ; preds = %if.end15 | |
%ai_addr = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %call8, i64 0, i32 6 | |
%21 = bitcast %struct.sockaddr addrspace(200)* addrspace(200)* %ai_addr to %struct.sockaddr_in6 addrspace(200)* addrspace(200)* | |
%22 = load %struct.sockaddr_in6 addrspace(200)*, %struct.sockaddr_in6 addrspace(200)* addrspace(200)* %21, align 16, !tbaa !12 | |
%arrayidx = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %22, i64 0, i32 4, i32 0, i32 0, i64 0 | |
%23 = load i32, i32 addrspace(200)* %arrayidx, align 4, !tbaa !36 | |
%cmp20 = icmp eq i32 %23, 0 | |
br i1 %cmp20, label %land.lhs.true, label %if.end37 | |
land.lhs.true: ; preds = %sw.bb19 | |
%arrayidx25 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %22, i64 0, i32 4, i32 0, i32 0, i64 1 | |
%24 = load i32, i32 addrspace(200)* %arrayidx25, align 4, !tbaa !36 | |
%cmp26 = icmp eq i32 %24, 0 | |
br i1 %cmp26, label %land.lhs.true28, label %if.end37 | |
land.lhs.true28: ; preds = %land.lhs.true | |
%arrayidx32 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6 addrspace(200)* %22, i64 0, i32 4, i32 0, i32 0, i64 2 | |
%25 = load i32, i32 addrspace(200)* %arrayidx32, align 4, !tbaa !36 | |
%cmp33 = icmp eq i32 %25, 65535 | |
br i1 %cmp33, label %done, label %if.end37 | |
if.end37: ; preds = %if.end, %sw.bb19, %land.lhs.true, %land.lhs.true28, %if.end15, %if.end15.thread145 | |
%cur.2144 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %if.end15.thread145 ], [ %cur.0, %if.end15 ], [ %cur.0, %land.lhs.true28 ], [ %cur.0, %land.lhs.true ], [ %cur.0, %sw.bb19 ], [ %sentinel, %if.end ] | |
%ai.0143 = phi %struct.addrinfo addrspace(200)* [ null, %if.end15.thread145 ], [ %call8, %if.end15 ], [ %call8, %land.lhs.true28 ], [ %call8, %land.lhs.true ], [ %call8, %sw.bb19 ], [ null, %if.end ] | |
%ai_family38 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 1 | |
%26 = load i32, i32 addrspace(200)* %ai_family38, align 4, !tbaa !14 | |
switch i32 %26, label %done [ | |
i32 0, label %if.then59 | |
i32 2, label %if.then59 | |
i32 28, label %land.lhs.true48 | |
] | |
land.lhs.true48: ; preds = %if.end37 | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %14, i64 0, i32 0 | |
%27 = load i32, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%and = and i32 %27, 2048 | |
%cmp49 = icmp eq i32 %and, 0 | |
br i1 %cmp49, label %done, label %land.lhs.true51 | |
land.lhs.true51: ; preds = %land.lhs.true48 | |
%cmp52 = icmp ne %struct.addrinfo addrspace(200)* %ai.0143, null | |
%and56 = and i32 %27, 256 | |
%cmp57 = icmp eq i32 %and56, 0 | |
%or.cond = and i1 %cmp52, %cmp57 | |
br i1 %or.cond, label %done, label %if.then59 | |
if.then59: ; preds = %land.lhs.true51, %if.end37, %if.end37 | |
%28 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypdomain, align 16, !tbaa !10 | |
%call60 = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %9) #22 | |
%conv61 = trunc i64 %call60 to i32 | |
%call62 = call signext i32 @yp_match(i8 addrspace(200)* %28, i8 addrspace(200)* getelementptr inbounds ([13 x i8], [13 x i8] addrspace(200)* @.str.21, i64 0, i64 0), i8 addrspace(200)* %9, i32 signext %conv61, i8 addrspace(200)* addrspace(200)* nonnull %ypbuf, i32 addrspace(200)* nonnull %ypbuflen) #18 | |
%cmp63 = icmp eq i32 %call62, 0 | |
br i1 %cmp63, label %if.then65, label %done | |
if.then65: ; preds = %if.then59 | |
%29 = bitcast %struct.addrinfo addrspace(200)* %ai4 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %29) #18 | |
%30 = bitcast %struct.addrinfo addrspace(200)* %14 to i8 addrspace(200)* | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %29, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %30, i64 80, i1 false), !tbaa.struct !21 | |
%31 = load i32, i32 addrspace(200)* %ai_family38, align 4, !tbaa !14 | |
%cmp67 = icmp eq i32 %31, 0 | |
br i1 %cmp67, label %if.then69, label %if.end71 | |
if.then69: ; preds = %if.then65 | |
%ai_family70 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai4, i64 0, i32 1 | |
store i32 2, i32 addrspace(200)* %ai_family70, align 4, !tbaa !14 | |
br label %if.end71 | |
if.end71: ; preds = %if.then69, %if.then65 | |
%32 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
%call72 = call fastcc %struct.addrinfo addrspace(200)* @_yphostent(i8 addrspace(200)* %32, %struct.addrinfo addrspace(200)* nonnull %ai4) | |
%tobool73 = icmp eq %struct.addrinfo addrspace(200)* %call72, null | |
br i1 %tobool73, label %if.end85, label %if.then74 | |
if.then74: ; preds = %if.end71 | |
%ai_next75 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.2144, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call72, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next75, align 16, !tbaa !3 | |
br label %land.rhs78 | |
land.rhs78: ; preds = %if.then74, %land.rhs78 | |
%cur.3 = phi %struct.addrinfo addrspace(200)* [ %cur.2144, %if.then74 ], [ %33, %land.rhs78 ] | |
%ai_next79 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.3, i64 0, i32 7 | |
%33 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next79, align 16, !tbaa !3 | |
%tobool80 = icmp eq %struct.addrinfo addrspace(200)* %33, null | |
br i1 %tobool80, label %if.end85, label %land.rhs78 | |
if.end85: ; preds = %land.rhs78, %if.end71 | |
%34 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ypbuf, align 16, !tbaa !10 | |
call void @free(i8 addrspace(200)* %34) | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %29) #18 | |
br label %done | |
done: ; preds = %land.lhs.true28, %if.end15, %land.lhs.true51, %if.end37, %land.lhs.true48, %if.end85, %if.then59 | |
%ai_next88 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%35 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next88, align 16, !tbaa !3 | |
%cmp89 = icmp eq %struct.addrinfo addrspace(200)* %35, null | |
br i1 %cmp89, label %if.then91, label %if.end93 | |
if.then91: ; preds = %done | |
%call92 = call %struct.__res_state addrspace(200)* @__res_state() #18 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %call92, i32 signext 1) #18 | |
br label %cleanup95 | |
if.end93: ; preds = %done | |
%36 = bitcast i8 addrspace(200)* %rv to %struct.addrinfo addrspace(200)* addrspace(200)* | |
store %struct.addrinfo addrspace(200)* %35, %struct.addrinfo addrspace(200)* addrspace(200)* %36, align 16, !tbaa !10 | |
br label %cleanup95 | |
cleanup95: ; preds = %entry, %if.end93, %if.then91 | |
%retval.0 = phi i32 [ 4, %if.then91 ], [ 1, %if.end93 ], [ 2, %entry ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 4, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret i32 %retval.0 | |
} | |
declare signext i32 @_nsdispatch(i8 addrspace(200)*, %struct._ns_dtab addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, %struct._ns_src addrspace(200)*, ...) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind readnone willreturn | |
declare i64 @llvm.cheri.cap.address.get.i64(i8 addrspace(200)*) addrspace(200) #5 | |
; Function Attrs: nounwind readnone willreturn | |
declare i8 addrspace(200)* @llvm.cheri.cap.address.set.i64(i8 addrspace(200)*, i64) addrspace(200) #5 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @_getht(%struct.__sFILE addrspace(200)* addrspace(200)* nocapture %hostf, i8 addrspace(200)* nocapture readonly %name, %struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.addrinfo addrspace(200)* %cur) unnamed_addr addrspace(200) #0 { | |
entry: | |
%hints.i = alloca %struct.addrinfo, align 16, addrspace(200) | |
%res0.i = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%hostbuf.i = alloca [8192 x i8], align 1, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %hints.i to i8 addrspace(200)* | |
%1 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i to i8 addrspace(200)* | |
%2 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf.i, i64 0, i64 0 | |
%ai_family.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 1 | |
%ai_family45.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 1 | |
%ai_socktype.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 2 | |
%ai_protocol.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 3 | |
%ai_flags.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 0 | |
%ai_flags50.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
%ai_socktype63.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 2 | |
%ai_protocol65.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 3 | |
%3 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints.i, i64 0, i32 4 | |
%4 = bitcast i32 addrspace(200)* %3 to i8 addrspace(200)* | |
br label %while.cond | |
while.cond.loopexit: ; preds = %land.rhs, %while.cond1 | |
br label %while.cond | |
while.cond: ; preds = %while.cond.loopexit, %entry | |
%cur.addr.0 = phi %struct.addrinfo addrspace(200)* [ %cur, %entry ], [ %cur.addr.1, %while.cond.loopexit ] | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.start.p200i8(i64 8192, i8 addrspace(200)* nonnull %2) #18 | |
%5 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool.i = icmp eq %struct.__sFILE addrspace(200)* %5, null | |
br i1 %tobool.i, label %land.lhs.true.i, label %if.end.i | |
land.lhs.true.i: ; preds = %while.cond | |
%call.i = call %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* getelementptr inbounds ([11 x i8], [11 x i8] addrspace(200)* @.str.13, i64 0, i64 0), i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.14, i64 0, i64 0)) #18 | |
store %struct.__sFILE addrspace(200)* %call.i, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%tobool1.i = icmp eq %struct.__sFILE addrspace(200)* %call.i, null | |
br i1 %tobool1.i, label %_gethtent.exit, label %if.end.i | |
if.end.i: ; preds = %land.lhs.true.i, %while.cond | |
%6 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%call2133.i = call i8 addrspace(200)* @fgets(i8 addrspace(200)* nonnull %2, i32 signext 8192, %struct.__sFILE addrspace(200)* %6) #18 | |
%tobool3134.i = icmp eq i8 addrspace(200)* %call2133.i, null | |
br i1 %tobool3134.i, label %_gethtent.exit, label %if.end5.i | |
if.end5.i: ; preds = %if.end.i, %again.backedge.i | |
%call2135.i = phi i8 addrspace(200)* [ %call2.i, %again.backedge.i ], [ %call2133.i, %if.end.i ] | |
%7 = load i8, i8 addrspace(200)* %call2135.i, align 1, !tbaa !36 | |
%cmp.i = icmp eq i8 %7, 35 | |
br i1 %cmp.i, label %again.backedge.i, label %if.end8.i | |
if.end8.i: ; preds = %if.end5.i | |
%call9.i = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %call2135.i, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.15, i64 0, i64 0)) #22 | |
%cmp10.i = icmp eq i8 addrspace(200)* %call9.i, null | |
br i1 %cmp10.i, label %if.end13.i, label %if.then12.i | |
if.then12.i: ; preds = %if.end8.i | |
store i8 0, i8 addrspace(200)* %call9.i, align 1, !tbaa !36 | |
br label %if.end13.i | |
if.end13.i: ; preds = %if.then12.i, %if.end8.i | |
%call14.i = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %call2135.i, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%tobool15.i = icmp eq i8 addrspace(200)* %call14.i, null | |
br i1 %tobool15.i, label %again.backedge.i, label %if.end17.i | |
if.end17.i: ; preds = %if.end13.i | |
%incdec.ptr.i = getelementptr inbounds i8, i8 addrspace(200)* %call14.i, i64 1 | |
store i8 0, i8 addrspace(200)* %call14.i, align 1, !tbaa !36 | |
br label %while.cond.outer.i | |
while.cond.outer.i: ; preds = %if.end39.i, %if.end17.i | |
%cname.0.ph.i = phi i8 addrspace(200)* [ %spec.select.i, %if.end39.i ], [ null, %if.end17.i ] | |
%cp.0.ph.i = phi i8 addrspace(200)* [ %cp.1.i, %if.end39.i ], [ %incdec.ptr.i, %if.end17.i ] | |
%tobool18127.i = icmp eq i8 addrspace(200)* %cp.0.ph.i, null | |
br i1 %tobool18127.i, label %again.backedge.i, label %land.rhs.i | |
land.rhs.i: ; preds = %while.cond.outer.i, %if.then27.i | |
%cp.0128.i = phi i8 addrspace(200)* [ %incdec.ptr28.i, %if.then27.i ], [ %cp.0.ph.i, %while.cond.outer.i ] | |
%8 = load i8, i8 addrspace(200)* %cp.0128.i, align 1, !tbaa !36 | |
switch i8 %8, label %if.end29.i [ | |
i8 0, label %again.backedge.i | |
i8 32, label %if.then27.i | |
i8 9, label %if.then27.i | |
] | |
if.then27.i: ; preds = %land.rhs.i, %land.rhs.i | |
%incdec.ptr28.i = getelementptr inbounds i8, i8 addrspace(200)* %cp.0128.i, i64 1 | |
br label %land.rhs.i | |
if.end29.i: ; preds = %land.rhs.i | |
%cmp30.i = icmp eq i8 addrspace(200)* %cname.0.ph.i, null | |
%spec.select.i = select i1 %cmp30.i, i8 addrspace(200)* %cp.0128.i, i8 addrspace(200)* %cname.0.ph.i | |
%call34.i = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %cp.0128.i, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%cmp35.i = icmp eq i8 addrspace(200)* %call34.i, null | |
br i1 %cmp35.i, label %if.end39.i, label %if.then37.i | |
if.then37.i: ; preds = %if.end29.i | |
%incdec.ptr38.i = getelementptr inbounds i8, i8 addrspace(200)* %call34.i, i64 1 | |
store i8 0, i8 addrspace(200)* %call34.i, align 1, !tbaa !36 | |
br label %if.end39.i | |
if.end39.i: ; preds = %if.then37.i, %if.end29.i | |
%cp.1.i = phi i8 addrspace(200)* [ %incdec.ptr38.i, %if.then37.i ], [ null, %if.end29.i ] | |
%call40.i = call signext i32 @strcasecmp(i8 addrspace(200)* %name, i8 addrspace(200)* nonnull %cp.0128.i) #22 | |
%cmp41.i = icmp eq i32 %call40.i, 0 | |
br i1 %cmp41.i, label %found.i, label %while.cond.outer.i | |
again.backedge.i: ; preds = %while.cond.outer.i, %while.body.i.i, %land.rhs.i, %if.then74.i, %if.end55.i, %if.end13.i, %if.end5.i | |
%9 = load %struct.__sFILE addrspace(200)*, %struct.__sFILE addrspace(200)* addrspace(200)* %hostf, align 16, !tbaa !10 | |
%call2.i = call i8 addrspace(200)* @fgets(i8 addrspace(200)* nonnull %2, i32 signext 8192, %struct.__sFILE addrspace(200)* %9) #18 | |
%tobool3.i = icmp eq i8 addrspace(200)* %call2.i, null | |
br i1 %tobool3.i, label %_gethtent.exit, label %if.end5.i | |
found.i: ; preds = %if.end39.i | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %4, i8 0, i64 64, i1 false) #18 | |
%10 = load i32, i32 addrspace(200)* %ai_family.i, align 4, !tbaa !14 | |
store i32 %10, i32 addrspace(200)* %ai_family45.i, align 4, !tbaa !14 | |
store i32 2, i32 addrspace(200)* %ai_socktype.i, align 8, !tbaa !15 | |
store i32 0, i32 addrspace(200)* %ai_protocol.i, align 4, !tbaa !41 | |
store i32 4, i32 addrspace(200)* %ai_flags.i, align 16, !tbaa !13 | |
%cmp47.i = icmp eq i32 %10, 28 | |
br i1 %cmp47.i, label %land.lhs.true49.i, label %if.end55.i | |
land.lhs.true49.i: ; preds = %found.i | |
%11 = load i32, i32 addrspace(200)* %ai_flags50.i, align 16, !tbaa !13 | |
%and.i = and i32 %11, 2048 | |
%cmp51.i = icmp eq i32 %and.i, 0 | |
br i1 %cmp51.i, label %if.end55.i, label %if.then53.i | |
if.then53.i: ; preds = %land.lhs.true49.i | |
store i32 2052, i32 addrspace(200)* %ai_flags.i, align 16, !tbaa !13 | |
br label %if.end55.i | |
if.end55.i: ; preds = %if.then53.i, %land.lhs.true49.i, %found.i | |
%call56.i = call signext i32 @getaddrinfo(i8 addrspace(200)* nonnull %call2135.i, i8 addrspace(200)* getelementptr inbounds ([2 x i8], [2 x i8] addrspace(200)* @.str.17, i64 0, i64 0), %struct.addrinfo addrspace(200)* nonnull %hints.i, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %res0.i) #18 | |
%tobool57.i = icmp eq i32 %call56.i, 0 | |
br i1 %tobool57.i, label %for.cond.preheader.i, label %again.backedge.i | |
for.cond.preheader.i: ; preds = %if.end55.i | |
%res.0129.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i, align 16, !tbaa !10 | |
%tobool60130.i = icmp eq %struct.addrinfo addrspace(200)* %res.0129.i, null | |
br i1 %tobool60130.i, label %for.end.i, label %for.body.i | |
for.body.i: ; preds = %for.cond.preheader.i, %for.inc.i | |
%res.0131.i = phi %struct.addrinfo addrspace(200)* [ %res.0.i, %for.inc.i ], [ %res.0129.i, %for.cond.preheader.i ] | |
%12 = load i32, i32 addrspace(200)* %ai_flags50.i, align 16, !tbaa !13 | |
%ai_flags62.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 0 | |
store i32 %12, i32 addrspace(200)* %ai_flags62.i, align 16, !tbaa !13 | |
%13 = load i32, i32 addrspace(200)* %ai_socktype63.i, align 8, !tbaa !15 | |
%ai_socktype64.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 2 | |
store i32 %13, i32 addrspace(200)* %ai_socktype64.i, align 8, !tbaa !15 | |
%14 = load i32, i32 addrspace(200)* %ai_protocol65.i, align 4, !tbaa !41 | |
%ai_protocol66.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 3 | |
store i32 %14, i32 addrspace(200)* %ai_protocol66.i, align 4, !tbaa !41 | |
%15 = load i32, i32 addrspace(200)* %ai_flags50.i, align 16, !tbaa !13 | |
%and68.i = and i32 %15, 2 | |
%tobool69.i = icmp eq i32 %and68.i, 0 | |
br i1 %tobool69.i, label %for.inc.i, label %if.then.i.i | |
if.then.i.i: ; preds = %for.body.i | |
%call.i.i = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* %spec.select.i) #18 | |
%ai_canonname.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i.i, i8 addrspace(200)* addrspace(200)* %ai_canonname.i.i, align 16, !tbaa !9 | |
%cmp2.i.i = icmp eq i8 addrspace(200)* %call.i.i, null | |
br i1 %cmp2.i.i, label %if.then74.i, label %for.inc.i | |
if.then74.i: ; preds = %if.then.i.i | |
%16 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i, align 16, !tbaa !10 | |
%cmp5.i.i = icmp eq %struct.addrinfo addrspace(200)* %16, null | |
br i1 %cmp5.i.i, label %again.backedge.i, label %while.body.i.i | |
while.body.i.i: ; preds = %if.then74.i, %while.body.i.i | |
%ai.addr.06.i.i = phi %struct.addrinfo addrspace(200)* [ %17, %while.body.i.i ], [ %16, %if.then74.i ] | |
%ai_next.i.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 7 | |
%17 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i.i, align 16, !tbaa !3 | |
%ai_canonname.i122.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai.addr.06.i.i, i64 0, i32 5 | |
%18 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %ai_canonname.i122.i, align 16, !tbaa !9 | |
call void @free(i8 addrspace(200)* %18) #18 | |
%19 = bitcast %struct.addrinfo addrspace(200)* %ai.addr.06.i.i to i8 addrspace(200)* | |
call void @free(i8 addrspace(200)* nonnull %19) #18 | |
%cmp.i123.i = icmp eq %struct.addrinfo addrspace(200)* %17, null | |
br i1 %cmp.i123.i, label %again.backedge.i, label %while.body.i.i | |
for.inc.i: ; preds = %if.then.i.i, %for.body.i | |
%ai_next.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0131.i, i64 0, i32 7 | |
%res.0.i = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next.i, align 16, !tbaa !10 | |
%tobool60.i = icmp eq %struct.addrinfo addrspace(200)* %res.0.i, null | |
br i1 %tobool60.i, label %for.end.i, label %for.body.i | |
for.end.i: ; preds = %for.cond.preheader.i, %for.inc.i | |
%20 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0.i, align 16, !tbaa !10 | |
br label %_gethtent.exit | |
_gethtent.exit: ; preds = %again.backedge.i, %land.lhs.true.i, %if.end.i, %for.end.i | |
%retval.0.i = phi %struct.addrinfo addrspace(200)* [ %20, %for.end.i ], [ null, %land.lhs.true.i ], [ null, %if.end.i ], [ null, %again.backedge.i ] | |
call void @llvm.lifetime.end.p200i8(i64 8192, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%cmp = icmp eq %struct.addrinfo addrspace(200)* %retval.0.i, null | |
br i1 %cmp, label %while.end6, label %while.body | |
while.body: ; preds = %_gethtent.exit | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.addr.0, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %retval.0.i, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
br label %while.cond1 | |
while.cond1: ; preds = %land.rhs, %while.body | |
%cur.addr.1 = phi %struct.addrinfo addrspace(200)* [ %cur.addr.0, %while.body ], [ %21, %land.rhs ] | |
%tobool = icmp eq %struct.addrinfo addrspace(200)* %cur.addr.1, null | |
br i1 %tobool, label %while.cond.loopexit, label %land.rhs | |
land.rhs: ; preds = %while.cond1 | |
%ai_next2 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.addr.1, i64 0, i32 7 | |
%21 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next2, align 16, !tbaa !3 | |
%tobool3 = icmp eq %struct.addrinfo addrspace(200)* %21, null | |
br i1 %tobool3, label %while.cond.loopexit, label %while.cond1 | |
while.end6: ; preds = %_gethtent.exit | |
ret %struct.addrinfo addrspace(200)* %cur.addr.0 | |
} | |
; Function Attrs: nofree nounwind | |
declare noalias %struct.__sFILE addrspace(200)* @fopen(i8 addrspace(200)* nocapture readonly, i8 addrspace(200)* nocapture readonly) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind | |
declare void @rewind(%struct.__sFILE addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind | |
declare i8 addrspace(200)* @fgets(i8 addrspace(200)*, i32 signext, %struct.__sFILE addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind readonly | |
declare i8 addrspace(200)* @strpbrk(i8 addrspace(200)*, i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #15 | |
; Function Attrs: nofree nounwind readonly | |
declare signext i32 @strcasecmp(i8 addrspace(200)* nocapture, i8 addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #15 | |
declare signext i32 @getaddrinfo(i8 addrspace(200)*, i8 addrspace(200)*, %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nofree nounwind | |
declare noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* nocapture readonly) local_unnamed_addr addrspace(200) #4 | |
; Function Attrs: nofree nounwind | |
declare signext i32 @fclose(%struct.__sFILE addrspace(200)* nocapture) local_unnamed_addr addrspace(200) #4 | |
declare %struct.__res_state addrspace(200)* @__res_state() local_unnamed_addr addrspace(200) #13 | |
declare void @__h_errno_set(%struct.__res_state addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__res_ninit(%struct.__res_state addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @getanswer(%union.querybuf addrspace(200)* %answer, i32 signext %anslen, i8 addrspace(200)* nocapture readonly %qname, i32 signext %qtype, %struct.addrinfo addrspace(200)* nocapture readonly %pai, %struct.__res_state addrspace(200)* %res) unnamed_addr addrspace(200) #0 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%ai = alloca %struct.addrinfo, align 16, addrspace(200) | |
%tbuf = alloca [1025 x i8], align 1, addrspace(200) | |
%hostbuf = alloca [8192 x i8], align 1, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %ai to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%2 = getelementptr inbounds [1025 x i8], [1025 x i8] addrspace(200)* %tbuf, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 1025, i8 addrspace(200)* nonnull %2) #18 | |
%3 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf, i64 0, i64 0 | |
call void @llvm.lifetime.start.p200i8(i64 8192, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%arraydecay = getelementptr inbounds %union.querybuf, %union.querybuf addrspace(200)* %answer, i64 0, i32 0, i64 0 | |
%idx.ext = sext i32 %anslen to i64 | |
%add.ptr = getelementptr inbounds %union.querybuf, %union.querybuf addrspace(200)* %answer, i64 0, i32 0, i64 %idx.ext | |
switch i32 %qtype, label %cleanup [ | |
i32 1, label %sw.bb | |
i32 28, label %sw.bb | |
i32 255, label %sw.bb | |
] | |
sw.bb: ; preds = %entry, %entry, %entry | |
%4 = bitcast %union.querybuf addrspace(200)* %answer to i96 addrspace(200)* | |
%bf.load = load i96, i96 addrspace(200)* %4, align 4 | |
%bf.lshr = lshr i96 %bf.load, 32 | |
%5 = trunc i96 %bf.lshr to i32 | |
%conv1 = and i32 %5, 65535 | |
%add.ptr10 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf, i64 0, i64 8192 | |
%add.ptr13 = getelementptr inbounds %union.querybuf, %union.querybuf addrspace(200)* %answer, i64 0, i32 0, i64 12 | |
%conv7383 = and i96 %bf.load, 18446462598732840960 | |
%cmp = icmp eq i96 %conv7383, 281474976710656 | |
br i1 %cmp, label %if.end, label %if.then | |
if.then: ; preds = %sw.bb | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 3) #18 | |
br label %cleanup | |
if.end: ; preds = %sw.bb | |
%call = call signext i32 @__dn_expand(i8 addrspace(200)* %arraydecay, i8 addrspace(200)* %add.ptr, i8 addrspace(200)* nonnull %add.ptr13, i8 addrspace(200)* nonnull %3, i32 signext 8192) #18 | |
%cmp18 = icmp slt i32 %call, 0 | |
br i1 %cmp18, label %if.then21, label %lor.lhs.false | |
lor.lhs.false: ; preds = %if.end | |
%call20 = call signext i32 @__res_hnok(i8 addrspace(200)* nonnull %3) #18 | |
%tobool = icmp eq i32 %call20, 0 | |
br i1 %tobool, label %if.then21, label %if.end22 | |
if.then21: ; preds = %lor.lhs.false, %if.end | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 3) #18 | |
br label %cleanup | |
if.end22: ; preds = %lor.lhs.false | |
%add = add nuw nsw i32 %call, 4 | |
%idx.ext23 = sext i32 %add to i64 | |
%add.ptr24 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr13, i64 %idx.ext23 | |
%cmp25 = icmp eq i32 %qtype, 1 | |
%cmp28 = icmp eq i32 %qtype, 28 | |
%or.cond = or i1 %cmp25, %cmp28 | |
%cmp31 = icmp eq i32 %qtype, 255 | |
%or.cond249 = or i1 %cmp31, %or.cond | |
switch i32 %qtype, label %if.end43 [ | |
i32 255, label %if.then33 | |
i32 28, label %if.then33 | |
i32 1, label %if.then33 | |
] | |
if.then33: ; preds = %if.end22, %if.end22, %if.end22 | |
%call34 = call i64 @strlen(i8 addrspace(200)* nonnull %3) #22 | |
%6 = trunc i64 %call34 to i32 | |
%conv36 = add i32 %6, 1 | |
%cmp37 = icmp sgt i32 %conv36, 255 | |
br i1 %cmp37, label %if.then39, label %if.end40 | |
if.then39: ; preds = %if.then33 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 3) #18 | |
br label %cleanup | |
if.end40: ; preds = %if.then33 | |
%idx.ext41 = sext i32 %conv36 to i64 | |
%add.ptr42 = getelementptr inbounds [8192 x i8], [8192 x i8] addrspace(200)* %hostbuf, i64 0, i64 %idx.ext41 | |
br label %if.end43 | |
if.end43: ; preds = %if.end22, %if.end40 | |
%bp.0 = phi i8 addrspace(200)* [ %add.ptr42, %if.end40 ], [ %3, %if.end22 ] | |
%canonname.0 = phi i8 addrspace(200)* [ %3, %if.end40 ], [ null, %if.end22 ] | |
%qname.addr.0 = phi i8 addrspace(200)* [ %3, %if.end40 ], [ %qname, %if.end22 ] | |
%cmp44403 = icmp ne i32 %conv1, 0 | |
%cmp46404 = icmp ult i8 addrspace(200)* %add.ptr24, %add.ptr | |
%or.cond385405 = and i1 %cmp46404, %cmp44403 | |
br i1 %or.cond385405, label %while.body.lr.ph, label %if.end220 | |
while.body.lr.ph: ; preds = %if.end43 | |
%7 = bitcast %struct.addrinfo addrspace(200)* %pai to i8 addrspace(200)* | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %ai, i64 0, i32 1 | |
br label %while.body | |
while.body: ; preds = %while.body.lr.ph, %while.cond.backedge | |
%dec424.in = phi i32 [ %conv1, %while.body.lr.ph ], [ %dec424, %while.cond.backedge ] | |
%haveanswer.0419 = phi i32 [ 0, %while.body.lr.ph ], [ %haveanswer.0.be, %while.cond.backedge ] | |
%cur.0415 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %while.body.lr.ph ], [ %cur.0.be, %while.cond.backedge ] | |
%canonname.1411 = phi i8 addrspace(200)* [ %canonname.0, %while.body.lr.ph ], [ %canonname.1.be, %while.cond.backedge ] | |
%cp.0410 = phi i8 addrspace(200)* [ %add.ptr24, %while.body.lr.ph ], [ %cp.0.be, %while.cond.backedge ] | |
%bp.1406 = phi i8 addrspace(200)* [ %bp.0, %while.body.lr.ph ], [ %bp.1.be, %while.cond.backedge ] | |
%dec424 = add nsw i32 %dec424.in, -1 | |
%8 = call i64 @llvm.cheri.cap.diff.i64(i8 addrspace(200)* nonnull %add.ptr10, i8 addrspace(200)* %bp.1406) | |
%conv51 = trunc i64 %8 to i32 | |
%call52 = call signext i32 @__dn_expand(i8 addrspace(200)* %arraydecay, i8 addrspace(200)* %add.ptr, i8 addrspace(200)* nonnull %cp.0410, i8 addrspace(200)* %bp.1406, i32 signext %conv51) #18 | |
%cmp53 = icmp slt i32 %call52, 0 | |
br i1 %cmp53, label %while.end208, label %lor.lhs.false55 | |
lor.lhs.false55: ; preds = %while.body | |
%call56 = call signext i32 @__res_hnok(i8 addrspace(200)* %bp.1406) #18 | |
%tobool57 = icmp eq i32 %call56, 0 | |
br i1 %tobool57, label %while.end208, label %if.end59 | |
while.cond.backedge: ; preds = %if.then73, %if.end116, %if.then130, %if.then136, %if.then145, %if.then154, %if.then163, %if.then181, %while.end | |
%bp.1.be = phi i8 addrspace(200)* [ %bp.1406, %if.then73 ], [ %add.ptr120, %if.end116 ], [ %bp.1406, %if.then145 ], [ %bp.1406, %if.then154 ], [ %bp.1406, %if.then163 ], [ %bp.2, %if.then181 ], [ %bp.2, %while.end ], [ %bp.1406, %if.then130 ], [ %bp.1406, %if.then136 ] | |
%cp.0.be = phi i8 addrspace(200)* [ %add.ptr75, %if.then73 ], [ %add.ptr103, %if.end116 ], [ %add.ptr147, %if.then145 ], [ %add.ptr156, %if.then154 ], [ %add.ptr165, %if.then163 ], [ %add.ptr183, %if.then181 ], [ %add.ptr201, %while.end ], [ %add.ptr132, %if.then130 ], [ %add.ptr138, %if.then136 ] | |
%canonname.1.be = phi i8 addrspace(200)* [ %canonname.1411, %if.then73 ], [ %bp.1406, %if.end116 ], [ %canonname.1411, %if.then145 ], [ %canonname.1411, %if.then154 ], [ %canonname.1411, %if.then163 ], [ %canonname.2, %if.then181 ], [ %canonname.2, %while.end ], [ %canonname.1411, %if.then130 ], [ %canonname.1411, %if.then136 ] | |
%cur.0.be = phi %struct.addrinfo addrspace(200)* [ %cur.0415, %if.then73 ], [ %cur.0415, %if.end116 ], [ %cur.0415, %if.then145 ], [ %cur.0415, %if.then154 ], [ %cur.0415, %if.then163 ], [ %cur.0415, %if.then181 ], [ %cur.1, %while.end ], [ %cur.0415, %if.then130 ], [ %cur.0415, %if.then136 ] | |
%haveanswer.0.be = phi i32 [ %haveanswer.0419, %if.then73 ], [ %haveanswer.0419, %if.end116 ], [ %haveanswer.0419, %if.then145 ], [ %haveanswer.0419, %if.then154 ], [ %haveanswer.0419, %if.then163 ], [ %haveanswer.0419, %if.then181 ], [ %spec.select387, %while.end ], [ %haveanswer.0419, %if.then130 ], [ %haveanswer.0419, %if.then136 ] | |
%had_error.0.be = phi i32 [ 0, %if.then73 ], [ 0, %if.end116 ], [ 0, %if.then145 ], [ 0, %if.then154 ], [ 0, %if.then163 ], [ 0, %if.then181 ], [ %inc190, %while.end ], [ 0, %if.then130 ], [ 0, %if.then136 ] | |
%cmp44 = icmp sgt i32 %dec424.in, 1 | |
%cmp46 = icmp ult i8 addrspace(200)* %cp.0.be, %add.ptr | |
%or.cond385 = and i1 %cmp46, %cmp44 | |
%tobool48 = icmp eq i32 %had_error.0.be, 0 | |
%or.cond386 = and i1 %or.cond385, %tobool48 | |
br i1 %or.cond386, label %while.body, label %while.end208 | |
if.end59: ; preds = %lor.lhs.false55 | |
%idx.ext60398 = zext i32 %call52 to i64 | |
%add.ptr61 = getelementptr inbounds i8, i8 addrspace(200)* %cp.0410, i64 %idx.ext60398 | |
%call62 = call zeroext i16 @_getshort(i8 addrspace(200)* %add.ptr61) #18 | |
%conv63 = zext i16 %call62 to i32 | |
%add.ptr64 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr61, i64 2 | |
%call65 = call zeroext i16 @_getshort(i8 addrspace(200)* nonnull %add.ptr64) #18 | |
%add.ptr67 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr64, i64 6 | |
%call68 = call zeroext i16 @_getshort(i8 addrspace(200)* nonnull %add.ptr67) #18 | |
%add.ptr70 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr67, i64 2 | |
%cmp71 = icmp eq i16 %call65, 1 | |
br i1 %cmp71, label %if.end76, label %if.then73 | |
if.then73: ; preds = %if.end59 | |
%idx.ext74 = zext i16 %call68 to i64 | |
%add.ptr75 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext74 | |
br label %while.cond.backedge | |
if.end76: ; preds = %if.end59 | |
%cmp86 = icmp eq i16 %call62, 5 | |
%or.cond253 = and i1 %or.cond249, %cmp86 | |
br i1 %or.cond253, label %if.then88, label %if.end121 | |
if.then88: ; preds = %if.end76 | |
%call92 = call signext i32 @__dn_expand(i8 addrspace(200)* %arraydecay, i8 addrspace(200)* %add.ptr, i8 addrspace(200)* nonnull %add.ptr70, i8 addrspace(200)* nonnull %2, i32 signext 1025) #18 | |
%cmp93 = icmp slt i32 %call92, 0 | |
br i1 %cmp93, label %while.end208, label %lor.lhs.false95 | |
lor.lhs.false95: ; preds = %if.then88 | |
%call97 = call signext i32 @__res_hnok(i8 addrspace(200)* nonnull %2) #18 | |
%tobool98 = icmp eq i32 %call97, 0 | |
br i1 %tobool98, label %while.end208, label %if.end101 | |
if.end101: ; preds = %lor.lhs.false95 | |
%call105 = call i64 @strlen(i8 addrspace(200)* nonnull %2) #22 | |
%9 = trunc i64 %call105 to i32 | |
%conv107 = add i32 %9, 1 | |
%conv108 = sext i32 %conv107 to i64 | |
%cmp109 = icmp slt i64 %8, %conv108 | |
%cmp112 = icmp sgt i32 %conv107, 255 | |
%or.cond254 = or i1 %cmp112, %cmp109 | |
br i1 %or.cond254, label %while.end208, label %if.end116 | |
if.end116: ; preds = %if.end101 | |
%idx.ext102399 = zext i32 %call92 to i64 | |
%add.ptr103 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext102399 | |
%call118 = call i64 @strlcpy(i8 addrspace(200)* %bp.1406, i8 addrspace(200)* nonnull %2, i64 zeroext %8) #18 | |
%add.ptr120 = getelementptr inbounds i8, i8 addrspace(200)* %bp.1406, i64 %conv108 | |
br label %while.cond.backedge | |
if.end121: ; preds = %if.end76 | |
br i1 %cmp31, label %if.then124, label %if.else | |
if.then124: ; preds = %if.end121 | |
switch i16 %call62, label %if.then130 [ | |
i16 1, label %sw.bb141 | |
i16 28, label %sw.bb141 | |
] | |
if.then130: ; preds = %if.then124 | |
%idx.ext131 = zext i16 %call68 to i64 | |
%add.ptr132 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext131 | |
br label %while.cond.backedge | |
if.else: ; preds = %if.end121 | |
%cmp134 = icmp eq i32 %conv63, %qtype | |
br i1 %cmp134, label %if.end140, label %if.then136 | |
if.then136: ; preds = %if.else | |
%idx.ext137 = zext i16 %call68 to i64 | |
%add.ptr138 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext137 | |
br label %while.cond.backedge | |
if.end140: ; preds = %if.else | |
switch i16 %call62, label %sw.default202 [ | |
i16 1, label %sw.bb141 | |
i16 28, label %sw.bb141 | |
] | |
sw.bb141: ; preds = %if.then124, %if.then124, %if.end140, %if.end140 | |
%call142 = call signext i32 @strcasecmp(i8 addrspace(200)* %canonname.1411, i8 addrspace(200)* %bp.1406) #22 | |
%cmp143 = icmp eq i32 %call142, 0 | |
br i1 %cmp143, label %if.end148, label %if.then145 | |
if.then145: ; preds = %sw.bb141 | |
%idx.ext146 = zext i16 %call68 to i64 | |
%add.ptr147 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext146 | |
br label %while.cond.backedge | |
if.end148: ; preds = %sw.bb141 | |
%cmp149 = icmp eq i16 %call62, 1 | |
%cmp152 = icmp ne i16 %call68, 4 | |
%or.cond256 = and i1 %cmp149, %cmp152 | |
br i1 %or.cond256, label %if.then154, label %if.end157 | |
if.then154: ; preds = %if.end148 | |
%idx.ext155 = zext i16 %call68 to i64 | |
%add.ptr156 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext155 | |
br label %while.cond.backedge | |
if.end157: ; preds = %if.end148 | |
%cmp158 = icmp eq i16 %call62, 28 | |
%cmp161 = icmp ne i16 %call68, 16 | |
%or.cond257 = and i1 %cmp158, %cmp161 | |
br i1 %or.cond257, label %if.then163, label %if.end166 | |
if.then163: ; preds = %if.end157 | |
%idx.ext164 = zext i16 %call68 to i64 | |
%add.ptr165 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext164 | |
br label %while.cond.backedge | |
if.end166: ; preds = %if.end157 | |
%tobool167 = icmp eq i32 %haveanswer.0419, 0 | |
br i1 %tobool167, label %if.then168, label %if.end174 | |
if.then168: ; preds = %if.end166 | |
%call169 = call i64 @strlen(i8 addrspace(200)* nonnull dereferenceable(1) %bp.1406) #22 | |
%conv171 = shl i64 %call169, 32 | |
%sext = add i64 %conv171, 4294967296 | |
%idx.ext172 = ashr exact i64 %sext, 32 | |
%add.ptr173 = getelementptr inbounds i8, i8 addrspace(200)* %bp.1406, i64 %idx.ext172 | |
br label %if.end174 | |
if.end174: ; preds = %if.end166, %if.then168 | |
%bp.2 = phi i8 addrspace(200)* [ %bp.1406, %if.end166 ], [ %add.ptr173, %if.then168 ] | |
%canonname.2 = phi i8 addrspace(200)* [ %canonname.1411, %if.end166 ], [ %bp.1406, %if.then168 ] | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %7, i64 80, i1 false), !tbaa.struct !21 | |
%cond = select i1 %cmp149, i32 2, i32 28 | |
store i32 %cond, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%call178 = call fastcc %struct.afd addrspace(200)* @find_afd(i32 signext %cond) | |
%cmp179 = icmp eq %struct.afd addrspace(200)* %call178, null | |
br i1 %cmp179, label %if.then181, label %if.end184 | |
if.then181: ; preds = %if.end174 | |
%idx.ext182 = zext i16 %call68 to i64 | |
%add.ptr183 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext182 | |
br label %while.cond.backedge | |
if.end184: ; preds = %if.end174 | |
%call185 = call fastcc %struct.addrinfo addrspace(200)* @get_ai(%struct.addrinfo addrspace(200)* nonnull %ai, %struct.afd addrspace(200)* nonnull %call178, i8 addrspace(200)* nonnull %add.ptr70) | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0415, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %call185, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !3 | |
%cmp187 = icmp eq %struct.addrinfo addrspace(200)* %call185, null | |
%inc190 = zext i1 %cmp187 to i32 | |
br label %while.cond192 | |
while.cond192: ; preds = %land.rhs194, %if.end184 | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %cur.0415, %if.end184 ], [ %10, %land.rhs194 ] | |
%tobool193 = icmp eq %struct.addrinfo addrspace(200)* %cur.1, null | |
br i1 %tobool193, label %while.end, label %land.rhs194 | |
land.rhs194: ; preds = %while.cond192 | |
%ai_next195 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1, i64 0, i32 7 | |
%10 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next195, align 16, !tbaa !3 | |
%tobool196 = icmp eq %struct.addrinfo addrspace(200)* %10, null | |
br i1 %tobool196, label %while.end, label %while.cond192 | |
while.end: ; preds = %land.rhs194, %while.cond192 | |
%idx.ext200 = zext i16 %call68 to i64 | |
%add.ptr201 = getelementptr inbounds i8, i8 addrspace(200)* %add.ptr70, i64 %idx.ext200 | |
%tobool204 = xor i1 %cmp187, true | |
%inc206 = zext i1 %tobool204 to i32 | |
%spec.select387 = add nsw i32 %haveanswer.0419, %inc206 | |
br label %while.cond.backedge | |
sw.default202: ; preds = %if.end140 | |
call void @abort() #25 | |
unreachable | |
while.end208: ; preds = %if.then88, %lor.lhs.false95, %while.body, %lor.lhs.false55, %if.end101, %while.cond.backedge | |
%canonname.1.lcssa = phi i8 addrspace(200)* [ %canonname.1.be, %while.cond.backedge ], [ %canonname.1411, %if.end101 ], [ %canonname.1411, %lor.lhs.false55 ], [ %canonname.1411, %while.body ], [ %canonname.1411, %lor.lhs.false95 ], [ %canonname.1411, %if.then88 ] | |
%haveanswer.0.lcssa = phi i32 [ %haveanswer.0.be, %while.cond.backedge ], [ %haveanswer.0419, %if.end101 ], [ %haveanswer.0419, %lor.lhs.false55 ], [ %haveanswer.0419, %while.body ], [ %haveanswer.0419, %lor.lhs.false95 ], [ %haveanswer.0419, %if.then88 ] | |
%tobool209 = icmp eq i32 %haveanswer.0.lcssa, 0 | |
br i1 %tobool209, label %if.end220, label %if.then210 | |
if.then210: ; preds = %while.end208 | |
%tobool211 = icmp eq i8 addrspace(200)* %canonname.1.lcssa, null | |
%ai_next216 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%11 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next216, align 16, !tbaa !3 | |
%ai_flags.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
%12 = load i32, i32 addrspace(200)* %ai_flags.i, align 16, !tbaa !13 | |
%and.i = and i32 %12, 2 | |
%cmp.i = icmp eq i32 %and.i, 0 | |
br i1 %tobool211, label %if.then212, label %if.else215 | |
if.then212: ; preds = %if.then210 | |
br i1 %cmp.i, label %if.end218, label %if.then.i | |
if.then.i: ; preds = %if.then212 | |
%call.i = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* %qname.addr.0) #18 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %11, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
br label %if.end218 | |
if.else215: ; preds = %if.then210 | |
br i1 %cmp.i, label %if.end218, label %if.then.i394 | |
if.then.i394: ; preds = %if.else215 | |
%call.i391 = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* nonnull %canonname.1.lcssa) #18 | |
%ai_canonname.i392 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %11, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i391, i8 addrspace(200)* addrspace(200)* %ai_canonname.i392, align 16, !tbaa !9 | |
br label %if.end218 | |
if.end218: ; preds = %if.then.i, %if.then.i394, %if.else215, %if.then212 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext 0) #18 | |
%13 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next216, align 16, !tbaa !3 | |
br label %cleanup | |
if.end220: ; preds = %if.end43, %while.end208 | |
%bf.load221 = load i96, i96 addrspace(200)* %4, align 4 | |
%conv226384 = and i96 %bf.load221, 281470681743360 | |
%cmp227 = icmp eq i96 %conv226384, 0 | |
%cond229 = select i1 %cmp227, i32 3, i32 4 | |
call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext %cond229) #18 | |
br label %cleanup | |
cleanup: ; preds = %entry, %if.end220, %if.end218, %if.then39, %if.then21, %if.then | |
%retval.0 = phi %struct.addrinfo addrspace(200)* [ null, %if.then ], [ null, %if.then21 ], [ null, %if.then39 ], [ %13, %if.end218 ], [ null, %if.end220 ], [ null, %entry ] | |
call void @llvm.lifetime.end.p200i8(i64 8192, i8 addrspace(200)* nonnull %3) #18 | |
call void @llvm.lifetime.end.p200i8(i64 1025, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret %struct.addrinfo addrspace(200)* %retval.0 | |
} | |
declare i8 addrspace(200)* @__res_hostalias(%struct.__res_state addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc signext i32 @res_queryN(i8 addrspace(200)* %name, %struct.res_target addrspace(200)* %target, %struct.__res_state addrspace(200)* %res) unnamed_addr addrspace(200) #0 { | |
entry: | |
%call = tail call noalias i8 addrspace(200)* @malloc(i64 zeroext 65536) #24 | |
%tobool = icmp eq i8 addrspace(200)* %call, null | |
br i1 %tobool, label %cleanup79.sink.split, label %for.cond.preheader | |
for.cond.preheader: ; preds = %entry | |
%tobool1168 = icmp eq %struct.res_target addrspace(200)* %target, null | |
br i1 %tobool1168, label %if.then74.thread, label %for.body.lr.ph | |
if.then74.thread: ; preds = %for.cond.preheader | |
tail call void @free(i8 addrspace(200)* nonnull %call) | |
br label %sw.bb76 | |
for.body.lr.ph: ; preds = %for.cond.preheader | |
%_flags = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %res, i64 0, i32 16 | |
%options = getelementptr inbounds %struct.__res_state, %struct.__res_state addrspace(200)* %res, i64 0, i32 2 | |
br label %for.body | |
for.body: ; preds = %for.body.lr.ph, %for.inc | |
%t.0173 = phi %struct.res_target addrspace(200)* [ %target, %for.body.lr.ph ], [ %13, %for.inc ] | |
%rcode.0172 = phi i32 [ 0, %for.body.lr.ph ], [ %rcode.1.ph, %for.inc ] | |
%ancount.0169 = phi i32 [ 0, %for.body.lr.ph ], [ %ancount.1.ph, %for.inc ] | |
%answer2 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 4 | |
%0 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %answer2, align 16, !tbaa !56 | |
%qclass = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 2 | |
%1 = load i32, i32 addrspace(200)* %qclass, align 16, !tbaa !54 | |
%qtype = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 3 | |
%2 = load i32, i32 addrspace(200)* %qtype, align 4, !tbaa !55 | |
%anslen4 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 5 | |
%3 = load i32, i32 addrspace(200)* %anslen4, align 16, !tbaa !57 | |
%4 = load i32, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%5 = bitcast i8 addrspace(200)* %0 to i96 addrspace(200)* | |
%bf.load161 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.clear162 = and i96 %bf.load161, -276701161105643274241 | |
store i96 %bf.clear162, i96 addrspace(200)* %5, align 4 | |
%call5163 = tail call signext i32 @__res_nmkquery(%struct.__res_state addrspace(200)* %res, i32 signext 0, i8 addrspace(200)* %name, i32 signext %1, i32 signext %2, i8 addrspace(200)* null, i32 signext 0, i8 addrspace(200)* null, i8 addrspace(200)* nonnull %call, i32 signext 65536) #18 | |
%cmp164 = icmp sgt i32 %call5163, 0 | |
br i1 %cmp164, label %land.lhs.true, label %cleanup | |
land.lhs.true: ; preds = %for.body, %if.end34 | |
%call5165 = phi i32 [ %call5, %if.end34 ], [ %call5163, %for.body ] | |
%6 = load i32, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%and = and i32 %6, 4 | |
%cmp7 = icmp eq i32 %and, 0 | |
br i1 %cmp7, label %land.lhs.true8, label %if.end16 | |
land.lhs.true8: ; preds = %land.lhs.true | |
%7 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and9 = and i64 %7, 1075838976 | |
%cmp10 = icmp eq i64 %and9, 0 | |
br i1 %cmp10, label %if.end16, label %if.end13 | |
if.end13: ; preds = %land.lhs.true8 | |
%call12 = tail call signext i32 @__res_nopt(%struct.__res_state addrspace(200)* %res, i32 signext %call5165, i8 addrspace(200)* nonnull %call, i32 signext 65536, i32 signext %3) #18 | |
%cmp14 = icmp slt i32 %call12, 1 | |
br i1 %cmp14, label %cleanup, label %if.end16 | |
if.end16: ; preds = %land.lhs.true, %land.lhs.true8, %if.end13 | |
%n.0144 = phi i32 [ %call12, %if.end13 ], [ %call5165, %land.lhs.true8 ], [ %call5165, %land.lhs.true ] | |
%call17 = tail call signext i32 @__res_nsend(%struct.__res_state addrspace(200)* %res, i8 addrspace(200)* nonnull %call, i32 signext %n.0144, i8 addrspace(200)* %0, i32 signext %3) #18 | |
%cmp18 = icmp slt i32 %call17, 0 | |
br i1 %cmp18, label %if.then19, label %if.end38 | |
if.then19: ; preds = %if.end16 | |
%8 = load i64, i64 addrspace(200)* %options, align 8, !tbaa !59 | |
%and21 = and i64 %8, 1075838976 | |
%cmp22 = icmp eq i64 %and21, 0 | |
br i1 %cmp22, label %if.end35, label %land.lhs.true23 | |
land.lhs.true23: ; preds = %if.then19 | |
%9 = load i32, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%xor = xor i32 %9, %4 | |
%and25 = and i32 %xor, 4 | |
%cmp26 = icmp eq i32 %and25, 0 | |
br i1 %cmp26, label %if.end35, label %if.then27 | |
if.then27: ; preds = %land.lhs.true23 | |
%or = or i32 %9, 4 | |
store i32 %or, i32 addrspace(200)* %_flags, align 8, !tbaa !64 | |
%and30 = and i64 %8, 2 | |
%tobool31 = icmp eq i64 %and30, 0 | |
br i1 %tobool31, label %if.end34, label %if.then32 | |
if.then32: ; preds = %if.then27 | |
%puts = tail call i32 @puts(i8 addrspace(200)* nonnull dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8] addrspace(200)* @str.24, i64 0, i64 0)) | |
br label %if.end34 | |
if.end34: ; preds = %if.then27, %if.then32 | |
%bf.load = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.clear = and i96 %bf.load, -276701161105643274241 | |
store i96 %bf.clear, i96 addrspace(200)* %5, align 4 | |
%call5 = tail call signext i32 @__res_nmkquery(%struct.__res_state addrspace(200)* %res, i32 signext 0, i8 addrspace(200)* %name, i32 signext %1, i32 signext %2, i8 addrspace(200)* null, i32 signext 0, i8 addrspace(200)* null, i8 addrspace(200)* nonnull %call, i32 signext 65536) #18 | |
%cmp = icmp sgt i32 %call5, 0 | |
br i1 %cmp, label %land.lhs.true, label %cleanup | |
if.end35: ; preds = %land.lhs.true23, %if.then19 | |
%bf.load36 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.lshr = lshr i96 %bf.load36, 64 | |
%10 = trunc i96 %bf.lshr to i32 | |
%bf.cast = and i32 %10, 15 | |
br label %for.inc | |
if.end38: ; preds = %if.end16 | |
%cmp39 = icmp sgt i32 %call17, %3 | |
br i1 %cmp39, label %if.then40, label %if.end43 | |
if.then40: ; preds = %if.end38 | |
%bf.load41 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.clear42 = and i96 %bf.load41, -276701161105643274241 | |
%bf.set = or i96 %bf.clear42, 18446744073709551616 | |
store i96 %bf.set, i96 addrspace(200)* %5, align 4 | |
br label %if.end43 | |
if.end43: ; preds = %if.then40, %if.end38 | |
%bf.load44 = load i96, i96 addrspace(200)* %5, align 4 | |
%bf.cast47141 = and i96 %bf.load44, 276701161105643274240 | |
%cmp48 = icmp eq i96 %bf.cast47141, 0 | |
br i1 %cmp48, label %lor.lhs.false, label %if.then56 | |
lor.lhs.false: ; preds = %if.end43 | |
%bf.lshr50 = lshr i96 %bf.load44, 32 | |
%11 = trunc i96 %bf.lshr50 to i32 | |
%conv53 = and i32 %11, 65535 | |
%cmp54 = icmp eq i32 %conv53, 0 | |
br i1 %cmp54, label %if.then56, label %if.end61 | |
if.then56: ; preds = %if.end43, %lor.lhs.false | |
%bf.lshr58 = lshr i96 %bf.load44, 64 | |
%12 = trunc i96 %bf.lshr58 to i32 | |
%bf.cast60 = and i32 %12, 15 | |
br label %for.inc | |
if.end61: ; preds = %lor.lhs.false | |
%add = add nsw i32 %conv53, %ancount.0169 | |
%n68 = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 6 | |
store i32 %call17, i32 addrspace(200)* %n68, align 4, !tbaa !63 | |
br label %for.inc | |
cleanup: ; preds = %for.body, %if.end13, %if.end34 | |
%n.0148 = phi i32 [ %call5, %if.end34 ], [ %call12, %if.end13 ], [ %call5163, %for.body ] | |
tail call void @free(i8 addrspace(200)* nonnull %call) | |
br label %cleanup79.sink.split | |
for.inc: ; preds = %if.end35, %if.then56, %if.end61 | |
%ancount.1.ph = phi i32 [ %add, %if.end61 ], [ %ancount.0169, %if.then56 ], [ %ancount.0169, %if.end35 ] | |
%rcode.1.ph = phi i32 [ %rcode.0172, %if.end61 ], [ %bf.cast60, %if.then56 ], [ %bf.cast, %if.end35 ] | |
%next = getelementptr inbounds %struct.res_target, %struct.res_target addrspace(200)* %t.0173, i64 0, i32 0 | |
%13 = load %struct.res_target addrspace(200)*, %struct.res_target addrspace(200)* addrspace(200)* %next, align 16, !tbaa !58 | |
%tobool1 = icmp eq %struct.res_target addrspace(200)* %13, null | |
br i1 %tobool1, label %for.end, label %for.body | |
for.end: ; preds = %for.inc | |
tail call void @free(i8 addrspace(200)* nonnull %call) | |
%cmp72 = icmp eq i32 %ancount.1.ph, 0 | |
br i1 %cmp72, label %if.then74, label %cleanup79 | |
if.then74: ; preds = %for.end | |
switch i32 %rcode.1.ph, label %sw.default [ | |
i32 3, label %cleanup79.sink.split | |
i32 2, label %sw.bb75 | |
i32 0, label %sw.bb76 | |
] | |
sw.bb75: ; preds = %if.then74 | |
br label %cleanup79.sink.split | |
sw.bb76: ; preds = %if.then74.thread, %if.then74 | |
br label %cleanup79.sink.split | |
sw.default: ; preds = %if.then74 | |
br label %cleanup79.sink.split | |
cleanup79.sink.split: ; preds = %if.then74, %entry, %sw.default, %sw.bb76, %sw.bb75, %cleanup | |
%.sink = phi i32 [ 3, %cleanup ], [ 2, %sw.bb75 ], [ 4, %sw.bb76 ], [ 3, %sw.default ], [ -1, %entry ], [ 1, %if.then74 ] | |
%retval.2.ph = phi i32 [ %n.0148, %cleanup ], [ -1, %sw.bb75 ], [ -1, %sw.bb76 ], [ -1, %sw.default ], [ -1, %entry ], [ -1, %if.then74 ] | |
tail call void @__h_errno_set(%struct.__res_state addrspace(200)* %res, i32 signext %.sink) #18 | |
br label %cleanup79 | |
cleanup79: ; preds = %cleanup79.sink.split, %for.end | |
%retval.2 = phi i32 [ %ancount.1.ph, %for.end ], [ %retval.2.ph, %cleanup79.sink.split ] | |
ret i32 %retval.2 | |
} | |
declare signext i32 @__res_nmkquery(%struct.__res_state addrspace(200)*, i32 signext, i8 addrspace(200)*, i32 signext, i32 signext, i8 addrspace(200)*, i32 signext, i8 addrspace(200)*, i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__res_nopt(%struct.__res_state addrspace(200)*, i32 signext, i8 addrspace(200)*, i32 signext, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__res_nsend(%struct.__res_state addrspace(200)*, i8 addrspace(200)*, i32 signext, i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare i8 addrspace(200)* @strncpy(i8 addrspace(200)*, i8 addrspace(200)*, i64 zeroext) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nofree nounwind | |
declare signext i32 @snprintf(i8 addrspace(200)* noalias nocapture, i64 zeroext, i8 addrspace(200)* nocapture readonly, ...) local_unnamed_addr addrspace(200) #4 | |
declare signext i32 @__res_hnok(i8 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @__dn_expand(i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #13 | |
declare zeroext i16 @_getshort(i8 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: noreturn | |
declare void @abort() local_unnamed_addr addrspace(200) #16 | |
declare signext i32 @_yp_check(i8 addrspace(200)* addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
declare signext i32 @yp_match(i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i32 signext, i8 addrspace(200)* addrspace(200)*, i32 addrspace(200)*) local_unnamed_addr addrspace(200) #13 | |
; Function Attrs: nounwind uwtable | |
define internal fastcc %struct.addrinfo addrspace(200)* @_yphostent(i8 addrspace(200)* %line, %struct.addrinfo addrspace(200)* nocapture readonly %pai) unnamed_addr addrspace(200) #0 { | |
entry: | |
%sentinel = alloca %struct.addrinfo, align 16, addrspace(200) | |
%hints = alloca %struct.addrinfo, align 16, addrspace(200) | |
%res0 = alloca %struct.addrinfo addrspace(200)*, align 16, addrspace(200) | |
%0 = bitcast %struct.addrinfo addrspace(200)* %sentinel to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
%1 = bitcast %struct.addrinfo addrspace(200)* %hints to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
%2 = bitcast %struct.addrinfo addrspace(200)* addrspace(200)* %res0 to i8 addrspace(200)* | |
call void @llvm.lifetime.start.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.memset.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %0, i8 0, i64 80, i1 false) | |
%3 = bitcast %struct.addrinfo addrspace(200)* %pai to i8 addrspace(200)* | |
%ai_flags = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %hints, i64 0, i32 0 | |
%ai_family = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 1 | |
%ai_flags31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %pai, i64 0, i32 0 | |
br label %nextline1 | |
nextline1: ; preds = %if.end64, %entry | |
%cur.0 = phi %struct.addrinfo addrspace(200)* [ %sentinel, %entry ], [ %cur.2, %if.end64 ] | |
%p.0 = phi i8 addrspace(200)* [ %line, %entry ], [ %nextline.0, %if.end64 ] | |
%canonname.0 = phi i8 addrspace(200)* [ null, %entry ], [ %canonname.1.ph.lcssa, %if.end64 ] | |
%call = call i8 addrspace(200)* @strchr(i8 addrspace(200)* nonnull dereferenceable(1) %p.0, i32 signext 10) #22 | |
%tobool = icmp eq i8 addrspace(200)* %call, null | |
br i1 %tobool, label %if.end, label %if.then | |
if.then: ; preds = %nextline1 | |
%incdec.ptr = getelementptr inbounds i8, i8 addrspace(200)* %call, i64 1 | |
store i8 0, i8 addrspace(200)* %call, align 1, !tbaa !36 | |
br label %if.end | |
if.end: ; preds = %nextline1, %if.then | |
%nextline.0 = phi i8 addrspace(200)* [ %incdec.ptr, %if.then ], [ null, %nextline1 ] | |
%call2 = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* %p.0, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%cmp = icmp eq i8 addrspace(200)* %call2, null | |
br i1 %cmp, label %if.then3, label %land.rhs.lr.ph | |
if.then3: ; preds = %if.end | |
%cmp4 = icmp eq i8 addrspace(200)* %canonname.0, null | |
br i1 %cmp4, label %cleanup, label %done | |
land.rhs.lr.ph: ; preds = %if.end, %if.end19 | |
%call23.sink = phi i8 addrspace(200)* [ %call23, %if.end19 ], [ %call2, %if.end ] | |
%canonname.1.ph123 = phi i8 addrspace(200)* [ %spec.select, %if.end19 ], [ %canonname.0, %if.end ] | |
store i8 0, i8 addrspace(200)* %call23.sink, align 1, !tbaa !36 | |
br label %land.rhs | |
land.rhs: ; preds = %land.rhs.backedge, %land.rhs.lr.ph | |
%call2.pn.pn = phi i8 addrspace(200)* [ %call23.sink, %land.rhs.lr.ph ], [ %cp.0120, %land.rhs.backedge ] | |
%cp.0120 = getelementptr inbounds i8, i8 addrspace(200)* %call2.pn.pn, i64 1 | |
%4 = load i8, i8 addrspace(200)* %cp.0120, align 1, !tbaa !36 | |
switch i8 %4, label %if.end19 [ | |
i8 0, label %while.end | |
i8 32, label %land.rhs.backedge | |
i8 9, label %land.rhs.backedge | |
] | |
land.rhs.backedge: ; preds = %land.rhs, %land.rhs | |
br label %land.rhs | |
if.end19: ; preds = %land.rhs | |
%tobool20 = icmp eq i8 addrspace(200)* %canonname.1.ph123, null | |
%spec.select = select i1 %tobool20, i8 addrspace(200)* %cp.0120, i8 addrspace(200)* %canonname.1.ph123 | |
%call23 = call i8 addrspace(200)* @strpbrk(i8 addrspace(200)* nonnull %cp.0120, i8 addrspace(200)* getelementptr inbounds ([3 x i8], [3 x i8] addrspace(200)* @.str.16, i64 0, i64 0)) #22 | |
%cmp24 = icmp eq i8 addrspace(200)* %call23, null | |
br i1 %cmp24, label %while.end, label %land.rhs.lr.ph | |
while.end: ; preds = %if.end19, %land.rhs | |
%canonname.1.ph.lcssa = phi i8 addrspace(200)* [ %canonname.1.ph123, %land.rhs ], [ %spec.select, %if.end19 ] | |
call void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* nonnull align 16 dereferenceable(80) %1, i8 addrspace(200)* nonnull align 16 dereferenceable(80) %3, i64 80, i1 false), !tbaa.struct !21 | |
store i32 4, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
%5 = load i32, i32 addrspace(200)* %ai_family, align 4, !tbaa !14 | |
%cmp29 = icmp eq i32 %5, 28 | |
br i1 %cmp29, label %land.lhs.true, label %if.end36 | |
land.lhs.true: ; preds = %while.end | |
%6 = load i32, i32 addrspace(200)* %ai_flags31, align 16, !tbaa !13 | |
%and = and i32 %6, 2048 | |
%cmp32 = icmp eq i32 %and, 0 | |
br i1 %cmp32, label %if.end36, label %if.then34 | |
if.then34: ; preds = %land.lhs.true | |
store i32 2052, i32 addrspace(200)* %ai_flags, align 16, !tbaa !13 | |
br label %if.end36 | |
if.end36: ; preds = %land.lhs.true, %if.then34, %while.end | |
%call37 = call signext i32 @getaddrinfo(i8 addrspace(200)* %p.0, i8 addrspace(200)* null, %struct.addrinfo addrspace(200)* nonnull %hints, %struct.addrinfo addrspace(200)* addrspace(200)* nonnull %res0) #18 | |
%cmp38 = icmp eq i32 %call37, 0 | |
br i1 %cmp38, label %for.cond.preheader, label %if.end51.thread | |
for.cond.preheader: ; preds = %if.end36 | |
%res.0125 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0, align 16, !tbaa !10 | |
%tobool41126 = icmp eq %struct.addrinfo addrspace(200)* %res.0125, null | |
br i1 %tobool41126, label %if.end64, label %for.body | |
for.body: ; preds = %for.cond.preheader, %for.inc | |
%res.0127 = phi %struct.addrinfo addrspace(200)* [ %res.0, %for.inc ], [ %res.0125, %for.cond.preheader ] | |
%7 = load i32, i32 addrspace(200)* %ai_flags31, align 16, !tbaa !13 | |
%ai_flags43 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0127, i64 0, i32 0 | |
store i32 %7, i32 addrspace(200)* %ai_flags43, align 16, !tbaa !13 | |
%8 = load i32, i32 addrspace(200)* %ai_flags31, align 16, !tbaa !13 | |
%and45 = and i32 %8, 2 | |
%tobool46 = icmp eq i32 %and45, 0 | |
br i1 %tobool46, label %for.inc, label %if.then.i | |
if.then.i: ; preds = %for.body | |
%call.i = call noalias i8 addrspace(200)* @strdup(i8 addrspace(200)* %canonname.1.ph.lcssa) #18 | |
%ai_canonname.i = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0127, i64 0, i32 5 | |
store i8 addrspace(200)* %call.i, i8 addrspace(200)* addrspace(200)* %ai_canonname.i, align 16, !tbaa !9 | |
br label %for.inc | |
for.inc: ; preds = %if.then.i, %for.body | |
%ai_next = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %res.0127, i64 0, i32 7 | |
%res.0 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next, align 16, !tbaa !10 | |
%tobool41 = icmp eq %struct.addrinfo addrspace(200)* %res.0, null | |
br i1 %tobool41, label %if.end51, label %for.body | |
if.end51.thread: ; preds = %if.end36 | |
store %struct.addrinfo addrspace(200)* null, %struct.addrinfo addrspace(200)* addrspace(200)* %res0, align 16, !tbaa !10 | |
br label %if.end64 | |
if.end51: ; preds = %for.inc | |
%.pr.pr = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %res0, align 16, !tbaa !10 | |
%tobool52 = icmp eq %struct.addrinfo addrspace(200)* %.pr.pr, null | |
br i1 %tobool52, label %if.end64, label %if.then53 | |
if.then53: ; preds = %if.end51 | |
%ai_next54 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.0, i64 0, i32 7 | |
store %struct.addrinfo addrspace(200)* %.pr.pr, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next54, align 16, !tbaa !3 | |
br label %while.cond55 | |
while.cond55: ; preds = %land.rhs57, %if.then53 | |
%cur.1 = phi %struct.addrinfo addrspace(200)* [ %cur.0, %if.then53 ], [ %9, %land.rhs57 ] | |
%tobool56 = icmp eq %struct.addrinfo addrspace(200)* %cur.1, null | |
br i1 %tobool56, label %if.end64, label %land.rhs57 | |
land.rhs57: ; preds = %while.cond55 | |
%ai_next58 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %cur.1, i64 0, i32 7 | |
%9 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next58, align 16, !tbaa !3 | |
%tobool59 = icmp eq %struct.addrinfo addrspace(200)* %9, null | |
br i1 %tobool59, label %if.end64, label %while.cond55 | |
if.end64: ; preds = %land.rhs57, %while.cond55, %for.cond.preheader, %if.end51.thread, %if.end51 | |
%cur.2 = phi %struct.addrinfo addrspace(200)* [ %cur.0, %if.end51 ], [ %cur.0, %if.end51.thread ], [ %cur.0, %for.cond.preheader ], [ null, %while.cond55 ], [ %cur.1, %land.rhs57 ] | |
%tobool65 = icmp eq i8 addrspace(200)* %nextline.0, null | |
br i1 %tobool65, label %done, label %nextline1 | |
done: ; preds = %if.end64, %if.then3 | |
%ai_next68 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo addrspace(200)* %sentinel, i64 0, i32 7 | |
%10 = load %struct.addrinfo addrspace(200)*, %struct.addrinfo addrspace(200)* addrspace(200)* %ai_next68, align 16, !tbaa !3 | |
br label %cleanup | |
cleanup: ; preds = %if.then3, %done | |
%retval.0 = phi %struct.addrinfo addrspace(200)* [ %10, %done ], [ null, %if.then3 ] | |
call void @llvm.lifetime.end.p200i8(i64 16, i8 addrspace(200)* nonnull %2) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %1) #18 | |
call void @llvm.lifetime.end.p200i8(i64 80, i8 addrspace(200)* nonnull %0) #18 | |
ret %struct.addrinfo addrspace(200)* %retval.0 | |
} | |
; Function Attrs: nofree nounwind readonly | |
declare i8 addrspace(200)* @strchr(i8 addrspace(200)*, i32 signext) local_unnamed_addr addrspace(200) #15 | |
; Function Attrs: nofree nounwind | |
declare i32 @puts(i8 addrspace(200)* nocapture readonly) local_unnamed_addr addrspace(200) #17 | |
attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #1 = { argmemonly nounwind willreturn writeonly } | |
attributes #2 = { nofree nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #3 = { argmemonly nounwind willreturn } | |
attributes #4 = { nofree nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #5 = { nounwind readnone willreturn } | |
attributes #6 = { noinline norecurse nounwind readonly uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #7 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #8 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "stackrealign" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #9 = { nofree nounwind allocsize(0,1) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #10 = { argmemonly nofree nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #11 = { nofree nounwind allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #12 = { nofree "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #13 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #14 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #15 = { nofree nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #16 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="beri" "target-features"="+beri,+cheri128,+chericap,+soft-float,-noabicalls" "unsafe-fp-math"="false" "use-soft-float"="true" } | |
attributes #17 = { nofree nounwind } | |
attributes #18 = { nounwind } | |
attributes #19 = { "frontend-memtransfer-type"="'struct addrinfo'" "must-preserve-cheri-tags" } | |
attributes #20 = { nounwind allocsize(0,1) } | |
attributes #21 = { nounwind "frontend-memtransfer-type"="'struct addrinfo'" "must-preserve-cheri-tags" } | |
attributes #22 = { nounwind readonly } | |
attributes #23 = { nounwind allocsize(0) } | |
attributes #24 = { allocsize(0) } | |
attributes #25 = { noreturn nounwind } | |
!llvm.module.flags = !{!0, !1} | |
!llvm.ident = !{!2} | |
!0 = !{i32 1, !"wchar_size", i32 4} | |
!1 = !{i32 7, !"PIC Level", i32 1} | |
!2 = !{!"clang version 11.0.0 "} | |
!3 = !{!4, !8, i64 64} | |
!4 = !{!"addrinfo", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12, !5, i64 16, !8, i64 32, !8, i64 48, !8, i64 64} | |
!5 = !{!"int", !6, i64 0} | |
!6 = !{!"omnipotent char", !7, i64 0} | |
!7 = !{!"Simple C/C++ TBAA"} | |
!8 = !{!"any pointer", !6, i64 0} | |
!9 = !{!4, !8, i64 32} | |
!10 = !{!8, !8, i64 0} | |
!11 = !{!4, !5, i64 16} | |
!12 = !{!4, !8, i64 48} | |
!13 = !{!4, !5, i64 0} | |
!14 = !{!4, !5, i64 4} | |
!15 = !{!4, !5, i64 8} | |
!16 = !{!17, !5, i64 12} | |
!17 = !{!"explore", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12} | |
!18 = !{!17, !5, i64 4} | |
!19 = !{!17, !5, i64 8} | |
!20 = !{!17, !5, i64 0} | |
!21 = !{i64 0, i64 4, !22, i64 4, i64 4, !22, i64 8, i64 4, !22, i64 12, i64 4, !22, i64 16, i64 4, !22, i64 32, i64 16, !10, i64 48, i64 16, !10, i64 64, i64 16, !10} | |
!22 = !{!5, !5, i64 0} | |
!23 = !{!24, !5, i64 0} | |
!24 = !{!"afd", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12, !8, i64 16, !8, i64 32, !5, i64 48} | |
!25 = !{!24, !8, i64 16} | |
!26 = !{!24, !8, i64 32} | |
!27 = !{!28, !8, i64 48} | |
!28 = !{!"ifaddrs", !8, i64 0, !8, i64 16, !5, i64 32, !8, i64 48, !8, i64 64, !8, i64 80, !8, i64 96} | |
!29 = !{!28, !5, i64 32} | |
!30 = !{!31, !6, i64 1} | |
!31 = !{!"sockaddr", !6, i64 0, !6, i64 1, !6, i64 2} | |
!32 = !{!33, !5, i64 4} | |
!33 = !{!"sockaddr_in", !6, i64 0, !6, i64 1, !34, i64 2, !35, i64 4, !6, i64 8} | |
!34 = !{!"short", !6, i64 0} | |
!35 = !{!"in_addr", !5, i64 0} | |
!36 = !{!6, !6, i64 0} | |
!37 = !{!28, !8, i64 16} | |
!38 = !{!39, !5, i64 36} | |
!39 = !{!"in6_ndireq", !6, i64 0, !40, i64 16} | |
!40 = !{!"nd_ifinfo", !5, i64 0, !5, i64 4, !5, i64 8, !5, i64 12, !5, i64 16, !5, i64 20, !5, i64 24, !6, i64 28, !6, i64 29, !6, i64 30, !6, i64 38, !6, i64 46} | |
!41 = !{!4, !5, i64 12} | |
!42 = !{!24, !5, i64 8} | |
!43 = !{!31, !6, i64 0} | |
!44 = !{!24, !5, i64 4} | |
!45 = !{!24, !5, i64 12} | |
!46 = !{!47, !5, i64 32} | |
!47 = !{!"servent", !8, i64 0, !8, i64 16, !5, i64 32, !8, i64 48} | |
!48 = !{!33, !34, i64 2} | |
!49 = !{!50, !34, i64 2} | |
!50 = !{!"sockaddr_in6", !6, i64 0, !6, i64 1, !34, i64 2, !5, i64 4, !51, i64 8, !5, i64 24} | |
!51 = !{!"in6_addr", !6, i64 0} | |
!52 = !{!53, !8, i64 16} | |
!53 = !{!"res_target", !8, i64 0, !8, i64 16, !5, i64 32, !5, i64 36, !8, i64 48, !5, i64 64, !5, i64 68} | |
!54 = !{!53, !5, i64 32} | |
!55 = !{!53, !5, i64 36} | |
!56 = !{!53, !8, i64 48} | |
!57 = !{!53, !5, i64 64} | |
!58 = !{!53, !8, i64 0} | |
!59 = !{!60, !61, i64 8} | |
!60 = !{!"__res_state", !5, i64 0, !5, i64 4, !61, i64 8, !5, i64 16, !6, i64 20, !34, i64 68, !6, i64 80, !6, i64 192, !61, i64 448, !5, i64 456, !5, i64 456, !6, i64 457, !6, i64 460, !8, i64 544, !8, i64 560, !5, i64 576, !5, i64 580, !5, i64 584, !5, i64 588, !6, i64 592, !8, i64 640} | |
!61 = !{!"long", !6, i64 0} | |
!62 = !{!60, !5, i64 576} | |
!63 = !{!53, !5, i64 68} | |
!64 = !{!60, !5, i64 584} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment