; LLVM IR from JoshuaSBrown/QC_Tools :: src/libcatnip (qc_functions)

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

%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.catnip::LogData" = type { %"struct.std::pair.8" }
%"struct.std::pair.8" = type { ptr, ptr }
%"struct.catnip::LogData.10" = type { i8 }
%"class.catnip::TransferComplex" = type <{ ptr, ptr, ptr, %"struct.std::pair.26", %"struct.std::pair.26", ptr, ptr, i8, i8, [6 x i8] }>
%"struct.std::pair.26" = type { i32, i32 }

@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [57 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6catnip3LogISt4pairIONS_4NoneEPKcEEEvS5_iONS_7LogDataIT_EEi(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6catnip15TransferComplex10unscrambleERKNS_6MatrixES3_S3_RKSt6vectorIiSaIiEES8_(ptr noundef nonnull align 8 dereferenceable(58) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) #1 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector.14", align 8
  %15 = alloca %"struct.catnip::LogData", align 8
  %16 = alloca %"struct.catnip::LogData.10", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.std::vector.14", align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.std::vector.14", align 8
  %24 = alloca %"class.std::vector.14", align 8
  %25 = alloca %"struct.catnip::LogData", align 8
  %26 = alloca %"struct.catnip::LogData.10", align 1
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %7, align 8
  %30 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 7
  store i8 1, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 4, ptr %13, align 4, !tbaa !14
  %31 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 8
  %32 = load i8, ptr %31, align 1, !tbaa !15, !range !16, !noundef !17
  %33 = trunc i8 %32 to i1
  br i1 %33, label %34, label %92

34:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(24) %36, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @llvm.memset.p0.i64(ptr align 1 %16, i8 0, i64 1, i1 false)
  %37 = call { ptr, ptr } @_ZN6catniplsINS_4NoneELm61EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 1 dereferenceable(61) @.str.24) #5
  %38 = getelementptr inbounds %"struct.catnip::LogData", ptr %15, i32 0, i32 0
  %39 = getelementptr inbounds { ptr, ptr }, ptr %38, i32 0, i32 0
  %40 = extractvalue { ptr, ptr } %37, 0
  store ptr %40, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, ptr }, ptr %38, i32 0, i32 1
  %42 = extractvalue { ptr, ptr } %37, 1
  store ptr %42, ptr %41, align 8
  invoke void @_ZN6catnip3LogISt4pairIONS_4NoneEPKcEEEvS5_iONS_7LogDataIT_EEi(ptr noundef @.str.2, i32 noundef 641, ptr noundef nonnull align 8 dereferenceable(16) %15, i32 noundef 2)
          to label %43 unwind label %68

43:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = invoke noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef %46)
          to label %48 unwind label %72

48:                                               ; preds = %43
  store ptr %47, ptr %19, align 8, !tbaa !5
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  %50 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 1
  store ptr %49, ptr %50, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 8 dereferenceable(24) %52, i32 noundef 4)
          to label %53 unwind label %76

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !19
  %57 = invoke noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef %56)
          to label %58 unwind label %80

58:                                               ; preds = %53
  store ptr %57, ptr %21, align 8, !tbaa !5
  %59 = load ptr, ptr %21, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 2
  store ptr %59, ptr %60, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 5
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = invoke noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef %63)
          to label %65 unwind label %84

65:                                               ; preds = %58
  store ptr %64, ptr %22, align 8, !tbaa !5
  %66 = load ptr, ptr %22, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 5
  store ptr %66, ptr %67, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  br label %138

68:                                               ; preds = %34
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %17, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %91

72:                                               ; preds = %43
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %17, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %18, align 4
  br label %90

76:                                               ; preds = %48
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %17, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %18, align 4
  br label %89

80:                                               ; preds = %53
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %17, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %18, align 4
  br label %88

84:                                               ; preds = %58
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %17, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  br label %89

89:                                               ; preds = %88, %76
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  br label %90

90:                                               ; preds = %89, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %91

91:                                               ; preds = %90, %68
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  br label %139

92:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %93, ptr noundef nonnull align 8 dereferenceable(24) %94, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #5
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8 %24, ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %96, i32 noundef 4)
          to label %97 unwind label %119

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #5
  call void @llvm.memset.p0.i64(ptr align 1 %26, i8 0, i64 1, i1 false)
  %98 = call { ptr, ptr } @_ZN6catniplsINS_4NoneELm57EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 1 dereferenceable(57) @.str.25) #5
  %99 = getelementptr inbounds %"struct.catnip::LogData", ptr %25, i32 0, i32 0
  %100 = getelementptr inbounds { ptr, ptr }, ptr %99, i32 0, i32 0
  %101 = extractvalue { ptr, ptr } %98, 0
  store ptr %101, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, ptr }, ptr %99, i32 0, i32 1
  %103 = extractvalue { ptr, ptr } %98, 1
  store ptr %103, ptr %102, align 8
  invoke void @_ZN6catnip3LogISt4pairIONS_4NoneEPKcEEEvS5_iONS_7LogDataIT_EEi(ptr noundef @.str.2, i32 noundef 664, ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 2)
          to label %104 unwind label %123

104:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = invoke noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %105, ptr noundef %107)
          to label %109 unwind label %127

109:                                              ; preds = %104
  store ptr %108, ptr %27, align 8, !tbaa !5
  %110 = load ptr, ptr %27, align 8, !tbaa !5
  %111 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 2
  store ptr %110, ptr %111, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 5
  %114 = load ptr, ptr %113, align 8, !tbaa !20
  %115 = invoke noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %112, ptr noundef %114)
          to label %116 unwind label %131

116:                                              ; preds = %109
  store ptr %115, ptr %28, align 8, !tbaa !5
  %117 = load ptr, ptr %28, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.catnip::TransferComplex", ptr %29, i32 0, i32 5
  store ptr %117, ptr %118, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  br label %138

119:                                              ; preds = %92
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %17, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %18, align 4
  br label %137

123:                                              ; preds = %97
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %17, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %136

127:                                              ; preds = %104
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %17, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %18, align 4
  br label %135

131:                                              ; preds = %109
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %17, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %135

135:                                              ; preds = %131, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %136

136:                                              ; preds = %135, %123
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  br label %137

137:                                              ; preds = %136, %119
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  br label %139

138:                                              ; preds = %116, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  ret void

139:                                              ; preds = %137, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %17, align 8
  %142 = load i32, ptr %18, align 4
  %143 = insertvalue { ptr, i32 } poison, ptr %141, 0
  %144 = insertvalue { ptr, i32 } %143, i32 %142, 1
  resume { ptr, i32 } %144
}

declare void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, ptr } @_ZN6catniplsINS_4NoneELm61EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(61)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, ptr } @_ZN6catniplsINS_4NoneELm57EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(57)) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 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 = { 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, !13, i64 56}
!10 = !{!"_ZTSN6catnip15TransferComplexE", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !13, i64 57}
!11 = !{!"_ZTSSt4pairIiiE", !12, i64 0, !12, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!10, !13, i64 57}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !6, i64 8}
!19 = !{!10, !6, i64 16}
!20 = !{!10, !6, i64 40}


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

%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.catnip::LogData" = type { %"struct.std::pair.8" }
%"struct.std::pair.8" = type { ptr, ptr }
%"struct.catnip::LogData.10" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [57 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6catnip3LogISt4pairIONS_4NoneEPKcEEEvS5_iONS_7LogDataIT_EEi(ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6catnip15TransferComplex10unscrambleERKNS_6MatrixES3_S3_RKSt6vectorIiSaIiEES8_(ptr nocapture noundef nonnull align 8 dereferenceable(58) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::vector.14", align 8
  %8 = alloca %"struct.catnip::LogData", align 8
  %9 = alloca %"struct.catnip::LogData.10", align 1
  %10 = alloca %"class.std::vector.14", align 8
  %11 = alloca %"class.std::vector.14", align 8
  %12 = alloca %"class.std::vector.14", align 8
  %13 = alloca %"struct.catnip::LogData", align 8
  %14 = alloca %"struct.catnip::LogData.10", align 1
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  store i8 1, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 57
  %17 = load i8, ptr %16, align 1, !tbaa !13, !range !14, !noundef !15
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %19, label %51

19:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.14") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  store i8 0, ptr %9, align 1
  %20 = call { ptr, ptr } @_ZN6catniplsINS_4NoneELm61EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(61) @.str.24) #4
  %21 = extractvalue { ptr, ptr } %20, 0
  store ptr %21, ptr %8, align 8
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  %23 = extractvalue { ptr, ptr } %20, 1
  store ptr %23, ptr %22, align 8
  invoke void @_ZN6catnip3LogISt4pairIONS_4NoneEPKcEEEvS5_iONS_7LogDataIT_EEi(ptr noundef nonnull @.str.2, i32 noundef 641, ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef 2)
          to label %24 unwind label %38

24:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = invoke noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef %26)
          to label %28 unwind label %40

28:                                               ; preds = %24
  store ptr %27, ptr %25, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  invoke void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.14") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 4)
          to label %29 unwind label %42

29:                                               ; preds = %28
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = invoke noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %31)
          to label %33 unwind label %44

33:                                               ; preds = %29
  store ptr %32, ptr %30, align 8, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = invoke noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %35)
          to label %37 unwind label %46

37:                                               ; preds = %33
  store ptr %36, ptr %34, align 8, !tbaa !18
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %76

38:                                               ; preds = %19
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %50

40:                                               ; preds = %24
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %50

42:                                               ; preds = %28
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %49

44:                                               ; preds = %29
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %33
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %48

48:                                               ; preds = %46, %44
  %.pn31 = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %49

49:                                               ; preds = %48, %42
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %48 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  br label %50

50:                                               ; preds = %40, %49, %38
  %.pn31.pn.pn.pn = phi { ptr, i32 } [ %39, %38 ], [ %.pn31.pn, %49 ], [ %41, %40 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %77

51:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.14") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  invoke void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.14") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 4)
          to label %52 unwind label %66

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #4
  store i8 0, ptr %14, align 1
  %53 = call { ptr, ptr } @_ZN6catniplsINS_4NoneELm57EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1) %14, ptr noundef nonnull align 1 dereferenceable(57) @.str.25) #4
  %54 = extractvalue { ptr, ptr } %53, 0
  store ptr %54, ptr %13, align 8
  %55 = getelementptr inbounds i8, ptr %13, i64 8
  %56 = extractvalue { ptr, ptr } %53, 1
  store ptr %56, ptr %55, align 8
  invoke void @_ZN6catnip3LogISt4pairIONS_4NoneEPKcEEEvS5_iONS_7LogDataIT_EEi(ptr noundef nonnull @.str.2, i32 noundef 664, ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 2)
          to label %57 unwind label %68

57:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = invoke noundef ptr @_ZN6catnip15unscramble_CoefERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %59)
          to label %61 unwind label %70

61:                                               ; preds = %57
  store ptr %60, ptr %58, align 8, !tbaa !17
  %62 = getelementptr inbounds i8, ptr %0, i64 40
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = invoke noundef ptr @_ZN6catnip12unscramble_SERKSt6vectorIiSaIiEES4_S4_PNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef %63)
          to label %65 unwind label %72

65:                                               ; preds = %61
  store ptr %64, ptr %62, align 8, !tbaa !18
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %76

66:                                               ; preds = %51
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %75

68:                                               ; preds = %52
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #4
  br label %74

70:                                               ; preds = %57
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %61
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %74

74:                                               ; preds = %70, %72, %68
  %.pn.pn = phi { ptr, i32 } [ %69, %68 ], [ %73, %72 ], [ %71, %70 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  br label %75

75:                                               ; preds = %74, %66
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %74 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %77

76:                                               ; preds = %65, %37
  ret void

77:                                               ; preds = %75, %50
  %.pn31.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn.pn, %50 ], [ %.pn.pn.pn, %75 ]
  resume { ptr, i32 } %.pn31.pn.pn.pn.pn
}

declare void @_ZNK6catnip6Matrix8matchColERKS0_i(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, ptr } @_ZN6catniplsINS_4NoneELm61EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(61)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, ptr } @_ZN6catniplsINS_4NoneELm57EEENS_7LogDataISt4pairIOT_PKcEEEONS2_IS4_EERAT0__S6_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(57)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !12, i64 56}
!6 = !{!"_ZTSN6catnip15TransferComplexE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 48, !12, i64 56, !12, i64 57}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt4pairIiiE", !11, i64 0, !11, i64 4}
!11 = !{!"int", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!6, !12, i64 57}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !7, i64 16}
!18 = !{!6, !7, i64 40}


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