; LLVM IR from Nonoum/ECL :: tests/tests.ll (ZN15test_JH_generic11runInternalERSoi)

; 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.ECL_JH_WState = type { ptr, ptr, ptr, i8, i8 }
%struct.ECL_JH_RState = type { ptr, ptr, ptr, i8, i8 }

@__const._ZN15test_JH_generic11runInternalERSoi.bit_counts = external hidden unnamed_addr constant [9 x i8], align 1

; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ECL_JH_WInit(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ECL_JH_RInit(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ECL_JH_Write(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local zeroext i8 @ECL_JH_Read(ptr noundef, i8 noundef zeroext) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13ntest_for_ecl10ntest_noopEv() #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15test_JH_generic11runInternalERSoi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) unnamed_addr #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [9 x i8], align 1
  %8 = alloca [5 x i8], align 1
  %9 = alloca %struct.ECL_JH_WState, align 8
  %10 = alloca %struct.ECL_JH_RState, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %22 = load ptr, ptr %4, align 8
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN13ntest_for_ecl10ntest_noopEv()
  call void @llvm.lifetime.start.p0(i64 9, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %7, ptr align 1 @__const._ZN15test_JH_generic11runInternalERSoi.bit_counts, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  br label %24

24:                                               ; preds = %115, %3
  %25 = getelementptr inbounds [5 x i8], ptr %8, i64 0, i64 0
  call void @ECL_JH_WInit(ptr noundef %9, ptr noundef %25, i32 noundef 5, i32 noundef 0)
  %26 = getelementptr inbounds [5 x i8], ptr %8, i64 0, i64 0
  call void @ECL_JH_RInit(ptr noundef %10, ptr noundef %26, i32 noundef 5, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr %7, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = getelementptr inbounds [9 x i8], ptr %27, i64 0, i64 0
  store ptr %28, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  %30 = getelementptr inbounds [9 x i8], ptr %29, i64 0, i64 0
  %31 = getelementptr inbounds i8, ptr %30, i64 9
  store ptr %31, ptr %14, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %46, %24
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  %35 = icmp ne ptr %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %49

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = load i8, ptr %38, align 1, !tbaa !11
  store i8 %39, ptr %15, align 1, !tbaa !11
  %40 = load i8, ptr %11, align 1, !tbaa !11
  %41 = load i8, ptr %15, align 1, !tbaa !11
  call void @ECL_JH_Write(ptr noundef %9, i8 noundef zeroext %40, i8 noundef zeroext %41)
  %42 = load i8, ptr %11, align 1, !tbaa !11
  %43 = zext i8 %42 to i32
  %44 = xor i32 %43, -1
  %45 = trunc i32 %44 to i8
  store i8 %45, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %46

46:                                               ; preds = %37
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i32 1
  store ptr %48, ptr %13, align 8, !tbaa !5
  br label %32

49:                                               ; preds = %36
  store i8 0, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = getelementptr inbounds [9 x i8], ptr %50, i64 0, i64 0
  store ptr %51, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  %53 = getelementptr inbounds [9 x i8], ptr %52, i64 0, i64 0
  %54 = getelementptr inbounds i8, ptr %53, i64 9
  store ptr %54, ptr %18, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %83, %49
  %56 = load ptr, ptr %17, align 8, !tbaa !5
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = icmp ne ptr %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %86

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = load i8, ptr %61, align 1, !tbaa !11
  store i8 %62, ptr %19, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  %63 = load i8, ptr %19, align 1, !tbaa !11
  %64 = call zeroext i8 @ECL_JH_Read(ptr noundef %10, i8 noundef zeroext %63)
  store i8 %64, ptr %20, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %65 = load i8, ptr %11, align 1, !tbaa !11
  %66 = zext i8 %65 to i32
  %67 = load i8, ptr %19, align 1, !tbaa !11
  %68 = zext i8 %67 to i32
  %69 = shl i32 1, %68
  %70 = sub nsw i32 %69, 1
  %71 = and i32 %66, %70
  %72 = trunc i32 %71 to i8
  store i8 %72, ptr %21, align 1, !tbaa !11
  %73 = load i8, ptr %20, align 1, !tbaa !11
  %74 = zext i8 %73 to i32
  %75 = load i8, ptr %21, align 1, !tbaa !11
  %76 = zext i8 %75 to i32
  %77 = icmp eq i32 %74, %76
  %78 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext %77)
  %79 = load i8, ptr %11, align 1, !tbaa !11
  %80 = zext i8 %79 to i32
  %81 = xor i32 %80, -1
  %82 = trunc i32 %81 to i8
  store i8 %82, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %83

83:                                               ; preds = %60
  %84 = load ptr, ptr %17, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i32 1
  store ptr %85, ptr %17, align 8, !tbaa !5
  br label %55

86:                                               ; preds = %59
  %87 = getelementptr inbounds %struct.ECL_JH_WState, ptr %9, i32 0, i32 4
  %88 = load i8, ptr %87, align 1, !tbaa !12
  %89 = icmp ne i8 %88, 0
  %90 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext %89)
  %91 = getelementptr inbounds %struct.ECL_JH_RState, ptr %10, i32 0, i32 4
  %92 = load i8, ptr %91, align 1, !tbaa !14
  %93 = icmp ne i8 %92, 0
  %94 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext %93)
  %95 = getelementptr inbounds %struct.ECL_JH_WState, ptr %9, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = getelementptr inbounds %struct.ECL_JH_RState, ptr %10, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !17
  %99 = icmp eq ptr %96, %98
  %100 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext %99)
  %101 = getelementptr inbounds %struct.ECL_JH_WState, ptr %9, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !18
  %103 = getelementptr inbounds %struct.ECL_JH_RState, ptr %10, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = icmp eq ptr %102, %104
  %106 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext %105)
  %107 = getelementptr inbounds %struct.ECL_JH_WState, ptr %9, i32 0, i32 3
  %108 = load i8, ptr %107, align 8, !tbaa !20
  %109 = zext i8 %108 to i32
  %110 = getelementptr inbounds %struct.ECL_JH_RState, ptr %10, i32 0, i32 3
  %111 = load i8, ptr %110, align 8, !tbaa !21
  %112 = zext i8 %111 to i32
  %113 = icmp eq i32 %109, %112
  %114 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %22, i1 noundef zeroext %113)
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  br label %115

115:                                              ; preds = %86
  %116 = call noundef ptr @_ZSt5beginIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9) %7) #6
  %117 = call noundef ptr @_ZSt3endIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9) %7) #6
  %118 = call noundef zeroext i1 @_ZSt16next_permutationIPhEbT_S1_(ptr noundef %116, ptr noundef %117)
  br i1 %118, label %24, label %119, !llvm.loop !22

119:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 5, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 9, ptr %7) #6
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPhEbT_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZSt5beginIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZSt3endIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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 #5 = { 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 #6 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 25}
!13 = !{!"_ZTS13ECL_JH_WState", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 25}
!14 = !{!15, !7, i64 25}
!15 = !{!"_ZTS13ECL_JH_RState", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 25}
!16 = !{!13, !6, i64 0}
!17 = !{!15, !6, i64 0}
!18 = !{!13, !6, i64 8}
!19 = !{!15, !6, i64 8}
!20 = !{!13, !7, i64 24}
!21 = !{!15, !7, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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.ECL_JH_WState = type { ptr, ptr, ptr, i8, i8 }
%struct.ECL_JH_RState = type { ptr, ptr, ptr, i8, i8 }

@__const._ZN15test_JH_generic11runInternalERSoi.bit_counts = external hidden unnamed_addr constant [9 x i8], align 1

; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ECL_JH_WInit(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ECL_JH_RInit(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @ECL_JH_Write(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local zeroext i8 @ECL_JH_Read(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13ntest_for_ecl10ntest_noopEv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15test_JH_generic11runInternalERSoi(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %1, i32 noundef %2) unnamed_addr #4 align 2 {
  %4 = alloca [9 x i8], align 1
  %5 = alloca [5 x i8], align 1
  %6 = alloca %struct.ECL_JH_WState, align 8
  %7 = alloca %struct.ECL_JH_RState, align 8
  tail call void @_ZN13ntest_for_ecl10ntest_noopEv()
  call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %4) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(9) %4, ptr noundef nonnull align 1 dereferenceable(9) @__const._ZN15test_JH_generic11runInternalERSoi.bit_counts, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %8 = getelementptr inbounds i8, ptr %6, i64 25
  %9 = getelementptr inbounds i8, ptr %7, i64 25
  %10 = getelementptr inbounds i8, ptr %6, i64 8
  %11 = getelementptr inbounds i8, ptr %7, i64 8
  %12 = getelementptr inbounds i8, ptr %6, i64 24
  %13 = getelementptr inbounds i8, ptr %7, i64 24
  %.022.ptr.1 = getelementptr inbounds i8, ptr %4, i64 1
  %.022.ptr.2 = getelementptr inbounds i8, ptr %4, i64 2
  %.022.ptr.3 = getelementptr inbounds i8, ptr %4, i64 3
  %.022.ptr.4 = getelementptr inbounds i8, ptr %4, i64 4
  %.022.ptr.5 = getelementptr inbounds i8, ptr %4, i64 5
  %.022.ptr.6 = getelementptr inbounds i8, ptr %4, i64 6
  %.022.ptr.7 = getelementptr inbounds i8, ptr %4, i64 7
  %.022.ptr.8 = getelementptr inbounds i8, ptr %4, i64 8
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.preheader, %3
  call void @ECL_JH_WInit(ptr noundef nonnull %6, ptr noundef nonnull %5, i32 noundef 5, i32 noundef 0)
  call void @ECL_JH_RInit(ptr noundef nonnull %7, ptr noundef nonnull %5, i32 noundef 5, i32 noundef 0)
  %14 = load i8, ptr %4, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext 0, i8 noundef zeroext %14)
  %15 = load i8, ptr %.022.ptr.1, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext -1, i8 noundef zeroext %15)
  %16 = load i8, ptr %.022.ptr.2, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext 0, i8 noundef zeroext %16)
  %17 = load i8, ptr %.022.ptr.3, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext -1, i8 noundef zeroext %17)
  %18 = load i8, ptr %.022.ptr.4, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext 0, i8 noundef zeroext %18)
  %19 = load i8, ptr %.022.ptr.5, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext -1, i8 noundef zeroext %19)
  %20 = load i8, ptr %.022.ptr.6, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext 0, i8 noundef zeroext %20)
  %21 = load i8, ptr %.022.ptr.7, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext -1, i8 noundef zeroext %21)
  %22 = load i8, ptr %.022.ptr.8, align 1, !tbaa !5
  call void @ECL_JH_Write(ptr noundef nonnull %6, i8 noundef zeroext 0, i8 noundef zeroext %22)
  %23 = load i8, ptr %4, align 1, !tbaa !5
  %24 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %23)
  %25 = icmp eq i8 %24, 0
  %26 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %25)
  %27 = load i8, ptr %.022.ptr.1, align 1, !tbaa !5
  %28 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %27)
  %29 = zext nneg i8 %27 to i32
  %notmask.1 = shl nsw i32 -1, %29
  %30 = trunc i32 %notmask.1 to i8
  %31 = xor i8 %28, %30
  %32 = icmp eq i8 %31, -1
  %33 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %32)
  %34 = load i8, ptr %.022.ptr.2, align 1, !tbaa !5
  %35 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %34)
  %36 = icmp eq i8 %35, 0
  %37 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %36)
  %38 = load i8, ptr %.022.ptr.3, align 1, !tbaa !5
  %39 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %38)
  %40 = zext nneg i8 %38 to i32
  %notmask.3 = shl nsw i32 -1, %40
  %41 = trunc i32 %notmask.3 to i8
  %42 = xor i8 %39, %41
  %43 = icmp eq i8 %42, -1
  %44 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %43)
  %45 = load i8, ptr %.022.ptr.4, align 1, !tbaa !5
  %46 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %45)
  %47 = icmp eq i8 %46, 0
  %48 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %47)
  %49 = load i8, ptr %.022.ptr.5, align 1, !tbaa !5
  %50 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %49)
  %51 = zext nneg i8 %49 to i32
  %notmask.5 = shl nsw i32 -1, %51
  %52 = trunc i32 %notmask.5 to i8
  %53 = xor i8 %50, %52
  %54 = icmp eq i8 %53, -1
  %55 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %54)
  %56 = load i8, ptr %.022.ptr.6, align 1, !tbaa !5
  %57 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %56)
  %58 = icmp eq i8 %57, 0
  %59 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %58)
  %60 = load i8, ptr %.022.ptr.7, align 1, !tbaa !5
  %61 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %60)
  %62 = zext nneg i8 %60 to i32
  %notmask.7 = shl nsw i32 -1, %62
  %63 = trunc i32 %notmask.7 to i8
  %64 = xor i8 %61, %63
  %65 = icmp eq i8 %64, -1
  %66 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %65)
  %67 = load i8, ptr %.022.ptr.8, align 1, !tbaa !5
  %68 = call zeroext i8 @ECL_JH_Read(ptr noundef nonnull %7, i8 noundef zeroext %67)
  %69 = icmp eq i8 %68, 0
  %70 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %69)
  %71 = load i8, ptr %8, align 1, !tbaa !8
  %72 = icmp ne i8 %71, 0
  %73 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %72)
  %74 = load i8, ptr %9, align 1, !tbaa !11
  %75 = icmp ne i8 %74, 0
  %76 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %75)
  %77 = load ptr, ptr %6, align 8, !tbaa !13
  %78 = load ptr, ptr %7, align 8, !tbaa !14
  %79 = icmp eq ptr %77, %78
  %80 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %79)
  %81 = load ptr, ptr %10, align 8, !tbaa !15
  %82 = load ptr, ptr %11, align 8, !tbaa !16
  %83 = icmp eq ptr %81, %82
  %84 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %83)
  %85 = load i8, ptr %12, align 8, !tbaa !17
  %86 = load i8, ptr %13, align 8, !tbaa !18
  %87 = icmp eq i8 %85, %86
  %88 = call noundef zeroext i1 @_ZN13ntest_for_ecl8TestBase7approveEb(ptr noundef nonnull align 8 dereferenceable(32) %0, i1 noundef zeroext %87)
  %89 = call noundef ptr @_ZSt5beginIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9) %4) #6
  %90 = call noundef ptr @_ZSt3endIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9) %4) #6
  %91 = call noundef zeroext i1 @_ZSt16next_permutationIPhEbT_S1_(ptr noundef %89, ptr noundef %90)
  br i1 %91, label %.preheader.preheader, label %92, !llvm.loop !19

92:                                               ; preds = %.preheader.preheader
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %4) #6
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt16next_permutationIPhEbT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZSt5beginIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZSt3endIhLm9EEPT_RAT0__S0_(ptr noundef nonnull align 1 dereferenceable(9)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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 #5 = { 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 #6 = { 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++ TBAA"}
!8 = !{!9, !6, i64 25}
!9 = !{!"_ZTS13ECL_JH_WState", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 25}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!12, !6, i64 25}
!12 = !{!"_ZTS13ECL_JH_RState", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 25}
!13 = !{!9, !10, i64 0}
!14 = !{!12, !10, i64 0}
!15 = !{!9, !10, i64 8}
!16 = !{!12, !10, i64 8}
!17 = !{!9, !6, i64 24}
!18 = !{!12, !6, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass