; LLVM IR from aws/s2n-tls :: tests/cbmc/proofs/s2n_is_base64_char (s2n_is_base64_char_harness)

; 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 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@__PRETTY_FUNCTION__.s2n_is_base64_char_harness = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @s2n_is_base64_char_harness() #0 {
  %1 = alloca i8, align 1
  %2 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #4
  %3 = load i8, ptr %1, align 1, !tbaa !5
  %4 = zext i8 %3 to i32
  %5 = icmp sle i32 65, %4
  br i1 %5, label %6, label %10

6:                                                ; preds = %0
  %7 = load i8, ptr %1, align 1, !tbaa !5
  %8 = zext i8 %7 to i32
  %9 = icmp sle i32 %8, 90
  br i1 %9, label %38, label %10

10:                                               ; preds = %6, %0
  %11 = load i8, ptr %1, align 1, !tbaa !5
  %12 = zext i8 %11 to i32
  %13 = icmp sle i32 97, %12
  br i1 %13, label %14, label %18

14:                                               ; preds = %10
  %15 = load i8, ptr %1, align 1, !tbaa !5
  %16 = zext i8 %15 to i32
  %17 = icmp sle i32 %16, 122
  br i1 %17, label %38, label %18

18:                                               ; preds = %14, %10
  %19 = load i8, ptr %1, align 1, !tbaa !5
  %20 = zext i8 %19 to i32
  %21 = icmp sle i32 48, %20
  br i1 %21, label %22, label %26

22:                                               ; preds = %18
  %23 = load i8, ptr %1, align 1, !tbaa !5
  %24 = zext i8 %23 to i32
  %25 = icmp sle i32 %24, 57
  br i1 %25, label %38, label %26

26:                                               ; preds = %22, %18
  %27 = load i8, ptr %1, align 1, !tbaa !5
  %28 = zext i8 %27 to i32
  %29 = icmp eq i32 %28, 43
  br i1 %29, label %38, label %30

30:                                               ; preds = %26
  %31 = load i8, ptr %1, align 1, !tbaa !5
  %32 = zext i8 %31 to i32
  %33 = icmp eq i32 %32, 47
  br i1 %33, label %38, label %34

34:                                               ; preds = %30
  %35 = load i8, ptr %1, align 1, !tbaa !5
  %36 = zext i8 %35 to i32
  %37 = icmp eq i32 %36, 61
  br label %38

38:                                               ; preds = %34, %30, %26, %22, %14, %6
  %39 = phi i1 [ true, %30 ], [ true, %26 ], [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %37, %34 ]
  %40 = zext i1 %39 to i8
  store i8 %40, ptr %2, align 1, !tbaa !8
  %41 = load i8, ptr %2, align 1, !tbaa !8, !range !10, !noundef !11
  %42 = trunc i8 %41 to i1
  %43 = zext i1 %42 to i32
  %44 = load i8, ptr %1, align 1, !tbaa !5
  %45 = call zeroext i1 @s2n_is_base64_char(i8 noundef zeroext %44)
  %46 = zext i1 %45 to i32
  %47 = icmp eq i32 %43, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %38
  br label %50

49:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 26, ptr noundef @__PRETTY_FUNCTION__.s2n_is_base64_char_harness) #5
  unreachable

50:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %1) #4
  ret void
}

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

declare zeroext i1 @s2n_is_base64_char(i8 noundef zeroext) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; 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 = { "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 = { noreturn 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 = { nounwind }
attributes #5 = { noreturn 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, !9, i64 0}
!9 = !{!"_Bool", !6, i64 0}
!10 = !{i8 0, i8 2}
!11 = !{}


; 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 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@__PRETTY_FUNCTION__.s2n_is_base64_char_harness = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @s2n_is_base64_char_harness() local_unnamed_addr #0 {
  %1 = tail call zeroext i1 @s2n_is_base64_char(i8 noundef zeroext undef) #3
  br i1 %1, label %2, label %3

2:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 26, ptr noundef nonnull @__PRETTY_FUNCTION__.s2n_is_base64_char_harness) #4
  unreachable

3:                                                ; preds = %0
  ret void
}

declare zeroext i1 @s2n_is_base64_char(i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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 = { "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 = { noreturn 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 }
attributes #4 = { noreturn 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)"}


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