; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/zeromq/src/pipe.ll (ZN3zmq6pipe_t21process_pipe_term_ackEv)

; 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"

%"class.zmq::msg_t" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { ptr, [34 x i8], i8, i8, [16 x i8], i32 }
%"class.zmq::pipe_t" = type { %"class.zmq::object_t.base", [4 x i8], %"class.zmq::array_item_t.base", [4 x i8], %"class.zmq::array_item_t.base.9", [4 x i8], %"class.zmq::array_item_t.base.11", ptr, ptr, i8, i8, i32, i32, i32, i32, i64, i64, i64, ptr, ptr, i32, i8, [3 x i8], %"struct.zmq::blob_t", i32, i8, [3 x i8], %"struct.zmq::endpoint_uri_pair_t" }
%"class.zmq::object_t.base" = type <{ ptr, ptr, i32 }>
%"class.zmq::array_item_t.base" = type <{ ptr, i32 }>
%"class.zmq::array_item_t.base.9" = type <{ ptr, i32 }>
%"class.zmq::array_item_t.base.11" = type <{ ptr, i32 }>
%"struct.zmq::blob_t" = type <{ ptr, i64, i8, [7 x i8] }>
%"struct.zmq::endpoint_uri_pair_t" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.12 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.12 = type { i64, [8 x i8] }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [52 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 nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #1

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

declare i32 @fflush(ptr noundef) #3

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) #3

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

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

declare noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64)) #3

declare void @_ZN3zmq8object_t18send_pipe_term_ackEPNS_6pipe_tE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3zmq6pipe_t21process_pipe_term_ackEv(ptr noundef nonnull align 8 dereferenceable(264) %0) unnamed_addr #5 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.zmq::msg_t", align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8
  br label %7

7:                                                ; preds = %1
  %8 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 19
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = icmp ne ptr %9, null
  %11 = xor i1 %10, true
  %12 = zext i1 %11 to i64
  %13 = call i64 @llvm.expect.i64(i64 %12, i64 0)
  %14 = icmp ne i64 %13, 0
  br i1 %14, label %15, label %20

15:                                               ; preds = %7
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str.4, ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 357) #6
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = call i32 @fflush(ptr noundef %18)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.14)
  br label %20

20:                                               ; preds = %15, %7
  br label %21

21:                                               ; preds = %20
  %22 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 19
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = load ptr, ptr %23, align 8, !tbaa !24
  %25 = getelementptr inbounds ptr, ptr %24, i64 5
  %26 = load ptr, ptr %25, align 8
  call void %26(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %6)
  %27 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 20
  %28 = load i32, ptr %27, align 8, !tbaa !26
  %29 = icmp eq i32 %28, 4
  br i1 %29, label %30, label %34

30:                                               ; preds = %21
  %31 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 8
  store ptr null, ptr %31, align 8, !tbaa !27
  %32 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 18
  %33 = load ptr, ptr %32, align 8, !tbaa !28
  call void @_ZN3zmq8object_t18send_pipe_term_ackEPNS_6pipe_tE(ptr noundef nonnull align 8 dereferenceable(20) %6, ptr noundef %33)
  br label %56

34:                                               ; preds = %21
  br label %35

35:                                               ; preds = %34
  %36 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 20
  %37 = load i32, ptr %36, align 8, !tbaa !26
  %38 = icmp eq i32 %37, 3
  br i1 %38, label %43, label %39

39:                                               ; preds = %35
  %40 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 20
  %41 = load i32, ptr %40, align 8, !tbaa !26
  %42 = icmp eq i32 %41, 5
  br label %43

43:                                               ; preds = %39, %35
  %44 = phi i1 [ true, %35 ], [ %42, %39 ]
  %45 = xor i1 %44, true
  %46 = zext i1 %45 to i64
  %47 = call i64 @llvm.expect.i64(i64 %46, i64 0)
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %43
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.4, ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 368) #6
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 @fflush(ptr noundef %52)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.15)
  br label %54

54:                                               ; preds = %49, %43
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55, %30
  %57 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 25
  %58 = load i8, ptr %57, align 4, !tbaa !29, !range !30, !noundef !31
  %59 = trunc i8 %58 to i1
  br i1 %59, label %91, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 64, ptr %3) #6
  br label %61

61:                                               ; preds = %89, %60
  %62 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 7
  %63 = load ptr, ptr %62, align 8, !tbaa !32
  %64 = load ptr, ptr %63, align 8, !tbaa !24
  %65 = getelementptr inbounds ptr, ptr %64, i64 6
  %66 = load ptr, ptr %65, align 8
  %67 = call noundef zeroext i1 %66(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef %3)
  br i1 %67, label %68, label %90

68:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %69 = call noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64) %3)
  store i32 %69, ptr %4, align 4, !tbaa !33
  br label %70

70:                                               ; preds = %68
  %71 = load i32, ptr %4, align 4, !tbaa !33
  %72 = icmp eq i32 %71, 0
  %73 = xor i1 %72, true
  %74 = zext i1 %73 to i64
  %75 = call i64 @llvm.expect.i64(i64 %74, i64 0)
  %76 = icmp ne i64 %75, 0
  br i1 %76, label %77, label %87

77:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %78 = call ptr @__errno_location() #7
  %79 = load i32, ptr %78, align 4, !tbaa !33
  %80 = call ptr @strerror(i32 noundef %79) #6
  store ptr %80, ptr %5, align 8, !tbaa !5
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.3, ptr noundef %82, ptr noundef @.str.1, i32 noundef 380) #6
  %84 = load ptr, ptr @stderr, align 8, !tbaa !5
  %85 = call i32 @fflush(ptr noundef %84)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef %86)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %87

87:                                               ; preds = %77, %70
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %61, !llvm.loop !34

90:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 64, ptr %3) #6
  br label %91

91:                                               ; preds = %90, %56
  %92 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 7
  %93 = load ptr, ptr %92, align 8, !tbaa !32
  %94 = icmp eq ptr %93, null
  br i1 %94, label %99, label %95

95:                                               ; preds = %91
  %96 = load ptr, ptr %93, align 8, !tbaa !24
  %97 = getelementptr inbounds ptr, ptr %96, i64 1
  %98 = load ptr, ptr %97, align 8
  call void %98(ptr noundef nonnull align 8 dereferenceable(8) %93) #6
  br label %99

99:                                               ; preds = %95, %91
  %100 = getelementptr inbounds %"class.zmq::pipe_t", ptr %6, i32 0, i32 7
  store ptr null, ptr %100, align 8, !tbaa !32
  %101 = icmp eq ptr %6, null
  br i1 %101, label %106, label %102

102:                                              ; preds = %99
  %103 = load ptr, ptr %6, align 8, !tbaa !24
  %104 = getelementptr inbounds ptr, ptr %103, i64 1
  %105 = load ptr, ptr %104, align 8
  call void %105(ptr noundef nonnull align 8 dereferenceable(264) %6) #6
  br label %106

106:                                              ; preds = %102, %99
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #2 = { 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 #3 = { "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 = { nounwind }
attributes #7 = { 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, !6, i64 144}
!10 = !{!"_ZTSN3zmq6pipe_tE", !11, i64 0, !13, i64 24, !14, i64 40, !15, i64 56, !6, i64 72, !6, i64 80, !16, i64 88, !16, i64 89, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !17, i64 112, !17, i64 120, !17, i64 128, !6, i64 136, !6, i64 144, !18, i64 152, !16, i64 156, !19, i64 160, !12, i64 184, !16, i64 188, !20, i64 192}
!11 = !{!"_ZTSN3zmq8object_tE", !6, i64 8, !12, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN3zmq12array_item_tILi1EEE", !12, i64 8}
!14 = !{!"_ZTSN3zmq12array_item_tILi2EEE", !12, i64 8}
!15 = !{!"_ZTSN3zmq12array_item_tILi3EEE", !12, i64 8}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN3zmq6pipe_tUt_E", !7, i64 0}
!19 = !{!"_ZTSN3zmq6blob_tE", !6, i64 0, !17, i64 8, !16, i64 16}
!20 = !{!"_ZTSN3zmq19endpoint_uri_pair_tE", !21, i64 0, !21, i64 32, !23, i64 64}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !17, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!23 = !{!"_ZTSN3zmq15endpoint_type_tE", !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !8, i64 0}
!26 = !{!10, !18, i64 152}
!27 = !{!10, !6, i64 80}
!28 = !{!10, !6, i64 136}
!29 = !{!10, !16, i64 188}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!10, !6, i64 72}
!33 = !{!12, !12, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; 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"

%"class.zmq::msg_t" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { ptr, [34 x i8], i8, i8, [16 x i8], i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [52 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #3

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

declare noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2

declare void @_ZN3zmq8object_t18send_pipe_term_ackEPNS_6pipe_tE(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3zmq6pipe_t21process_pipe_term_ackEv(ptr noundef nonnull align 8 dereferenceable(264) %0) unnamed_addr #5 align 2 {
  %2 = alloca %"class.zmq::msg_t", align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 144
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %5, label %10, !prof !23

5:                                                ; preds = %1
  %6 = load ptr, ptr @stderr, align 8, !tbaa !24
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 357) #6
  %8 = load ptr, ptr @stderr, align 8, !tbaa !24
  %9 = tail call i32 @fflush(ptr noundef %8)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.14)
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %1, %5
  %11 = phi ptr [ %4, %1 ], [ %.pre, %5 ]
  %12 = load ptr, ptr %11, align 8, !tbaa !25
  %13 = getelementptr inbounds i8, ptr %12, i64 40
  %14 = load ptr, ptr %13, align 8
  tail call void %14(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull %0)
  %15 = getelementptr inbounds i8, ptr %0, i64 152
  %16 = load i32, ptr %15, align 8, !tbaa !27
  switch i32 %16, label %.critedge [
    i32 4, label %17
    i32 3, label %switch.edge
    i32 5, label %switch.edge
  ]

17:                                               ; preds = %10
  %18 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr null, ptr %18, align 8, !tbaa !28
  %19 = getelementptr inbounds i8, ptr %0, i64 136
  %20 = load ptr, ptr %19, align 8, !tbaa !29
  tail call void @_ZN3zmq8object_t18send_pipe_term_ackEPNS_6pipe_tE(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef %20)
  br label %switch.edge

.critedge:                                        ; preds = %10
  %21 = load ptr, ptr @stderr, align 8, !tbaa !24
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 368) #6
  %23 = load ptr, ptr @stderr, align 8, !tbaa !24
  %24 = tail call i32 @fflush(ptr noundef %23)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.15)
  br label %switch.edge

switch.edge:                                      ; preds = %10, %10, %.critedge, %17
  %25 = getelementptr inbounds i8, ptr %0, i64 188
  %26 = load i8, ptr %25, align 4, !tbaa !30, !range !31, !noundef !32
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %50, label %28

28:                                               ; preds = %switch.edge
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #7
  %29 = getelementptr inbounds i8, ptr %0, i64 72
  %30 = load ptr, ptr %29, align 8, !tbaa !33
  %31 = load ptr, ptr %30, align 8, !tbaa !25
  %32 = getelementptr inbounds i8, ptr %31, i64 48
  %33 = load ptr, ptr %32, align 8
  %34 = call noundef zeroext i1 %33(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull %2)
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %28, %44
  %35 = call noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64) %2)
  %.not4 = icmp eq i32 %35, 0
  br i1 %.not4, label %44, label %36, !prof !34

36:                                               ; preds = %.lr.ph
  %37 = tail call ptr @__errno_location() #8
  %38 = load i32, ptr %37, align 4, !tbaa !35
  %39 = call ptr @strerror(i32 noundef %38) #7
  %40 = load ptr, ptr @stderr, align 8, !tbaa !24
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.3, ptr noundef %39, ptr noundef nonnull @.str.1, i32 noundef 380) #6
  %42 = load ptr, ptr @stderr, align 8, !tbaa !24
  %43 = call i32 @fflush(ptr noundef %42)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef %39)
  br label %44

44:                                               ; preds = %36, %.lr.ph
  %45 = load ptr, ptr %29, align 8, !tbaa !33
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  %47 = getelementptr inbounds i8, ptr %46, i64 48
  %48 = load ptr, ptr %47, align 8
  %49 = call noundef zeroext i1 %48(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull %2)
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !36

._crit_edge:                                      ; preds = %44, %28
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #7
  br label %50

50:                                               ; preds = %._crit_edge, %switch.edge
  %51 = getelementptr inbounds i8, ptr %0, i64 72
  %52 = load ptr, ptr %51, align 8, !tbaa !33
  %53 = icmp eq ptr %52, null
  br i1 %53, label %58, label %54

54:                                               ; preds = %50
  %55 = load ptr, ptr %52, align 8, !tbaa !25
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8
  call void %57(ptr noundef nonnull align 8 dereferenceable(8) %52) #7
  br label %58

58:                                               ; preds = %54, %50
  store ptr null, ptr %51, align 8, !tbaa !33
  %59 = load ptr, ptr %0, align 8, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = load ptr, ptr %60, align 8
  call void %61(ptr noundef nonnull align 8 dereferenceable(264) %0) #7
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 #3 = { 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 #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 = { cold nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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, !8, i64 144}
!6 = !{!"_ZTSN3zmq6pipe_tE", !7, i64 0, !12, i64 24, !13, i64 40, !14, i64 56, !8, i64 72, !8, i64 80, !15, i64 88, !15, i64 89, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !8, i64 136, !8, i64 144, !17, i64 152, !15, i64 156, !18, i64 160, !11, i64 184, !15, i64 188, !19, i64 192}
!7 = !{!"_ZTSN3zmq8object_tE", !8, i64 8, !11, i64 16}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSN3zmq12array_item_tILi1EEE", !11, i64 8}
!13 = !{!"_ZTSN3zmq12array_item_tILi2EEE", !11, i64 8}
!14 = !{!"_ZTSN3zmq12array_item_tILi3EEE", !11, i64 8}
!15 = !{!"bool", !9, i64 0}
!16 = !{!"long", !9, i64 0}
!17 = !{!"_ZTSN3zmq6pipe_tUt_E", !9, i64 0}
!18 = !{!"_ZTSN3zmq6blob_tE", !8, i64 0, !16, i64 8, !15, i64 16}
!19 = !{!"_ZTSN3zmq19endpoint_uri_pair_tE", !20, i64 0, !20, i64 32, !22, i64 64}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !16, i64 8, !9, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !8, i64 0}
!22 = !{!"_ZTSN3zmq15endpoint_type_tE", !9, i64 0}
!23 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!24 = !{!8, !8, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"vtable pointer", !10, i64 0}
!27 = !{!6, !17, i64 152}
!28 = !{!6, !8, i64 80}
!29 = !{!6, !8, i64 136}
!30 = !{!6, !15, i64 188}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!6, !8, i64 72}
!34 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!35 = !{!11, !11, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass