; LLVM IR from zhechkoz/PwIN :: jitmenot (pmparser)

; 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.procmaps_struct = type { ptr, ptr, i64, [5 x i8], i16, i16, i16, i16, i64, [12 x i8], i32, [600 x i8], ptr }

@g_last_head = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @pmparser_parse(i32 noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca [500 x i8], align 16
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [3000 x i8], align 16
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [20 x i8], align 16
  %14 = alloca [20 x i8], align 16
  %15 = alloca [8 x i8], align 1
  %16 = alloca [20 x i8], align 16
  %17 = alloca [10 x i8], align 1
  %18 = alloca [30 x i8], align 16
  %19 = alloca [600 x i8], align 16
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 500, ptr %4) #7
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = icmp sge i32 %20, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %1
  %23 = getelementptr inbounds [500 x i8], ptr %4, i64 0, i64 0
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %23, ptr noundef @.str, i32 noundef %24) #7
  br label %29

26:                                               ; preds = %1
  %27 = getelementptr inbounds [500 x i8], ptr %4, i64 0, i64 0
  %28 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %27, ptr noundef @.str.1) #7
  br label %29

29:                                               ; preds = %26, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %30 = getelementptr inbounds [500 x i8], ptr %4, i64 0, i64 0
  %31 = call noalias ptr @fopen(ptr noundef %30, ptr noundef @.str.2)
  store ptr %31, ptr %5, align 8, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = icmp ne ptr %32, null
  br i1 %33, label %40, label %34

34:                                               ; preds = %29
  %35 = load ptr, ptr @stderr, align 8, !tbaa !9
  %36 = call ptr @__errno_location() #8
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = call ptr @strerror(i32 noundef %37) #7
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.3, ptr noundef %38) #7
  store ptr null, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %163

40:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 3000, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %41 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %41, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 20, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 20, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 20, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 10, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 30, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 600, ptr %19) #7
  br label %42

42:                                               ; preds = %152, %40
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = call i32 @fgetc(ptr noundef %44)
  %46 = trunc i32 %45 to i8
  store i8 %46, ptr %9, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  br label %159

50:                                               ; preds = %43
  %51 = getelementptr inbounds [3000 x i8], ptr %8, i64 0, i64 0
  %52 = getelementptr inbounds i8, ptr %51, i64 1
  %53 = load ptr, ptr %5, align 8, !tbaa !9
  %54 = call ptr @fgets(ptr noundef %52, i32 noundef 259, ptr noundef %53)
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %57

56:                                               ; preds = %50
  store ptr null, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %162

57:                                               ; preds = %50
  %58 = load i8, ptr %9, align 1, !tbaa !11
  %59 = getelementptr inbounds [3000 x i8], ptr %8, i64 0, i64 0
  store i8 %58, ptr %59, align 16, !tbaa !11
  %60 = call noalias ptr @malloc(i64 noundef 672) #9
  store ptr %60, ptr %11, align 8, !tbaa !9
  %61 = getelementptr inbounds [3000 x i8], ptr %8, i64 0, i64 0
  %62 = getelementptr inbounds [20 x i8], ptr %13, i64 0, i64 0
  %63 = getelementptr inbounds [20 x i8], ptr %14, i64 0, i64 0
  %64 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 0
  %65 = getelementptr inbounds [20 x i8], ptr %16, i64 0, i64 0
  %66 = getelementptr inbounds [10 x i8], ptr %17, i64 0, i64 0
  %67 = getelementptr inbounds [30 x i8], ptr %18, i64 0, i64 0
  %68 = getelementptr inbounds [600 x i8], ptr %19, i64 0, i64 0
  call void @_pmparser_split_line(ptr noundef %61, ptr noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %68)
  %69 = getelementptr inbounds [20 x i8], ptr %13, i64 0, i64 0
  %70 = load ptr, ptr %11, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.procmaps_struct, ptr %70, i32 0, i32 0
  %72 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %69, ptr noundef @.str.4, ptr noundef %71) #7
  %73 = getelementptr inbounds [20 x i8], ptr %14, i64 0, i64 0
  %74 = load ptr, ptr %11, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.procmaps_struct, ptr %74, i32 0, i32 1
  %76 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %73, ptr noundef @.str.4, ptr noundef %75) #7
  %77 = load ptr, ptr %11, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.procmaps_struct, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !12
  %80 = ptrtoint ptr %79 to i64
  %81 = load ptr, ptr %11, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.procmaps_struct, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !16
  %84 = ptrtoint ptr %83 to i64
  %85 = sub i64 %80, %84
  %86 = load ptr, ptr %11, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.procmaps_struct, ptr %86, i32 0, i32 2
  store i64 %85, ptr %87, align 8, !tbaa !17
  %88 = load ptr, ptr %11, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.procmaps_struct, ptr %88, i32 0, i32 3
  %90 = getelementptr inbounds [5 x i8], ptr %89, i64 0, i64 0
  %91 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 0
  %92 = call ptr @strcpy(ptr noundef %90, ptr noundef %91) #7
  %93 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 0
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %95, 114
  %97 = zext i1 %96 to i32
  %98 = trunc i32 %97 to i16
  %99 = load ptr, ptr %11, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.procmaps_struct, ptr %99, i32 0, i32 4
  store i16 %98, ptr %100, align 2, !tbaa !18
  %101 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 1
  %102 = load i8, ptr %101, align 1, !tbaa !11
  %103 = sext i8 %102 to i32
  %104 = icmp eq i32 %103, 119
  %105 = zext i1 %104 to i32
  %106 = trunc i32 %105 to i16
  %107 = load ptr, ptr %11, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.procmaps_struct, ptr %107, i32 0, i32 5
  store i16 %106, ptr %108, align 8, !tbaa !19
  %109 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 2
  %110 = load i8, ptr %109, align 1, !tbaa !11
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %111, 120
  %113 = zext i1 %112 to i32
  %114 = trunc i32 %113 to i16
  %115 = load ptr, ptr %11, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.procmaps_struct, ptr %115, i32 0, i32 6
  store i16 %114, ptr %116, align 2, !tbaa !20
  %117 = getelementptr inbounds [8 x i8], ptr %15, i64 0, i64 3
  %118 = load i8, ptr %117, align 1, !tbaa !11
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 112
  %121 = zext i1 %120 to i32
  %122 = trunc i32 %121 to i16
  %123 = load ptr, ptr %11, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.procmaps_struct, ptr %123, i32 0, i32 7
  store i16 %122, ptr %124, align 4, !tbaa !21
  %125 = getelementptr inbounds [20 x i8], ptr %16, i64 0, i64 0
  %126 = load ptr, ptr %11, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.procmaps_struct, ptr %126, i32 0, i32 8
  %128 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %125, ptr noundef @.str.4, ptr noundef %127) #7
  %129 = load ptr, ptr %11, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.procmaps_struct, ptr %129, i32 0, i32 9
  %131 = getelementptr inbounds [12 x i8], ptr %130, i64 0, i64 0
  %132 = getelementptr inbounds [10 x i8], ptr %17, i64 0, i64 0
  %133 = call ptr @strcpy(ptr noundef %131, ptr noundef %132) #7
  %134 = getelementptr inbounds [30 x i8], ptr %18, i64 0, i64 0
  %135 = call i32 @atoi(ptr noundef %134) #10
  %136 = load ptr, ptr %11, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.procmaps_struct, ptr %136, i32 0, i32 10
  store i32 %135, ptr %137, align 4, !tbaa !22
  %138 = load ptr, ptr %11, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.procmaps_struct, ptr %138, i32 0, i32 11
  %140 = getelementptr inbounds [600 x i8], ptr %139, i64 0, i64 0
  %141 = getelementptr inbounds [600 x i8], ptr %19, i64 0, i64 0
  %142 = call ptr @strcpy(ptr noundef %140, ptr noundef %141) #7
  %143 = load ptr, ptr %11, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.procmaps_struct, ptr %143, i32 0, i32 12
  store ptr null, ptr %144, align 8, !tbaa !23
  %145 = load i32, ptr %7, align 4, !tbaa !5
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %152

147:                                              ; preds = %57
  %148 = load ptr, ptr %11, align 8, !tbaa !9
  store ptr %148, ptr %10, align 8, !tbaa !9
  %149 = load ptr, ptr %10, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.procmaps_struct, ptr %149, i32 0, i32 12
  store ptr null, ptr %150, align 8, !tbaa !23
  %151 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %151, ptr %12, align 8, !tbaa !9
  br label %152

152:                                              ; preds = %147, %57
  %153 = load ptr, ptr %11, align 8, !tbaa !9
  %154 = load ptr, ptr %12, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.procmaps_struct, ptr %154, i32 0, i32 12
  store ptr %153, ptr %155, align 8, !tbaa !23
  %156 = load ptr, ptr %11, align 8, !tbaa !9
  store ptr %156, ptr %12, align 8, !tbaa !9
  %157 = load i32, ptr %7, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %7, align 4, !tbaa !5
  br label %42

159:                                              ; preds = %49
  %160 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %160, ptr @g_last_head, align 8, !tbaa !9
  %161 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %161, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %162

162:                                              ; preds = %159, %56
  call void @llvm.lifetime.end.p0(i64 600, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 30, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 10, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 3000, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %163

163:                                              ; preds = %162, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 500, ptr %4) #7
  %164 = load ptr, ptr %2, align 8
  ret ptr %164
}

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #4

declare i32 @fgetc(ptr noundef) #3

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @_pmparser_split_line(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #6

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

attributes #0 = { 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 = { nounwind "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 = { "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 willreturn memory(none) "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 #5 = { nounwind allocsize(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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 8}
!13 = !{!"procmaps_struct", !10, i64 0, !10, i64 8, !14, i64 16, !7, i64 24, !15, i64 30, !15, i64 32, !15, i64 34, !15, i64 36, !14, i64 40, !7, i64 48, !6, i64 60, !7, i64 64, !10, i64 664}
!14 = !{!"long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!13, !10, i64 0}
!17 = !{!13, !14, i64 16}
!18 = !{!13, !15, i64 30}
!19 = !{!13, !15, i64 32}
!20 = !{!13, !15, i64 34}
!21 = !{!13, !15, i64 36}
!22 = !{!13, !6, i64 60}
!23 = !{!13, !10, i64 664}


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

@g_last_head = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @pmparser_parse(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca [500 x i8], align 16
  %3 = alloca [3000 x i8], align 16
  %4 = alloca [20 x i8], align 16
  %5 = alloca [20 x i8], align 16
  %6 = alloca [8 x i8], align 4
  %7 = alloca [20 x i8], align 16
  %8 = alloca [10 x i8], align 1
  %9 = alloca [30 x i8], align 16
  %10 = alloca [600 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 500, ptr nonnull %2) #8
  %11 = icmp sgt i32 %0, -1
  br i1 %11, label %12, label %14

12:                                               ; preds = %1
  %13 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) #8
  br label %16

14:                                               ; preds = %1
  %15 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.1) #8
  br label %16

16:                                               ; preds = %14, %12
  %17 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.2)
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %18, label %24

18:                                               ; preds = %16
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = tail call ptr @__errno_location() #9
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = tail call ptr @strerror(i32 noundef %21) #8
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.3, ptr noundef %22) #10
  br label %91

24:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 3000, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 600, ptr nonnull %10) #8
  %25 = tail call i32 @fgetc(ptr noundef nonnull %17)
  %sext.mask41 = and i32 %25, 255
  %26 = icmp eq i32 %sext.mask41, 255
  br i1 %26, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %24
  %27 = getelementptr inbounds i8, ptr %3, i64 1
  %28 = call ptr @fgets(ptr noundef nonnull %27, i32 noundef 259, ptr noundef nonnull %17)
  %29 = icmp eq ptr %28, null
  br i1 %29, label %.loopexit, label %30

30:                                               ; preds = %.lr.ph
  %31 = trunc i32 %25 to i8
  store i8 %31, ptr %3, align 16, !tbaa !11
  %32 = call noalias dereferenceable_or_null(672) ptr @malloc(i64 noundef 672) #11
  call void @_pmparser_split_line(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %33 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %4, ptr noundef nonnull @.str.4, ptr noundef %32) #8
  %34 = getelementptr inbounds i8, ptr %32, i64 8
  %35 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %5, ptr noundef nonnull @.str.4, ptr noundef nonnull %34) #8
  %36 = load ptr, ptr %34, align 8, !tbaa !12
  %37 = ptrtoint ptr %36 to i64
  %38 = load ptr, ptr %32, align 8, !tbaa !16
  %39 = ptrtoint ptr %38 to i64
  %40 = sub i64 %37, %39
  %41 = getelementptr inbounds i8, ptr %32, i64 16
  store i64 %40, ptr %41, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %32, i64 24
  %43 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %42, ptr noundef nonnull dereferenceable(1) %6) #8
  %44 = getelementptr inbounds i8, ptr %32, i64 30
  %45 = load <4 x i8>, ptr %6, align 4, !tbaa !11
  %46 = icmp eq <4 x i8> %45, <i8 114, i8 119, i8 120, i8 112>
  %47 = zext <4 x i1> %46 to <4 x i16>
  store <4 x i16> %47, ptr %44, align 2, !tbaa !18
  %48 = getelementptr inbounds i8, ptr %32, i64 40
  %49 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %7, ptr noundef nonnull @.str.4, ptr noundef nonnull %48) #8
  %50 = getelementptr inbounds i8, ptr %32, i64 48
  %51 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %50, ptr noundef nonnull dereferenceable(1) %8) #8
  %52 = call i32 @atoi(ptr nocapture noundef %9) #12
  %53 = getelementptr inbounds i8, ptr %32, i64 60
  store i32 %52, ptr %53, align 4, !tbaa !19
  %54 = getelementptr inbounds i8, ptr %32, i64 64
  %55 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %54, ptr noundef nonnull dereferenceable(1) %10) #8
  %56 = getelementptr inbounds i8, ptr %32, i64 664
  store ptr %32, ptr %56, align 8, !tbaa !20
  %57 = call i32 @fgetc(ptr noundef nonnull %17)
  %sext.mask.peel = and i32 %57, 255
  %58 = icmp eq i32 %sext.mask.peel, 255
  br i1 %58, label %._crit_edge, label %.peel.next

.peel.next:                                       ; preds = %30, %61
  %.in = phi i32 [ %89, %61 ], [ %57, %30 ]
  %.044 = phi ptr [ %63, %61 ], [ %32, %30 ]
  %59 = call ptr @fgets(ptr noundef nonnull %27, i32 noundef 259, ptr noundef nonnull %17)
  %60 = icmp eq ptr %59, null
  br i1 %60, label %.loopexit, label %61

61:                                               ; preds = %.peel.next
  %62 = trunc i32 %.in to i8
  store i8 %62, ptr %3, align 16, !tbaa !11
  %63 = call noalias dereferenceable_or_null(672) ptr @malloc(i64 noundef 672) #11
  call void @_pmparser_split_line(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %64 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %4, ptr noundef nonnull @.str.4, ptr noundef %63) #8
  %65 = getelementptr inbounds i8, ptr %63, i64 8
  %66 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %5, ptr noundef nonnull @.str.4, ptr noundef nonnull %65) #8
  %67 = load ptr, ptr %65, align 8, !tbaa !12
  %68 = ptrtoint ptr %67 to i64
  %69 = load ptr, ptr %63, align 8, !tbaa !16
  %70 = ptrtoint ptr %69 to i64
  %71 = sub i64 %68, %70
  %72 = getelementptr inbounds i8, ptr %63, i64 16
  store i64 %71, ptr %72, align 8, !tbaa !17
  %73 = getelementptr inbounds i8, ptr %63, i64 24
  %74 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %73, ptr noundef nonnull dereferenceable(1) %6) #8
  %75 = getelementptr inbounds i8, ptr %63, i64 30
  %76 = load <4 x i8>, ptr %6, align 4, !tbaa !11
  %77 = icmp eq <4 x i8> %76, <i8 114, i8 119, i8 120, i8 112>
  %78 = zext <4 x i1> %77 to <4 x i16>
  store <4 x i16> %78, ptr %75, align 2, !tbaa !18
  %79 = getelementptr inbounds i8, ptr %63, i64 40
  %80 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %7, ptr noundef nonnull @.str.4, ptr noundef nonnull %79) #8
  %81 = getelementptr inbounds i8, ptr %63, i64 48
  %82 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %81, ptr noundef nonnull dereferenceable(1) %8) #8
  %83 = call i32 @atoi(ptr nocapture noundef %9) #12
  %84 = getelementptr inbounds i8, ptr %63, i64 60
  store i32 %83, ptr %84, align 4, !tbaa !19
  %85 = getelementptr inbounds i8, ptr %63, i64 64
  %86 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %85, ptr noundef nonnull dereferenceable(1) %10) #8
  %87 = getelementptr inbounds i8, ptr %63, i64 664
  store ptr null, ptr %87, align 8, !tbaa !20
  %88 = getelementptr inbounds i8, ptr %.044, i64 664
  store ptr %63, ptr %88, align 8, !tbaa !20
  %89 = call i32 @fgetc(ptr noundef nonnull %17)
  %sext.mask = and i32 %89, 255
  %90 = icmp eq i32 %sext.mask, 255
  br i1 %90, label %._crit_edge, label %.peel.next, !llvm.loop !21

._crit_edge:                                      ; preds = %61, %30, %24
  %.034.lcssa = phi ptr [ null, %24 ], [ %32, %30 ], [ %32, %61 ]
  store ptr %.034.lcssa, ptr @g_last_head, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.peel.next, %.lr.ph, %._crit_edge
  %.032 = phi ptr [ %.034.lcssa, %._crit_edge ], [ null, %.lr.ph ], [ null, %.peel.next ]
  call void @llvm.lifetime.end.p0(i64 600, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 3000, ptr nonnull %3) #8
  br label %91

91:                                               ; preds = %.loopexit, %18
  %.133 = phi ptr [ %.032, %.loopexit ], [ null, %18 ]
  call void @llvm.lifetime.end.p0(i64 500, ptr nonnull %2) #8
  ret ptr %.133
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fgetc(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare dso_local void @_pmparser_split_line(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #7

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

attributes #0 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "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 "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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { cold nounwind }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"procmaps_struct", !6, i64 0, !6, i64 8, !14, i64 16, !7, i64 24, !15, i64 30, !15, i64 32, !15, i64 34, !15, i64 36, !14, i64 40, !7, i64 48, !10, i64 60, !7, i64 64, !6, i64 664}
!14 = !{!"long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!13, !6, i64 0}
!17 = !{!13, !14, i64 16}
!18 = !{!15, !15, i64 0}
!19 = !{!13, !10, i64 60}
!20 = !{!13, !6, i64 664}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass