; LLVM IR from RemHero/ReUp-DateBase-Raft :: layer3/ossSocket.ll (ZN10_ossSocket4sendEPKciii)

; 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.timeval = type { i64, i64 }
%struct.fd_set = type { [16 x i64] }
%class._ossSocket = type { i32, i32, i32, %struct.sockaddr_in, %struct.sockaddr_in, i8, i32 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }

@_curPDLevel = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [80 x i8], align 1
@__func__._ZN10_ossSocket4sendEPKciii = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z5pdLog7PDLEVELPKcS1_jS1_z(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10_ossSocket4sendEPKciii(ptr noundef nonnull align 4 dereferenceable(52) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.timeval, align 8
  %15 = alloca %struct.fd_set, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  %19 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %20 = getelementptr inbounds %class._ossSocket, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %21, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #5
  %22 = load i32, ptr %10, align 4, !tbaa !9
  %23 = sdiv i32 %22, 1000000
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds %struct.timeval, ptr %14, i32 0, i32 0
  store i64 %24, ptr %25, align 8, !tbaa !17
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = srem i32 %26, 1000000
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %struct.timeval, ptr %14, i32 0, i32 1
  store i64 %28, ptr %29, align 8, !tbaa !20
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = icmp eq i32 0, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %163

33:                                               ; preds = %5
  br label %34

34:                                               ; preds = %118, %86, %33
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr %15, ptr %18, align 8, !tbaa !5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %47, %36
  %38 = load i32, ptr %17, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = icmp ult i64 %39, 16
  br i1 %40, label %41, label %50

41:                                               ; preds = %37
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.fd_set, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %17, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds [16 x i64], ptr %43, i64 0, i64 %45
  store i64 0, ptr %46, align 8, !tbaa !21
  br label %47

47:                                               ; preds = %41
  %48 = load i32, ptr %17, align 4, !tbaa !9
  %49 = add i32 %48, 1
  store i32 %49, ptr %17, align 4, !tbaa !9
  br label %37, !llvm.loop !22

50:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = getelementptr inbounds %class._ossSocket, ptr %19, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !11
  %55 = srem i32 %54, 64
  %56 = zext i32 %55 to i64
  %57 = shl i64 1, %56
  %58 = getelementptr inbounds %struct.fd_set, ptr %15, i32 0, i32 0
  %59 = getelementptr inbounds %class._ossSocket, ptr %19, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !11
  %61 = sdiv i32 %60, 64
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [16 x i64], ptr %58, i64 0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !21
  %65 = or i64 %64, %57
  store i64 %65, ptr %63, align 8, !tbaa !21
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = icmp sge i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %52
  br label %72

71:                                               ; preds = %52
  br label %72

72:                                               ; preds = %71, %70
  %73 = phi ptr [ %14, %70 ], [ null, %71 ]
  %74 = call i32 @select(i32 noundef %67, ptr noundef null, ptr noundef %15, ptr noundef null, ptr noundef %73)
  store i32 %74, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = icmp eq i32 0, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  store i32 -3, ptr %12, align 4, !tbaa !9
  br label %160

78:                                               ; preds = %72
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = icmp sgt i32 0, %79
  br i1 %80, label %81, label %102

81:                                               ; preds = %78
  %82 = call ptr @__errno_location() #6
  %83 = load i32, ptr %82, align 4, !tbaa !9
  store i32 %83, ptr %12, align 4, !tbaa !9
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = icmp eq i32 4, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %81
  br label %34, !llvm.loop !24

87:                                               ; preds = %81
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  store i32 -6, ptr %12, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr @_curPDLevel, align 4, !tbaa !25
  %92 = icmp sge i32 %91, 1
  br i1 %92, label %93, label %95

93:                                               ; preds = %90
  %94 = load i32, ptr %12, align 4, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) @_Z5pdLog7PDLEVELPKcS1_jS1_z(i32 noundef 1, ptr noundef @__func__._ZN10_ossSocket4sendEPKciii, ptr noundef @.str, i32 noundef 222, ptr noundef @.str.8, i32 noundef %94)
  br label %95

95:                                               ; preds = %93, %90
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  br label %162

98:                                               ; No predecessors!
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101, %78
  %103 = getelementptr inbounds %struct.fd_set, ptr %15, i32 0, i32 0
  %104 = getelementptr inbounds %class._ossSocket, ptr %19, i32 0, i32 0
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = sdiv i32 %105, 64
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [16 x i64], ptr %103, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !21
  %110 = getelementptr inbounds %class._ossSocket, ptr %19, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = srem i32 %111, 64
  %113 = zext i32 %112 to i64
  %114 = shl i64 1, %113
  %115 = and i64 %109, %114
  %116 = icmp ne i64 %115, 0
  br i1 %116, label %117, label %118

117:                                              ; preds = %102
  br label %119

118:                                              ; preds = %102
  br label %34, !llvm.loop !24

119:                                              ; preds = %117
  br label %120

120:                                              ; preds = %151, %119
  %121 = load i32, ptr %9, align 4, !tbaa !9
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %123, label %159

123:                                              ; preds = %120
  %124 = getelementptr inbounds %class._ossSocket, ptr %19, i32 0, i32 0
  %125 = load i32, ptr %124, align 4, !tbaa !11
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = or i32 16384, %129
  %131 = call i64 @send(i32 noundef %125, ptr noundef %126, i64 noundef %128, i32 noundef %130)
  %132 = trunc i64 %131 to i32
  store i32 %132, ptr %12, align 4, !tbaa !9
  %133 = load i32, ptr %12, align 4, !tbaa !9
  %134 = icmp eq i32 -1, %133
  br i1 %134, label %135, label %151

135:                                              ; preds = %123
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  store i32 -6, ptr %12, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr @_curPDLevel, align 4, !tbaa !25
  %140 = icmp sge i32 %139, 1
  br i1 %140, label %141, label %144

141:                                              ; preds = %138
  %142 = call ptr @__errno_location() #6
  %143 = load i32, ptr %142, align 4, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) @_Z5pdLog7PDLEVELPKcS1_jS1_z(i32 noundef 1, ptr noundef @__func__._ZN10_ossSocket4sendEPKciii, ptr noundef @.str, i32 noundef 237, ptr noundef @.str.9, i32 noundef %143)
  br label %144

144:                                              ; preds = %141, %138
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  br label %162

147:                                              ; No predecessors!
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150, %123
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = load i32, ptr %9, align 4, !tbaa !9
  %154 = sub nsw i32 %153, %152
  store i32 %154, ptr %9, align 4, !tbaa !9
  %155 = load i32, ptr %12, align 4, !tbaa !9
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = sext i32 %155 to i64
  %158 = getelementptr inbounds i8, ptr %156, i64 %157
  store ptr %158, ptr %8, align 8, !tbaa !5
  br label %120, !llvm.loop !27

159:                                              ; preds = %120
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %162, %159, %77
  %161 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %161, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %163

162:                                              ; preds = %146, %97
  br label %160

163:                                              ; preds = %160, %32
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %164 = load i32, ptr %6, align 4
  ret i32 %164
}

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i64 @send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { "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 = { nounwind }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS10_ossSocket", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 12, !13, i64 28, !16, i64 44, !10, i64 48}
!13 = !{!"_ZTS11sockaddr_in", !14, i64 0, !14, i64 2, !15, i64 4, !7, i64 8}
!14 = !{!"short", !7, i64 0}
!15 = !{!"_ZTS7in_addr", !10, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTS7timeval", !19, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!18, !19, i64 8}
!21 = !{!19, !19, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!26, !26, i64 0}
!26 = !{!"_ZTS7PDLEVEL", !7, i64 0}
!27 = distinct !{!27, !23}


; 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.timeval = type { i64, i64 }
%struct.fd_set = type { [16 x i64] }

@_curPDLevel = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [80 x i8], align 1
@__func__._ZN10_ossSocket4sendEPKciii = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z5pdLog7PDLEVELPKcS1_jS1_z(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -6, 1) i32 @_ZN10_ossSocket4sendEPKciii(ptr nocapture noundef nonnull readonly align 4 dereferenceable(52) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 align 2 {
  %6 = alloca %struct.timeval, align 8
  %7 = alloca %struct.fd_set, align 8
  %8 = load i32, ptr %0, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #6
  %9 = sdiv i32 %3, 1000000
  %10 = sext i32 %9 to i64
  store i64 %10, ptr %6, align 8, !tbaa !14
  %11 = srem i32 %3, 1000000
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %12, ptr %13, align 8, !tbaa !17
  %14 = icmp eq i32 %2, 0
  br i1 %14, label %.loopexit, label %.preheader31

.preheader31:                                     ; preds = %5
  %15 = add nsw i32 %8, 1
  %16 = icmp sgt i32 %3, -1
  %17 = select i1 %16, ptr %6, ptr null
  br label %.backedge

.backedge:                                        ; preds = %.backedge.backedge, %.preheader31
  %18 = phi i32 [ %8, %.preheader31 ], [ %.be, %.backedge.backedge ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %7, i8 0, i64 128, i1 false), !tbaa !18
  %19 = srem i32 %18, 64
  %20 = zext nneg i32 %19 to i64
  %21 = shl nuw i64 1, %20
  %22 = sdiv i32 %18, 64
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %23
  %25 = load i64, ptr %24, align 8, !tbaa !18
  %26 = or i64 %21, %25
  store i64 %26, ptr %24, align 8, !tbaa !18
  %27 = call i32 @select(i32 noundef %15, ptr noundef null, ptr noundef nonnull %7, ptr noundef null, ptr noundef %17)
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %.loopexit, label %29

29:                                               ; preds = %.backedge
  %30 = icmp slt i32 %27, 0
  br i1 %30, label %31, label %39

31:                                               ; preds = %29
  %32 = tail call ptr @__errno_location() #7
  %33 = load i32, ptr %32, align 4, !tbaa !19
  %34 = icmp eq i32 %33, 4
  br i1 %34, label %..backedge_crit_edge, label %35

..backedge_crit_edge:                             ; preds = %31
  %.pre.pre = load i32, ptr %0, align 4, !tbaa !5
  br label %.backedge.backedge

.backedge.backedge:                               ; preds = %..backedge_crit_edge, %39
  %.be = phi i32 [ %.pre.pre, %..backedge_crit_edge ], [ %40, %39 ]
  br label %.backedge, !llvm.loop !20

35:                                               ; preds = %31
  %36 = load i32, ptr @_curPDLevel, align 4, !tbaa !22
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %.loopexit

38:                                               ; preds = %35
  call void (i32, ptr, ptr, i32, ptr, ...) @_Z5pdLog7PDLEVELPKcS1_jS1_z(i32 noundef 1, ptr noundef nonnull @__func__._ZN10_ossSocket4sendEPKciii, ptr noundef nonnull @.str, i32 noundef 222, ptr noundef nonnull @.str.8, i32 noundef -6)
  br label %.loopexit

39:                                               ; preds = %29
  %40 = load i32, ptr %0, align 4, !tbaa !5
  %41 = sdiv i32 %40, 64
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !18
  %45 = srem i32 %40, 64
  %46 = zext nneg i32 %45 to i64
  %47 = shl nuw i64 1, %46
  %48 = and i64 %47, %44
  %.not = icmp eq i64 %48, 0
  br i1 %.not, label %.backedge.backedge, label %.preheader

.preheader:                                       ; preds = %39
  %49 = icmp sgt i32 %2, 0
  br i1 %49, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %50 = or i32 %4, 16384
  br label %51

51:                                               ; preds = %.lr.ph, %63
  %.02535 = phi ptr [ %1, %.lr.ph ], [ %66, %63 ]
  %.02734 = phi i32 [ %2, %.lr.ph ], [ %64, %63 ]
  %52 = load i32, ptr %0, align 4, !tbaa !5
  %53 = zext nneg i32 %.02734 to i64
  %54 = call i64 @send(i32 noundef %52, ptr noundef %.02535, i64 noundef %53, i32 noundef %50)
  %55 = trunc i64 %54 to i32
  %56 = icmp eq i32 %55, -1
  br i1 %56, label %57, label %63

57:                                               ; preds = %51
  %58 = load i32, ptr @_curPDLevel, align 4, !tbaa !22
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %60, label %.loopexit

60:                                               ; preds = %57
  %61 = tail call ptr @__errno_location() #7
  %62 = load i32, ptr %61, align 4, !tbaa !19
  call void (i32, ptr, ptr, i32, ptr, ...) @_Z5pdLog7PDLEVELPKcS1_jS1_z(i32 noundef 1, ptr noundef nonnull @__func__._ZN10_ossSocket4sendEPKciii, ptr noundef nonnull @.str, i32 noundef 237, ptr noundef nonnull @.str.9, i32 noundef %62)
  br label %.loopexit

63:                                               ; preds = %51
  %64 = sub nsw i32 %.02734, %55
  %sext = shl i64 %54, 32
  %65 = ashr exact i64 %sext, 32
  %66 = getelementptr inbounds i8, ptr %.02535, i64 %65
  %67 = icmp sgt i32 %64, 0
  br i1 %67, label %51, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %.backedge, %63, %.preheader, %57, %60, %35, %38, %5
  %.0 = phi i32 [ 0, %5 ], [ -6, %38 ], [ -6, %35 ], [ -6, %60 ], [ -6, %57 ], [ 0, %.preheader ], [ 0, %63 ], [ -3, %.backedge ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  ret i32 %.0
}

declare i32 @select(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i64 @send(i32 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #4

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !7, i64 0}
!6 = !{!"_ZTS10_ossSocket", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 12, !10, i64 28, !13, i64 44, !7, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS11sockaddr_in", !11, i64 0, !11, i64 2, !12, i64 4, !8, i64 8}
!11 = !{!"short", !8, i64 0}
!12 = !{!"_ZTS7in_addr", !7, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTS7timeval", !16, i64 0, !16, i64 8}
!16 = !{!"long", !8, i64 0}
!17 = !{!15, !16, i64 8}
!18 = !{!16, !16, i64 0}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTS7PDLEVEL", !8, i64 0}
!24 = distinct !{!24, !21}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass