; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/zeromq/src (ip_resolver)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }
%"class.zmq::ip_resolver_t" = type <{ ptr, %"class.zmq::ip_resolver_options_t", [3 x i8] }>
%"class.zmq::ip_resolver_options_t" = type { i8, i8, i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [115 x i8], align 1
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t8bindableEv(ptr noundef nonnull align 1 dereferenceable(5)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t4ipv6Ev(ptr noundef nonnull align 1 dereferenceable(5)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t9allow_dnsEv(ptr noundef nonnull align 1 dereferenceable(5)) #3 align 2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3zmq13ip_resolver_t19resolve_getaddrinfoEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13) %0, ptr noundef %1, ptr noundef %2) #5 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.addrinfo, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #9
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 48, i1 false)
  %13 = getelementptr inbounds %"class.zmq::ip_resolver_t", ptr %12, i32 0, i32 1
  %14 = call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t4ipv6Ev(ptr noundef nonnull align 1 dereferenceable(5) %13)
  %15 = zext i1 %14 to i64
  %16 = select i1 %14, i32 10, i32 2
  %17 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 1
  store i32 %16, ptr %17, align 4, !tbaa !9
  %18 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 2
  store i32 1, ptr %18, align 8, !tbaa !12
  %19 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 0
  store i32 0, ptr %19, align 8, !tbaa !13
  %20 = getelementptr inbounds %"class.zmq::ip_resolver_t", ptr %12, i32 0, i32 1
  %21 = call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t8bindableEv(ptr noundef nonnull align 1 dereferenceable(5) %20)
  br i1 %21, label %22, label %26

22:                                               ; preds = %3
  %23 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !13
  %25 = or i32 %24, 1
  store i32 %25, ptr %23, align 8, !tbaa !13
  br label %26

26:                                               ; preds = %22, %3
  %27 = getelementptr inbounds %"class.zmq::ip_resolver_t", ptr %12, i32 0, i32 1
  %28 = call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t9allow_dnsEv(ptr noundef nonnull align 1 dereferenceable(5) %27)
  br i1 %28, label %33, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = or i32 %31, 4
  store i32 %32, ptr %30, align 8, !tbaa !13
  br label %33

33:                                               ; preds = %29, %26
  %34 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = icmp eq i32 %35, 10
  br i1 %36, label %37, label %41

37:                                               ; preds = %33
  %38 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !13
  %40 = or i32 %39, 8
  store i32 %40, ptr %38, align 8, !tbaa !13
  br label %41

41:                                               ; preds = %37, %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load ptr, ptr %12, align 8, !tbaa !14
  %44 = getelementptr inbounds ptr, ptr %43, i64 0
  %45 = load ptr, ptr %44, align 8
  %46 = call noundef i32 %45(ptr noundef nonnull align 8 dereferenceable(13) %12, ptr noundef %42, ptr noundef null, ptr noundef %9, ptr noundef %8)
  store i32 %46, ptr %10, align 4, !tbaa !16
  %47 = load i32, ptr %10, align 4, !tbaa !16
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %49, label %63

49:                                               ; preds = %41
  %50 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !13
  %52 = and i32 %51, 8
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %63

54:                                               ; preds = %49
  %55 = getelementptr inbounds %struct.addrinfo, ptr %9, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !13
  %57 = and i32 %56, -9
  store i32 %57, ptr %55, align 8, !tbaa !13
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %12, align 8, !tbaa !14
  %60 = getelementptr inbounds ptr, ptr %59, i64 0
  %61 = load ptr, ptr %60, align 8
  %62 = call noundef i32 %61(ptr noundef nonnull align 8 dereferenceable(13) %12, ptr noundef %58, ptr noundef null, ptr noundef %9, ptr noundef %8)
  store i32 %62, ptr %10, align 4, !tbaa !16
  br label %63

63:                                               ; preds = %54, %49, %41
  %64 = load i32, ptr %10, align 4, !tbaa !16
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %79

66:                                               ; preds = %63
  %67 = load i32, ptr %10, align 4, !tbaa !16
  switch i32 %67, label %70 [
    i32 -10, label %68
  ]

68:                                               ; preds = %66
  %69 = call ptr @__errno_location() #10
  store i32 12, ptr %69, align 4, !tbaa !16
  br label %78

70:                                               ; preds = %66
  %71 = getelementptr inbounds %"class.zmq::ip_resolver_t", ptr %12, i32 0, i32 1
  %72 = call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t8bindableEv(ptr noundef nonnull align 1 dereferenceable(5) %71)
  br i1 %72, label %73, label %75

73:                                               ; preds = %70
  %74 = call ptr @__errno_location() #10
  store i32 19, ptr %74, align 4, !tbaa !16
  br label %77

75:                                               ; preds = %70
  %76 = call ptr @__errno_location() #10
  store i32 22, ptr %76, align 4, !tbaa !16
  br label %77

77:                                               ; preds = %75, %73
  br label %78

78:                                               ; preds = %77, %68
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %125

79:                                               ; preds = %63
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  %83 = xor i1 %82, true
  %84 = zext i1 %83 to i64
  %85 = call i64 @llvm.expect.i64(i64 %84, i64 0)
  %86 = icmp ne i64 %85, 0
  br i1 %86, label %87, label %92

87:                                               ; preds = %80
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 370) #9
  %90 = load ptr, ptr @stderr, align 8, !tbaa !5
  %91 = call i32 @fflush(ptr noundef %90)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.6)
  br label %92

92:                                               ; preds = %87, %80
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.addrinfo, ptr %96, i32 0, i32 4
  %98 = load i32, ptr %97, align 8, !tbaa !17
  %99 = zext i32 %98 to i64
  %100 = icmp ule i64 %99, 28
  %101 = xor i1 %100, true
  %102 = zext i1 %101 to i64
  %103 = call i64 @llvm.expect.i64(i64 %102, i64 0)
  %104 = icmp ne i64 %103, 0
  br i1 %104, label %105, label %110

105:                                              ; preds = %95
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.5, ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 371) #9
  %108 = load ptr, ptr @stderr, align 8, !tbaa !5
  %109 = call i32 @fflush(ptr noundef %108)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.7)
  br label %110

110:                                              ; preds = %105, %95
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.addrinfo, ptr %114, i32 0, i32 5
  %116 = load ptr, ptr %115, align 8, !tbaa !18
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.addrinfo, ptr %117, i32 0, i32 4
  %119 = load i32, ptr %118, align 8, !tbaa !17
  %120 = zext i32 %119 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %113, ptr align 2 %116, i64 %120, i1 false)
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load ptr, ptr %12, align 8, !tbaa !14
  %123 = getelementptr inbounds ptr, ptr %122, i64 1
  %124 = load ptr, ptr %123, align 8
  call void %124(ptr noundef nonnull align 8 dereferenceable(13) %12, ptr noundef %121)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %125

125:                                              ; preds = %112, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  %126 = load i32, ptr %4, align 4
  ret i32 %126
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #6

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #7

declare i32 @fflush(ptr noundef) #8

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) #8

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS8addrinfo", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !11, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 16}
!18 = !{!10, !6, i64 24}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.addrinfo = type { i32, i32, i32, i32, i32, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [115 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t8bindableEv(ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t4ipv6Ev(ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t9allow_dnsEv(ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 1) i32 @_ZN3zmq13ip_resolver_t19resolve_getaddrinfoEPNS_9ip_addr_tEPKc(ptr noundef nonnull align 8 dereferenceable(13) %0, ptr nocapture noundef writeonly %1, ptr noundef %2) local_unnamed_addr #5 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca %struct.addrinfo, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #8
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %6, i8 0, i64 40, i1 false)
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = tail call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t4ipv6Ev(ptr noundef nonnull align 1 dereferenceable(5) %7)
  %9 = select i1 %8, i32 10, i32 2
  %10 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %9, ptr %10, align 4, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 1, ptr %11, align 8, !tbaa !12
  store i32 0, ptr %5, align 8, !tbaa !13
  %12 = tail call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t8bindableEv(ptr noundef nonnull align 1 dereferenceable(5) %7)
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  store i32 1, ptr %5, align 8, !tbaa !13
  br label %14

14:                                               ; preds = %13, %3
  %15 = phi i32 [ 1, %13 ], [ 0, %3 ]
  %16 = tail call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t9allow_dnsEv(ptr noundef nonnull align 1 dereferenceable(5) %7)
  %17 = xor i1 %16, true
  %18 = or i1 %8, %17
  br i1 %18, label %19, label %23

19:                                               ; preds = %14
  %20 = or disjoint i32 %15, 4
  %21 = select i1 %16, i32 %15, i32 %20
  %22 = or disjoint i32 %21, 8
  %simplifycfg.merge = select i1 %8, i32 %22, i32 %21
  store i32 %simplifycfg.merge, ptr %5, align 8, !tbaa !13
  br label %23

23:                                               ; preds = %14, %19
  %24 = load ptr, ptr %0, align 8, !tbaa !14
  %25 = load ptr, ptr %24, align 8
  %26 = call noundef i32 %25(ptr noundef nonnull align 8 dereferenceable(13) %0, ptr noundef %2, ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %4)
  %27 = icmp eq i32 %26, -1
  br i1 %27, label %28, label %36

28:                                               ; preds = %23
  %29 = load i32, ptr %5, align 8, !tbaa !13
  %30 = and i32 %29, 8
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %.thread, label %31

31:                                               ; preds = %28
  %32 = and i32 %29, -9
  store i32 %32, ptr %5, align 8, !tbaa !13
  %33 = load ptr, ptr %0, align 8, !tbaa !14
  %34 = load ptr, ptr %33, align 8
  %35 = call noundef i32 %34(ptr noundef nonnull align 8 dereferenceable(13) %0, ptr noundef %2, ptr noundef null, ptr noundef nonnull %5, ptr noundef nonnull %4)
  br label %36

36:                                               ; preds = %31, %23
  %.0 = phi i32 [ %35, %31 ], [ %26, %23 ]
  switch i32 %.0, label %.thread [
    i32 0, label %43
    i32 -10, label %37
  ]

37:                                               ; preds = %36
  %38 = tail call ptr @__errno_location() #9
  store i32 12, ptr %38, align 4, !tbaa !16
  br label %69

.thread:                                          ; preds = %28, %36
  %39 = call noundef zeroext i1 @_ZN3zmq21ip_resolver_options_t8bindableEv(ptr noundef nonnull align 1 dereferenceable(5) %7)
  %40 = tail call ptr @__errno_location() #9
  br i1 %39, label %41, label %42

41:                                               ; preds = %.thread
  store i32 19, ptr %40, align 4, !tbaa !16
  br label %69

42:                                               ; preds = %.thread
  store i32 22, ptr %40, align 4, !tbaa !16
  br label %69

43:                                               ; preds = %36
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %.not10 = icmp eq ptr %44, null
  br i1 %.not10, label %45, label %50, !prof !17

45:                                               ; preds = %43
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 370) #10
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call i32 @fflush(ptr noundef %48)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.6)
  %.pre = load ptr, ptr %4, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %43, %45
  %51 = phi ptr [ %44, %43 ], [ %.pre, %45 ]
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load i32, ptr %52, align 8, !tbaa !18
  %54 = icmp ugt i32 %53, 28
  br i1 %54, label %55, label %60, !prof !17

55:                                               ; preds = %50
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 371) #10
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = call i32 @fflush(ptr noundef %58)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.7)
  %.pre12 = load ptr, ptr %4, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre12, i64 16
  %.pre13 = load i32, ptr %.phi.trans.insert, align 8, !tbaa !18
  br label %60

60:                                               ; preds = %55, %50
  %61 = phi i32 [ %.pre13, %55 ], [ %53, %50 ]
  %62 = phi ptr [ %.pre12, %55 ], [ %51, %50 ]
  %63 = getelementptr inbounds i8, ptr %62, i64 24
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = zext i32 %61 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %1, ptr align 2 %64, i64 %65, i1 false)
  %66 = load ptr, ptr %0, align 8, !tbaa !14
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load ptr, ptr %67, align 8
  call void %68(ptr noundef nonnull align 8 dereferenceable(13) %0, ptr noundef nonnull %62)
  br label %69

69:                                               ; preds = %37, %42, %41, %60
  %.07 = phi i32 [ 0, %60 ], [ -1, %41 ], [ -1, %42 ], [ -1, %37 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  ret i32 %.07
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #6

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { cold nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS8addrinfo", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !11, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!18 = !{!10, !11, i64 16}
!19 = !{!10, !6, i64 24}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass