; LLVM IR from devicehive/esp8266-firmware :: esp-utils/esp-flasher.ll (Z9flash_memP10SerialPortPhjj)

; 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.ESP_REQUEST_HEADER = type { i8, i8, i16, i32 }

@.str.6 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1

declare i32 @printf(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: mustprogress uwtable
declare dso_local noundef i32 @_Z12esp_checksumPvj(ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17__uint32_identityj(i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z10flash_sendP10SerialPortP18ESP_REQUEST_HEADERPvb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z11flash_startP10SerialPortjjj(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL17__uint16_identityt(i16 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9flash_memP10SerialPortPhjj(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) #2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.ESP_REQUEST_HEADER, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [1040 x i8], align 16
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  %18 = load i32, ptr %8, align 4, !tbaa !9
  %19 = urem i32 %18, 4096
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %25, label %21

21:                                               ; preds = %4
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = urem i32 %22, 4096
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %28

25:                                               ; preds = %21, %4
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %26)
  store i1 false, ptr %5, align 1
  br label %125

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = uitofp i32 %29 to double
  %31 = fdiv double %30, 1.024000e+03
  %32 = call double @llvm.ceil.f64(double %31)
  %33 = fptoui double %32 to i32
  store i32 %33, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = call noundef zeroext i1 @_Z11flash_startP10SerialPortjjj(ptr noundef %34, i32 noundef %35, i32 noundef %36, i32 noundef %37)
  br i1 %38, label %41, label %39

39:                                               ; preds = %28
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %124

41:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %114, %41
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = icmp ult i32 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  store i32 2, ptr %12, align 4
  br label %117

47:                                               ; preds = %42
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = mul i32 1024, %51
  %53 = add i32 %50, %52
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %48, i32 noundef %49, i32 noundef %53)
  call void @llvm.lifetime.start.p0(i64 1040, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %55 = getelementptr inbounds [1040 x i8], ptr %14, i64 0, i64 16
  store ptr %55, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %56 = getelementptr inbounds [1040 x i8], ptr %14, i64 0, i64 0
  store ptr %56, ptr %16, align 8, !tbaa !5
  %57 = call noundef i32 @_ZL17__uint32_identityj(i32 noundef 1024)
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  %59 = getelementptr inbounds i32, ptr %58, i64 0
  store i32 %57, ptr %59, align 4, !tbaa !9
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = call noundef i32 @_ZL17__uint32_identityj(i32 noundef %60)
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = getelementptr inbounds i32, ptr %62, i64 1
  store i32 %61, ptr %63, align 4, !tbaa !9
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = getelementptr inbounds i32, ptr %64, i64 2
  store i32 0, ptr %65, align 4, !tbaa !9
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = getelementptr inbounds i32, ptr %66, i64 3
  store i32 0, ptr %67, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = mul i32 %69, 1024
  %71 = sub i32 %68, %70
  store i32 %71, ptr %17, align 4, !tbaa !9
  %72 = load i32, ptr %17, align 4, !tbaa !9
  %73 = icmp ult i32 %72, 1024
  br i1 %73, label %74, label %90

74:                                               ; preds = %47
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = mul i32 %77, 1024
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %76, i64 %79
  %81 = load i32, ptr %17, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %75, ptr align 1 %80, i64 %82, i1 false)
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = load i32, ptr %17, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds i8, ptr %83, i64 %85
  %87 = load i32, ptr %17, align 4, !tbaa !9
  %88 = sub i32 1024, %87
  %89 = zext i32 %88 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %86, i8 -1, i64 %89, i1 false)
  br label %97

90:                                               ; preds = %47
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = mul i32 %93, 1024
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %92, i64 %95
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %91, ptr align 1 %96, i64 1024, i1 false)
  br label %97

97:                                               ; preds = %90, %74
  %98 = getelementptr inbounds %struct.ESP_REQUEST_HEADER, ptr %11, i32 0, i32 0
  store i8 0, ptr %98, align 4, !tbaa !11
  %99 = getelementptr inbounds %struct.ESP_REQUEST_HEADER, ptr %11, i32 0, i32 1
  store i8 3, ptr %99, align 1, !tbaa !14
  %100 = call noundef zeroext i16 @_ZL17__uint16_identityt(i16 noundef zeroext 1040)
  %101 = getelementptr inbounds %struct.ESP_REQUEST_HEADER, ptr %11, i32 0, i32 2
  store i16 %100, ptr %101, align 2, !tbaa !15
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = call noundef i32 @_Z12esp_checksumPvj(ptr noundef %102, i32 noundef 1024)
  %104 = getelementptr inbounds %struct.ESP_REQUEST_HEADER, ptr %11, i32 0, i32 3
  store i32 %103, ptr %104, align 4, !tbaa !16
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds [1040 x i8], ptr %14, i64 0, i64 0
  %107 = call noundef zeroext i1 @_Z10flash_sendP10SerialPortP18ESP_REQUEST_HEADERPvb(ptr noundef %105, ptr noundef %11, ptr noundef %106, i1 noundef zeroext true)
  br i1 %107, label %110, label %108

108:                                              ; preds = %97
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %111

110:                                              ; preds = %97
  store i32 0, ptr %12, align 4
  br label %111

111:                                              ; preds = %110, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1040, ptr %14) #7
  %112 = load i32, ptr %12, align 4
  switch i32 %112, label %117 [
    i32 0, label %113
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = add i32 %115, 1
  store i32 %116, ptr %13, align 4, !tbaa !9
  br label %42, !llvm.loop !17

117:                                              ; preds = %111, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %118 = load i32, ptr %12, align 4
  switch i32 %118, label %124 [
    i32 2, label %119
  ]

119:                                              ; preds = %117
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %120, i32 noundef %121, i32 noundef %122)
  store i1 true, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %124

124:                                              ; preds = %119, %117, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %125

125:                                              ; preds = %124, %25
  %126 = load i1, ptr %5, align 1
  ret i1 %126
}

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_ZTS18ESP_REQUEST_HEADER", !7, i64 0, !7, i64 1, !13, i64 2, !10, i64 4}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !7, i64 1}
!15 = !{!12, !13, i64 2}
!16 = !{!12, !10, i64 4}
!17 = distinct !{!17, !18}
!18 = !{!"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"

%struct.ESP_REQUEST_HEADER = type { i8, i8, i16, i32 }

@.str.6 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) 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 uwtable
declare dso_local noundef i32 @_Z12esp_checksumPvj(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL17__uint32_identityj(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z10flash_sendP10SerialPortP18ESP_REQUEST_HEADERPvb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z11flash_startP10SerialPortjjj(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i16 @_ZL17__uint16_identityt(i16 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9flash_memP10SerialPortPhjj(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.ESP_REQUEST_HEADER, align 4
  %6 = alloca [1040 x i8], align 16
  %7 = or i32 %3, %2
  %8 = and i32 %7, 4095
  %or.cond = icmp eq i32 %8, 0
  br i1 %or.cond, label %11, label %9

9:                                                ; preds = %4
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %2)
  br label %51

11:                                               ; preds = %4
  %12 = uitofp i32 %2 to double
  %13 = fmul double %12, 0x3F50000000000000
  %14 = tail call double @llvm.ceil.f64(double %13)
  %15 = fptoui double %14 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %16 = tail call noundef zeroext i1 @_Z11flash_startP10SerialPortjjj(ptr noundef %0, i32 noundef %15, i32 noundef %2, i32 noundef %3)
  br i1 %16, label %.preheader, label %24

.preheader:                                       ; preds = %11
  %.not4750.not = icmp eq i32 %15, 0
  br i1 %.not4750.not, label %.critedge49, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %17 = getelementptr inbounds i8, ptr %6, i64 16
  %18 = getelementptr inbounds i8, ptr %6, i64 4
  %19 = getelementptr inbounds i8, ptr %6, i64 8
  %20 = getelementptr inbounds i8, ptr %6, i64 12
  %21 = getelementptr inbounds i8, ptr %5, i64 1
  %22 = getelementptr inbounds i8, ptr %5, i64 2
  %23 = getelementptr inbounds i8, ptr %5, i64 4
  %wide.trip.count = zext i32 %15 to i64
  br label %26

24:                                               ; preds = %11
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %50

26:                                               ; preds = %.lr.ph, %.critedge
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %.critedge ]
  %27 = trunc nuw i64 %indvars.iv to i32
  %28 = shl i32 %27, 10
  %29 = add i32 %28, %3
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %27, i32 noundef %15, i32 noundef %29)
  call void @llvm.lifetime.start.p0(i64 1040, ptr nonnull %6) #7
  %31 = call noundef i32 @_ZL17__uint32_identityj(i32 noundef 1024)
  store i32 %31, ptr %6, align 16, !tbaa !5
  %32 = call noundef i32 @_ZL17__uint32_identityj(i32 noundef %27)
  store i32 %32, ptr %18, align 4, !tbaa !5
  store i32 0, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %20, align 4, !tbaa !5
  %33 = sub i32 %2, %28
  %34 = icmp ult i32 %33, 1024
  %35 = zext i32 %28 to i64
  %36 = getelementptr inbounds i8, ptr %1, i64 %35
  br i1 %34, label %37, label %42

37:                                               ; preds = %26
  %38 = zext nneg i32 %33 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %17, ptr align 1 %36, i64 %38, i1 false)
  %39 = getelementptr inbounds i8, ptr %17, i64 %38
  %40 = sub nuw nsw i32 1024, %33
  %41 = zext nneg i32 %40 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %39, i8 -1, i64 %41, i1 false)
  br label %43

42:                                               ; preds = %26
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %17, ptr noundef nonnull align 1 dereferenceable(1024) %36, i64 1024, i1 false)
  br label %43

43:                                               ; preds = %42, %37
  store i8 0, ptr %5, align 4, !tbaa !9
  store i8 3, ptr %21, align 1, !tbaa !12
  %44 = call noundef zeroext i16 @_ZL17__uint16_identityt(i16 noundef zeroext 1040)
  store i16 %44, ptr %22, align 2, !tbaa !13
  %45 = call noundef i32 @_Z12esp_checksumPvj(ptr noundef nonnull %17, i32 noundef 1024)
  store i32 %45, ptr %23, align 4, !tbaa !14
  %46 = call noundef zeroext i1 @_Z10flash_sendP10SerialPortP18ESP_REQUEST_HEADERPvb(ptr noundef %0, ptr noundef nonnull %5, ptr noundef nonnull %6, i1 noundef zeroext true)
  br i1 %46, label %.critedge, label %47

47:                                               ; preds = %43
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  call void @llvm.lifetime.end.p0(i64 1040, ptr nonnull %6) #7
  br label %50

.critedge:                                        ; preds = %43
  call void @llvm.lifetime.end.p0(i64 1040, ptr nonnull %6) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge49, label %26, !llvm.loop !15

.critedge49:                                      ; preds = %.critedge, %.preheader
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %15, i32 noundef %15, i32 noundef %3)
  br label %50

50:                                               ; preds = %47, %.critedge49, %24
  %.3 = phi i1 [ true, %.critedge49 ], [ false, %47 ], [ false, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %51

51:                                               ; preds = %50, %9
  %.4 = phi i1 [ false, %9 ], [ %.3, %50 ]
  ret i1 %.4
}

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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, !7, i64 0}
!10 = !{!"_ZTS18ESP_REQUEST_HEADER", !7, i64 0, !7, i64 1, !11, i64 2, !6, i64 4}
!11 = !{!"short", !7, i64 0}
!12 = !{!10, !7, i64 1}
!13 = !{!10, !11, i64 2}
!14 = !{!10, !6, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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