; LLVM IR from hutusi/rethink-c :: test (test_bitmap)

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

@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__.test_bitmap_extract = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [39 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

declare ptr @bitmap_new(i32 noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

declare void @bitmap_free(ptr noundef) #1

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

declare ptr @bitmap_from_char(i8 noundef zeroext) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_bitmap_extract() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #4
  %3 = call ptr @bitmap_from_char(i8 noundef zeroext 97)
  store ptr %3, ptr %1, align 8, !tbaa !5
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  %5 = call zeroext i8 @bitmap_extract_char(ptr noundef %4, i32 noundef 0)
  store i8 %5, ptr %2, align 1, !tbaa !9
  %6 = load i8, ptr %2, align 1, !tbaa !9
  %7 = sext i8 %6 to i32
  %8 = icmp ne i32 %7, 97
  br i1 %8, label %9, label %19

9:                                                ; preds = %0
  %10 = load i8, ptr %2, align 1, !tbaa !9
  %11 = sext i8 %10 to i32
  %12 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %11, i32 noundef 97)
  %13 = load i8, ptr %2, align 1, !tbaa !9
  %14 = sext i8 %13 to i32
  %15 = icmp eq i32 %14, 97
  br i1 %15, label %16, label %17

16:                                               ; preds = %9
  br label %18

17:                                               ; preds = %9
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.1, i32 noundef 213, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

18:                                               ; preds = %16
  br label %19

19:                                               ; preds = %18, %0
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  call void @bitmap_free(ptr noundef %20)
  %21 = call ptr @bitmap_new(i32 noundef 0)
  store ptr %21, ptr %1, align 8, !tbaa !5
  %22 = load ptr, ptr %1, align 8, !tbaa !5
  %23 = call ptr @bitmap_append(ptr noundef %22, i32 noundef 0)
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = call ptr @bitmap_append(ptr noundef %24, i32 noundef 0)
  %26 = load ptr, ptr %1, align 8, !tbaa !5
  %27 = call ptr @bitmap_append(ptr noundef %26, i32 noundef 1)
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  %29 = call ptr @bitmap_append_char(ptr noundef %28, i8 noundef zeroext 98)
  %30 = load ptr, ptr %1, align 8, !tbaa !5
  %31 = call zeroext i8 @bitmap_extract_char(ptr noundef %30, i32 noundef 3)
  store i8 %31, ptr %2, align 1, !tbaa !9
  %32 = load i8, ptr %2, align 1, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = icmp ne i32 %33, 98
  br i1 %34, label %35, label %45

35:                                               ; preds = %19
  %36 = load i8, ptr %2, align 1, !tbaa !9
  %37 = sext i8 %36 to i32
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %37, i32 noundef 98)
  %39 = load i8, ptr %2, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 98
  br i1 %41, label %42, label %43

42:                                               ; preds = %35
  br label %44

43:                                               ; preds = %35
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.1, i32 noundef 222, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

44:                                               ; preds = %42
  br label %45

45:                                               ; preds = %44, %19
  %46 = load ptr, ptr %1, align 8, !tbaa !5
  call void @bitmap_free(ptr noundef %46)
  %47 = call ptr @bitmap_new(i32 noundef 0)
  store ptr %47, ptr %1, align 8, !tbaa !5
  %48 = load ptr, ptr %1, align 8, !tbaa !5
  %49 = call ptr @bitmap_append_char(ptr noundef %48, i8 noundef zeroext 97)
  %50 = load ptr, ptr %1, align 8, !tbaa !5
  %51 = call ptr @bitmap_append_char(ptr noundef %50, i8 noundef zeroext 100)
  %52 = load ptr, ptr %1, align 8, !tbaa !5
  %53 = call ptr @bitmap_append_char(ptr noundef %52, i8 noundef zeroext 99)
  %54 = load ptr, ptr %1, align 8, !tbaa !5
  %55 = call ptr @bitmap_append_char(ptr noundef %54, i8 noundef zeroext 98)
  %56 = load ptr, ptr %1, align 8, !tbaa !5
  %57 = call ptr @bitmap_append_char(ptr noundef %56, i8 noundef zeroext 101)
  %58 = load ptr, ptr %1, align 8, !tbaa !5
  %59 = call zeroext i8 @bitmap_extract_char(ptr noundef %58, i32 noundef 0)
  %60 = zext i8 %59 to i32
  %61 = icmp ne i32 %60, 97
  br i1 %61, label %62, label %74

62:                                               ; preds = %45
  %63 = load ptr, ptr %1, align 8, !tbaa !5
  %64 = call zeroext i8 @bitmap_extract_char(ptr noundef %63, i32 noundef 0)
  %65 = zext i8 %64 to i32
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %65, i32 noundef 97)
  %67 = load ptr, ptr %1, align 8, !tbaa !5
  %68 = call zeroext i8 @bitmap_extract_char(ptr noundef %67, i32 noundef 0)
  %69 = zext i8 %68 to i32
  %70 = icmp eq i32 %69, 97
  br i1 %70, label %71, label %72

71:                                               ; preds = %62
  br label %73

72:                                               ; preds = %62
  call void @__assert_fail(ptr noundef @.str.35, ptr noundef @.str.1, i32 noundef 233, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

73:                                               ; preds = %71
  br label %74

74:                                               ; preds = %73, %45
  %75 = load ptr, ptr %1, align 8, !tbaa !5
  %76 = call zeroext i8 @bitmap_extract_char(ptr noundef %75, i32 noundef 8)
  %77 = zext i8 %76 to i32
  %78 = icmp ne i32 %77, 100
  br i1 %78, label %79, label %91

79:                                               ; preds = %74
  %80 = load ptr, ptr %1, align 8, !tbaa !5
  %81 = call zeroext i8 @bitmap_extract_char(ptr noundef %80, i32 noundef 8)
  %82 = zext i8 %81 to i32
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %82, i32 noundef 100)
  %84 = load ptr, ptr %1, align 8, !tbaa !5
  %85 = call zeroext i8 @bitmap_extract_char(ptr noundef %84, i32 noundef 8)
  %86 = zext i8 %85 to i32
  %87 = icmp eq i32 %86, 100
  br i1 %87, label %88, label %89

88:                                               ; preds = %79
  br label %90

89:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str.36, ptr noundef @.str.1, i32 noundef 234, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90, %74
  %92 = load ptr, ptr %1, align 8, !tbaa !5
  %93 = call zeroext i8 @bitmap_extract_char(ptr noundef %92, i32 noundef 16)
  %94 = zext i8 %93 to i32
  %95 = icmp ne i32 %94, 99
  br i1 %95, label %96, label %108

96:                                               ; preds = %91
  %97 = load ptr, ptr %1, align 8, !tbaa !5
  %98 = call zeroext i8 @bitmap_extract_char(ptr noundef %97, i32 noundef 16)
  %99 = zext i8 %98 to i32
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %99, i32 noundef 99)
  %101 = load ptr, ptr %1, align 8, !tbaa !5
  %102 = call zeroext i8 @bitmap_extract_char(ptr noundef %101, i32 noundef 16)
  %103 = zext i8 %102 to i32
  %104 = icmp eq i32 %103, 99
  br i1 %104, label %105, label %106

105:                                              ; preds = %96
  br label %107

106:                                              ; preds = %96
  call void @__assert_fail(ptr noundef @.str.37, ptr noundef @.str.1, i32 noundef 235, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107, %91
  %109 = load ptr, ptr %1, align 8, !tbaa !5
  %110 = call zeroext i8 @bitmap_extract_char(ptr noundef %109, i32 noundef 24)
  %111 = zext i8 %110 to i32
  %112 = icmp ne i32 %111, 98
  br i1 %112, label %113, label %125

113:                                              ; preds = %108
  %114 = load ptr, ptr %1, align 8, !tbaa !5
  %115 = call zeroext i8 @bitmap_extract_char(ptr noundef %114, i32 noundef 24)
  %116 = zext i8 %115 to i32
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %116, i32 noundef 98)
  %118 = load ptr, ptr %1, align 8, !tbaa !5
  %119 = call zeroext i8 @bitmap_extract_char(ptr noundef %118, i32 noundef 24)
  %120 = zext i8 %119 to i32
  %121 = icmp eq i32 %120, 98
  br i1 %121, label %122, label %123

122:                                              ; preds = %113
  br label %124

123:                                              ; preds = %113
  call void @__assert_fail(ptr noundef @.str.38, ptr noundef @.str.1, i32 noundef 236, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

124:                                              ; preds = %122
  br label %125

125:                                              ; preds = %124, %108
  %126 = load ptr, ptr %1, align 8, !tbaa !5
  %127 = call zeroext i8 @bitmap_extract_char(ptr noundef %126, i32 noundef 32)
  %128 = zext i8 %127 to i32
  %129 = icmp ne i32 %128, 101
  br i1 %129, label %130, label %142

130:                                              ; preds = %125
  %131 = load ptr, ptr %1, align 8, !tbaa !5
  %132 = call zeroext i8 @bitmap_extract_char(ptr noundef %131, i32 noundef 32)
  %133 = zext i8 %132 to i32
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %133, i32 noundef 101)
  %135 = load ptr, ptr %1, align 8, !tbaa !5
  %136 = call zeroext i8 @bitmap_extract_char(ptr noundef %135, i32 noundef 32)
  %137 = zext i8 %136 to i32
  %138 = icmp eq i32 %137, 101
  br i1 %138, label %139, label %140

139:                                              ; preds = %130
  br label %141

140:                                              ; preds = %130
  call void @__assert_fail(ptr noundef @.str.39, ptr noundef @.str.1, i32 noundef 237, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

141:                                              ; preds = %139
  br label %142

142:                                              ; preds = %141, %125
  %143 = load ptr, ptr %1, align 8, !tbaa !5
  call void @bitmap_free(ptr noundef %143)
  %144 = call ptr @bitmap_new(i32 noundef 0)
  store ptr %144, ptr %1, align 8, !tbaa !5
  %145 = load ptr, ptr %1, align 8, !tbaa !5
  %146 = call ptr @bitmap_append(ptr noundef %145, i32 noundef 0)
  %147 = load ptr, ptr %1, align 8, !tbaa !5
  %148 = call ptr @bitmap_append(ptr noundef %147, i32 noundef 1)
  %149 = load ptr, ptr %1, align 8, !tbaa !5
  %150 = call ptr @bitmap_append_char(ptr noundef %149, i8 noundef zeroext 97)
  %151 = load ptr, ptr %1, align 8, !tbaa !5
  %152 = call ptr @bitmap_append(ptr noundef %151, i32 noundef 0)
  %153 = load ptr, ptr %1, align 8, !tbaa !5
  %154 = call ptr @bitmap_append(ptr noundef %153, i32 noundef 0)
  %155 = load ptr, ptr %1, align 8, !tbaa !5
  %156 = call ptr @bitmap_append(ptr noundef %155, i32 noundef 1)
  %157 = load ptr, ptr %1, align 8, !tbaa !5
  %158 = call ptr @bitmap_append_char(ptr noundef %157, i8 noundef zeroext 100)
  %159 = load ptr, ptr %1, align 8, !tbaa !5
  %160 = call ptr @bitmap_append(ptr noundef %159, i32 noundef 1)
  %161 = load ptr, ptr %1, align 8, !tbaa !5
  %162 = call ptr @bitmap_append_char(ptr noundef %161, i8 noundef zeroext 99)
  %163 = load ptr, ptr %1, align 8, !tbaa !5
  %164 = call ptr @bitmap_append(ptr noundef %163, i32 noundef 1)
  %165 = load ptr, ptr %1, align 8, !tbaa !5
  %166 = call ptr @bitmap_append_char(ptr noundef %165, i8 noundef zeroext 98)
  %167 = load ptr, ptr %1, align 8, !tbaa !5
  %168 = call zeroext i8 @bitmap_extract_char(ptr noundef %167, i32 noundef 2)
  %169 = zext i8 %168 to i32
  %170 = icmp ne i32 %169, 97
  br i1 %170, label %171, label %183

171:                                              ; preds = %142
  %172 = load ptr, ptr %1, align 8, !tbaa !5
  %173 = call zeroext i8 @bitmap_extract_char(ptr noundef %172, i32 noundef 2)
  %174 = zext i8 %173 to i32
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %174, i32 noundef 97)
  %176 = load ptr, ptr %1, align 8, !tbaa !5
  %177 = call zeroext i8 @bitmap_extract_char(ptr noundef %176, i32 noundef 2)
  %178 = zext i8 %177 to i32
  %179 = icmp eq i32 %178, 97
  br i1 %179, label %180, label %181

180:                                              ; preds = %171
  br label %182

181:                                              ; preds = %171
  call void @__assert_fail(ptr noundef @.str.40, ptr noundef @.str.1, i32 noundef 255, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

182:                                              ; preds = %180
  br label %183

183:                                              ; preds = %182, %142
  %184 = load ptr, ptr %1, align 8, !tbaa !5
  %185 = call zeroext i8 @bitmap_extract_char(ptr noundef %184, i32 noundef 13)
  %186 = zext i8 %185 to i32
  %187 = icmp ne i32 %186, 100
  br i1 %187, label %188, label %200

188:                                              ; preds = %183
  %189 = load ptr, ptr %1, align 8, !tbaa !5
  %190 = call zeroext i8 @bitmap_extract_char(ptr noundef %189, i32 noundef 13)
  %191 = zext i8 %190 to i32
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %191, i32 noundef 100)
  %193 = load ptr, ptr %1, align 8, !tbaa !5
  %194 = call zeroext i8 @bitmap_extract_char(ptr noundef %193, i32 noundef 13)
  %195 = zext i8 %194 to i32
  %196 = icmp eq i32 %195, 100
  br i1 %196, label %197, label %198

197:                                              ; preds = %188
  br label %199

198:                                              ; preds = %188
  call void @__assert_fail(ptr noundef @.str.41, ptr noundef @.str.1, i32 noundef 256, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

199:                                              ; preds = %197
  br label %200

200:                                              ; preds = %199, %183
  %201 = load ptr, ptr %1, align 8, !tbaa !5
  %202 = call zeroext i8 @bitmap_extract_char(ptr noundef %201, i32 noundef 22)
  %203 = zext i8 %202 to i32
  %204 = icmp ne i32 %203, 99
  br i1 %204, label %205, label %217

205:                                              ; preds = %200
  %206 = load ptr, ptr %1, align 8, !tbaa !5
  %207 = call zeroext i8 @bitmap_extract_char(ptr noundef %206, i32 noundef 22)
  %208 = zext i8 %207 to i32
  %209 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %208, i32 noundef 99)
  %210 = load ptr, ptr %1, align 8, !tbaa !5
  %211 = call zeroext i8 @bitmap_extract_char(ptr noundef %210, i32 noundef 22)
  %212 = zext i8 %211 to i32
  %213 = icmp eq i32 %212, 99
  br i1 %213, label %214, label %215

214:                                              ; preds = %205
  br label %216

215:                                              ; preds = %205
  call void @__assert_fail(ptr noundef @.str.42, ptr noundef @.str.1, i32 noundef 257, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

216:                                              ; preds = %214
  br label %217

217:                                              ; preds = %216, %200
  %218 = load ptr, ptr %1, align 8, !tbaa !5
  %219 = call zeroext i8 @bitmap_extract_char(ptr noundef %218, i32 noundef 31)
  %220 = zext i8 %219 to i32
  %221 = icmp ne i32 %220, 98
  br i1 %221, label %222, label %234

222:                                              ; preds = %217
  %223 = load ptr, ptr %1, align 8, !tbaa !5
  %224 = call zeroext i8 @bitmap_extract_char(ptr noundef %223, i32 noundef 31)
  %225 = zext i8 %224 to i32
  %226 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i32 noundef %225, i32 noundef 98)
  %227 = load ptr, ptr %1, align 8, !tbaa !5
  %228 = call zeroext i8 @bitmap_extract_char(ptr noundef %227, i32 noundef 31)
  %229 = zext i8 %228 to i32
  %230 = icmp eq i32 %229, 98
  br i1 %230, label %231, label %232

231:                                              ; preds = %222
  br label %233

232:                                              ; preds = %222
  call void @__assert_fail(ptr noundef @.str.43, ptr noundef @.str.1, i32 noundef 258, ptr noundef @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

233:                                              ; preds = %231
  br label %234

234:                                              ; preds = %233, %217
  %235 = load ptr, ptr %1, align 8, !tbaa !5
  call void @bitmap_free(ptr noundef %235)
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

declare zeroext i8 @bitmap_extract_char(ptr noundef, i32 noundef) #1

declare ptr @bitmap_append(ptr noundef, i32 noundef) #1

declare ptr @bitmap_append_char(ptr noundef, i8 noundef zeroext) #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 = { 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 #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 = { nounwind }
attributes #5 = { noreturn 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 = !{!7, !7, i64 0}


; 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.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__.test_bitmap_extract = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [39 x i8], align 1

declare ptr @bitmap_new(i32 noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @bitmap_free(ptr noundef) local_unnamed_addr #0

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

declare ptr @bitmap_from_char(i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @test_bitmap_extract() local_unnamed_addr #3 {
  %1 = tail call ptr @bitmap_from_char(i8 noundef zeroext 97) #4
  %2 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %1, i32 noundef 0) #4
  %.not = icmp eq i8 %2, 97
  br i1 %.not, label %6, label %3

3:                                                ; preds = %0
  %4 = sext i8 %2 to i32
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %4, i32 noundef 97)
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.1, i32 noundef 213, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

6:                                                ; preds = %0
  tail call void @bitmap_free(ptr noundef %1) #4
  %7 = tail call ptr @bitmap_new(i32 noundef 0) #4
  %8 = tail call ptr @bitmap_append(ptr noundef %7, i32 noundef 0) #4
  %9 = tail call ptr @bitmap_append(ptr noundef %7, i32 noundef 0) #4
  %10 = tail call ptr @bitmap_append(ptr noundef %7, i32 noundef 1) #4
  %11 = tail call ptr @bitmap_append_char(ptr noundef %7, i8 noundef zeroext 98) #4
  %12 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %7, i32 noundef 3) #4
  %.not59 = icmp eq i8 %12, 98
  br i1 %.not59, label %16, label %13

13:                                               ; preds = %6
  %14 = sext i8 %12 to i32
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %14, i32 noundef 98)
  tail call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.1, i32 noundef 222, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

16:                                               ; preds = %6
  tail call void @bitmap_free(ptr noundef %7) #4
  %17 = tail call ptr @bitmap_new(i32 noundef 0) #4
  %18 = tail call ptr @bitmap_append_char(ptr noundef %17, i8 noundef zeroext 97) #4
  %19 = tail call ptr @bitmap_append_char(ptr noundef %17, i8 noundef zeroext 100) #4
  %20 = tail call ptr @bitmap_append_char(ptr noundef %17, i8 noundef zeroext 99) #4
  %21 = tail call ptr @bitmap_append_char(ptr noundef %17, i8 noundef zeroext 98) #4
  %22 = tail call ptr @bitmap_append_char(ptr noundef %17, i8 noundef zeroext 101) #4
  %23 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 0) #4
  %.not60 = icmp eq i8 %23, 97
  br i1 %.not60, label %31, label %24

24:                                               ; preds = %16
  %25 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 0) #4
  %26 = zext i8 %25 to i32
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %26, i32 noundef 97)
  %28 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 0) #4
  %29 = icmp eq i8 %28, 97
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  tail call void @__assert_fail(ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.1, i32 noundef 233, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

31:                                               ; preds = %24, %16
  %32 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 8) #4
  %.not61 = icmp eq i8 %32, 100
  br i1 %.not61, label %40, label %33

33:                                               ; preds = %31
  %34 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 8) #4
  %35 = zext i8 %34 to i32
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %35, i32 noundef 100)
  %37 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 8) #4
  %38 = icmp eq i8 %37, 100
  br i1 %38, label %40, label %39

39:                                               ; preds = %33
  tail call void @__assert_fail(ptr noundef nonnull @.str.36, ptr noundef nonnull @.str.1, i32 noundef 234, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

40:                                               ; preds = %33, %31
  %41 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 16) #4
  %.not62 = icmp eq i8 %41, 99
  br i1 %.not62, label %49, label %42

42:                                               ; preds = %40
  %43 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 16) #4
  %44 = zext i8 %43 to i32
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %44, i32 noundef 99)
  %46 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 16) #4
  %47 = icmp eq i8 %46, 99
  br i1 %47, label %49, label %48

48:                                               ; preds = %42
  tail call void @__assert_fail(ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.1, i32 noundef 235, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

49:                                               ; preds = %42, %40
  %50 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 24) #4
  %.not63 = icmp eq i8 %50, 98
  br i1 %.not63, label %58, label %51

51:                                               ; preds = %49
  %52 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 24) #4
  %53 = zext i8 %52 to i32
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %53, i32 noundef 98)
  %55 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 24) #4
  %56 = icmp eq i8 %55, 98
  br i1 %56, label %58, label %57

57:                                               ; preds = %51
  tail call void @__assert_fail(ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.1, i32 noundef 236, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

58:                                               ; preds = %51, %49
  %59 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 32) #4
  %.not64 = icmp eq i8 %59, 101
  br i1 %.not64, label %67, label %60

60:                                               ; preds = %58
  %61 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 32) #4
  %62 = zext i8 %61 to i32
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %62, i32 noundef 101)
  %64 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %17, i32 noundef 32) #4
  %65 = icmp eq i8 %64, 101
  br i1 %65, label %67, label %66

66:                                               ; preds = %60
  tail call void @__assert_fail(ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.1, i32 noundef 237, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

67:                                               ; preds = %60, %58
  tail call void @bitmap_free(ptr noundef %17) #4
  %68 = tail call ptr @bitmap_new(i32 noundef 0) #4
  %69 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 0) #4
  %70 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 1) #4
  %71 = tail call ptr @bitmap_append_char(ptr noundef %68, i8 noundef zeroext 97) #4
  %72 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 0) #4
  %73 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 0) #4
  %74 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 1) #4
  %75 = tail call ptr @bitmap_append_char(ptr noundef %68, i8 noundef zeroext 100) #4
  %76 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 1) #4
  %77 = tail call ptr @bitmap_append_char(ptr noundef %68, i8 noundef zeroext 99) #4
  %78 = tail call ptr @bitmap_append(ptr noundef %68, i32 noundef 1) #4
  %79 = tail call ptr @bitmap_append_char(ptr noundef %68, i8 noundef zeroext 98) #4
  %80 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 2) #4
  %.not65 = icmp eq i8 %80, 97
  br i1 %.not65, label %88, label %81

81:                                               ; preds = %67
  %82 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 2) #4
  %83 = zext i8 %82 to i32
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %83, i32 noundef 97)
  %85 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 2) #4
  %86 = icmp eq i8 %85, 97
  br i1 %86, label %88, label %87

87:                                               ; preds = %81
  tail call void @__assert_fail(ptr noundef nonnull @.str.40, ptr noundef nonnull @.str.1, i32 noundef 255, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

88:                                               ; preds = %81, %67
  %89 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 13) #4
  %.not66 = icmp eq i8 %89, 100
  br i1 %.not66, label %97, label %90

90:                                               ; preds = %88
  %91 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 13) #4
  %92 = zext i8 %91 to i32
  %93 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %92, i32 noundef 100)
  %94 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 13) #4
  %95 = icmp eq i8 %94, 100
  br i1 %95, label %97, label %96

96:                                               ; preds = %90
  tail call void @__assert_fail(ptr noundef nonnull @.str.41, ptr noundef nonnull @.str.1, i32 noundef 256, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

97:                                               ; preds = %90, %88
  %98 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 22) #4
  %.not67 = icmp eq i8 %98, 99
  br i1 %.not67, label %106, label %99

99:                                               ; preds = %97
  %100 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 22) #4
  %101 = zext i8 %100 to i32
  %102 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %101, i32 noundef 99)
  %103 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 22) #4
  %104 = icmp eq i8 %103, 99
  br i1 %104, label %106, label %105

105:                                              ; preds = %99
  tail call void @__assert_fail(ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.1, i32 noundef 257, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

106:                                              ; preds = %99, %97
  %107 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 31) #4
  %.not68 = icmp eq i8 %107, 98
  br i1 %.not68, label %115, label %108

108:                                              ; preds = %106
  %109 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 31) #4
  %110 = zext i8 %109 to i32
  %111 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i32 noundef %110, i32 noundef 98)
  %112 = tail call zeroext i8 @bitmap_extract_char(ptr noundef %68, i32 noundef 31) #4
  %113 = icmp eq i8 %112, 98
  br i1 %113, label %115, label %114

114:                                              ; preds = %108
  tail call void @__assert_fail(ptr noundef nonnull @.str.43, ptr noundef nonnull @.str.1, i32 noundef 258, ptr noundef nonnull @__PRETTY_FUNCTION__.test_bitmap_extract) #5
  unreachable

115:                                              ; preds = %108, %106
  tail call void @bitmap_free(ptr noundef %68) #4
  ret void
}

declare zeroext i8 @bitmap_extract_char(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @bitmap_append(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @bitmap_append_char(ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

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 = { 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 #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 = { 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 = { nounwind }
attributes #5 = { noreturn 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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass