; LLVM IR from clibs/clib :: deps/wiki-registry (wiki-registry)

; 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.GumboInternalOptions = type { ptr, ptr, ptr, i32, i8, i32 }
%struct.GumboVector = type { ptr, i32, i32 }
%struct.GumboInternalOutput = type { ptr, ptr, %struct.GumboVector }
%struct.GumboInternalNode = type { i32, ptr, i64, i32, %union.anon }
%union.anon = type { %struct.GumboElement }
%struct.GumboElement = type { %struct.GumboVector, i32, i32, %struct.GumboStringPiece, %struct.GumboStringPiece, %struct.GumboSourcePosition, %struct.GumboSourcePosition, %struct.GumboVector }
%struct.GumboStringPiece = type { ptr, i64 }
%struct.GumboSourcePosition = type { i32, i32, i32 }
%struct.GumboAttribute = type { i32, ptr, %struct.GumboStringPiece, ptr, %struct.GumboStringPiece, %struct.GumboSourcePosition, %struct.GumboSourcePosition, %struct.GumboSourcePosition, %struct.GumboSourcePosition }
%struct.list_t = type { ptr, ptr, i32, ptr, ptr }
%struct.list_node = type { ptr, ptr, ptr }
%struct.wiki_package_t = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@kGumboDefaultOptions = external constant %struct.GumboInternalOptions, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @wiki_registry_parse(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.GumboVector, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = call ptr @gumbo_parse(ptr noundef %20)
  store ptr %21, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %22 = call ptr @list_new()
  store ptr %22, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.GumboInternalOutput, ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = call ptr @gumbo_get_element_by_id(ptr noundef @.str, ptr noundef %25)
  store ptr %26, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %162

29:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.GumboInternalNode, ptr %30, i32 0, i32 4
  %32 = getelementptr inbounds %struct.GumboElement, ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds %struct.GumboVector, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = getelementptr inbounds ptr, ptr %34, i64 1
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  store ptr %36, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.GumboInternalNode, ptr %37, i32 0, i32 4
  %39 = getelementptr inbounds %struct.GumboElement, ptr %38, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %39, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %40 = getelementptr inbounds %struct.GumboVector, ptr %7, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !16
  %42 = sub i32 %41, 1
  %43 = zext i32 %42 to i64
  store i64 %43, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !17
  br label %44

44:                                               ; preds = %157, %29
  %45 = load i64, ptr %9, align 8, !tbaa !17
  %46 = load i64, ptr %8, align 8, !tbaa !17
  %47 = icmp ult i64 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 2, ptr %10, align 4
  br label %160

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %50 = getelementptr inbounds %struct.GumboVector, ptr %7, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !19
  %52 = load i64, ptr %9, align 8, !tbaa !17
  %53 = getelementptr inbounds ptr, ptr %51, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  store ptr %54, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !5
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.GumboInternalNode, ptr %55, i32 0, i32 4
  %57 = getelementptr inbounds %struct.GumboElement, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 8, !tbaa !13
  %59 = icmp ne i32 %58, 38
  br i1 %59, label %60, label %61

60:                                               ; preds = %49
  store i32 4, ptr %10, align 4
  br label %154

61:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.GumboInternalNode, ptr %62, i32 0, i32 4
  %64 = getelementptr inbounds %struct.GumboElement, ptr %63, i32 0, i32 7
  %65 = call ptr @gumbo_get_attribute(ptr noundef %64, ptr noundef @.str.1)
  store ptr %65, ptr %13, align 8, !tbaa !5
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = icmp eq ptr %66, null
  br i1 %67, label %74, label %68

68:                                               ; preds = %61
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.GumboAttribute, ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %72 = call i32 @strncmp(ptr noundef %71, ptr noundef @.str.2, i64 noundef 16) #7
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %68, %61
  store i32 4, ptr %10, align 4
  br label %153

75:                                               ; preds = %68
  br label %76

76:                                               ; preds = %93, %75
  %77 = load i64, ptr %9, align 8, !tbaa !17
  %78 = load i64, ptr %8, align 8, !tbaa !17
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %80, label %96

80:                                               ; preds = %76
  %81 = getelementptr inbounds %struct.GumboVector, ptr %7, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !19
  %83 = load i64, ptr %9, align 8, !tbaa !17
  %84 = getelementptr inbounds ptr, ptr %82, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  store ptr %85, ptr %12, align 8, !tbaa !5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.GumboInternalNode, ptr %86, i32 0, i32 4
  %88 = getelementptr inbounds %struct.GumboElement, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 8, !tbaa !13
  %90 = icmp eq i32 %89, 30
  br i1 %90, label %91, label %92

91:                                               ; preds = %80
  br label %96

92:                                               ; preds = %80
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %9, align 8, !tbaa !17
  %95 = add i64 %94, 1
  store i64 %95, ptr %9, align 8, !tbaa !17
  br label %76, !llvm.loop !24

96:                                               ; preds = %91, %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = call ptr @gumbo_get_elements_by_tag_name(ptr noundef @.str.3, ptr noundef %97)
  store ptr %98, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.list_t, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !26
  %102 = getelementptr inbounds %struct.list_node, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !28
  %104 = call ptr @gumbo_text_content(ptr noundef %103)
  store ptr %104, ptr %15, align 8, !tbaa !5
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %108, label %107

107:                                              ; preds = %96
  store i32 2, ptr %10, align 4
  br label %152

108:                                              ; preds = %96
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  %110 = call ptr @case_lower(ptr noundef %109)
  %111 = call ptr @trim(ptr noundef %110)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = call ptr @gumbo_get_elements_by_tag_name(ptr noundef @.str.4, ptr noundef %112)
  store ptr %113, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = call ptr @list_iterator_new(ptr noundef %114, i32 noundef 0)
  store ptr %115, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  br label %116

116:                                              ; preds = %147, %108
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  %118 = call ptr @list_iterator_next(ptr noundef %117)
  store ptr %118, ptr %18, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %148

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %121 = load ptr, ptr %18, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.list_node, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !28
  %124 = call ptr @parse_li(ptr noundef %123)
  store ptr %124, ptr %19, align 8, !tbaa !5
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %141

127:                                              ; preds = %120
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.wiki_package_t, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !30
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %141

132:                                              ; preds = %127
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = call noalias ptr @strdup(ptr noundef %133) #6
  %135 = load ptr, ptr %19, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.wiki_package_t, ptr %135, i32 0, i32 3
  store ptr %134, ptr %136, align 8, !tbaa !32
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load ptr, ptr %19, align 8, !tbaa !5
  %139 = call ptr @list_node_new(ptr noundef %138)
  %140 = call ptr @list_rpush(ptr noundef %137, ptr noundef %139)
  br label %147

141:                                              ; preds = %127, %120
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %146

144:                                              ; preds = %141
  %145 = load ptr, ptr %19, align 8, !tbaa !5
  call void @wiki_package_free(ptr noundef %145)
  br label %146

146:                                              ; preds = %144, %141
  br label %147

147:                                              ; preds = %146, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %116, !llvm.loop !33

148:                                              ; preds = %116
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  call void @list_iterator_destroy(ptr noundef %149)
  %150 = load ptr, ptr %16, align 8, !tbaa !5
  call void @list_destroy(ptr noundef %150)
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %151) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  store i32 0, ptr %10, align 4
  br label %152

152:                                              ; preds = %148, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %153

153:                                              ; preds = %152, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %154

154:                                              ; preds = %153, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %155 = load i32, ptr %10, align 4
  switch i32 %155, label %160 [
    i32 0, label %156
    i32 4, label %157
  ]

156:                                              ; preds = %154
  br label %157

157:                                              ; preds = %156, %154
  %158 = load i64, ptr %9, align 8, !tbaa !17
  %159 = add i64 %158, 1
  store i64 %159, ptr %9, align 8, !tbaa !17
  br label %44, !llvm.loop !34

160:                                              ; preds = %154, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %161

161:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %162

162:                                              ; preds = %161, %1
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  call void @gumbo_destroy_output(ptr noundef @kGumboDefaultOptions, ptr noundef %163)
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret ptr %164
}

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

declare ptr @gumbo_parse(ptr noundef) #2

declare ptr @list_new() #2

declare ptr @gumbo_get_element_by_id(ptr noundef, ptr noundef) #2

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

declare ptr @gumbo_get_attribute(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #4

declare ptr @gumbo_get_elements_by_tag_name(ptr noundef, ptr noundef) #2

declare ptr @gumbo_text_content(ptr noundef) #2

declare ptr @trim(ptr noundef) #2

declare ptr @case_lower(ptr noundef) #2

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

declare ptr @list_iterator_next(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden ptr @parse_li(ptr noundef) #0

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #5

declare ptr @list_rpush(ptr noundef, ptr noundef) #2

declare ptr @list_node_new(ptr noundef) #2

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

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

declare void @list_iterator_destroy(ptr noundef) #2

declare void @list_destroy(ptr noundef) #2

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

declare void @gumbo_destroy_output(ptr noundef, ptr noundef) #2

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind willreturn memory(read) "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 "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 }
attributes #7 = { nounwind willreturn memory(read) }

!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, !6, i64 8}
!10 = !{!"GumboInternalOutput", !6, i64 0, !6, i64 8, !11, i64 16}
!11 = !{!"", !6, i64 0, !12, i64 8, !12, i64 12}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{i64 0, i64 8, !5, i64 8, i64 4, !15, i64 12, i64 4, !15}
!15 = !{!12, !12, i64 0}
!16 = !{!11, !12, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!11, !6, i64 0}
!20 = !{!21, !6, i64 32}
!21 = !{!"", !12, i64 0, !6, i64 8, !22, i64 16, !6, i64 32, !22, i64 40, !23, i64 56, !23, i64 68, !23, i64 80, !23, i64 92}
!22 = !{!"", !6, i64 0, !18, i64 8}
!23 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !6, i64 0}
!27 = !{!"", !6, i64 0, !6, i64 8, !12, i64 16, !6, i64 24, !6, i64 32}
!28 = !{!29, !6, i64 16}
!29 = !{!"list_node", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!31, !6, i64 16}
!31 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!32 = !{!31, !6, i64 24}
!33 = distinct !{!33, !25}
!34 = distinct !{!34, !25}


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

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@kGumboDefaultOptions = external constant %struct.GumboInternalOptions, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @wiki_registry_parse(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call ptr @gumbo_parse(ptr noundef %0) #5
  %3 = tail call ptr @list_new() #5
  %4 = getelementptr inbounds i8, ptr %2, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = tail call ptr @gumbo_get_element_by_id(ptr noundef nonnull @.str, ptr noundef %5) #5
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %.loopexit, label %7

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %6, i64 32
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %11, i64 32
  %.sroa.0.0.copyload = load ptr, ptr %12, align 8, !tbaa !13
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 40
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !14
  %13 = add i32 %.sroa.5.0.copyload, -1
  %14 = zext i32 %13 to i64
  %.not74 = icmp eq i32 %13, 0
  br i1 %.not74, label %.loopexit, label %.lr.ph72

.lr.ph72:                                         ; preds = %7, %60
  %.070 = phi i64 [ %61, %60 ], [ 0, %7 ]
  %15 = getelementptr inbounds ptr, ptr %.sroa.0.0.copyload, i64 %.070
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %16, i64 48
  %18 = load i32, ptr %17, align 8, !tbaa !12
  %.not52 = icmp eq i32 %18, 38
  br i1 %.not52, label %19, label %60

19:                                               ; preds = %.lr.ph72
  %20 = getelementptr inbounds i8, ptr %16, i64 112
  %21 = tail call ptr @gumbo_get_attribute(ptr noundef nonnull %20, ptr noundef nonnull @.str.1) #5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %60, label %23

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %21, i64 32
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %25, ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef 16) #6
  %.not53 = icmp eq i32 %26, 0
  br i1 %.not53, label %.preheader, label %60

.preheader:                                       ; preds = %23
  %27 = icmp ult i64 %.070, %14
  br i1 %27, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %33
  %.161 = phi i64 [ %34, %33 ], [ %.070, %.preheader ]
  %28 = getelementptr inbounds ptr, ptr %.sroa.0.0.copyload, i64 %.161
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %29, i64 48
  %31 = load i32, ptr %30, align 8, !tbaa !12
  %32 = icmp eq i32 %31, 30
  br i1 %32, label %._crit_edge, label %33

33:                                               ; preds = %.lr.ph
  %34 = add i64 %.161, 1
  %exitcond.not = icmp eq i64 %34, %14
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !20

._crit_edge:                                      ; preds = %33, %.lr.ph, %.preheader
  %.1.lcssa = phi i64 [ %.070, %.preheader ], [ %.161, %.lr.ph ], [ %14, %33 ]
  %.144 = phi ptr [ null, %.preheader ], [ %29, %.lr.ph ], [ %29, %33 ]
  %35 = tail call ptr @gumbo_get_elements_by_tag_name(ptr noundef nonnull @.str.3, ptr noundef %16) #5
  %36 = load ptr, ptr %35, align 8, !tbaa !22
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !24
  %39 = tail call ptr @gumbo_text_content(ptr noundef %38) #5
  %.not54 = icmp eq ptr %39, null
  br i1 %.not54, label %.loopexit, label %40

40:                                               ; preds = %._crit_edge
  %41 = tail call ptr @case_lower(ptr noundef nonnull %39) #5
  %42 = tail call ptr @trim(ptr noundef %41) #5
  %43 = tail call ptr @gumbo_get_elements_by_tag_name(ptr noundef nonnull @.str.4, ptr noundef %.144) #5
  %44 = tail call ptr @list_iterator_new(ptr noundef %43, i32 noundef 0) #5
  %45 = tail call ptr @list_iterator_next(ptr noundef %44) #5
  %.not5566 = icmp eq ptr %45, null
  br i1 %.not5566, label %._crit_edge69, label %.lr.ph68

.lr.ph68:                                         ; preds = %40, %.critedge
  %46 = phi ptr [ %59, %.critedge ], [ %45, %40 ]
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !24
  %49 = tail call ptr @parse_li(ptr noundef %48)
  %.not56 = icmp eq ptr %49, null
  br i1 %.not56, label %.critedge, label %50

50:                                               ; preds = %.lr.ph68
  %51 = getelementptr inbounds i8, ptr %49, i64 16
  %52 = load ptr, ptr %51, align 8, !tbaa !26
  %.not57 = icmp eq ptr %52, null
  br i1 %.not57, label %58, label %53

53:                                               ; preds = %50
  %54 = tail call noalias ptr @strdup(ptr noundef nonnull %39) #5
  %55 = getelementptr inbounds i8, ptr %49, i64 24
  store ptr %54, ptr %55, align 8, !tbaa !28
  %56 = tail call ptr @list_node_new(ptr noundef nonnull %49) #5
  %57 = tail call ptr @list_rpush(ptr noundef %3, ptr noundef %56) #5
  br label %.critedge

58:                                               ; preds = %50
  tail call void @wiki_package_free(ptr noundef nonnull %49)
  br label %.critedge

.critedge:                                        ; preds = %.lr.ph68, %58, %53
  %59 = tail call ptr @list_iterator_next(ptr noundef %44) #5
  %.not55 = icmp eq ptr %59, null
  br i1 %.not55, label %._crit_edge69, label %.lr.ph68, !llvm.loop !29

._crit_edge69:                                    ; preds = %.critedge, %40
  tail call void @list_iterator_destroy(ptr noundef %44) #5
  tail call void @list_destroy(ptr noundef %43) #5
  tail call void @free(ptr noundef %39) #5
  br label %60

60:                                               ; preds = %.lr.ph72, %23, %19, %._crit_edge69
  %.3.ph = phi i64 [ %.1.lcssa, %._crit_edge69 ], [ %.070, %19 ], [ %.070, %23 ], [ %.070, %.lr.ph72 ]
  %61 = add i64 %.3.ph, 1
  %62 = icmp ult i64 %61, %14
  br i1 %62, label %.lr.ph72, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %60, %._crit_edge, %7, %1
  tail call void @gumbo_destroy_output(ptr noundef nonnull @kGumboDefaultOptions, ptr noundef %2) #5
  ret ptr %3
}

declare ptr @gumbo_parse(ptr noundef) local_unnamed_addr #1

declare ptr @list_new() local_unnamed_addr #1

declare ptr @gumbo_get_element_by_id(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @gumbo_get_attribute(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #2

declare ptr @gumbo_get_elements_by_tag_name(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @gumbo_text_content(ptr noundef) local_unnamed_addr #1

declare ptr @trim(ptr noundef) local_unnamed_addr #1

declare ptr @case_lower(ptr noundef) local_unnamed_addr #1

declare ptr @list_iterator_new(ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @list_iterator_next(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @parse_li(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #3

declare ptr @list_rpush(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @list_node_new(ptr noundef) local_unnamed_addr #1

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

declare void @list_iterator_destroy(ptr noundef) local_unnamed_addr #1

declare void @list_destroy(ptr noundef) local_unnamed_addr #1

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

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

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 = { "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 nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 8}
!6 = !{!"GumboInternalOutput", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !7, i64 0, !11, i64 8, !11, i64 12}
!11 = !{!"int", !8, i64 0}
!12 = !{!8, !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !7, i64 32}
!16 = !{!"", !11, i64 0, !7, i64 8, !17, i64 16, !7, i64 32, !17, i64 40, !19, i64 56, !19, i64 68, !19, i64 80, !19, i64 92}
!17 = !{!"", !7, i64 0, !18, i64 8}
!18 = !{!"long", !8, i64 0}
!19 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !7, i64 0}
!23 = !{!"", !7, i64 0, !7, i64 8, !11, i64 16, !7, i64 24, !7, i64 32}
!24 = !{!25, !7, i64 16}
!25 = !{!"list_node", !7, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!27, !7, i64 16}
!27 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!28 = !{!27, !7, i64 24}
!29 = distinct !{!29, !21}
!30 = distinct !{!30, !21}


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