; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_shape)

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

@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@RcsShapeDistFunc = external hidden global [14 x [14 x ptr]], align 16
@.str.91 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, 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: nounwind uwtable
declare dso_local ptr @RcsShape_name(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden double @RcsShape_noDistance(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @RcsShape_fprintDistanceFunctions(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %14

14:                                               ; preds = %30, %1
  %15 = load i64, ptr %4, align 8, !tbaa !9
  %16 = icmp ult i64 %15, 14
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %33

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %19 = load i64, ptr %4, align 8, !tbaa !9
  %20 = trunc i64 %19 to i32
  %21 = call ptr @RcsShape_name(i32 noundef %20)
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call i64 @strlen(ptr noundef %22) #5
  store i64 %23, ptr %6, align 8, !tbaa !9
  %24 = load i64, ptr %6, align 8, !tbaa !9
  %25 = load i64, ptr %3, align 8, !tbaa !9
  %26 = icmp ugt i64 %24, %25
  br i1 %26, label %27, label %29

27:                                               ; preds = %18
  %28 = load i64, ptr %6, align 8, !tbaa !9
  store i64 %28, ptr %3, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %27, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %30

30:                                               ; preds = %29
  %31 = load i64, ptr %4, align 8, !tbaa !9
  %32 = add i64 %31, 1
  store i64 %32, ptr %4, align 8, !tbaa !9
  br label %14, !llvm.loop !11

33:                                               ; preds = %17
  %34 = load i64, ptr %3, align 8, !tbaa !9
  %35 = add i64 %34, 4
  store i64 %35, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %45, %33
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = load i64, ptr %3, align 8, !tbaa !9
  %39 = add i64 %38, 2
  %40 = icmp ult i64 %37, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %48

42:                                               ; preds = %36
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.91) #4
  br label %45

45:                                               ; preds = %42
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = add i64 %46, 1
  store i64 %47, ptr %7, align 8, !tbaa !9
  br label %36, !llvm.loop !13

48:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !14
  br label %49

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

52:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %73

53:                                               ; preds = %49
  %54 = load i32, ptr %8, align 4, !tbaa !14
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %65, label %56

56:                                               ; preds = %53
  %57 = load i32, ptr %8, align 4, !tbaa !14
  %58 = icmp eq i32 %57, 6
  br i1 %58, label %65, label %59

59:                                               ; preds = %56
  %60 = load i32, ptr %8, align 4, !tbaa !14
  %61 = icmp eq i32 %60, 9
  br i1 %61, label %65, label %62

62:                                               ; preds = %59
  %63 = load i32, ptr %8, align 4, !tbaa !14
  %64 = icmp eq i32 %63, 13
  br i1 %64, label %65, label %66

65:                                               ; preds = %62, %59, %56, %53
  br label %70

66:                                               ; preds = %62
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !14
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.92, i32 noundef %68) #4
  br label %70

70:                                               ; preds = %66, %65
  %71 = load i32, ptr %8, align 4, !tbaa !14
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %8, align 4, !tbaa !14
  br label %49, !llvm.loop !16

73:                                               ; preds = %52
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %76

76:                                               ; preds = %151, %73
  %77 = load i32, ptr %9, align 4, !tbaa !14
  %78 = icmp slt i32 %77, 14
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %154

80:                                               ; preds = %76
  %81 = load i32, ptr %9, align 4, !tbaa !14
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %92, label %83

83:                                               ; preds = %80
  %84 = load i32, ptr %9, align 4, !tbaa !14
  %85 = icmp eq i32 %84, 6
  br i1 %85, label %92, label %86

86:                                               ; preds = %83
  %87 = load i32, ptr %9, align 4, !tbaa !14
  %88 = icmp eq i32 %87, 9
  br i1 %88, label %92, label %89

89:                                               ; preds = %86
  %90 = load i32, ptr %9, align 4, !tbaa !14
  %91 = icmp eq i32 %90, 13
  br i1 %91, label %92, label %93

92:                                               ; preds = %89, %86, %83, %80
  br label %151

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %94 = load i32, ptr %9, align 4, !tbaa !14
  %95 = call ptr @RcsShape_name(i32 noundef %94)
  store ptr %95, ptr %11, align 8, !tbaa !5
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = load i32, ptr %9, align 4, !tbaa !14
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.93, i32 noundef %97, ptr noundef %98) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %111, %93
  %101 = load i64, ptr %12, align 8, !tbaa !9
  %102 = load i64, ptr %3, align 8, !tbaa !9
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = call i64 @strlen(ptr noundef %103) #5
  %105 = sub i64 %102, %104
  %106 = icmp ult i64 %101, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %100
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %114

108:                                              ; preds = %100
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef @.str.91) #4
  br label %111

111:                                              ; preds = %108
  %112 = load i64, ptr %12, align 8, !tbaa !9
  %113 = add i64 %112, 1
  store i64 %113, ptr %12, align 8, !tbaa !9
  br label %100, !llvm.loop !17

114:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !14
  br label %115

115:                                              ; preds = %145, %114
  %116 = load i32, ptr %13, align 4, !tbaa !14
  %117 = icmp slt i32 %116, 14
  br i1 %117, label %119, label %118

118:                                              ; preds = %115
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %148

119:                                              ; preds = %115
  %120 = load i32, ptr %13, align 4, !tbaa !14
  %121 = icmp eq i32 %120, 0
  br i1 %121, label %131, label %122

122:                                              ; preds = %119
  %123 = load i32, ptr %13, align 4, !tbaa !14
  %124 = icmp eq i32 %123, 6
  br i1 %124, label %131, label %125

125:                                              ; preds = %122
  %126 = load i32, ptr %13, align 4, !tbaa !14
  %127 = icmp eq i32 %126, 9
  br i1 %127, label %131, label %128

128:                                              ; preds = %125
  %129 = load i32, ptr %13, align 4, !tbaa !14
  %130 = icmp eq i32 %129, 13
  br i1 %130, label %131, label %132

131:                                              ; preds = %128, %125, %122, %119
  br label %145

132:                                              ; preds = %128
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = load i32, ptr %9, align 4, !tbaa !14
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %135
  %137 = load i32, ptr %13, align 4, !tbaa !14
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [14 x ptr], ptr %136, i64 0, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = icmp eq ptr %140, @RcsShape_noDistance
  %142 = zext i1 %141 to i64
  %143 = select i1 %141, ptr @.str.95, ptr @.str.96
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.94, ptr noundef %143) #4
  br label %145

145:                                              ; preds = %132, %131
  %146 = load i32, ptr %13, align 4, !tbaa !14
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %13, align 4, !tbaa !14
  br label %115, !llvm.loop !18

148:                                              ; preds = %118
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %151

151:                                              ; preds = %148, %92
  %152 = load i32, ptr %9, align 4, !tbaa !14
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %9, align 4, !tbaa !14
  br label %76, !llvm.loop !19

154:                                              ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; 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.3 = external hidden unnamed_addr constant [2 x i8], align 1
@RcsShapeDistFunc = external hidden local_unnamed_addr global [14 x [14 x ptr]], align 16
@.str.91 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @RcsShape_name(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden double @RcsShape_noDistance(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @RcsShape_fprintDistanceFunctions(ptr nocapture noundef %0) local_unnamed_addr #1 {
  %2 = tail call ptr @RcsShape_name(i32 noundef 0)
  %3 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #4
  %4 = tail call ptr @RcsShape_name(i32 noundef 1)
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #4
  %spec.select.1 = tail call i64 @llvm.umax.i64(i64 %5, i64 %3)
  %6 = tail call ptr @RcsShape_name(i32 noundef 2)
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #4
  %spec.select.2 = tail call i64 @llvm.umax.i64(i64 %7, i64 %spec.select.1)
  %8 = tail call ptr @RcsShape_name(i32 noundef 3)
  %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %8) #4
  %spec.select.3 = tail call i64 @llvm.umax.i64(i64 %9, i64 %spec.select.2)
  %10 = tail call ptr @RcsShape_name(i32 noundef 4)
  %11 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %10) #4
  %spec.select.4 = tail call i64 @llvm.umax.i64(i64 %11, i64 %spec.select.3)
  %12 = tail call ptr @RcsShape_name(i32 noundef 5)
  %13 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %12) #4
  %spec.select.5 = tail call i64 @llvm.umax.i64(i64 %13, i64 %spec.select.4)
  %14 = tail call ptr @RcsShape_name(i32 noundef 6)
  %15 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %14) #4
  %spec.select.6 = tail call i64 @llvm.umax.i64(i64 %15, i64 %spec.select.5)
  %16 = tail call ptr @RcsShape_name(i32 noundef 7)
  %17 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %16) #4
  %spec.select.7 = tail call i64 @llvm.umax.i64(i64 %17, i64 %spec.select.6)
  %18 = tail call ptr @RcsShape_name(i32 noundef 8)
  %19 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %18) #4
  %spec.select.8 = tail call i64 @llvm.umax.i64(i64 %19, i64 %spec.select.7)
  %20 = tail call ptr @RcsShape_name(i32 noundef 9)
  %21 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %20) #4
  %spec.select.9 = tail call i64 @llvm.umax.i64(i64 %21, i64 %spec.select.8)
  %22 = tail call ptr @RcsShape_name(i32 noundef 10)
  %23 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %22) #4
  %spec.select.10 = tail call i64 @llvm.umax.i64(i64 %23, i64 %spec.select.9)
  %24 = tail call ptr @RcsShape_name(i32 noundef 11)
  %25 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %24) #4
  %spec.select.11 = tail call i64 @llvm.umax.i64(i64 %25, i64 %spec.select.10)
  %26 = tail call ptr @RcsShape_name(i32 noundef 12)
  %27 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %26) #4
  %spec.select.12 = tail call i64 @llvm.umax.i64(i64 %27, i64 %spec.select.11)
  %28 = tail call ptr @RcsShape_name(i32 noundef 13)
  %29 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %28) #4
  %spec.select.13 = tail call i64 @llvm.umax.i64(i64 %29, i64 %spec.select.12)
  %30 = add i64 %spec.select.13, 4
  %31 = add i64 %spec.select.13, 6
  %.not = icmp eq i64 %31, 0
  br i1 %.not, label %.loopexit112, label %.lr.ph

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.06674 = phi i64 [ %33, %.lr.ph ], [ 0, %1 ]
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.91) #5
  %33 = add nuw i64 %.06674, 1
  %exitcond.not = icmp eq i64 %33, %31
  br i1 %exitcond.not, label %.loopexit112, label %.lr.ph, !llvm.loop !5

.loopexit112:                                     ; preds = %.lr.ph, %1
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 1) #5
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 2) #5
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 3) #5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 4) #5
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 5) #5
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 7) #5
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 8) #5
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 10) #5
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 11) #5
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.92, i32 noundef 12) #5
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.3) #5
  br label %46

45:                                               ; preds = %110
  ret void

46:                                               ; preds = %.loopexit112, %110
  %indvars.iv = phi i64 [ 0, %.loopexit112 ], [ %indvars.iv.next, %110 ]
  %47 = trunc nuw nsw i64 %indvars.iv to i32
  %48 = and i32 %47, 11
  %49 = icmp eq i32 %48, 9
  br i1 %49, label %110, label %switch.early.test69

switch.early.test69:                              ; preds = %46
  switch i32 %47, label %50 [
    i32 6, label %110
    i32 0, label %110
  ]

50:                                               ; preds = %switch.early.test69
  %51 = tail call ptr @RcsShape_name(i32 noundef %47)
  %52 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.93, i32 noundef %47, ptr noundef %51) #5
  %53 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %51) #4
  %.not81 = icmp eq i64 %30, %53
  br i1 %.not81, label %.loopexit, label %.lr.ph78

.lr.ph78:                                         ; preds = %50, %.lr.ph78
  %.06277 = phi i64 [ %55, %.lr.ph78 ], [ 0, %50 ]
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.91) #5
  %55 = add nuw i64 %.06277, 1
  %56 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %51) #4
  %57 = sub i64 %30, %56
  %58 = icmp ult i64 %55, %57
  br i1 %58, label %.lr.ph78, label %.loopexit, !llvm.loop !7

.loopexit:                                        ; preds = %.lr.ph78, %50
  %59 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 1
  %60 = load ptr, ptr %59, align 8, !tbaa !8
  %61 = icmp eq ptr %60, @RcsShape_noDistance
  %62 = select i1 %61, ptr @.str.95, ptr @.str.96
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %62) #5
  %64 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 2
  %65 = load ptr, ptr %64, align 16, !tbaa !8
  %66 = icmp eq ptr %65, @RcsShape_noDistance
  %67 = select i1 %66, ptr @.str.95, ptr @.str.96
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %67) #5
  %69 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 3
  %70 = load ptr, ptr %69, align 8, !tbaa !8
  %71 = icmp eq ptr %70, @RcsShape_noDistance
  %72 = select i1 %71, ptr @.str.95, ptr @.str.96
  %73 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %72) #5
  %74 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 4
  %75 = load ptr, ptr %74, align 16, !tbaa !8
  %76 = icmp eq ptr %75, @RcsShape_noDistance
  %77 = select i1 %76, ptr @.str.95, ptr @.str.96
  %78 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %77) #5
  %79 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 5
  %80 = load ptr, ptr %79, align 8, !tbaa !8
  %81 = icmp eq ptr %80, @RcsShape_noDistance
  %82 = select i1 %81, ptr @.str.95, ptr @.str.96
  %83 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %82) #5
  %84 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 7
  %85 = load ptr, ptr %84, align 8, !tbaa !8
  %86 = icmp eq ptr %85, @RcsShape_noDistance
  %87 = select i1 %86, ptr @.str.95, ptr @.str.96
  %88 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %87) #5
  %89 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 8
  %90 = load ptr, ptr %89, align 16, !tbaa !8
  %91 = icmp eq ptr %90, @RcsShape_noDistance
  %92 = select i1 %91, ptr @.str.95, ptr @.str.96
  %93 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %92) #5
  %94 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 10
  %95 = load ptr, ptr %94, align 16, !tbaa !8
  %96 = icmp eq ptr %95, @RcsShape_noDistance
  %97 = select i1 %96, ptr @.str.95, ptr @.str.96
  %98 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %97) #5
  %99 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 11
  %100 = load ptr, ptr %99, align 8, !tbaa !8
  %101 = icmp eq ptr %100, @RcsShape_noDistance
  %102 = select i1 %101, ptr @.str.95, ptr @.str.96
  %103 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %102) #5
  %104 = getelementptr inbounds [14 x [14 x ptr]], ptr @RcsShapeDistFunc, i64 0, i64 %indvars.iv, i64 12
  %105 = load ptr, ptr %104, align 16, !tbaa !8
  %106 = icmp eq ptr %105, @RcsShape_noDistance
  %107 = select i1 %106, ptr @.str.95, ptr @.str.96
  %108 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.94, ptr noundef nonnull %107) #5
  %109 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.3) #5
  br label %110

110:                                              ; preds = %switch.early.test69, %switch.early.test69, %46, %.loopexit
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond86.not = icmp eq i64 %indvars.iv.next, 14
  br i1 %exitcond86.not, label %45, label %46, !llvm.loop !12
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #3

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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind willreturn memory(read) }
attributes #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = distinct !{!12, !6}


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