; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_ArgsParser (parseArgsFileImpl__)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.string__ = type { ptr, i32 }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }
%struct.tag_____ArgsParserState__ = type { ptr, ptr, ptr, ptr, ptr, %struct.string__, %struct.string__, i32, %struct.string__, %struct.tag_____IntRange__, ptr }
%struct.tag_____IntRange__ = type { i32, i32 }

@mu_____string0 = external dso_local global %struct.string__, align 8
@mu_____string577 = external dso_local global %struct.string__, align 8
@top_____abandonFn__ = external dso_local thread_local global ptr, align 8
@__const.ArgsParser__parseArgsFileImpl__.local1 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ArgsParser__parseArgsFileImpl__.local5 = external hidden unnamed_addr constant %struct.string__, align 8

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; 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) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @string__equals__(ptr, i32, ptr, i32) #4

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @ArgsParser__parseArgs__(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @ArgsParser__readToken__(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @ArgsParser__parseArgsFileImpl__(ptr noundef %0, ptr %1, i32 %2) #4 {
  %4 = alloca %struct.string__, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.tag_____StringBuilder__, align 8
  %7 = alloca %struct.string__, align 8
  %8 = alloca %struct.string__, align 8
  %9 = alloca %struct.tag_____StringBuilder__, align 8
  %10 = alloca %struct.tag_____StringBuilder__, align 8
  %11 = alloca %struct.string__, align 8
  %12 = alloca %struct.string__, align 8
  %13 = alloca %struct.string__, align 8
  %14 = alloca %struct.tag_____StringBuilder__, align 8
  %15 = alloca %struct.string__, align 8
  %16 = alloca %struct.string__, align 8
  %17 = alloca i32, align 4
  %18 = alloca %struct.string__, align 8
  %19 = alloca %struct.string__, align 8
  %20 = alloca i32, align 4
  %21 = alloca %struct.string__, align 8
  %22 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 0
  store ptr %1, ptr %22, align 8
  %23 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 1
  store i32 %2, ptr %23, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8
  %26 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 1
  %27 = load i32, ptr %26, align 8
  %28 = load ptr, ptr @mu_____string0, align 8
  %29 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string0, i32 0, i32 1), align 8
  %30 = call zeroext i8 @string__equals__(ptr %25, i32 %27, ptr %28, i32 %29)
  %31 = icmp ne i8 %30, 0
  br i1 %31, label %32, label %35

32:                                               ; preds = %3
  %33 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  call void %34(i32 noundef -2)
  br label %35

35:                                               ; preds = %32, %3
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %36, i32 0, i32 3
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 1
  %42 = load i32, ptr %41, align 8
  %43 = call zeroext i8 @Set__contains__string____(ptr noundef %38, ptr %40, i32 %42)
  %44 = icmp ne i8 %43, 0
  br i1 %44, label %45, label %64

45:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 @__const.ArgsParser__parseArgsFileImpl__.local1, i64 16, i1 false)
  %46 = getelementptr inbounds { ptr, i32 }, ptr %7, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, i32 }, ptr %7, i32 0, i32 1
  %49 = load i32, ptr %48, align 8
  call void @StringBuilder__write__(ptr noundef %6, ptr %47, i32 %49)
  %50 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 1
  %53 = load i32, ptr %52, align 8
  call void @StringBuilder__write__(ptr noundef %6, ptr %51, i32 %53)
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %6)
  %56 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  %57 = extractvalue { ptr, i32 } %55, 0
  store ptr %57, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  %59 = extractvalue { ptr, i32 } %55, 1
  store i32 %59, ptr %58, align 8
  %60 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8
  %62 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  %63 = load i32, ptr %62, align 8
  call void @ArgsParser__error__(ptr noundef %54, ptr %61, i32 %63)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  br label %151

64:                                               ; preds = %35
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %65, i32 0, i32 3
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8
  %70 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 1
  %71 = load i32, ptr %70, align 8
  call void @Set__add__string____(ptr noundef %67, ptr %69, i32 %71)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %92

76:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !16
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8
  %85 = getelementptr inbounds { ptr, i32 }, ptr %4, i32 0, i32 1
  %86 = load i32, ptr %85, align 8
  %87 = call { ptr, i32 } %79(ptr %84, i32 %86, ptr noundef %82)
  %88 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 0
  %89 = extractvalue { ptr, i32 } %87, 0
  store ptr %89, ptr %88, align 8
  %90 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 1
  %91 = extractvalue { ptr, i32 } %87, 1
  store i32 %91, ptr %90, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %93

92:                                               ; preds = %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %4, i64 16, i1 false), !tbaa.struct !18
  br label %93

93:                                               ; preds = %92, %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !18
  %94 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  %96 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %97 = load i32, ptr %96, align 8
  %98 = call zeroext i8 @File__tryReadToStringBuilder__(ptr %95, i32 %97, ptr noundef %10)
  %99 = icmp ne i8 %98, 0
  br i1 %99, label %119, label %100

100:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 @__const.ArgsParser__parseArgsFileImpl__.local5, i64 16, i1 false)
  %101 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  %103 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %104 = load i32, ptr %103, align 8
  call void @StringBuilder__write__(ptr noundef %14, ptr %102, i32 %104)
  %105 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  %107 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %108 = load i32, ptr %107, align 8
  call void @StringBuilder__write__(ptr noundef %14, ptr %106, i32 %108)
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %14)
  %111 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %112 = extractvalue { ptr, i32 } %110, 0
  store ptr %112, ptr %111, align 8
  %113 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %114 = extractvalue { ptr, i32 } %110, 1
  store i32 %114, ptr %113, align 8
  %115 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8
  %117 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %118 = load i32, ptr %117, align 8
  call void @ArgsParser__error__(ptr noundef %109, ptr %116, i32 %118)
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %149

119:                                              ; preds = %93
  %120 = load ptr, ptr @mu_____string577, align 8
  %121 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string577, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %10, ptr %120, i32 %121)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %122, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %123, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %124, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %125, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %126, i32 0, i32 7
  %128 = load i32, ptr %127, align 8, !tbaa !19
  store i32 %128, ptr %20, align 4, !tbaa !15
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %129, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %130, ptr align 8 %4, i64 16, i1 false), !tbaa.struct !18
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %131, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %133 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef %10)
  %134 = getelementptr inbounds { ptr, i32 }, ptr %21, i32 0, i32 0
  %135 = extractvalue { ptr, i32 } %133, 0
  store ptr %135, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i32 }, ptr %21, i32 0, i32 1
  %137 = extractvalue { ptr, i32 } %133, 1
  store i32 %137, ptr %136, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %132, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %138, i32 0, i32 7
  store i32 0, ptr %139, align 8, !tbaa !19
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  call void @ArgsParser__readToken__(ptr noundef %140)
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  call void @ArgsParser__parseArgs__(ptr noundef %141)
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %142, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %143, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !18
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %144, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %145, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !18
  %146 = load i32, ptr %20, align 4, !tbaa !15
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.tag_____ArgsParserState__, ptr %147, i32 0, i32 7
  store i32 %146, ptr %148, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  store i32 0, ptr %17, align 4
  br label %149

149:                                              ; preds = %119, %100
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  %150 = load i32, ptr %17, align 4
  switch i32 %150, label %152 [
    i32 0, label %151
    i32 1, label %151
  ]

151:                                              ; preds = %149, %149, %45
  ret void

152:                                              ; preds = %149
  unreachable
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"tag_____ArgsParserState__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 56, !12, i64 72, !11, i64 80, !13, i64 96, !6, i64 104}
!11 = !{!"", !6, i64 0, !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"tag_____IntRange__", !12, i64 0, !12, i64 4}
!14 = !{i64 0, i64 8, !5, i64 8, i64 4, !15, i64 12, i64 4, !15}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !6, i64 8}
!17 = !{!10, !6, i64 16}
!18 = !{i64 0, i64 8, !5, i64 8, i64 4, !15}
!19 = !{!10, !12, i64 72}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.string__ = type { ptr, i32 }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }

@mu_____string0 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string577 = external dso_local local_unnamed_addr global %struct.string__, align 8
@top_____abandonFn__ = external dso_local thread_local local_unnamed_addr global ptr, align 8
@__const.ArgsParser__parseArgsFileImpl__.local1 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ArgsParser__parseArgsFileImpl__.local5 = external hidden unnamed_addr constant %struct.string__, align 8

; 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress 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) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @string__equals__(ptr, i32, ptr, i32) local_unnamed_addr #4

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @ArgsParser__parseArgs__(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @ArgsParser__readToken__(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
define dso_local void @ArgsParser__parseArgsFileImpl__(ptr noundef %0, ptr %1, i32 %2) local_unnamed_addr #4 {
  %4 = alloca %struct.tag_____StringBuilder__, align 8
  %5 = alloca %struct.tag_____StringBuilder__, align 8
  %6 = alloca %struct.tag_____StringBuilder__, align 8
  %7 = alloca %struct.string__, align 8
  %8 = alloca %struct.string__, align 8
  %9 = load ptr, ptr @mu_____string0, align 8
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string0, i64 8), align 8
  %11 = tail call zeroext i8 @string__equals__(ptr %1, i32 %2, ptr %9, i32 %10)
  %.not = icmp eq i8 %11, 0
  br i1 %.not, label %15, label %12

12:                                               ; preds = %3
  %13 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  tail call void %14(i32 noundef -2) #5
  br label %15

15:                                               ; preds = %12, %3
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = tail call zeroext i8 @Set__contains__string____(ptr noundef %17, ptr %1, i32 %2)
  %.not46 = icmp eq i8 %18, 0
  br i1 %.not46, label %23, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  %.sroa.017.0.copyload = load ptr, ptr @__const.ArgsParser__parseArgsFileImpl__.local1, align 8
  %.sroa.418.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.ArgsParser__parseArgsFileImpl__.local1, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %4, ptr %.sroa.017.0.copyload, i32 %.sroa.418.0.copyload)
  call void @StringBuilder__write__(ptr noundef nonnull %4, ptr %1, i32 %2)
  %20 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %4)
  %21 = extractvalue { ptr, i32 } %20, 0
  %22 = extractvalue { ptr, i32 } %20, 1
  call void @ArgsParser__error__(ptr noundef nonnull %0, ptr %21, i32 %22)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %50

23:                                               ; preds = %15
  %24 = load ptr, ptr %16, align 8, !tbaa !9
  tail call void @Set__add__string____(ptr noundef %24, ptr %1, i32 %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %.not47 = icmp eq ptr %26, null
  br i1 %.not47, label %33, label %27

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = tail call { ptr, i32 } %26(ptr %1, i32 %2, ptr noundef %29) #5
  %31 = extractvalue { ptr, i32 } %30, 0
  %32 = extractvalue { ptr, i32 } %30, 1
  br label %33

33:                                               ; preds = %23, %27
  %.sroa.012.0 = phi ptr [ %31, %27 ], [ %1, %23 ]
  %.sroa.513.0 = phi i32 [ %32, %27 ], [ %2, %23 ]
  %34 = call zeroext i8 @File__tryReadToStringBuilder__(ptr %.sroa.012.0, i32 %.sroa.513.0, ptr noundef nonnull %5)
  %.not48 = icmp eq i8 %34, 0
  br i1 %.not48, label %35, label %39

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  %.sroa.02.0.copyload = load ptr, ptr @__const.ArgsParser__parseArgsFileImpl__.local5, align 8
  %.sroa.43.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.ArgsParser__parseArgsFileImpl__.local5, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %6, ptr %.sroa.02.0.copyload, i32 %.sroa.43.0.copyload)
  call void @StringBuilder__write__(ptr noundef nonnull %6, ptr %.sroa.012.0, i32 %.sroa.513.0)
  %36 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %6)
  %37 = extractvalue { ptr, i32 } %36, 0
  %38 = extractvalue { ptr, i32 } %36, 1
  call void @ArgsParser__error__(ptr noundef nonnull %0, ptr %37, i32 %38)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %49

39:                                               ; preds = %33
  %40 = load ptr, ptr @mu_____string577, align 8
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string577, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %5, ptr %40, i32 %41)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7)
  %42 = getelementptr inbounds i8, ptr %0, i64 40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %42, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8)
  %43 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %43, i64 16, i1 false), !tbaa.struct !16
  %44 = getelementptr inbounds i8, ptr %0, i64 72
  %45 = load i32, ptr %44, align 8, !tbaa !18
  store ptr %1, ptr %42, align 8, !tbaa !5
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %2, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !17
  %46 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef nonnull %5)
  %47 = extractvalue { ptr, i32 } %46, 0
  %48 = extractvalue { ptr, i32 } %46, 1
  store ptr %47, ptr %43, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %48, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !17
  store i32 0, ptr %44, align 8, !tbaa !18
  call void @ArgsParser__readToken__(ptr noundef nonnull %0)
  call void @ArgsParser__parseArgs__(ptr noundef nonnull %0)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %8, i64 16, i1 false), !tbaa.struct !16
  store i32 %45, ptr %44, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7)
  br label %49

49:                                               ; preds = %39, %35
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %50

50:                                               ; preds = %49, %19
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"tag_____ArgsParserState__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 56, !12, i64 72, !11, i64 80, !13, i64 96, !6, i64 104}
!11 = !{!"", !6, i64 0, !12, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"tag_____IntRange__", !12, i64 0, !12, i64 4}
!14 = !{!10, !6, i64 8}
!15 = !{!10, !6, i64 16}
!16 = !{i64 0, i64 8, !5, i64 8, i64 4, !17}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !12, i64 72}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass