; LLVM IR from MostafaTwfiq/C-DataStructures-And-Algorithms :: Unit Test/Tests/DataStructuresTests/DequesTest/DequeTest (DequeTest)

; 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.DequeTestStruct = type { i32, ptr }

@.str = external hidden unnamed_addr constant [147 x i8], align 1
@__const.generalDequeTest.numbersStr = external hidden unnamed_addr constant [14 x [10 x i8]], align 16

; 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

declare ptr @dequeInitialization(ptr noundef) #1

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

declare void @destroyDeque(ptr noundef) #1

declare void @dequeInsertFront(ptr noundef, ptr noundef) #1

declare void @dequeInsertRear(ptr noundef, ptr noundef) #1

declare ptr @dequeGetFront(ptr noundef) #1

declare ptr @dequeGetRear(ptr noundef) #1

declare ptr @dequePeekFront(ptr noundef) #1

declare ptr @dequePeekRear(ptr noundef) #1

declare ptr @dequeToArray(ptr noundef) #1

declare i32 @dequeGetLength(ptr noundef) #1

declare i32 @dequeIsEmpty(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @freeDequeTestStruct(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @generalDequeTest(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca [14 x [10 x i8]], align 16
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %10 = call ptr @dequeInitialization(ptr noundef @freeDequeTestStruct)
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 140, ptr %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const.generalDequeTest.numbersStr, i64 140, i1 false)
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = call i32 @dequeGetLength(ptr noundef %12)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %11, ptr noundef @.str, i32 noundef 389, ptr noundef null, i32 noundef 0, i32 noundef %13)
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call i32 @dequeIsEmpty(ptr noundef %15)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %14, ptr noundef @.str, i32 noundef 390, ptr noundef null, i32 noundef 1, i32 noundef %16)
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 6
  %19 = getelementptr inbounds [10 x i8], ptr %18, i64 0, i64 0
  %20 = call ptr @generateDequeTestStruct(i32 noundef 7, ptr noundef %19)
  call void @dequeInsertFront(ptr noundef %17, ptr noundef %20)
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 7
  %23 = getelementptr inbounds [10 x i8], ptr %22, i64 0, i64 0
  %24 = call ptr @generateDequeTestStruct(i32 noundef 8, ptr noundef %23)
  call void @dequeInsertRear(ptr noundef %21, ptr noundef %24)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 8
  %27 = getelementptr inbounds [10 x i8], ptr %26, i64 0, i64 0
  %28 = call ptr @generateDequeTestStruct(i32 noundef 9, ptr noundef %27)
  call void @dequeInsertRear(ptr noundef %25, ptr noundef %28)
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 9
  %31 = getelementptr inbounds [10 x i8], ptr %30, i64 0, i64 0
  %32 = call ptr @generateDequeTestStruct(i32 noundef 10, ptr noundef %31)
  call void @dequeInsertRear(ptr noundef %29, ptr noundef %32)
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 10
  %35 = getelementptr inbounds [10 x i8], ptr %34, i64 0, i64 0
  %36 = call ptr @generateDequeTestStruct(i32 noundef 11, ptr noundef %35)
  call void @dequeInsertRear(ptr noundef %33, ptr noundef %36)
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 11
  %39 = getelementptr inbounds [10 x i8], ptr %38, i64 0, i64 0
  %40 = call ptr @generateDequeTestStruct(i32 noundef 12, ptr noundef %39)
  call void @dequeInsertRear(ptr noundef %37, ptr noundef %40)
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 12
  %43 = getelementptr inbounds [10 x i8], ptr %42, i64 0, i64 0
  %44 = call ptr @generateDequeTestStruct(i32 noundef 13, ptr noundef %43)
  call void @dequeInsertRear(ptr noundef %41, ptr noundef %44)
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 13
  %47 = getelementptr inbounds [10 x i8], ptr %46, i64 0, i64 0
  %48 = call ptr @generateDequeTestStruct(i32 noundef 14, ptr noundef %47)
  call void @dequeInsertRear(ptr noundef %45, ptr noundef %48)
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 5
  %51 = getelementptr inbounds [10 x i8], ptr %50, i64 0, i64 0
  %52 = call ptr @generateDequeTestStruct(i32 noundef 6, ptr noundef %51)
  call void @dequeInsertFront(ptr noundef %49, ptr noundef %52)
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 4
  %55 = getelementptr inbounds [10 x i8], ptr %54, i64 0, i64 0
  %56 = call ptr @generateDequeTestStruct(i32 noundef 5, ptr noundef %55)
  call void @dequeInsertFront(ptr noundef %53, ptr noundef %56)
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 3
  %59 = getelementptr inbounds [10 x i8], ptr %58, i64 0, i64 0
  %60 = call ptr @generateDequeTestStruct(i32 noundef 4, ptr noundef %59)
  call void @dequeInsertFront(ptr noundef %57, ptr noundef %60)
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 2
  %63 = getelementptr inbounds [10 x i8], ptr %62, i64 0, i64 0
  %64 = call ptr @generateDequeTestStruct(i32 noundef 3, ptr noundef %63)
  call void @dequeInsertFront(ptr noundef %61, ptr noundef %64)
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 1
  %67 = getelementptr inbounds [10 x i8], ptr %66, i64 0, i64 0
  %68 = call ptr @generateDequeTestStruct(i32 noundef 2, ptr noundef %67)
  call void @dequeInsertFront(ptr noundef %65, ptr noundef %68)
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 0
  %71 = getelementptr inbounds [10 x i8], ptr %70, i64 0, i64 0
  %72 = call ptr @generateDequeTestStruct(i32 noundef 1, ptr noundef %71)
  call void @dequeInsertFront(ptr noundef %69, ptr noundef %72)
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = call i32 @dequeGetLength(ptr noundef %74)
  call void @CuAssertIntEquals_LineMsg(ptr noundef %73, ptr noundef @.str, i32 noundef 407, ptr noundef null, i32 noundef 14, i32 noundef %75)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call ptr @dequeToArray(ptr noundef %76)
  store ptr %77, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %107, %1
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = call i32 @dequeGetLength(ptr noundef %80)
  %82 = icmp slt i32 %79, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %110

84:                                               ; preds = %78
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds ptr, ptr %88, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.DequeTestStruct, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !11
  call void @CuAssertIntEquals_LineMsg(ptr noundef %85, ptr noundef @.str, i32 noundef 411, ptr noundef null, i32 noundef %87, i32 noundef %94)
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 %97
  %99 = getelementptr inbounds [10 x i8], ptr %98, i64 0, i64 0
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.DequeTestStruct, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  call void @CuAssertStrEquals_LineMsg(ptr noundef %95, ptr noundef @.str, i32 noundef 412, ptr noundef null, ptr noundef %99, ptr noundef %106)
  br label %107

107:                                              ; preds = %84
  %108 = load i32, ptr %6, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %6, align 4, !tbaa !9
  br label %78, !llvm.loop !14

110:                                              ; preds = %83
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = call ptr @dequePeekFront(ptr noundef %112)
  %114 = getelementptr inbounds %struct.DequeTestStruct, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 8, !tbaa !11
  call void @CuAssertIntEquals_LineMsg(ptr noundef %111, ptr noundef @.str, i32 noundef 415, ptr noundef null, i32 noundef 1, i32 noundef %115)
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = call ptr @dequePeekRear(ptr noundef %117)
  %119 = getelementptr inbounds %struct.DequeTestStruct, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 8, !tbaa !11
  call void @CuAssertIntEquals_LineMsg(ptr noundef %116, ptr noundef @.str, i32 noundef 416, ptr noundef null, i32 noundef 14, i32 noundef %120)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %126, %110
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = call i32 @dequeIsEmpty(ptr noundef %122)
  %124 = icmp ne i32 %123, 0
  %125 = xor i1 %124, true
  br i1 %125, label %126, label %165

126:                                              ; preds = %121
  %127 = load i32, ptr %7, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = call ptr @dequeGetFront(ptr noundef %129)
  store ptr %130, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = call ptr @dequeGetRear(ptr noundef %131)
  store ptr %132, ptr %9, align 8, !tbaa !5
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = load i32, ptr %7, align 4, !tbaa !9
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.DequeTestStruct, ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 8, !tbaa !11
  call void @CuAssertIntEquals_LineMsg(ptr noundef %133, ptr noundef @.str, i32 noundef 424, ptr noundef null, i32 noundef %134, i32 noundef %137)
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = load i32, ptr %7, align 4, !tbaa !9
  %140 = sub nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 %141
  %143 = getelementptr inbounds [10 x i8], ptr %142, i64 0, i64 0
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.DequeTestStruct, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !13
  call void @CuAssertStrEquals_LineMsg(ptr noundef %138, ptr noundef @.str, i32 noundef 425, ptr noundef null, ptr noundef %143, ptr noundef %146)
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = load i32, ptr %7, align 4, !tbaa !9
  %149 = sub nsw i32 15, %148
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.DequeTestStruct, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 8, !tbaa !11
  call void @CuAssertIntEquals_LineMsg(ptr noundef %147, ptr noundef @.str, i32 noundef 427, ptr noundef null, i32 noundef %149, i32 noundef %152)
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = sub nsw i32 15, %154
  %156 = sub nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [14 x [10 x i8]], ptr %4, i64 0, i64 %157
  %159 = getelementptr inbounds [10 x i8], ptr %158, i64 0, i64 0
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.DequeTestStruct, ptr %160, i32 0, i32 1
  %162 = load ptr, ptr %161, align 8, !tbaa !13
  call void @CuAssertStrEquals_LineMsg(ptr noundef %153, ptr noundef @.str, i32 noundef 428, ptr noundef null, ptr noundef %159, ptr noundef %162)
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  call void @freeDequeTestStruct(ptr noundef %163)
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  call void @freeDequeTestStruct(ptr noundef %164)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %121, !llvm.loop !16

165:                                              ; preds = %121
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %166) #5
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  call void @destroyDeque(ptr noundef %167)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 140, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

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

declare void @CuAssertStrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"DequeTestStruct", !10, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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 [147 x i8], align 1
@__const.generalDequeTest.numbersStr = external hidden unnamed_addr constant [14 x [10 x i8]], align 16

; 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

declare ptr @dequeInitialization(ptr noundef) local_unnamed_addr #1

declare void @CuAssertIntEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

declare void @destroyDeque(ptr noundef) local_unnamed_addr #1

declare void @dequeInsertFront(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @dequeInsertRear(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @dequeGetFront(ptr noundef) local_unnamed_addr #1

declare ptr @dequeGetRear(ptr noundef) local_unnamed_addr #1

declare ptr @dequePeekFront(ptr noundef) local_unnamed_addr #1

declare ptr @dequePeekRear(ptr noundef) local_unnamed_addr #1

declare ptr @dequeToArray(ptr noundef) local_unnamed_addr #1

declare i32 @dequeGetLength(ptr noundef) local_unnamed_addr #1

declare i32 @dequeIsEmpty(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @freeDequeTestStruct(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @generalDequeTest(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca [14 x [10 x i8]], align 16
  %3 = tail call ptr @dequeInitialization(ptr noundef nonnull @freeDequeTestStruct) #5
  call void @llvm.lifetime.start.p0(i64 140, ptr nonnull %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(140) %2, ptr noundef nonnull align 16 dereferenceable(140) @__const.generalDequeTest.numbersStr, i64 140, i1 false)
  %4 = tail call i32 @dequeGetLength(ptr noundef %3) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 389, ptr noundef null, i32 noundef 0, i32 noundef %4) #5
  %5 = tail call i32 @dequeIsEmpty(ptr noundef %3) #5
  tail call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 390, ptr noundef null, i32 noundef 1, i32 noundef %5) #5
  %6 = getelementptr inbounds i8, ptr %2, i64 60
  %7 = call ptr @generateDequeTestStruct(i32 noundef 7, ptr noundef nonnull %6)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %7) #5
  %8 = getelementptr inbounds i8, ptr %2, i64 70
  %9 = call ptr @generateDequeTestStruct(i32 noundef 8, ptr noundef nonnull %8)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %9) #5
  %10 = getelementptr inbounds i8, ptr %2, i64 80
  %11 = call ptr @generateDequeTestStruct(i32 noundef 9, ptr noundef nonnull %10)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %11) #5
  %12 = getelementptr inbounds i8, ptr %2, i64 90
  %13 = call ptr @generateDequeTestStruct(i32 noundef 10, ptr noundef nonnull %12)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %13) #5
  %14 = getelementptr inbounds i8, ptr %2, i64 100
  %15 = call ptr @generateDequeTestStruct(i32 noundef 11, ptr noundef nonnull %14)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %15) #5
  %16 = getelementptr inbounds i8, ptr %2, i64 110
  %17 = call ptr @generateDequeTestStruct(i32 noundef 12, ptr noundef nonnull %16)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %17) #5
  %18 = getelementptr inbounds i8, ptr %2, i64 120
  %19 = call ptr @generateDequeTestStruct(i32 noundef 13, ptr noundef nonnull %18)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %19) #5
  %20 = getelementptr inbounds i8, ptr %2, i64 130
  %21 = call ptr @generateDequeTestStruct(i32 noundef 14, ptr noundef nonnull %20)
  call void @dequeInsertRear(ptr noundef %3, ptr noundef %21) #5
  %22 = getelementptr inbounds i8, ptr %2, i64 50
  %23 = call ptr @generateDequeTestStruct(i32 noundef 6, ptr noundef nonnull %22)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %23) #5
  %24 = getelementptr inbounds i8, ptr %2, i64 40
  %25 = call ptr @generateDequeTestStruct(i32 noundef 5, ptr noundef nonnull %24)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %25) #5
  %26 = getelementptr inbounds i8, ptr %2, i64 30
  %27 = call ptr @generateDequeTestStruct(i32 noundef 4, ptr noundef nonnull %26)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %27) #5
  %28 = getelementptr inbounds i8, ptr %2, i64 20
  %29 = call ptr @generateDequeTestStruct(i32 noundef 3, ptr noundef nonnull %28)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %29) #5
  %30 = getelementptr inbounds i8, ptr %2, i64 10
  %31 = call ptr @generateDequeTestStruct(i32 noundef 2, ptr noundef nonnull %30)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %31) #5
  %32 = call ptr @generateDequeTestStruct(i32 noundef 1, ptr noundef nonnull %2)
  call void @dequeInsertFront(ptr noundef %3, ptr noundef %32) #5
  %33 = call i32 @dequeGetLength(ptr noundef %3) #5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 407, ptr noundef null, i32 noundef 14, i32 noundef %33) #5
  %34 = call ptr @dequeToArray(ptr noundef %3) #5
  %35 = call i32 @dequeGetLength(ptr noundef %3) #5
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  %37 = call ptr @dequePeekFront(ptr noundef %3) #5
  %38 = load i32, ptr %37, align 8, !tbaa !5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 415, ptr noundef null, i32 noundef 1, i32 noundef %38) #5
  %39 = call ptr @dequePeekRear(ptr noundef %3) #5
  %40 = load i32, ptr %39, align 8, !tbaa !5
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 416, ptr noundef null, i32 noundef 14, i32 noundef %40) #5
  %41 = call i32 @dequeIsEmpty(ptr noundef %3) #5
  %.not57 = icmp eq i32 %41, 0
  br i1 %.not57, label %.lr.ph60, label %._crit_edge61

.lr.ph:                                           ; preds = %1, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %1 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = load i32, ptr %43, align 8, !tbaa !5
  %45 = trunc nuw nsw i64 %indvars.iv.next to i32
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 411, ptr noundef null, i32 noundef %45, i32 noundef %44) #5
  %46 = getelementptr inbounds [14 x [10 x i8]], ptr %2, i64 0, i64 %indvars.iv
  %47 = load ptr, ptr %42, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = load ptr, ptr %48, align 8, !tbaa !12
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 412, ptr noundef null, ptr noundef nonnull %46, ptr noundef %49) #5
  %50 = call i32 @dequeGetLength(ptr noundef %3) #5
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next, %51
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.lr.ph60:                                         ; preds = %._crit_edge, %.lr.ph60
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph60 ], [ 0, %._crit_edge ]
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %53 = call ptr @dequeGetFront(ptr noundef %3) #5
  %54 = call ptr @dequeGetRear(ptr noundef %3) #5
  %55 = load i32, ptr %53, align 8, !tbaa !5
  %56 = trunc nsw i64 %indvars.iv.next64 to i32
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 424, ptr noundef null, i32 noundef %56, i32 noundef %55) #5
  %57 = getelementptr inbounds [14 x [10 x i8]], ptr %2, i64 0, i64 %indvars.iv63
  %58 = getelementptr inbounds i8, ptr %53, i64 8
  %59 = load ptr, ptr %58, align 8, !tbaa !12
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 425, ptr noundef null, ptr noundef nonnull %57, ptr noundef %59) #5
  %60 = load i32, ptr %54, align 8, !tbaa !5
  %61 = trunc i64 %indvars.iv63 to i32
  %62 = sub i32 14, %61
  call void @CuAssertIntEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 427, ptr noundef null, i32 noundef %62, i32 noundef %60) #5
  %63 = sub nsw i64 13, %indvars.iv63
  %64 = getelementptr inbounds [14 x [10 x i8]], ptr %2, i64 0, i64 %63
  %65 = getelementptr inbounds i8, ptr %54, i64 8
  %66 = load ptr, ptr %65, align 8, !tbaa !12
  call void @CuAssertStrEquals_LineMsg(ptr noundef %0, ptr noundef nonnull @.str, i32 noundef 428, ptr noundef null, ptr noundef nonnull %64, ptr noundef %66) #5
  call void @freeDequeTestStruct(ptr noundef nonnull %53)
  call void @freeDequeTestStruct(ptr noundef nonnull %54)
  %67 = call i32 @dequeIsEmpty(ptr noundef %3) #5
  %.not = icmp eq i32 %67, 0
  br i1 %.not, label %.lr.ph60, label %._crit_edge61, !llvm.loop !15

._crit_edge61:                                    ; preds = %.lr.ph60, %._crit_edge
  call void @free(ptr noundef %34) #5
  call void @destroyDeque(ptr noundef %3) #5
  call void @llvm.lifetime.end.p0(i64 140, ptr nonnull %2) #5
  ret void
}

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

declare void @CuAssertStrEquals_LineMsg(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 0}
!6 = !{!"DequeTestStruct", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !10, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass