; LLVM IR from aws/s2n-tls :: tests/testlib (s2n_test_server_client)

; 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.s2n_result = type { i32 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

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

declare i32 @s2n_negotiate(ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_validate_negotiate_result(i1 noundef zeroext, i1 noundef zeroext, 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 uwtable
define dso_local i32 @s2n_negotiate_test_server_and_client_with_early_data(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca %struct.s2n_result, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  %21 = alloca %struct.s2n_result, align 4
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca %struct.s2n_result, align 4
  %25 = alloca i8, align 1
  %26 = alloca %struct.s2n_result, align 4
  %27 = alloca i8, align 1
  %28 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  store i8 0, ptr %15, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  store i8 0, ptr %16, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  store i8 0, ptr %17, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  store i8 0, ptr %18, align 1, !tbaa !13
  br label %29

29:                                               ; preds = %165, %4
  %30 = load i8, ptr %18, align 1, !tbaa !13, !range !15, !noundef !16
  %31 = trunc i8 %30 to i1
  br i1 %31, label %73, label %32

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.s2n_blob, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  store ptr %35, ptr %19, align 8, !tbaa !5
  %36 = load i64, ptr %11, align 8, !tbaa !11
  %37 = icmp ne i64 %36, 0
  br i1 %37, label %38, label %42

38:                                               ; preds = %32
  %39 = load i64, ptr %11, align 8, !tbaa !11
  %40 = load ptr, ptr %19, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 %39
  store ptr %41, ptr %19, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %38, %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load ptr, ptr %19, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.s2n_blob, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !19
  %48 = zext i32 %47 to i64
  %49 = load i64, ptr %11, align 8, !tbaa !11
  %50 = sub nsw i64 %48, %49
  %51 = call i32 @s2n_send_early_data(ptr noundef %43, ptr noundef %44, i64 noundef %50, ptr noundef %13, ptr noundef %10)
  %52 = icmp eq i32 %51, 0
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %20, align 1, !tbaa !13
  %54 = load i64, ptr %13, align 8, !tbaa !11
  %55 = load i64, ptr %11, align 8, !tbaa !11
  %56 = add nsw i64 %55, %54
  store i64 %56, ptr %11, align 8, !tbaa !11
  br label %57

57:                                               ; preds = %42
  %58 = load i8, ptr %20, align 1, !tbaa !13, !range !15, !noundef !16
  %59 = trunc i8 %58 to i1
  %60 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %59, i1 noundef zeroext false, ptr noundef %18)
  %61 = getelementptr inbounds %struct.s2n_result, ptr %21, i32 0, i32 0
  store i32 %60, ptr %61, align 4
  %62 = getelementptr inbounds %struct.s2n_result, ptr %21, i32 0, i32 0
  %63 = load i32, ptr %62, align 4
  %64 = call zeroext i1 @s2n_result_is_ok(i32 %63)
  br i1 %64, label %67, label %65

65:                                               ; preds = %57
  %66 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %66, align 4, !tbaa !20
  store i32 1, ptr %22, align 4
  br label %70

67:                                               ; preds = %57
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  store i32 0, ptr %22, align 4
  br label %70

70:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  %71 = load i32, ptr %22, align 4
  switch i32 %71, label %173 [
    i32 0, label %72
  ]

72:                                               ; preds = %70
  br label %96

73:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #4
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = call i32 @s2n_negotiate(ptr noundef %74, ptr noundef %10)
  %76 = icmp eq i32 %75, 0
  %77 = zext i1 %76 to i8
  store i8 %77, ptr %23, align 1, !tbaa !13
  br label %78

78:                                               ; preds = %73
  %79 = load i8, ptr %23, align 1, !tbaa !13, !range !15, !noundef !16
  %80 = trunc i8 %79 to i1
  %81 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %82 = trunc i8 %81 to i1
  %83 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %80, i1 noundef zeroext %82, ptr noundef %16)
  %84 = getelementptr inbounds %struct.s2n_result, ptr %24, i32 0, i32 0
  store i32 %83, ptr %84, align 4
  %85 = getelementptr inbounds %struct.s2n_result, ptr %24, i32 0, i32 0
  %86 = load i32, ptr %85, align 4
  %87 = call zeroext i1 @s2n_result_is_ok(i32 %86)
  br i1 %87, label %90, label %88

88:                                               ; preds = %78
  %89 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %89, align 4, !tbaa !20
  store i32 1, ptr %22, align 4
  br label %93

90:                                               ; preds = %78
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  store i32 0, ptr %22, align 4
  br label %93

93:                                               ; preds = %92, %88
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #4
  %94 = load i32, ptr %22, align 4
  switch i32 %94, label %173 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95, %72
  %97 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %98 = trunc i8 %97 to i1
  br i1 %98, label %134, label %99

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #4
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.s2n_blob, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load i64, ptr %12, align 8, !tbaa !11
  %105 = getelementptr inbounds i8, ptr %103, i64 %104
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.s2n_blob, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 8, !tbaa !19
  %109 = zext i32 %108 to i64
  %110 = load i64, ptr %12, align 8, !tbaa !11
  %111 = sub nsw i64 %109, %110
  %112 = call i32 @s2n_recv_early_data(ptr noundef %100, ptr noundef %105, i64 noundef %111, ptr noundef %14, ptr noundef %10)
  %113 = icmp eq i32 %112, 0
  %114 = zext i1 %113 to i8
  store i8 %114, ptr %25, align 1, !tbaa !13
  %115 = load i64, ptr %14, align 8, !tbaa !11
  %116 = load i64, ptr %12, align 8, !tbaa !11
  %117 = add nsw i64 %116, %115
  store i64 %117, ptr %12, align 8, !tbaa !11
  br label %118

118:                                              ; preds = %99
  %119 = load i8, ptr %25, align 1, !tbaa !13, !range !15, !noundef !16
  %120 = trunc i8 %119 to i1
  %121 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %120, i1 noundef zeroext false, ptr noundef %17)
  %122 = getelementptr inbounds %struct.s2n_result, ptr %26, i32 0, i32 0
  store i32 %121, ptr %122, align 4
  %123 = getelementptr inbounds %struct.s2n_result, ptr %26, i32 0, i32 0
  %124 = load i32, ptr %123, align 4
  %125 = call zeroext i1 @s2n_result_is_ok(i32 %124)
  br i1 %125, label %128, label %126

126:                                              ; preds = %118
  %127 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %127, align 4, !tbaa !20
  store i32 1, ptr %22, align 4
  br label %131

128:                                              ; preds = %118
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  store i32 0, ptr %22, align 4
  br label %131

131:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #4
  %132 = load i32, ptr %22, align 4
  switch i32 %132, label %173 [
    i32 0, label %133
  ]

133:                                              ; preds = %131
  br label %157

134:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = call i32 @s2n_negotiate(ptr noundef %135, ptr noundef %10)
  %137 = icmp eq i32 %136, 0
  %138 = zext i1 %137 to i8
  store i8 %138, ptr %27, align 1, !tbaa !13
  br label %139

139:                                              ; preds = %134
  %140 = load i8, ptr %27, align 1, !tbaa !13, !range !15, !noundef !16
  %141 = trunc i8 %140 to i1
  %142 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %143 = trunc i8 %142 to i1
  %144 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %141, i1 noundef zeroext %143, ptr noundef %15)
  %145 = getelementptr inbounds %struct.s2n_result, ptr %28, i32 0, i32 0
  store i32 %144, ptr %145, align 4
  %146 = getelementptr inbounds %struct.s2n_result, ptr %28, i32 0, i32 0
  %147 = load i32, ptr %146, align 4
  %148 = call zeroext i1 @s2n_result_is_ok(i32 %147)
  br i1 %148, label %151, label %149

149:                                              ; preds = %139
  %150 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 -1, ptr %150, align 4, !tbaa !20
  store i32 1, ptr %22, align 4
  br label %154

151:                                              ; preds = %139
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152
  store i32 0, ptr %22, align 4
  br label %154

154:                                              ; preds = %153, %149
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  %155 = load i32, ptr %22, align 4
  switch i32 %155, label %173 [
    i32 0, label %156
  ]

156:                                              ; preds = %154
  br label %157

157:                                              ; preds = %156, %133
  br label %158

158:                                              ; preds = %157
  %159 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %160 = trunc i8 %159 to i1
  br i1 %160, label %161, label %165

161:                                              ; preds = %158
  %162 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %163 = trunc i8 %162 to i1
  %164 = xor i1 %163, true
  br label %165

165:                                              ; preds = %161, %158
  %166 = phi i1 [ true, %158 ], [ %164, %161 ]
  br i1 %166, label %29, label %167, !llvm.loop !22

167:                                              ; preds = %165
  %168 = load i64, ptr %12, align 8, !tbaa !11
  %169 = trunc i64 %168 to i32
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.s2n_blob, ptr %170, i32 0, i32 1
  store i32 %169, ptr %171, align 8, !tbaa !19
  %172 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  store i32 0, ptr %172, align 4, !tbaa !20
  store i32 1, ptr %22, align 4
  br label %173

173:                                              ; preds = %167, %154, %131, %93, %70
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %174 = getelementptr inbounds %struct.s2n_result, ptr %5, i32 0, i32 0
  %175 = load i32, ptr %174, align 4
  ret i32 %175
}

declare i32 @s2n_send_early_data(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #1

declare i32 @s2n_recv_early_data(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #1

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 = { inlinehint 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 #3 = { 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 }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !6, i64 0}
!18 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!19 = !{!18, !10, i64 8}
!20 = !{!21, !10, i64 0}
!21 = !{!"", !10, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"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"

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

declare i32 @s2n_negotiate(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_validate_negotiate_result(i1 noundef zeroext, i1 noundef zeroext, ptr noundef) local_unnamed_addr #3

; 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 uwtable
define dso_local noundef i32 @s2n_negotiate_test_server_and_client_with_early_data(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef %3) local_unnamed_addr #3 {
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  store i8 0, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  store i8 0, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  store i8 0, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #4
  store i8 0, ptr %11, align 1, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %2, i64 8
  %13 = getelementptr inbounds i8, ptr %3, i64 8
  br label %14

14:                                               ; preds = %58, %4
  %.033 = phi i64 [ 0, %4 ], [ %.134, %58 ]
  %.0 = phi i64 [ 0, %4 ], [ %.1, %58 ]
  %15 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %29, label %17

17:                                               ; preds = %14
  %18 = load ptr, ptr %2, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %18, i64 %.0
  %20 = load i32, ptr %12, align 8, !tbaa !18
  %21 = zext i32 %20 to i64
  %22 = sub nsw i64 %21, %.0
  %23 = call i32 @s2n_send_early_data(ptr noundef %1, ptr noundef %19, i64 noundef %22, ptr noundef nonnull %6, ptr noundef nonnull %5) #4
  %24 = icmp eq i32 %23, 0
  %25 = load i64, ptr %6, align 8, !tbaa !9
  %26 = add nsw i64 %25, %.0
  %27 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %24, i1 noundef zeroext false, ptr noundef nonnull %11)
  %28 = call zeroext i1 @s2n_result_is_ok(i32 %27)
  br i1 %28, label %36, label %.loopexit

29:                                               ; preds = %14
  %30 = call i32 @s2n_negotiate(ptr noundef %1, ptr noundef nonnull %5) #4
  %31 = icmp eq i32 %30, 0
  %32 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %33 = trunc nuw i8 %32 to i1
  %34 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %31, i1 noundef zeroext %33, ptr noundef nonnull %9)
  %35 = call zeroext i1 @s2n_result_is_ok(i32 %34)
  br i1 %35, label %36, label %.loopexit

36:                                               ; preds = %29, %17
  %.1 = phi i64 [ %.0, %29 ], [ %26, %17 ]
  %37 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %51, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr %3, align 8, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %40, i64 %.033
  %42 = load i32, ptr %13, align 8, !tbaa !18
  %43 = zext i32 %42 to i64
  %44 = sub nsw i64 %43, %.033
  %45 = call i32 @s2n_recv_early_data(ptr noundef %0, ptr noundef %41, i64 noundef %44, ptr noundef nonnull %7, ptr noundef nonnull %5) #4
  %46 = icmp eq i32 %45, 0
  %47 = load i64, ptr %7, align 8, !tbaa !9
  %48 = add nsw i64 %47, %.033
  %49 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %46, i1 noundef zeroext false, ptr noundef nonnull %10)
  %50 = call zeroext i1 @s2n_result_is_ok(i32 %49)
  br i1 %50, label %58, label %.loopexit

51:                                               ; preds = %36
  %52 = call i32 @s2n_negotiate(ptr noundef %0, ptr noundef nonnull %5) #4
  %53 = icmp eq i32 %52, 0
  %54 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %55 = trunc nuw i8 %54 to i1
  %56 = call i32 @s2n_validate_negotiate_result(i1 noundef zeroext %53, i1 noundef zeroext %55, ptr noundef nonnull %8)
  %57 = call zeroext i1 @s2n_result_is_ok(i32 %56)
  br i1 %57, label %58, label %.loopexit

58:                                               ; preds = %39, %51
  %.134 = phi i64 [ %.033, %51 ], [ %48, %39 ]
  %59 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %60 = trunc nuw i8 %59 to i1
  %61 = load i8, ptr %8, align 1, !range !13
  %62 = trunc nuw i8 %61 to i1
  %63 = select i1 %60, i1 %62, i1 false
  br i1 %63, label %64, label %14, !llvm.loop !19

64:                                               ; preds = %58
  %65 = trunc i64 %.134 to i32
  store i32 %65, ptr %13, align 8, !tbaa !18
  br label %.loopexit

.loopexit:                                        ; preds = %29, %51, %39, %17, %64
  %.sroa.032.7 = phi i32 [ 0, %64 ], [ -1, %17 ], [ -1, %39 ], [ -1, %51 ], [ -1, %29 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret i32 %.sroa.032.7
}

declare i32 @s2n_send_early_data(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @s2n_recv_early_data(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { inlinehint 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 #3 = { 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 }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !17, i64 0}
!16 = !{!"s2n_blob", !17, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!16, !6, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass