; LLVM IR from pupnp/pupnp :: ixml/src (element)

; 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._IXML_Node = type { ptr, ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._IXML_Element = type { %struct._IXML_Node, ptr }
%struct._IXML_ATTR = type { %struct._IXML_Node, i32, ptr }

@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

declare i32 @Parser_isValidXmlName(ptr noundef) #3

declare void @ixmlAttr_free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @ixmlElement_setAttributeNS(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct._IXML_Node, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 104, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %26, label %17

17:                                               ; preds = %4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %26, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %26, label %23

23:                                               ; preds = %20
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23, %20, %17, %4
  store i32 105, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

27:                                               ; preds = %23
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = call i32 @Parser_isValidXmlName(ptr noundef %28)
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %27
  store i32 5, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

32:                                               ; preds = %27
  call void @ixmlNode_init(ptr noundef %11)
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noalias ptr @strdup(ptr noundef %33) #5
  %35 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 0
  store ptr %34, ptr %35, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %40

39:                                               ; preds = %32
  store i32 102, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

40:                                               ; preds = %32
  %41 = call i32 @Parser_setNodePrefixAndLocalName(ptr noundef %11)
  store i32 %41, ptr %13, align 4, !tbaa !12
  %42 = load i32, ptr %13, align 4, !tbaa !12
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %46

44:                                               ; preds = %40
  call void @Parser_freeNodeContent(ptr noundef %11)
  %45 = load i32, ptr %13, align 4, !tbaa !12
  store i32 %45, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

46:                                               ; preds = %40
  %47 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %53

50:                                               ; preds = %46
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = icmp eq ptr %51, null
  br i1 %52, label %74, label %53

53:                                               ; preds = %50, %46
  %54 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %66

57:                                               ; preds = %53
  %58 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  %60 = call i32 @strcmp(ptr noundef %59, ptr noundef @.str.2) #6
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %66

62:                                               ; preds = %57
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = call i32 @strcmp(ptr noundef %63, ptr noundef @.str.3) #6
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %74, label %66

66:                                               ; preds = %62, %57, %53
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = call i32 @strcmp(ptr noundef %67, ptr noundef @.str.4) #6
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %75

70:                                               ; preds = %66
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = call i32 @strcmp(ptr noundef %71, ptr noundef @.str.5) #6
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %70, %62, %50
  call void @Parser_freeNodeContent(ptr noundef %11)
  store i32 14, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

75:                                               ; preds = %70, %66
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._IXML_Element, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds %struct._IXML_Node, ptr %77, i32 0, i32 11
  %79 = load ptr, ptr %78, align 8, !tbaa !14
  store ptr %79, ptr %10, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %103, %75
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %104

83:                                               ; preds = %80
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._IXML_Node, ptr %84, i32 0, i32 5
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 5
  %88 = load ptr, ptr %87, align 8, !tbaa !16
  %89 = call i32 @strcmp(ptr noundef %86, ptr noundef %88) #6
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %99

91:                                               ; preds = %83
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._IXML_Node, ptr %92, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = call i32 @strcmp(ptr noundef %94, ptr noundef %95) #6
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %91
  br label %104

99:                                               ; preds = %91, %83
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._IXML_Node, ptr %100, i32 0, i32 10
  %102 = load ptr, ptr %101, align 8, !tbaa !18
  store ptr %102, ptr %10, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %99
  br label %80, !llvm.loop !19

104:                                              ; preds = %98, %80
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %160

107:                                              ; preds = %104
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._IXML_Node, ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %116

112:                                              ; preds = %107
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._IXML_Node, ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  call void @free(ptr noundef %115) #5
  br label %116

116:                                              ; preds = %112, %107
  %117 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 4
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %132

120:                                              ; preds = %116
  %121 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !13
  %123 = call noalias ptr @strdup(ptr noundef %122) #5
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._IXML_Node, ptr %124, i32 0, i32 4
  store ptr %123, ptr %125, align 8, !tbaa !13
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._IXML_Node, ptr %126, i32 0, i32 4
  %128 = load ptr, ptr %127, align 8, !tbaa !13
  %129 = icmp eq ptr %128, null
  br i1 %129, label %130, label %131

130:                                              ; preds = %120
  call void @Parser_freeNodeContent(ptr noundef %11)
  store i32 102, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

131:                                              ; preds = %120
  br label %137

132:                                              ; preds = %116
  %133 = getelementptr inbounds %struct._IXML_Node, ptr %11, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !13
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._IXML_Node, ptr %135, i32 0, i32 4
  store ptr %134, ptr %136, align 8, !tbaa !13
  br label %137

137:                                              ; preds = %132, %131
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._IXML_Node, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %146

142:                                              ; preds = %137
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._IXML_Node, ptr %143, i32 0, i32 1
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  call void @free(ptr noundef %145) #5
  br label %146

146:                                              ; preds = %142, %137
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = call noalias ptr @strdup(ptr noundef %147) #5
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._IXML_Node, ptr %149, i32 0, i32 1
  store ptr %148, ptr %150, align 8, !tbaa !21
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct._IXML_Node, ptr %151, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !21
  %154 = icmp eq ptr %153, null
  br i1 %154, label %155, label %159

155:                                              ; preds = %146
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._IXML_Node, ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !13
  call void @free(ptr noundef %158) #5
  call void @Parser_freeNodeContent(ptr noundef %11)
  store i32 102, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

159:                                              ; preds = %146
  br label %193

160:                                              ; preds = %104
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._IXML_Element, ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds %struct._IXML_Node, ptr %162, i32 0, i32 12
  %164 = load ptr, ptr %163, align 8, !tbaa !22
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = call i32 @ixmlDocument_createAttributeNSEx(ptr noundef %164, ptr noundef %165, ptr noundef %166, ptr noundef %12)
  store i32 %167, ptr %13, align 4, !tbaa !12
  %168 = load i32, ptr %13, align 4, !tbaa !12
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %172

170:                                              ; preds = %160
  call void @Parser_freeNodeContent(ptr noundef %11)
  %171 = load i32, ptr %13, align 4, !tbaa !12
  store i32 %171, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

172:                                              ; preds = %160
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = call noalias ptr @strdup(ptr noundef %173) #5
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._IXML_ATTR, ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds %struct._IXML_Node, ptr %176, i32 0, i32 1
  store ptr %174, ptr %177, align 8, !tbaa !23
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct._IXML_ATTR, ptr %178, i32 0, i32 0
  %180 = getelementptr inbounds %struct._IXML_Node, ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !23
  %182 = icmp eq ptr %181, null
  br i1 %182, label %183, label %185

183:                                              ; preds = %172
  %184 = load ptr, ptr %12, align 8, !tbaa !5
  call void @ixmlAttr_free(ptr noundef %184)
  call void @Parser_freeNodeContent(ptr noundef %11)
  store i32 102, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

185:                                              ; preds = %172
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = call i32 @ixmlElement_setAttributeNodeNS(ptr noundef %186, ptr noundef %187, ptr noundef %12)
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %185
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  call void @ixmlAttr_free(ptr noundef %191)
  call void @Parser_freeNodeContent(ptr noundef %11)
  store i32 106, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

192:                                              ; preds = %185
  br label %193

193:                                              ; preds = %192, %159
  call void @Parser_freeNodeContent(ptr noundef %11)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %194

194:                                              ; preds = %193, %190, %183, %170, %155, %130, %74, %44, %39, %31, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %195 = load i32, ptr %5, align 4
  ret i32 %195
}

declare void @ixmlNode_init(ptr noundef) #3

declare i32 @Parser_setNodePrefixAndLocalName(ptr noundef) #3

declare void @Parser_freeNodeContent(ptr noundef) #3

declare i32 @ixmlDocument_createAttributeNSEx(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #3 = { "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 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_IXML_Node", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 32}
!14 = !{!15, !6, i64 88}
!15 = !{!"_IXML_Element", !10, i64 0, !6, i64 104}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 24}
!18 = !{!10, !6, i64 80}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !6, i64 8}
!22 = !{!15, !6, i64 96}
!23 = !{!24, !6, i64 8}
!24 = !{!"_IXML_ATTR", !10, i64 0, !11, i64 104, !6, i64 112}


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

@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1

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

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

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

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

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

declare i32 @Parser_isValidXmlName(ptr noundef) local_unnamed_addr #4

declare void @ixmlAttr_free(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local i32 @ixmlElement_setAttributeNS(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef readonly %3) local_unnamed_addr #5 {
  %5 = alloca %struct._IXML_Node, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %7 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %8 = insertelement <4 x ptr> %7, ptr %1, i64 1
  %9 = insertelement <4 x ptr> %8, ptr %2, i64 2
  %10 = insertelement <4 x ptr> %9, ptr %3, i64 3
  %11 = icmp eq <4 x ptr> %10, zeroinitializer
  %12 = bitcast <4 x i1> %11 to i4
  %.not71 = icmp eq i4 %12, 0
  br i1 %.not71, label %13, label %82

13:                                               ; preds = %4
  %14 = tail call i32 @Parser_isValidXmlName(ptr noundef nonnull %2) #6
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %82, label %16

16:                                               ; preds = %13
  call void @ixmlNode_init(ptr noundef nonnull %5) #6
  %17 = call noalias ptr @strdup(ptr noundef nonnull %2) #6
  store ptr %17, ptr %5, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %82, label %19

19:                                               ; preds = %16
  %20 = call i32 @Parser_setNodePrefixAndLocalName(ptr noundef nonnull %5) #6
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %21, label %.sink.split

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %5, i64 32
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %.not55 = icmp eq ptr %23, null
  br i1 %.not55, label %29, label %24

24:                                               ; preds = %21
  %25 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %23, ptr noundef nonnull dereferenceable(1) @.str.2) #7
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.3) #7
  %.not56 = icmp eq i32 %28, 0
  br i1 %.not56, label %29, label %.sink.split

29:                                               ; preds = %27, %24, %21
  %30 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.4) #7
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %29
  %33 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.5) #7
  %.not57 = icmp eq i32 %33, 0
  br i1 %.not57, label %34, label %.sink.split

34:                                               ; preds = %32, %29
  %35 = getelementptr inbounds i8, ptr %0, i64 88
  %.065 = load ptr, ptr %35, align 8, !tbaa !12
  %.not5866 = icmp eq ptr %.065, null
  br i1 %.not5866, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %34
  %36 = getelementptr inbounds i8, ptr %5, i64 40
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  br label %38

38:                                               ; preds = %.lr.ph, %48
  %.067 = phi ptr [ %.065, %.lr.ph ], [ %.0, %48 ]
  %39 = getelementptr inbounds i8, ptr %.067, i64 40
  %40 = load ptr, ptr %39, align 8, !tbaa !13
  %41 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %40, ptr noundef nonnull dereferenceable(1) %37) #7
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %48

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %.067, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %45, ptr noundef nonnull dereferenceable(1) %1) #7
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %50, label %48

48:                                               ; preds = %43, %38
  %49 = getelementptr inbounds i8, ptr %.067, i64 80
  %.0 = load ptr, ptr %49, align 8, !tbaa !12
  %.not58 = icmp eq ptr %.0, null
  br i1 %.not58, label %.critedge, label %38, !llvm.loop !15

50:                                               ; preds = %43
  %51 = getelementptr inbounds i8, ptr %.067, i64 32
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %.not61 = icmp eq ptr %52, null
  br i1 %.not61, label %54, label %53

53:                                               ; preds = %50
  call void @free(ptr noundef nonnull %52) #6
  %.pre = load ptr, ptr %22, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %53, %50
  %55 = phi ptr [ %.pre, %53 ], [ %23, %50 ]
  %.not62 = icmp eq ptr %55, null
  br i1 %.not62, label %59, label %56

56:                                               ; preds = %54
  %57 = call noalias ptr @strdup(ptr noundef nonnull %55) #6
  store ptr %57, ptr %51, align 8, !tbaa !11
  %58 = icmp eq ptr %57, null
  br i1 %58, label %.sink.split, label %60

59:                                               ; preds = %54
  store ptr null, ptr %51, align 8, !tbaa !11
  br label %60

60:                                               ; preds = %56, %59
  %61 = getelementptr inbounds i8, ptr %.067, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !17
  %.not63 = icmp eq ptr %62, null
  br i1 %.not63, label %64, label %63

63:                                               ; preds = %60
  call void @free(ptr noundef nonnull %62) #6
  br label %64

64:                                               ; preds = %63, %60
  %65 = call noalias ptr @strdup(ptr noundef %3) #6
  store ptr %65, ptr %61, align 8, !tbaa !17
  %66 = icmp eq ptr %65, null
  br i1 %66, label %67, label %.sink.split

67:                                               ; preds = %64
  %68 = load ptr, ptr %51, align 8, !tbaa !11
  call void @free(ptr noundef %68) #6
  br label %.sink.split

.critedge:                                        ; preds = %48, %34
  %69 = getelementptr inbounds i8, ptr %0, i64 96
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = call i32 @ixmlDocument_createAttributeNSEx(ptr noundef %70, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %6) #6
  %.not59 = icmp eq i32 %71, 0
  br i1 %.not59, label %72, label %.sink.split

72:                                               ; preds = %.critedge
  %73 = call noalias ptr @strdup(ptr noundef %3) #6
  %74 = load ptr, ptr %6, align 8, !tbaa !12
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  store ptr %73, ptr %75, align 8, !tbaa !20
  %76 = icmp eq ptr %73, null
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  call void @ixmlAttr_free(ptr noundef nonnull %74) #6
  br label %.sink.split

78:                                               ; preds = %72
  %79 = call i32 @ixmlElement_setAttributeNodeNS(ptr noundef nonnull %0, ptr noundef nonnull %74, ptr noundef nonnull %6)
  %.not60 = icmp eq i32 %79, 0
  br i1 %.not60, label %.sink.split, label %80

80:                                               ; preds = %78
  %81 = load ptr, ptr %6, align 8, !tbaa !12
  call void @ixmlAttr_free(ptr noundef %81) #6
  br label %.sink.split

.sink.split:                                      ; preds = %64, %78, %.critedge, %56, %27, %32, %19, %67, %77, %80
  %.044.ph = phi i32 [ 106, %80 ], [ 102, %77 ], [ 102, %67 ], [ %20, %19 ], [ 14, %32 ], [ 14, %27 ], [ 102, %56 ], [ %71, %.critedge ], [ 0, %78 ], [ 0, %64 ]
  call void @Parser_freeNodeContent(ptr noundef nonnull %5) #6
  br label %82

82:                                               ; preds = %.sink.split, %16, %13, %4
  %.044 = phi i32 [ 105, %4 ], [ 5, %13 ], [ 102, %16 ], [ %.044.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %5) #6
  ret i32 %.044
}

declare void @ixmlNode_init(ptr noundef) local_unnamed_addr #4

declare i32 @Parser_setNodePrefixAndLocalName(ptr noundef) local_unnamed_addr #4

declare void @Parser_freeNodeContent(ptr noundef) local_unnamed_addr #4

declare i32 @ixmlDocument_createAttributeNSEx(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { "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 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 #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, !7, i64 0}
!6 = !{!"_IXML_Node", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 40}
!14 = !{!6, !7, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!6, !7, i64 8}
!18 = !{!19, !7, i64 96}
!19 = !{!"_IXML_Element", !6, i64 0, !7, i64 104}
!20 = !{!21, !7, i64 8}
!21 = !{!"_IXML_ATTR", !6, i64 0, !10, i64 104, !7, i64 112}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass