; LLVM IR from wkoszek/kmnsim :: src (all)

; 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.network = type { i64, %struct.nids, %struct.connlist, %struct.arptable, i32, i32, i32, i32, ptr, ptr, [1024 x i8] }
%struct.nids = type { ptr, ptr }
%struct.connlist = type { ptr, ptr }
%struct.arptable = type { ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@flag_debug = external dso_local global i32, align 4
@verbose = external dso_local global i32, align 4
@stderr = external global ptr, align 8
@.str.194 = external hidden unnamed_addr constant [12 x i8], align 1
@optarg = external global ptr, align 8
@.str.195 = external hidden unnamed_addr constant [18 x i8], align 1
@optind = external global i32, align 4
@.str.196 = external hidden unnamed_addr constant [21 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [7 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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 i32 @fprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @network_errmsg_get(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.network, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1112, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  store ptr null, ptr %9, align 8, !tbaa !9
  store ptr null, ptr %8, align 8, !tbaa !9
  store ptr null, ptr %7, align 8, !tbaa !9
  store ptr null, ptr %10, align 8, !tbaa !9
  br label %15

15:                                               ; preds = %42, %2
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !9
  %18 = call i32 @getopt(i32 noundef %16, ptr noundef %17, ptr noundef @.str.194) #5
  store i32 %18, ptr %14, align 4, !tbaa !5
  %19 = icmp ne i32 %18, -1
  br i1 %19, label %20, label %43

20:                                               ; preds = %15
  %21 = load i32, ptr %14, align 4, !tbaa !5
  switch i32 %21, label %38 [
    i32 97, label %22
    i32 100, label %23
    i32 68, label %26
    i32 104, label %28
    i32 83, label %31
    i32 84, label %33
    i32 118, label %35
  ]

22:                                               ; preds = %20
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %42

23:                                               ; preds = %20
  %24 = load i32, ptr @flag_debug, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr @flag_debug, align 4, !tbaa !5
  br label %42

26:                                               ; preds = %20
  %27 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %27, ptr %9, align 8, !tbaa !9
  br label %42

28:                                               ; preds = %20
  %29 = load i32, ptr %12, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %12, align 4, !tbaa !5
  br label %42

31:                                               ; preds = %20
  %32 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %32, ptr %7, align 8, !tbaa !9
  br label %42

33:                                               ; preds = %20
  %34 = load ptr, ptr @optarg, align 8, !tbaa !9
  store ptr %34, ptr %8, align 8, !tbaa !9
  br label %42

35:                                               ; preds = %20
  %36 = load i32, ptr @verbose, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr @verbose, align 4, !tbaa !5
  br label %42

38:                                               ; preds = %20
  %39 = load ptr, ptr @stderr, align 8, !tbaa !9
  %40 = load i32, ptr %14, align 4, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.195, i32 noundef %40) #5
  call void @exit(i32 noundef 1) #6
  unreachable

42:                                               ; preds = %35, %33, %31, %28, %26, %23, %22
  br label %15, !llvm.loop !11

43:                                               ; preds = %15
  %44 = load i32, ptr @optind, align 4, !tbaa !5
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sub nsw i32 %45, %44
  store i32 %46, ptr %4, align 4, !tbaa !5
  %47 = load i32, ptr @optind, align 4, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = sext i32 %47 to i64
  %50 = getelementptr inbounds ptr, ptr %48, i64 %49
  store ptr %50, ptr %5, align 8, !tbaa !9
  %51 = load i32, ptr %12, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %43
  call void @usage()
  br label %54

54:                                               ; preds = %53, %43
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  call void @usage()
  br label %58

58:                                               ; preds = %57, %54
  %59 = load ptr, ptr %5, align 8, !tbaa !9
  %60 = getelementptr inbounds ptr, ptr %59, i64 0
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  store ptr %61, ptr %10, align 8, !tbaa !9
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.196, ptr noundef @__func__.main, i32 noundef 2781, ptr noundef @.str.197, ptr noundef %62)
  %64 = load i32, ptr %13, align 4, !tbaa !5
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %78

66:                                               ; preds = %58
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  br label %71

70:                                               ; preds = %66
  call void @__assert_fail(ptr noundef @.str.198, ptr noundef @.str.2, i32 noundef 2784, ptr noundef @__PRETTY_FUNCTION__.main) #6
  unreachable

71:                                               ; preds = %69
  %72 = load ptr, ptr %10, align 8, !tbaa !9
  %73 = call ptr (ptr, ...) @strdupf(ptr noundef @.str.199, ptr noundef %72)
  store ptr %73, ptr %7, align 8, !tbaa !9
  %74 = load ptr, ptr %10, align 8, !tbaa !9
  %75 = call ptr (ptr, ...) @strdupf(ptr noundef @.str.200, ptr noundef %74)
  store ptr %75, ptr %9, align 8, !tbaa !9
  %76 = load ptr, ptr %10, align 8, !tbaa !9
  %77 = call ptr (ptr, ...) @strdupf(ptr noundef @.str.201, ptr noundef %76)
  store ptr %77, ptr %8, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %71, %58
  %79 = load ptr, ptr %10, align 8, !tbaa !9
  %80 = call i32 @network_init(ptr noundef %6, ptr noundef %79)
  %81 = call i32 @network_err_has(ptr noundef %6)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %87

83:                                               ; preds = %78
  %84 = load ptr, ptr @stderr, align 8, !tbaa !9
  %85 = call ptr @network_errmsg_get(ptr noundef %6)
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str.7, ptr noundef %85) #5
  call void @exit(i32 noundef 1) #6
  unreachable

87:                                               ; preds = %78
  br label %88

88:                                               ; preds = %95, %87
  %89 = call i32 @network_parse(ptr noundef %6)
  %90 = icmp ne i32 %89, -1
  %91 = zext i1 %90 to i32
  store i32 %91, ptr %11, align 4, !tbaa !5
  %92 = load i32, ptr %11, align 4, !tbaa !5
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %88
  br label %96

95:                                               ; preds = %88
  br label %88

96:                                               ; preds = %94
  %97 = call i32 @network_err_has(ptr noundef %6)
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %96
  %100 = call i32 @network_err_msg(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1112, ptr %6) #5
  ret i32 %100

101:                                              ; preds = %96
  %102 = call i32 @network_go(ptr noundef %6)
  %103 = load ptr, ptr %10, align 8, !tbaa !9
  %104 = load ptr, ptr %7, align 8, !tbaa !9
  %105 = load ptr, ptr %8, align 8, !tbaa !9
  %106 = load ptr, ptr %9, align 8, !tbaa !9
  %107 = call i32 @network_summarize(ptr noundef %6, ptr noundef %103, ptr noundef %104, ptr noundef %105, ptr noundef %106)
  %108 = call i32 @network_destroy(ptr noundef %6)
  call void @exit(i32 noundef 0) #6
  unreachable
}

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

; Function Attrs: nounwind uwtable
declare hidden void @usage() #4

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @network_parse(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare hidden i32 @network_go(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare hidden i32 @network_destroy(ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { "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 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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.network = type { i64, %struct.nids, %struct.connlist, %struct.arptable, i32, i32, i32, i32, ptr, ptr, [1024 x i8] }
%struct.nids = type { ptr, ptr }
%struct.connlist = type { ptr, ptr }
%struct.arptable = type { ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@flag_debug = external dso_local local_unnamed_addr global i32, align 4
@verbose = external dso_local local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.194 = external hidden unnamed_addr constant [12 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@.str.195 = external hidden unnamed_addr constant [18 x i8], align 1
@optind = external local_unnamed_addr global i32, align 4
@.str.196 = external hidden unnamed_addr constant [21 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [7 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @network_errmsg_get(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca %struct.network, align 8
  call void @llvm.lifetime.start.p0(i64 1112, ptr nonnull %3) #5
  br label %.outer

.outer:                                           ; preds = %13, %2
  %.028.ph = phi ptr [ %14, %13 ], [ null, %2 ]
  %.025.ph = phi ptr [ %.025.ph64, %13 ], [ null, %2 ]
  %.023.ph = phi ptr [ %.023.ph69, %13 ], [ null, %2 ]
  %.021.ph = phi i32 [ %.021.ph73, %13 ], [ 0, %2 ]
  %.0.ph = phi i32 [ %.0.ph76, %13 ], [ 0, %2 ]
  br label %.outer63

.outer63:                                         ; preds = %.outer, %15
  %.025.ph64 = phi ptr [ %.025.ph, %.outer ], [ %16, %15 ]
  %.023.ph65 = phi ptr [ %.023.ph, %.outer ], [ %.023.ph69, %15 ]
  %.021.ph66 = phi i32 [ %.021.ph, %.outer ], [ %.021.ph73, %15 ]
  %.0.ph67 = phi i32 [ %.0.ph, %.outer ], [ %.0.ph76, %15 ]
  br label %.outer68

.outer68:                                         ; preds = %.outer63, %9
  %.023.ph69 = phi ptr [ %.023.ph65, %.outer63 ], [ %10, %9 ]
  %.021.ph70 = phi i32 [ %.021.ph66, %.outer63 ], [ %.021.ph73, %9 ]
  %.0.ph71 = phi i32 [ %.0.ph67, %.outer63 ], [ %.0.ph76, %9 ]
  br label %.outer72

.outer72:                                         ; preds = %.outer68, %11
  %.021.ph73 = phi i32 [ %.021.ph70, %.outer68 ], [ %12, %11 ]
  %.0.ph74 = phi i32 [ %.0.ph71, %.outer68 ], [ %.0.ph76, %11 ]
  br label %.outer75

.outer75:                                         ; preds = %4, %.outer72
  %.0.ph76 = phi i32 [ %.0.ph74, %.outer72 ], [ 1, %4 ]
  br label %4

4:                                                ; preds = %.backedge, %.outer75
  %5 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.194) #5
  switch i32 %5, label %20 [
    i32 -1, label %23
    i32 97, label %.outer75
    i32 100, label %6
    i32 68, label %9
    i32 104, label %11
    i32 83, label %13
    i32 84, label %15
    i32 118, label %17
  ], !llvm.loop !5

6:                                                ; preds = %4
  %7 = load i32, ptr @flag_debug, align 4, !tbaa !7
  %8 = add nsw i32 %7, 1
  store i32 %8, ptr @flag_debug, align 4, !tbaa !7
  br label %.backedge

9:                                                ; preds = %4
  %10 = load ptr, ptr @optarg, align 8, !tbaa !11
  br label %.outer68, !llvm.loop !5

11:                                               ; preds = %4
  %12 = add nsw i32 %.021.ph73, 1
  br label %.outer72, !llvm.loop !5

13:                                               ; preds = %4
  %14 = load ptr, ptr @optarg, align 8, !tbaa !11
  br label %.outer, !llvm.loop !5

15:                                               ; preds = %4
  %16 = load ptr, ptr @optarg, align 8, !tbaa !11
  br label %.outer63, !llvm.loop !5

17:                                               ; preds = %4
  %18 = load i32, ptr @verbose, align 4, !tbaa !7
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr @verbose, align 4, !tbaa !7
  br label %.backedge

.backedge:                                        ; preds = %17, %6
  br label %4, !llvm.loop !5

20:                                               ; preds = %4
  %21 = load ptr, ptr @stderr, align 8, !tbaa !11
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.195, i32 noundef %5) #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

23:                                               ; preds = %4
  %24 = load i32, ptr @optind, align 4, !tbaa !7
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds ptr, ptr %1, i64 %25
  %.not33 = icmp eq i32 %.021.ph73, 0
  br i1 %.not33, label %28, label %27

27:                                               ; preds = %23
  tail call void @usage()
  br label %28

28:                                               ; preds = %27, %23
  %29 = icmp eq i32 %24, %0
  br i1 %29, label %30, label %31

30:                                               ; preds = %28
  tail call void @usage()
  br label %31

31:                                               ; preds = %30, %28
  %32 = load ptr, ptr %26, align 8, !tbaa !11
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.196, ptr noundef nonnull @__func__.main, i32 noundef 2781, ptr noundef nonnull @.str.197, ptr noundef %32)
  %.not34 = icmp eq i32 %.0.ph76, 0
  br i1 %.not34, label %40, label %34

34:                                               ; preds = %31
  %.not35 = icmp eq ptr %32, null
  br i1 %.not35, label %35, label %36

35:                                               ; preds = %34
  tail call void @__assert_fail(ptr noundef nonnull @.str.198, ptr noundef nonnull @.str.2, i32 noundef 2784, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #7
  unreachable

36:                                               ; preds = %34
  %37 = tail call ptr (ptr, ...) @strdupf(ptr noundef nonnull @.str.199, ptr noundef nonnull %32)
  %38 = tail call ptr (ptr, ...) @strdupf(ptr noundef nonnull @.str.200, ptr noundef nonnull %32)
  %39 = tail call ptr (ptr, ...) @strdupf(ptr noundef nonnull @.str.201, ptr noundef nonnull %32)
  br label %40

40:                                               ; preds = %36, %31
  %.230 = phi ptr [ %37, %36 ], [ %.028.ph, %31 ]
  %.227 = phi ptr [ %39, %36 ], [ %.025.ph64, %31 ]
  %.2 = phi ptr [ %38, %36 ], [ %.023.ph69, %31 ]
  %41 = call i32 @network_init(ptr noundef nonnull %3, ptr noundef %32)
  %42 = call i32 @network_err_has(ptr noundef nonnull %3)
  %.not36 = icmp eq i32 %42, 0
  br i1 %.not36, label %.preheader, label %43

43:                                               ; preds = %40
  %44 = load ptr, ptr @stderr, align 8, !tbaa !11
  %45 = call ptr @network_errmsg_get(ptr noundef nonnull %3)
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.7, ptr noundef %45) #6
  call void @exit(i32 noundef 1) #7
  unreachable

.preheader:                                       ; preds = %40, %.preheader
  %47 = call i32 @network_parse(ptr noundef nonnull %3)
  %.not37 = icmp eq i32 %47, -1
  br i1 %.not37, label %48, label %.preheader

48:                                               ; preds = %.preheader
  %49 = call i32 @network_err_has(ptr noundef nonnull %3)
  %.not38 = icmp eq i32 %49, 0
  br i1 %.not38, label %52, label %50

50:                                               ; preds = %48
  %51 = call i32 @network_err_msg(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 1112, ptr nonnull %3) #5
  ret i32 %51

52:                                               ; preds = %48
  %53 = call i32 @network_go(ptr noundef nonnull %3)
  %54 = call i32 @network_summarize(ptr noundef nonnull %3, ptr noundef %32, ptr noundef %.230, ptr noundef %.227, ptr noundef %.2)
  %55 = call i32 @network_destroy(ptr noundef nonnull %3)
  call void @exit(i32 noundef 0) #7
  unreachable
}

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @usage() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @strdupf(ptr noundef, ...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @network_init(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @network_err_has(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @network_parse(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @network_err_msg(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @network_go(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @network_summarize(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @network_destroy(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 = { cold nounwind }
attributes #7 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !9, i64 0}


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