; LLVM IR from dynexcoin/Dynex :: external/miniupnpc (upnpcommands)

; 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.NameValueParserData = type { ptr, [64 x i8], ptr, i32, i32, ptr, i32 }
%struct.UPNParg = type { ptr, ptr }

@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [16 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 @simpleUPnPcommand(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @ParseNameValue(ptr noundef, i32 noundef, ptr noundef) #1

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

declare ptr @GetValueFromNameValueList(ptr noundef, ptr noundef) #1

declare void @ClearNameValueList(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
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @UPNP_AddAnyPortMapping(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #4 {
  %11 = alloca i32, align 4
  %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
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %struct.NameValueParserData, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 104, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %41

32:                                               ; preds = %10
  %33 = load ptr, ptr %16, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %41

38:                                               ; preds = %35
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %42, label %41

41:                                               ; preds = %38, %35, %32, %10
  store i32 -2, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %147

42:                                               ; preds = %38
  %43 = call noalias ptr @calloc(i64 noundef 9, i64 noundef 16) #6
  store ptr %43, ptr %22, align 8, !tbaa !5
  %44 = load ptr, ptr %22, align 8, !tbaa !5
  %45 = icmp eq ptr %44, null
  br i1 %45, label %46, label %47

46:                                               ; preds = %42
  store i32 -5, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %147

47:                                               ; preds = %42
  %48 = load ptr, ptr %22, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.UPNParg, ptr %48, i64 0
  %50 = getelementptr inbounds %struct.UPNParg, ptr %49, i32 0, i32 0
  store ptr @.str.22, ptr %50, align 8, !tbaa !9
  %51 = load ptr, ptr %19, align 8, !tbaa !5
  %52 = load ptr, ptr %22, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.UPNParg, ptr %52, i64 0
  %54 = getelementptr inbounds %struct.UPNParg, ptr %53, i32 0, i32 1
  store ptr %51, ptr %54, align 8, !tbaa !11
  %55 = load ptr, ptr %22, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.UPNParg, ptr %55, i64 1
  %57 = getelementptr inbounds %struct.UPNParg, ptr %56, i32 0, i32 0
  store ptr @.str.23, ptr %57, align 8, !tbaa !9
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = load ptr, ptr %22, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.UPNParg, ptr %59, i64 1
  %61 = getelementptr inbounds %struct.UPNParg, ptr %60, i32 0, i32 1
  store ptr %58, ptr %61, align 8, !tbaa !11
  %62 = load ptr, ptr %22, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.UPNParg, ptr %62, i64 2
  %64 = getelementptr inbounds %struct.UPNParg, ptr %63, i32 0, i32 0
  store ptr @.str.24, ptr %64, align 8, !tbaa !9
  %65 = load ptr, ptr %18, align 8, !tbaa !5
  %66 = load ptr, ptr %22, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.UPNParg, ptr %66, i64 2
  %68 = getelementptr inbounds %struct.UPNParg, ptr %67, i32 0, i32 1
  store ptr %65, ptr %68, align 8, !tbaa !11
  %69 = load ptr, ptr %22, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.UPNParg, ptr %69, i64 3
  %71 = getelementptr inbounds %struct.UPNParg, ptr %70, i32 0, i32 0
  store ptr @.str.25, ptr %71, align 8, !tbaa !9
  %72 = load ptr, ptr %15, align 8, !tbaa !5
  %73 = load ptr, ptr %22, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.UPNParg, ptr %73, i64 3
  %75 = getelementptr inbounds %struct.UPNParg, ptr %74, i32 0, i32 1
  store ptr %72, ptr %75, align 8, !tbaa !11
  %76 = load ptr, ptr %22, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.UPNParg, ptr %76, i64 4
  %78 = getelementptr inbounds %struct.UPNParg, ptr %77, i32 0, i32 0
  store ptr @.str.26, ptr %78, align 8, !tbaa !9
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = load ptr, ptr %22, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.UPNParg, ptr %80, i64 4
  %82 = getelementptr inbounds %struct.UPNParg, ptr %81, i32 0, i32 1
  store ptr %79, ptr %82, align 8, !tbaa !11
  %83 = load ptr, ptr %22, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.UPNParg, ptr %83, i64 5
  %85 = getelementptr inbounds %struct.UPNParg, ptr %84, i32 0, i32 0
  store ptr @.str.27, ptr %85, align 8, !tbaa !9
  %86 = load ptr, ptr %22, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.UPNParg, ptr %86, i64 5
  %88 = getelementptr inbounds %struct.UPNParg, ptr %87, i32 0, i32 1
  store ptr @.str.28, ptr %88, align 8, !tbaa !11
  %89 = load ptr, ptr %22, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.UPNParg, ptr %89, i64 6
  %91 = getelementptr inbounds %struct.UPNParg, ptr %90, i32 0, i32 0
  store ptr @.str.29, ptr %91, align 8, !tbaa !9
  %92 = load ptr, ptr %17, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %96

94:                                               ; preds = %47
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  br label %97

96:                                               ; preds = %47
  br label %97

97:                                               ; preds = %96, %94
  %98 = phi ptr [ %95, %94 ], [ @.str.30, %96 ]
  %99 = load ptr, ptr %22, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.UPNParg, ptr %99, i64 6
  %101 = getelementptr inbounds %struct.UPNParg, ptr %100, i32 0, i32 1
  store ptr %98, ptr %101, align 8, !tbaa !11
  %102 = load ptr, ptr %22, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.UPNParg, ptr %102, i64 7
  %104 = getelementptr inbounds %struct.UPNParg, ptr %103, i32 0, i32 0
  store ptr @.str.31, ptr %104, align 8, !tbaa !9
  %105 = load ptr, ptr %20, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %109

107:                                              ; preds = %97
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  br label %110

109:                                              ; preds = %97
  br label %110

110:                                              ; preds = %109, %107
  %111 = phi ptr [ %108, %107 ], [ @.str.32, %109 ]
  %112 = load ptr, ptr %22, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.UPNParg, ptr %112, i64 7
  %114 = getelementptr inbounds %struct.UPNParg, ptr %113, i32 0, i32 1
  store ptr %111, ptr %114, align 8, !tbaa !11
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load ptr, ptr %22, align 8, !tbaa !5
  %118 = call ptr @simpleUPnPcommand(i32 noundef -1, ptr noundef %115, ptr noundef %116, ptr noundef @.str.34, ptr noundef %117, ptr noundef %24)
  store ptr %118, ptr %23, align 8, !tbaa !5
  %119 = load ptr, ptr %22, align 8, !tbaa !5
  call void @free(ptr noundef %119) #5
  %120 = load ptr, ptr %23, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %123, label %122

122:                                              ; preds = %110
  store i32 -3, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %147

123:                                              ; preds = %110
  %124 = load ptr, ptr %23, align 8, !tbaa !5
  %125 = load i32, ptr %24, align 4, !tbaa !12
  call void @ParseNameValue(ptr noundef %124, i32 noundef %125, ptr noundef %25)
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  call void @free(ptr noundef %126) #5
  %127 = call ptr @GetValueFromNameValueList(ptr noundef %25, ptr noundef @.str.13)
  store ptr %127, ptr %26, align 8, !tbaa !5
  %128 = load ptr, ptr %26, align 8, !tbaa !5
  %129 = icmp ne ptr %128, null
  br i1 %129, label %130, label %133

130:                                              ; preds = %123
  store i32 -1, ptr %27, align 4, !tbaa !12
  %131 = load ptr, ptr %26, align 8, !tbaa !5
  %132 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %131, ptr noundef @.str.14, ptr noundef %27) #5
  br label %145

133:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %134 = call ptr @GetValueFromNameValueList(ptr noundef %25, ptr noundef @.str.35)
  store ptr %134, ptr %29, align 8, !tbaa !5
  %135 = load ptr, ptr %29, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %137, label %143

137:                                              ; preds = %133
  %138 = load ptr, ptr %21, align 8, !tbaa !5
  %139 = load ptr, ptr %29, align 8, !tbaa !5
  %140 = call ptr @strncpy(ptr noundef %138, ptr noundef %139, i64 noundef 6) #5
  %141 = load ptr, ptr %21, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 5
  store i8 0, ptr %142, align 1, !tbaa !14
  store i32 0, ptr %27, align 4, !tbaa !12
  br label %144

143:                                              ; preds = %133
  store i32 -4, ptr %27, align 4, !tbaa !12
  br label %144

144:                                              ; preds = %143, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %145

145:                                              ; preds = %144, %130
  call void @ClearNameValueList(ptr noundef %25)
  %146 = load i32, ptr %27, align 4, !tbaa !12
  store i32 %146, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %147

147:                                              ; preds = %145, %122, %46, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 104, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  %148 = load i32, ptr %11, align 4
  ret i32 %148
}

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 = { 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 allocsize(0,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 #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 allocsize(0,1) }

!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 = !{!"UPNParg", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!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"

%struct.NameValueParserData = type { ptr, [64 x i8], ptr, i32, i32, ptr, i32 }

@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [16 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

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

declare void @ParseNameValue(ptr noundef, i32 noundef, 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 #2

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

declare void @ClearNameValueList(ptr noundef) local_unnamed_addr #1

; 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: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @UPNP_AddAnyPortMapping(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #6 {
  %11 = alloca i32, align 4
  %12 = alloca %struct.NameValueParserData, align 8
  %13 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %14 = insertelement <4 x ptr> poison, ptr %3, i64 0
  %15 = insertelement <4 x ptr> %14, ptr %4, i64 1
  %16 = insertelement <4 x ptr> %15, ptr %6, i64 2
  %17 = insertelement <4 x ptr> %16, ptr %2, i64 3
  %18 = icmp eq <4 x ptr> %17, zeroinitializer
  %19 = bitcast <4 x i1> %18 to i4
  %20 = icmp eq i4 %19, 0
  br i1 %20, label %21, label %56

21:                                               ; preds = %10
  %22 = tail call noalias dereferenceable_or_null(144) ptr @calloc(i64 noundef 9, i64 noundef 16) #8
  %23 = icmp eq ptr %22, null
  br i1 %23, label %56, label %24

24:                                               ; preds = %21
  store ptr @.str.22, ptr %22, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %22, i64 8
  store ptr %7, ptr %25, align 8, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %22, i64 16
  store ptr @.str.23, ptr %26, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %22, i64 24
  store ptr %2, ptr %27, align 8, !tbaa !10
  %28 = getelementptr inbounds i8, ptr %22, i64 32
  store ptr @.str.24, ptr %28, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %22, i64 40
  store ptr %6, ptr %29, align 8, !tbaa !10
  %30 = getelementptr inbounds i8, ptr %22, i64 48
  store ptr @.str.25, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %22, i64 56
  store ptr %3, ptr %31, align 8, !tbaa !10
  %32 = getelementptr inbounds i8, ptr %22, i64 64
  store ptr @.str.26, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %22, i64 72
  store ptr %4, ptr %33, align 8, !tbaa !10
  %34 = getelementptr inbounds i8, ptr %22, i64 80
  store ptr @.str.27, ptr %34, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %22, i64 88
  store ptr @.str.28, ptr %35, align 8, !tbaa !10
  %36 = getelementptr inbounds i8, ptr %22, i64 96
  store ptr @.str.29, ptr %36, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  %37 = select i1 %.not, ptr @.str.30, ptr %5
  %38 = getelementptr inbounds i8, ptr %22, i64 104
  store ptr %37, ptr %38, align 8, !tbaa !10
  %39 = getelementptr inbounds i8, ptr %22, i64 112
  store ptr @.str.31, ptr %39, align 8, !tbaa !5
  %.not56 = icmp eq ptr %8, null
  %40 = select i1 %.not56, ptr @.str.32, ptr %8
  %41 = getelementptr inbounds i8, ptr %22, i64 120
  store ptr %40, ptr %41, align 8, !tbaa !10
  %42 = call ptr @simpleUPnPcommand(i32 noundef -1, ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str.34, ptr noundef nonnull %22, ptr noundef nonnull %11) #7
  call void @free(ptr noundef nonnull %22) #7
  %.not57 = icmp eq ptr %42, null
  br i1 %.not57, label %56, label %43

43:                                               ; preds = %24
  %44 = load i32, ptr %11, align 4, !tbaa !11
  call void @ParseNameValue(ptr noundef nonnull %42, i32 noundef %44, ptr noundef nonnull %12) #7
  call void @free(ptr noundef nonnull %42) #7
  %45 = call ptr @GetValueFromNameValueList(ptr noundef nonnull %12, ptr noundef nonnull @.str.13) #7
  %.not58 = icmp eq ptr %45, null
  br i1 %.not58, label %48, label %46

46:                                               ; preds = %43
  store i32 -1, ptr %13, align 4, !tbaa !11
  %47 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %45, ptr noundef nonnull @.str.14, ptr noundef nonnull %13) #7
  br label %54

48:                                               ; preds = %43
  %49 = call ptr @GetValueFromNameValueList(ptr noundef nonnull %12, ptr noundef nonnull @.str.35) #7
  %.not59 = icmp eq ptr %49, null
  br i1 %.not59, label %53, label %50

50:                                               ; preds = %48
  %51 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) %49, i64 noundef 6) #7
  %52 = getelementptr inbounds i8, ptr %9, i64 5
  store i8 0, ptr %52, align 1, !tbaa !13
  br label %53

53:                                               ; preds = %48, %50
  %storemerge = phi i32 [ 0, %50 ], [ -4, %48 ]
  store i32 %storemerge, ptr %13, align 4, !tbaa !11
  br label %54

54:                                               ; preds = %53, %46
  call void @ClearNameValueList(ptr noundef nonnull %12) #7
  %55 = load i32, ptr %13, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %24, %21, %10, %54
  %.0 = phi i32 [ %55, %54 ], [ -2, %10 ], [ -5, %21 ], [ -3, %24 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  ret i32 %.0
}

attributes #0 = { mustprogress 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 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { 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 #5 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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 = !{!"UPNParg", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!8, !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass