; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_TypeChecker (unify__)

; 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.tag_____Tag__ = type { ptr, ptr }
%struct.string__ = type { ptr, i32 }
%struct.tag_____Error__ = type { ptr, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.Node__ = type { i32, ptr }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }
%struct.tag_____Namespace__ = type { %struct.string__, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.tag_____TypeCheckerContext__ = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, i8 }

@Tag__null___ = external hidden global %struct.tag_____Tag__, align 8
@__const.TypeChecker__unify__.local7 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.TypeChecker__unify__.local8 = external hidden unnamed_addr constant %struct.string__, align 8

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local void @StringBuilder__write__(ptr noundef, ptr, i32) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @StringBuilder__compactToString__(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @List__add__Error____(ptr noundef, ptr noundef byval(%struct.tag_____Error__) align 8) #3

; Function Attrs: nounwind uwtable
declare dso_local void @Error__at__(ptr dead_on_unwind noalias writable sret(%struct.tag_____Error__) align 8, ptr noundef, i64, ptr, i32) #3

; Function Attrs: nounwind uwtable
declare dso_local i64 @RangeFinder__find__(i32, ptr) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, ptr } @TypeChecker__tryUnifyNumbers__(ptr noundef, ptr, ptr, i32, ptr, ptr noundef byval(%struct.tag_____Tag__) align 8, ptr noundef byval(%struct.Node__) align 8) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @Tag__toString__(ptr, ptr) #3

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Tag__equals__(ptr, ptr, ptr, ptr) #3

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Set__contains__Tag____(ptr noundef, ptr, ptr) #3

; Function Attrs: nounwind uwtable
define dso_local { ptr, ptr } @TypeChecker__unify__(ptr noundef %0, ptr %1, ptr %2, i32 %3, ptr %4, ptr noundef byval(%struct.tag_____Tag__) align 8 %5, ptr noundef byval(%struct.Node__) align 8 %6, ptr noundef byval(%struct.Node__) align 8 %7) #3 {
  %9 = alloca %struct.tag_____Tag__, align 8
  %10 = alloca %struct.tag_____Tag__, align 8
  %11 = alloca %struct.Node__, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca %struct.tag_____Tag__, align 8
  %21 = alloca %struct.tag_____StringBuilder__, align 8
  %22 = alloca %struct.string__, align 8
  %23 = alloca %struct.string__, align 8
  %24 = alloca %struct.string__, align 8
  %25 = alloca %struct.string__, align 8
  %26 = alloca %struct.tag_____Error__, align 8
  %27 = alloca %struct.tag_____IntRange__, align 4
  %28 = alloca %struct.string__, align 8
  %29 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  store ptr %1, ptr %29, align 8
  %30 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  store ptr %2, ptr %30, align 8
  %31 = getelementptr inbounds { i32, ptr }, ptr %11, i32 0, i32 0
  store i32 %3, ptr %31, align 8
  %32 = getelementptr inbounds { i32, ptr }, ptr %11, i32 0, i32 1
  store ptr %4, ptr %32, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.tag_____Tag__, ptr %10, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !11
  br label %254

37:                                               ; preds = %8
  %38 = getelementptr inbounds %struct.tag_____Tag__, ptr %5, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !11
  br label %254

42:                                               ; preds = %37
  %43 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, ptr }, ptr %5, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, ptr }, ptr %5, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8
  %51 = call zeroext i8 @Tag__equals__(ptr %44, ptr %46, ptr %48, ptr %50)
  %52 = icmp ne i8 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %42
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !11
  br label %254

54:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  %55 = getelementptr inbounds %struct.tag_____Tag__, ptr %10, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = load ptr, ptr @Tag__null___, align 8, !tbaa !9
  %58 = icmp eq ptr %56, %57
  %59 = zext i1 %58 to i32
  %60 = trunc i32 %59 to i8
  store i8 %60, ptr %13, align 1, !tbaa !12
  %61 = load i8, ptr %13, align 1, !tbaa !12
  %62 = icmp ne i8 %61, 0
  br i1 %62, label %63, label %72

63:                                               ; preds = %54
  %64 = getelementptr inbounds %struct.tag_____Tag__, ptr %5, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.tag_____Namespace__, ptr %65, i32 0, i32 3
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = and i32 %67, 204992
  %69 = icmp ne i32 %68, 0
  %70 = zext i1 %69 to i32
  %71 = trunc i32 %70 to i8
  store i8 %71, ptr %13, align 1, !tbaa !12
  br label %72

72:                                               ; preds = %63, %54
  %73 = load i8, ptr %13, align 1, !tbaa !12
  %74 = icmp ne i8 %73, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %14, align 4
  br label %253

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %77 = getelementptr inbounds %struct.tag_____Tag__, ptr %5, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = load ptr, ptr @Tag__null___, align 8, !tbaa !9
  %80 = icmp eq ptr %78, %79
  %81 = zext i1 %80 to i32
  %82 = trunc i32 %81 to i8
  store i8 %82, ptr %15, align 1, !tbaa !12
  %83 = load i8, ptr %15, align 1, !tbaa !12
  %84 = icmp ne i8 %83, 0
  br i1 %84, label %85, label %94

85:                                               ; preds = %76
  %86 = getelementptr inbounds %struct.tag_____Tag__, ptr %10, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.tag_____Namespace__, ptr %87, i32 0, i32 3
  %89 = load i32, ptr %88, align 4, !tbaa !13
  %90 = and i32 %89, 204992
  %91 = icmp ne i32 %90, 0
  %92 = zext i1 %91 to i32
  %93 = trunc i32 %92 to i8
  store i8 %93, ptr %15, align 1, !tbaa !12
  br label %94

94:                                               ; preds = %85, %76
  %95 = load i8, ptr %15, align 1, !tbaa !12
  %96 = icmp ne i8 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %14, align 4
  br label %252

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  %99 = getelementptr inbounds %struct.tag_____Tag__, ptr %10, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.tag_____Namespace__, ptr %100, i32 0, i32 8
  %102 = load ptr, ptr %101, align 8, !tbaa !17
  %103 = icmp ne ptr %102, null
  %104 = zext i1 %103 to i32
  %105 = trunc i32 %104 to i8
  store i8 %105, ptr %16, align 1, !tbaa !12
  %106 = load i8, ptr %16, align 1, !tbaa !12
  %107 = icmp ne i8 %106, 0
  br i1 %107, label %108, label %117

108:                                              ; preds = %98
  %109 = getelementptr inbounds %struct.tag_____Tag__, ptr %5, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.tag_____Namespace__, ptr %110, i32 0, i32 3
  %112 = load i32, ptr %111, align 4, !tbaa !13
  %113 = and i32 %112, 196800
  %114 = icmp ne i32 %113, 0
  %115 = zext i1 %114 to i32
  %116 = trunc i32 %115 to i8
  store i8 %116, ptr %16, align 1, !tbaa !12
  br label %117

117:                                              ; preds = %108, %98
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  %118 = load i8, ptr %16, align 1, !tbaa !12
  store i8 %118, ptr %17, align 1, !tbaa !12
  %119 = load i8, ptr %17, align 1, !tbaa !12
  %120 = icmp ne i8 %119, 0
  br i1 %120, label %121, label %131

121:                                              ; preds = %117
  %122 = getelementptr inbounds %struct.tag_____Tag__, ptr %10, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.tag_____Namespace__, ptr %123, i32 0, i32 8
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = getelementptr inbounds { ptr, ptr }, ptr %5, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8
  %128 = getelementptr inbounds { ptr, ptr }, ptr %5, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8
  %130 = call zeroext i8 @Set__contains__Tag____(ptr noundef %125, ptr %127, ptr %129)
  store i8 %130, ptr %17, align 1, !tbaa !12
  br label %131

131:                                              ; preds = %121, %117
  %132 = load i8, ptr %17, align 1, !tbaa !12
  %133 = icmp ne i8 %132, 0
  br i1 %133, label %134, label %135

134:                                              ; preds = %131
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %14, align 4
  br label %251

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  %136 = getelementptr inbounds %struct.tag_____Tag__, ptr %5, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.tag_____Namespace__, ptr %137, i32 0, i32 8
  %139 = load ptr, ptr %138, align 8, !tbaa !17
  %140 = icmp ne ptr %139, null
  %141 = zext i1 %140 to i32
  %142 = trunc i32 %141 to i8
  store i8 %142, ptr %18, align 1, !tbaa !12
  %143 = load i8, ptr %18, align 1, !tbaa !12
  %144 = icmp ne i8 %143, 0
  br i1 %144, label %145, label %154

145:                                              ; preds = %135
  %146 = getelementptr inbounds %struct.tag_____Tag__, ptr %10, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.tag_____Namespace__, ptr %147, i32 0, i32 3
  %149 = load i32, ptr %148, align 4, !tbaa !13
  %150 = and i32 %149, 196800
  %151 = icmp ne i32 %150, 0
  %152 = zext i1 %151 to i32
  %153 = trunc i32 %152 to i8
  store i8 %153, ptr %18, align 1, !tbaa !12
  br label %154

154:                                              ; preds = %145, %135
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #4
  %155 = load i8, ptr %18, align 1, !tbaa !12
  store i8 %155, ptr %19, align 1, !tbaa !12
  %156 = load i8, ptr %19, align 1, !tbaa !12
  %157 = icmp ne i8 %156, 0
  br i1 %157, label %158, label %168

158:                                              ; preds = %154
  %159 = getelementptr inbounds %struct.tag_____Tag__, ptr %5, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.tag_____Namespace__, ptr %160, i32 0, i32 8
  %162 = load ptr, ptr %161, align 8, !tbaa !17
  %163 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8
  %165 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8
  %167 = call zeroext i8 @Set__contains__Tag____(ptr noundef %162, ptr %164, ptr %166)
  store i8 %167, ptr %19, align 1, !tbaa !12
  br label %168

168:                                              ; preds = %158, %154
  %169 = load i8, ptr %19, align 1, !tbaa !12
  %170 = icmp ne i8 %169, 0
  br i1 %170, label %171, label %172

171:                                              ; preds = %168
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %5, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %14, align 4
  br label %250

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !18
  %176 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8
  %178 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %179 = load ptr, ptr %178, align 8
  %180 = getelementptr inbounds { i32, ptr }, ptr %11, i32 0, i32 0
  %181 = load i32, ptr %180, align 8
  %182 = getelementptr inbounds { i32, ptr }, ptr %11, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8
  %184 = call { ptr, ptr } @TypeChecker__tryUnifyNumbers__(ptr noundef %175, ptr %177, ptr %179, i32 %181, ptr %183, ptr noundef byval(%struct.tag_____Tag__) align 8 %5, ptr noundef byval(%struct.Node__) align 8 %6)
  %185 = getelementptr inbounds { ptr, ptr }, ptr %20, i32 0, i32 0
  %186 = extractvalue { ptr, ptr } %184, 0
  store ptr %186, ptr %185, align 8
  %187 = getelementptr inbounds { ptr, ptr }, ptr %20, i32 0, i32 1
  %188 = extractvalue { ptr, ptr } %184, 1
  store ptr %188, ptr %187, align 8
  %189 = getelementptr inbounds %struct.tag_____Tag__, ptr %20, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !9
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %193

192:                                              ; preds = %172
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %14, align 4
  br label %249

193:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 @__const.TypeChecker__unify__.local7, i64 16, i1 false)
  %194 = getelementptr inbounds { ptr, i32 }, ptr %22, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8
  %196 = getelementptr inbounds { ptr, i32 }, ptr %22, i32 0, i32 1
  %197 = load i32, ptr %196, align 8
  call void @StringBuilder__write__(ptr noundef %21, ptr %195, i32 %197)
  %198 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8
  %200 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8
  %202 = call { ptr, i32 } @Tag__toString__(ptr %199, ptr %201)
  %203 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 0
  %204 = extractvalue { ptr, i32 } %202, 0
  store ptr %204, ptr %203, align 8
  %205 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 1
  %206 = extractvalue { ptr, i32 } %202, 1
  store i32 %206, ptr %205, align 8
  %207 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8
  %209 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 1
  %210 = load i32, ptr %209, align 8
  call void @StringBuilder__write__(ptr noundef %21, ptr %208, i32 %210)
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 @__const.TypeChecker__unify__.local8, i64 16, i1 false)
  %211 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8
  %213 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 1
  %214 = load i32, ptr %213, align 8
  call void @StringBuilder__write__(ptr noundef %21, ptr %212, i32 %214)
  %215 = getelementptr inbounds { ptr, ptr }, ptr %5, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8
  %217 = getelementptr inbounds { ptr, ptr }, ptr %5, i32 0, i32 1
  %218 = load ptr, ptr %217, align 8
  %219 = call { ptr, i32 } @Tag__toString__(ptr %216, ptr %218)
  %220 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 0
  %221 = extractvalue { ptr, i32 } %219, 0
  store ptr %221, ptr %220, align 8
  %222 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 1
  %223 = extractvalue { ptr, i32 } %219, 1
  store i32 %223, ptr %222, align 8
  %224 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8
  %226 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 1
  %227 = load i32, ptr %226, align 8
  call void @StringBuilder__write__(ptr noundef %21, ptr %225, i32 %227)
  %228 = load ptr, ptr %12, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %228, i32 0, i32 2
  %230 = load ptr, ptr %229, align 8, !tbaa !20
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %231, i32 0, i32 5
  %233 = load ptr, ptr %232, align 8, !tbaa !21
  %234 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 0
  %235 = load i32, ptr %234, align 8
  %236 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 1
  %237 = load ptr, ptr %236, align 8
  %238 = call i64 @RangeFinder__find__(i32 %235, ptr %237)
  store i64 %238, ptr %27, align 4
  %239 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %21)
  %240 = getelementptr inbounds { ptr, i32 }, ptr %28, i32 0, i32 0
  %241 = extractvalue { ptr, i32 } %239, 0
  store ptr %241, ptr %240, align 8
  %242 = getelementptr inbounds { ptr, i32 }, ptr %28, i32 0, i32 1
  %243 = extractvalue { ptr, i32 } %239, 1
  store i32 %243, ptr %242, align 8
  %244 = load i64, ptr %27, align 4
  %245 = getelementptr inbounds { ptr, i32 }, ptr %28, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8
  %247 = getelementptr inbounds { ptr, i32 }, ptr %28, i32 0, i32 1
  %248 = load i32, ptr %247, align 8
  call void @Error__at__(ptr dead_on_unwind writable sret(%struct.tag_____Error__) align 8 %26, ptr noundef %233, i64 %244, ptr %246, i32 %248)
  call void @List__add__Error____(ptr noundef %230, ptr noundef byval(%struct.tag_____Error__) align 8 %26)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 16, i1 false), !tbaa.struct !11
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %249

249:                                              ; preds = %193, %192
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %250

250:                                              ; preds = %249, %171
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  br label %251

251:                                              ; preds = %250, %134
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  br label %252

252:                                              ; preds = %251, %97
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %253

253:                                              ; preds = %252, %75
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %254

254:                                              ; preds = %253, %53, %41, %36
  %255 = load { ptr, ptr }, ptr %9, align 8
  ret { ptr, ptr } %255
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"tag_____Tag__", !6, i64 0, !6, i64 8}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !16, i64 28}
!14 = !{!"tag_____Namespace__", !15, i64 0, !6, i64 16, !16, i64 24, !16, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !16, i64 104}
!15 = !{!"", !6, i64 0, !16, i64 8}
!16 = !{!"int", !7, i64 0}
!17 = !{!14, !6, i64 64}
!18 = !{!19, !6, i64 32}
!19 = !{!"tag_____TypeCheckerContext__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !16, i64 120, !16, i64 124, !6, i64 128, !16, i64 136, !7, i64 140}
!20 = !{!19, !6, i64 16}
!21 = !{!19, !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"

%struct.tag_____Tag__ = type { ptr, ptr }
%struct.string__ = type { ptr, i32 }
%struct.tag_____Error__ = type { ptr, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.Node__ = type { i32, ptr }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }

@Tag__null___ = external hidden local_unnamed_addr global %struct.tag_____Tag__, align 8
@__const.TypeChecker__unify__.local7 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.TypeChecker__unify__.local8 = external hidden unnamed_addr constant %struct.string__, align 8

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

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @StringBuilder__compactToString__(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @List__add__Error____(ptr noundef, ptr noundef byval(%struct.tag_____Error__) align 8) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @Error__at__(ptr dead_on_unwind noalias writable sret(%struct.tag_____Error__) align 8, ptr noundef, i64, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @RangeFinder__find__(i32, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, ptr } @TypeChecker__tryUnifyNumbers__(ptr noundef, ptr, ptr, i32, ptr, ptr noundef byval(%struct.tag_____Tag__) align 8, ptr noundef byval(%struct.Node__) align 8) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @Tag__toString__(ptr, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Tag__equals__(ptr, ptr, ptr, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Set__contains__Tag____(ptr noundef, ptr, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local { ptr, ptr } @TypeChecker__unify__(ptr nocapture noundef readonly %0, ptr %1, ptr %2, i32 %3, ptr %4, ptr noundef byval(%struct.tag_____Tag__) align 8 %5, ptr noundef byval(%struct.Node__) align 8 %6, ptr nocapture noundef readonly byval(%struct.Node__) align 8 %7) local_unnamed_addr #2 {
  %9 = alloca %struct.tag_____StringBuilder__, align 8
  %10 = alloca %struct.tag_____Error__, align 8
  %11 = icmp eq ptr %1, null
  %.sroa.052.0.copyload = load ptr, ptr %5, align 8
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  %.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.10.0.copyload = load ptr, ptr %.sroa.10.0..sroa_idx, align 8, !tbaa !5
  br label %73

13:                                               ; preds = %8
  %14 = icmp eq ptr %.sroa.052.0.copyload, null
  br i1 %14, label %73, label %15

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %17 = load ptr, ptr %16, align 8
  %18 = tail call zeroext i8 @Tag__equals__(ptr nonnull %1, ptr %2, ptr nonnull %.sroa.052.0.copyload, ptr %17)
  %.not = icmp eq i8 %18, 0
  br i1 %.not, label %19, label %73

19:                                               ; preds = %15
  %20 = load ptr, ptr @Tag__null___, align 8, !tbaa !9
  %21 = icmp eq ptr %20, %1
  br i1 %21, label %22, label %.critedge

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %.sroa.052.0.copyload, i64 28
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = and i32 %24, 204992
  %.not72 = icmp eq i32 %25, 0
  br i1 %.not72, label %.critedge, label %73

.critedge:                                        ; preds = %19, %22
  %26 = icmp eq ptr %.sroa.052.0.copyload, %20
  br i1 %26, label %27, label %.critedge85

27:                                               ; preds = %.critedge
  %28 = getelementptr inbounds i8, ptr %1, i64 28
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = and i32 %29, 204992
  %.not74 = icmp eq i32 %30, 0
  br i1 %.not74, label %.critedge85, label %73

.critedge85:                                      ; preds = %.critedge, %27
  %31 = getelementptr inbounds i8, ptr %1, i64 64
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %.not75 = icmp eq ptr %32, null
  br i1 %.not75, label %.critedge88, label %33

33:                                               ; preds = %.critedge85
  %34 = getelementptr inbounds i8, ptr %.sroa.052.0.copyload, i64 28
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = and i32 %35, 196800
  %.not77 = icmp eq i32 %36, 0
  br i1 %.not77, label %.critedge88, label %.critedge87

.critedge87:                                      ; preds = %33
  %37 = tail call zeroext i8 @Set__contains__Tag____(ptr noundef nonnull %32, ptr nonnull %.sroa.052.0.copyload, ptr %17)
  %38 = icmp eq i8 %37, 0
  br i1 %38, label %.critedge88, label %73

.critedge88:                                      ; preds = %33, %.critedge85, %.critedge87
  %39 = getelementptr inbounds i8, ptr %.sroa.052.0.copyload, i64 64
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  %.not79 = icmp eq ptr %40, null
  br i1 %.not79, label %.critedge91, label %41

41:                                               ; preds = %.critedge88
  %42 = getelementptr inbounds i8, ptr %1, i64 28
  %43 = load i32, ptr %42, align 4, !tbaa !11
  %44 = and i32 %43, 196800
  %.not81 = icmp eq i32 %44, 0
  br i1 %.not81, label %.critedge91, label %.critedge90

.critedge90:                                      ; preds = %41
  %45 = tail call zeroext i8 @Set__contains__Tag____(ptr noundef nonnull %40, ptr nonnull %1, ptr %2)
  %46 = icmp eq i8 %45, 0
  br i1 %46, label %.critedge91, label %73

.critedge91:                                      ; preds = %41, %.critedge88, %.critedge90
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = tail call { ptr, ptr } @TypeChecker__tryUnifyNumbers__(ptr noundef %48, ptr nonnull %1, ptr %2, i32 %3, ptr %4, ptr noundef nonnull byval(%struct.tag_____Tag__) align 8 %5, ptr noundef nonnull byval(%struct.Node__) align 8 %6)
  %50 = extractvalue { ptr, ptr } %49, 0
  %.not83 = icmp eq ptr %50, null
  br i1 %.not83, label %53, label %51

51:                                               ; preds = %.critedge91
  %52 = extractvalue { ptr, ptr } %49, 1
  br label %73

53:                                               ; preds = %.critedge91
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  %.sroa.07.0.copyload = load ptr, ptr @__const.TypeChecker__unify__.local7, align 8
  %.sroa.48.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.TypeChecker__unify__.local7, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %.sroa.07.0.copyload, i32 %.sroa.48.0.copyload)
  %54 = call { ptr, i32 } @Tag__toString__(ptr nonnull %1, ptr %2)
  %55 = extractvalue { ptr, i32 } %54, 0
  %56 = extractvalue { ptr, i32 } %54, 1
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %55, i32 %56)
  %.sroa.04.0.copyload = load ptr, ptr @__const.TypeChecker__unify__.local8, align 8
  %.sroa.4.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.TypeChecker__unify__.local8, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %.sroa.04.0.copyload, i32 %.sroa.4.0.copyload)
  %57 = load ptr, ptr %5, align 8
  %58 = load ptr, ptr %16, align 8
  %59 = call { ptr, i32 } @Tag__toString__(ptr %57, ptr %58)
  %60 = extractvalue { ptr, i32 } %59, 0
  %61 = extractvalue { ptr, i32 } %59, 1
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %60, i32 %61)
  %62 = getelementptr inbounds i8, ptr %0, i64 16
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = getelementptr inbounds i8, ptr %0, i64 40
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = load i32, ptr %7, align 8
  %67 = getelementptr inbounds i8, ptr %7, i64 8
  %68 = load ptr, ptr %67, align 8
  %69 = call i64 @RangeFinder__find__(i32 %66, ptr %68)
  %70 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %9)
  %71 = extractvalue { ptr, i32 } %70, 0
  %72 = extractvalue { ptr, i32 } %70, 1
  call void @Error__at__(ptr dead_on_unwind nonnull writable sret(%struct.tag_____Error__) align 8 %10, ptr noundef %65, i64 %69, ptr %71, i32 %72)
  call void @List__add__Error____(ptr noundef %63, ptr noundef nonnull byval(%struct.tag_____Error__) align 8 %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  br label %73

73:                                               ; preds = %.critedge90, %22, %.critedge87, %51, %53, %27, %15, %13, %12
  %.sroa.052.5 = phi ptr [ %.sroa.052.0.copyload, %12 ], [ %1, %13 ], [ %1, %15 ], [ %1, %27 ], [ %1, %.critedge87 ], [ %50, %51 ], [ %1, %53 ], [ %.sroa.052.0.copyload, %22 ], [ %.sroa.052.0.copyload, %.critedge90 ]
  %.sroa.10.5 = phi ptr [ %.sroa.10.0.copyload, %12 ], [ %2, %13 ], [ %2, %15 ], [ %2, %27 ], [ %2, %.critedge87 ], [ %52, %51 ], [ %2, %53 ], [ %17, %22 ], [ %17, %.critedge90 ]
  %.fca.0.insert = insertvalue { ptr, ptr } poison, ptr %.sroa.052.5, 0
  %.fca.1.insert = insertvalue { ptr, ptr } %.fca.0.insert, ptr %.sroa.10.5, 1
  ret { ptr, ptr } %.fca.1.insert
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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, !6, i64 0}
!10 = !{!"tag_____Tag__", !6, i64 0, !6, i64 8}
!11 = !{!12, !14, i64 28}
!12 = !{!"tag_____Namespace__", !13, i64 0, !6, i64 16, !14, i64 24, !14, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !14, i64 104}
!13 = !{!"", !6, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !6, i64 64}
!16 = !{!17, !6, i64 32}
!17 = !{!"tag_____TypeCheckerContext__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !14, i64 120, !14, i64 124, !6, i64 128, !14, i64 136, !7, i64 140}
!18 = !{!17, !6, i64 16}
!19 = !{!17, !6, i64 40}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass