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

; 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::v1_decoder_t" = type { %"class.zmq::decoder_base_t", [8 x i8], %"class.zmq::msg_t", i64 }
%"class.zmq::decoder_base_t" = type { %"class.zmq::i_decoder", { i64, i64 }, ptr, i64, %"class.zmq::c_single_allocator", ptr }
%"class.zmq::i_decoder" = type { ptr }
%"class.zmq::c_single_allocator" = type { i64, ptr }
%"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 global ptr, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN3zmq12v1_decoder_t21eight_byte_size_readyEPKh = external hidden unnamed_addr constant [68 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

declare noundef i32 @_ZN3zmq5msg_t4initEv(ptr noundef nonnull align 8 dereferenceable(64)) #1

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

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

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

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

declare i32 @fflush(ptr noundef) #1

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3zmq14decoder_base_tINS_12v1_decoder_tENS_18c_single_allocatorEE9next_stepEPvmMS1_FiPKhE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, i64 noundef, i64, i64) #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3zmq12v1_decoder_t21eight_byte_size_readyEPKh(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %1) #6 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca { i64, i64 }, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %14 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 1
  %15 = getelementptr inbounds [8 x i8], ptr %14, i64 0, i64 0
  %16 = call noundef i64 @_ZN3zmq10get_uint64EPKh(ptr noundef %15)
  store i64 %16, ptr %6, align 8, !tbaa !9
  %17 = load i64, ptr %6, align 8, !tbaa !9
  %18 = icmp eq i64 %17, 0
  br i1 %18, label %19, label %21

19:                                               ; preds = %2
  %20 = call ptr @__errno_location() #10
  store i32 71, ptr %20, align 4, !tbaa !11
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %109

21:                                               ; preds = %2
  %22 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 3
  %23 = load i64, ptr %22, align 8, !tbaa !13
  %24 = icmp sge i64 %23, 0
  br i1 %24, label %25, label %33

25:                                               ; preds = %21
  %26 = load i64, ptr %6, align 8, !tbaa !9
  %27 = sub i64 %26, 1
  %28 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 3
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = icmp ugt i64 %27, %29
  br i1 %30, label %31, label %33

31:                                               ; preds = %25
  %32 = call ptr @__errno_location() #10
  store i32 90, ptr %32, align 4, !tbaa !11
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %109

33:                                               ; preds = %25, %21
  %34 = load i64, ptr %6, align 8, !tbaa !9
  %35 = sub i64 %34, 1
  %36 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #9
  %37 = icmp ugt i64 %35, %36
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = call ptr @__errno_location() #10
  store i32 90, ptr %39, align 4, !tbaa !11
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %109

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %41 = load i64, ptr %6, align 8, !tbaa !9
  %42 = sub i64 %41, 1
  store i64 %42, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %43 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 2
  %44 = call noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64) %43)
  store i32 %44, ptr %9, align 4, !tbaa !11
  %45 = load i32, ptr %9, align 4, !tbaa !11
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %40
  br label %50

48:                                               ; preds = %40
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 125, ptr noundef @__PRETTY_FUNCTION__._ZN3zmq12v1_decoder_t21eight_byte_size_readyEPKh) #11
  unreachable

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49, %47
  %51 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 2
  %52 = load i64, ptr %8, align 8, !tbaa !9
  %53 = call noundef i32 @_ZN3zmq5msg_t9init_sizeEm(ptr noundef nonnull align 8 dereferenceable(64) %51, i64 noundef %52)
  store i32 %53, ptr %9, align 4, !tbaa !11
  %54 = load i32, ptr %9, align 4, !tbaa !11
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %101

56:                                               ; preds = %50
  br label %57

57:                                               ; preds = %56
  %58 = call ptr @__errno_location() #10
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = icmp eq i32 %59, 12
  %61 = xor i1 %60, true
  %62 = zext i1 %61 to i64
  %63 = call i64 @llvm.expect.i64(i64 %62, i64 0)
  %64 = icmp ne i64 %63, 0
  br i1 %64, label %65, label %75

65:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %66 = call ptr @__errno_location() #10
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = call ptr @strerror(i32 noundef %67) #9
  store ptr %68, ptr %10, align 8, !tbaa !5
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str, ptr noundef %70, ptr noundef @.str.1, i32 noundef 128) #9
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 @fflush(ptr noundef %72)
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef %74)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %75

75:                                               ; preds = %65, %57
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  %78 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 2
  %79 = call noundef i32 @_ZN3zmq5msg_t4initEv(ptr noundef nonnull align 8 dereferenceable(64) %78)
  store i32 %79, ptr %9, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %77
  %81 = load i32, ptr %9, align 4, !tbaa !11
  %82 = icmp eq i32 %81, 0
  %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 %97

87:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %88 = call ptr @__errno_location() #10
  %89 = load i32, ptr %88, align 4, !tbaa !11
  %90 = call ptr @strerror(i32 noundef %89) #9
  store ptr %90, ptr %11, align 8, !tbaa !5
  %91 = load ptr, ptr @stderr, align 8, !tbaa !5
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str, ptr noundef %92, ptr noundef @.str.1, i32 noundef 130) #9
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 @fflush(ptr noundef %94)
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef %96)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %97

97:                                               ; preds = %87, %80
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  %100 = call ptr @__errno_location() #10
  store i32 12, ptr %100, align 4, !tbaa !11
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %108

101:                                              ; preds = %50
  %102 = getelementptr inbounds %"class.zmq::v1_decoder_t", ptr %13, i32 0, i32 1
  %103 = getelementptr inbounds [8 x i8], ptr %102, i64 0, i64 0
  store { i64, i64 } { i64 ptrtoint (ptr @_ZN3zmq12v1_decoder_t11flags_readyEPKh to i64), i64 0 }, ptr %12, align 8, !tbaa !19
  %104 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %105 = load i64, ptr %104, align 8
  %106 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %107 = load i64, ptr %106, align 8
  call void @_ZN3zmq14decoder_base_tINS_12v1_decoder_tENS_18c_single_allocatorEE9next_stepEPvmMS1_FiPKhE(ptr noundef nonnull align 8 dereferenceable(64) %13, ptr noundef %103, i64 noundef 1, i64 %105, i64 %107)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %108

108:                                              ; preds = %101, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %109

109:                                              ; preds = %108, %38, %31, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %110 = load i32, ptr %3, align 4
  ret i32 %110
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

declare noundef i32 @_ZN3zmq5msg_t9init_sizeEm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3zmq12v1_decoder_t11flags_readyEPKh(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3zmq10get_uint64EPKh(ptr noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(none) }
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 = { 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 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 #6 = { 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 #7 = { noreturn 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 = { inlinehint 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { noreturn 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 136}
!14 = !{!"_ZTSN3zmq12v1_decoder_tE", !15, i64 0, !7, i64 64, !18, i64 72, !10, i64 136}
!15 = !{!"_ZTSN3zmq14decoder_base_tINS_12v1_decoder_tENS_18c_single_allocatorEEE", !16, i64 0, !7, i64 8, !6, i64 24, !10, i64 32, !17, i64 40, !6, i64 56}
!16 = !{!"_ZTSN3zmq9i_decoderE"}
!17 = !{!"_ZTSN3zmq18c_single_allocatorE", !10, i64 0, !6, i64 8}
!18 = !{!"_ZTSN3zmq5msg_tE", !7, i64 0}
!19 = !{!7, !7, i64 0}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@__PRETTY_FUNCTION__._ZN3zmq12v1_decoder_t21eight_byte_size_readyEPKh = external hidden unnamed_addr constant [68 x i8], align 1

declare noundef i32 @_ZN3zmq5msg_t4initEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #0

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

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

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

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

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3zmq14decoder_base_tINS_12v1_decoder_tENS_18c_single_allocatorEE9next_stepEPvmMS1_FiPKhE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, i64 noundef, i64, i64) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 1) i32 @_ZN3zmq12v1_decoder_t21eight_byte_size_readyEPKh(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr nocapture noundef readnone %1) local_unnamed_addr #5 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  %4 = tail call noundef i64 @_ZN3zmq10get_uint64EPKh(ptr noundef nonnull %3)
  %5 = icmp eq i64 %4, 0
  br i1 %5, label %6, label %8

6:                                                ; preds = %2
  %7 = tail call ptr @__errno_location() #8
  store i32 71, ptr %7, align 4, !tbaa !5
  br label %48

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 136
  %10 = load i64, ptr %9, align 8, !tbaa !9
  %11 = icmp sgt i64 %10, -1
  %12 = add i64 %4, -1
  %13 = icmp ugt i64 %12, %10
  %or.cond = and i1 %11, %13
  br i1 %or.cond, label %14, label %16

14:                                               ; preds = %8
  %15 = tail call ptr @__errno_location() #8
  store i32 90, ptr %15, align 4, !tbaa !5
  br label %48

16:                                               ; preds = %8
  %17 = tail call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #9
  %18 = icmp ugt i64 %12, %17
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  %20 = tail call ptr @__errno_location() #8
  store i32 90, ptr %20, align 4, !tbaa !5
  br label %48

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = tail call noundef i32 @_ZN3zmq5msg_t5closeEv(ptr noundef nonnull align 8 dereferenceable(64) %22)
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 125, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3zmq12v1_decoder_t21eight_byte_size_readyEPKh) #10
  unreachable

26:                                               ; preds = %21
  %27 = tail call noundef i32 @_ZN3zmq5msg_t9init_sizeEm(ptr noundef nonnull align 8 dereferenceable(64) %22, i64 noundef %12)
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %47, label %28

28:                                               ; preds = %26
  %29 = tail call ptr @__errno_location() #8
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %.not16 = icmp eq i32 %30, 12
  br i1 %.not16, label %37, label %31, !prof !17

31:                                               ; preds = %28
  %32 = tail call ptr @strerror(i32 noundef %30) #9
  %33 = load ptr, ptr @stderr, align 8, !tbaa !18
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str, ptr noundef %32, ptr noundef nonnull @.str.1, i32 noundef 128) #11
  %35 = load ptr, ptr @stderr, align 8, !tbaa !18
  %36 = tail call i32 @fflush(ptr noundef %35)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef %32)
  br label %37

37:                                               ; preds = %31, %28
  %38 = tail call noundef i32 @_ZN3zmq5msg_t4initEv(ptr noundef nonnull align 8 dereferenceable(64) %22)
  %.not17 = icmp eq i32 %38, 0
  br i1 %.not17, label %46, label %39, !prof !17

39:                                               ; preds = %37
  %40 = load i32, ptr %29, align 4, !tbaa !5
  %41 = tail call ptr @strerror(i32 noundef %40) #9
  %42 = load ptr, ptr @stderr, align 8, !tbaa !18
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str, ptr noundef %41, ptr noundef nonnull @.str.1, i32 noundef 130) #11
  %44 = load ptr, ptr @stderr, align 8, !tbaa !18
  %45 = tail call i32 @fflush(ptr noundef %44)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef %41)
  br label %46

46:                                               ; preds = %39, %37
  store i32 12, ptr %29, align 4, !tbaa !5
  br label %48

47:                                               ; preds = %26
  tail call void @_ZN3zmq14decoder_base_tINS_12v1_decoder_tENS_18c_single_allocatorEE9next_stepEPvmMS1_FiPKhE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull %3, i64 noundef 1, i64 ptrtoint (ptr @_ZN3zmq12v1_decoder_t11flags_readyEPKh to i64), i64 0)
  br label %48

48:                                               ; preds = %46, %47, %19, %14, %6
  %.1 = phi i32 [ -1, %6 ], [ -1, %14 ], [ -1, %19 ], [ -1, %46 ], [ 0, %47 ]
  ret i32 %.1
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

declare noundef i32 @_ZN3zmq5msg_t9init_sizeEm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3zmq12v1_decoder_t11flags_readyEPKh(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3zmq10get_uint64EPKh(ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() local_unnamed_addr #4 align 2

attributes #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 #1 = { 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 = { 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 #3 = { 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 #4 = { 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 #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 = { noreturn 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 = { inlinehint 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 #8 = { nounwind willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !14, i64 136}
!10 = !{!"_ZTSN3zmq12v1_decoder_tE", !11, i64 0, !7, i64 64, !16, i64 72, !14, i64 136}
!11 = !{!"_ZTSN3zmq14decoder_base_tINS_12v1_decoder_tENS_18c_single_allocatorEEE", !12, i64 0, !7, i64 8, !13, i64 24, !14, i64 32, !15, i64 40, !13, i64 56}
!12 = !{!"_ZTSN3zmq9i_decoderE"}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN3zmq18c_single_allocatorE", !14, i64 0, !13, i64 8}
!16 = !{!"_ZTSN3zmq5msg_tE", !7, i64 0}
!17 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!18 = !{!13, !13, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass