; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_Parser (isAssignOp__)

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

@mu_____string266 = external dso_local global %struct.string__, align 8
@top_____abandonFn__ = external dso_local thread_local global ptr, 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: nounwind uwtable
declare dso_local zeroext i8 @string__equals__(ptr, i32, ptr, i32) #2

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

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  %30 = getelementptr inbounds %struct.string__, ptr %3, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !8
  %32 = icmp eq i32 %31, 2
  %33 = zext i1 %32 to i32
  %34 = trunc i32 %33 to i8
  store i8 %34, ptr %5, align 1, !tbaa !5
  %35 = load i8, ptr %5, align 1, !tbaa !5
  %36 = icmp ne i8 %35, 0
  br i1 %36, label %37, label %58

37:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store ptr %3, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 1, ptr %7, align 4, !tbaa !13
  %38 = load i32, ptr %7, align 4, !tbaa !13
  %39 = load ptr, ptr %6, align 8, !tbaa !12
  %40 = getelementptr inbounds %struct.string__, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !8
  %42 = icmp ult i32 %38, %41
  br i1 %42, label %46, label %43

43:                                               ; preds = %37
  %44 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %45 = load ptr, ptr %44, align 8, !tbaa !12
  call void %45(i32 noundef -3)
  br label %46

46:                                               ; preds = %43, %37
  %47 = load ptr, ptr %6, align 8, !tbaa !12
  %48 = getelementptr inbounds %struct.string__, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !14
  %50 = load i32, ptr %7, align 4, !tbaa !13
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %49, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !5
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 61
  %56 = zext i1 %55 to i32
  %57 = trunc i32 %56 to i8
  store i8 %57, ptr %5, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %58

58:                                               ; preds = %46, %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  %59 = load i8, ptr %5, align 1, !tbaa !5
  store i8 %59, ptr %8, align 1, !tbaa !5
  %60 = load i8, ptr %8, align 1, !tbaa !5
  %61 = icmp ne i8 %60, 0
  br i1 %61, label %62, label %83

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store ptr %3, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !13
  %63 = load i32, ptr %10, align 4, !tbaa !13
  %64 = load ptr, ptr %9, align 8, !tbaa !12
  %65 = getelementptr inbounds %struct.string__, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 8, !tbaa !8
  %67 = icmp ult i32 %63, %66
  br i1 %67, label %71, label %68

68:                                               ; preds = %62
  %69 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %70 = load ptr, ptr %69, align 8, !tbaa !12
  call void %70(i32 noundef -3)
  br label %71

71:                                               ; preds = %68, %62
  %72 = load ptr, ptr %9, align 8, !tbaa !12
  %73 = getelementptr inbounds %struct.string__, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !14
  %75 = load i32, ptr %10, align 4, !tbaa !13
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds i8, ptr %74, i64 %76
  %78 = load i8, ptr %77, align 1, !tbaa !5
  %79 = sext i8 %78 to i32
  %80 = icmp ne i32 %79, 61
  %81 = zext i1 %80 to i32
  %82 = trunc i32 %81 to i8
  store i8 %82, ptr %8, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %83

83:                                               ; preds = %71, %58
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  %84 = load i8, ptr %8, align 1, !tbaa !5
  store i8 %84, ptr %11, align 1, !tbaa !5
  %85 = load i8, ptr %11, align 1, !tbaa !5
  %86 = icmp ne i8 %85, 0
  br i1 %86, label %87, label %108

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store ptr %3, ptr %12, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !13
  %88 = load i32, ptr %13, align 4, !tbaa !13
  %89 = load ptr, ptr %12, align 8, !tbaa !12
  %90 = getelementptr inbounds %struct.string__, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 8, !tbaa !8
  %92 = icmp ult i32 %88, %91
  br i1 %92, label %96, label %93

93:                                               ; preds = %87
  %94 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  call void %95(i32 noundef -3)
  br label %96

96:                                               ; preds = %93, %87
  %97 = load ptr, ptr %12, align 8, !tbaa !12
  %98 = getelementptr inbounds %struct.string__, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !14
  %100 = load i32, ptr %13, align 4, !tbaa !13
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %99, i64 %101
  %103 = load i8, ptr %102, align 1, !tbaa !5
  %104 = sext i8 %103 to i32
  %105 = icmp ne i32 %104, 33
  %106 = zext i1 %105 to i32
  %107 = trunc i32 %106 to i8
  store i8 %107, ptr %11, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %108

108:                                              ; preds = %96, %83
  %109 = load i8, ptr %11, align 1, !tbaa !5
  store i8 %109, ptr %4, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  br label %110

110:                                              ; preds = %108, %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  %111 = load i8, ptr %4, align 1, !tbaa !5
  store i8 %111, ptr %14, align 1, !tbaa !5
  %112 = load i8, ptr %14, align 1, !tbaa !5
  %113 = icmp ne i8 %112, 0
  br i1 %113, label %145, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %115 = getelementptr inbounds %struct.string__, ptr %3, i32 0, i32 1
  %116 = load i32, ptr %115, align 8, !tbaa !8
  %117 = icmp eq i32 %116, 3
  %118 = zext i1 %117 to i32
  %119 = trunc i32 %118 to i8
  store i8 %119, ptr %15, align 1, !tbaa !5
  %120 = load i8, ptr %15, align 1, !tbaa !5
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %122, label %143

122:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store ptr %3, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 2, ptr %17, align 4, !tbaa !13
  %123 = load i32, ptr %17, align 4, !tbaa !13
  %124 = load ptr, ptr %16, align 8, !tbaa !12
  %125 = getelementptr inbounds %struct.string__, ptr %124, i32 0, i32 1
  %126 = load i32, ptr %125, align 8, !tbaa !8
  %127 = icmp ult i32 %123, %126
  br i1 %127, label %131, label %128

128:                                              ; preds = %122
  %129 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %130 = load ptr, ptr %129, align 8, !tbaa !12
  call void %130(i32 noundef -3)
  br label %131

131:                                              ; preds = %128, %122
  %132 = load ptr, ptr %16, align 8, !tbaa !12
  %133 = getelementptr inbounds %struct.string__, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !14
  %135 = load i32, ptr %17, align 4, !tbaa !13
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds i8, ptr %134, i64 %136
  %138 = load i8, ptr %137, align 1, !tbaa !5
  %139 = sext i8 %138 to i32
  %140 = icmp eq i32 %139, 61
  %141 = zext i1 %140 to i32
  %142 = trunc i32 %141 to i8
  store i8 %142, ptr %15, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %143

143:                                              ; preds = %131, %114
  %144 = load i8, ptr %15, align 1, !tbaa !5
  store i8 %144, ptr %14, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  br label %145

145:                                              ; preds = %143, %110
  %146 = load i8, ptr %14, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #3
  ret i8 %146
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !11, i64 8}
!9 = !{!"", !10, i64 0, !11, i64 8}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!9, !10, i64 0}


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

@mu_____string266 = external dso_local local_unnamed_addr global %struct.string__, align 8

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

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @Parser__isAssignOp__(ptr %0, i32 %1) local_unnamed_addr #0 {
  %3 = load ptr, ptr @mu_____string266, align 8
  %4 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string266, i64 8), align 8
  %5 = tail call zeroext i8 @string__equals__(ptr %0, i32 %1, ptr %3, i32 %4)
  %.not = icmp eq i8 %5, 0
  br i1 %.not, label %6, label %.critedge51.thread54

6:                                                ; preds = %2
  switch i32 %1, label %.critedge51.thread54 [
    i32 2, label %7
    i32 3, label %11
  ]

7:                                                ; preds = %6
  %8 = getelementptr inbounds i8, ptr %0, i64 1
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %.not58 = icmp eq i8 %9, 61
  br i1 %.not58, label %.critedge, label %.critedge51.thread54

.critedge:                                        ; preds = %7
  %10 = load i8, ptr %0, align 1, !tbaa !5
  %.not48 = icmp eq i8 %10, 61
  br i1 %.not48, label %.critedge51.thread54, label %.critedge51

.critedge51:                                      ; preds = %.critedge
  %.not59 = icmp ne i8 %10, 33
  %spec.select = zext i1 %.not59 to i8
  br label %.critedge51.thread54

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %0, i64 2
  %13 = load i8, ptr %12, align 1, !tbaa !5
  %14 = icmp eq i8 %13, 61
  %15 = zext i1 %14 to i8
  br label %.critedge51.thread54

.critedge51.thread54:                             ; preds = %.critedge51, %6, %7, %.critedge, %2, %11
  %.029 = phi i8 [ %15, %11 ], [ %5, %2 ], [ 0, %.critedge ], [ 0, %7 ], [ %spec.select, %.critedge51 ], [ 0, %6 ]
  ret i8 %.029
}

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

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass