; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/highgui/src (draw)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #1

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

; 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) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @draw_line(ptr noundef %0, ptr noundef %1, i64 %2, i64 %3, i24 %4, i32 noundef %5) #4 {
  %7 = alloca %struct.point, align 4
  %8 = alloca %struct.point, align 4
  %9 = alloca %struct.RGB_data, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i64 %2, ptr %7, align 4
  store i64 %3, ptr %8, align 4
  store i24 %4, ptr %9, align 1
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !9
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %30

26:                                               ; preds = %6
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  br label %34

30:                                               ; preds = %26, %6
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

34:                                               ; preds = %29
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %35, i32 0, i32 2
  %37 = load i32, ptr %36, align 8, !tbaa !11
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %40

39:                                               ; preds = %34
  br label %44

40:                                               ; preds = %34
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

44:                                               ; preds = %39
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !13
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !13
  %51 = icmp eq i32 %47, %50
  br i1 %51, label %52, label %69

52:                                               ; preds = %44
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !14
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !14
  %59 = icmp eq i32 %55, %58
  br i1 %59, label %60, label %69

60:                                               ; preds = %52
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %61, i32 0, i32 3
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %64, i32 0, i32 3
  %66 = load i32, ptr %65, align 4, !tbaa !15
  %67 = icmp eq i32 %63, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %60
  br label %73

69:                                               ; preds = %60, %52, %44
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !13
  store i32 %76, ptr %13, align 4, !tbaa !9
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !14
  store i32 %79, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %80, i32 0, i32 3
  %82 = load i32, ptr %81, align 4, !tbaa !15
  store i32 %82, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %83, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  store ptr %85, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %86, i32 0, i32 5
  %88 = load ptr, ptr %87, align 8, !tbaa !16
  store ptr %88, ptr %17, align 8, !tbaa !5
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = mul nsw i32 %91, %92
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = mul nsw i32 %93, %94
  %96 = sext i32 %95 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %89, ptr align 1 %90, i64 %96, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %97 = getelementptr inbounds %struct.point, ptr %8, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !17
  %99 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 0
  %100 = load i32, ptr %99, align 4, !tbaa !17
  %101 = sub nsw i32 %98, %100
  %102 = sitofp i32 %101 to float
  %103 = getelementptr inbounds %struct.point, ptr %8, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !19
  %105 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !19
  %107 = sub nsw i32 %104, %106
  %108 = sitofp i32 %107 to float
  %109 = fdiv float %102, %108
  store float %109, ptr %18, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %110 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !19
  %112 = sitofp i32 %111 to float
  %113 = load float, ptr %18, align 4, !tbaa !20
  %114 = getelementptr inbounds %struct.point, ptr %7, i32 0, i32 0
  %115 = load i32, ptr %114, align 4, !tbaa !17
  %116 = sitofp i32 %115 to float
  %117 = fneg float %113
  %118 = call float @llvm.fmuladd.f32(float %117, float %116, float %112)
  store float %118, ptr %19, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %249, %73
  %120 = load i32, ptr %20, align 4, !tbaa !9
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %252

124:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %245, %124
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = load i32, ptr %14, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %248

130:                                              ; preds = %125
  %131 = load i32, ptr %20, align 4, !tbaa !9
  %132 = load i32, ptr %22, align 4, !tbaa !9
  %133 = sitofp i32 %132 to float
  %134 = load float, ptr %18, align 4, !tbaa !20
  %135 = load float, ptr %19, align 4, !tbaa !20
  %136 = call float @llvm.fmuladd.f32(float %133, float %134, float %135)
  %137 = fpext float %136 to double
  %138 = fadd double %137, 5.000000e-01
  %139 = fptosi double %138 to i32
  %140 = icmp eq i32 %131, %139
  br i1 %140, label %141, label %244

141:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %142 = load i32, ptr %12, align 4, !tbaa !9
  %143 = sub nsw i32 0, %142
  %144 = sdiv i32 %143, 2
  store i32 %144, ptr %23, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %240, %141
  %146 = load i32, ptr %23, align 4, !tbaa !9
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = sdiv i32 %147, 2
  %149 = icmp sle i32 %146, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %145
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %243

151:                                              ; preds = %145
  %152 = load i32, ptr %22, align 4, !tbaa !9
  %153 = load i32, ptr %23, align 4, !tbaa !9
  %154 = add nsw i32 %152, %153
  %155 = icmp sge i32 %154, 0
  br i1 %155, label %156, label %239

156:                                              ; preds = %151
  %157 = load i32, ptr %22, align 4, !tbaa !9
  %158 = load i32, ptr %23, align 4, !tbaa !9
  %159 = add nsw i32 %157, %158
  %160 = load i32, ptr %14, align 4, !tbaa !9
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %162, label %239

162:                                              ; preds = %156
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = icmp eq i32 %163, 3
  br i1 %164, label %165, label %216

165:                                              ; preds = %162
  %166 = getelementptr inbounds %struct.RGB_data, ptr %9, i32 0, i32 0
  %167 = load i8, ptr %166, align 1, !tbaa !22
  %168 = load ptr, ptr %17, align 8, !tbaa !5
  %169 = load i32, ptr %20, align 4, !tbaa !9
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = mul nsw i32 %169, %170
  %172 = load i32, ptr %15, align 4, !tbaa !9
  %173 = mul nsw i32 %171, %172
  %174 = load i32, ptr %22, align 4, !tbaa !9
  %175 = load i32, ptr %23, align 4, !tbaa !9
  %176 = add nsw i32 %174, %175
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = mul nsw i32 %176, %177
  %179 = add nsw i32 %173, %178
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds i8, ptr %168, i64 %180
  store i8 %167, ptr %181, align 1, !tbaa !24
  %182 = getelementptr inbounds %struct.RGB_data, ptr %9, i32 0, i32 1
  %183 = load i8, ptr %182, align 1, !tbaa !25
  %184 = load ptr, ptr %17, align 8, !tbaa !5
  %185 = load i32, ptr %20, align 4, !tbaa !9
  %186 = load i32, ptr %14, align 4, !tbaa !9
  %187 = mul nsw i32 %185, %186
  %188 = load i32, ptr %15, align 4, !tbaa !9
  %189 = mul nsw i32 %187, %188
  %190 = load i32, ptr %22, align 4, !tbaa !9
  %191 = load i32, ptr %23, align 4, !tbaa !9
  %192 = add nsw i32 %190, %191
  %193 = load i32, ptr %15, align 4, !tbaa !9
  %194 = mul nsw i32 %192, %193
  %195 = add nsw i32 %189, %194
  %196 = add nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i8, ptr %184, i64 %197
  store i8 %183, ptr %198, align 1, !tbaa !24
  %199 = getelementptr inbounds %struct.RGB_data, ptr %9, i32 0, i32 2
  %200 = load i8, ptr %199, align 1, !tbaa !26
  %201 = load ptr, ptr %17, align 8, !tbaa !5
  %202 = load i32, ptr %20, align 4, !tbaa !9
  %203 = load i32, ptr %14, align 4, !tbaa !9
  %204 = mul nsw i32 %202, %203
  %205 = load i32, ptr %15, align 4, !tbaa !9
  %206 = mul nsw i32 %204, %205
  %207 = load i32, ptr %22, align 4, !tbaa !9
  %208 = load i32, ptr %23, align 4, !tbaa !9
  %209 = add nsw i32 %207, %208
  %210 = load i32, ptr %15, align 4, !tbaa !9
  %211 = mul nsw i32 %209, %210
  %212 = add nsw i32 %206, %211
  %213 = add nsw i32 %212, 2
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i8, ptr %201, i64 %214
  store i8 %200, ptr %215, align 1, !tbaa !24
  br label %238

216:                                              ; preds = %162
  %217 = load i32, ptr %15, align 4, !tbaa !9
  %218 = icmp eq i32 %217, 1
  br i1 %218, label %219, label %237

219:                                              ; preds = %216
  %220 = load ptr, ptr %17, align 8, !tbaa !5
  %221 = load i32, ptr %20, align 4, !tbaa !9
  %222 = load i32, ptr %14, align 4, !tbaa !9
  %223 = mul nsw i32 %221, %222
  %224 = load i32, ptr %22, align 4, !tbaa !9
  %225 = load i32, ptr %23, align 4, !tbaa !9
  %226 = add nsw i32 %224, %225
  %227 = add nsw i32 %223, %226
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds i8, ptr %220, i64 %228
  %230 = load i8, ptr %229, align 1, !tbaa !24
  %231 = zext i8 %230 to i32
  %232 = getelementptr inbounds %struct.RGB_data, ptr %9, i32 0, i32 0
  %233 = load i8, ptr %232, align 1, !tbaa !22
  %234 = zext i8 %233 to i32
  %235 = icmp eq i32 %231, %234
  %236 = zext i1 %235 to i32
  br label %237

237:                                              ; preds = %219, %216
  br label %238

238:                                              ; preds = %237, %165
  br label %239

239:                                              ; preds = %238, %156, %151
  br label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %23, align 4, !tbaa !9
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %23, align 4, !tbaa !9
  br label %145, !llvm.loop !27

243:                                              ; preds = %150
  br label %244

244:                                              ; preds = %243, %130
  br label %245

245:                                              ; preds = %244
  %246 = load i32, ptr %22, align 4, !tbaa !9
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %22, align 4, !tbaa !9
  br label %125, !llvm.loop !29

248:                                              ; preds = %129
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %20, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %20, align 4, !tbaa !9
  br label %119, !llvm.loop !30

252:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { noreturn nounwind }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !10, i64 12}
!16 = !{!12, !6, i64 24}
!17 = !{!18, !10, i64 0}
!18 = !{!"point", !10, i64 0, !10, i64 4}
!19 = !{!18, !10, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = !{!23, !7, i64 0}
!23 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!24 = !{!7, !7, i64 0}
!25 = !{!23, !7, i64 1}
!26 = !{!23, !7, i64 2}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}


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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #1

; 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) #2

; Function Attrs: nounwind uwtable
define dso_local void @draw_line(ptr noundef readonly %0, ptr noundef readonly %1, i64 %2, i64 %3, i24 %4, i32 noundef %5) local_unnamed_addr #3 {
  %.sroa.069.0.extract.trunc = trunc i64 %2 to i32
  %.sroa.371.0.extract.shift = lshr i64 %2, 32
  %.sroa.371.0.extract.trunc = trunc nuw i64 %.sroa.371.0.extract.shift to i32
  %.sroa.068.0.extract.trunc = trunc i64 %3 to i32
  %.sroa.2.0.extract.shift = lshr i64 %3, 32
  %.sroa.2.0.extract.trunc = trunc nuw i64 %.sroa.2.0.extract.shift to i32
  %.sroa.0.0.extract.trunc = trunc i24 %4 to i8
  %.sroa.3.0.extract.shift = lshr i24 %4, 8
  %.sroa.3.0.extract.trunc = trunc i24 %.sroa.3.0.extract.shift to i8
  %.sroa.4.0.extract.shift = lshr i24 %4, 16
  %.sroa.4.0.extract.trunc = trunc nuw i24 %.sroa.4.0.extract.shift to i8
  %7 = icmp ne ptr %0, null
  %8 = icmp ne ptr %1, null
  %or.cond = and i1 %7, %8
  br i1 %or.cond, label %13, label %9

9:                                                ; preds = %6
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

13:                                               ; preds = %6
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %21, label %17

17:                                               ; preds = %13
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

21:                                               ; preds = %13
  %22 = load i32, ptr %0, align 8, !tbaa !11
  %23 = load i32, ptr %1, align 8, !tbaa !11
  %24 = icmp eq i32 %22, %23
  br i1 %24, label %25, label %37

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %0, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %1, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !12
  %30 = icmp eq i32 %27, %29
  br i1 %30, label %31, label %37

31:                                               ; preds = %25
  %32 = getelementptr inbounds i8, ptr %0, i64 12
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %.fr = freeze i32 %33
  %34 = getelementptr inbounds i8, ptr %1, i64 12
  %35 = load i32, ptr %34, align 4, !tbaa !13
  %36 = icmp eq i32 %.fr, %35
  br i1 %36, label %41, label %37

37:                                               ; preds = %31, %25, %21
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

41:                                               ; preds = %31
  %42 = getelementptr inbounds i8, ptr %0, i64 24
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %1, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = mul nsw i32 %27, %22
  %47 = mul nsw i32 %46, %.fr
  %48 = sext i32 %47 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %45, ptr align 1 %43, i64 %48, i1 false)
  %49 = sub nsw i32 %.sroa.068.0.extract.trunc, %.sroa.069.0.extract.trunc
  %50 = sitofp i32 %49 to float
  %51 = sub nsw i32 %.sroa.2.0.extract.trunc, %.sroa.371.0.extract.trunc
  %52 = sitofp i32 %51 to float
  %53 = fdiv float %50, %52
  %54 = sitofp i32 %.sroa.371.0.extract.trunc to float
  %55 = sitofp i32 %.sroa.069.0.extract.trunc to float
  %56 = fneg float %53
  %57 = tail call float @llvm.fmuladd.f32(float %56, float %55, float %54)
  %58 = icmp sgt i32 %22, 0
  br i1 %58, label %.preheader.lr.ph, label %._crit_edge97

.preheader.lr.ph:                                 ; preds = %41
  %59 = icmp slt i32 %27, 1
  %60 = sdiv i32 %5, -2
  %61 = sdiv i32 %5, 2
  %cond = icmp ne i32 %.fr, 3
  %.not83 = icmp sgt i32 %60, %61
  %or.cond115 = or i1 %59, %.not83
  %brmerge = or i1 %or.cond115, %cond
  br i1 %brmerge, label %._crit_edge97, label %.preheader.us.us104.preheader

.preheader.us.us104.preheader:                    ; preds = %.preheader.lr.ph
  %62 = zext i32 %60 to i64
  %63 = add nsw i32 %61, 1
  %wide.trip.count = zext nneg i32 %27 to i64
  %64 = add nsw i32 %61, %60
  %65 = and i32 %64, 1
  %lcmp.mod.not.not = icmp eq i32 %65, 0
  %indvars.iv.next.prol = add nuw nsw i64 %62, 1
  %66 = icmp eq i32 %61, %60
  br label %.preheader.us.us104

.preheader.us.us104:                              ; preds = %.preheader.us.us104.preheader, %._crit_edge.split.split.us.us.us
  %.07494.us.us105 = phi i32 [ %104, %._crit_edge.split.split.us.us.us ], [ 0, %.preheader.us.us104.preheader ]
  %67 = mul nuw nsw i32 %.07494.us.us105, %27
  br label %68

68:                                               ; preds = %..loopexit_crit_edge.split.us92.us.us, %.preheader.us.us104
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %..loopexit_crit_edge.split.us92.us.us ], [ 0, %.preheader.us.us104 ]
  %69 = trunc nuw nsw i64 %indvars.iv110 to i32
  %70 = uitofp nneg i32 %69 to float
  %71 = tail call float @llvm.fmuladd.f32(float %70, float %53, float %57)
  %72 = fpext float %71 to double
  %73 = fadd double %72, 5.000000e-01
  %74 = fptosi double %73 to i32
  %75 = icmp eq i32 %.07494.us.us105, %74
  br i1 %75, label %.lr.ph.us.us.us.preheader, label %..loopexit_crit_edge.split.us92.us.us

.lr.ph.us.us.us.preheader:                        ; preds = %68
  br i1 %lcmp.mod.not.not, label %.lr.ph.us.us.us.prol, label %.lr.ph.us.us.us.prol.loopexit

.lr.ph.us.us.us.prol:                             ; preds = %.lr.ph.us.us.us.preheader
  %76 = trunc i64 %indvars.iv110 to i32
  %77 = add i32 %60, %76
  %or.cond81.us.us.us.prol = icmp ugt i32 %27, %77
  br i1 %or.cond81.us.us.us.prol, label %78, label %.lr.ph.us.us.us.prol.loopexit

78:                                               ; preds = %.lr.ph.us.us.us.prol
  %79 = add i32 %67, %77
  %80 = mul i32 %79, 3
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i8, ptr %45, i64 %81
  store i8 %.sroa.0.0.extract.trunc, ptr %82, align 1, !tbaa !15
  %83 = getelementptr i8, ptr %82, i64 1
  store i8 %.sroa.3.0.extract.trunc, ptr %83, align 1, !tbaa !15
  %84 = getelementptr i8, ptr %82, i64 2
  store i8 %.sroa.4.0.extract.trunc, ptr %84, align 1, !tbaa !15
  br label %.lr.ph.us.us.us.prol.loopexit

.lr.ph.us.us.us.prol.loopexit:                    ; preds = %.lr.ph.us.us.us.prol, %78, %.lr.ph.us.us.us.preheader
  %indvars.iv.unr = phi i64 [ %62, %.lr.ph.us.us.us.preheader ], [ %indvars.iv.next.prol, %78 ], [ %indvars.iv.next.prol, %.lr.ph.us.us.us.prol ]
  br i1 %66, label %..loopexit_crit_edge.split.us92.us.us, label %.lr.ph.us.us.us

.lr.ph.us.us.us:                                  ; preds = %.lr.ph.us.us.us.prol.loopexit, %103
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %103 ], [ %indvars.iv.unr, %.lr.ph.us.us.us.prol.loopexit ]
  %85 = add i64 %indvars.iv, %indvars.iv110
  %86 = trunc i64 %85 to i32
  %or.cond81.us.us.us = icmp ugt i32 %27, %86
  br i1 %or.cond81.us.us.us, label %87, label %.lr.ph.us.us.us.1

87:                                               ; preds = %.lr.ph.us.us.us
  %88 = add i32 %67, %86
  %89 = mul i32 %88, 3
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %45, i64 %90
  store i8 %.sroa.0.0.extract.trunc, ptr %91, align 1, !tbaa !15
  %92 = getelementptr i8, ptr %91, i64 1
  store i8 %.sroa.3.0.extract.trunc, ptr %92, align 1, !tbaa !15
  %93 = getelementptr i8, ptr %91, i64 2
  store i8 %.sroa.4.0.extract.trunc, ptr %93, align 1, !tbaa !15
  br label %.lr.ph.us.us.us.1

.lr.ph.us.us.us.1:                                ; preds = %87, %.lr.ph.us.us.us
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %94 = add i64 %indvars.iv.next, %indvars.iv110
  %95 = trunc i64 %94 to i32
  %or.cond81.us.us.us.1 = icmp ugt i32 %27, %95
  br i1 %or.cond81.us.us.us.1, label %96, label %103

96:                                               ; preds = %.lr.ph.us.us.us.1
  %97 = add i32 %67, %95
  %98 = mul i32 %97, 3
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %45, i64 %99
  store i8 %.sroa.0.0.extract.trunc, ptr %100, align 1, !tbaa !15
  %101 = getelementptr i8, ptr %100, i64 1
  store i8 %.sroa.3.0.extract.trunc, ptr %101, align 1, !tbaa !15
  %102 = getelementptr i8, ptr %100, i64 2
  store i8 %.sroa.4.0.extract.trunc, ptr %102, align 1, !tbaa !15
  br label %103

103:                                              ; preds = %96, %.lr.ph.us.us.us.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32
  %exitcond.not.1 = icmp eq i32 %63, %lftr.wideiv.1
  br i1 %exitcond.not.1, label %..loopexit_crit_edge.split.us92.us.us, label %.lr.ph.us.us.us, !llvm.loop !16

..loopexit_crit_edge.split.us92.us.us:            ; preds = %.lr.ph.us.us.us.prol.loopexit, %103, %68
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count
  br i1 %exitcond113.not, label %._crit_edge.split.split.us.us.us, label %68, !llvm.loop !18

._crit_edge.split.split.us.us.us:                 ; preds = %..loopexit_crit_edge.split.us92.us.us
  %104 = add nuw nsw i32 %.07494.us.us105, 1
  %exitcond114.not = icmp eq i32 %104, %22
  br i1 %exitcond114.not, label %._crit_edge97, label %.preheader.us.us104, !llvm.loop !19

._crit_edge97:                                    ; preds = %._crit_edge.split.split.us.us.us, %.preheader.lr.ph, %41
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

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 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !7, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !10, i64 24}
!15 = !{!8, !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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