; LLVM IR from DanEngelbrecht/longtail :: test/test.ll/ZN46Longtail_TestFileScanCancelOperation (TestCase8TestBodyEv)

; 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.jc_test_fixture = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.jc_test_stats, i32, i32, i32, i32 }
%struct.jc_test_stats = type { i32, i32, i32, i32, i64 }
%struct.Longtail_CancelAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr }
%struct.Longtail_API = type { ptr }
%struct.Longtail_StorageAPI = type { %struct.Longtail_API, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.628 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.629 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.630 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.631 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.632 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.634 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.635 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.636 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.639 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.640 = external hidden unnamed_addr constant [100 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: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL19jc_test_get_fixturev() #1

declare void @_Z28jc_test_increment_assertionsv() #2

declare void @_Z21jc_test_set_test_faili(i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef, ptr noundef) #3 align 2

declare void @Longtail_DisposeAPI(ptr noundef) #2

declare ptr @Longtail_CreateFSStorageAPI() #2

declare i32 @Longtail_GetFilesRecursively2(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN21jc_test_cmp_eq_helperILb0EE7compareIiiEEiRKT_RKT0_PKcS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef) #3 align 2

declare ptr @Longtail_CreateAtomicCancelAPI() #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z14jc_test_cmp_NEIP18Longtail_CancelAPIS1_EiT_T0_PKcS5_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z14jc_test_cmp_NEIP30Longtail_CancelAPI_CancelTokenS1_EiT_T0_PKcS5_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN46Longtail_TestFileScanCancelOperation__TestCase8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(8) %0) unnamed_addr #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %17 = call ptr @Longtail_CreateFSStorageAPI()
  store ptr %17, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %18 = call ptr @Longtail_CreateAtomicCancelAPI()
  store ptr %18, ptr %4, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %1
  %20 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %21 = getelementptr inbounds %struct.jc_test_fixture, ptr %20, i32 0, i32 11
  %22 = load i32, ptr %21, align 8
  %23 = and i32 %22, -16776961
  %24 = or i32 %23, 1206784
  store i32 %24, ptr %21, align 8
  %25 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %26 = getelementptr inbounds %struct.jc_test_fixture, ptr %25, i32 0, i32 4
  store ptr @.str.3, ptr %26, align 8, !tbaa !9
  call void @_Z28jc_test_increment_assertionsv()
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef i32 @_Z14jc_test_cmp_NEIP18Longtail_CancelAPIS1_EiT_T0_PKcS5_(ptr noundef null, ptr noundef %27, ptr noundef @.str.628, ptr noundef @.str.629)
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %19
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  store i32 1, ptr %5, align 4
  br label %140

31:                                               ; preds = %19
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  br label %34

34:                                               ; preds = %33
  %35 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %36 = getelementptr inbounds %struct.jc_test_fixture, ptr %35, i32 0, i32 11
  %37 = load i32, ptr %36, align 8
  %38 = and i32 %37, -16776961
  %39 = or i32 %38, 1207296
  store i32 %39, ptr %36, align 8
  %40 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %41 = getelementptr inbounds %struct.jc_test_fixture, ptr %40, i32 0, i32 4
  store ptr @.str.3, ptr %41, align 8, !tbaa !9
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.Longtail_CancelAPI, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = call noundef i32 %44(ptr noundef %45, ptr noundef %6)
  store i32 %46, ptr %8, align 4, !tbaa !14
  %47 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef @.str.46, ptr noundef @.str.630, ptr noundef null)
  %48 = icmp eq i32 %47, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br i1 %48, label %49, label %50

49:                                               ; preds = %34
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  store i32 1, ptr %5, align 4
  br label %139

50:                                               ; preds = %34
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52
  %54 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %55 = getelementptr inbounds %struct.jc_test_fixture, ptr %54, i32 0, i32 11
  %56 = load i32, ptr %55, align 8
  %57 = and i32 %56, -16776961
  %58 = or i32 %57, 1207552
  store i32 %58, ptr %55, align 8
  %59 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %60 = getelementptr inbounds %struct.jc_test_fixture, ptr %59, i32 0, i32 4
  store ptr @.str.3, ptr %60, align 8, !tbaa !9
  call void @_Z28jc_test_increment_assertionsv()
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = call noundef i32 @_Z14jc_test_cmp_NEIP30Longtail_CancelAPI_CancelTokenS1_EiT_T0_PKcS5_(ptr noundef null, ptr noundef %61, ptr noundef @.str.631, ptr noundef @.str.632)
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %53
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  store i32 1, ptr %5, align 4
  br label %139

65:                                               ; preds = %53
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  br label %68

68:                                               ; preds = %67
  %69 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %70 = getelementptr inbounds %struct.jc_test_fixture, ptr %69, i32 0, i32 11
  %71 = load i32, ptr %70, align 8
  %72 = and i32 %71, -16776961
  %73 = or i32 %72, 1208320
  store i32 %73, ptr %70, align 8
  %74 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %75 = getelementptr inbounds %struct.jc_test_fixture, ptr %74, i32 0, i32 4
  store ptr @.str.3, ptr %75, align 8, !tbaa !9
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.Longtail_CancelAPI, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !18
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = call noundef i32 %78(ptr noundef %79, ptr noundef %80)
  store i32 %81, ptr %11, align 4, !tbaa !14
  %82 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef @.str.46, ptr noundef @.str.634, ptr noundef null)
  %83 = icmp eq i32 %82, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br i1 %83, label %84, label %85

84:                                               ; preds = %68
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  store i32 1, ptr %5, align 4
  br label %138

85:                                               ; preds = %68
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  %89 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %90 = getelementptr inbounds %struct.jc_test_fixture, ptr %89, i32 0, i32 11
  %91 = load i32, ptr %90, align 8
  %92 = and i32 %91, -16776961
  %93 = or i32 %92, 1208576
  store i32 %93, ptr %90, align 8
  %94 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %95 = getelementptr inbounds %struct.jc_test_fixture, ptr %94, i32 0, i32 4
  store ptr @.str.3, ptr %95, align 8, !tbaa !9
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 125, ptr %12, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = call i32 @Longtail_GetFilesRecursively2(ptr noundef %96, ptr noundef null, ptr noundef null, ptr noundef %97, ptr noundef %98, ptr noundef @.str.639, ptr noundef %9)
  store i32 %99, ptr %13, align 4, !tbaa !14
  %100 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb0EE7compareIiiEEiRKT_RKT0_PKcS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef @.str.635, ptr noundef @.str.640)
  %101 = icmp eq i32 %100, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br i1 %101, label %102, label %103

102:                                              ; preds = %88
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  store i32 1, ptr %5, align 4
  br label %138

103:                                              ; preds = %88
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %108 = getelementptr inbounds %struct.jc_test_fixture, ptr %107, i32 0, i32 11
  %109 = load i32, ptr %108, align 8
  %110 = and i32 %109, -16776961
  %111 = or i32 %110, 1208832
  store i32 %111, ptr %108, align 8
  %112 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %113 = getelementptr inbounds %struct.jc_test_fixture, ptr %112, i32 0, i32 4
  store ptr @.str.3, ptr %113, align 8, !tbaa !9
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.Longtail_CancelAPI, ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !19
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = call noundef i32 %116(ptr noundef %117, ptr noundef %118)
  store i32 %119, ptr %15, align 4, !tbaa !14
  %120 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef @.str.46, ptr noundef @.str.636, ptr noundef null)
  %121 = icmp eq i32 %120, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br i1 %121, label %122, label %123

122:                                              ; preds = %106
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  store i32 1, ptr %5, align 4
  br label %138

123:                                              ; preds = %106
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %131

128:                                              ; preds = %125
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.Longtail_CancelAPI, ptr %129, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %130)
  br label %131

131:                                              ; preds = %128, %125
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %134, label %137

134:                                              ; preds = %131
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.Longtail_StorageAPI, ptr %135, i32 0, i32 0
  call void @Longtail_DisposeAPI(ptr noundef %136)
  br label %137

137:                                              ; preds = %134, %131
  store i32 0, ptr %5, align 4
  br label %138

138:                                              ; preds = %137, %122, %102, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %139

139:                                              ; preds = %138, %64, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %140

140:                                              ; preds = %139, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  %141 = load i32, ptr %5, align 4
  switch i32 %141, label %143 [
    i32 0, label %142
    i32 1, label %142
  ]

142:                                              ; preds = %140, %140
  ret void

143:                                              ; preds = %140
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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, !6, i64 32}
!10 = !{!"_ZTS15jc_test_fixture", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !12, i64 88, !12, i64 91, !12, i64 91, !12, i64 91, !12, i64 91, !12, i64 92, !12, i64 96, !12, i64 97, !12, i64 99, !12, i64 100}
!11 = !{!"_ZTS13jc_test_stats", !12, i64 0, !12, i64 4, !12, i64 6, !12, i64 8, !12, i64 12, !13, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTS18Longtail_CancelAPI", !17, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!17 = !{!"_ZTS12Longtail_API", !6, i64 0}
!18 = !{!16, !6, i64 16}
!19 = !{!16, !6, i64 32}


; 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.3 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.628 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.629 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.630 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.631 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.632 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.634 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.635 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.636 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.639 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.640 = external hidden unnamed_addr constant [100 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: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL19jc_test_get_fixturev() local_unnamed_addr #1

declare void @_Z28jc_test_increment_assertionsv() local_unnamed_addr #2

declare void @_Z21jc_test_set_test_faili(i32 noundef) local_unnamed_addr #2

; 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 uwtable
declare dso_local noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

declare void @Longtail_DisposeAPI(ptr noundef) local_unnamed_addr #2

declare ptr @Longtail_CreateFSStorageAPI() local_unnamed_addr #2

declare i32 @Longtail_GetFilesRecursively2(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN21jc_test_cmp_eq_helperILb0EE7compareIiiEEiRKT_RKT0_PKcS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

declare ptr @Longtail_CreateAtomicCancelAPI() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z14jc_test_cmp_NEIP18Longtail_CancelAPIS1_EiT_T0_PKcS5_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z14jc_test_cmp_NEIP30Longtail_CancelAPI_CancelTokenS1_EiT_T0_PKcS5_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN46Longtail_TestFileScanCancelOperation__TestCase8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %0) unnamed_addr #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = tail call ptr @Longtail_CreateFSStorageAPI()
  %13 = tail call ptr @Longtail_CreateAtomicCancelAPI()
  %14 = tail call noundef ptr @_ZL19jc_test_get_fixturev()
  %15 = getelementptr inbounds i8, ptr %14, i64 96
  %16 = load i32, ptr %15, align 8
  %17 = and i32 %16, -16776961
  %18 = or disjoint i32 %17, 1206784
  store i32 %18, ptr %15, align 8
  %19 = tail call noundef ptr @_ZL19jc_test_get_fixturev()
  %20 = getelementptr inbounds i8, ptr %19, i64 32
  store ptr @.str.3, ptr %20, align 8, !tbaa !5
  tail call void @_Z28jc_test_increment_assertionsv()
  %21 = tail call noundef i32 @_Z14jc_test_cmp_NEIP18Longtail_CancelAPIS1_EiT_T0_PKcS5_(ptr noundef null, ptr noundef %13, ptr noundef nonnull @.str.628, ptr noundef nonnull @.str.629)
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %1
  tail call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  br label %97

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %25 = tail call noundef ptr @_ZL19jc_test_get_fixturev()
  %26 = getelementptr inbounds i8, ptr %25, i64 96
  %27 = load i32, ptr %26, align 8
  %28 = and i32 %27, -16776961
  %29 = or disjoint i32 %28, 1207296
  store i32 %29, ptr %26, align 8
  %30 = tail call noundef ptr @_ZL19jc_test_get_fixturev()
  %31 = getelementptr inbounds i8, ptr %30, i64 32
  store ptr @.str.3, ptr %31, align 8, !tbaa !5
  tail call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 0, ptr %3, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %32 = getelementptr inbounds i8, ptr %13, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = call noundef i32 %33(ptr noundef %13, ptr noundef nonnull %2)
  store i32 %34, ptr %4, align 4, !tbaa !13
  %35 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.630, ptr noundef null)
  %36 = icmp eq i32 %35, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br i1 %36, label %37, label %38

37:                                               ; preds = %24
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  br label %96

38:                                               ; preds = %24
  %39 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %40 = getelementptr inbounds i8, ptr %39, i64 96
  %41 = load i32, ptr %40, align 8
  %42 = and i32 %41, -16776961
  %43 = or disjoint i32 %42, 1207552
  store i32 %43, ptr %40, align 8
  %44 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %45 = getelementptr inbounds i8, ptr %44, i64 32
  store ptr @.str.3, ptr %45, align 8, !tbaa !5
  call void @_Z28jc_test_increment_assertionsv()
  %46 = load ptr, ptr %2, align 8, !tbaa !17
  %47 = call noundef i32 @_Z14jc_test_cmp_NEIP30Longtail_CancelAPI_CancelTokenS1_EiT_T0_PKcS5_(ptr noundef null, ptr noundef %46, ptr noundef nonnull @.str.631, ptr noundef nonnull @.str.632)
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %38
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  br label %96

50:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %51 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %52 = getelementptr inbounds i8, ptr %51, i64 96
  %53 = load i32, ptr %52, align 8
  %54 = and i32 %53, -16776961
  %55 = or disjoint i32 %54, 1208320
  store i32 %55, ptr %52, align 8
  %56 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %57 = getelementptr inbounds i8, ptr %56, i64 32
  store ptr @.str.3, ptr %57, align 8, !tbaa !5
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %58 = getelementptr inbounds i8, ptr %13, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = load ptr, ptr %2, align 8, !tbaa !17
  %61 = call noundef i32 %59(ptr noundef nonnull %13, ptr noundef %60)
  store i32 %61, ptr %7, align 4, !tbaa !13
  %62 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.634, ptr noundef null)
  %63 = icmp eq i32 %62, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br i1 %63, label %64, label %65

64:                                               ; preds = %50
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  br label %95

65:                                               ; preds = %50
  %66 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %67 = getelementptr inbounds i8, ptr %66, i64 96
  %68 = load i32, ptr %67, align 8
  %69 = and i32 %68, -16776961
  %70 = or disjoint i32 %69, 1208576
  store i32 %70, ptr %67, align 8
  %71 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %72 = getelementptr inbounds i8, ptr %71, i64 32
  store ptr @.str.3, ptr %72, align 8, !tbaa !5
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 125, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %73 = load ptr, ptr %2, align 8, !tbaa !17
  %74 = call i32 @Longtail_GetFilesRecursively2(ptr noundef %12, ptr noundef null, ptr noundef null, ptr noundef nonnull %13, ptr noundef %73, ptr noundef nonnull @.str.639, ptr noundef nonnull %5)
  store i32 %74, ptr %9, align 4, !tbaa !13
  %75 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb0EE7compareIiiEEiRKT_RKT0_PKcS9_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull @.str.635, ptr noundef nonnull @.str.640)
  %76 = icmp eq i32 %75, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br i1 %76, label %77, label %78

77:                                               ; preds = %65
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  br label %95

78:                                               ; preds = %65
  %79 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %80 = getelementptr inbounds i8, ptr %79, i64 96
  %81 = load i32, ptr %80, align 8
  %82 = and i32 %81, -16776961
  %83 = or disjoint i32 %82, 1208832
  store i32 %83, ptr %80, align 8
  %84 = call noundef ptr @_ZL19jc_test_get_fixturev()
  %85 = getelementptr inbounds i8, ptr %84, i64 32
  store ptr @.str.3, ptr %85, align 8, !tbaa !5
  call void @_Z28jc_test_increment_assertionsv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 0, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  %86 = getelementptr inbounds i8, ptr %13, i64 32
  %87 = load ptr, ptr %86, align 8, !tbaa !19
  %88 = load ptr, ptr %2, align 8, !tbaa !17
  %89 = call noundef i32 %87(ptr noundef nonnull %13, ptr noundef %88)
  store i32 %89, ptr %11, align 4, !tbaa !13
  %90 = call noundef i32 @_ZN21jc_test_cmp_eq_helperILb1EE7compareIiiEEiRKT_RKT0_PKcS9_PN23jc_test_enable_argumentIXntsr18jc_test_is_pointerIS5_EE5valueEE4typeE(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull @.str.46, ptr noundef nonnull @.str.636, ptr noundef null)
  %91 = icmp eq i32 %90, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  br i1 %91, label %92, label %93

92:                                               ; preds = %78
  call void @_Z21jc_test_set_test_faili(i32 noundef 1)
  br label %95

93:                                               ; preds = %78
  call void @Longtail_DisposeAPI(ptr noundef nonnull %13)
  %.not15 = icmp eq ptr %12, null
  br i1 %.not15, label %95, label %94

94:                                               ; preds = %93
  call void @Longtail_DisposeAPI(ptr noundef nonnull %12)
  br label %95

95:                                               ; preds = %93, %94, %92, %77, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %96

96:                                               ; preds = %95, %49, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %97

97:                                               ; preds = %96, %23
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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, !7, i64 32}
!6 = !{!"_ZTS15jc_test_fixture", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !11, i64 88, !11, i64 91, !11, i64 91, !11, i64 91, !11, i64 91, !11, i64 92, !11, i64 96, !11, i64 97, !11, i64 99, !11, i64 100}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS13jc_test_stats", !11, i64 0, !11, i64 4, !11, i64 6, !11, i64 8, !11, i64 12, !12, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !7, i64 8}
!15 = !{!"_ZTS18Longtail_CancelAPI", !16, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!16 = !{!"_ZTS12Longtail_API", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!15, !7, i64 16}
!19 = !{!15, !7, i64 32}


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