; LLVM IR from pms67/HadesFCS :: Firmware/F4/HadesF4Testbed_RTOS/Core/Src (GPSNMEAParser)

; 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.GPSData = type { float, float, float, float, float, float, float, i8, i8, i8, i8, i8, i32, i8, i8, [6 x i8], i8, [16 x i8], i8, i8 }

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

; Function Attrs: nounwind uwtable
define dso_local void @GPSNMEAParser_ExtractRMC(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca [2 x i8], align 1
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.GPSData, ptr %19, i32 0, i32 19
  %21 = load i8, ptr %20, align 2, !tbaa !9
  %22 = zext i8 %21 to i32
  %23 = icmp eq i32 %22, 2
  br i1 %23, label %24, label %35

24:                                               ; preds = %1
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.GPSData, ptr %25, i32 0, i32 17
  %27 = getelementptr inbounds [16 x i8], ptr %26, i64 0, i64 0
  %28 = load i8, ptr %27, align 1, !tbaa !13
  %29 = sext i8 %28 to i32
  %30 = icmp eq i32 %29, 65
  %31 = zext i1 %30 to i32
  %32 = trunc i32 %31 to i8
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.GPSData, ptr %33, i32 0, i32 7
  store i8 %32, ptr %34, align 4, !tbaa !14
  br label %296

35:                                               ; preds = %1
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.GPSData, ptr %36, i32 0, i32 19
  %38 = load i8, ptr %37, align 2, !tbaa !9
  %39 = zext i8 %38 to i32
  %40 = icmp eq i32 %39, 3
  br i1 %40, label %41, label %92

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 2, ptr %3) #4
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.GPSData, ptr %42, i32 0, i32 17
  %44 = getelementptr inbounds [16 x i8], ptr %43, i64 0, i64 0
  %45 = load i8, ptr %44, align 1, !tbaa !13
  store i8 %45, ptr %3, align 1, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %3, i64 1
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.GPSData, ptr %47, i32 0, i32 17
  %49 = getelementptr inbounds [16 x i8], ptr %48, i64 0, i64 1
  %50 = load i8, ptr %49, align 1, !tbaa !13
  store i8 %50, ptr %46, align 1, !tbaa !13
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.GPSData, ptr %51, i32 0, i32 18
  %53 = load i8, ptr %52, align 1, !tbaa !15
  %54 = zext i8 %53 to i32
  %55 = sub nsw i32 %54, 2
  %56 = zext i32 %55 to i64
  %57 = call ptr @llvm.stacksave.p0()
  store ptr %57, ptr %4, align 8
  %58 = alloca i8, i64 %56, align 16
  store i64 %56, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 2, ptr %6, align 4, !tbaa !16
  br label %59

59:                                               ; preds = %78, %41
  %60 = load i32, ptr %6, align 4, !tbaa !16
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.GPSData, ptr %61, i32 0, i32 18
  %63 = load i8, ptr %62, align 1, !tbaa !15
  %64 = zext i8 %63 to i32
  %65 = icmp slt i32 %60, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %81

67:                                               ; preds = %59
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.GPSData, ptr %68, i32 0, i32 17
  %70 = load i32, ptr %6, align 4, !tbaa !16
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [16 x i8], ptr %69, i64 0, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !13
  %74 = load i32, ptr %6, align 4, !tbaa !16
  %75 = sub nsw i32 %74, 2
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %58, i64 %76
  store i8 %73, ptr %77, align 1, !tbaa !13
  br label %78

78:                                               ; preds = %67
  %79 = load i32, ptr %6, align 4, !tbaa !16
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !16
  br label %59, !llvm.loop !17

81:                                               ; preds = %66
  %82 = getelementptr inbounds [2 x i8], ptr %3, i64 0, i64 0
  %83 = call double @atof(ptr noundef %82) #5
  %84 = fptrunc double %83 to float
  %85 = call double @atof(ptr noundef %58) #5
  %86 = fptrunc double %85 to float
  %87 = fdiv float %86, 6.000000e+01
  %88 = fadd float %84, %87
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.GPSData, ptr %89, i32 0, i32 0
  store float %88, ptr %90, align 4, !tbaa !19
  %91 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %91)
  call void @llvm.lifetime.end.p0(i64 2, ptr %3) #4
  br label %295

92:                                               ; preds = %35
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.GPSData, ptr %93, i32 0, i32 19
  %95 = load i8, ptr %94, align 2, !tbaa !9
  %96 = zext i8 %95 to i32
  %97 = icmp eq i32 %96, 4
  br i1 %97, label %98, label %109

98:                                               ; preds = %92
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.GPSData, ptr %99, i32 0, i32 17
  %101 = getelementptr inbounds [16 x i8], ptr %100, i64 0, i64 0
  %102 = load i8, ptr %101, align 1, !tbaa !13
  %103 = sext i8 %102 to i32
  %104 = icmp eq i32 %103, 83
  %105 = zext i1 %104 to i32
  %106 = trunc i32 %105 to i8
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.GPSData, ptr %107, i32 0, i32 10
  store i8 %106, ptr %108, align 1, !tbaa !20
  br label %294

109:                                              ; preds = %92
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.GPSData, ptr %110, i32 0, i32 19
  %112 = load i8, ptr %111, align 2, !tbaa !9
  %113 = zext i8 %112 to i32
  %114 = icmp eq i32 %113, 5
  br i1 %114, label %115, label %149

115:                                              ; preds = %109
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.GPSData, ptr %116, i32 0, i32 18
  %118 = load i8, ptr %117, align 1, !tbaa !15
  %119 = zext i8 %118 to i64
  %120 = call ptr @llvm.stacksave.p0()
  store ptr %120, ptr %7, align 8
  %121 = alloca i8, i64 %119, align 16
  store i64 %119, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !16
  br label %122

122:                                              ; preds = %140, %115
  %123 = load i32, ptr %9, align 4, !tbaa !16
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.GPSData, ptr %124, i32 0, i32 18
  %126 = load i8, ptr %125, align 1, !tbaa !15
  %127 = zext i8 %126 to i32
  %128 = icmp slt i32 %123, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %143

130:                                              ; preds = %122
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.GPSData, ptr %131, i32 0, i32 17
  %133 = load i32, ptr %9, align 4, !tbaa !16
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [16 x i8], ptr %132, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !13
  %137 = load i32, ptr %9, align 4, !tbaa !16
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %121, i64 %138
  store i8 %136, ptr %139, align 1, !tbaa !13
  br label %140

140:                                              ; preds = %130
  %141 = load i32, ptr %9, align 4, !tbaa !16
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %9, align 4, !tbaa !16
  br label %122, !llvm.loop !21

143:                                              ; preds = %129
  %144 = call double @atof(ptr noundef %121) #5
  %145 = fptrunc double %144 to float
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.GPSData, ptr %146, i32 0, i32 1
  store float %145, ptr %147, align 4, !tbaa !22
  %148 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %148)
  br label %293

149:                                              ; preds = %109
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.GPSData, ptr %150, i32 0, i32 19
  %152 = load i8, ptr %151, align 2, !tbaa !9
  %153 = zext i8 %152 to i32
  %154 = icmp eq i32 %153, 6
  br i1 %154, label %155, label %166

155:                                              ; preds = %149
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.GPSData, ptr %156, i32 0, i32 17
  %158 = getelementptr inbounds [16 x i8], ptr %157, i64 0, i64 0
  %159 = load i8, ptr %158, align 1, !tbaa !13
  %160 = sext i8 %159 to i32
  %161 = icmp eq i32 %160, 87
  %162 = zext i1 %161 to i32
  %163 = trunc i32 %162 to i8
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.GPSData, ptr %164, i32 0, i32 11
  store i8 %163, ptr %165, align 4, !tbaa !23
  br label %292

166:                                              ; preds = %149
  %167 = load ptr, ptr %2, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.GPSData, ptr %167, i32 0, i32 19
  %169 = load i8, ptr %168, align 2, !tbaa !9
  %170 = zext i8 %169 to i32
  %171 = icmp eq i32 %170, 7
  br i1 %171, label %172, label %207

172:                                              ; preds = %166
  %173 = load ptr, ptr %2, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.GPSData, ptr %173, i32 0, i32 18
  %175 = load i8, ptr %174, align 1, !tbaa !15
  %176 = zext i8 %175 to i64
  %177 = call ptr @llvm.stacksave.p0()
  store ptr %177, ptr %10, align 8
  %178 = alloca i8, i64 %176, align 16
  store i64 %176, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !16
  br label %179

179:                                              ; preds = %197, %172
  %180 = load i32, ptr %12, align 4, !tbaa !16
  %181 = load ptr, ptr %2, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.GPSData, ptr %181, i32 0, i32 18
  %183 = load i8, ptr %182, align 1, !tbaa !15
  %184 = zext i8 %183 to i32
  %185 = icmp slt i32 %180, %184
  br i1 %185, label %187, label %186

186:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %200

187:                                              ; preds = %179
  %188 = load ptr, ptr %2, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.GPSData, ptr %188, i32 0, i32 17
  %190 = load i32, ptr %12, align 4, !tbaa !16
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [16 x i8], ptr %189, i64 0, i64 %191
  %193 = load i8, ptr %192, align 1, !tbaa !13
  %194 = load i32, ptr %12, align 4, !tbaa !16
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds i8, ptr %178, i64 %195
  store i8 %193, ptr %196, align 1, !tbaa !13
  br label %197

197:                                              ; preds = %187
  %198 = load i32, ptr %12, align 4, !tbaa !16
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %12, align 4, !tbaa !16
  br label %179, !llvm.loop !24

200:                                              ; preds = %186
  %201 = call double @atof(ptr noundef %178) #5
  %202 = fptrunc double %201 to float
  %203 = fmul float 0x3FE072B020000000, %202
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.GPSData, ptr %204, i32 0, i32 3
  store float %203, ptr %205, align 4, !tbaa !25
  %206 = load ptr, ptr %10, align 8
  call void @llvm.stackrestore.p0(ptr %206)
  br label %291

207:                                              ; preds = %166
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.GPSData, ptr %208, i32 0, i32 19
  %210 = load i8, ptr %209, align 2, !tbaa !9
  %211 = zext i8 %210 to i32
  %212 = icmp eq i32 %211, 8
  br i1 %212, label %213, label %248

213:                                              ; preds = %207
  %214 = load ptr, ptr %2, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.GPSData, ptr %214, i32 0, i32 18
  %216 = load i8, ptr %215, align 1, !tbaa !15
  %217 = zext i8 %216 to i64
  %218 = call ptr @llvm.stacksave.p0()
  store ptr %218, ptr %13, align 8
  %219 = alloca i8, i64 %217, align 16
  store i64 %217, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !16
  br label %220

220:                                              ; preds = %238, %213
  %221 = load i32, ptr %15, align 4, !tbaa !16
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.GPSData, ptr %222, i32 0, i32 18
  %224 = load i8, ptr %223, align 1, !tbaa !15
  %225 = zext i8 %224 to i32
  %226 = icmp slt i32 %221, %225
  br i1 %226, label %228, label %227

227:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %241

228:                                              ; preds = %220
  %229 = load ptr, ptr %2, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.GPSData, ptr %229, i32 0, i32 17
  %231 = load i32, ptr %15, align 4, !tbaa !16
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [16 x i8], ptr %230, i64 0, i64 %232
  %234 = load i8, ptr %233, align 1, !tbaa !13
  %235 = load i32, ptr %15, align 4, !tbaa !16
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds i8, ptr %219, i64 %236
  store i8 %234, ptr %237, align 1, !tbaa !13
  br label %238

238:                                              ; preds = %228
  %239 = load i32, ptr %15, align 4, !tbaa !16
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %15, align 4, !tbaa !16
  br label %220, !llvm.loop !26

241:                                              ; preds = %227
  %242 = call double @atof(ptr noundef %219) #5
  %243 = fptrunc double %242 to float
  %244 = fmul float 0x3F91DF46A0000000, %243
  %245 = load ptr, ptr %2, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.GPSData, ptr %245, i32 0, i32 4
  store float %244, ptr %246, align 4, !tbaa !27
  %247 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %247)
  br label %290

248:                                              ; preds = %207
  %249 = load ptr, ptr %2, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.GPSData, ptr %249, i32 0, i32 19
  %251 = load i8, ptr %250, align 2, !tbaa !9
  %252 = zext i8 %251 to i32
  %253 = icmp eq i32 %252, 10
  br i1 %253, label %254, label %289

254:                                              ; preds = %248
  %255 = load ptr, ptr %2, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.GPSData, ptr %255, i32 0, i32 18
  %257 = load i8, ptr %256, align 1, !tbaa !15
  %258 = zext i8 %257 to i64
  %259 = call ptr @llvm.stacksave.p0()
  store ptr %259, ptr %16, align 8
  %260 = alloca i8, i64 %258, align 16
  store i64 %258, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !16
  br label %261

261:                                              ; preds = %279, %254
  %262 = load i32, ptr %18, align 4, !tbaa !16
  %263 = load ptr, ptr %2, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.GPSData, ptr %263, i32 0, i32 18
  %265 = load i8, ptr %264, align 1, !tbaa !15
  %266 = zext i8 %265 to i32
  %267 = icmp slt i32 %262, %266
  br i1 %267, label %269, label %268

268:                                              ; preds = %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %282

269:                                              ; preds = %261
  %270 = load ptr, ptr %2, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.GPSData, ptr %270, i32 0, i32 17
  %272 = load i32, ptr %18, align 4, !tbaa !16
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [16 x i8], ptr %271, i64 0, i64 %273
  %275 = load i8, ptr %274, align 1, !tbaa !13
  %276 = load i32, ptr %18, align 4, !tbaa !16
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds i8, ptr %260, i64 %277
  store i8 %275, ptr %278, align 1, !tbaa !13
  br label %279

279:                                              ; preds = %269
  %280 = load i32, ptr %18, align 4, !tbaa !16
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %18, align 4, !tbaa !16
  br label %261, !llvm.loop !28

282:                                              ; preds = %268
  %283 = call double @atof(ptr noundef %260) #5
  %284 = fptrunc double %283 to float
  %285 = fmul float 0x3F91DF46A0000000, %284
  %286 = load ptr, ptr %2, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.GPSData, ptr %286, i32 0, i32 5
  store float %285, ptr %287, align 4, !tbaa !29
  %288 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %288)
  br label %289

289:                                              ; preds = %282, %248
  br label %290

290:                                              ; preds = %289, %241
  br label %291

291:                                              ; preds = %290, %200
  br label %292

292:                                              ; preds = %291, %155
  br label %293

293:                                              ; preds = %292, %143
  br label %294

294:                                              ; preds = %293, %98
  br label %295

295:                                              ; preds = %294, %81
  br label %296

296:                                              ; preds = %295, %24
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn }
attributes #2 = { inlinehint nounwind willreturn memory(read) 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 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 }
attributes #5 = { nounwind willreturn memory(read) }

!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, !7, i64 66}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !7, i64 28, !7, i64 29, !7, i64 30, !7, i64 31, !7, i64 32, !12, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 48, !7, i64 49, !7, i64 65, !7, i64 66}
!11 = !{!"float", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!10, !7, i64 28}
!15 = !{!10, !7, i64 65}
!16 = !{!12, !12, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!10, !11, i64 0}
!20 = !{!10, !7, i64 31}
!21 = distinct !{!21, !18}
!22 = !{!10, !11, i64 4}
!23 = !{!10, !7, i64 32}
!24 = distinct !{!24, !18}
!25 = !{!10, !11, i64 12}
!26 = distinct !{!26, !18}
!27 = !{!10, !11, i64 16}
!28 = distinct !{!28, !18}
!29 = !{!10, !11, i64 20}


; 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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

; Function Attrs: mustprogress nofree nounwind willreturn uwtable
define dso_local void @GPSNMEAParser_ExtractRMC(ptr nocapture noundef %0) local_unnamed_addr #3 {
  %2 = alloca [2 x i8], align 1
  %3 = getelementptr inbounds i8, ptr %0, i64 66
  %4 = load i8, ptr %3, align 2, !tbaa !5
  switch i8 %4, label %98 [
    i8 2, label %5
    i8 3, label %11
    i8 4, label %35
    i8 5, label %41
    i8 6, label %53
    i8 7, label %59
    i8 8, label %72
    i8 10, label %85
  ]

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 49
  %7 = load i8, ptr %6, align 1, !tbaa !11
  %8 = icmp eq i8 %7, 65
  %9 = zext i1 %8 to i8
  %10 = getelementptr inbounds i8, ptr %0, i64 28
  store i8 %9, ptr %10, align 4, !tbaa !12
  br label %98

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %2) #5
  %12 = getelementptr inbounds i8, ptr %0, i64 49
  %13 = load i8, ptr %12, align 1, !tbaa !11
  store i8 %13, ptr %2, align 1, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %2, i64 1
  %15 = getelementptr inbounds i8, ptr %0, i64 50
  %16 = load i8, ptr %15, align 1, !tbaa !11
  store i8 %16, ptr %14, align 1, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %0, i64 65
  %18 = load i8, ptr %17, align 1, !tbaa !13
  %19 = zext i8 %18 to i64
  %20 = add nuw nsw i64 %19, 4294967294
  %21 = and i64 %20, 4294967295
  %22 = tail call ptr @llvm.stacksave.p0()
  %23 = alloca i8, i64 %21, align 16
  %24 = load i8, ptr %17, align 1, !tbaa !13
  %25 = icmp ugt i8 %24, 2
  br i1 %25, label %.lr.ph80.preheader, label %._crit_edge81

.lr.ph80.preheader:                               ; preds = %11
  %26 = zext i8 %24 to i64
  %scevgep = getelementptr i8, ptr %0, i64 51
  %27 = add nuw nsw i64 %26, 4294967294
  %28 = and i64 %27, 4294967295
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %23, ptr align 1 %scevgep, i64 %28, i1 false), !tbaa !11
  br label %._crit_edge81

._crit_edge81:                                    ; preds = %.lr.ph80.preheader, %11
  %29 = call double @atof(ptr noundef %2) #6
  %30 = fptrunc double %29 to float
  %31 = call double @atof(ptr noundef %23) #6
  %32 = fptrunc double %31 to float
  %33 = fdiv float %32, 6.000000e+01
  %34 = fadd float %33, %30
  store float %34, ptr %0, align 4, !tbaa !14
  tail call void @llvm.stackrestore.p0(ptr %22)
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #5
  br label %98

35:                                               ; preds = %1
  %36 = getelementptr inbounds i8, ptr %0, i64 49
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = icmp eq i8 %37, 83
  %39 = zext i1 %38 to i8
  %40 = getelementptr inbounds i8, ptr %0, i64 31
  store i8 %39, ptr %40, align 1, !tbaa !15
  br label %98

41:                                               ; preds = %1
  %42 = getelementptr inbounds i8, ptr %0, i64 65
  %43 = load i8, ptr %42, align 1, !tbaa !13
  %44 = zext i8 %43 to i64
  %45 = tail call ptr @llvm.stacksave.p0()
  %46 = alloca i8, i64 %44, align 16
  %47 = load i8, ptr %42, align 1, !tbaa !13
  %.not84 = icmp eq i8 %47, 0
  br i1 %.not84, label %._crit_edge77, label %.lr.ph76

.lr.ph76:                                         ; preds = %41
  %48 = getelementptr inbounds i8, ptr %0, i64 49
  %49 = zext i8 %47 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %46, ptr nonnull align 1 %48, i64 %49, i1 false), !tbaa !11
  br label %._crit_edge77

._crit_edge77:                                    ; preds = %.lr.ph76, %41
  %50 = call double @atof(ptr noundef %46) #6
  %51 = fptrunc double %50 to float
  %52 = getelementptr inbounds i8, ptr %0, i64 4
  store float %51, ptr %52, align 4, !tbaa !16
  tail call void @llvm.stackrestore.p0(ptr %45)
  br label %98

53:                                               ; preds = %1
  %54 = getelementptr inbounds i8, ptr %0, i64 49
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = icmp eq i8 %55, 87
  %57 = zext i1 %56 to i8
  %58 = getelementptr inbounds i8, ptr %0, i64 32
  store i8 %57, ptr %58, align 4, !tbaa !17
  br label %98

59:                                               ; preds = %1
  %60 = getelementptr inbounds i8, ptr %0, i64 65
  %61 = load i8, ptr %60, align 1, !tbaa !13
  %62 = zext i8 %61 to i64
  %63 = tail call ptr @llvm.stacksave.p0()
  %64 = alloca i8, i64 %62, align 16
  %65 = load i8, ptr %60, align 1, !tbaa !13
  %.not83 = icmp eq i8 %65, 0
  br i1 %.not83, label %._crit_edge73, label %.lr.ph72

.lr.ph72:                                         ; preds = %59
  %66 = getelementptr inbounds i8, ptr %0, i64 49
  %67 = zext i8 %65 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %64, ptr nonnull align 1 %66, i64 %67, i1 false), !tbaa !11
  br label %._crit_edge73

._crit_edge73:                                    ; preds = %.lr.ph72, %59
  %68 = call double @atof(ptr noundef %64) #6
  %69 = fptrunc double %68 to float
  %70 = fmul float %69, 0x3FE072B020000000
  %71 = getelementptr inbounds i8, ptr %0, i64 12
  store float %70, ptr %71, align 4, !tbaa !18
  tail call void @llvm.stackrestore.p0(ptr %63)
  br label %98

72:                                               ; preds = %1
  %73 = getelementptr inbounds i8, ptr %0, i64 65
  %74 = load i8, ptr %73, align 1, !tbaa !13
  %75 = zext i8 %74 to i64
  %76 = tail call ptr @llvm.stacksave.p0()
  %77 = alloca i8, i64 %75, align 16
  %78 = load i8, ptr %73, align 1, !tbaa !13
  %.not82 = icmp eq i8 %78, 0
  br i1 %.not82, label %._crit_edge69, label %.lr.ph68

.lr.ph68:                                         ; preds = %72
  %79 = getelementptr inbounds i8, ptr %0, i64 49
  %80 = zext i8 %78 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %77, ptr nonnull align 1 %79, i64 %80, i1 false), !tbaa !11
  br label %._crit_edge69

._crit_edge69:                                    ; preds = %.lr.ph68, %72
  %81 = call double @atof(ptr noundef %77) #6
  %82 = fptrunc double %81 to float
  %83 = fmul float %82, 0x3F91DF46A0000000
  %84 = getelementptr inbounds i8, ptr %0, i64 16
  store float %83, ptr %84, align 4, !tbaa !19
  tail call void @llvm.stackrestore.p0(ptr %76)
  br label %98

85:                                               ; preds = %1
  %86 = getelementptr inbounds i8, ptr %0, i64 65
  %87 = load i8, ptr %86, align 1, !tbaa !13
  %88 = zext i8 %87 to i64
  %89 = tail call ptr @llvm.stacksave.p0()
  %90 = alloca i8, i64 %88, align 16
  %91 = load i8, ptr %86, align 1, !tbaa !13
  %.not = icmp eq i8 %91, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %85
  %92 = getelementptr inbounds i8, ptr %0, i64 49
  %93 = zext i8 %91 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %90, ptr nonnull align 1 %92, i64 %93, i1 false), !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %85
  %94 = call double @atof(ptr noundef %90) #6
  %95 = fptrunc double %94 to float
  %96 = fmul float %95, 0x3F91DF46A0000000
  %97 = getelementptr inbounds i8, ptr %0, i64 20
  store float %96, ptr %97, align 4, !tbaa !20
  tail call void @llvm.stackrestore.p0(ptr %89)
  br label %98

98:                                               ; preds = %1, %._crit_edge81, %._crit_edge77, %._crit_edge73, %._crit_edge, %._crit_edge69, %53, %35, %5
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #2 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { mustprogress nofree nounwind willreturn 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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, !8, i64 66}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !8, i64 28, !8, i64 29, !8, i64 30, !8, i64 31, !8, i64 32, !10, i64 36, !8, i64 40, !8, i64 41, !8, i64 42, !8, i64 48, !8, i64 49, !8, i64 65, !8, i64 66}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = !{!6, !8, i64 28}
!13 = !{!6, !8, i64 65}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !8, i64 31}
!16 = !{!6, !7, i64 4}
!17 = !{!6, !8, i64 32}
!18 = !{!6, !7, i64 12}
!19 = !{!6, !7, i64 16}
!20 = !{!6, !7, i64 20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass