; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu (bilateral_slice_apply)

; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.BilateralSliceApplyParamSpec = type { i32 }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z25bilateral_slice_apply_cpu10TensorDescPKvS_S1_S_S1_28BilateralSliceApplyParamSpecS_Pv(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef byval(%struct.TensorDesc) align 8 %2, ptr noundef %3, ptr noundef byval(%struct.TensorDesc) align 8 %4, ptr noundef %5, i32 %6, ptr noundef byval(%struct.TensorDesc) align 8 %7, ptr noundef %8) #0 {
  %10 = alloca i32, align 4
  %11 = alloca %struct.BilateralSliceApplyParamSpec, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.TensorDesc, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.TensorDesc, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %struct.BilateralSliceApplyParamSpec, align 4
  %37 = alloca %struct.BilateralSliceApplyParamSpec, align 4
  %38 = getelementptr inbounds %struct.BilateralSliceApplyParamSpec, ptr %11, i32 0, i32 0
  store i32 %6, ptr %38, align 4
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %8, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !9
  %39 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %29, ptr noundef %16, ptr noundef %18, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23)
  store i32 %39, ptr %28, align 4, !tbaa !17
  %40 = load i32, ptr %28, align 4, !tbaa !17
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %54

42:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %43 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %44 = trunc i64 %43 to i32
  store i32 %44, ptr %30, align 4, !tbaa !14
  %45 = load i32, ptr %30, align 4, !tbaa !14
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %45)
  %47 = load ptr, ptr @stdout, align 8, !tbaa !5
  %48 = call i32 @fflush(ptr noundef %47)
  %49 = load i32, ptr %28, align 4, !tbaa !17
  %50 = call ptr @ee2str(i32 noundef %49)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %50)
  %52 = load ptr, ptr @stdout, align 8, !tbaa !5
  %53 = call i32 @fflush(ptr noundef %52)
  call void @exit(i32 noundef 1) #8
  unreachable

54:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 8 %4, i64 92, i1 false), !tbaa.struct !9
  %55 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8 %32, ptr noundef %17, ptr noundef %19, ptr noundef %24, ptr noundef %25, ptr noundef %26, ptr noundef %27)
  store i32 %55, ptr %31, align 4, !tbaa !17
  %56 = load i32, ptr %31, align 4, !tbaa !17
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %70

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %59 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %33, align 4, !tbaa !14
  %61 = load i32, ptr %33, align 4, !tbaa !14
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %61)
  %63 = load ptr, ptr @stdout, align 8, !tbaa !5
  %64 = call i32 @fflush(ptr noundef %63)
  %65 = load i32, ptr %31, align 4, !tbaa !17
  %66 = call ptr @ee2str(i32 noundef %65)
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %66)
  %68 = load ptr, ptr @stdout, align 8, !tbaa !5
  %69 = call i32 @fflush(ptr noundef %68)
  call void @exit(i32 noundef 1) #8
  unreachable

70:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  %71 = load i32, ptr %20, align 4, !tbaa !14
  %72 = load i32, ptr %24, align 4, !tbaa !14
  %73 = icmp ne i32 %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  store i32 2, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %120

75:                                               ; preds = %70
  %76 = load i32, ptr %21, align 4, !tbaa !14
  %77 = icmp ne i32 %76, 3
  br i1 %77, label %82, label %78

78:                                               ; preds = %75
  %79 = load i32, ptr %25, align 4, !tbaa !14
  %80 = urem i32 %79, 12
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %78, %75
  store i32 2, ptr %10, align 4
  store i32 1, ptr %34, align 4
  br label %120

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store i32 51, ptr %35, align 4, !tbaa !17
  %84 = load i32, ptr %16, align 4, !tbaa !10
  switch i32 %84, label %117 [
    i32 6, label %85
    i32 0, label %99
  ]

85:                                               ; preds = %83
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !19
  %89 = load i32, ptr %20, align 4, !tbaa !14
  %90 = load i32, ptr %22, align 4, !tbaa !14
  %91 = load i32, ptr %23, align 4, !tbaa !14
  %92 = load i32, ptr %26, align 4, !tbaa !14
  %93 = load i32, ptr %27, align 4, !tbaa !14
  %94 = load i32, ptr %25, align 4, !tbaa !14
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.BilateralSliceApplyParamSpec, ptr %36, i32 0, i32 0
  %97 = load i32, ptr %96, align 4
  %98 = call noundef i32 @_ZL21bilateral_slice_applyIffE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef %86, ptr noundef %87, ptr noundef %88, i32 %97, i32 noundef %89, i32 noundef %90, i32 noundef %91, i32 noundef %92, i32 noundef %93, i32 noundef %94, ptr noundef %95)
  store i32 %98, ptr %35, align 4, !tbaa !17
  br label %118

99:                                               ; preds = %83
  %100 = load i32, ptr %17, align 4, !tbaa !10
  %101 = icmp eq i32 %100, 6
  br i1 %101, label %102, label %116

102:                                              ; preds = %99
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !19
  %106 = load i32, ptr %20, align 4, !tbaa !14
  %107 = load i32, ptr %22, align 4, !tbaa !14
  %108 = load i32, ptr %23, align 4, !tbaa !14
  %109 = load i32, ptr %26, align 4, !tbaa !14
  %110 = load i32, ptr %27, align 4, !tbaa !14
  %111 = load i32, ptr %25, align 4, !tbaa !14
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.BilateralSliceApplyParamSpec, ptr %37, i32 0, i32 0
  %114 = load i32, ptr %113, align 4
  %115 = call noundef i32 @_ZL21bilateral_slice_applyIhfE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef %103, ptr noundef %104, ptr noundef %105, i32 %114, i32 noundef %106, i32 noundef %107, i32 noundef %108, i32 noundef %109, i32 noundef %110, i32 noundef %111, ptr noundef %112)
  store i32 %115, ptr %35, align 4, !tbaa !17
  br label %116

116:                                              ; preds = %102, %99
  br label %118

117:                                              ; preds = %83
  br label %118

118:                                              ; preds = %117, %116, %85
  %119 = load i32, ptr %35, align 4, !tbaa !17
  store i32 %119, ptr %10, align 4
  store i32 1, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %120

120:                                              ; preds = %118, %82, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  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 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %121 = load i32, ptr %10, align 4
  ret i32 %121
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #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: nounwind
declare i64 @syscall(i64 noundef, ...) #4

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

declare i32 @fflush(ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #2

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

; 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 hidden noundef i32 @_ZL21bilateral_slice_applyIffE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef, ptr noundef, ptr noundef, i32, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL21bilateral_slice_applyIhfE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef, ptr noundef, ptr noundef, i32, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !12, i64 8, i64 4, !14, i64 12, i64 80, !16}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTS8DataType", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS10DataFormat", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"_ZTS2EE", !7, i64 0}
!19 = !{i64 0, i64 4, !20}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS23BilateralSliceApplyMode", !7, i64 0}


; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z25bilateral_slice_apply_cpu10TensorDescPKvS_S1_S_S1_28BilateralSliceApplyParamSpecS_Pv(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr nocapture noundef readnone byval(%struct.TensorDesc) align 8 %2, ptr noundef %3, ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %4, ptr noundef %5, i32 %6, ptr nocapture noundef readnone byval(%struct.TensorDesc) align 8 %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #6
  %22 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0, ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17)
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %33, label %23

23:                                               ; preds = %9
  %24 = call i64 (i64, ...) @syscall(i64 noundef 186) #6
  %25 = trunc i64 %24 to i32
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %25)
  %27 = load ptr, ptr @stdout, align 8, !tbaa !5
  %28 = call i32 @fflush(ptr noundef %27)
  %29 = call ptr @ee2str(i32 noundef %22)
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %29)
  %31 = load ptr, ptr @stdout, align 8, !tbaa !5
  %32 = call i32 @fflush(ptr noundef %31)
  call void @exit(i32 noundef 1) #7
  unreachable

33:                                               ; preds = %9
  %34 = call noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4, ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef nonnull %21)
  %.not22 = icmp eq i32 %34, 0
  br i1 %.not22, label %45, label %35

35:                                               ; preds = %33
  %36 = call i64 (i64, ...) @syscall(i64 noundef 186) #6
  %37 = trunc i64 %36 to i32
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %37)
  %39 = load ptr, ptr @stdout, align 8, !tbaa !5
  %40 = call i32 @fflush(ptr noundef %39)
  %41 = call ptr @ee2str(i32 noundef %34)
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %41)
  %43 = load ptr, ptr @stdout, align 8, !tbaa !5
  %44 = call i32 @fflush(ptr noundef %43)
  call void @exit(i32 noundef 1) #7
  unreachable

45:                                               ; preds = %33
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = load i32, ptr %18, align 4, !tbaa !9
  %.not23 = icmp eq i32 %46, %47
  %48 = load i32, ptr %15, align 4
  %.not24 = icmp eq i32 %48, 3
  %or.cond = select i1 %.not23, i1 %.not24, i1 false
  br i1 %or.cond, label %49, label %69

49:                                               ; preds = %45
  %50 = load i32, ptr %19, align 4, !tbaa !9
  %51 = urem i32 %50, 12
  %.not25 = icmp eq i32 %51, 0
  br i1 %.not25, label %52, label %69

52:                                               ; preds = %49
  %53 = load i32, ptr %10, align 4, !tbaa !11
  switch i32 %53, label %69 [
    i32 6, label %54
    i32 0, label %60
  ]

54:                                               ; preds = %52
  %55 = load i32, ptr %16, align 4, !tbaa !9
  %56 = load i32, ptr %17, align 4, !tbaa !9
  %57 = load i32, ptr %20, align 4, !tbaa !9
  %58 = load i32, ptr %21, align 4, !tbaa !9
  %59 = call noundef i32 @_ZL21bilateral_slice_applyIffE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef %1, ptr noundef %3, ptr noundef %5, i32 %6, i32 noundef %46, i32 noundef %55, i32 noundef %56, i32 noundef %57, i32 noundef %58, i32 noundef %50, ptr noundef %8)
  br label %69

60:                                               ; preds = %52
  %61 = load i32, ptr %11, align 4, !tbaa !11
  %62 = icmp eq i32 %61, 6
  br i1 %62, label %63, label %69

63:                                               ; preds = %60
  %64 = load i32, ptr %16, align 4, !tbaa !9
  %65 = load i32, ptr %17, align 4, !tbaa !9
  %66 = load i32, ptr %20, align 4, !tbaa !9
  %67 = load i32, ptr %21, align 4, !tbaa !9
  %68 = call noundef i32 @_ZL21bilateral_slice_applyIhfE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef %1, ptr noundef %3, ptr noundef %5, i32 %6, i32 noundef %46, i32 noundef %64, i32 noundef %65, i32 noundef %66, i32 noundef %67, i32 noundef %50, ptr noundef %8)
  br label %69

69:                                               ; preds = %54, %63, %60, %52, %49, %45
  %.0 = phi i32 [ 2, %45 ], [ 2, %49 ], [ 51, %52 ], [ %68, %63 ], [ 51, %60 ], [ %59, %54 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  ret i32 %.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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z11tensor4dGet10TensorDescP8DataTypeP10DataFormatPjS4_S4_S4_(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #2

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

; 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 hidden noundef i32 @_ZL21bilateral_slice_applyIffE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef, ptr noundef, ptr noundef, i32, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL21bilateral_slice_applyIhfE2EEPKT_PKT0_S6_28BilateralSliceApplyParamSpeciiiiiiPS1_(ptr noundef, ptr noundef, ptr noundef, i32, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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, !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, !12, i64 0}
!12 = !{!"_ZTS8DataType", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass