; LLVM IR from musetronstar/tagd :: tagl/src (lemon)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.lemon = type { ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, ptr }
%struct.state = type { ptr, ptr, i32, ptr, i32, i32, i32, i32, i32, ptr, i32 }
%struct.config = type { ptr, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr }
%struct.rule = type { ptr, ptr, i32, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct.action = type { ptr, i32, %union.anon, ptr, ptr, ptr }
%union.anon = type { ptr }

@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @Action_add(ptr noundef, i32 noundef, 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 @Symbol_find(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @ErrorMsg(ptr noundef, i32 noundef, ptr noundef, ...) #0

; Function Attrs: nounwind uwtable
define dso_local void @FindActions(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %82, %1
  %13 = load i32, ptr %3, align 4, !tbaa !9
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.lemon, ptr %14, i32 0, i32 3
  %16 = load i32, ptr %15, align 8, !tbaa !11
  %17 = icmp slt i32 %13, %16
  br i1 %17, label %18, label %85

18:                                               ; preds = %12
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.lemon, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds ptr, ptr %21, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %25, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.state, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  store ptr %28, ptr %5, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %77, %18
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %81

32:                                               ; preds = %29
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.config, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds %struct.rule, ptr %35, i32 0, i32 4
  %37 = load i32, ptr %36, align 8, !tbaa !18
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.config, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !20
  %41 = icmp eq i32 %37, %40
  br i1 %41, label %42, label %76

42:                                               ; preds = %32
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %72, %42
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.lemon, ptr %45, i32 0, i32 8
  %47 = load i32, ptr %46, align 4, !tbaa !21
  %48 = icmp slt i32 %44, %47
  br i1 %48, label %49, label %75

49:                                               ; preds = %43
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.config, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = load i32, ptr %4, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %52, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !23
  %57 = icmp ne i8 %56, 0
  br i1 %57, label %58, label %71

58:                                               ; preds = %49
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.state, ptr %59, i32 0, i32 3
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.lemon, ptr %61, i32 0, i32 15
  %63 = load ptr, ptr %62, align 8, !tbaa !24
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.config, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  call void @Action_add(ptr noundef %60, i32 noundef 2, ptr noundef %67, ptr noundef %70)
  br label %71

71:                                               ; preds = %58, %49
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %4, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %4, align 4, !tbaa !9
  br label %43, !llvm.loop !25

75:                                               ; preds = %43
  br label %76

76:                                               ; preds = %75, %32
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.config, ptr %78, i32 0, i32 7
  %80 = load ptr, ptr %79, align 8, !tbaa !27
  store ptr %80, ptr %5, align 8, !tbaa !5
  br label %29, !llvm.loop !28

81:                                               ; preds = %29
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %3, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %3, align 4, !tbaa !9
  br label %12, !llvm.loop !29

85:                                               ; preds = %12
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.lemon, ptr %86, i32 0, i32 24
  %88 = load ptr, ptr %87, align 8, !tbaa !30
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %104

90:                                               ; preds = %85
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.lemon, ptr %91, i32 0, i32 24
  %93 = load ptr, ptr %92, align 8, !tbaa !30
  %94 = call ptr @Symbol_find(ptr noundef %93)
  store ptr %94, ptr %7, align 8, !tbaa !5
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = icmp eq ptr %95, null
  br i1 %96, label %97, label %103

97:                                               ; preds = %90
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.lemon, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !31
  %101 = getelementptr inbounds %struct.rule, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !32
  store ptr %102, ptr %7, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %97, %90
  br label %110

104:                                              ; preds = %85
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.lemon, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !31
  %108 = getelementptr inbounds %struct.rule, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !32
  store ptr %109, ptr %7, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %104, %103
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.lemon, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !13
  %114 = getelementptr inbounds ptr, ptr %113, i64 0
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.state, ptr %115, i32 0, i32 3
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  call void @Action_add(ptr noundef %116, i32 noundef 1, ptr noundef %117, ptr noundef null)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %186, %110
  %119 = load i32, ptr %3, align 4, !tbaa !9
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.lemon, ptr %120, i32 0, i32 3
  %122 = load i32, ptr %121, align 8, !tbaa !11
  %123 = icmp slt i32 %119, %122
  br i1 %123, label %124, label %189

124:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.lemon, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !13
  %128 = load i32, ptr %3, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds ptr, ptr %127, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  store ptr %131, ptr %6, align 8, !tbaa !5
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.state, ptr %132, i32 0, i32 3
  %134 = load ptr, ptr %133, align 8, !tbaa !33
  %135 = call ptr @Action_sort(ptr noundef %134)
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.state, ptr %136, i32 0, i32 3
  store ptr %135, ptr %137, align 8, !tbaa !33
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.state, ptr %138, i32 0, i32 3
  %140 = load ptr, ptr %139, align 8, !tbaa !33
  store ptr %140, ptr %9, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %181, %124
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %149

144:                                              ; preds = %141
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.action, ptr %145, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !34
  %148 = icmp ne ptr %147, null
  br label %149

149:                                              ; preds = %144, %141
  %150 = phi i1 [ false, %141 ], [ %148, %144 ]
  br i1 %150, label %151, label %185

151:                                              ; preds = %149
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.action, ptr %152, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !34
  store ptr %154, ptr %10, align 8, !tbaa !5
  br label %155

155:                                              ; preds = %176, %151
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %166

158:                                              ; preds = %155
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.action, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !36
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.action, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !36
  %165 = icmp eq ptr %161, %164
  br label %166

166:                                              ; preds = %158, %155
  %167 = phi i1 [ false, %155 ], [ %165, %158 ]
  br i1 %167, label %168, label %180

168:                                              ; preds = %166
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = call i32 @resolve_conflict(ptr noundef %169, ptr noundef %170)
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.lemon, ptr %172, i32 0, i32 37
  %174 = load i32, ptr %173, align 8, !tbaa !37
  %175 = add nsw i32 %174, %171
  store i32 %175, ptr %173, align 8, !tbaa !37
  br label %176

176:                                              ; preds = %168
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.action, ptr %177, i32 0, i32 4
  %179 = load ptr, ptr %178, align 8, !tbaa !34
  store ptr %179, ptr %10, align 8, !tbaa !5
  br label %155, !llvm.loop !38

180:                                              ; preds = %166
  br label %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.action, ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !34
  store ptr %184, ptr %9, align 8, !tbaa !5
  br label %141, !llvm.loop !39

185:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %3, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %3, align 4, !tbaa !9
  br label %118, !llvm.loop !40

189:                                              ; preds = %118
  %190 = load ptr, ptr %2, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.lemon, ptr %190, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !41
  store ptr %192, ptr %8, align 8, !tbaa !5
  br label %193

193:                                              ; preds = %199, %189
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = icmp ne ptr %194, null
  br i1 %195, label %196, label %203

196:                                              ; preds = %193
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.rule, ptr %197, i32 0, i32 16
  store i32 0, ptr %198, align 8, !tbaa !42
  br label %199

199:                                              ; preds = %196
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.rule, ptr %200, i32 0, i32 20
  %202 = load ptr, ptr %201, align 8, !tbaa !43
  store ptr %202, ptr %8, align 8, !tbaa !5
  br label %193, !llvm.loop !44

203:                                              ; preds = %193
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %204

204:                                              ; preds = %239, %203
  %205 = load i32, ptr %3, align 4, !tbaa !9
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.lemon, ptr %206, i32 0, i32 3
  %208 = load i32, ptr %207, align 8, !tbaa !11
  %209 = icmp slt i32 %205, %208
  br i1 %209, label %210, label %242

210:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %211 = load ptr, ptr %2, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.lemon, ptr %211, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !13
  %214 = load i32, ptr %3, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds ptr, ptr %213, i64 %215
  %217 = load ptr, ptr %216, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.state, ptr %217, i32 0, i32 3
  %219 = load ptr, ptr %218, align 8, !tbaa !33
  store ptr %219, ptr %11, align 8, !tbaa !5
  br label %220

220:                                              ; preds = %234, %210
  %221 = load ptr, ptr %11, align 8, !tbaa !5
  %222 = icmp ne ptr %221, null
  br i1 %222, label %223, label %238

223:                                              ; preds = %220
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.action, ptr %224, i32 0, i32 1
  %226 = load i32, ptr %225, align 8, !tbaa !45
  %227 = icmp eq i32 %226, 2
  br i1 %227, label %228, label %233

228:                                              ; preds = %223
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.action, ptr %229, i32 0, i32 2
  %231 = load ptr, ptr %230, align 8, !tbaa !23
  %232 = getelementptr inbounds %struct.rule, ptr %231, i32 0, i32 16
  store i32 1, ptr %232, align 8, !tbaa !42
  br label %233

233:                                              ; preds = %228, %223
  br label %234

234:                                              ; preds = %233
  %235 = load ptr, ptr %11, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.action, ptr %235, i32 0, i32 4
  %237 = load ptr, ptr %236, align 8, !tbaa !34
  store ptr %237, ptr %11, align 8, !tbaa !5
  br label %220, !llvm.loop !46

238:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %3, align 4, !tbaa !9
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %3, align 4, !tbaa !9
  br label %204, !llvm.loop !47

242:                                              ; preds = %204
  %243 = load ptr, ptr %2, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.lemon, ptr %243, i32 0, i32 1
  %245 = load ptr, ptr %244, align 8, !tbaa !41
  store ptr %245, ptr %8, align 8, !tbaa !5
  br label %246

246:                                              ; preds = %266, %242
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  %248 = icmp ne ptr %247, null
  br i1 %248, label %249, label %270

249:                                              ; preds = %246
  %250 = load ptr, ptr %8, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.rule, ptr %250, i32 0, i32 16
  %252 = load i32, ptr %251, align 8, !tbaa !42
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %255

254:                                              ; preds = %249
  br label %266

255:                                              ; preds = %249
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.lemon, ptr %256, i32 0, i32 34
  %258 = load ptr, ptr %257, align 8, !tbaa !48
  %259 = load ptr, ptr %8, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.rule, ptr %259, i32 0, i32 3
  %261 = load i32, ptr %260, align 4, !tbaa !49
  call void (ptr, i32, ptr, ...) @ErrorMsg(ptr noundef %258, i32 noundef %261, ptr noundef @.str.7)
  %262 = load ptr, ptr %2, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.lemon, ptr %262, i32 0, i32 16
  %264 = load i32, ptr %263, align 8, !tbaa !50
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %263, align 8, !tbaa !50
  br label %266

266:                                              ; preds = %255, %254
  %267 = load ptr, ptr %8, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.rule, ptr %267, i32 0, i32 20
  %269 = load ptr, ptr %268, align 8, !tbaa !43
  store ptr %269, ptr %8, align 8, !tbaa !5
  br label %246, !llvm.loop !51

270:                                              ; preds = %246
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden ptr @Action_sort(ptr noundef) #0

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"lemon", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !6, i64 72, !10, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !6, i64 280}
!13 = !{!12, !6, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"state", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !10, i64 64}
!16 = !{!17, !6, i64 0}
!17 = !{!"config", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !6, i64 64}
!18 = !{!19, !10, i64 24}
!19 = !{!"rule", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !6, i64 120, !6, i64 128}
!20 = !{!17, !10, i64 8}
!21 = !{!12, !10, i64 44}
!22 = !{!17, !6, i64 16}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !6, i64 72}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!17, !6, i64 56}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}
!30 = !{!12, !6, i64 144}
!31 = !{!12, !6, i64 16}
!32 = !{!19, !6, i64 0}
!33 = !{!15, !6, i64 24}
!34 = !{!35, !6, i64 32}
!35 = !{!"action", !6, i64 0, !10, i64 8, !7, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!36 = !{!35, !6, i64 0}
!37 = !{!12, !10, i64 248}
!38 = distinct !{!38, !26}
!39 = distinct !{!39, !26}
!40 = distinct !{!40, !26}
!41 = !{!12, !6, i64 8}
!42 = !{!19, !10, i64 104}
!43 = !{!19, !6, i64 128}
!44 = distinct !{!44, !26}
!45 = !{!35, !10, i64 8}
!46 = distinct !{!46, !26}
!47 = distinct !{!47, !26}
!48 = !{!12, !6, i64 224}
!49 = !{!19, !10, i64 20}
!50 = !{!12, !10, i64 80}
!51 = distinct !{!51, !26}


; 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.7 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @Action_add(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @Symbol_find(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @ErrorMsg(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @FindActions(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 24
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph98, label %._crit_edge99

.lr.ph98:                                         ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 44
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  br label %7

7:                                                ; preds = %.lr.ph98, %._crit_edge
  %8 = phi i32 [ %3, %.lr.ph98 ], [ %39, %._crit_edge ]
  %indvars.iv130 = phi i64 [ 0, %.lr.ph98 ], [ %indvars.iv.next131, %._crit_edge ]
  %9 = load ptr, ptr %0, align 8, !tbaa !11
  %10 = getelementptr inbounds ptr, ptr %9, i64 %indvars.iv130
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %.07091 = load ptr, ptr %12, align 8, !tbaa !12
  %.not8492 = icmp eq ptr %.07091, null
  br i1 %.not8492, label %._crit_edge, label %.lr.ph95

.lr.ph95:                                         ; preds = %7
  %13 = getelementptr inbounds i8, ptr %11, i64 24
  br label %14

14:                                               ; preds = %.lr.ph95, %.loopexit
  %.07093 = phi ptr [ %.07091, %.lr.ph95 ], [ %.070, %.loopexit ]
  %15 = load ptr, ptr %.07093, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load i32, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %.07093, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !17
  %20 = icmp eq i32 %17, %19
  br i1 %20, label %.preheader88, label %.loopexit

.preheader88:                                     ; preds = %14
  %21 = load i32, ptr %5, align 4, !tbaa !18
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader88
  %23 = getelementptr inbounds i8, ptr %.07093, i64 16
  br label %24

24:                                               ; preds = %.lr.ph, %34
  %25 = phi i32 [ %21, %.lr.ph ], [ %35, %34 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %34 ]
  %26 = load ptr, ptr %23, align 8, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %26, i64 %indvars.iv
  %28 = load i8, ptr %27, align 1, !tbaa !20
  %.not85 = icmp eq i8 %28, 0
  br i1 %.not85, label %34, label %29

29:                                               ; preds = %24
  %30 = load ptr, ptr %6, align 8, !tbaa !21
  %31 = getelementptr inbounds ptr, ptr %30, i64 %indvars.iv
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %33 = load ptr, ptr %.07093, align 8, !tbaa !13
  tail call void @Action_add(ptr noundef nonnull %13, i32 noundef 2, ptr noundef %32, ptr noundef %33)
  %.pre = load i32, ptr %5, align 4, !tbaa !18
  br label %34

34:                                               ; preds = %24, %29
  %35 = phi i32 [ %25, %24 ], [ %.pre, %29 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next, %36
  br i1 %37, label %24, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %34, %.preheader88, %14
  %38 = getelementptr inbounds i8, ptr %.07093, i64 56
  %.070 = load ptr, ptr %38, align 8, !tbaa !12
  %.not84 = icmp eq ptr %.070, null
  br i1 %.not84, label %._crit_edge.loopexit, label %14, !llvm.loop !24

._crit_edge.loopexit:                             ; preds = %.loopexit
  %.pre139 = load i32, ptr %2, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %7
  %39 = phi i32 [ %.pre139, %._crit_edge.loopexit ], [ %8, %7 ]
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %40 = sext i32 %39 to i64
  %41 = icmp slt i64 %indvars.iv.next131, %40
  br i1 %41, label %7, label %._crit_edge99, !llvm.loop !25

._crit_edge99:                                    ; preds = %._crit_edge, %1
  %42 = getelementptr inbounds i8, ptr %0, i64 144
  %43 = load ptr, ptr %42, align 8, !tbaa !26
  %.not = icmp eq ptr %43, null
  br i1 %.not, label %.sink.split, label %44

44:                                               ; preds = %._crit_edge99
  %45 = tail call ptr @Symbol_find(ptr noundef nonnull %43)
  %46 = icmp eq ptr %45, null
  br i1 %46, label %.sink.split, label %50

.sink.split:                                      ; preds = %._crit_edge99, %44
  %47 = getelementptr inbounds i8, ptr %0, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !27
  %49 = load ptr, ptr %48, align 8, !tbaa !28
  br label %50

50:                                               ; preds = %.sink.split, %44
  %.069 = phi ptr [ %45, %44 ], [ %49, %.sink.split ]
  %51 = load ptr, ptr %0, align 8, !tbaa !11
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds i8, ptr %52, i64 24
  tail call void @Action_add(ptr noundef nonnull %53, i32 noundef 1, ptr noundef %.069, ptr noundef null)
  %54 = load i32, ptr %2, align 8, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph108, label %._crit_edge109

.lr.ph108:                                        ; preds = %50
  %56 = getelementptr inbounds i8, ptr %0, i64 248
  br label %57

57:                                               ; preds = %.lr.ph108, %.critedge
  %indvars.iv133 = phi i64 [ 0, %.lr.ph108 ], [ %indvars.iv.next134, %.critedge ]
  %58 = load ptr, ptr %0, align 8, !tbaa !11
  %59 = getelementptr inbounds ptr, ptr %58, i64 %indvars.iv133
  %60 = load ptr, ptr %59, align 8, !tbaa !12
  %61 = getelementptr inbounds i8, ptr %60, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !29
  %63 = tail call ptr @Action_sort(ptr noundef %62)
  store ptr %63, ptr %61, align 8, !tbaa !29
  %.not81101 = icmp eq ptr %63, null
  br i1 %.not81101, label %.critedge, label %.lr.ph104

.lr.ph104:                                        ; preds = %57, %.critedge2
  %.067102 = phi ptr [ %75, %.critedge2 ], [ %63, %57 ]
  %64 = getelementptr inbounds i8, ptr %.067102, i64 32
  %65 = load ptr, ptr %64, align 8, !tbaa !31
  %.not82 = icmp eq ptr %65, null
  br i1 %.not82, label %.critedge, label %.preheader87

.preheader87:                                     ; preds = %.lr.ph104, %69
  %.066100 = phi ptr [ %74, %69 ], [ %65, %.lr.ph104 ]
  %66 = load ptr, ptr %.066100, align 8, !tbaa !33
  %67 = load ptr, ptr %.067102, align 8, !tbaa !33
  %68 = icmp eq ptr %66, %67
  br i1 %68, label %69, label %.critedge2

69:                                               ; preds = %.preheader87
  %70 = tail call i32 @resolve_conflict(ptr noundef nonnull %.067102, ptr noundef nonnull %.066100)
  %71 = load i32, ptr %56, align 8, !tbaa !34
  %72 = add nsw i32 %71, %70
  store i32 %72, ptr %56, align 8, !tbaa !34
  %73 = getelementptr inbounds i8, ptr %.066100, i64 32
  %74 = load ptr, ptr %73, align 8, !tbaa !31
  %.not83 = icmp eq ptr %74, null
  br i1 %.not83, label %.critedge2, label %.preheader87, !llvm.loop !35

.critedge2:                                       ; preds = %.preheader87, %69
  %75 = load ptr, ptr %64, align 8, !tbaa !31
  %.not81 = icmp eq ptr %75, null
  br i1 %.not81, label %.critedge, label %.lr.ph104, !llvm.loop !36

.critedge:                                        ; preds = %.lr.ph104, %.critedge2, %57
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %76 = load i32, ptr %2, align 8, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = icmp slt i64 %indvars.iv.next134, %77
  br i1 %78, label %57, label %._crit_edge109, !llvm.loop !37

._crit_edge109:                                   ; preds = %.critedge, %50
  %.lcssa = phi i32 [ %54, %50 ], [ %76, %.critedge ]
  %79 = getelementptr inbounds i8, ptr %0, i64 8
  %.068110 = load ptr, ptr %79, align 8, !tbaa !12
  %.not77111 = icmp eq ptr %.068110, null
  br i1 %.not77111, label %.preheader86, label %.lr.ph114

.preheader86:                                     ; preds = %.lr.ph114, %._crit_edge109
  %80 = icmp sgt i32 %.lcssa, 0
  br i1 %80, label %.lr.ph122, label %.preheader

.lr.ph122:                                        ; preds = %.preheader86
  %81 = load ptr, ptr %0, align 8, !tbaa !11
  %wide.trip.count = zext nneg i32 %.lcssa to i64
  br label %86

.lr.ph114:                                        ; preds = %._crit_edge109, %.lr.ph114
  %.068112 = phi ptr [ %.068, %.lr.ph114 ], [ %.068110, %._crit_edge109 ]
  %82 = getelementptr inbounds i8, ptr %.068112, i64 104
  store i32 0, ptr %82, align 8, !tbaa !38
  %83 = getelementptr inbounds i8, ptr %.068112, i64 128
  %.068 = load ptr, ptr %83, align 8, !tbaa !12
  %.not77 = icmp eq ptr %.068, null
  br i1 %.not77, label %.preheader86, label %.lr.ph114, !llvm.loop !39

.preheader:                                       ; preds = %._crit_edge120, %.preheader86
  br i1 %.not77111, label %._crit_edge127, label %.lr.ph126

.lr.ph126:                                        ; preds = %.preheader
  %84 = getelementptr inbounds i8, ptr %0, i64 224
  %85 = getelementptr inbounds i8, ptr %0, i64 80
  br label %99

86:                                               ; preds = %.lr.ph122, %._crit_edge120
  %indvars.iv136 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next137, %._crit_edge120 ]
  %87 = getelementptr inbounds ptr, ptr %81, i64 %indvars.iv136
  %88 = load ptr, ptr %87, align 8, !tbaa !12
  %89 = getelementptr inbounds i8, ptr %88, i64 24
  %.0115 = load ptr, ptr %89, align 8, !tbaa !12
  %.not80116 = icmp eq ptr %.0115, null
  br i1 %.not80116, label %._crit_edge120, label %.lr.ph119

.lr.ph119:                                        ; preds = %86, %97
  %.0117 = phi ptr [ %.0, %97 ], [ %.0115, %86 ]
  %90 = getelementptr inbounds i8, ptr %.0117, i64 8
  %91 = load i32, ptr %90, align 8, !tbaa !40
  %92 = icmp eq i32 %91, 2
  br i1 %92, label %93, label %97

93:                                               ; preds = %.lr.ph119
  %94 = getelementptr inbounds i8, ptr %.0117, i64 16
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  %96 = getelementptr inbounds i8, ptr %95, i64 104
  store i32 1, ptr %96, align 8, !tbaa !38
  br label %97

97:                                               ; preds = %.lr.ph119, %93
  %98 = getelementptr inbounds i8, ptr %.0117, i64 32
  %.0 = load ptr, ptr %98, align 8, !tbaa !12
  %.not80 = icmp eq ptr %.0, null
  br i1 %.not80, label %._crit_edge120, label %.lr.ph119, !llvm.loop !41

._crit_edge120:                                   ; preds = %97, %86
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next137, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %86, !llvm.loop !42

99:                                               ; preds = %.lr.ph126, %108
  %.1125 = phi ptr [ %.068110, %.lr.ph126 ], [ %.1, %108 ]
  %100 = getelementptr inbounds i8, ptr %.1125, i64 104
  %101 = load i32, ptr %100, align 8, !tbaa !38
  %.not79 = icmp eq i32 %101, 0
  br i1 %.not79, label %102, label %108

102:                                              ; preds = %99
  %103 = load ptr, ptr %84, align 8, !tbaa !43
  %104 = getelementptr inbounds i8, ptr %.1125, i64 20
  %105 = load i32, ptr %104, align 4, !tbaa !44
  tail call void (ptr, i32, ptr, ...) @ErrorMsg(ptr noundef %103, i32 noundef %105, ptr noundef nonnull @.str.7)
  %106 = load i32, ptr %85, align 8, !tbaa !45
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %85, align 8, !tbaa !45
  br label %108

108:                                              ; preds = %99, %102
  %109 = getelementptr inbounds i8, ptr %.1125, i64 128
  %.1 = load ptr, ptr %109, align 8, !tbaa !12
  %.not78 = icmp eq ptr %.1, null
  br i1 %.not78, label %._crit_edge127, label %99, !llvm.loop !46

._crit_edge127:                                   ; preds = %108, %.preheader
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden ptr @Action_sort(ptr noundef) local_unnamed_addr #0

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!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, !10, i64 24}
!6 = !{!"lemon", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !7, i64 280}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"config", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 64}
!15 = !{!16, !10, i64 24}
!16 = !{!"rule", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !7, i64 120, !7, i64 128}
!17 = !{!14, !10, i64 8}
!18 = !{!6, !10, i64 44}
!19 = !{!14, !7, i64 16}
!20 = !{!8, !8, i64 0}
!21 = !{!6, !7, i64 72}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = !{!6, !7, i64 144}
!27 = !{!6, !7, i64 16}
!28 = !{!16, !7, i64 0}
!29 = !{!30, !7, i64 24}
!30 = !{!"state", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !10, i64 64}
!31 = !{!32, !7, i64 32}
!32 = !{!"action", !7, i64 0, !10, i64 8, !8, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!33 = !{!32, !7, i64 0}
!34 = !{!6, !10, i64 248}
!35 = distinct !{!35, !23}
!36 = distinct !{!36, !23}
!37 = distinct !{!37, !23}
!38 = !{!16, !10, i64 104}
!39 = distinct !{!39, !23}
!40 = !{!32, !10, i64 8}
!41 = distinct !{!41, !23}
!42 = distinct !{!42, !23}
!43 = !{!6, !7, i64 224}
!44 = !{!16, !10, i64 20}
!45 = !{!6, !10, i64 80}
!46 = distinct !{!46, !23}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass