; LLVM IR from Stephane-D/SGDK :: src (map)

; 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.MapDefinition = type { i16, i16, i16, i16, i16, i16, ptr, ptr, ptr, ptr }
%struct.Map = type { i16, i16, ptr, ptr, ptr, ptr, i32, i16, i64, i64, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, [240 x i16], [20 x i16], ptr, ptr, ptr, ptr, ptr }

@planeWidth = external global i16, align 2
@planeHeight = external global i16, align 2
@planeWidthSft = external global i16, align 2

; Function Attrs: noinline nounwind uwtable
define dso_local ptr @MAP_create(ptr noundef %0, i32 noundef %1, i16 noundef zeroext %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i16, align 2
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i16, align 2
  %11 = alloca i16, align 2
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i16 %2, ptr %7, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = call ptr @allocateMap(ptr noundef %12)
  store ptr %13, ptr %8, align 8, !tbaa !5
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %18

16:                                               ; preds = %3
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %17, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %270

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.MapDefinition, ptr %19, i32 0, i32 0
  %21 = load i16, ptr %20, align 8, !tbaa !13
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Map, ptr %22, i32 0, i32 0
  store i16 %21, ptr %23, align 8, !tbaa !15
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.MapDefinition, ptr %24, i32 0, i32 1
  %26 = load i16, ptr %25, align 2, !tbaa !18
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.Map, ptr %27, i32 0, i32 1
  store i16 %26, ptr %28, align 2, !tbaa !19
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.MapDefinition, ptr %29, i32 0, i32 0
  %31 = load i16, ptr %30, align 8, !tbaa !13
  %32 = zext i16 %31 to i64
  %33 = call i64 @getNextPow2(i64 noundef %32)
  %34 = sub i64 %33, 1
  %35 = trunc i64 %34 to i16
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.Map, ptr %36, i32 0, i32 10
  store i16 %35, ptr %37, align 8, !tbaa !20
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MapDefinition, ptr %38, i32 0, i32 1
  %40 = load i16, ptr %39, align 2, !tbaa !18
  %41 = zext i16 %40 to i64
  %42 = call i64 @getNextPow2(i64 noundef %41)
  %43 = sub i64 %42, 1
  %44 = trunc i64 %43 to i16
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Map, ptr %45, i32 0, i32 11
  store i16 %44, ptr %46, align 2, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #4
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.MapDefinition, ptr %47, i32 0, i32 3
  %49 = load i16, ptr %48, align 2, !tbaa !22
  store i16 %49, ptr %10, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #4
  %50 = load i16, ptr %10, align 2, !tbaa !11
  %51 = zext i16 %50 to i32
  %52 = and i32 %51, 15
  %53 = trunc i32 %52 to i16
  store i16 %53, ptr %11, align 2, !tbaa !11
  %54 = load i16, ptr %11, align 2, !tbaa !11
  %55 = zext i16 %54 to i32
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %66

57:                                               ; preds = %18
  %58 = load i16, ptr %11, align 2, !tbaa !11
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.MapDefinition, ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !23
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Map, ptr %62, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !24
  %65 = call i64 @unpack(i16 noundef zeroext %58, ptr noundef %61, ptr noundef %64)
  br label %72

66:                                               ; preds = %18
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MapDefinition, ptr %67, i32 0, i32 6
  %69 = load ptr, ptr %68, align 8, !tbaa !23
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.Map, ptr %70, i32 0, i32 2
  store ptr %69, ptr %71, align 8, !tbaa !24
  br label %72

72:                                               ; preds = %66, %57
  %73 = load i16, ptr %10, align 2, !tbaa !11
  %74 = zext i16 %73 to i32
  %75 = ashr i32 %74, 4
  %76 = and i32 %75, 15
  %77 = trunc i32 %76 to i16
  store i16 %77, ptr %11, align 2, !tbaa !11
  %78 = load i16, ptr %11, align 2, !tbaa !11
  %79 = zext i16 %78 to i32
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %90

81:                                               ; preds = %72
  %82 = load i16, ptr %11, align 2, !tbaa !11
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.MapDefinition, ptr %83, i32 0, i32 7
  %85 = load ptr, ptr %84, align 8, !tbaa !25
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.Map, ptr %86, i32 0, i32 3
  %88 = load ptr, ptr %87, align 8, !tbaa !26
  %89 = call i64 @unpack(i16 noundef zeroext %82, ptr noundef %85, ptr noundef %88)
  br label %96

90:                                               ; preds = %72
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MapDefinition, ptr %91, i32 0, i32 7
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.Map, ptr %94, i32 0, i32 3
  store ptr %93, ptr %95, align 8, !tbaa !26
  br label %96

96:                                               ; preds = %90, %81
  %97 = load i16, ptr %10, align 2, !tbaa !11
  %98 = zext i16 %97 to i32
  %99 = ashr i32 %98, 8
  %100 = and i32 %99, 15
  %101 = trunc i32 %100 to i16
  store i16 %101, ptr %11, align 2, !tbaa !11
  %102 = load i16, ptr %11, align 2, !tbaa !11
  %103 = zext i16 %102 to i32
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %114

105:                                              ; preds = %96
  %106 = load i16, ptr %11, align 2, !tbaa !11
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.MapDefinition, ptr %107, i32 0, i32 8
  %109 = load ptr, ptr %108, align 8, !tbaa !27
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.Map, ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !28
  %113 = call i64 @unpack(i16 noundef zeroext %106, ptr noundef %109, ptr noundef %112)
  br label %120

114:                                              ; preds = %96
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.MapDefinition, ptr %115, i32 0, i32 8
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.Map, ptr %118, i32 0, i32 4
  store ptr %117, ptr %119, align 8, !tbaa !28
  br label %120

120:                                              ; preds = %114, %105
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.MapDefinition, ptr %121, i32 0, i32 9
  %123 = load ptr, ptr %122, align 8, !tbaa !29
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.Map, ptr %124, i32 0, i32 5
  store ptr %123, ptr %125, align 8, !tbaa !30
  %126 = load i32, ptr %6, align 4, !tbaa !9
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.Map, ptr %127, i32 0, i32 6
  store i32 %126, ptr %128, align 8, !tbaa !31
  %129 = load i16, ptr %7, align 2, !tbaa !11
  %130 = zext i16 %129 to i32
  %131 = and i32 %130, 59391
  %132 = trunc i32 %131 to i16
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Map, ptr %133, i32 0, i32 7
  store i16 %132, ptr %134, align 4, !tbaa !32
  %135 = load i16, ptr @planeWidth, align 2, !tbaa !11
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.Map, ptr %136, i32 0, i32 12
  store i16 %135, ptr %137, align 4, !tbaa !33
  %138 = load i16, ptr @planeHeight, align 2, !tbaa !11
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.Map, ptr %139, i32 0, i32 13
  store i16 %138, ptr %140, align 2, !tbaa !34
  %141 = load i16, ptr @planeWidth, align 2, !tbaa !11
  %142 = zext i16 %141 to i32
  %143 = ashr i32 %142, 1
  %144 = sub nsw i32 %143, 1
  %145 = trunc i32 %144 to i16
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.Map, ptr %146, i32 0, i32 14
  store i16 %145, ptr %147, align 8, !tbaa !35
  %148 = load i16, ptr @planeHeight, align 2, !tbaa !11
  %149 = zext i16 %148 to i32
  %150 = ashr i32 %149, 1
  %151 = sub nsw i32 %150, 1
  %152 = trunc i32 %151 to i16
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.Map, ptr %153, i32 0, i32 15
  store i16 %152, ptr %154, align 2, !tbaa !36
  %155 = load i16, ptr @planeWidthSft, align 2, !tbaa !11
  %156 = zext i16 %155 to i32
  %157 = add nsw i32 %156, 2
  %158 = trunc i32 %157 to i16
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.Map, ptr %159, i32 0, i32 16
  store i16 %158, ptr %160, align 4, !tbaa !37
  %161 = load ptr, ptr %8, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Map, ptr %161, i32 0, i32 17
  store i16 1, ptr %162, align 2, !tbaa !38
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.MapDefinition, ptr %163, i32 0, i32 4
  %165 = load i16, ptr %164, align 8, !tbaa !39
  %166 = zext i16 %165 to i32
  %167 = icmp sgt i32 %166, 256
  br i1 %167, label %168, label %217

168:                                              ; preds = %120
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.MapDefinition, ptr %169, i32 0, i32 5
  %171 = load i16, ptr %170, align 2, !tbaa !40
  %172 = zext i16 %171 to i32
  %173 = icmp sgt i32 %172, 256
  br i1 %173, label %174, label %195

174:                                              ; preds = %168
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.Map, ptr %175, i32 0, i32 7
  %177 = load i16, ptr %176, align 4, !tbaa !32
  %178 = zext i16 %177 to i32
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %180, label %185

180:                                              ; preds = %174
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.Map, ptr %181, i32 0, i32 22
  store ptr @prepareMapDataColumn_MTI16_BI16, ptr %182, align 8, !tbaa !41
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.Map, ptr %183, i32 0, i32 23
  store ptr @prepareMapDataRow_MTI16_BI16, ptr %184, align 8, !tbaa !42
  br label %190

185:                                              ; preds = %174
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.Map, ptr %186, i32 0, i32 22
  store ptr @prepareMapDataColumnEx_MTI16_BI16, ptr %187, align 8, !tbaa !41
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.Map, ptr %188, i32 0, i32 23
  store ptr @prepareMapDataRowEx_MTI16_BI16, ptr %189, align 8, !tbaa !42
  br label %190

190:                                              ; preds = %185, %180
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.Map, ptr %191, i32 0, i32 25
  store ptr @getMetaTile_MTI16_BI16, ptr %192, align 8, !tbaa !43
  %193 = load ptr, ptr %8, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.Map, ptr %193, i32 0, i32 26
  store ptr @getMetaTilemapRect_MTI16_BI16, ptr %194, align 8, !tbaa !44
  br label %216

195:                                              ; preds = %168
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.Map, ptr %196, i32 0, i32 7
  %198 = load i16, ptr %197, align 4, !tbaa !32
  %199 = zext i16 %198 to i32
  %200 = icmp eq i32 %199, 0
  br i1 %200, label %201, label %206

201:                                              ; preds = %195
  %202 = load ptr, ptr %8, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.Map, ptr %202, i32 0, i32 22
  store ptr @prepareMapDataColumn_MTI16_BI8, ptr %203, align 8, !tbaa !41
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Map, ptr %204, i32 0, i32 23
  store ptr @prepareMapDataRow_MTI16_BI8, ptr %205, align 8, !tbaa !42
  br label %211

206:                                              ; preds = %195
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.Map, ptr %207, i32 0, i32 22
  store ptr @prepareMapDataColumnEx_MTI16_BI8, ptr %208, align 8, !tbaa !41
  %209 = load ptr, ptr %8, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.Map, ptr %209, i32 0, i32 23
  store ptr @prepareMapDataRowEx_MTI16_BI8, ptr %210, align 8, !tbaa !42
  br label %211

211:                                              ; preds = %206, %201
  %212 = load ptr, ptr %8, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.Map, ptr %212, i32 0, i32 25
  store ptr @getMetaTile_MTI16_BI8, ptr %213, align 8, !tbaa !43
  %214 = load ptr, ptr %8, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.Map, ptr %214, i32 0, i32 26
  store ptr @getMetaTilemapRect_MTI16_BI8, ptr %215, align 8, !tbaa !44
  br label %216

216:                                              ; preds = %211, %190
  br label %266

217:                                              ; preds = %120
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.MapDefinition, ptr %218, i32 0, i32 5
  %220 = load i16, ptr %219, align 2, !tbaa !40
  %221 = zext i16 %220 to i32
  %222 = icmp sgt i32 %221, 256
  br i1 %222, label %223, label %244

223:                                              ; preds = %217
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.Map, ptr %224, i32 0, i32 7
  %226 = load i16, ptr %225, align 4, !tbaa !32
  %227 = zext i16 %226 to i32
  %228 = icmp eq i32 %227, 0
  br i1 %228, label %229, label %234

229:                                              ; preds = %223
  %230 = load ptr, ptr %8, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.Map, ptr %230, i32 0, i32 22
  store ptr @prepareMapDataColumn_MTI8_BI16, ptr %231, align 8, !tbaa !41
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.Map, ptr %232, i32 0, i32 23
  store ptr @prepareMapDataRow_MTI8_BI16, ptr %233, align 8, !tbaa !42
  br label %239

234:                                              ; preds = %223
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.Map, ptr %235, i32 0, i32 22
  store ptr @prepareMapDataColumnEx_MTI8_BI16, ptr %236, align 8, !tbaa !41
  %237 = load ptr, ptr %8, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.Map, ptr %237, i32 0, i32 23
  store ptr @prepareMapDataRowEx_MTI8_BI16, ptr %238, align 8, !tbaa !42
  br label %239

239:                                              ; preds = %234, %229
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.Map, ptr %240, i32 0, i32 25
  store ptr @getMetaTile_MTI8_BI16, ptr %241, align 8, !tbaa !43
  %242 = load ptr, ptr %8, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.Map, ptr %242, i32 0, i32 26
  store ptr @getMetaTilemapRect_MTI8_BI16, ptr %243, align 8, !tbaa !44
  br label %265

244:                                              ; preds = %217
  %245 = load ptr, ptr %8, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.Map, ptr %245, i32 0, i32 7
  %247 = load i16, ptr %246, align 4, !tbaa !32
  %248 = zext i16 %247 to i32
  %249 = icmp eq i32 %248, 0
  br i1 %249, label %250, label %255

250:                                              ; preds = %244
  %251 = load ptr, ptr %8, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.Map, ptr %251, i32 0, i32 22
  store ptr @prepareMapDataColumn_MTI8_BI8, ptr %252, align 8, !tbaa !41
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.Map, ptr %253, i32 0, i32 23
  store ptr @prepareMapDataRow_MTI8_BI8, ptr %254, align 8, !tbaa !42
  br label %260

255:                                              ; preds = %244
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.Map, ptr %256, i32 0, i32 22
  store ptr @prepareMapDataColumnEx_MTI8_BI8, ptr %257, align 8, !tbaa !41
  %258 = load ptr, ptr %8, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.Map, ptr %258, i32 0, i32 23
  store ptr @prepareMapDataRowEx_MTI8_BI8, ptr %259, align 8, !tbaa !42
  br label %260

260:                                              ; preds = %255, %250
  %261 = load ptr, ptr %8, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.Map, ptr %261, i32 0, i32 25
  store ptr @getMetaTile_MTI8_BI8, ptr %262, align 8, !tbaa !43
  %263 = load ptr, ptr %8, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.Map, ptr %263, i32 0, i32 26
  store ptr @getMetaTilemapRect_MTI8_BI8, ptr %264, align 8, !tbaa !44
  br label %265

265:                                              ; preds = %260, %239
  br label %266

266:                                              ; preds = %265, %216
  %267 = load ptr, ptr %8, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.Map, ptr %267, i32 0, i32 24
  store ptr null, ptr %268, align 8, !tbaa !45
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %269, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #4
  br label %270

270:                                              ; preds = %266, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %271 = load ptr, ptr %4, align 8
  ret ptr %271
}

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

declare ptr @allocateMap(ptr noundef) #2

declare i64 @getNextPow2(i64 noundef) #2

declare i64 @unpack(i16 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI16_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI16_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI16_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI16_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI8_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI8_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI8_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI8_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #3

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

attributes #0 = { noinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"", !12, i64 0, !12, i64 2, !12, i64 4, !12, i64 6, !12, i64 8, !12, i64 10, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!15 = !{!16, !12, i64 0}
!16 = !{!"Map", !12, i64 0, !12, i64 2, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !12, i64 44, !17, i64 48, !17, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !12, i64 70, !12, i64 72, !12, i64 74, !12, i64 76, !12, i64 78, !12, i64 80, !12, i64 82, !7, i64 84, !7, i64 564, !6, i64 608, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640}
!17 = !{!"long", !7, i64 0}
!18 = !{!14, !12, i64 2}
!19 = !{!16, !12, i64 2}
!20 = !{!16, !12, i64 64}
!21 = !{!16, !12, i64 66}
!22 = !{!14, !12, i64 6}
!23 = !{!14, !6, i64 16}
!24 = !{!16, !6, i64 8}
!25 = !{!14, !6, i64 24}
!26 = !{!16, !6, i64 16}
!27 = !{!14, !6, i64 32}
!28 = !{!16, !6, i64 24}
!29 = !{!14, !6, i64 40}
!30 = !{!16, !6, i64 32}
!31 = !{!16, !10, i64 40}
!32 = !{!16, !12, i64 44}
!33 = !{!16, !12, i64 68}
!34 = !{!16, !12, i64 70}
!35 = !{!16, !12, i64 72}
!36 = !{!16, !12, i64 74}
!37 = !{!16, !12, i64 76}
!38 = !{!16, !12, i64 78}
!39 = !{!14, !12, i64 8}
!40 = !{!14, !12, i64 10}
!41 = !{!16, !6, i64 608}
!42 = !{!16, !6, i64 616}
!43 = !{!16, !6, i64 632}
!44 = !{!16, !6, i64 640}
!45 = !{!16, !6, i64 624}


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

@planeWidth = external local_unnamed_addr global i16, align 2
@planeHeight = external local_unnamed_addr global i16, align 2
@planeWidthSft = external local_unnamed_addr global i16, align 2

; Function Attrs: noinline nounwind uwtable
define dso_local ptr @MAP_create(ptr noundef %0, i32 noundef %1, i16 noundef zeroext %2) local_unnamed_addr #0 {
  %4 = tail call ptr @allocateMap(ptr noundef %0) #3
  %5 = icmp eq ptr %4, null
  br i1 %5, label %90, label %6

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 2
  %8 = load <2 x i16>, ptr %0, align 8, !tbaa !5
  store <2 x i16> %8, ptr %4, align 8, !tbaa !5
  %9 = extractelement <2 x i16> %8, i64 0
  %10 = zext i16 %9 to i64
  %11 = tail call i64 @getNextPow2(i64 noundef %10) #3
  %12 = trunc i64 %11 to i16
  %13 = add i16 %12, -1
  %14 = getelementptr inbounds i8, ptr %4, i64 64
  store i16 %13, ptr %14, align 8, !tbaa !9
  %15 = load i16, ptr %7, align 2, !tbaa !14
  %16 = zext i16 %15 to i64
  %17 = tail call i64 @getNextPow2(i64 noundef %16) #3
  %18 = trunc i64 %17 to i16
  %19 = add i16 %18, -1
  %20 = getelementptr inbounds i8, ptr %4, i64 66
  store i16 %19, ptr %20, align 2, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %0, i64 6
  %22 = load i16, ptr %21, align 2, !tbaa !17
  %23 = and i16 %22, 15
  %.not = icmp eq i16 %23, 0
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !18
  %26 = getelementptr inbounds i8, ptr %4, i64 8
  br i1 %.not, label %30, label %27

27:                                               ; preds = %6
  %28 = load ptr, ptr %26, align 8, !tbaa !19
  %29 = tail call i64 @unpack(i16 noundef zeroext %23, ptr noundef %25, ptr noundef %28) #3
  br label %31

30:                                               ; preds = %6
  store ptr %25, ptr %26, align 8, !tbaa !19
  br label %31

31:                                               ; preds = %30, %27
  %32 = lshr i16 %22, 4
  %33 = and i16 %32, 15
  %.not78 = icmp eq i16 %33, 0
  %34 = getelementptr inbounds i8, ptr %0, i64 24
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = getelementptr inbounds i8, ptr %4, i64 16
  br i1 %.not78, label %40, label %37

37:                                               ; preds = %31
  %38 = load ptr, ptr %36, align 8, !tbaa !21
  %39 = tail call i64 @unpack(i16 noundef zeroext %33, ptr noundef %35, ptr noundef %38) #3
  br label %41

40:                                               ; preds = %31
  store ptr %35, ptr %36, align 8, !tbaa !21
  br label %41

41:                                               ; preds = %40, %37
  %42 = lshr i16 %22, 8
  %43 = and i16 %42, 15
  %.not79 = icmp eq i16 %43, 0
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = getelementptr inbounds i8, ptr %4, i64 24
  br i1 %.not79, label %50, label %47

47:                                               ; preds = %41
  %48 = load ptr, ptr %46, align 8, !tbaa !23
  %49 = tail call i64 @unpack(i16 noundef zeroext %43, ptr noundef %45, ptr noundef %48) #3
  br label %51

50:                                               ; preds = %41
  store ptr %45, ptr %46, align 8, !tbaa !23
  br label %51

51:                                               ; preds = %50, %47
  %52 = getelementptr inbounds i8, ptr %0, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !24
  %54 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr %53, ptr %54, align 8, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %4, i64 40
  store i32 %1, ptr %55, align 8, !tbaa !26
  %56 = and i16 %2, -6145
  %57 = getelementptr inbounds i8, ptr %4, i64 44
  store i16 %56, ptr %57, align 4, !tbaa !27
  %58 = load i16, ptr @planeWidth, align 2, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %4, i64 68
  store i16 %58, ptr %59, align 4, !tbaa !28
  %60 = load i16, ptr @planeHeight, align 2, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %4, i64 70
  store i16 %60, ptr %61, align 2, !tbaa !29
  %62 = getelementptr inbounds i8, ptr %4, i64 72
  %63 = insertelement <2 x i16> poison, i16 %58, i64 0
  %64 = insertelement <2 x i16> %63, i16 %60, i64 1
  %65 = lshr <2 x i16> %64, <i16 1, i16 1>
  %66 = add nsw <2 x i16> %65, <i16 -1, i16 -1>
  store <2 x i16> %66, ptr %62, align 8, !tbaa !5
  %67 = load i16, ptr @planeWidthSft, align 2, !tbaa !5
  %68 = add i16 %67, 2
  %69 = getelementptr inbounds i8, ptr %4, i64 76
  store i16 %68, ptr %69, align 4, !tbaa !30
  %70 = getelementptr inbounds i8, ptr %4, i64 78
  store i16 1, ptr %70, align 2, !tbaa !31
  %71 = getelementptr inbounds i8, ptr %0, i64 8
  %72 = load i16, ptr %71, align 8, !tbaa !32
  %73 = icmp ugt i16 %72, 256
  %74 = getelementptr inbounds i8, ptr %0, i64 10
  %75 = load i16, ptr %74, align 2, !tbaa !33
  %76 = icmp ugt i16 %75, 256
  %77 = icmp eq i16 %56, 0
  br i1 %73, label %78, label %81

78:                                               ; preds = %51
  br i1 %76, label %79, label %80

79:                                               ; preds = %78
  %spec.select = select i1 %77, ptr @prepareMapDataColumn_MTI16_BI16, ptr @prepareMapDataColumnEx_MTI16_BI16
  %spec.select80 = select i1 %77, ptr @prepareMapDataRow_MTI16_BI16, ptr @prepareMapDataRowEx_MTI16_BI16
  br label %84

80:                                               ; preds = %78
  %spec.select81 = select i1 %77, ptr @prepareMapDataColumn_MTI16_BI8, ptr @prepareMapDataColumnEx_MTI16_BI8
  %spec.select82 = select i1 %77, ptr @prepareMapDataRow_MTI16_BI8, ptr @prepareMapDataRowEx_MTI16_BI8
  br label %84

81:                                               ; preds = %51
  br i1 %76, label %82, label %83

82:                                               ; preds = %81
  %spec.select83 = select i1 %77, ptr @prepareMapDataColumn_MTI8_BI16, ptr @prepareMapDataColumnEx_MTI8_BI16
  %spec.select84 = select i1 %77, ptr @prepareMapDataRow_MTI8_BI16, ptr @prepareMapDataRowEx_MTI8_BI16
  br label %84

83:                                               ; preds = %81
  %spec.select85 = select i1 %77, ptr @prepareMapDataColumn_MTI8_BI8, ptr @prepareMapDataColumnEx_MTI8_BI8
  %spec.select86 = select i1 %77, ptr @prepareMapDataRow_MTI8_BI8, ptr @prepareMapDataRowEx_MTI8_BI8
  br label %84

84:                                               ; preds = %82, %83, %79, %80
  %spec.select83.sink = phi ptr [ %spec.select83, %82 ], [ %spec.select85, %83 ], [ %spec.select, %79 ], [ %spec.select81, %80 ]
  %spec.select84.sink = phi ptr [ %spec.select84, %82 ], [ %spec.select86, %83 ], [ %spec.select80, %79 ], [ %spec.select82, %80 ]
  %getMetaTile_MTI8_BI16.sink = phi ptr [ @getMetaTile_MTI8_BI16, %82 ], [ @getMetaTile_MTI8_BI8, %83 ], [ @getMetaTile_MTI16_BI16, %79 ], [ @getMetaTile_MTI16_BI8, %80 ]
  %getMetaTilemapRect_MTI8_BI16.sink = phi ptr [ @getMetaTilemapRect_MTI8_BI16, %82 ], [ @getMetaTilemapRect_MTI8_BI8, %83 ], [ @getMetaTilemapRect_MTI16_BI16, %79 ], [ @getMetaTilemapRect_MTI16_BI8, %80 ]
  %85 = getelementptr inbounds i8, ptr %4, i64 608
  store ptr %spec.select83.sink, ptr %85, align 8
  %86 = getelementptr inbounds i8, ptr %4, i64 616
  store ptr %spec.select84.sink, ptr %86, align 8
  %87 = getelementptr inbounds i8, ptr %4, i64 632
  store ptr %getMetaTile_MTI8_BI16.sink, ptr %87, align 8, !tbaa !34
  %88 = getelementptr inbounds i8, ptr %4, i64 640
  store ptr %getMetaTilemapRect_MTI8_BI16.sink, ptr %88, align 8, !tbaa !35
  %89 = getelementptr inbounds i8, ptr %4, i64 624
  store ptr null, ptr %89, align 8, !tbaa !36
  br label %90

90:                                               ; preds = %3, %84
  ret ptr %4
}

declare ptr @allocateMap(ptr noundef) local_unnamed_addr #1

declare i64 @getNextPow2(i64 noundef) local_unnamed_addr #1

declare i64 @unpack(i16 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI16_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI16_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI16_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI16_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI16_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI16_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI8_BI16(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI8_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI8_BI16(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumn_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRow_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataColumnEx_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @prepareMapDataRowEx_MTI8_BI8(ptr noundef, ptr noundef, ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @getMetaTile_MTI8_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden void @getMetaTilemapRect_MTI8_BI8(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, ptr noundef) #2

attributes #0 = { noinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 64}
!10 = !{!"Map", !6, i64 0, !6, i64 2, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !12, i64 40, !6, i64 44, !13, i64 48, !13, i64 56, !6, i64 64, !6, i64 66, !6, i64 68, !6, i64 70, !6, i64 72, !6, i64 74, !6, i64 76, !6, i64 78, !6, i64 80, !6, i64 82, !7, i64 84, !7, i64 564, !11, i64 608, !11, i64 616, !11, i64 624, !11, i64 632, !11, i64 640}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 2}
!15 = !{!"", !6, i64 0, !6, i64 2, !6, i64 4, !6, i64 6, !6, i64 8, !6, i64 10, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!16 = !{!10, !6, i64 66}
!17 = !{!15, !6, i64 6}
!18 = !{!15, !11, i64 16}
!19 = !{!10, !11, i64 8}
!20 = !{!15, !11, i64 24}
!21 = !{!10, !11, i64 16}
!22 = !{!15, !11, i64 32}
!23 = !{!10, !11, i64 24}
!24 = !{!15, !11, i64 40}
!25 = !{!10, !11, i64 32}
!26 = !{!10, !12, i64 40}
!27 = !{!10, !6, i64 44}
!28 = !{!10, !6, i64 68}
!29 = !{!10, !6, i64 70}
!30 = !{!10, !6, i64 76}
!31 = !{!10, !6, i64 78}
!32 = !{!15, !6, i64 8}
!33 = !{!15, !6, i64 10}
!34 = !{!10, !11, i64 632}
!35 = !{!10, !11, i64 640}
!36 = !{!10, !11, i64 624}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass