; LLVM IR from junhyeokahn/PyPnC :: external_source/yaml/src/emitterutils.ll (ZN4YAML5Utils9WriteCharERNS_15ostream_wrapperEc)

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

@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 1 dereferenceable(2)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4YAML5Utils12_GLOBAL__N_130WriteDoubleQuoteEscapeSequenceERNS_15ostream_wrapperEi(ptr noundef nonnull align 8 dereferenceable(57), i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4YAML5Utils9WriteCharERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57) %0, i8 noundef signext %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  %5 = load i8, ptr %4, align 1, !tbaa !9
  %6 = sext i8 %5 to i32
  %7 = icmp sle i32 97, %6
  br i1 %7, label %8, label %12

8:                                                ; preds = %2
  %9 = load i8, ptr %4, align 1, !tbaa !9
  %10 = sext i8 %9 to i32
  %11 = icmp sle i32 %10, 122
  br i1 %11, label %20, label %12

12:                                               ; preds = %8, %2
  %13 = load i8, ptr %4, align 1, !tbaa !9
  %14 = sext i8 %13 to i32
  %15 = icmp sle i32 65, %14
  br i1 %15, label %16, label %24

16:                                               ; preds = %12
  %17 = load i8, ptr %4, align 1, !tbaa !9
  %18 = sext i8 %17 to i32
  %19 = icmp sle i32 %18, 90
  br i1 %19, label %20, label %24

20:                                               ; preds = %16, %8
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = load i8, ptr %4, align 1, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57) %21, i8 noundef signext %22)
  br label %91

24:                                               ; preds = %16, %12
  %25 = load i8, ptr %4, align 1, !tbaa !9
  %26 = sext i8 %25 to i32
  %27 = icmp eq i32 %26, 34
  br i1 %27, label %28, label %31

28:                                               ; preds = %24
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %29, ptr noundef nonnull align 1 dereferenceable(5) @.str.11)
  br label %90

31:                                               ; preds = %24
  %32 = load i8, ptr %4, align 1, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 9
  br i1 %34, label %35, label %38

35:                                               ; preds = %31
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %36, ptr noundef nonnull align 1 dereferenceable(5) @.str.12)
  br label %89

38:                                               ; preds = %31
  %39 = load i8, ptr %4, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 10
  br i1 %41, label %42, label %45

42:                                               ; preds = %38
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %43, ptr noundef nonnull align 1 dereferenceable(5) @.str.13)
  br label %88

45:                                               ; preds = %38
  %46 = load i8, ptr %4, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 8
  br i1 %48, label %49, label %52

49:                                               ; preds = %45
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %50, ptr noundef nonnull align 1 dereferenceable(5) @.str.14)
  br label %87

52:                                               ; preds = %45
  %53 = load i8, ptr %4, align 1, !tbaa !9
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 92
  br i1 %55, label %56, label %59

56:                                               ; preds = %52
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %57, ptr noundef nonnull align 1 dereferenceable(5) @.str.15)
  br label %86

59:                                               ; preds = %52
  %60 = load i8, ptr %4, align 1, !tbaa !9
  %61 = sext i8 %60 to i32
  %62 = icmp sle i32 32, %61
  br i1 %62, label %63, label %67

63:                                               ; preds = %59
  %64 = load i8, ptr %4, align 1, !tbaa !9
  %65 = sext i8 %64 to i32
  %66 = icmp sle i32 %65, 126
  br i1 %66, label %71, label %67

67:                                               ; preds = %63, %59
  %68 = load i8, ptr %4, align 1, !tbaa !9
  %69 = sext i8 %68 to i32
  %70 = icmp eq i32 %69, 32
  br i1 %70, label %71, label %77

71:                                               ; preds = %67, %63
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %72, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  %74 = load i8, ptr %4, align 1, !tbaa !9
  %75 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57) %73, i8 noundef signext %74)
  %76 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %75, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  br label %85

77:                                               ; preds = %67
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %78, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load i8, ptr %4, align 1, !tbaa !9
  %82 = sext i8 %81 to i32
  call void @_ZN4YAML5Utils12_GLOBAL__N_130WriteDoubleQuoteEscapeSequenceERNS_15ostream_wrapperEi(ptr noundef nonnull align 8 dereferenceable(57) %80, i32 noundef %82)
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %83, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  br label %85

85:                                               ; preds = %77, %71
  br label %86

86:                                               ; preds = %85, %56
  br label %87

87:                                               ; preds = %86, %49
  br label %88

88:                                               ; preds = %87, %42
  br label %89

89:                                               ; preds = %88, %35
  br label %90

90:                                               ; preds = %89, %28
  br label %91

91:                                               ; preds = %90, %20
  ret i1 true
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57), i8 noundef signext) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 1 dereferenceable(5)) #0

attributes #0 = { inlinehint 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 #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" }

!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++ TBAA"}
!9 = !{!7, !7, 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"

@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4YAML5Utils12_GLOBAL__N_130WriteDoubleQuoteEscapeSequenceERNS_15ostream_wrapperEi(ptr noundef nonnull align 8 dereferenceable(57), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4YAML5Utils9WriteCharERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57) %0, i8 noundef signext %1) local_unnamed_addr #1 {
  %3 = sext i8 %1 to i32
  %4 = and i8 %1, -33
  %5 = add i8 %4, -65
  %or.cond35 = icmp ult i8 %5, 26
  br i1 %or.cond35, label %6, label %8

6:                                                ; preds = %2
  %7 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57) %0, i8 noundef signext %1)
  br label %27

8:                                                ; preds = %2
  switch i8 %1, label %19 [
    i8 34, label %9
    i8 9, label %11
    i8 10, label %13
    i8 8, label %15
    i8 92, label %17
  ]

9:                                                ; preds = %8
  %10 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(5) @.str.11)
  br label %27

11:                                               ; preds = %8
  %12 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(5) @.str.12)
  br label %27

13:                                               ; preds = %8
  %14 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(5) @.str.13)
  br label %27

15:                                               ; preds = %8
  %16 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(5) @.str.14)
  br label %27

17:                                               ; preds = %8
  %18 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(5) @.str.15)
  br label %27

19:                                               ; preds = %8
  %20 = add i8 %1, -32
  %or.cond8 = icmp ult i8 %20, 95
  %21 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  br i1 %or.cond8, label %22, label %25

22:                                               ; preds = %19
  %23 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57) %21, i8 noundef signext %1)
  %24 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %23, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  br label %27

25:                                               ; preds = %19
  tail call void @_ZN4YAML5Utils12_GLOBAL__N_130WriteDoubleQuoteEscapeSequenceERNS_15ostream_wrapperEi(ptr noundef nonnull align 8 dereferenceable(57) %0, i32 noundef %3)
  %26 = tail call noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm2EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 1 dereferenceable(2) @.str.2)
  br label %27

27:                                               ; preds = %9, %13, %17, %25, %22, %15, %11, %6
  ret i1 true
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsERNS_15ostream_wrapperEc(ptr noundef nonnull align 8 dereferenceable(57), i8 noundef signext) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(57) ptr @_ZN4YAMLlsILm5EEERNS_15ostream_wrapperES2_RAT__Kc(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #0

attributes #0 = { inlinehint 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 #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" }

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


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