; LLVM IR from fwip/fastqz :: libzpaq.ll (ZN7libzpaq13PostProcessor5writeEi)

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

%"class.libzpaq::PostProcessor" = type { i32, i32, i32, i32, %"class.libzpaq::ZPAQL" }
%"class.libzpaq::ZPAQL" = type { ptr, ptr, %"class.libzpaq::Array.0", i32, i32, i32, [4 x i8], %"class.libzpaq::Array.0", %"class.libzpaq::Array", %"class.libzpaq::Array", %"class.libzpaq::Array.4", i32, i32, i32, i32, i32, i32, i32, i32, ptr }
%"class.libzpaq::Array.0" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array" = type <{ ptr, i64, i32, [4 x i8] }>
%"class.libzpaq::Array.4" = type <{ ptr, i64, i32, [4 x i8] }>

@.str.28 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [29 x i8], align 1

declare void @_ZN7libzpaq5errorEPKc(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ArrayIhE6resizeEmi(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL5clearEv(ptr noundef nonnull align 8 dereferenceable(192)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL5initpEv(ptr noundef nonnull align 8 dereferenceable(192)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL5flushEv(ptr noundef nonnull align 8 dereferenceable(192)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL4outcEi(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL3runEj(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7libzpaq13PostProcessor5writeEi(ptr noundef nonnull align 8 dereferenceable(208) %0, i32 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %5 = load ptr, ptr %3, align 8
  %6 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  %7 = load i32, ptr %6, align 8, !tbaa !11
  switch i32 %7, label %141 [
    i32 0, label %8
    i32 1, label %27
    i32 2, label %30
    i32 3, label %38
    i32 4, label %77
    i32 5, label %133
  ]

8:                                                ; preds = %2
  %9 = load i32, ptr %4, align 4, !tbaa !9
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %11, label %12

11:                                               ; preds = %8
  call void @_ZN7libzpaq5errorEPKc(ptr noundef @.str.28)
  br label %12

12:                                               ; preds = %11, %8
  %13 = load i32, ptr %4, align 4, !tbaa !9
  %14 = add nsw i32 %13, 1
  %15 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  store i32 %14, ptr %15, align 8, !tbaa !11
  %16 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  %17 = load i32, ptr %16, align 8, !tbaa !11
  %18 = icmp sgt i32 %17, 2
  br i1 %18, label %19, label %20

19:                                               ; preds = %12
  call void @_ZN7libzpaq5errorEPKc(ptr noundef @.str.29)
  br label %20

20:                                               ; preds = %19, %12
  %21 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %23 = icmp eq i32 %22, 1
  br i1 %23, label %24, label %26

24:                                               ; preds = %20
  %25 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  call void @_ZN7libzpaq5ZPAQL5clearEv(ptr noundef nonnull align 8 dereferenceable(192) %25)
  br label %26

26:                                               ; preds = %24, %20
  br label %141

27:                                               ; preds = %2
  %28 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %29 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7libzpaq5ZPAQL4outcEi(ptr noundef nonnull align 8 dereferenceable(192) %28, i32 noundef %29)
  br label %141

30:                                               ; preds = %2
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  call void @_ZN7libzpaq5errorEPKc(ptr noundef @.str.28)
  br label %34

34:                                               ; preds = %33, %30
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  store i32 %35, ptr %36, align 4, !tbaa !18
  %37 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  store i32 3, ptr %37, align 8, !tbaa !11
  br label %141

38:                                               ; preds = %2
  %39 = load i32, ptr %4, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  call void @_ZN7libzpaq5errorEPKc(ptr noundef @.str.28)
  br label %42

42:                                               ; preds = %41, %38
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = mul nsw i32 %43, 256
  %45 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !18
  %47 = add nsw i32 %46, %44
  store i32 %47, ptr %45, align 4, !tbaa !18
  %48 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %49 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !18
  %52 = add nsw i32 %51, 300
  %53 = sext i32 %52 to i64
  call void @_ZN7libzpaq5ArrayIhE6resizeEmi(ptr noundef nonnull align 8 dereferenceable(20) %49, i64 noundef %53, i32 noundef 0)
  %54 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %55 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %54, i32 0, i32 3
  store i32 8, ptr %55, align 8, !tbaa !19
  %56 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %57 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %56, i32 0, i32 3
  %58 = load i32, ptr %57, align 8, !tbaa !19
  %59 = add nsw i32 %58, 128
  %60 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %61 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %60, i32 0, i32 5
  store i32 %59, ptr %61, align 8, !tbaa !20
  %62 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %63 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %62, i32 0, i32 4
  store i32 %59, ptr %63, align 4, !tbaa !21
  %64 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 2
  %65 = load i32, ptr %64, align 8, !tbaa !22
  %66 = trunc i32 %65 to i8
  %67 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %68 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %67, i32 0, i32 2
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %68, i64 noundef 4)
  store i8 %66, ptr %69, align 1, !tbaa !23
  %70 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 3
  %71 = load i32, ptr %70, align 4, !tbaa !24
  %72 = trunc i32 %71 to i8
  %73 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %74 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %73, i32 0, i32 2
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %74, i64 noundef 5)
  store i8 %72, ptr %75, align 1, !tbaa !23
  %76 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  store i32 4, ptr %76, align 8, !tbaa !11
  br label %141

77:                                               ; preds = %2
  %78 = load i32, ptr %4, align 4, !tbaa !9
  %79 = icmp slt i32 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %77
  call void @_ZN7libzpaq5errorEPKc(ptr noundef @.str.28)
  br label %81

81:                                               ; preds = %80, %77
  %82 = load i32, ptr %4, align 4, !tbaa !9
  %83 = trunc i32 %82 to i8
  %84 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %85 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %84, i32 0, i32 2
  %86 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %87 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %86, i32 0, i32 5
  %88 = load i32, ptr %87, align 8, !tbaa !20
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %87, align 8, !tbaa !20
  %90 = sext i32 %88 to i64
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %85, i64 noundef %90)
  store i8 %83, ptr %91, align 1, !tbaa !23
  %92 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %93 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %92, i32 0, i32 5
  %94 = load i32, ptr %93, align 8, !tbaa !20
  %95 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %96 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %95, i32 0, i32 4
  %97 = load i32, ptr %96, align 4, !tbaa !21
  %98 = sub nsw i32 %94, %97
  %99 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !18
  %101 = icmp eq i32 %98, %100
  br i1 %101, label %102, label %132

102:                                              ; preds = %81
  %103 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %104 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %103, i32 0, i32 3
  %105 = load i32, ptr %104, align 8, !tbaa !19
  %106 = sub nsw i32 %105, 2
  %107 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %108 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %107, i32 0, i32 5
  %109 = load i32, ptr %108, align 8, !tbaa !20
  %110 = add nsw i32 %106, %109
  %111 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %112 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %111, i32 0, i32 4
  %113 = load i32, ptr %112, align 4, !tbaa !21
  %114 = sub nsw i32 %110, %113
  %115 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  store i32 %114, ptr %115, align 4, !tbaa !18
  %116 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !18
  %118 = and i32 %117, 255
  %119 = trunc i32 %118 to i8
  %120 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %121 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %120, i32 0, i32 2
  %122 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %121, i64 noundef 0)
  store i8 %119, ptr %122, align 1, !tbaa !23
  %123 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !18
  %125 = ashr i32 %124, 8
  %126 = trunc i32 %125 to i8
  %127 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %128 = getelementptr inbounds %"class.libzpaq::ZPAQL", ptr %127, i32 0, i32 2
  %129 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %128, i64 noundef 1)
  store i8 %126, ptr %129, align 1, !tbaa !23
  %130 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  call void @_ZN7libzpaq5ZPAQL5initpEv(ptr noundef nonnull align 8 dereferenceable(192) %130)
  %131 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  store i32 5, ptr %131, align 8, !tbaa !11
  br label %132

132:                                              ; preds = %102, %81
  br label %141

133:                                              ; preds = %2
  %134 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  %135 = load i32, ptr %4, align 4, !tbaa !9
  call void @_ZN7libzpaq5ZPAQL3runEj(ptr noundef nonnull align 8 dereferenceable(192) %134, i32 noundef %135)
  %136 = load i32, ptr %4, align 4, !tbaa !9
  %137 = icmp slt i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %133
  %139 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 4
  call void @_ZN7libzpaq5ZPAQL5flushEv(ptr noundef nonnull align 8 dereferenceable(192) %139)
  br label %140

140:                                              ; preds = %138, %133
  br label %141

141:                                              ; preds = %140, %132, %42, %34, %27, %26, %2
  %142 = getelementptr inbounds %"class.libzpaq::PostProcessor", ptr %5, i32 0, i32 0
  %143 = load i32, ptr %142, align 8, !tbaa !11
  ret i32 %143
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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" }

!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 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN7libzpaq13PostProcessorE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16}
!13 = !{!"_ZTSN7libzpaq5ZPAQLE", !6, i64 0, !6, i64 8, !14, i64 16, !10, i64 40, !10, i64 44, !10, i64 48, !14, i64 56, !16, i64 80, !16, i64 104, !17, i64 128, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !6, i64 184}
!14 = !{!"_ZTSN7libzpaq5ArrayIhEE", !6, i64 0, !15, i64 8, !10, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN7libzpaq5ArrayIjEE", !6, i64 0, !15, i64 8, !10, i64 16}
!17 = !{!"_ZTSN7libzpaq5ArrayIcEE", !6, i64 0, !15, i64 8, !10, i64 16}
!18 = !{!12, !10, i64 4}
!19 = !{!12, !10, i64 56}
!20 = !{!12, !10, i64 64}
!21 = !{!12, !10, i64 60}
!22 = !{!12, !10, i64 8}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !10, i64 12}


; 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.28 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [29 x i8], align 1

declare void @_ZN7libzpaq5errorEPKc(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ArrayIhE6resizeEmi(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL5clearEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL5initpEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL5flushEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL4outcEi(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7libzpaq5ZPAQL3runEj(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7libzpaq13PostProcessor5writeEi(ptr noundef nonnull align 8 dereferenceable(208) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  switch i32 %3, label %80 [
    i32 0, label %4
    i32 1, label %16
    i32 2, label %18
    i32 3, label %23
    i32 4, label %45
    i32 5, label %76
  ]

4:                                                ; preds = %2
  %5 = icmp slt i32 %1, 0
  br i1 %5, label %.thread11, label %7

.thread11:                                        ; preds = %4
  tail call void @_ZN7libzpaq5errorEPKc(ptr noundef nonnull @.str.28)
  %6 = add nsw i32 %1, 1
  store i32 %6, ptr %0, align 8, !tbaa !5
  br label %80

7:                                                ; preds = %4
  %8 = add nuw nsw i32 %1, 1
  store i32 %8, ptr %0, align 8, !tbaa !5
  %9 = icmp ugt i32 %1, 1
  br i1 %9, label %10, label %11

10:                                               ; preds = %7
  tail call void @_ZN7libzpaq5errorEPKc(ptr noundef nonnull @.str.29)
  %.pr = load i32, ptr %0, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %10, %7
  %12 = phi i32 [ %.pr, %10 ], [ %8, %7 ]
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %14, label %80

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN7libzpaq5ZPAQL5clearEv(ptr noundef nonnull align 8 dereferenceable(192) %15)
  br label %80

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN7libzpaq5ZPAQL4outcEi(ptr noundef nonnull align 8 dereferenceable(192) %17, i32 noundef %1)
  br label %80

18:                                               ; preds = %2
  %19 = icmp slt i32 %1, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %18
  tail call void @_ZN7libzpaq5errorEPKc(ptr noundef nonnull @.str.28)
  br label %21

21:                                               ; preds = %20, %18
  %22 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %1, ptr %22, align 4, !tbaa !16
  store i32 3, ptr %0, align 8, !tbaa !5
  br label %80

23:                                               ; preds = %2
  %24 = icmp slt i32 %1, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %23
  tail call void @_ZN7libzpaq5errorEPKc(ptr noundef nonnull @.str.28)
  br label %26

26:                                               ; preds = %25, %23
  %27 = shl nsw i32 %1, 8
  %28 = getelementptr inbounds i8, ptr %0, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !16
  %30 = add nsw i32 %29, %27
  store i32 %30, ptr %28, align 4, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %0, i64 32
  %32 = add nsw i32 %30, 300
  %33 = sext i32 %32 to i64
  tail call void @_ZN7libzpaq5ArrayIhE6resizeEmi(ptr noundef nonnull align 8 dereferenceable(20) %31, i64 noundef %33, i32 noundef 0)
  %34 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 8, ptr %34, align 8, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 136, ptr %35, align 8, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 136, ptr %36, align 4, !tbaa !19
  %37 = getelementptr inbounds i8, ptr %0, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !20
  %39 = trunc i32 %38 to i8
  %40 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %31, i64 noundef 4)
  store i8 %39, ptr %40, align 1, !tbaa !21
  %41 = getelementptr inbounds i8, ptr %0, i64 12
  %42 = load i32, ptr %41, align 4, !tbaa !22
  %43 = trunc i32 %42 to i8
  %44 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %31, i64 noundef 5)
  store i8 %43, ptr %44, align 1, !tbaa !21
  store i32 4, ptr %0, align 8, !tbaa !5
  br label %80

45:                                               ; preds = %2
  %46 = icmp slt i32 %1, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %45
  tail call void @_ZN7libzpaq5errorEPKc(ptr noundef nonnull @.str.28)
  br label %48

48:                                               ; preds = %47, %45
  %49 = trunc i32 %1 to i8
  %50 = getelementptr inbounds i8, ptr %0, i64 32
  %51 = getelementptr inbounds i8, ptr %0, i64 64
  %52 = load i32, ptr %51, align 8, !tbaa !18
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 8, !tbaa !18
  %54 = sext i32 %52 to i64
  %55 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %50, i64 noundef %54)
  store i8 %49, ptr %55, align 1, !tbaa !21
  %56 = load i32, ptr %51, align 8, !tbaa !18
  %57 = getelementptr inbounds i8, ptr %0, i64 60
  %58 = load i32, ptr %57, align 4, !tbaa !19
  %59 = sub nsw i32 %56, %58
  %60 = getelementptr inbounds i8, ptr %0, i64 4
  %61 = load i32, ptr %60, align 4, !tbaa !16
  %62 = icmp eq i32 %59, %61
  br i1 %62, label %63, label %80

63:                                               ; preds = %48
  %64 = getelementptr inbounds i8, ptr %0, i64 16
  %65 = getelementptr inbounds i8, ptr %0, i64 56
  %66 = load i32, ptr %65, align 8, !tbaa !17
  %67 = add i32 %56, -2
  %68 = sub i32 %67, %58
  %69 = add i32 %68, %66
  store i32 %69, ptr %60, align 4, !tbaa !16
  %70 = trunc i32 %69 to i8
  %71 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %50, i64 noundef 0)
  store i8 %70, ptr %71, align 1, !tbaa !21
  %72 = load i32, ptr %60, align 4, !tbaa !16
  %73 = lshr i32 %72, 8
  %74 = trunc i32 %73 to i8
  %75 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN7libzpaq5ArrayIhEixEm(ptr noundef nonnull align 8 dereferenceable(20) %50, i64 noundef 1)
  store i8 %74, ptr %75, align 1, !tbaa !21
  tail call void @_ZN7libzpaq5ZPAQL5initpEv(ptr noundef nonnull align 8 dereferenceable(192) %64)
  store i32 5, ptr %0, align 8, !tbaa !5
  br label %80

76:                                               ; preds = %2
  %77 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN7libzpaq5ZPAQL3runEj(ptr noundef nonnull align 8 dereferenceable(192) %77, i32 noundef %1)
  %78 = icmp slt i32 %1, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %76
  tail call void @_ZN7libzpaq5ZPAQL5flushEv(ptr noundef nonnull align 8 dereferenceable(192) %77)
  br label %80

80:                                               ; preds = %.thread11, %76, %79, %48, %63, %11, %14, %26, %21, %16, %2
  %81 = load i32, ptr %0, align 8, !tbaa !5
  ret i32 %81
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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" }

!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 = !{!"_ZTSN7libzpaq13PostProcessorE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7libzpaq5ZPAQLE", !11, i64 0, !11, i64 8, !12, i64 16, !7, i64 40, !7, i64 44, !7, i64 48, !12, i64 56, !14, i64 80, !14, i64 104, !15, i64 128, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !7, i64 176, !7, i64 180, !11, i64 184}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN7libzpaq5ArrayIhEE", !11, i64 0, !13, i64 8, !7, i64 16}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSN7libzpaq5ArrayIjEE", !11, i64 0, !13, i64 8, !7, i64 16}
!15 = !{!"_ZTSN7libzpaq5ArrayIcEE", !11, i64 0, !13, i64 8, !7, i64 16}
!16 = !{!6, !7, i64 4}
!17 = !{!6, !7, i64 56}
!18 = !{!6, !7, i64 64}
!19 = !{!6, !7, i64 60}
!20 = !{!6, !7, i64 8}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !7, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass