; LLVM IR from ponylang/ponyc :: src/libponyc/type (assemble)

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

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

declare zeroext i1 @names_nominal(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

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

declare ptr @ast_from(ptr noundef, i32 noundef) #1

declare ptr @ast_add(ptr noundef, ptr noundef) #1

declare ptr @ast_add_sibling(ptr noundef, ptr noundef) #1

declare void @ast_inheritflags(ptr noundef) #1

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

declare i32 @ast_id(ptr noundef) #1

declare ptr @ast_append(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @type_for_class(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca [3 x ptr], align 16
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  %44 = zext i1 %5 to i8
  store i8 %44, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #3
  store ptr %13, ptr %15, align 8, !tbaa !5
  %45 = getelementptr inbounds ptr, ptr %15, i64 1
  store ptr %14, ptr %45, align 8, !tbaa !5
  %46 = getelementptr inbounds ptr, ptr %15, i64 2
  store ptr null, ptr %46, align 8, !tbaa !5
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds [3 x ptr], ptr %15, i64 0, i64 0
  call void @ast_get_children(ptr noundef %47, i64 noundef 2, ptr noundef %48)
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %49, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  store ptr null, ptr %20, align 8, !tbaa !5
  %50 = load ptr, ptr %17, align 8, !tbaa !5
  %51 = call ptr @ast_from(ptr noundef %50, i32 noundef 2)
  store ptr %51, ptr %20, align 8, !tbaa !5
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %56

54:                                               ; preds = %6
  %55 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %55, ptr %18, align 8, !tbaa !5
  br label %68

56:                                               ; preds = %6
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %63

59:                                               ; preds = %56
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  %61 = load ptr, ptr %20, align 8, !tbaa !5
  %62 = call ptr @ast_add(ptr noundef %60, ptr noundef %61)
  store ptr %62, ptr %19, align 8, !tbaa !5
  br label %67

63:                                               ; preds = %56
  %64 = load ptr, ptr %19, align 8, !tbaa !5
  %65 = load ptr, ptr %20, align 8, !tbaa !5
  %66 = call ptr @ast_add_sibling(ptr noundef %64, ptr noundef %65)
  store ptr %66, ptr %19, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %63, %59
  br label %68

68:                                               ; preds = %67, %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %69 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %69, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  store ptr null, ptr %23, align 8, !tbaa !5
  %70 = load ptr, ptr %21, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %70)
  %71 = load ptr, ptr %21, align 8, !tbaa !5
  %72 = load ptr, ptr %22, align 8, !tbaa !5
  %73 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  %74 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %74, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %75, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  store ptr null, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  store ptr null, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  store ptr null, ptr %28, align 8, !tbaa !5
  %76 = load ptr, ptr %25, align 8, !tbaa !5
  %77 = call ptr @ast_from(ptr noundef %76, i32 noundef 151)
  store ptr %77, ptr %28, align 8, !tbaa !5
  %78 = load ptr, ptr %26, align 8, !tbaa !5
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %82

80:                                               ; preds = %68
  %81 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %81, ptr %26, align 8, !tbaa !5
  br label %94

82:                                               ; preds = %68
  %83 = load ptr, ptr %27, align 8, !tbaa !5
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %89

85:                                               ; preds = %82
  %86 = load ptr, ptr %26, align 8, !tbaa !5
  %87 = load ptr, ptr %28, align 8, !tbaa !5
  %88 = call ptr @ast_add(ptr noundef %86, ptr noundef %87)
  store ptr %88, ptr %27, align 8, !tbaa !5
  br label %93

89:                                               ; preds = %82
  %90 = load ptr, ptr %27, align 8, !tbaa !5
  %91 = load ptr, ptr %28, align 8, !tbaa !5
  %92 = call ptr @ast_add_sibling(ptr noundef %90, ptr noundef %91)
  store ptr %92, ptr %27, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %89, %85
  br label %94

94:                                               ; preds = %93, %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %95 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %95, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  store ptr null, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  store ptr null, ptr %31, align 8, !tbaa !5
  %96 = load ptr, ptr %25, align 8, !tbaa !5
  %97 = call ptr @ast_from(ptr noundef %96, i32 noundef 2)
  store ptr %97, ptr %31, align 8, !tbaa !5
  %98 = load ptr, ptr %29, align 8, !tbaa !5
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %102

100:                                              ; preds = %94
  %101 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %101, ptr %29, align 8, !tbaa !5
  br label %114

102:                                              ; preds = %94
  %103 = load ptr, ptr %30, align 8, !tbaa !5
  %104 = icmp eq ptr %103, null
  br i1 %104, label %105, label %109

105:                                              ; preds = %102
  %106 = load ptr, ptr %29, align 8, !tbaa !5
  %107 = load ptr, ptr %31, align 8, !tbaa !5
  %108 = call ptr @ast_add(ptr noundef %106, ptr noundef %107)
  store ptr %108, ptr %30, align 8, !tbaa !5
  br label %113

109:                                              ; preds = %102
  %110 = load ptr, ptr %30, align 8, !tbaa !5
  %111 = load ptr, ptr %31, align 8, !tbaa !5
  %112 = call ptr @ast_add_sibling(ptr noundef %110, ptr noundef %111)
  store ptr %112, ptr %30, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %109, %105
  br label %114

114:                                              ; preds = %113, %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %115 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %115, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  store ptr null, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #3
  store ptr null, ptr %34, align 8, !tbaa !5
  %116 = load ptr, ptr %32, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %116)
  %117 = load ptr, ptr %32, align 8, !tbaa !5
  %118 = load ptr, ptr %33, align 8, !tbaa !5
  %119 = load ptr, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  %120 = load ptr, ptr %29, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  br i1 %121, label %122, label %124

122:                                              ; preds = %114
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %123, ptr %29, align 8, !tbaa !5
  br label %136

124:                                              ; preds = %114
  %125 = load ptr, ptr %30, align 8, !tbaa !5
  %126 = icmp eq ptr %125, null
  br i1 %126, label %127, label %131

127:                                              ; preds = %124
  %128 = load ptr, ptr %29, align 8, !tbaa !5
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = call ptr @ast_add(ptr noundef %128, ptr noundef %129)
  store ptr %130, ptr %30, align 8, !tbaa !5
  br label %135

131:                                              ; preds = %124
  %132 = load ptr, ptr %30, align 8, !tbaa !5
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = call ptr @ast_add_sibling(ptr noundef %132, ptr noundef %133)
  store ptr %134, ptr %30, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %131, %127
  br label %136

136:                                              ; preds = %135, %122
  %137 = load ptr, ptr %29, align 8, !tbaa !5
  %138 = icmp eq ptr %137, null
  br i1 %138, label %139, label %141

139:                                              ; preds = %136
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %140, ptr %29, align 8, !tbaa !5
  br label %153

141:                                              ; preds = %136
  %142 = load ptr, ptr %30, align 8, !tbaa !5
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %148

144:                                              ; preds = %141
  %145 = load ptr, ptr %29, align 8, !tbaa !5
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  %147 = call ptr @ast_add(ptr noundef %145, ptr noundef %146)
  store ptr %147, ptr %30, align 8, !tbaa !5
  br label %152

148:                                              ; preds = %141
  %149 = load ptr, ptr %30, align 8, !tbaa !5
  %150 = load ptr, ptr %16, align 8, !tbaa !5
  %151 = call ptr @ast_add_sibling(ptr noundef %149, ptr noundef %150)
  store ptr %151, ptr %30, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %148, %144
  br label %153

153:                                              ; preds = %152, %139
  %154 = load ptr, ptr %25, align 8, !tbaa !5
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = call ptr @ast_from(ptr noundef %154, i32 noundef %155)
  store ptr %156, ptr %31, align 8, !tbaa !5
  %157 = load ptr, ptr %29, align 8, !tbaa !5
  %158 = icmp eq ptr %157, null
  br i1 %158, label %159, label %161

159:                                              ; preds = %153
  %160 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %160, ptr %29, align 8, !tbaa !5
  br label %173

161:                                              ; preds = %153
  %162 = load ptr, ptr %30, align 8, !tbaa !5
  %163 = icmp eq ptr %162, null
  br i1 %163, label %164, label %168

164:                                              ; preds = %161
  %165 = load ptr, ptr %29, align 8, !tbaa !5
  %166 = load ptr, ptr %31, align 8, !tbaa !5
  %167 = call ptr @ast_add(ptr noundef %165, ptr noundef %166)
  store ptr %167, ptr %30, align 8, !tbaa !5
  br label %172

168:                                              ; preds = %161
  %169 = load ptr, ptr %30, align 8, !tbaa !5
  %170 = load ptr, ptr %31, align 8, !tbaa !5
  %171 = call ptr @ast_add_sibling(ptr noundef %169, ptr noundef %170)
  store ptr %171, ptr %30, align 8, !tbaa !5
  br label %172

172:                                              ; preds = %168, %164
  br label %173

173:                                              ; preds = %172, %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  %174 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %174, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  store ptr null, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #3
  store ptr null, ptr %37, align 8, !tbaa !5
  %175 = load ptr, ptr %35, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %175)
  %176 = load ptr, ptr %35, align 8, !tbaa !5
  %177 = load ptr, ptr %36, align 8, !tbaa !5
  %178 = load ptr, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  %179 = load ptr, ptr %25, align 8, !tbaa !5
  %180 = load i32, ptr %11, align 4, !tbaa !9
  %181 = call ptr @ast_from(ptr noundef %179, i32 noundef %180)
  store ptr %181, ptr %31, align 8, !tbaa !5
  %182 = load ptr, ptr %29, align 8, !tbaa !5
  %183 = icmp eq ptr %182, null
  br i1 %183, label %184, label %186

184:                                              ; preds = %173
  %185 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %185, ptr %29, align 8, !tbaa !5
  br label %198

186:                                              ; preds = %173
  %187 = load ptr, ptr %30, align 8, !tbaa !5
  %188 = icmp eq ptr %187, null
  br i1 %188, label %189, label %193

189:                                              ; preds = %186
  %190 = load ptr, ptr %29, align 8, !tbaa !5
  %191 = load ptr, ptr %31, align 8, !tbaa !5
  %192 = call ptr @ast_add(ptr noundef %190, ptr noundef %191)
  store ptr %192, ptr %30, align 8, !tbaa !5
  br label %197

193:                                              ; preds = %186
  %194 = load ptr, ptr %30, align 8, !tbaa !5
  %195 = load ptr, ptr %31, align 8, !tbaa !5
  %196 = call ptr @ast_add_sibling(ptr noundef %194, ptr noundef %195)
  store ptr %196, ptr %30, align 8, !tbaa !5
  br label %197

197:                                              ; preds = %193, %189
  br label %198

198:                                              ; preds = %197, %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #3
  %199 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %199, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #3
  store ptr null, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #3
  store ptr null, ptr %40, align 8, !tbaa !5
  %200 = load ptr, ptr %38, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %200)
  %201 = load ptr, ptr %38, align 8, !tbaa !5
  %202 = load ptr, ptr %39, align 8, !tbaa !5
  %203 = load ptr, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #3
  %204 = load ptr, ptr %29, align 8, !tbaa !5
  call void @ast_inheritflags(ptr noundef %204)
  %205 = load ptr, ptr %29, align 8, !tbaa !5
  %206 = load ptr, ptr %30, align 8, !tbaa !5
  %207 = load ptr, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  %208 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %208, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  %209 = load ptr, ptr %14, align 8, !tbaa !5
  %210 = call i32 @ast_id(ptr noundef %209)
  %211 = icmp eq i32 %210, 162
  br i1 %211, label %212, label %248

212:                                              ; preds = %198
  %213 = load ptr, ptr %16, align 8, !tbaa !5
  %214 = call ptr @ast_setid(ptr noundef %213, i32 noundef 166)
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #3
  %215 = load ptr, ptr %14, align 8, !tbaa !5
  %216 = call ptr @ast_child(ptr noundef %215)
  store ptr %216, ptr %41, align 8, !tbaa !5
  br label %217

217:                                              ; preds = %244, %212
  %218 = load ptr, ptr %41, align 8, !tbaa !5
  %219 = icmp ne ptr %218, null
  br i1 %219, label %220, label %247

220:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #3
  %221 = load ptr, ptr %41, align 8, !tbaa !5
  %222 = call ptr @ast_child(ptr noundef %221)
  store ptr %222, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #3
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = load ptr, ptr %42, align 8, !tbaa !5
  %225 = call ptr @ast_name(ptr noundef %224)
  %226 = call ptr @type_sugar(ptr noundef %223, ptr noundef null, ptr noundef %225)
  store ptr %226, ptr %43, align 8, !tbaa !5
  %227 = load ptr, ptr %16, align 8, !tbaa !5
  %228 = load ptr, ptr %43, align 8, !tbaa !5
  %229 = call ptr @ast_append(ptr noundef %227, ptr noundef %228)
  %230 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %231 = trunc i8 %230 to i1
  br i1 %231, label %232, label %244

232:                                              ; preds = %220
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  %234 = load ptr, ptr %9, align 8, !tbaa !5
  %235 = call zeroext i1 @names_nominal(ptr noundef %233, ptr noundef %234, ptr noundef %43, i1 noundef zeroext false)
  %236 = load ptr, ptr %43, align 8, !tbaa !5
  %237 = call i32 @ast_id(ptr noundef %236)
  %238 = icmp eq i32 %237, 187
  br i1 %238, label %239, label %243

239:                                              ; preds = %232
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = load ptr, ptr %43, align 8, !tbaa !5
  %242 = call i32 @flatten_typeparamref(ptr noundef %240, ptr noundef %241)
  br label %243

243:                                              ; preds = %239, %232
  br label %244

244:                                              ; preds = %243, %220
  %245 = load ptr, ptr %41, align 8, !tbaa !5
  %246 = call ptr @ast_sibling(ptr noundef %245)
  store ptr %246, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #3
  br label %217, !llvm.loop !15

247:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #3
  br label %248

248:                                              ; preds = %247, %198
  %249 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %250 = trunc i8 %249 to i1
  br i1 %250, label %251, label %255

251:                                              ; preds = %248
  %252 = load ptr, ptr %7, align 8, !tbaa !5
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = call zeroext i1 @names_nominal(ptr noundef %252, ptr noundef %253, ptr noundef %24, i1 noundef zeroext false)
  br label %255

255:                                              ; preds = %251, %248
  %256 = load ptr, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret ptr %256
}

declare void @ast_get_children(ptr noundef, i64 noundef, ptr noundef) #1

declare ptr @ast_setid(ptr noundef, i32 noundef) #1

declare ptr @ast_child(ptr noundef) #1

declare ptr @ast_name(ptr noundef) #1

declare i32 @flatten_typeparamref(ptr noundef, ptr noundef) #1

declare ptr @ast_sibling(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

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

declare zeroext i1 @names_nominal(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

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

declare ptr @ast_from(ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @ast_add(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ast_add_sibling(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @ast_inheritflags(ptr noundef) local_unnamed_addr #1

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

declare i32 @ast_id(ptr noundef) local_unnamed_addr #1

declare ptr @ast_append(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @type_for_class(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5) local_unnamed_addr #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [3 x ptr], align 16
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #3
  store ptr %7, ptr %9, align 16, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %8, ptr %12, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %9, i64 16
  store ptr null, ptr %13, align 16, !tbaa !5
  call void @ast_get_children(ptr noundef %1, i64 noundef 2, ptr noundef nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #3
  %14 = call ptr @ast_from(ptr noundef %2, i32 noundef 2) #3
  call void @ast_inheritflags(ptr noundef %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  %15 = call ptr @ast_from(ptr noundef %2, i32 noundef 151) #3
  %16 = call ptr @ast_from(ptr noundef %2, i32 noundef 2) #3
  %17 = icmp eq ptr %15, null
  br i1 %17, label %18, label %20

18:                                               ; preds = %6
  call void @ast_inheritflags(ptr noundef %16) #3
  %19 = icmp eq ptr %16, null
  br i1 %19, label %28, label %.thread109

20:                                               ; preds = %6
  %21 = call ptr @ast_add(ptr noundef nonnull %15, ptr noundef %16) #3
  call void @ast_inheritflags(ptr noundef %16) #3
  %22 = icmp eq ptr %21, null
  br i1 %22, label %.thread109, label %25

.thread109:                                       ; preds = %18, %20
  %.098108112 = phi ptr [ %15, %20 ], [ %16, %18 ]
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call ptr @ast_add(ptr noundef nonnull %.098108112, ptr noundef %23) #3
  br label %31

25:                                               ; preds = %20
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call ptr @ast_add_sibling(ptr noundef nonnull %21, ptr noundef %26) #3
  br label %31

28:                                               ; preds = %18
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %36, label %.thread118

31:                                               ; preds = %.thread109, %25
  %.1100.ph = phi ptr [ %27, %25 ], [ %24, %.thread109 ]
  %.1.ph = phi ptr [ %15, %25 ], [ %.098108112, %.thread109 ]
  %32 = icmp eq ptr %.1100.ph, null
  br i1 %32, label %.thread118, label %34

.thread118:                                       ; preds = %28, %31
  %.1117121 = phi ptr [ %.1.ph, %31 ], [ %29, %28 ]
  %33 = call ptr @ast_add(ptr noundef nonnull %.1117121, ptr noundef %14) #3
  br label %39

34:                                               ; preds = %31
  %35 = call ptr @ast_add_sibling(ptr noundef nonnull %.1100.ph, ptr noundef %14) #3
  br label %39

36:                                               ; preds = %28
  %37 = call ptr @ast_from(ptr noundef %2, i32 noundef %3) #3
  %38 = icmp eq ptr %14, null
  br i1 %38, label %46, label %.thread128

39:                                               ; preds = %.thread118, %34
  %.2101.ph = phi ptr [ %35, %34 ], [ %33, %.thread118 ]
  %.2.ph = phi ptr [ %.1.ph, %34 ], [ %.1117121, %.thread118 ]
  %40 = call ptr @ast_from(ptr noundef %2, i32 noundef %3) #3
  %41 = icmp eq ptr %.2101.ph, null
  br i1 %41, label %.thread128, label %44

.thread128:                                       ; preds = %36, %39
  %.2127131 = phi ptr [ %.2.ph, %39 ], [ %14, %36 ]
  %42 = phi ptr [ %40, %39 ], [ %37, %36 ]
  %43 = call ptr @ast_add(ptr noundef nonnull %.2127131, ptr noundef %42) #3
  br label %46

44:                                               ; preds = %39
  %45 = call ptr @ast_add_sibling(ptr noundef nonnull %.2101.ph, ptr noundef %40) #3
  br label %46

46:                                               ; preds = %36, %.thread128, %44
  %47 = phi ptr [ %42, %.thread128 ], [ %40, %44 ], [ %37, %36 ]
  %.3102 = phi ptr [ %43, %.thread128 ], [ %45, %44 ], [ null, %36 ]
  %.3 = phi ptr [ %.2127131, %.thread128 ], [ %.2.ph, %44 ], [ %37, %36 ]
  call void @ast_inheritflags(ptr noundef %47) #3
  %48 = call ptr @ast_from(ptr noundef %2, i32 noundef %4) #3
  %49 = icmp eq ptr %.3, null
  br i1 %49, label %56, label %50

50:                                               ; preds = %46
  %51 = icmp eq ptr %.3102, null
  br i1 %51, label %52, label %54

52:                                               ; preds = %50
  %53 = call ptr @ast_add(ptr noundef nonnull %.3, ptr noundef %48) #3
  br label %56

54:                                               ; preds = %50
  %55 = call ptr @ast_add_sibling(ptr noundef nonnull %.3102, ptr noundef %48) #3
  br label %56

56:                                               ; preds = %46, %52, %54
  %.4 = phi ptr [ %.3, %52 ], [ %.3, %54 ], [ %48, %46 ]
  call void @ast_inheritflags(ptr noundef %48) #3
  call void @ast_inheritflags(ptr noundef %.4) #3
  store ptr %15, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = call i32 @ast_id(ptr noundef %57) #3
  %59 = icmp eq i32 %58, 162
  br i1 %59, label %60, label %.loopexit

60:                                               ; preds = %56
  %61 = call ptr @ast_setid(ptr noundef %14, i32 noundef 166) #3
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = call ptr @ast_child(ptr noundef %62) #3
  %.not132 = icmp eq ptr %63, null
  br i1 %.not132, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %60
  br i1 %5, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %75
  %.096133.us = phi ptr [ %76, %75 ], [ %63, %.lr.ph ]
  %64 = call ptr @ast_child(ptr noundef nonnull %.096133.us) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  %65 = call ptr @ast_name(ptr noundef %64) #3
  %66 = call ptr @type_sugar(ptr noundef %2, ptr noundef null, ptr noundef %65)
  store ptr %66, ptr %11, align 8, !tbaa !5
  %67 = call ptr @ast_append(ptr noundef %14, ptr noundef %66) #3
  %68 = call zeroext i1 @names_nominal(ptr noundef %0, ptr noundef %2, ptr noundef nonnull %11, i1 noundef zeroext false) #3
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = call i32 @ast_id(ptr noundef %69) #3
  %71 = icmp eq i32 %70, 187
  br i1 %71, label %72, label %75

72:                                               ; preds = %.lr.ph.split.us
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = call i32 @flatten_typeparamref(ptr noundef %0, ptr noundef %73) #3
  br label %75

75:                                               ; preds = %72, %.lr.ph.split.us
  %76 = call ptr @ast_sibling(ptr noundef nonnull %.096133.us) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  %.not.us = icmp eq ptr %76, null
  br i1 %.not.us, label %.loopexit, label %.lr.ph.split.us, !llvm.loop !9

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.096133 = phi ptr [ %81, %.lr.ph.split ], [ %63, %.lr.ph ]
  %77 = call ptr @ast_child(ptr noundef nonnull %.096133) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  %78 = call ptr @ast_name(ptr noundef %77) #3
  %79 = call ptr @type_sugar(ptr noundef %2, ptr noundef null, ptr noundef %78)
  %80 = call ptr @ast_append(ptr noundef %14, ptr noundef %79) #3
  %81 = call ptr @ast_sibling(ptr noundef nonnull %.096133) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  %.not = icmp eq ptr %81, null
  br i1 %.not, label %.loopexit, label %.lr.ph.split, !llvm.loop !9

.loopexit:                                        ; preds = %.lr.ph.split, %75, %60, %56
  br i1 %5, label %82, label %84

82:                                               ; preds = %.loopexit
  %83 = call zeroext i1 @names_nominal(ptr noundef %0, ptr noundef %2, ptr noundef nonnull %10, i1 noundef zeroext false) #3
  %.pre = load ptr, ptr %10, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %82, %.loopexit
  %85 = phi ptr [ %.pre, %82 ], [ %15, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret ptr %85
}

declare void @ast_get_children(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ast_setid(ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @ast_child(ptr noundef) local_unnamed_addr #1

declare ptr @ast_name(ptr noundef) local_unnamed_addr #1

declare i32 @flatten_typeparamref(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ast_sibling(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass