; LLVM IR from HewlettPackard/netperf :: src (netdrv_ethtool)

; 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.ifreq = type { %union.anon, %union.anon.0 }
%union.anon = type { [16 x i8] }
%union.anon.0 = type { %struct.ifmap }
%struct.ifmap = type { i64, i64, i16, i8, i8, i8 }
%struct.ethtool_drvinfo = type { i32, [32 x i8], [32 x i8], [32 x i8], [32 x i8], [32 x i8], [12 x i8], i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @find_driver_info(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.ifreq, align 8
  %16 = alloca %struct.ethtool_drvinfo, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 196, ptr %16) #6
  %18 = load i32, ptr %12, align 4, !tbaa !9
  %19 = icmp slt i32 %18, 32
  br i1 %19, label %20, label %21

20:                                               ; preds = %6
  store i32 1, ptr %17, align 4
  br label %200

21:                                               ; preds = %6
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call i32 @strcmp(ptr noundef %22, ptr noundef @.str) #7
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %62, label %25

25:                                               ; preds = %21
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = call ptr @strncpy(ptr noundef %26, ptr noundef @.str.1, i64 noundef %28) #6
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load i32, ptr %12, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call ptr @strncpy(ptr noundef %30, ptr noundef @.str.2, i64 noundef %32) #6
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %12, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call ptr @strncpy(ptr noundef %34, ptr noundef @.str.3, i64 noundef %36) #6
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = call ptr @strncpy(ptr noundef %38, ptr noundef @.str.3, i64 noundef %40) #6
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %42, i64 %45
  store i8 0, ptr %46, align 1, !tbaa !11
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i8, ptr %47, i64 %50
  store i8 0, ptr %51, align 1, !tbaa !11
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = sub nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %52, i64 %55
  store i8 0, ptr %56, align 1, !tbaa !11
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %57, i64 %60
  store i8 0, ptr %61, align 1, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %200

62:                                               ; preds = %21
  %63 = call i32 @socket(i32 noundef 2, i32 noundef 2, i32 noundef 0) #6
  store i32 %63, ptr %13, align 4, !tbaa !9
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = icmp slt i32 %64, 0
  br i1 %65, label %66, label %103

66:                                               ; preds = %62
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = call ptr @strncpy(ptr noundef %67, ptr noundef @.str.4, i64 noundef %69) #6
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call ptr @strncpy(ptr noundef %71, ptr noundef @.str.4, i64 noundef %73) #6
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = call ptr @strncpy(ptr noundef %75, ptr noundef @.str.4, i64 noundef %77) #6
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = call ptr @strncpy(ptr noundef %79, ptr noundef @.str.4, i64 noundef %81) #6
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i8, ptr %83, i64 %86
  store i8 0, ptr %87, align 1, !tbaa !11
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i8, ptr %88, i64 %91
  store i8 0, ptr %92, align 1, !tbaa !11
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i8, ptr %93, i64 %96
  store i8 0, ptr %97, align 1, !tbaa !11
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %98, i64 %101
  store i8 0, ptr %102, align 1, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %200

103:                                              ; preds = %62
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 40, i1 false)
  %104 = getelementptr inbounds %struct.ethtool_drvinfo, ptr %16, i32 0, i32 0
  store i32 3, ptr %104, align 4, !tbaa !12
  %105 = getelementptr inbounds %struct.ifreq, ptr %15, i32 0, i32 0
  %106 = getelementptr inbounds [16 x i8], ptr %105, i64 0, i64 0
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = call ptr @strncpy(ptr noundef %106, ptr noundef %107, i64 noundef 15) #6
  %109 = getelementptr inbounds %struct.ifreq, ptr %15, i32 0, i32 1
  store ptr %16, ptr %109, align 8, !tbaa !11
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = call i32 (i32, i64, ...) @ioctl(i32 noundef %110, i64 noundef 35142, ptr noundef %15) #6
  store i32 %111, ptr %14, align 4, !tbaa !9
  %112 = load i32, ptr %14, align 4, !tbaa !9
  %113 = icmp eq i32 %112, -1
  br i1 %113, label %114, label %153

114:                                              ; preds = %103
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = call ptr @strncpy(ptr noundef %115, ptr noundef @.str.5, i64 noundef %117) #6
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = call ptr @strncpy(ptr noundef %119, ptr noundef @.str.5, i64 noundef %121) #6
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = call ptr @strncpy(ptr noundef %123, ptr noundef @.str.5, i64 noundef %125) #6
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call ptr @strncpy(ptr noundef %127, ptr noundef @.str.5, i64 noundef %129) #6
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i8, ptr %131, i64 %134
  store i8 0, ptr %135, align 1, !tbaa !11
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = sub nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr %136, i64 %139
  store i8 0, ptr %140, align 1, !tbaa !11
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = load i32, ptr %12, align 4, !tbaa !9
  %143 = sub nsw i32 %142, 1
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i8, ptr %141, i64 %144
  store i8 0, ptr %145, align 1, !tbaa !11
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = sub nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i8, ptr %146, i64 %149
  store i8 0, ptr %150, align 1, !tbaa !11
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = call i32 @close(i32 noundef %151)
  store i32 1, ptr %17, align 4
  br label %200

153:                                              ; preds = %103
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ethtool_drvinfo, ptr %16, i32 0, i32 1
  %156 = getelementptr inbounds [32 x i8], ptr %155, i64 0, i64 0
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = call ptr @strncpy(ptr noundef %154, ptr noundef %156, i64 noundef %158) #6
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.ethtool_drvinfo, ptr %16, i32 0, i32 2
  %162 = getelementptr inbounds [32 x i8], ptr %161, i64 0, i64 0
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = call ptr @strncpy(ptr noundef %160, ptr noundef %162, i64 noundef %164) #6
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.ethtool_drvinfo, ptr %16, i32 0, i32 3
  %168 = getelementptr inbounds [32 x i8], ptr %167, i64 0, i64 0
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = call ptr @strncpy(ptr noundef %166, ptr noundef %168, i64 noundef %170) #6
  %172 = load ptr, ptr %11, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.ethtool_drvinfo, ptr %16, i32 0, i32 4
  %174 = getelementptr inbounds [32 x i8], ptr %173, i64 0, i64 0
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = call ptr @strncpy(ptr noundef %172, ptr noundef %174, i64 noundef %176) #6
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  %179 = load i32, ptr %12, align 4, !tbaa !9
  %180 = sub nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i8, ptr %178, i64 %181
  store i8 0, ptr %182, align 1, !tbaa !11
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = load i32, ptr %12, align 4, !tbaa !9
  %185 = sub nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i8, ptr %183, i64 %186
  store i8 0, ptr %187, align 1, !tbaa !11
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = sub nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds i8, ptr %188, i64 %191
  store i8 0, ptr %192, align 1, !tbaa !11
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = load i32, ptr %12, align 4, !tbaa !9
  %195 = sub nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i8, ptr %193, i64 %196
  store i8 0, ptr %197, align 1, !tbaa !11
  %198 = load i32, ptr %13, align 4, !tbaa !9
  %199 = call i32 @close(i32 noundef %198)
  store i32 1, ptr %17, align 4
  br label %200

200:                                              ; preds = %153, %114, %66, %25, %20
  call void @llvm.lifetime.end.p0(i64 196, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  ret void
}

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

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

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) #3

declare i32 @close(i32 noundef) #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"ethtool_drvinfo", !10, i64 0, !7, i64 4, !7, i64 36, !7, i64 68, !7, i64 100, !7, i64 132, !7, i64 164, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192}


; 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.ifreq = type { %union.anon, %union.anon.0 }
%union.anon = type { [16 x i8] }
%union.anon.0 = type { %struct.ifmap }
%struct.ifmap = type { i64, i64, i16, i8, i8, i8 }
%struct.ethtool_drvinfo = type { i32, [32 x i8], [32 x i8], [32 x i8], [32 x i8], [32 x i8], [12 x i8], i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @find_driver_info(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = alloca %struct.ifreq, align 8
  %8 = alloca %struct.ethtool_drvinfo, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 196, ptr nonnull %8) #7
  %9 = icmp slt i32 %5, 32
  br i1 %9, label %75, label %10

10:                                               ; preds = %6
  %11 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str) #8
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %12, label %24

12:                                               ; preds = %10
  %13 = zext nneg i32 %5 to i64
  %14 = tail call ptr @strncpy(ptr noundef %1, ptr noundef nonnull @.str.1, i64 noundef %13) #7
  %15 = tail call ptr @strncpy(ptr noundef %2, ptr noundef nonnull @.str.2, i64 noundef %13) #7
  %16 = tail call ptr @strncpy(ptr noundef %3, ptr noundef nonnull @.str.3, i64 noundef %13) #7
  %17 = tail call ptr @strncpy(ptr noundef %4, ptr noundef nonnull @.str.3, i64 noundef %13) #7
  %18 = add nsw i32 %5, -1
  %19 = zext nneg i32 %18 to i64
  %20 = getelementptr inbounds i8, ptr %1, i64 %19
  store i8 0, ptr %20, align 1, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %2, i64 %19
  store i8 0, ptr %21, align 1, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %3, i64 %19
  store i8 0, ptr %22, align 1, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %4, i64 %19
  store i8 0, ptr %23, align 1, !tbaa !5
  br label %75

24:                                               ; preds = %10
  %25 = tail call i32 @socket(i32 noundef 2, i32 noundef 2, i32 noundef 0) #7
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %39

27:                                               ; preds = %24
  %28 = zext nneg i32 %5 to i64
  %29 = tail call ptr @strncpy(ptr noundef %1, ptr noundef nonnull @.str.4, i64 noundef %28) #7
  %30 = tail call ptr @strncpy(ptr noundef %2, ptr noundef nonnull @.str.4, i64 noundef %28) #7
  %31 = tail call ptr @strncpy(ptr noundef %3, ptr noundef nonnull @.str.4, i64 noundef %28) #7
  %32 = tail call ptr @strncpy(ptr noundef %4, ptr noundef nonnull @.str.4, i64 noundef %28) #7
  %33 = add nsw i32 %5, -1
  %34 = zext nneg i32 %33 to i64
  %35 = getelementptr inbounds i8, ptr %1, i64 %34
  store i8 0, ptr %35, align 1, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %2, i64 %34
  store i8 0, ptr %36, align 1, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %3, i64 %34
  store i8 0, ptr %37, align 1, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %4, i64 %34
  store i8 0, ptr %38, align 1, !tbaa !5
  br label %75

39:                                               ; preds = %24
  %40 = getelementptr inbounds i8, ptr %7, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %40, i8 0, i64 32, i1 false)
  store i32 3, ptr %8, align 4, !tbaa !8
  %41 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) %0, i64 noundef 15) #7
  %42 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %8, ptr %42, align 8, !tbaa !5
  %43 = call i32 (i32, i64, ...) @ioctl(i32 noundef %25, i64 noundef 35142, ptr noundef nonnull %7) #7
  %44 = icmp eq i32 %43, -1
  br i1 %44, label %45, label %58

45:                                               ; preds = %39
  %46 = zext nneg i32 %5 to i64
  %47 = call ptr @strncpy(ptr noundef %1, ptr noundef nonnull @.str.5, i64 noundef %46) #7
  %48 = call ptr @strncpy(ptr noundef %2, ptr noundef nonnull @.str.5, i64 noundef %46) #7
  %49 = call ptr @strncpy(ptr noundef %3, ptr noundef nonnull @.str.5, i64 noundef %46) #7
  %50 = call ptr @strncpy(ptr noundef %4, ptr noundef nonnull @.str.5, i64 noundef %46) #7
  %51 = add nsw i32 %5, -1
  %52 = zext nneg i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %1, i64 %52
  store i8 0, ptr %53, align 1, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %2, i64 %52
  store i8 0, ptr %54, align 1, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %3, i64 %52
  store i8 0, ptr %55, align 1, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %4, i64 %52
  store i8 0, ptr %56, align 1, !tbaa !5
  %57 = call i32 @close(i32 noundef %25) #7
  br label %75

58:                                               ; preds = %39
  %59 = getelementptr inbounds i8, ptr %8, i64 4
  %60 = zext nneg i32 %5 to i64
  %61 = call ptr @strncpy(ptr noundef %1, ptr noundef nonnull %59, i64 noundef %60) #7
  %62 = getelementptr inbounds i8, ptr %8, i64 36
  %63 = call ptr @strncpy(ptr noundef %2, ptr noundef nonnull %62, i64 noundef %60) #7
  %64 = getelementptr inbounds i8, ptr %8, i64 68
  %65 = call ptr @strncpy(ptr noundef %3, ptr noundef nonnull %64, i64 noundef %60) #7
  %66 = getelementptr inbounds i8, ptr %8, i64 100
  %67 = call ptr @strncpy(ptr noundef %4, ptr noundef nonnull %66, i64 noundef %60) #7
  %68 = add nsw i32 %5, -1
  %69 = zext nneg i32 %68 to i64
  %70 = getelementptr inbounds i8, ptr %1, i64 %69
  store i8 0, ptr %70, align 1, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %2, i64 %69
  store i8 0, ptr %71, align 1, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %3, i64 %69
  store i8 0, ptr %72, align 1, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %4, i64 %69
  store i8 0, ptr %73, align 1, !tbaa !5
  %74 = call i32 @close(i32 noundef %25) #7
  br label %75

75:                                               ; preds = %6, %58, %45, %27, %12
  call void @llvm.lifetime.end.p0(i64 196, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  ret void
}

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

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

; 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: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) local_unnamed_addr #4

declare i32 @close(i32 noundef) local_unnamed_addr #6

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"ethtool_drvinfo", !10, i64 0, !6, i64 4, !6, i64 36, !6, i64 68, !6, i64 100, !6, i64 132, !6, i64 164, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192}
!10 = !{!"int", !6, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass