; LLVM IR from openvinotoolkit/model_server :: src/test/custom_nodes (node_add_sub)

; 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.CustomNodeTensor = type { ptr, ptr, i64, ptr, i64, i32 }
%struct.CustomNodeParam = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@stdout = external global ptr, align 8

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

26:                                               ; preds = %7
  store i32 1, ptr %8, align 4
  br label %211

27:                                               ; preds = %7
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 1
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  store i32 2, ptr %8, align 4
  br label %211

31:                                               ; preds = %27
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.CustomNodeTensor, ptr %32, i64 0
  %34 = getelementptr inbounds %struct.CustomNodeTensor, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !11
  %36 = call i32 @strcmp(ptr noundef %35, ptr noundef @.str) #7
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %31
  store i32 3, ptr %8, align 4
  br label %211

39:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.CustomNodeTensor, ptr %40, i64 0
  store ptr %41, ptr %16, align 8, !tbaa !5
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.CustomNodeTensor, ptr %42, i32 0, i32 5
  %44 = load i32, ptr %43, align 8, !tbaa !14
  %45 = icmp ne i32 %44, 1
  br i1 %45, label %46, label %47

46:                                               ; preds = %39
  store i32 4, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %210

47:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store float 0.000000e+00, ptr %18, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store float 0.000000e+00, ptr %19, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %90, %47
  %49 = load i32, ptr %20, align 4, !tbaa !9
  %50 = load i32, ptr %14, align 4, !tbaa !9
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %93

53:                                               ; preds = %48
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = load i32, ptr %20, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds %struct.CustomNodeParam, ptr %54, i64 %56
  %58 = getelementptr inbounds %struct.CustomNodeParam, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = call i32 @strcmp(ptr noundef %59, ptr noundef @.str.1) #7
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %71

62:                                               ; preds = %53
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = load i32, ptr %20, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds %struct.CustomNodeParam, ptr %63, i64 %65
  %67 = getelementptr inbounds %struct.CustomNodeParam, ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !19
  %69 = call double @atof(ptr noundef %68) #7
  %70 = fptrunc double %69 to float
  store float %70, ptr %18, align 4, !tbaa !15
  br label %71

71:                                               ; preds = %62, %53
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = load i32, ptr %20, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.CustomNodeParam, ptr %72, i64 %74
  %76 = getelementptr inbounds %struct.CustomNodeParam, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = call i32 @strcmp(ptr noundef %77, ptr noundef @.str.2) #7
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %89

80:                                               ; preds = %71
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load i32, ptr %20, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.CustomNodeParam, ptr %81, i64 %83
  %85 = getelementptr inbounds %struct.CustomNodeParam, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !19
  %87 = call double @atof(ptr noundef %86) #7
  %88 = fptrunc double %87 to float
  store float %88, ptr %19, align 4, !tbaa !15
  br label %89

89:                                               ; preds = %80, %71
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %20, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %20, align 4, !tbaa !9
  br label %48, !llvm.loop !20

93:                                               ; preds = %52
  %94 = load float, ptr %18, align 4, !tbaa !15
  %95 = fpext float %94 to double
  %96 = load float, ptr %19, align 4, !tbaa !15
  %97 = fpext float %96 to double
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %95, double noundef %97)
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %99)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %126, %93
  %102 = load i32, ptr %21, align 4, !tbaa !9
  %103 = load i32, ptr %10, align 4, !tbaa !9
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %129

106:                                              ; preds = %101
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = load i32, ptr %21, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %struct.CustomNodeTensor, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.CustomNodeTensor, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load i32, ptr %21, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.CustomNodeTensor, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.CustomNodeTensor, ptr %116, i32 0, i32 2
  %118 = load i64, ptr %117, align 8, !tbaa !22
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load i32, ptr %21, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct.CustomNodeTensor, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct.CustomNodeTensor, ptr %122, i32 0, i32 4
  %124 = load i64, ptr %123, align 8, !tbaa !23
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %112, i64 noundef %118, i64 noundef %124)
  br label %126

126:                                              ; preds = %106
  %127 = load i32, ptr %21, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %21, align 4, !tbaa !9
  br label %101, !llvm.loop !24

129:                                              ; preds = %105
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %130, align 4, !tbaa !9
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = mul i64 48, %133
  %135 = call noalias ptr @malloc(i64 noundef %134) #9
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %135, ptr %136, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = getelementptr inbounds ptr, ptr %137, i64 0
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  store ptr %139, ptr %22, align 8, !tbaa !5
  %140 = load ptr, ptr %22, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.CustomNodeTensor, ptr %140, i32 0, i32 0
  store ptr @.str.6, ptr %141, align 8, !tbaa !11
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.CustomNodeTensor, ptr %142, i32 0, i32 2
  %144 = load i64, ptr %143, align 8, !tbaa !22
  %145 = mul i64 %144, 1
  %146 = call noalias ptr @malloc(i64 noundef %145) #9
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.CustomNodeTensor, ptr %147, i32 0, i32 1
  store ptr %146, ptr %148, align 8, !tbaa !25
  %149 = load ptr, ptr %16, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.CustomNodeTensor, ptr %149, i32 0, i32 2
  %151 = load i64, ptr %150, align 8, !tbaa !22
  %152 = load ptr, ptr %22, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.CustomNodeTensor, ptr %152, i32 0, i32 2
  store i64 %151, ptr %153, align 8, !tbaa !22
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.CustomNodeTensor, ptr %154, i32 0, i32 4
  %156 = load i64, ptr %155, align 8, !tbaa !23
  %157 = mul i64 %156, 8
  %158 = call noalias ptr @malloc(i64 noundef %157) #9
  %159 = load ptr, ptr %22, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.CustomNodeTensor, ptr %159, i32 0, i32 3
  store ptr %158, ptr %160, align 8, !tbaa !26
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.CustomNodeTensor, ptr %161, i32 0, i32 4
  %163 = load i64, ptr %162, align 8, !tbaa !23
  %164 = load ptr, ptr %22, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.CustomNodeTensor, ptr %164, i32 0, i32 4
  store i64 %163, ptr %165, align 8, !tbaa !23
  %166 = load ptr, ptr %22, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.CustomNodeTensor, ptr %166, i32 0, i32 3
  %168 = load ptr, ptr %167, align 8, !tbaa !26
  %169 = load ptr, ptr %16, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.CustomNodeTensor, ptr %169, i32 0, i32 3
  %171 = load ptr, ptr %170, align 8, !tbaa !26
  %172 = load ptr, ptr %16, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.CustomNodeTensor, ptr %172, i32 0, i32 4
  %174 = load i64, ptr %173, align 8, !tbaa !23
  %175 = mul i64 %174, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %168, ptr align 1 %171, i64 %175, i1 false)
  %176 = load ptr, ptr %16, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.CustomNodeTensor, ptr %176, i32 0, i32 5
  %178 = load i32, ptr %177, align 8, !tbaa !14
  %179 = load ptr, ptr %22, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.CustomNodeTensor, ptr %179, i32 0, i32 5
  store i32 %178, ptr %180, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store i64 0, ptr %23, align 8, !tbaa !27
  br label %181

181:                                              ; preds = %204, %129
  %182 = load i64, ptr %23, align 8, !tbaa !27
  %183 = load ptr, ptr %22, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.CustomNodeTensor, ptr %183, i32 0, i32 2
  %185 = load i64, ptr %184, align 8, !tbaa !22
  %186 = icmp ult i64 %182, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %181
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %207

188:                                              ; preds = %181
  %189 = load ptr, ptr %16, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.CustomNodeTensor, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !25
  %192 = load i64, ptr %23, align 8, !tbaa !27
  %193 = getelementptr inbounds i8, ptr %191, i64 %192
  %194 = load float, ptr %193, align 4, !tbaa !15
  %195 = load float, ptr %18, align 4, !tbaa !15
  %196 = fadd float %194, %195
  %197 = load float, ptr %19, align 4, !tbaa !15
  %198 = fsub float %196, %197
  %199 = load ptr, ptr %22, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.CustomNodeTensor, ptr %199, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !25
  %202 = load i64, ptr %23, align 8, !tbaa !27
  %203 = getelementptr inbounds i8, ptr %201, i64 %202
  store float %198, ptr %203, align 4, !tbaa !15
  br label %204

204:                                              ; preds = %188
  %205 = load i64, ptr %23, align 8, !tbaa !27
  %206 = add i64 %205, 4
  store i64 %206, ptr %23, align 8, !tbaa !27
  br label %181, !llvm.loop !28

207:                                              ; preds = %187
  %208 = load ptr, ptr @stdout, align 8, !tbaa !5
  %209 = call i32 @fflush(ptr noundef %208)
  store i32 0, ptr %8, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %210

210:                                              ; preds = %207, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %211

211:                                              ; preds = %210, %38, %30, %26
  %212 = load i32, ptr %8, align 4
  ret i32 %212
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr 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: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #3

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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

declare i32 @fflush(ptr noundef) #4

attributes #0 = { 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 = { nounwind willreturn memory(read) "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 = { inlinehint nounwind willreturn memory(read) 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 allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }

!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, !6, i64 0}
!12 = !{!"CustomNodeTensor", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !13, i64 32, !10, i64 40}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !10, i64 40}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"CustomNodeParam", !6, i64 0, !6, i64 8}
!19 = !{!18, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!12, !13, i64 16}
!23 = !{!12, !13, i64 32}
!24 = distinct !{!24, !21}
!25 = !{!12, !6, i64 8}
!26 = !{!12, !6, i64 24}
!27 = !{!13, !13, i64 0}
!28 = distinct !{!28, !21}


; 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 [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: nofree nounwind uwtable
define dso_local range(i32 0, 5) i32 @execute(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef readonly %4, i32 noundef %5, ptr nocapture noundef readnone %6) local_unnamed_addr #0 {
  %.not = icmp eq i32 %5, 2
  br i1 %.not, label %8, label %98

8:                                                ; preds = %7
  %.not64 = icmp eq i32 %1, 1
  br i1 %.not64, label %9, label %98

9:                                                ; preds = %8
  %10 = load ptr, ptr %0, align 8, !tbaa !5
  %11 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str) #6
  %.not65 = icmp eq i32 %11, 0
  br i1 %.not65, label %12, label %98

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = load i32, ptr %13, align 8, !tbaa !12
  %.not66 = icmp eq i32 %14, 1
  br i1 %.not66, label %.preheader.preheader, label %98

.preheader.preheader:                             ; preds = %12
  %15 = load ptr, ptr %4, align 8, !tbaa !13
  %16 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.1) #6
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %35, label %40

.lr.ph:                                           ; preds = %.critedge
  %18 = ptrtoint ptr %77 to i64
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = add i64 %76, -1
  %22 = lshr i64 %21, 2
  %23 = add nuw nsw i64 %22, 1
  %min.iters.check = icmp ult i64 %76, 29
  %24 = ptrtoint ptr %20 to i64
  %25 = sub i64 %18, %24
  %diff.check = icmp ult i64 %25, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %.070.ph = phi i64 [ 0, %.lr.ph ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %23, 9223372036854775800
  %ind.end = shl i64 %n.vec, 2
  %broadcast.splatinsert = insertelement <4 x float> poison, float %.161.1, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert74 = insertelement <4 x float> poison, float %.159.1, i64 0
  %broadcast.splat75 = shufflevector <4 x float> %broadcast.splatinsert74, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 2
  %26 = getelementptr inbounds i8, ptr %20, i64 %offset.idx
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %wide.load = load <4 x float>, ptr %26, align 4, !tbaa !16
  %wide.load73 = load <4 x float>, ptr %27, align 4, !tbaa !16
  %28 = fadd <4 x float> %broadcast.splat, %wide.load
  %29 = fadd <4 x float> %broadcast.splat, %wide.load73
  %30 = fsub <4 x float> %28, %broadcast.splat75
  %31 = fsub <4 x float> %29, %broadcast.splat75
  %32 = getelementptr inbounds i8, ptr %77, i64 %offset.idx
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store <4 x float> %30, ptr %32, align 4, !tbaa !16
  store <4 x float> %31, ptr %33, align 4, !tbaa !16
  %index.next = add nuw i64 %index, 8
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %23, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

35:                                               ; preds = %.preheader.preheader
  %36 = getelementptr inbounds i8, ptr %4, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %38 = tail call double @atof(ptr noundef %37) #6
  %39 = fptrunc double %38 to float
  br label %40

40:                                               ; preds = %35, %.preheader.preheader
  %.161 = phi float [ %39, %35 ], [ 0.000000e+00, %.preheader.preheader ]
  %41 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.2) #6
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %.preheader.1

43:                                               ; preds = %40
  %44 = getelementptr inbounds i8, ptr %4, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = tail call double @atof(ptr noundef %45) #6
  %47 = fptrunc double %46 to float
  br label %.preheader.1

.preheader.1:                                     ; preds = %40, %43
  %.159 = phi float [ %47, %43 ], [ 0.000000e+00, %40 ]
  %48 = getelementptr inbounds i8, ptr %4, i64 16
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %49, ptr noundef nonnull dereferenceable(1) @.str.1) #6
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %57

52:                                               ; preds = %.preheader.1
  %53 = getelementptr inbounds i8, ptr %4, i64 24
  %54 = load ptr, ptr %53, align 8, !tbaa !22
  %55 = tail call double @atof(ptr noundef %54) #6
  %56 = fptrunc double %55 to float
  br label %57

57:                                               ; preds = %52, %.preheader.1
  %.161.1 = phi float [ %56, %52 ], [ %.161, %.preheader.1 ]
  %58 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %49, ptr noundef nonnull dereferenceable(1) @.str.2) #6
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %.critedge

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %4, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !22
  %63 = tail call double @atof(ptr noundef %62) #6
  %64 = fptrunc double %63 to float
  br label %.critedge

.critedge:                                        ; preds = %60, %57
  %.159.1 = phi float [ %64, %60 ], [ %.159, %57 ]
  %65 = fpext float %.161.1 to double
  %66 = fpext float %.159.1 to double
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %65, double noundef %66)
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
  %69 = load ptr, ptr %0, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %0, i64 16
  %71 = load i64, ptr %70, align 8, !tbaa !23
  %72 = getelementptr inbounds i8, ptr %0, i64 32
  %73 = load i64, ptr %72, align 8, !tbaa !24
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef %69, i64 noundef %71, i64 noundef %73)
  store i32 1, ptr %3, align 4, !tbaa !25
  %75 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #7
  store ptr %75, ptr %2, align 8, !tbaa !26
  store ptr @.str.6, ptr %75, align 8, !tbaa !5
  %76 = load i64, ptr %70, align 8, !tbaa !23
  %77 = tail call noalias ptr @malloc(i64 noundef %76) #7
  %78 = getelementptr inbounds i8, ptr %75, i64 8
  store ptr %77, ptr %78, align 8, !tbaa !15
  %79 = getelementptr inbounds i8, ptr %75, i64 16
  store i64 %76, ptr %79, align 8, !tbaa !23
  %80 = load i64, ptr %72, align 8, !tbaa !24
  %81 = shl i64 %80, 3
  %82 = tail call noalias ptr @malloc(i64 noundef %81) #7
  %83 = getelementptr inbounds i8, ptr %75, i64 24
  store ptr %82, ptr %83, align 8, !tbaa !27
  %84 = getelementptr inbounds i8, ptr %75, i64 32
  store i64 %80, ptr %84, align 8, !tbaa !24
  %85 = getelementptr inbounds i8, ptr %0, i64 24
  %86 = load ptr, ptr %85, align 8, !tbaa !27
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %82, ptr align 1 %86, i64 %81, i1 false)
  %87 = load i32, ptr %13, align 8, !tbaa !12
  %88 = getelementptr inbounds i8, ptr %75, i64 40
  store i32 %87, ptr %88, align 8, !tbaa !12
  %.not71 = icmp eq i64 %76, 0
  br i1 %.not71, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %.critedge
  %89 = load ptr, ptr @stdout, align 8, !tbaa !26
  %90 = tail call i32 @fflush(ptr noundef %89)
  br label %98

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.070 = phi i64 [ %96, %scalar.ph ], [ %.070.ph, %scalar.ph.preheader ]
  %91 = getelementptr inbounds i8, ptr %20, i64 %.070
  %92 = load float, ptr %91, align 4, !tbaa !16
  %93 = fadd float %.161.1, %92
  %94 = fsub float %93, %.159.1
  %95 = getelementptr inbounds i8, ptr %77, i64 %.070
  store float %94, ptr %95, align 4, !tbaa !16
  %96 = add nuw i64 %.070, 4
  %97 = icmp ult i64 %96, %76
  br i1 %97, label %scalar.ph, label %._crit_edge, !llvm.loop !28

98:                                               ; preds = %._crit_edge, %12, %9, %8, %7
  %.1 = phi i32 [ 1, %7 ], [ 2, %8 ], [ 3, %9 ], [ 0, %._crit_edge ], [ 4, %12 ]
  ret i32 %.1
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #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: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

attributes #0 = { nofree 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 nofree nounwind willreturn memory(argmem: read) "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 mustprogress nofree nounwind willreturn memory(read) 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!"CustomNodeTensor", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !11, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !11, i64 40}
!13 = !{!14, !7, i64 0}
!14 = !{!"CustomNodeParam", !7, i64 0, !7, i64 8}
!15 = !{!6, !7, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !8, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = !{!14, !7, i64 8}
!23 = !{!6, !10, i64 16}
!24 = !{!6, !10, i64 32}
!25 = !{!11, !11, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!6, !7, i64 24}
!28 = distinct !{!28, !19, !20}


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