; LLVM IR from interpretml/interpret :: shared/libebm (InteractionShell)

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

@g_traceLevel = external global i32, align 4
@_ZZ25CreateInteractionDetectorE13LOG__sMessage = external hidden constant [176 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_0 = external hidden constant [64 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_1 = external hidden constant [79 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_2 = external hidden constant [51 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_3 = external hidden constant [69 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_4 = external hidden constant [58 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_5 = external hidden constant [48 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_6 = external hidden constant [59 x i8], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN16InteractionShell4FreeEPS0_(ptr noundef) #0 align 2

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

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) #2

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

declare void @_ZN14NAMESPACE_MAIN15InteractionCore4FreeEPS0_(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell6CreateEPNS_15InteractionCoreE(ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @CreateInteractionDetector(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #0 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %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 i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store i32 %4, ptr %15, align 4, !tbaa !9
  store i32 %5, ptr %16, align 4, !tbaa !9
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 3, ptr %20, align 4, !tbaa !9
  %39 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %40 = icmp sle i32 3, %39
  br i1 %40, label %41, label %51

41:                                               ; preds = %38
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = load i32, ptr %15, align 4, !tbaa !9
  %47 = load i32, ptr %16, align 4, !tbaa !9
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = load ptr, ptr %19, align 8, !tbaa !5
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef 3, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage, ptr noundef %42, ptr noundef %43, ptr noundef %44, ptr noundef %45, i32 noundef %46, i32 noundef %47, ptr noundef %48, ptr noundef %49, ptr noundef %50)
  br label %51

51:                                               ; preds = %41, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %53 = load ptr, ptr %19, align 8, !tbaa !5
  %54 = icmp eq ptr null, %53
  br i1 %54, label %55, label %63

55:                                               ; preds = %52
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 1, ptr %22, align 4, !tbaa !9
  %57 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %58 = icmp sle i32 1, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %56
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_0)
  br label %60

60:                                               ; preds = %59, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %61

61:                                               ; preds = %60
  br label %62

62:                                               ; preds = %61
  store i32 -3, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %210

63:                                               ; preds = %52
  %64 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr null, ptr %64, align 8, !tbaa !5
  %65 = load i32, ptr %15, align 4, !tbaa !9
  %66 = and i32 %65, -8
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %76

68:                                               ; preds = %63
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 1, ptr %24, align 4, !tbaa !9
  %70 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %71 = icmp sle i32 1, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %69
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_1)
  br label %73

73:                                               ; preds = %72, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %63
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = icmp eq ptr null, %77
  br i1 %78, label %79, label %87

79:                                               ; preds = %76
  br label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 1, ptr %25, align 4, !tbaa !9
  %81 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %82 = icmp sle i32 1, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_2)
  br label %84

84:                                               ; preds = %83, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  store i32 -3, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %210

87:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = call noundef i32 @_ZN14NAMESPACE_MAIN22GetDataSetSharedHeaderEPKhPmS2_S2_S2_(ptr noundef %88, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29)
  store i32 %89, ptr %21, align 4, !tbaa !9
  %90 = load i32, ptr %21, align 4, !tbaa !9
  %91 = icmp ne i32 0, %90
  br i1 %91, label %92, label %94

92:                                               ; preds = %87
  %93 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %93, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %209

94:                                               ; preds = %87
  %95 = load i64, ptr %26, align 8, !tbaa !11
  %96 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %95) #6
  br i1 %96, label %97, label %105

97:                                               ; preds = %94
  br label %98

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 1, ptr %30, align 4, !tbaa !9
  %99 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %100 = icmp sle i32 1, %99
  br i1 %100, label %101, label %102

101:                                              ; preds = %98
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_3)
  br label %102

102:                                              ; preds = %101, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103
  store i32 -3, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %209

105:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %106 = load i64, ptr %26, align 8, !tbaa !11
  store i64 %106, ptr %31, align 8, !tbaa !11
  %107 = load i64, ptr %28, align 8, !tbaa !11
  %108 = icmp ult i64 1, %107
  br i1 %108, label %109, label %117

109:                                              ; preds = %105
  br label %110

110:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 2, ptr %32, align 4, !tbaa !9
  %111 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %112 = icmp sle i32 2, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %110
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_4)
  br label %114

114:                                              ; preds = %113, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  store i32 -3, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %208

117:                                              ; preds = %105
  %118 = load i64, ptr %29, align 8, !tbaa !11
  %119 = icmp ne i64 1, %118
  br i1 %119, label %120, label %128

120:                                              ; preds = %117
  br label %121

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 2, ptr %33, align 4, !tbaa !9
  %122 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %123 = icmp sle i32 2, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %121
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_5)
  br label %125

125:                                              ; preds = %124, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  store i32 -3, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %208

128:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  store ptr null, ptr %34, align 8, !tbaa !5
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = load i64, ptr %31, align 8, !tbaa !11
  %131 = load i64, ptr %27, align 8, !tbaa !11
  %132 = load i64, ptr %28, align 8, !tbaa !11
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = load i32, ptr %15, align 4, !tbaa !9
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = load ptr, ptr %17, align 8, !tbaa !5
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  %138 = call noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore6CreateEPKhmmmPKaiiPKcPKdPPS0_(ptr noundef %129, i64 noundef %130, i64 noundef %131, i64 noundef %132, ptr noundef %133, i32 noundef %134, i32 noundef %135, ptr noundef %136, ptr noundef %137, ptr noundef %34)
  store i32 %138, ptr %21, align 4, !tbaa !9
  %139 = load i32, ptr %21, align 4, !tbaa !9
  %140 = icmp ne i32 0, %139
  br i1 %140, label %141, label %144

141:                                              ; preds = %128
  %142 = load ptr, ptr %34, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN15InteractionCore4FreeEPS0_(ptr noundef %142)
  %143 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %143, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %207

144:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %145 = load ptr, ptr %34, align 8, !tbaa !5
  %146 = call noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell6CreateEPNS_15InteractionCoreE(ptr noundef %145)
  store ptr %146, ptr %35, align 8, !tbaa !5
  %147 = load ptr, ptr %35, align 8, !tbaa !5
  %148 = icmp eq ptr null, %147
  %149 = xor i1 %148, true
  %150 = xor i1 %149, true
  %151 = zext i1 %150 to i64
  %152 = call i64 @llvm.expect.i64(i64 %151, i64 0)
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %154, label %156

154:                                              ; preds = %144
  %155 = load ptr, ptr %34, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN15InteractionCore4FreeEPS0_(ptr noundef %155)
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %206

156:                                              ; preds = %144
  %157 = load ptr, ptr %34, align 8, !tbaa !5
  %158 = call noundef i64 @_ZNK14NAMESPACE_MAIN15InteractionCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(392) %157)
  %159 = icmp ne i64 0, %158
  br i1 %159, label %160, label %193

160:                                              ; preds = %156
  %161 = load ptr, ptr %34, align 8, !tbaa !5
  %162 = call noundef zeroext i1 @_ZN14NAMESPACE_MAIN15InteractionCore6IsRmseEv(ptr noundef nonnull align 8 dereferenceable(392) %161)
  br i1 %162, label %177, label %163

163:                                              ; preds = %160
  %164 = load ptr, ptr %34, align 8, !tbaa !5
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  %166 = load i64, ptr %28, align 8, !tbaa !11
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = load ptr, ptr %13, align 8, !tbaa !5
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = call noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore41InitializeInteractionGradientsAndHessiansEPKhmPKdPKaS4_(ptr noundef nonnull align 8 dereferenceable(392) %164, ptr noundef %165, i64 noundef %166, ptr noundef %167, ptr noundef %168, ptr noundef %169)
  store i32 %170, ptr %21, align 4, !tbaa !9
  %171 = load i32, ptr %21, align 4, !tbaa !9
  %172 = icmp ne i32 0, %171
  br i1 %172, label %173, label %176

173:                                              ; preds = %163
  %174 = load ptr, ptr %35, align 8, !tbaa !5
  call void @_ZN14NAMESPACE_MAIN16InteractionShell4FreeEPS0_(ptr noundef %174)
  %175 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %175, ptr %10, align 4
  store i32 1, ptr %23, align 4
  br label %206

176:                                              ; preds = %163
  br label %192

177:                                              ; preds = %160
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = load i64, ptr %28, align 8, !tbaa !11
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = icmp eq ptr null, %180
  br i1 %181, label %182, label %183

182:                                              ; preds = %177
  br label %186

183:                                              ; preds = %177
  %184 = load ptr, ptr %12, align 8, !tbaa !5
  %185 = load double, ptr %184, align 8, !tbaa !13
  br label %186

186:                                              ; preds = %183, %182
  %187 = phi double [ 0.000000e+00, %182 ], [ %185, %183 ]
  %188 = load ptr, ptr %13, align 8, !tbaa !5
  %189 = load ptr, ptr %14, align 8, !tbaa !5
  %190 = load ptr, ptr %34, align 8, !tbaa !5
  %191 = call noundef ptr @_ZN14NAMESPACE_MAIN15InteractionCore21GetDataSetInteractionEv(ptr noundef nonnull align 8 dereferenceable(392) %190)
  call void @_ZN14NAMESPACE_MAIN45InitializeRmseGradientsAndHessiansInteractionEPKhmdPKaPKdPNS_18DataSetInteractionE(ptr noundef %178, i64 noundef %179, double noundef %187, ptr noundef %188, ptr noundef %189, ptr noundef %191)
  br label %192

192:                                              ; preds = %186, %176
  br label %193

193:                                              ; preds = %192, %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %194 = load ptr, ptr %35, align 8, !tbaa !5
  %195 = call noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell9GetHandleEv(ptr noundef nonnull align 8 dereferenceable(56) %194)
  store ptr %195, ptr %36, align 8, !tbaa !5
  br label %196

196:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 3, ptr %37, align 4, !tbaa !9
  %197 = load i32, ptr @g_traceLevel, align 4, !tbaa !9
  %198 = icmp sle i32 3, %197
  br i1 %198, label %199, label %201

199:                                              ; preds = %196
  %200 = load ptr, ptr %36, align 8, !tbaa !5
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef 3, ptr noundef @_ZZ25CreateInteractionDetectorE13LOG__sMessage_6, ptr noundef %200)
  br label %201

201:                                              ; preds = %199, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %36, align 8, !tbaa !5
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %204, ptr %205, align 8, !tbaa !5
  store i32 0, ptr %10, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  br label %206

206:                                              ; preds = %203, %173, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %207

207:                                              ; preds = %206, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %208

208:                                              ; preds = %207, %127, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %209

209:                                              ; preds = %208, %104, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %210

210:                                              ; preds = %209, %86, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  %211 = load i32, ptr %10, align 4
  ret i32 %211
}

declare void @InteralLogWithArguments(i32 noundef, ptr noundef, ...) #2

declare noundef i32 @_ZN14NAMESPACE_MAIN22GetDataSetSharedHeaderEPKhPmS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef) #4

declare noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore6CreateEPKhmmmPKaiiPKcPKdPPS0_(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN15InteractionCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(392)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN14NAMESPACE_MAIN15InteractionCore6IsRmseEv(ptr noundef nonnull align 8 dereferenceable(392)) #5 align 2

declare noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore41InitializeInteractionGradientsAndHessiansEPKhmPKdPKaS4_(ptr noundef nonnull align 8 dereferenceable(392), ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @_ZN14NAMESPACE_MAIN45InitializeRmseGradientsAndHessiansInteractionEPKhmdPKaPKdPNS_18DataSetInteractionE(ptr noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN15InteractionCore21GetDataSetInteractionEv(ptr noundef nonnull align 8 dereferenceable(392)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell9GetHandleEv(ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

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 = { "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 willreturn memory(none) }
attributes #4 = { 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 #5 = { inlinehint 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 #6 = { 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 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !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"

@g_traceLevel = external local_unnamed_addr global i32, align 4
@_ZZ25CreateInteractionDetectorE13LOG__sMessage = external hidden constant [176 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_0 = external hidden constant [64 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_1 = external hidden constant [79 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_2 = external hidden constant [51 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_3 = external hidden constant [69 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_4 = external hidden constant [58 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_5 = external hidden constant [48 x i8], align 16
@_ZZ25CreateInteractionDetectorE13LOG__sMessage_6 = external hidden constant [59 x i8], align 16

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14NAMESPACE_MAIN16InteractionShell4FreeEPS0_(ptr noundef) local_unnamed_addr #0 align 2

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

declare void @InteralLogWithoutArguments(i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN14NAMESPACE_MAIN15InteractionCore4FreeEPS0_(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell6CreateEPNS_15InteractionCoreE(ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @CreateInteractionDetector(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 2
  br i1 %16, label %17, label %18

17:                                               ; preds = %9
  tail call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef 3, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8)
  br label %18

18:                                               ; preds = %17, %9
  %19 = icmp eq ptr %8, null
  br i1 %19, label %20, label %24

20:                                               ; preds = %18
  %21 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %23, label %94

23:                                               ; preds = %20
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_0)
  br label %94

24:                                               ; preds = %18
  store ptr null, ptr %8, align 8, !tbaa !9
  %.not = icmp ugt i32 %4, 7
  %25 = load i32, ptr @g_traceLevel, align 4
  %26 = icmp sgt i32 %25, 0
  %or.cond = select i1 %.not, i1 %26, i1 false
  br i1 %or.cond, label %27, label %28

27:                                               ; preds = %24
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_1)
  br label %28

28:                                               ; preds = %27, %24
  %29 = icmp eq ptr %0, null
  br i1 %29, label %30, label %34

30:                                               ; preds = %28
  %31 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %94

33:                                               ; preds = %30
  tail call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_2)
  br label %94

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %35 = call noundef i32 @_ZN14NAMESPACE_MAIN22GetDataSetSharedHeaderEPKhPmS2_S2_S2_(ptr noundef nonnull %0, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %.not49 = icmp eq i32 %35, 0
  br i1 %.not49, label %36, label %93

36:                                               ; preds = %34
  %37 = load i64, ptr %10, align 8, !tbaa !11
  %38 = call noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef %37) #5
  br i1 %38, label %39, label %43

39:                                               ; preds = %36
  %40 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %42, label %93

42:                                               ; preds = %39
  call void @InteralLogWithoutArguments(i32 noundef 1, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_3)
  br label %93

43:                                               ; preds = %36
  %44 = load i64, ptr %10, align 8, !tbaa !11
  %45 = load i64, ptr %12, align 8, !tbaa !11
  %46 = icmp ugt i64 %45, 1
  br i1 %46, label %47, label %51

47:                                               ; preds = %43
  %48 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %49 = icmp sgt i32 %48, 1
  br i1 %49, label %50, label %93

50:                                               ; preds = %47
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_4)
  br label %93

51:                                               ; preds = %43
  %52 = load i64, ptr %13, align 8, !tbaa !11
  %.not50 = icmp eq i64 %52, 1
  br i1 %.not50, label %57, label %53

53:                                               ; preds = %51
  %54 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 1
  br i1 %55, label %56, label %93

56:                                               ; preds = %53
  call void @InteralLogWithoutArguments(i32 noundef 2, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_5)
  br label %93

57:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  store ptr null, ptr %14, align 8, !tbaa !9
  %58 = load i64, ptr %11, align 8, !tbaa !11
  %59 = call noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore6CreateEPKhmmmPKaiiPKcPKdPPS0_(ptr noundef nonnull %0, i64 noundef %44, i64 noundef %58, i64 noundef %45, ptr noundef %2, i32 noundef %4, i32 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %14)
  %.not51 = icmp eq i32 %59, 0
  %60 = load ptr, ptr %14, align 8, !tbaa !9
  br i1 %.not51, label %62, label %61

61:                                               ; preds = %57
  call void @_ZN14NAMESPACE_MAIN15InteractionCore4FreeEPS0_(ptr noundef %60)
  br label %92

62:                                               ; preds = %57
  %63 = call noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell6CreateEPNS_15InteractionCoreE(ptr noundef %60)
  %64 = icmp eq ptr %63, null
  %65 = load ptr, ptr %14, align 8, !tbaa !9
  br i1 %64, label %66, label %67, !prof !13

66:                                               ; preds = %62
  call void @_ZN14NAMESPACE_MAIN15InteractionCore4FreeEPS0_(ptr noundef %65)
  br label %92

67:                                               ; preds = %62
  %68 = call noundef i64 @_ZNK14NAMESPACE_MAIN15InteractionCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(392) %65)
  %.not52 = icmp eq i64 %68, 0
  br i1 %.not52, label %86, label %69

69:                                               ; preds = %67
  %70 = load ptr, ptr %14, align 8, !tbaa !9
  %71 = call noundef zeroext i1 @_ZN14NAMESPACE_MAIN15InteractionCore6IsRmseEv(ptr noundef nonnull align 8 dereferenceable(392) %70)
  br i1 %71, label %77, label %72

72:                                               ; preds = %69
  %73 = load ptr, ptr %14, align 8, !tbaa !9
  %74 = load i64, ptr %12, align 8, !tbaa !11
  %75 = call noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore41InitializeInteractionGradientsAndHessiansEPKhmPKdPKaS4_(ptr noundef nonnull align 8 dereferenceable(392) %73, ptr noundef nonnull %0, i64 noundef %74, ptr noundef %1, ptr noundef %2, ptr noundef %3)
  %.not53 = icmp eq i32 %75, 0
  br i1 %.not53, label %86, label %76

76:                                               ; preds = %72
  call void @_ZN14NAMESPACE_MAIN16InteractionShell4FreeEPS0_(ptr noundef nonnull %63)
  br label %92

77:                                               ; preds = %69
  %78 = load i64, ptr %12, align 8, !tbaa !11
  %79 = icmp eq ptr %1, null
  br i1 %79, label %82, label %80

80:                                               ; preds = %77
  %81 = load double, ptr %1, align 8, !tbaa !14
  br label %82

82:                                               ; preds = %77, %80
  %83 = phi double [ %81, %80 ], [ 0.000000e+00, %77 ]
  %84 = load ptr, ptr %14, align 8, !tbaa !9
  %85 = call noundef ptr @_ZN14NAMESPACE_MAIN15InteractionCore21GetDataSetInteractionEv(ptr noundef nonnull align 8 dereferenceable(392) %84)
  call void @_ZN14NAMESPACE_MAIN45InitializeRmseGradientsAndHessiansInteractionEPKhmdPKaPKdPNS_18DataSetInteractionE(ptr noundef nonnull %0, i64 noundef %78, double noundef %83, ptr noundef %2, ptr noundef %3, ptr noundef %85)
  br label %86

86:                                               ; preds = %82, %72, %67
  %87 = call noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell9GetHandleEv(ptr noundef nonnull align 8 dereferenceable(56) %63)
  %88 = load i32, ptr @g_traceLevel, align 4, !tbaa !5
  %89 = icmp sgt i32 %88, 2
  br i1 %89, label %90, label %91

90:                                               ; preds = %86
  call void (i32, ptr, ...) @InteralLogWithArguments(i32 noundef 3, ptr noundef nonnull @_ZZ25CreateInteractionDetectorE13LOG__sMessage_6, ptr noundef %87)
  br label %91

91:                                               ; preds = %90, %86
  store ptr %87, ptr %8, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %66, %76, %91, %61
  %.1 = phi i32 [ %59, %61 ], [ -1, %66 ], [ 0, %91 ], [ %75, %76 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %93

93:                                               ; preds = %92, %50, %47, %56, %53, %39, %42, %34
  %.3 = phi i32 [ %35, %34 ], [ -3, %42 ], [ -3, %39 ], [ %.1, %92 ], [ -3, %50 ], [ -3, %47 ], [ -3, %56 ], [ -3, %53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %94

94:                                               ; preds = %30, %33, %20, %23, %93
  %.4 = phi i32 [ %.3, %93 ], [ -3, %23 ], [ -3, %20 ], [ -3, %33 ], [ -3, %30 ]
  ret i32 %.4
}

declare void @InteralLogWithArguments(i32 noundef, ptr noundef, ...) local_unnamed_addr #2

declare noundef i32 @_ZN14NAMESPACE_MAIN22GetDataSetSharedHeaderEPKhPmS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN14NAMESPACE_MAINL14IsConvertErrorImmEENSt9enable_ifIXaaaantsr3std9is_signedIT_EE5valuentsr3std9is_signedIT0_EE5valueleclsr3std14numeric_limitsIS3_EE3maxEclsr3std14numeric_limitsIS2_EE3maxEEbE4typeES3_(i64 noundef) local_unnamed_addr #3

declare noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore6CreateEPKhmmmPKaiiPKcPKdPPS0_(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK14NAMESPACE_MAIN15InteractionCore14GetCountScoresEv(ptr noundef nonnull align 8 dereferenceable(392)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN14NAMESPACE_MAIN15InteractionCore6IsRmseEv(ptr noundef nonnull align 8 dereferenceable(392)) local_unnamed_addr #4 align 2

declare noundef i32 @_ZN14NAMESPACE_MAIN15InteractionCore41InitializeInteractionGradientsAndHessiansEPKhmPKdPKaS4_(ptr noundef nonnull align 8 dereferenceable(392), ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN14NAMESPACE_MAIN45InitializeRmseGradientsAndHessiansInteractionEPKhmdPKaPKdPNS_18DataSetInteractionE(ptr noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN15InteractionCore21GetDataSetInteractionEv(ptr noundef nonnull align 8 dereferenceable(392)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN14NAMESPACE_MAIN16InteractionShell9GetHandleEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3 align 2

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 = { "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 = { 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 #4 = { inlinehint 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}


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