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

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

@mu_____string217 = external dso_local global %struct.string__, align 8
@mu_____string111 = external dso_local global %struct.string__, align 8
@mu_____string172 = external dso_local global %struct.string__, align 8
@mu_____string218 = external dso_local global %struct.string__, align 8
@mu_____string219 = external dso_local global %struct.string__, align 8
@top_____abandonFn__ = external dso_local thread_local global ptr, 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @List__add__Error____(ptr noundef, ptr noundef byval(%struct.tag_____Error__) align 8) #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) #2

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local { ptr, ptr } @TypeChecker__getArgWithTypeFlags__(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i8 noundef zeroext, ptr noundef byval(%struct.string__) align 8) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @TypeChecker__badConversion__(ptr noundef, i32, ptr, ptr, ptr, ptr noundef byval(%struct.tag_____Tag__) align 8) #2

; Function Attrs: nounwind uwtable
define dso_local { ptr, ptr } @TypeChecker__checkPointerCast__(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca %struct.tag_____Tag__, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.tag_____Tag__, align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca %struct.Node__, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.tag_____Error__, align 8
  %20 = alloca %struct.tag_____IntRange__, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call { ptr, ptr } @TypeChecker__getArgWithTypeFlags__(ptr noundef %21, ptr noundef %22, i32 noundef 0, i32 noundef 205024, i8 noundef zeroext 1, ptr noundef byval(%struct.string__) align 8 @mu_____string217)
  %24 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 0
  %25 = extractvalue { ptr, ptr } %23, 0
  store ptr %25, ptr %24, align 8
  %26 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 1
  %27 = extractvalue { ptr, ptr } %23, 1
  store ptr %27, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  %28 = getelementptr inbounds %struct.tag_____Tag__, ptr %6, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = icmp eq ptr %29, null
  %31 = zext i1 %30 to i32
  %32 = trunc i32 %31 to i8
  store i8 %32, ptr %7, align 1, !tbaa !11
  %33 = load i8, ptr %7, align 1, !tbaa !11
  %34 = icmp ne i8 %33, 0
  br i1 %34, label %44, label %35

35:                                               ; preds = %2
  %36 = getelementptr inbounds %struct.tag_____Tag__, ptr %6, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.tag_____Namespace__, ptr %37, i32 0, i32 3
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = and i32 %39, 8192
  %41 = icmp eq i32 %40, 0
  %42 = zext i1 %41 to i32
  %43 = trunc i32 %42 to i8
  store i8 %43, ptr %7, align 1, !tbaa !11
  br label %44

44:                                               ; preds = %35, %2
  %45 = load i8, ptr %7, align 1, !tbaa !11
  %46 = icmp ne i8 %45, 0
  br i1 %46, label %47, label %172

47:                                               ; preds = %44
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr @mu_____string172, align 8
  %51 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string172, i32 0, i32 1), align 8
  %52 = call { ptr, ptr } @TypeChecker__getTypeArgWithTypeFlags__(ptr noundef %48, ptr noundef %49, i32 noundef 1, i32 noundef 204992, ptr %50, i32 %51)
  %53 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0
  %54 = extractvalue { ptr, ptr } %52, 0
  store ptr %54, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 1
  %56 = extractvalue { ptr, ptr } %52, 1
  store ptr %56, ptr %55, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = call zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef %57, ptr noundef %58, i32 noundef 2, i8 noundef zeroext 0)
  %60 = icmp ne i8 %59, 0
  %61 = xor i1 %60, true
  %62 = zext i1 %61 to i32
  %63 = trunc i32 %62 to i8
  store i8 %63, ptr %8, align 1, !tbaa !11
  %64 = load i8, ptr %8, align 1, !tbaa !11
  %65 = icmp ne i8 %64, 0
  br i1 %65, label %72, label %66

66:                                               ; preds = %47
  %67 = getelementptr inbounds %struct.tag_____Tag__, ptr %6, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  %69 = icmp eq ptr %68, null
  %70 = zext i1 %69 to i32
  %71 = trunc i32 %70 to i8
  store i8 %71, ptr %8, align 1, !tbaa !11
  br label %72

72:                                               ; preds = %66, %47
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  %73 = load i8, ptr %8, align 1, !tbaa !11
  store i8 %73, ptr %9, align 1, !tbaa !11
  %74 = load i8, ptr %9, align 1, !tbaa !11
  %75 = icmp ne i8 %74, 0
  br i1 %75, label %82, label %76

76:                                               ; preds = %72
  %77 = getelementptr inbounds %struct.tag_____Tag__, ptr %3, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = icmp eq ptr %78, null
  %80 = zext i1 %79 to i32
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %9, align 1, !tbaa !11
  br label %82

82:                                               ; preds = %76, %72
  %83 = load i8, ptr %9, align 1, !tbaa !11
  %84 = icmp ne i8 %83, 0
  br i1 %84, label %85, label %86

85:                                               ; preds = %82
  store i32 1, ptr %10, align 4
  br label %171

86:                                               ; preds = %82
  %87 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8
  %89 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8
  %91 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  %93 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8
  %95 = call zeroext i8 @Tag__equals__(ptr %88, ptr %90, ptr %92, ptr %94)
  %96 = icmp ne i8 %95, 0
  br i1 %96, label %97, label %113

97:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #3
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.tag_____CallExpression__, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !16
  %101 = getelementptr inbounds %struct.Node__, ptr %11, i32 0, i32 1
  store ptr %100, ptr %101, align 8, !tbaa !19
  %102 = getelementptr inbounds %struct.Node__, ptr %11, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !19
  %104 = icmp ne ptr %103, null
  %105 = zext i1 %104 to i64
  %106 = select i1 %104, i32 21, i32 0
  %107 = getelementptr inbounds %struct.Node__, ptr %11, i32 0, i32 0
  store i32 %106, ptr %107, align 8, !tbaa !20
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds { i32, ptr }, ptr %11, i32 0, i32 0
  %110 = load i32, ptr %109, align 8
  %111 = getelementptr inbounds { i32, ptr }, ptr %11, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8
  call void @TypeChecker__redundantCast__(ptr noundef %108, i32 %110, ptr %112)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  br label %170

113:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  %114 = getelementptr inbounds %struct.tag_____Tag__, ptr %3, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.tag_____Namespace__, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 4, !tbaa !12
  %118 = and i32 %117, 8192
  %119 = icmp ne i32 %118, 0
  %120 = zext i1 %119 to i32
  %121 = trunc i32 %120 to i8
  store i8 %121, ptr %12, align 1, !tbaa !11
  %122 = load i8, ptr %12, align 1, !tbaa !11
  %123 = icmp ne i8 %122, 0
  br i1 %123, label %124, label %138

124:                                              ; preds = %113
  %125 = getelementptr inbounds %struct.tag_____Tag__, ptr %3, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.tag_____Namespace__, ptr %126, i32 0, i32 8
  %128 = load ptr, ptr %127, align 8, !tbaa !21
  %129 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8
  %131 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8
  %133 = call zeroext i8 @Set__contains__Tag____(ptr noundef %128, ptr %130, ptr %132)
  %134 = icmp ne i8 %133, 0
  %135 = xor i1 %134, true
  %136 = zext i1 %135 to i32
  %137 = trunc i32 %136 to i8
  store i8 %137, ptr %12, align 1, !tbaa !11
  br label %138

138:                                              ; preds = %124, %113
  %139 = load i8, ptr %12, align 1, !tbaa !11
  %140 = icmp ne i8 %139, 0
  br i1 %140, label %141, label %169

141:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.tag_____CallExpression__, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !22
  store ptr %144, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !23
  %145 = load i32, ptr %14, align 4, !tbaa !23
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.tag_____List__Node____, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 8, !tbaa !24
  %149 = icmp ult i32 %145, %148
  br i1 %149, label %153, label %150

150:                                              ; preds = %141
  %151 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  call void %152(i32 noundef -3)
  br label %153

153:                                              ; preds = %150, %141
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.tag_____List__Node____, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !26
  %158 = load i32, ptr %14, align 4, !tbaa !23
  %159 = zext i32 %158 to i64
  %160 = getelementptr inbounds %struct.Node__, ptr %157, i64 %159
  %161 = getelementptr inbounds { i32, ptr }, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 8
  %163 = getelementptr inbounds { i32, ptr }, ptr %160, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8
  %165 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8
  %167 = getelementptr inbounds { ptr, ptr }, ptr %6, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8
  call void @TypeChecker__badConversion__(ptr noundef %154, i32 %162, ptr %164, ptr %166, ptr %168, ptr noundef byval(%struct.tag_____Tag__) align 8 %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %169

169:                                              ; preds = %153, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  br label %170

170:                                              ; preds = %169, %97
  store i32 1, ptr %10, align 4
  br label %171

171:                                              ; preds = %170, %85
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  br label %263

172:                                              ; preds = %44
  %173 = getelementptr inbounds %struct.tag_____Tag__, ptr %6, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !9
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %175, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !27
  %178 = getelementptr inbounds %struct.tag_____CommonTags__, ptr %177, i32 0, i32 16
  %179 = getelementptr inbounds %struct.tag_____Tag__, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !29
  %181 = icmp eq ptr %174, %180
  br i1 %181, label %182, label %250

182:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.tag_____CallExpression__, ptr %183, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !22
  store ptr %185, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !23
  %186 = load i32, ptr %16, align 4, !tbaa !23
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.tag_____List__Node____, ptr %187, i32 0, i32 1
  %189 = load i32, ptr %188, align 8, !tbaa !24
  %190 = icmp ult i32 %186, %189
  br i1 %190, label %194, label %191

191:                                              ; preds = %182
  %192 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  call void %193(i32 noundef -3)
  br label %194

194:                                              ; preds = %191, %182
  %195 = load ptr, ptr %15, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.tag_____List__Node____, ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !26
  %198 = load i32, ptr %16, align 4, !tbaa !23
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds %struct.Node__, ptr %197, i64 %199
  %201 = getelementptr inbounds %struct.Node__, ptr %200, i32 0, i32 0
  %202 = load i32, ptr %201, align 8, !tbaa !20
  %203 = icmp eq i32 %202, 20
  br i1 %203, label %237, label %204

204:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.tag_____CallExpression__, ptr %205, i32 0, i32 2
  %207 = load ptr, ptr %206, align 8, !tbaa !22
  store ptr %207, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !23
  %208 = load i32, ptr %18, align 4, !tbaa !23
  %209 = load ptr, ptr %17, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.tag_____List__Node____, ptr %209, i32 0, i32 1
  %211 = load i32, ptr %210, align 8, !tbaa !24
  %212 = icmp ult i32 %208, %211
  br i1 %212, label %216, label %213

213:                                              ; preds = %204
  %214 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %215 = load ptr, ptr %214, align 8, !tbaa !5
  call void %215(i32 noundef -3)
  br label %216

216:                                              ; preds = %213, %204
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %217, i32 0, i32 2
  %219 = load ptr, ptr %218, align 8, !tbaa !31
  %220 = load ptr, ptr %4, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.tag_____TypeCheckerContext__, ptr %220, i32 0, i32 5
  %222 = load ptr, ptr %221, align 8, !tbaa !32
  %223 = load ptr, ptr %17, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.tag_____List__Node____, ptr %223, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !26
  %226 = load i32, ptr %18, align 4, !tbaa !23
  %227 = zext i32 %226 to i64
  %228 = getelementptr inbounds %struct.Node__, ptr %225, i64 %227
  %229 = getelementptr inbounds { i32, ptr }, ptr %228, i32 0, i32 0
  %230 = load i32, ptr %229, align 8
  %231 = getelementptr inbounds { i32, ptr }, ptr %228, i32 0, i32 1
  %232 = load ptr, ptr %231, align 8
  %233 = call i64 @RangeFinder__find__(i32 %230, ptr %232)
  store i64 %233, ptr %20, align 4
  %234 = load i64, ptr %20, align 4
  %235 = load ptr, ptr @mu_____string111, align 8
  %236 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string111, i32 0, i32 1), align 8
  call void @Error__at__(ptr dead_on_unwind writable sret(%struct.tag_____Error__) align 8 %19, ptr noundef %222, i64 %234, ptr %235, i32 %236)
  call void @List__add__Error____(ptr noundef %219, ptr noundef byval(%struct.tag_____Error__) align 8 %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %237

237:                                              ; preds = %216, %194
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = load ptr, ptr %5, align 8, !tbaa !5
  %240 = load ptr, ptr @mu_____string218, align 8
  %241 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string218, i32 0, i32 1), align 8
  %242 = call { ptr, ptr } @TypeChecker__getTypeArgWithTypeFlags__(ptr noundef %238, ptr noundef %239, i32 noundef 1, i32 noundef 192, ptr %240, i32 %241)
  %243 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0
  %244 = extractvalue { ptr, ptr } %242, 0
  store ptr %244, ptr %243, align 8
  %245 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 1
  %246 = extractvalue { ptr, ptr } %242, 1
  store ptr %246, ptr %245, align 8
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = load ptr, ptr %5, align 8, !tbaa !5
  %249 = call zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef %247, ptr noundef %248, i32 noundef 2, i8 noundef zeroext 0)
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %263

250:                                              ; preds = %172
  %251 = load ptr, ptr %4, align 8, !tbaa !5
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = load ptr, ptr @mu_____string219, align 8
  %254 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string219, i32 0, i32 1), align 8
  %255 = call { ptr, ptr } @TypeChecker__getTypeArgWithTypeFlags__(ptr noundef %251, ptr noundef %252, i32 noundef 1, i32 noundef 128, ptr %253, i32 %254)
  %256 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0
  %257 = extractvalue { ptr, ptr } %255, 0
  store ptr %257, ptr %256, align 8
  %258 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 1
  %259 = extractvalue { ptr, ptr } %255, 1
  store ptr %259, ptr %258, align 8
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = load ptr, ptr %5, align 8, !tbaa !5
  %262 = call zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef %260, ptr noundef %261, i32 noundef 2, i8 noundef zeroext 0)
  store i32 1, ptr %10, align 4
  br label %263

263:                                              ; preds = %250, %237, %171
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  %264 = load { ptr, ptr }, ptr %3, align 8
  ret { ptr, ptr } %264
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!7, !7, i64 0}
!12 = !{!13, !15, i64 28}
!13 = !{!"tag_____Namespace__", !14, i64 0, !6, i64 16, !15, i64 24, !15, 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, !15, i64 104}
!14 = !{!"", !6, i64 0, !15, i64 8}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"tag_____CallExpression__", !18, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!18 = !{!"", !15, i64 0, !6, i64 8}
!19 = !{!18, !6, i64 8}
!20 = !{!18, !15, i64 0}
!21 = !{!13, !6, i64 64}
!22 = !{!17, !6, i64 24}
!23 = !{!15, !15, i64 0}
!24 = !{!25, !15, i64 8}
!25 = !{!"tag_____List__Node____", !6, i64 0, !15, i64 8, !15, i64 12}
!26 = !{!25, !6, i64 0}
!27 = !{!28, !6, i64 32}
!28 = !{!"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, !15, i64 120, !15, i64 124, !6, i64 128, !15, i64 136, !7, i64 140}
!29 = !{!30, !6, i64 256}
!30 = !{!"tag_____CommonTags__", !10, i64 0, !10, i64 16, !10, i64 32, !10, i64 48, !10, i64 64, !10, i64 80, !10, i64 96, !10, i64 112, !10, i64 128, !10, i64 144, !10, i64 160, !10, i64 176, !10, i64 192, !10, i64 208, !10, i64 224, !10, i64 240, !10, i64 256, !10, i64 272, !10, i64 288, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376}
!31 = !{!28, !6, i64 16}
!32 = !{!28, !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.string__ = type { ptr, i32 }
%struct.tag_____Error__ = type { ptr, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.tag_____Tag__ = type { ptr, ptr }

@mu_____string217 = external dso_local global %struct.string__, align 8
@mu_____string111 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string172 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string218 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string219 = external dso_local local_unnamed_addr global %struct.string__, align 8
@top_____abandonFn__ = external dso_local thread_local local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

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

; 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 #1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local { ptr, ptr } @TypeChecker__getArgWithTypeFlags__(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i8 noundef zeroext, ptr noundef byval(%struct.string__) align 8) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef, ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @TypeChecker__badConversion__(ptr noundef, i32, ptr, ptr, ptr, ptr noundef byval(%struct.tag_____Tag__) align 8) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local { ptr, ptr } @TypeChecker__checkPointerCast__(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.tag_____Tag__, align 8
  %4 = alloca %struct.tag_____Error__, align 8
  %5 = tail call { ptr, ptr } @TypeChecker__getArgWithTypeFlags__(ptr noundef %0, ptr noundef %1, i32 noundef 0, i32 noundef 205024, i8 noundef zeroext 1, ptr noundef nonnull byval(%struct.string__) align 8 @mu_____string217)
  %6 = extractvalue { ptr, ptr } %5, 0
  %7 = extractvalue { ptr, ptr } %5, 1
  %8 = icmp ne ptr %6, null
  br i1 %8, label %9, label %.critedge

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %6, i64 28
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = and i32 %11, 8192
  %.not75 = icmp eq i32 %12, 0
  br i1 %.not75, label %.critedge, label %48

.critedge:                                        ; preds = %2, %9
  %13 = load ptr, ptr @mu_____string172, align 8
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string172, i64 8), align 8
  %15 = tail call { ptr, ptr } @TypeChecker__getTypeArgWithTypeFlags__(ptr noundef %0, ptr noundef %1, i32 noundef 1, i32 noundef 204992, ptr %13, i32 %14)
  %16 = extractvalue { ptr, ptr } %15, 0
  store ptr %16, ptr %3, align 8
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = extractvalue { ptr, ptr } %15, 1
  store ptr %18, ptr %17, align 8
  %19 = tail call zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef %0, ptr noundef %1, i32 noundef 2, i8 noundef zeroext 0)
  %.not61 = icmp ne i8 %19, 0
  %spec.select = and i1 %8, %.not61
  %20 = icmp ne ptr %16, null
  %or.cond = select i1 %spec.select, i1 %20, i1 false
  br i1 %or.cond, label %21, label %.critedge73

21:                                               ; preds = %.critedge
  %22 = tail call zeroext i8 @Tag__equals__(ptr nonnull %6, ptr %7, ptr nonnull %16, ptr %18)
  %.not64 = icmp eq i8 %22, 0
  br i1 %.not64, label %27, label %23

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %1, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  %.not69 = icmp eq ptr %25, null
  %26 = select i1 %.not69, i32 0, i32 21
  tail call void @TypeChecker__redundantCast__(ptr noundef %0, i32 %26, ptr %25)
  br label %.critedge73

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %16, i64 28
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = and i32 %29, 8192
  %.not65 = icmp eq i32 %30, 0
  br i1 %.not65, label %.critedge73, label %31

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %16, i64 64
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = tail call zeroext i8 @Set__contains__Tag____(ptr noundef %33, ptr nonnull %6, ptr %7)
  %.not66.not = icmp eq i8 %34, 0
  br i1 %.not66.not, label %35, label %.critedge73

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %1, i64 24
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !17
  %.not68 = icmp eq i32 %39, 0
  br i1 %.not68, label %40, label %43

40:                                               ; preds = %35
  %41 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %42 = load ptr, ptr %41, align 8, !tbaa !19
  tail call void %42(i32 noundef -3) #2
  br label %43

43:                                               ; preds = %40, %35
  %44 = load ptr, ptr %37, align 8, !tbaa !20
  %45 = load i32, ptr %44, align 8
  %46 = getelementptr inbounds i8, ptr %44, i64 8
  %47 = load ptr, ptr %46, align 8
  tail call void @TypeChecker__badConversion__(ptr noundef %0, i32 %45, ptr %47, ptr nonnull %6, ptr %7, ptr noundef nonnull byval(%struct.tag_____Tag__) align 8 %3)
  %.fca.0.load.pre = load ptr, ptr %3, align 8
  %.fca.1.load.pre = load ptr, ptr %17, align 8
  br label %.critedge73

48:                                               ; preds = %9
  %49 = getelementptr inbounds i8, ptr %0, i64 32
  %50 = load ptr, ptr %49, align 8, !tbaa !21
  %51 = getelementptr inbounds i8, ptr %50, i64 256
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = icmp eq ptr %6, %52
  br i1 %53, label %54, label %92

54:                                               ; preds = %48
  %55 = getelementptr inbounds i8, ptr %1, i64 24
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load i32, ptr %57, align 8, !tbaa !17
  %.not = icmp eq i32 %58, 0
  br i1 %.not, label %59, label %62

59:                                               ; preds = %54
  %60 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  tail call void %61(i32 noundef -3) #2
  br label %62

62:                                               ; preds = %59, %54
  %63 = load ptr, ptr %56, align 8, !tbaa !20
  %64 = load i32, ptr %63, align 8, !tbaa !26
  %65 = icmp eq i32 %64, 20
  br i1 %65, label %85, label %66

66:                                               ; preds = %62
  %67 = load ptr, ptr %55, align 8, !tbaa !16
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !17
  %.not60 = icmp eq i32 %69, 0
  br i1 %.not60, label %70, label %73

70:                                               ; preds = %66
  %71 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  tail call void %72(i32 noundef -3) #2
  br label %73

73:                                               ; preds = %70, %66
  %74 = getelementptr inbounds i8, ptr %0, i64 16
  %75 = load ptr, ptr %74, align 8, !tbaa !27
  %76 = getelementptr inbounds i8, ptr %0, i64 40
  %77 = load ptr, ptr %76, align 8, !tbaa !28
  %78 = load ptr, ptr %67, align 8, !tbaa !20
  %79 = load i32, ptr %78, align 8
  %80 = getelementptr inbounds i8, ptr %78, i64 8
  %81 = load ptr, ptr %80, align 8
  %82 = tail call i64 @RangeFinder__find__(i32 %79, ptr %81)
  %83 = load ptr, ptr @mu_____string111, align 8
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string111, i64 8), align 8
  call void @Error__at__(ptr dead_on_unwind nonnull writable sret(%struct.tag_____Error__) align 8 %4, ptr noundef %77, i64 %82, ptr %83, i32 %84)
  call void @List__add__Error____(ptr noundef %75, ptr noundef nonnull byval(%struct.tag_____Error__) align 8 %4)
  br label %85

85:                                               ; preds = %73, %62
  %86 = load ptr, ptr @mu_____string218, align 8
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string218, i64 8), align 8
  %88 = call { ptr, ptr } @TypeChecker__getTypeArgWithTypeFlags__(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef 1, i32 noundef 192, ptr %86, i32 %87)
  %89 = extractvalue { ptr, ptr } %88, 0
  %90 = extractvalue { ptr, ptr } %88, 1
  %91 = call zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef 2, i8 noundef zeroext 0)
  br label %.critedge73

92:                                               ; preds = %48
  %93 = load ptr, ptr @mu_____string219, align 8
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string219, i64 8), align 8
  %95 = tail call { ptr, ptr } @TypeChecker__getTypeArgWithTypeFlags__(ptr noundef nonnull %0, ptr noundef %1, i32 noundef 1, i32 noundef 128, ptr %93, i32 %94)
  %96 = extractvalue { ptr, ptr } %95, 0
  %97 = extractvalue { ptr, ptr } %95, 1
  %98 = tail call zeroext i8 @TypeChecker__checkRemainingArgs__(ptr noundef nonnull %0, ptr noundef %1, i32 noundef 2, i8 noundef zeroext 0)
  br label %.critedge73

.critedge73:                                      ; preds = %.critedge, %31, %43, %27, %23, %92, %85
  %.fca.1.load = phi ptr [ %18, %.critedge ], [ %18, %31 ], [ %.fca.1.load.pre, %43 ], [ %18, %27 ], [ %18, %23 ], [ %97, %92 ], [ %90, %85 ]
  %.fca.0.load = phi ptr [ %16, %.critedge ], [ %16, %31 ], [ %.fca.0.load.pre, %43 ], [ %16, %27 ], [ %16, %23 ], [ %96, %92 ], [ %89, %85 ]
  %.fca.0.insert = insertvalue { ptr, ptr } poison, ptr %.fca.0.load, 0
  %.fca.1.insert = insertvalue { ptr, ptr } %.fca.0.insert, ptr %.fca.1.load, 1
  ret { ptr, ptr } %.fca.1.insert
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !11, i64 28}
!6 = !{!"tag_____Namespace__", !7, i64 0, !8, i64 16, !11, i64 24, !11, i64 28, !8, i64 32, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 64, !8, i64 72, !8, i64 80, !8, i64 88, !8, i64 96, !11, i64 104}
!7 = !{!"", !8, i64 0, !11, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!13, !8, i64 16}
!13 = !{!"tag_____CallExpression__", !14, i64 0, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48}
!14 = !{!"", !11, i64 0, !8, i64 8}
!15 = !{!6, !8, i64 64}
!16 = !{!13, !8, i64 24}
!17 = !{!18, !11, i64 8}
!18 = !{!"tag_____List__Node____", !8, i64 0, !11, i64 8, !11, i64 12}
!19 = !{!8, !8, i64 0}
!20 = !{!18, !8, i64 0}
!21 = !{!22, !8, i64 32}
!22 = !{!"tag_____TypeCheckerContext__", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 64, !8, i64 72, !8, i64 80, !8, i64 88, !8, i64 96, !8, i64 104, !8, i64 112, !11, i64 120, !11, i64 124, !8, i64 128, !11, i64 136, !9, i64 140}
!23 = !{!24, !8, i64 256}
!24 = !{!"tag_____CommonTags__", !25, i64 0, !25, i64 16, !25, i64 32, !25, i64 48, !25, i64 64, !25, i64 80, !25, i64 96, !25, i64 112, !25, i64 128, !25, i64 144, !25, i64 160, !25, i64 176, !25, i64 192, !25, i64 208, !25, i64 224, !25, i64 240, !25, i64 256, !25, i64 272, !25, i64 288, !8, i64 304, !8, i64 312, !8, i64 320, !8, i64 328, !8, i64 336, !8, i64 344, !8, i64 352, !8, i64 360, !8, i64 368, !8, i64 376}
!25 = !{!"tag_____Tag__", !8, i64 0, !8, i64 8}
!26 = !{!14, !11, i64 0}
!27 = !{!22, !8, i64 16}
!28 = !{!22, !8, i64 40}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass