; 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.52 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [9 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_AddPinhole(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) #4 {
  %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
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %struct.NameValueParserData, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 104, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %28 = load ptr, ptr %16, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %45

30:                                               ; preds = %9
  %31 = load ptr, ptr %15, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %45

33:                                               ; preds = %30
  %34 = load ptr, ptr %17, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %45

36:                                               ; preds = %33
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %45

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

42:                                               ; preds = %39
  %43 = load ptr, ptr %18, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %42, %39, %36, %33, %30, %9
  store i32 -2, ptr %10, align 4
  store i32 1, ptr %27, align 4
  br label %149

46:                                               ; preds = %42
  %47 = call noalias ptr @calloc(i64 noundef 7, i64 noundef 16) #7
  store ptr %47, ptr %20, align 8, !tbaa !5
  %48 = load ptr, ptr %20, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  store i32 -5, ptr %10, align 4
  store i32 1, ptr %27, align 4
  br label %149

51:                                               ; preds = %46
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = call i32 @strncmp(ptr noundef %52, ptr noundef @.str.59, i64 noundef 5) #8
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %62

55:                                               ; preds = %51
  %56 = load ptr, ptr %20, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.UPNParg, ptr %56, i64 0
  %58 = getelementptr inbounds %struct.UPNParg, ptr %57, i32 0, i32 0
  store ptr @.str.52, ptr %58, align 8, !tbaa !9
  %59 = load ptr, ptr %20, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.UPNParg, ptr %59, i64 0
  %61 = getelementptr inbounds %struct.UPNParg, ptr %60, i32 0, i32 1
  store ptr @.str.60, ptr %61, align 8, !tbaa !11
  br label %70

62:                                               ; preds = %51
  %63 = load ptr, ptr %20, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.UPNParg, ptr %63, i64 0
  %65 = getelementptr inbounds %struct.UPNParg, ptr %64, i32 0, i32 0
  store ptr @.str.52, ptr %65, align 8, !tbaa !9
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load ptr, ptr %20, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.UPNParg, ptr %67, i64 0
  %69 = getelementptr inbounds %struct.UPNParg, ptr %68, i32 0, i32 1
  store ptr %66, ptr %69, align 8, !tbaa !11
  br label %70

70:                                               ; preds = %62, %55
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.UPNParg, ptr %71, i64 1
  %73 = getelementptr inbounds %struct.UPNParg, ptr %72, i32 0, i32 0
  store ptr @.str.53, ptr %73, align 8, !tbaa !9
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = load ptr, ptr %20, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.UPNParg, ptr %75, i64 1
  %77 = getelementptr inbounds %struct.UPNParg, ptr %76, i32 0, i32 1
  store ptr %74, ptr %77, align 8, !tbaa !11
  %78 = load ptr, ptr %20, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.UPNParg, ptr %78, i64 2
  %80 = getelementptr inbounds %struct.UPNParg, ptr %79, i32 0, i32 0
  store ptr @.str.54, ptr %80, align 8, !tbaa !9
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.UPNParg, ptr %82, i64 2
  %84 = getelementptr inbounds %struct.UPNParg, ptr %83, i32 0, i32 1
  store ptr %81, ptr %84, align 8, !tbaa !11
  %85 = load ptr, ptr %20, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.UPNParg, ptr %85, i64 3
  %87 = getelementptr inbounds %struct.UPNParg, ptr %86, i32 0, i32 0
  store ptr @.str.55, ptr %87, align 8, !tbaa !9
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = load ptr, ptr %20, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.UPNParg, ptr %89, i64 3
  %91 = getelementptr inbounds %struct.UPNParg, ptr %90, i32 0, i32 1
  store ptr %88, ptr %91, align 8, !tbaa !11
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = call i32 @strncmp(ptr noundef %92, ptr noundef @.str.59, i64 noundef 5) #8
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %102

95:                                               ; preds = %70
  %96 = load ptr, ptr %20, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.UPNParg, ptr %96, i64 4
  %98 = getelementptr inbounds %struct.UPNParg, ptr %97, i32 0, i32 0
  store ptr @.str.56, ptr %98, align 8, !tbaa !9
  %99 = load ptr, ptr %20, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.UPNParg, ptr %99, i64 4
  %101 = getelementptr inbounds %struct.UPNParg, ptr %100, i32 0, i32 1
  store ptr @.str.60, ptr %101, align 8, !tbaa !11
  br label %110

102:                                              ; preds = %70
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.UPNParg, ptr %103, i64 4
  %105 = getelementptr inbounds %struct.UPNParg, ptr %104, i32 0, i32 0
  store ptr @.str.56, ptr %105, align 8, !tbaa !9
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.UPNParg, ptr %107, i64 4
  %109 = getelementptr inbounds %struct.UPNParg, ptr %108, i32 0, i32 1
  store ptr %106, ptr %109, align 8, !tbaa !11
  br label %110

110:                                              ; preds = %102, %95
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.UPNParg, ptr %111, i64 5
  %113 = getelementptr inbounds %struct.UPNParg, ptr %112, i32 0, i32 0
  store ptr @.str.61, ptr %113, align 8, !tbaa !9
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = load ptr, ptr %20, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.UPNParg, ptr %115, i64 5
  %117 = getelementptr inbounds %struct.UPNParg, ptr %116, i32 0, i32 1
  store ptr %114, ptr %117, align 8, !tbaa !11
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = load ptr, ptr %20, align 8, !tbaa !5
  %121 = call ptr @simpleUPnPcommand(i32 noundef -1, ptr noundef %118, ptr noundef %119, ptr noundef @.str.62, ptr noundef %120, ptr noundef %22)
  store ptr %121, ptr %21, align 8, !tbaa !5
  %122 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %122) #6
  %123 = load ptr, ptr %21, align 8, !tbaa !5
  %124 = icmp ne ptr %123, null
  br i1 %124, label %126, label %125

125:                                              ; preds = %110
  store i32 -3, ptr %10, align 4
  store i32 1, ptr %27, align 4
  br label %149

126:                                              ; preds = %110
  %127 = load ptr, ptr %21, align 8, !tbaa !5
  %128 = load i32, ptr %22, align 4, !tbaa !12
  call void @ParseNameValue(ptr noundef %127, i32 noundef %128, ptr noundef %23)
  %129 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %129) #6
  %130 = call ptr @GetValueFromNameValueList(ptr noundef %23, ptr noundef @.str.63)
  store ptr %130, ptr %25, align 8, !tbaa !5
  %131 = load ptr, ptr %25, align 8, !tbaa !5
  %132 = icmp ne ptr %131, null
  br i1 %132, label %133, label %139

133:                                              ; preds = %126
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = load ptr, ptr %25, align 8, !tbaa !5
  %136 = call ptr @strncpy(ptr noundef %134, ptr noundef %135, i64 noundef 8) #6
  %137 = load ptr, ptr %19, align 8, !tbaa !5
  %138 = getelementptr inbounds i8, ptr %137, i64 7
  store i8 0, ptr %138, align 1, !tbaa !14
  br label %139

139:                                              ; preds = %133, %126
  %140 = call ptr @GetValueFromNameValueList(ptr noundef %23, ptr noundef @.str.13)
  store ptr %140, ptr %24, align 8, !tbaa !5
  %141 = load ptr, ptr %24, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %146

143:                                              ; preds = %139
  store i32 -1, ptr %26, align 4, !tbaa !12
  %144 = load ptr, ptr %24, align 8, !tbaa !5
  %145 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %144, ptr noundef @.str.14, ptr noundef %26) #6
  br label %147

146:                                              ; preds = %139
  store i32 0, ptr %26, align 4, !tbaa !12
  br label %147

147:                                              ; preds = %146, %143
  call void @ClearNameValueList(ptr noundef %23)
  %148 = load i32, ptr %26, align 4, !tbaa !12
  store i32 %148, ptr %10, align 4
  store i32 1, ptr %27, align 4
  br label %149

149:                                              ; preds = %147, %125, %50, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %150 = load i32, ptr %10, align 4
  ret i32 %150
}

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

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 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { 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 = !{!"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.52 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [9 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_AddPinhole(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) local_unnamed_addr #6 {
  %10 = alloca i32, align 4
  %11 = alloca %struct.NameValueParserData, align 8
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %13 = insertelement <4 x ptr> poison, ptr %4, i64 0
  %14 = insertelement <4 x ptr> %13, ptr %5, i64 1
  %15 = insertelement <4 x ptr> %14, ptr %6, i64 2
  %16 = insertelement <4 x ptr> %15, ptr %2, i64 3
  %17 = icmp ne ptr %3, null
  %18 = icmp ne ptr %7, null
  %19 = icmp eq <4 x ptr> %16, zeroinitializer
  %20 = bitcast <4 x i1> %19 to i4
  %21 = icmp eq i4 %20, 0
  %op.rdx = and i1 %21, %17
  %op.rdx63 = and i1 %op.rdx, %18
  br i1 %op.rdx63, label %22, label %55

22:                                               ; preds = %9
  %23 = tail call noalias dereferenceable_or_null(112) ptr @calloc(i64 noundef 7, i64 noundef 16) #9
  %24 = icmp eq ptr %23, null
  br i1 %24, label %55, label %25

25:                                               ; preds = %22
  %26 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.59, i64 noundef 5) #10
  %27 = icmp eq i32 %26, 0
  %spec.select = select i1 %27, ptr @.str.60, ptr %2
  store ptr @.str.52, ptr %23, align 8
  %28 = getelementptr inbounds i8, ptr %23, i64 8
  store ptr %spec.select, ptr %28, align 8
  %29 = getelementptr inbounds i8, ptr %23, i64 16
  store ptr @.str.53, ptr %29, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %23, i64 24
  store ptr %3, ptr %30, align 8, !tbaa !10
  %31 = getelementptr inbounds i8, ptr %23, i64 32
  store ptr @.str.54, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %23, i64 40
  store ptr %6, ptr %32, align 8, !tbaa !10
  %33 = getelementptr inbounds i8, ptr %23, i64 48
  store ptr @.str.55, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %23, i64 56
  store ptr %5, ptr %34, align 8, !tbaa !10
  %35 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.59, i64 noundef 5) #10
  %36 = icmp eq i32 %35, 0
  %.sink62 = select i1 %36, ptr @.str.60, ptr %4
  %37 = getelementptr inbounds i8, ptr %23, i64 64
  store ptr @.str.56, ptr %37, align 8
  %38 = getelementptr inbounds i8, ptr %23, i64 72
  store ptr %.sink62, ptr %38, align 8
  %39 = getelementptr inbounds i8, ptr %23, i64 80
  store ptr @.str.61, ptr %39, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %23, i64 88
  store ptr %7, ptr %40, align 8, !tbaa !10
  %41 = call ptr @simpleUPnPcommand(i32 noundef -1, ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str.62, ptr noundef nonnull %23, ptr noundef nonnull %10) #8
  call void @free(ptr noundef nonnull %23) #8
  %.not = icmp eq ptr %41, null
  br i1 %.not, label %55, label %42

42:                                               ; preds = %25
  %43 = load i32, ptr %10, align 4, !tbaa !11
  call void @ParseNameValue(ptr noundef nonnull %41, i32 noundef %43, ptr noundef nonnull %11) #8
  call void @free(ptr noundef nonnull %41) #8
  %44 = call ptr @GetValueFromNameValueList(ptr noundef nonnull %11, ptr noundef nonnull @.str.63) #8
  %.not60 = icmp eq ptr %44, null
  br i1 %.not60, label %48, label %45

45:                                               ; preds = %42
  %46 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) %44, i64 noundef 8) #8
  %47 = getelementptr inbounds i8, ptr %8, i64 7
  store i8 0, ptr %47, align 1, !tbaa !13
  br label %48

48:                                               ; preds = %45, %42
  %49 = call ptr @GetValueFromNameValueList(ptr noundef nonnull %11, ptr noundef nonnull @.str.13) #8
  %.not61 = icmp eq ptr %49, null
  br i1 %.not61, label %52, label %50

50:                                               ; preds = %48
  store i32 -1, ptr %12, align 4, !tbaa !11
  %51 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %49, ptr noundef nonnull @.str.14, ptr noundef nonnull %12) #8
  br label %53

52:                                               ; preds = %48
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %53

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

55:                                               ; preds = %25, %22, %9, %53
  %.0 = phi i32 [ %54, %53 ], [ -2, %9 ], [ -5, %22 ], [ -3, %25 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  ret i32 %.0
}

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

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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { 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 = !{!"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,JumpThreadingPass,MergedLoadStoreMotionPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass