; LLVM IR from thepowersgang/mrustc :: src/parse/lex.ll (Z5issym9Codepoint)

; 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.Codepoint = type { i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9CodepointeqEc(ptr noundef nonnull align 4 dereferenceable(4), i8 noundef signext) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5issym9Codepoint(i32 %0) #1 {
  %2 = alloca i1, align 1
  %3 = alloca %struct.Codepoint, align 4
  %4 = getelementptr inbounds %struct.Codepoint, ptr %3, i32 0, i32 0
  store i32 %0, ptr %4, align 4
  %5 = getelementptr inbounds %struct.Codepoint, ptr %3, i32 0, i32 0
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = icmp ule i32 48, %6
  br i1 %7, label %8, label %13

8:                                                ; preds = %1
  %9 = getelementptr inbounds %struct.Codepoint, ptr %3, i32 0, i32 0
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = icmp ule i32 %10, 57
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  store i1 true, ptr %2, align 1
  br label %30

13:                                               ; preds = %8, %1
  %14 = getelementptr inbounds %struct.Codepoint, ptr %3, i32 0, i32 0
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = call i32 @isalpha(i32 noundef %15) #3
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %13
  store i1 true, ptr %2, align 1
  br label %30

19:                                               ; preds = %13
  %20 = call noundef zeroext i1 @_ZN9CodepointeqEc(ptr noundef nonnull align 4 dereferenceable(4) %3, i8 noundef signext 95)
  br i1 %20, label %21, label %22

21:                                               ; preds = %19
  store i1 true, ptr %2, align 1
  br label %30

22:                                               ; preds = %19
  %23 = getelementptr inbounds %struct.Codepoint, ptr %3, i32 0, i32 0
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = icmp uge i32 %24, 128
  br i1 %25, label %26, label %29

26:                                               ; preds = %22
  %27 = call noundef zeroext i1 @_ZNK9Codepoint7isspaceEv(ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = xor i1 %27, true
  store i1 %28, ptr %2, align 1
  br label %30

29:                                               ; preds = %22
  store i1 false, ptr %2, align 1
  br label %30

30:                                               ; preds = %29, %26, %21, %18, %12
  %31 = load i1, ptr %2, align 1
  ret i1 %31
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isalpha(i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9Codepoint7isspaceEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

attributes #0 = { mustprogress 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 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 #2 = { nounwind willreturn memory(read) "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 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, !7, i64 0}
!6 = !{!"_ZTS9Codepoint", !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; 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.Codepoint = type { i32 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9CodepointeqEc(ptr noundef nonnull align 4 dereferenceable(4), i8 noundef signext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z5issym9Codepoint(i32 %0) local_unnamed_addr #0 {
  %2 = alloca %struct.Codepoint, align 4
  store i32 %0, ptr %2, align 4
  %3 = add i32 %0, -48
  %or.cond = icmp ult i32 %3, 10
  br i1 %or.cond, label %14, label %4

4:                                                ; preds = %1
  %5 = tail call i32 @isalpha(i32 noundef %0) #2
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %6, label %14

6:                                                ; preds = %4
  %7 = call noundef zeroext i1 @_ZN9CodepointeqEc(ptr noundef nonnull align 4 dereferenceable(4) %2, i8 noundef signext 95)
  br i1 %7, label %14, label %8

8:                                                ; preds = %6
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = icmp ugt i32 %9, 127
  br i1 %10, label %11, label %14

11:                                               ; preds = %8
  %12 = call noundef zeroext i1 @_ZNK9Codepoint7isspaceEv(ptr noundef nonnull align 4 dereferenceable(4) %2)
  %13 = xor i1 %12, true
  br label %14

14:                                               ; preds = %8, %6, %4, %1, %11
  %.0 = phi i1 [ %13, %11 ], [ true, %1 ], [ true, %4 ], [ true, %6 ], [ false, %8 ]
  ret i1 %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isalpha(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9Codepoint7isspaceEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress 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 nofree nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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, !7, i64 0}
!6 = !{!"_ZTS9Codepoint", !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


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