; LLVM IR from jermp/2i_bench :: external/CRoaring/benchmarks (decoding)

; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @read_padding(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.stat, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 2
  br i1 %26, label %27, label %32

27:                                               ; preds = %2
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i64 0
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str, ptr noundef %30)
  store i32 1, ptr %3, align 4
  br label %208

32:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 1
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  store ptr %35, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %36 = load ptr, ptr %6, align 8, !tbaa !9
  %37 = call i32 (ptr, i32, ...) @open(ptr noundef %36, i32 noundef 0)
  store i32 %37, ptr %7, align 4, !tbaa !5
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = icmp eq i32 %38, -1
  br i1 %39, label %40, label %43

40:                                               ; preds = %32
  %41 = load ptr, ptr %6, align 8, !tbaa !9
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %41)
  call void @exit(i32 noundef 1) #8
  unreachable

43:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 144, ptr %8) #7
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = call i32 @fstat(i32 noundef %44, ptr noundef %8) #7
  %46 = icmp eq i32 %45, -1
  br i1 %46, label %47, label %50

47:                                               ; preds = %43
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %48)
  call void @exit(i32 noundef 1) #8
  unreachable

50:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = call i64 @read(i32 noundef %51, ptr noundef %9, i64 noundef 4)
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = call i64 @read(i32 noundef %53, ptr noundef %10, i64 noundef 4)
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %55)
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %57)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = zext i32 %59 to i64
  %61 = mul i64 %60, 4
  %62 = call noalias ptr @malloc(i64 noundef %61) #9
  store ptr %62, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = mul i64 %64, 8
  %66 = call noalias ptr @malloc(i64 noundef %65) #9
  store ptr %66, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %67 = getelementptr inbounds %struct.stat, ptr %8, i32 0, i32 8
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = call ptr @mmap(ptr noundef null, i64 noundef %68, i32 noundef 1, i32 noundef 1, i32 noundef %69, i64 noundef 0) #7
  store ptr %70, ptr %13, align 8, !tbaa !9
  %71 = load ptr, ptr %13, align 8, !tbaa !9
  %72 = icmp ne ptr %71, null
  br i1 %72, label %75, label %73

73:                                               ; preds = %50
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  call void @exit(i32 noundef 1) #8
  unreachable

75:                                               ; preds = %50
  %76 = load ptr, ptr %13, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  store ptr %77, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %92, %75
  %79 = load i32, ptr %14, align 4, !tbaa !5
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = icmp ne i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %95

83:                                               ; preds = %78
  %84 = load ptr, ptr %13, align 8, !tbaa !9
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load ptr, ptr %11, align 8, !tbaa !9
  %87 = load i32, ptr %14, align 4, !tbaa !5
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  store i32 %85, ptr %89, align 4, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %90, i64 4
  store ptr %91, ptr %13, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %83
  %93 = load i32, ptr %14, align 4, !tbaa !5
  %94 = add i32 %93, 1
  store i32 %94, ptr %14, align 4, !tbaa !5
  br label %78, !llvm.loop !15

95:                                               ; preds = %82
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %131, %95
  %98 = load i32, ptr %15, align 4, !tbaa !5
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = icmp ne i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %134

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %103 = load ptr, ptr %11, align 8, !tbaa !9
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %103, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  store i32 %107, ptr %16, align 4, !tbaa !5
  %108 = load ptr, ptr %13, align 8, !tbaa !9
  %109 = call ptr @read_padding(ptr noundef %108)
  store ptr %109, ptr %13, align 8, !tbaa !9
  %110 = load ptr, ptr %13, align 8, !tbaa !9
  %111 = load i32, ptr %16, align 4, !tbaa !5
  %112 = zext i32 %111 to i64
  %113 = call ptr @roaring_bitmap_frozen_view(ptr noundef %110, i64 noundef %112)
  %114 = load ptr, ptr %12, align 8, !tbaa !9
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds ptr, ptr %114, i64 %116
  store ptr %113, ptr %117, align 8, !tbaa !9
  %118 = load ptr, ptr %12, align 8, !tbaa !9
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %118, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = icmp eq ptr %122, null
  br i1 %123, label %124, label %126

124:                                              ; preds = %102
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @exit(i32 noundef 1) #8
  unreachable

126:                                              ; preds = %102
  %127 = load i32, ptr %16, align 4, !tbaa !5
  %128 = load ptr, ptr %13, align 8, !tbaa !9
  %129 = zext i32 %127 to i64
  %130 = getelementptr inbounds i8, ptr %128, i64 %129
  store ptr %130, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %131

131:                                              ; preds = %126
  %132 = load i32, ptr %15, align 4, !tbaa !5
  %133 = add i32 %132, 1
  store i32 %133, ptr %15, align 4, !tbaa !5
  br label %97, !llvm.loop !17

134:                                              ; preds = %101
  %135 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %135) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = zext i32 %136 to i64
  %138 = mul i64 %137, 4
  %139 = call noalias ptr @malloc(i64 noundef %138) #9
  store ptr %139, ptr %17, align 8, !tbaa !9
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %141 = call double @get_time_usecs()
  store double %141, ptr %19, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %158, %134
  %143 = load i32, ptr %20, align 4, !tbaa !5
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = icmp ne i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %161

147:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %148 = load ptr, ptr %12, align 8, !tbaa !9
  %149 = load i32, ptr %20, align 4, !tbaa !5
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !9
  %153 = load ptr, ptr %17, align 8, !tbaa !9
  %154 = call i64 @_roaring_bitmap_to_uint32_array(ptr noundef %152, ptr noundef %153)
  store i64 %154, ptr %21, align 8, !tbaa !18
  %155 = load i64, ptr %21, align 8, !tbaa !18
  %156 = load i64, ptr %18, align 8, !tbaa !18
  %157 = add i64 %156, %155
  store i64 %157, ptr %18, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %158

158:                                              ; preds = %147
  %159 = load i32, ptr %20, align 4, !tbaa !5
  %160 = add i32 %159, 1
  store i32 %160, ptr %20, align 4, !tbaa !5
  br label %142, !llvm.loop !21

161:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %162 = call double @get_time_usecs()
  store double %162, ptr %22, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %163 = load double, ptr %22, align 8, !tbaa !19
  %164 = load double, ptr %19, align 8, !tbaa !19
  %165 = fsub double %163, %164
  store double %165, ptr %23, align 8, !tbaa !19
  %166 = load i64, ptr %18, align 8, !tbaa !18
  %167 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i64 noundef %166)
  %168 = load double, ptr %23, align 8, !tbaa !19
  %169 = load i64, ptr %18, align 8, !tbaa !18
  %170 = uitofp i64 %169 to double
  %171 = fdiv double %168, %170
  %172 = fmul double %171, 1.000000e+03
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %172)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %189, %161
  %175 = load i32, ptr %24, align 4, !tbaa !5
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = icmp ne i32 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %192

179:                                              ; preds = %174
  %180 = load ptr, ptr %12, align 8, !tbaa !9
  %181 = load i32, ptr %24, align 4, !tbaa !5
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds ptr, ptr %180, i64 %182
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  call void @roaring_bitmap_free(ptr noundef %184)
  %185 = load ptr, ptr %12, align 8, !tbaa !9
  %186 = load i32, ptr %24, align 4, !tbaa !5
  %187 = zext i32 %186 to i64
  %188 = getelementptr inbounds ptr, ptr %185, i64 %187
  store ptr null, ptr %188, align 8, !tbaa !9
  br label %189

189:                                              ; preds = %179
  %190 = load i32, ptr %24, align 4, !tbaa !5
  %191 = add i32 %190, 1
  store i32 %191, ptr %24, align 4, !tbaa !5
  br label %174, !llvm.loop !22

192:                                              ; preds = %178
  %193 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %193) #7
  %194 = load ptr, ptr %13, align 8, !tbaa !9
  %195 = getelementptr inbounds %struct.stat, ptr %8, i32 0, i32 8
  %196 = load i64, ptr %195, align 8, !tbaa !11
  %197 = sub i64 0, %196
  %198 = getelementptr inbounds i8, ptr %194, i64 %197
  %199 = getelementptr inbounds %struct.stat, ptr %8, i32 0, i32 8
  %200 = load i64, ptr %199, align 8, !tbaa !11
  %201 = call i32 @munmap(ptr noundef %198, i64 noundef %200) #7
  %202 = icmp eq i32 %201, -1
  br i1 %202, label %203, label %205

203:                                              ; preds = %192
  %204 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  call void @exit(i32 noundef 1) #8
  unreachable

205:                                              ; preds = %192
  %206 = load i32, ptr %7, align 4, !tbaa !5
  %207 = call i32 @close(i32 noundef %206)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %208

208:                                              ; preds = %205, %27
  %209 = load i32, ptr %3, align 4
  ret i32 %209
}

declare i32 @printf(ptr noundef, ...) #2

declare i32 @open(ptr noundef, i32 noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

; Function Attrs: nounwind
declare i32 @fstat(i32 noundef, ptr noundef) #4

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #4

declare ptr @roaring_bitmap_frozen_view(ptr noundef, i64 noundef) #2

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

declare i64 @_roaring_bitmap_to_uint32_array(ptr noundef, ptr noundef) #2

declare void @roaring_bitmap_free(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @munmap(ptr noundef, i64 noundef) #4

declare i32 @close(i32 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare double @get_time_usecs() #6

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 = { nounwind allocsize(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 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 48}
!12 = !{!"stat", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !14, i64 72, !14, i64 88, !14, i64 104, !7, i64 120}
!13 = !{!"long", !7, i64 0}
!14 = !{!"timespec", !13, i64 0, !13, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!13, !13, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @read_padding(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.stat, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = icmp slt i32 %0, 2
  br i1 %6, label %7, label %10

7:                                                ; preds = %2
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %8)
  br label %90

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = tail call i32 (ptr, i32, ...) @open(ptr noundef %12, i32 noundef 0) #11
  %14 = icmp eq i32 %13, -1
  br i1 %14, label %15, label %17

15:                                               ; preds = %10
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %12)
  tail call void @exit(i32 noundef 1) #12
  unreachable

17:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #11
  %18 = call i32 @fstat(i32 noundef %13, ptr noundef nonnull %3) #11
  %19 = icmp eq i32 %18, -1
  br i1 %19, label %20, label %22

20:                                               ; preds = %17
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %12)
  tail call void @exit(i32 noundef 1) #12
  unreachable

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #11
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  store i32 0, ptr %5, align 4, !tbaa !9
  %23 = call i64 @read(i32 noundef %13, ptr noundef nonnull %4, i64 noundef 4) #11
  %24 = call i64 @read(i32 noundef %13, ptr noundef nonnull %5, i64 noundef 4) #11
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %25)
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %27)
  %29 = zext i32 %25 to i64
  %30 = shl nuw nsw i64 %29, 2
  %31 = tail call noalias ptr @malloc(i64 noundef %30) #13
  %32 = shl nuw nsw i64 %29, 3
  %33 = tail call noalias ptr @malloc(i64 noundef %32) #13
  %34 = getelementptr inbounds i8, ptr %3, i64 48
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = tail call ptr @mmap(ptr noundef null, i64 noundef %35, i32 noundef 1, i32 noundef 1, i32 noundef %13, i64 noundef 0) #11
  %.not = icmp eq ptr %36, null
  br i1 %.not, label %37, label %39

37:                                               ; preds = %22
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  tail call void @exit(i32 noundef 1) #12
  unreachable

39:                                               ; preds = %22
  %40 = getelementptr i8, ptr %36, i64 8
  %.not6268 = icmp eq i32 %25, 0
  br i1 %.not6268, label %._crit_edge.thread, label %.lr.ph75.preheader

._crit_edge.thread:                               ; preds = %39
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %._crit_edge76

.lr.ph75.preheader:                               ; preds = %39
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %40, i64 %30, i1 false), !tbaa !9
  %42 = add i32 %25, -1
  %43 = zext i32 %42 to i64
  %44 = shl nuw nsw i64 %43, 2
  %45 = getelementptr i8, ptr %36, i64 %44
  %scevgep = getelementptr i8, ptr %45, i64 12
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %.lr.ph75

._crit_edge76:                                    ; preds = %61, %._crit_edge.thread
  %.1.lcssa = phi ptr [ %40, %._crit_edge.thread ], [ %62, %61 ]
  tail call void @free(ptr noundef %31) #11
  %47 = zext i32 %27 to i64
  %48 = shl nuw nsw i64 %47, 2
  %49 = tail call noalias ptr @malloc(i64 noundef %48) #13
  %50 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %51 = tail call double @get_time_usecs()
  br i1 %.not6268, label %._crit_edge90.critedge, label %.lr.ph83

.lr.ph75:                                         ; preds = %.lr.ph75.preheader, %61
  %indvars.iv = phi i64 [ 0, %.lr.ph75.preheader ], [ %indvars.iv.next, %61 ]
  %.173 = phi ptr [ %scevgep, %.lr.ph75.preheader ], [ %62, %61 ]
  %52 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = tail call ptr @read_padding(ptr noundef %.173)
  %55 = zext i32 %53 to i64
  %56 = tail call ptr @roaring_bitmap_frozen_view(ptr noundef %54, i64 noundef %55) #11
  %57 = getelementptr inbounds ptr, ptr %33, i64 %indvars.iv
  store ptr %56, ptr %57, align 8, !tbaa !5
  %58 = icmp eq ptr %56, null
  br i1 %58, label %59, label %61

59:                                               ; preds = %.lr.ph75
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  tail call void @exit(i32 noundef 1) #12
  unreachable

61:                                               ; preds = %.lr.ph75
  %62 = getelementptr inbounds i8, ptr %54, i64 %55
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not63 = icmp eq i64 %indvars.iv.next, %29
  br i1 %.not63, label %._crit_edge76, label %.lr.ph75, !llvm.loop !15

._crit_edge84:                                    ; preds = %.lr.ph83
  %63 = tail call double @get_time_usecs()
  %64 = fsub double %63, %51
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i64 noundef %73)
  %66 = uitofp i64 %73 to double
  %67 = fdiv double %64, %66
  %68 = fmul double %67, 1.000000e+03
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %68)
  br i1 %.not6268, label %._crit_edge90, label %.lr.ph89

.lr.ph83:                                         ; preds = %._crit_edge76, %.lr.ph83
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph83 ], [ 0, %._crit_edge76 ]
  %.05980 = phi i64 [ %73, %.lr.ph83 ], [ 0, %._crit_edge76 ]
  %70 = getelementptr inbounds ptr, ptr %33, i64 %indvars.iv95
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = tail call i64 @_roaring_bitmap_to_uint32_array(ptr noundef %71, ptr noundef %49) #11
  %73 = add i64 %72, %.05980
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %.not64 = icmp eq i64 %indvars.iv.next96, %29
  br i1 %.not64, label %._crit_edge84, label %.lr.ph83, !llvm.loop !17

._crit_edge90.critedge:                           ; preds = %._crit_edge76
  %74 = tail call double @get_time_usecs()
  %75 = fsub double %74, %51
  %76 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i64 noundef 0)
  %77 = fdiv double %75, 0.000000e+00
  %78 = fmul double %77, 1.000000e+03
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %78)
  br label %._crit_edge90

._crit_edge90:                                    ; preds = %.lr.ph89, %._crit_edge90.critedge, %._crit_edge84
  tail call void @free(ptr noundef %33) #11
  %80 = sub i64 0, %35
  %81 = getelementptr inbounds i8, ptr %.1.lcssa, i64 %80
  %82 = tail call i32 @munmap(ptr noundef %81, i64 noundef %35) #11
  %83 = icmp eq i32 %82, -1
  br i1 %83, label %86, label %88

.lr.ph89:                                         ; preds = %._crit_edge84, %.lr.ph89
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %.lr.ph89 ], [ 0, %._crit_edge84 ]
  %84 = getelementptr inbounds ptr, ptr %33, i64 %indvars.iv98
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  tail call void @roaring_bitmap_free(ptr noundef %85) #11
  store ptr null, ptr %84, align 8, !tbaa !5
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %.not65 = icmp eq i64 %indvars.iv.next99, %29
  br i1 %.not65, label %._crit_edge90, label %.lr.ph89, !llvm.loop !18

86:                                               ; preds = %._crit_edge90
  %87 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  tail call void @exit(i32 noundef 1) #12
  unreachable

88:                                               ; preds = %._crit_edge90
  %89 = tail call i32 @close(i32 noundef %13) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #11
  br label %90

90:                                               ; preds = %88, %7
  %.054 = phi i32 [ 1, %7 ], [ 0, %88 ]
  ret i32 %.054
}

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fstat(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #6

declare ptr @roaring_bitmap_frozen_view(ptr noundef, i64 noundef) local_unnamed_addr #7

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

declare i64 @_roaring_bitmap_to_uint32_array(ptr noundef, ptr noundef) local_unnamed_addr #7

declare void @roaring_bitmap_free(ptr noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i32 @munmap(ptr noundef, i64 noundef) local_unnamed_addr #6

declare i32 @close(i32 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint nounwind uwtable
declare double @get_time_usecs() local_unnamed_addr #9

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree 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 = { nofree "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #6 = { 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 #7 = { "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 #8 = { 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 #9 = { inlinehint 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 #10 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #11 = { nounwind }
attributes #12 = { noreturn nounwind }
attributes #13 = { nounwind allocsize(0) }

!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, !13, i64 48}
!12 = !{!"stat", !13, i64 0, !13, i64 8, !13, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !14, i64 72, !14, i64 88, !14, i64 104, !7, i64 120}
!13 = !{!"long", !7, i64 0}
!14 = !{!"timespec", !13, i64 0, !13, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass