; LLVM IR from CerebusOSS/CereLink :: cbhwlib/CCFUtils.ll (ZN8CCFUtils7SendCCFEv)

; 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.cbPKT_SS_STATISTICS = type { %struct.cbPKT_HEADER, i32, i32, i32, float, float, float, float, float, float, float, i32, i32 }
%struct.cbPKT_HEADER = type { i64, i16, i16, i16, i8, i8 }
%class.CCFUtils = type <{ ptr, ptr, i8, [7 x i8], ptr, i8, [7 x i8], ptr, i32, i32, i32, [4 x i8], ptr, i8, i8, [6 x i8] }>
%class.CCFUtilsXml_v1 = type { %class.CCFUtilsBinary, %struct.cbCCF }
%class.CCFUtilsBinary = type { %class.CCFUtils.base, [2 x i8], %"struct.ccf::ccfBinaryData" }
%class.CCFUtils.base = type <{ ptr, ptr, i8, [7 x i8], ptr, i8, [7 x i8], ptr, i32, i32, i32, [4 x i8], ptr, i8, i8 }>
%"struct.ccf::ccfBinaryData" = type <{ [160 x %struct.cbPKT_CHANINFO], %"struct.ccf::cbPKT_ADAPTFILTINFO_CB2005_37", %"struct.ccf::cbPKT_SS_DETECT_CB2005_37", %"struct.ccf::cbPKT_SS_ARTIF_REJECT_CB2005_37", [144 x %"struct.ccf::cbPKT_SS_NOISE_BOUNDARY_CB2005_37_type"], %"struct.ccf::cbPKT_SS_STATISTICS_CB2005_37_type", %"struct.ccf::cbPKT_SS_STATUS_CB2005_37", %"struct.ccf::cbPKT_SYSINFO_CB2005_37", [72 x %"struct.ccf::cbPKT_NTRODEINFO_CB2005_37"] }>
%struct.cbPKT_CHANINFO = type { %struct.cbPKT_HEADER, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.cbSCALING, %struct.cbFILTDESC, %struct.cbSCALING, %struct.cbFILTDESC, [16 x i8], i32, [4 x i32], %struct.cbSCALING, %struct.cbSCALING, i32, i32, i32, i32, %union.anon, i8, [2 x i8], i8, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32, [5 x %struct.cbMANUALUNITMAPPING], [5 x [4 x %struct.cbHOOP]] }
%struct.cbFILTDESC = type { [16 x i8], i32, i32, i32, i32, i32, i32 }
%struct.cbSCALING = type { i16, i16, i32, i32, i32, [8 x i8] }
%union.anon = type { %struct.anon }
%struct.anon = type { i16, i16, i32 }
%struct.cbMANUALUNITMAPPING = type { i16, [3 x i16], [3 x [3 x i16]], i16, i32 }
%struct.cbHOOP = type { i16, i16, i16, i16 }
%"struct.ccf::cbPKT_ADAPTFILTINFO_CB2005_37" = type { i32, i16, i8, i8, i32, i32, float, i32, i32 }
%"struct.ccf::cbPKT_SS_DETECT_CB2005_37" = type { i32, i16, i8, i8, float, float }
%"struct.ccf::cbPKT_SS_ARTIF_REJECT_CB2005_37" = type { i32, i16, i8, i8, i32, i32 }
%"struct.ccf::cbPKT_SS_NOISE_BOUNDARY_CB2005_37_type" = type { i32, i16, i8, i8, i32, [3 x float], [3 x [3 x float]] }
%"struct.ccf::cbPKT_SS_STATISTICS_CB2005_37_type" = type { i32, i16, i8, i8, i32, i32, i32, float, float, float, float, float, float, float, i32, i32 }
%"struct.ccf::cbPKT_SS_STATUS_CB2005_37" = type { i32, i16, i8, i8, %"struct.ccf::cbAdaptControl_37", %"struct.ccf::cbAdaptControl_37" }
%"struct.ccf::cbAdaptControl_37" = type { i32, float, float }
%"struct.ccf::cbPKT_SYSINFO_CB2005_37" = type { i32, i16, i8, i8, i32, i32, i32, i32, i32, i32 }
%"struct.ccf::cbPKT_NTRODEINFO_CB2005_37" = type { i32, i16, i8, i8, i32, [16 x i8], [6 x [5 x %"struct.ccf::cbMANUALUNITMAPPING_37"]], i16, i16, [4 x i16] }
%"struct.ccf::cbMANUALUNITMAPPING_37" = type { i16, [3 x i16], [3 x [3 x i16]], i16, i32 }
%struct.cbCCF = type <{ [596 x %struct.cbPKT_CHANINFO], %struct.cbPKT_ADAPTFILTINFO, %struct.cbPKT_SS_DETECT, %struct.cbPKT_SS_ARTIF_REJECT, [560 x %struct.cbPKT_SS_NOISE_BOUNDARY], %struct.cbPKT_SS_STATISTICS, %struct.cbPKT_SS_STATUS, %struct.cbPKT_SYSINFO, [280 x %struct.cbPKT_NTRODEINFO], [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], [4 x %struct.cbPKT_FILTINFO], %struct.cbPKT_LNC }>
%struct.cbPKT_ADAPTFILTINFO = type <{ %struct.cbPKT_HEADER, i32, i32, float, i32, i32 }>
%struct.cbPKT_SS_DETECT = type { %struct.cbPKT_HEADER, float, float }
%struct.cbPKT_SS_ARTIF_REJECT = type { %struct.cbPKT_HEADER, i32, i32 }
%struct.cbPKT_SS_NOISE_BOUNDARY = type <{ %struct.cbPKT_HEADER, i32, [3 x float], [3 x [3 x float]] }>
%struct.cbPKT_SS_STATUS = type { %struct.cbPKT_HEADER, %struct.cbAdaptControl, %struct.cbAdaptControl }
%struct.cbAdaptControl = type { i32, float, float }
%struct.cbPKT_SYSINFO = type { %struct.cbPKT_HEADER, i32, i32, i32, i32, i32, i32 }
%struct.cbPKT_NTRODEINFO = type { %struct.cbPKT_HEADER, i32, [16 x i8], [6 x [5 x %struct.cbMANUALUNITMAPPING]], i16, i16, [4 x i16] }
%struct.cbPKT_AOUT_WAVEFORM = type { %struct.cbPKT_HEADER, i16, i16, i32, i8, i8, i16, i16, i8, i8, %struct.cbWaveformData }
%struct.cbWaveformData = type { i16, %union.anon.1 }
%union.anon.1 = type { %struct.anon.3 }
%struct.anon.3 = type { i16, i16, i16, [246 x i16], [246 x i16] }
%struct.cbPKT_FILTINFO = type { %struct.cbPKT_HEADER, i32, i32, [16 x i8], i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double }
%struct.cbPKT_LNC = type <{ %struct.cbPKT_HEADER, i32, i32, i32 }>

@_ZTI14CCFUtilsXml_v1 = external constant ptr
@_ZTI8CCFUtils = external dso_local constant { ptr, ptr }, align 8
@cb_pc_status_buffer_ptr = external global [4 x ptr], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8CCFUtils18GetInternalVersionEv(ptr noundef nonnull align 8 dereferenceable(74)) #0 align 2

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8CCFUtils7SendCCFEv(ptr noundef nonnull align 8 dereferenceable(74) %0) #2 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca [17 x i8], align 16
  %20 = alloca %struct.cbPKT_SS_STATISTICS, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8
  %22 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %1
  store i32 -1, ptr %2, align 4
  br label %555

26:                                               ; preds = %1
  %27 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call noundef i32 @_ZN8CCFUtils18GetInternalVersionEv(ptr noundef nonnull align 8 dereferenceable(74) %28)
  %30 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 8
  store i32 %29, ptr %30, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %31 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = icmp eq ptr %32, null
  br i1 %33, label %36, label %34

34:                                               ; preds = %26
  %35 = call ptr @__dynamic_cast(ptr %32, ptr @_ZTI8CCFUtils, ptr @_ZTI14CCFUtilsXml_v1, i64 0) #7
  br label %37

36:                                               ; preds = %26
  br label %37

37:                                               ; preds = %36, %34
  %38 = phi ptr [ %35, %34 ], [ null, %36 ]
  %39 = getelementptr inbounds %class.CCFUtilsXml_v1, ptr %38, i32 0, i32 1
  store ptr %39, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !14
  %40 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 4
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %51

43:                                               ; preds = %37
  %44 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !16
  %46 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %47 = load i32, ptr %46, align 8, !tbaa !17
  %48 = load i32, ptr %5, align 4, !tbaa !14
  %49 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 12
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  call void %45(i32 noundef %47, i32 noundef %48, ptr noundef %50, i32 noundef 2, i32 noundef 0)
  br label %51

51:                                               ; preds = %43, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !19
  br label %52

52:                                               ; preds = %82, %51
  %53 = load i32, ptr %6, align 4, !tbaa !19
  %54 = icmp slt i32 %53, 4
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %85

56:                                               ; preds = %52
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.cbCCF, ptr %57, i32 0, i32 10
  %59 = load i32, ptr %6, align 4, !tbaa !19
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [4 x %struct.cbPKT_FILTINFO], ptr %58, i64 0, i64 %60
  %62 = getelementptr inbounds %struct.cbPKT_FILTINFO, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 1, !tbaa !20
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %81

65:                                               ; preds = %56
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.cbCCF, ptr %66, i32 0, i32 10
  %68 = load i32, ptr %6, align 4, !tbaa !19
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [4 x %struct.cbPKT_FILTINFO], ptr %67, i64 0, i64 %69
  %71 = getelementptr inbounds %struct.cbPKT_FILTINFO, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %71, i32 0, i32 2
  store i16 163, ptr %72, align 1, !tbaa !26
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.cbCCF, ptr %73, i32 0, i32 10
  %75 = load i32, ptr %6, align 4, !tbaa !19
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [4 x %struct.cbPKT_FILTINFO], ptr %74, i64 0, i64 %76
  %78 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %79 = load i32, ptr %78, align 8, !tbaa !17
  %80 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %77, i32 noundef %79)
  br label %81

81:                                               ; preds = %65, %56
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %6, align 4, !tbaa !19
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %6, align 4, !tbaa !19
  br label %52, !llvm.loop !27

85:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !19
  br label %86

86:                                               ; preds = %202, %85
  %87 = load i32, ptr %13, align 4, !tbaa !19
  %88 = icmp slt i32 %87, 596
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %205

90:                                               ; preds = %86
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.cbCCF, ptr %91, i32 0, i32 0
  %93 = load i32, ptr %13, align 4, !tbaa !19
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %92, i64 0, i64 %94
  %96 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 1, !tbaa !29
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %201

99:                                               ; preds = %90
  store i32 0, ptr %12, align 4, !tbaa !19
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.cbCCF, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %13, align 4, !tbaa !19
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %101, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %104, i32 0, i32 5
  %106 = load i32, ptr %105, align 1, !tbaa !33
  switch i32 %106, label %157 [
    i32 263, label %107
    i32 259, label %126
    i32 515, label %130
    i32 1027, label %134
    i32 2051, label %153
  ]

107:                                              ; preds = %99
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.cbCCF, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %13, align 4, !tbaa !19
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %109, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %113, i32 0, i32 4
  %115 = load i8, ptr %114, align 1, !tbaa !34
  %116 = zext i8 %115 to i32
  %117 = add nsw i32 %116, 1
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.cbCCF, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %13, align 4, !tbaa !19
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %119, i64 0, i64 %121
  %123 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 1, !tbaa !29
  %125 = call noundef i32 @_Z26cbGetExpandedChannelNumberjj(i32 noundef %117, i32 noundef %124)
  store i32 %125, ptr %12, align 4, !tbaa !19
  br label %158

126:                                              ; preds = %99
  %127 = load i32, ptr %7, align 4, !tbaa !19
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %7, align 4, !tbaa !19
  %129 = call noundef i32 @_Z23GetAIAnalogInChanNumberjj(i32 noundef %127, i32 noundef 0)
  store i32 %129, ptr %12, align 4, !tbaa !19
  br label %158

130:                                              ; preds = %99
  %131 = load i32, ptr %8, align 4, !tbaa !19
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %8, align 4, !tbaa !19
  %133 = call noundef i32 @_Z29GetAnalogOrAudioOutChanNumberjj(i32 noundef %131, i32 noundef 0)
  store i32 %133, ptr %12, align 4, !tbaa !19
  br label %158

134:                                              ; preds = %99
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.cbCCF, ptr %135, i32 0, i32 0
  %137 = load i32, ptr %13, align 4, !tbaa !19
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %136, i64 0, i64 %138
  %140 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %139, i32 0, i32 7
  %141 = load i32, ptr %140, align 1, !tbaa !35
  %142 = and i32 %141, 255
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %148

144:                                              ; preds = %134
  %145 = load i32, ptr %10, align 4, !tbaa !19
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %10, align 4, !tbaa !19
  %147 = call noundef i32 @_Z19GetSerialChanNumberjj(i32 noundef %145, i32 noundef 0)
  store i32 %147, ptr %12, align 4, !tbaa !19
  br label %152

148:                                              ; preds = %134
  %149 = load i32, ptr %9, align 4, !tbaa !19
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %9, align 4, !tbaa !19
  %151 = call noundef i32 @_Z18GetDiginChanNumberjj(i32 noundef %149, i32 noundef 0)
  store i32 %151, ptr %12, align 4, !tbaa !19
  br label %152

152:                                              ; preds = %148, %144
  br label %158

153:                                              ; preds = %99
  %154 = load i32, ptr %11, align 4, !tbaa !19
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %11, align 4, !tbaa !19
  %156 = call noundef i32 @_Z19GetDigoutChanNumberjj(i32 noundef %154, i32 noundef 0)
  store i32 %156, ptr %12, align 4, !tbaa !19
  br label %158

157:                                              ; preds = %99
  store i32 0, ptr %12, align 4, !tbaa !19
  br label %158

158:                                              ; preds = %157, %153, %152, %130, %126, %107
  %159 = load i32, ptr %12, align 4, !tbaa !19
  %160 = icmp ne i32 0, %159
  br i1 %160, label %161, label %200

161:                                              ; preds = %158
  %162 = load i32, ptr %12, align 4, !tbaa !19
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.cbCCF, ptr %163, i32 0, i32 0
  %165 = load i32, ptr %13, align 4, !tbaa !19
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %164, i64 0, i64 %166
  %168 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %167, i32 0, i32 1
  store i32 %162, ptr %168, align 1, !tbaa !29
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.cbCCF, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %13, align 4, !tbaa !19
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %170, i64 0, i64 %172
  %174 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %173, i32 0, i32 0
  %175 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %174, i32 0, i32 2
  store i16 192, ptr %175, align 1, !tbaa !36
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.cbCCF, ptr %176, i32 0, i32 0
  %178 = load i32, ptr %13, align 4, !tbaa !19
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %177, i64 0, i64 %179
  %181 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %180, i32 0, i32 2
  %182 = load i32, ptr %181, align 1, !tbaa !37
  %183 = sub i32 %182, 1
  %184 = trunc i32 %183 to i8
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.cbCCF, ptr %185, i32 0, i32 0
  %187 = load i32, ptr %13, align 4, !tbaa !19
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %186, i64 0, i64 %188
  %190 = getelementptr inbounds %struct.cbPKT_CHANINFO, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %190, i32 0, i32 4
  store i8 %184, ptr %191, align 1, !tbaa !34
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.cbCCF, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %13, align 4, !tbaa !19
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %193, i64 0, i64 %195
  %197 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %198 = load i32, ptr %197, align 8, !tbaa !17
  %199 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %196, i32 noundef %198)
  br label %200

200:                                              ; preds = %161, %158
  br label %201

201:                                              ; preds = %200, %90
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %13, align 4, !tbaa !19
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %13, align 4, !tbaa !19
  br label %86, !llvm.loop !38

205:                                              ; preds = %89
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.cbCCF, ptr %206, i32 0, i32 5
  %208 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %208, i32 0, i32 2
  %210 = load i16, ptr %209, align 1, !tbaa !39
  %211 = icmp ne i16 %210, 0
  br i1 %211, label %212, label %222

212:                                              ; preds = %205
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.cbCCF, ptr %213, i32 0, i32 5
  %215 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %214, i32 0, i32 0
  %216 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %215, i32 0, i32 2
  store i16 213, ptr %216, align 1, !tbaa !39
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.cbCCF, ptr %217, i32 0, i32 5
  %219 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %220 = load i32, ptr %219, align 8, !tbaa !17
  %221 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %218, i32 noundef %220)
  br label %222

222:                                              ; preds = %212, %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !19
  br label %223

223:                                              ; preds = %255, %222
  %224 = load i32, ptr %14, align 4, !tbaa !19
  %225 = load ptr, ptr @cb_pc_status_buffer_ptr, align 16, !tbaa !5
  %226 = call noundef i32 @_ZN10cbPcStatus19cbGetNumAnalogChansEv(ptr noundef nonnull align 1 dereferenceable(6160) %225)
  %227 = icmp ult i32 %224, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %258

229:                                              ; preds = %223
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.cbCCF, ptr %230, i32 0, i32 4
  %232 = load i32, ptr %14, align 4, !tbaa !19
  %233 = zext i32 %232 to i64
  %234 = getelementptr inbounds [560 x %struct.cbPKT_SS_NOISE_BOUNDARY], ptr %231, i64 0, i64 %233
  %235 = getelementptr inbounds %struct.cbPKT_SS_NOISE_BOUNDARY, ptr %234, i32 0, i32 1
  %236 = load i32, ptr %235, align 1, !tbaa !50
  %237 = icmp ne i32 %236, 0
  br i1 %237, label %238, label %254

238:                                              ; preds = %229
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.cbCCF, ptr %239, i32 0, i32 4
  %241 = load i32, ptr %14, align 4, !tbaa !19
  %242 = zext i32 %241 to i64
  %243 = getelementptr inbounds [560 x %struct.cbPKT_SS_NOISE_BOUNDARY], ptr %240, i64 0, i64 %242
  %244 = getelementptr inbounds %struct.cbPKT_SS_NOISE_BOUNDARY, ptr %243, i32 0, i32 0
  %245 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %244, i32 0, i32 2
  store i16 212, ptr %245, align 1, !tbaa !52
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.cbCCF, ptr %246, i32 0, i32 4
  %248 = load i32, ptr %14, align 4, !tbaa !19
  %249 = zext i32 %248 to i64
  %250 = getelementptr inbounds [560 x %struct.cbPKT_SS_NOISE_BOUNDARY], ptr %247, i64 0, i64 %249
  %251 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %252 = load i32, ptr %251, align 8, !tbaa !17
  %253 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %250, i32 noundef %252)
  br label %254

254:                                              ; preds = %238, %229
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %14, align 4, !tbaa !19
  %257 = add i32 %256, 1
  store i32 %257, ptr %14, align 4, !tbaa !19
  br label %223, !llvm.loop !53

258:                                              ; preds = %228
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.cbCCF, ptr %259, i32 0, i32 2
  %261 = getelementptr inbounds %struct.cbPKT_SS_DETECT, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %261, i32 0, i32 2
  %263 = load i16, ptr %262, align 1, !tbaa !54
  %264 = icmp ne i16 %263, 0
  br i1 %264, label %265, label %275

265:                                              ; preds = %258
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.cbCCF, ptr %266, i32 0, i32 2
  %268 = getelementptr inbounds %struct.cbPKT_SS_DETECT, ptr %267, i32 0, i32 0
  %269 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %268, i32 0, i32 2
  store i16 210, ptr %269, align 1, !tbaa !54
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.cbCCF, ptr %270, i32 0, i32 2
  %272 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %273 = load i32, ptr %272, align 8, !tbaa !17
  %274 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %271, i32 noundef %273)
  br label %275

275:                                              ; preds = %265, %258
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.cbCCF, ptr %276, i32 0, i32 3
  %278 = getelementptr inbounds %struct.cbPKT_SS_ARTIF_REJECT, ptr %277, i32 0, i32 0
  %279 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %278, i32 0, i32 2
  %280 = load i16, ptr %279, align 1, !tbaa !55
  %281 = icmp ne i16 %280, 0
  br i1 %281, label %282, label %292

282:                                              ; preds = %275
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.cbCCF, ptr %283, i32 0, i32 3
  %285 = getelementptr inbounds %struct.cbPKT_SS_ARTIF_REJECT, ptr %284, i32 0, i32 0
  %286 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %285, i32 0, i32 2
  store i16 211, ptr %286, align 1, !tbaa !55
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.cbCCF, ptr %287, i32 0, i32 3
  %289 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %290 = load i32, ptr %289, align 8, !tbaa !17
  %291 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %288, i32 noundef %290)
  br label %292

292:                                              ; preds = %282, %275
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.cbCCF, ptr %293, i32 0, i32 7
  %295 = getelementptr inbounds %struct.cbPKT_SYSINFO, ptr %294, i32 0, i32 0
  %296 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %295, i32 0, i32 2
  %297 = load i16, ptr %296, align 1, !tbaa !56
  %298 = icmp ne i16 %297, 0
  br i1 %298, label %299, label %309

299:                                              ; preds = %292
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.cbCCF, ptr %300, i32 0, i32 7
  %302 = getelementptr inbounds %struct.cbPKT_SYSINFO, ptr %301, i32 0, i32 0
  %303 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %302, i32 0, i32 2
  store i16 145, ptr %303, align 1, !tbaa !56
  %304 = load ptr, ptr %4, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.cbCCF, ptr %304, i32 0, i32 7
  %306 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %307 = load i32, ptr %306, align 8, !tbaa !17
  %308 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %305, i32 noundef %307)
  br label %309

309:                                              ; preds = %299, %292
  %310 = load ptr, ptr %4, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.cbCCF, ptr %310, i32 0, i32 11
  %312 = getelementptr inbounds %struct.cbPKT_LNC, ptr %311, i32 0, i32 0
  %313 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %312, i32 0, i32 2
  %314 = load i16, ptr %313, align 1, !tbaa !57
  %315 = icmp ne i16 %314, 0
  br i1 %315, label %316, label %326

316:                                              ; preds = %309
  %317 = load ptr, ptr %4, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.cbCCF, ptr %317, i32 0, i32 11
  %319 = getelementptr inbounds %struct.cbPKT_LNC, ptr %318, i32 0, i32 0
  %320 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %319, i32 0, i32 2
  store i16 168, ptr %320, align 1, !tbaa !57
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.cbCCF, ptr %321, i32 0, i32 11
  %323 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %324 = load i32, ptr %323, align 8, !tbaa !17
  %325 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %322, i32 noundef %324)
  br label %326

326:                                              ; preds = %316, %309
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !19
  br label %327

327:                                              ; preds = %413, %326
  %328 = load i32, ptr %15, align 4, !tbaa !19
  %329 = load ptr, ptr @cb_pc_status_buffer_ptr, align 16, !tbaa !5
  %330 = call noundef i32 @_ZN10cbPcStatus22cbGetNumAnalogoutChansEv(ptr noundef nonnull align 1 dereferenceable(6160) %329)
  %331 = icmp ult i32 %328, %330
  br i1 %331, label %333, label %332

332:                                              ; preds = %327
  store i32 12, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %416

333:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !19
  br label %334

334:                                              ; preds = %409, %333
  %335 = load i32, ptr %17, align 4, !tbaa !19
  %336 = icmp slt i32 %335, 5
  br i1 %336, label %338, label %337

337:                                              ; preds = %334
  store i32 15, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %412

338:                                              ; preds = %334
  %339 = load ptr, ptr %4, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.cbCCF, ptr %339, i32 0, i32 9
  %341 = load i32, ptr %15, align 4, !tbaa !19
  %342 = zext i32 %341 to i64
  %343 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %340, i64 0, i64 %342
  %344 = load i32, ptr %17, align 4, !tbaa !19
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [5 x %struct.cbPKT_AOUT_WAVEFORM], ptr %343, i64 0, i64 %345
  %347 = getelementptr inbounds %struct.cbPKT_AOUT_WAVEFORM, ptr %346, i32 0, i32 1
  %348 = load i16, ptr %347, align 1, !tbaa !58
  %349 = icmp ne i16 %348, 0
  br i1 %349, label %350, label %408

350:                                              ; preds = %338
  %351 = load i32, ptr %15, align 4, !tbaa !19
  %352 = add i32 %351, 1
  %353 = call noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef %352, i32 noundef 0)
  %354 = trunc i32 %353 to i16
  %355 = load ptr, ptr %4, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.cbCCF, ptr %355, i32 0, i32 9
  %357 = load i32, ptr %15, align 4, !tbaa !19
  %358 = zext i32 %357 to i64
  %359 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %356, i64 0, i64 %358
  %360 = load i32, ptr %17, align 4, !tbaa !19
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [5 x %struct.cbPKT_AOUT_WAVEFORM], ptr %359, i64 0, i64 %361
  %363 = getelementptr inbounds %struct.cbPKT_AOUT_WAVEFORM, ptr %362, i32 0, i32 1
  store i16 %354, ptr %363, align 1, !tbaa !58
  %364 = load ptr, ptr %4, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.cbCCF, ptr %364, i32 0, i32 9
  %366 = load i32, ptr %15, align 4, !tbaa !19
  %367 = zext i32 %366 to i64
  %368 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %365, i64 0, i64 %367
  %369 = load i32, ptr %17, align 4, !tbaa !19
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [5 x %struct.cbPKT_AOUT_WAVEFORM], ptr %368, i64 0, i64 %370
  %372 = getelementptr inbounds %struct.cbPKT_AOUT_WAVEFORM, ptr %371, i32 0, i32 1
  %373 = load i16, ptr %372, align 1, !tbaa !58
  %374 = zext i16 %373 to i32
  %375 = call noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef %374, i32 noundef 0)
  %376 = trunc i32 %375 to i8
  %377 = load ptr, ptr %4, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.cbCCF, ptr %377, i32 0, i32 9
  %379 = load i32, ptr %15, align 4, !tbaa !19
  %380 = zext i32 %379 to i64
  %381 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %378, i64 0, i64 %380
  %382 = load i32, ptr %17, align 4, !tbaa !19
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [5 x %struct.cbPKT_AOUT_WAVEFORM], ptr %381, i64 0, i64 %383
  %385 = getelementptr inbounds %struct.cbPKT_AOUT_WAVEFORM, ptr %384, i32 0, i32 0
  %386 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %385, i32 0, i32 4
  store i8 %376, ptr %386, align 1, !tbaa !61
  %387 = load ptr, ptr %4, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.cbCCF, ptr %387, i32 0, i32 9
  %389 = load i32, ptr %15, align 4, !tbaa !19
  %390 = zext i32 %389 to i64
  %391 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %388, i64 0, i64 %390
  %392 = load i32, ptr %17, align 4, !tbaa !19
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds [5 x %struct.cbPKT_AOUT_WAVEFORM], ptr %391, i64 0, i64 %393
  %395 = getelementptr inbounds %struct.cbPKT_AOUT_WAVEFORM, ptr %394, i32 0, i32 0
  %396 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %395, i32 0, i32 2
  store i16 179, ptr %396, align 1, !tbaa !62
  %397 = load ptr, ptr %4, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.cbCCF, ptr %397, i32 0, i32 9
  %399 = load i32, ptr %15, align 4, !tbaa !19
  %400 = zext i32 %399 to i64
  %401 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %398, i64 0, i64 %400
  %402 = load i32, ptr %17, align 4, !tbaa !19
  %403 = sext i32 %402 to i64
  %404 = getelementptr inbounds [5 x %struct.cbPKT_AOUT_WAVEFORM], ptr %401, i64 0, i64 %403
  %405 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %406 = load i32, ptr %405, align 8, !tbaa !17
  %407 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %404, i32 noundef %406)
  br label %408

408:                                              ; preds = %350, %338
  br label %409

409:                                              ; preds = %408
  %410 = load i32, ptr %17, align 4, !tbaa !19
  %411 = add nsw i32 %410, 1
  store i32 %411, ptr %17, align 4, !tbaa !19
  br label %334, !llvm.loop !63

412:                                              ; preds = %337
  br label %413

413:                                              ; preds = %412
  %414 = load i32, ptr %15, align 4, !tbaa !19
  %415 = add i32 %414, 1
  store i32 %415, ptr %15, align 4, !tbaa !19
  br label %327, !llvm.loop !64

416:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !19
  br label %417

417:                                              ; preds = %470, %416
  %418 = load i32, ptr %18, align 4, !tbaa !19
  %419 = icmp slt i32 %418, 280
  br i1 %419, label %421, label %420

420:                                              ; preds = %417
  store i32 18, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %473

421:                                              ; preds = %417
  call void @llvm.lifetime.start.p0(i64 17, ptr %19) #7
  %422 = getelementptr inbounds [17 x i8], ptr %19, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %422, i8 0, i64 17, i1 false)
  %423 = load i32, ptr %18, align 4, !tbaa !19
  %424 = add nsw i32 %423, 1
  %425 = getelementptr inbounds [17 x i8], ptr %19, i64 0, i64 0
  %426 = call noundef i32 @_Z15cbGetNTrodeInfojPcPA5_19cbMANUALUNITMAPPINGPtS3_S3_j(i32 noundef %424, ptr noundef %425, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, i32 noundef 0)
  %427 = getelementptr inbounds [17 x i8], ptr %19, i64 0, i64 0
  %428 = call i64 @strlen(ptr noundef %427) #1
  %429 = icmp ne i64 0, %428
  br i1 %429, label %430, label %469

430:                                              ; preds = %421
  %431 = load i32, ptr %18, align 4, !tbaa !19
  %432 = add nsw i32 %431, 1
  %433 = call noundef i32 @_Z21cbGetNTrodeInstrumentjj(i32 noundef %432, i32 noundef 0)
  %434 = load ptr, ptr %4, align 8, !tbaa !5
  %435 = getelementptr inbounds %struct.cbCCF, ptr %434, i32 0, i32 8
  %436 = getelementptr inbounds [280 x %struct.cbPKT_NTRODEINFO], ptr %435, i64 0, i64 0
  %437 = getelementptr inbounds %struct.cbPKT_NTRODEINFO, ptr %436, i32 0, i32 0
  %438 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %437, i32 0, i32 4
  %439 = load i8, ptr %438, align 1, !tbaa !65
  %440 = zext i8 %439 to i32
  %441 = add nsw i32 %440, 1
  %442 = icmp eq i32 %433, %441
  br i1 %442, label %443, label %469

443:                                              ; preds = %430
  %444 = load ptr, ptr %4, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.cbCCF, ptr %444, i32 0, i32 8
  %446 = load i32, ptr %18, align 4, !tbaa !19
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds [280 x %struct.cbPKT_NTRODEINFO], ptr %445, i64 0, i64 %447
  %449 = getelementptr inbounds %struct.cbPKT_NTRODEINFO, ptr %448, i32 0, i32 1
  %450 = load i32, ptr %449, align 1, !tbaa !67
  %451 = icmp ne i32 %450, 0
  br i1 %451, label %452, label %468

452:                                              ; preds = %443
  %453 = load ptr, ptr %4, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.cbCCF, ptr %453, i32 0, i32 8
  %455 = load i32, ptr %18, align 4, !tbaa !19
  %456 = sext i32 %455 to i64
  %457 = getelementptr inbounds [280 x %struct.cbPKT_NTRODEINFO], ptr %454, i64 0, i64 %456
  %458 = getelementptr inbounds %struct.cbPKT_NTRODEINFO, ptr %457, i32 0, i32 0
  %459 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %458, i32 0, i32 2
  store i16 167, ptr %459, align 1, !tbaa !68
  %460 = load ptr, ptr %4, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.cbCCF, ptr %460, i32 0, i32 8
  %462 = load i32, ptr %18, align 4, !tbaa !19
  %463 = sext i32 %462 to i64
  %464 = getelementptr inbounds [280 x %struct.cbPKT_NTRODEINFO], ptr %461, i64 0, i64 %463
  %465 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %466 = load i32, ptr %465, align 8, !tbaa !17
  %467 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %464, i32 noundef %466)
  br label %468

468:                                              ; preds = %452, %443
  br label %469

469:                                              ; preds = %468, %430, %421
  call void @llvm.lifetime.end.p0(i64 17, ptr %19) #7
  br label %470

470:                                              ; preds = %469
  %471 = load i32, ptr %18, align 4, !tbaa !19
  %472 = add nsw i32 %471, 1
  store i32 %472, ptr %18, align 4, !tbaa !19
  br label %417, !llvm.loop !69

473:                                              ; preds = %420
  %474 = load ptr, ptr %4, align 8, !tbaa !5
  %475 = getelementptr inbounds %struct.cbCCF, ptr %474, i32 0, i32 1
  %476 = getelementptr inbounds %struct.cbPKT_ADAPTFILTINFO, ptr %475, i32 0, i32 0
  %477 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %476, i32 0, i32 2
  %478 = load i16, ptr %477, align 1, !tbaa !70
  %479 = icmp ne i16 %478, 0
  br i1 %479, label %480, label %490

480:                                              ; preds = %473
  %481 = load ptr, ptr %4, align 8, !tbaa !5
  %482 = getelementptr inbounds %struct.cbCCF, ptr %481, i32 0, i32 1
  %483 = getelementptr inbounds %struct.cbPKT_ADAPTFILTINFO, ptr %482, i32 0, i32 0
  %484 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %483, i32 0, i32 2
  store i16 165, ptr %484, align 1, !tbaa !70
  %485 = load ptr, ptr %4, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.cbCCF, ptr %485, i32 0, i32 1
  %487 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %488 = load i32, ptr %487, align 8, !tbaa !17
  %489 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %486, i32 noundef %488)
  br label %490

490:                                              ; preds = %480, %473
  %491 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 8
  %492 = load i32, ptr %491, align 8, !tbaa !13
  %493 = icmp slt i32 %492, 8
  br i1 %493, label %494, label %520

494:                                              ; preds = %490
  %495 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 13
  %496 = load i8, ptr %495, align 8, !tbaa !71, !range !72, !noundef !73
  %497 = trunc i8 %496 to i1
  br i1 %497, label %520, label %498

498:                                              ; preds = %494
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #7
  %499 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 0
  %500 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %499, i32 0, i32 1
  store i16 -32768, ptr %500, align 1, !tbaa !74
  %501 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 0
  %502 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %501, i32 0, i32 2
  store i16 213, ptr %502, align 1, !tbaa !75
  %503 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 0
  %504 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %503, i32 0, i32 3
  store i16 16, ptr %504, align 1, !tbaa !76
  %505 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 1
  store i32 300, ptr %505, align 1, !tbaa !77
  %506 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 2
  store i32 6, ptr %506, align 1, !tbaa !78
  %507 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 3
  store i32 1, ptr %507, align 1, !tbaa !79
  %508 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 4
  store float 9.000000e+00, ptr %508, align 1, !tbaa !80
  %509 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 5
  store float 1.250000e+02, ptr %509, align 1, !tbaa !81
  %510 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 6
  store float 0x3FE99999A0000000, ptr %510, align 1, !tbaa !82
  %511 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 7
  store float 0x3FEE147AE0000000, ptr %511, align 1, !tbaa !83
  %512 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 8
  store float 5.000000e-01, ptr %512, align 1, !tbaa !84
  %513 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 9
  store float 5.000000e-01, ptr %513, align 1, !tbaa !85
  %514 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 10
  store float 0x3F90624DE0000000, ptr %514, align 1, !tbaa !86
  %515 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 11
  store i32 250, ptr %515, align 1, !tbaa !87
  %516 = getelementptr inbounds %struct.cbPKT_SS_STATISTICS, ptr %20, i32 0, i32 12
  store i32 0, ptr %516, align 1, !tbaa !88
  %517 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %518 = load i32, ptr %517, align 8, !tbaa !17
  %519 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %20, i32 noundef %518)
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #7
  br label %520

520:                                              ; preds = %498, %494, %490
  %521 = load ptr, ptr %4, align 8, !tbaa !5
  %522 = getelementptr inbounds %struct.cbCCF, ptr %521, i32 0, i32 6
  %523 = getelementptr inbounds %struct.cbPKT_SS_STATUS, ptr %522, i32 0, i32 0
  %524 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %523, i32 0, i32 2
  %525 = load i16, ptr %524, align 1, !tbaa !89
  %526 = icmp ne i16 %525, 0
  br i1 %526, label %527, label %541

527:                                              ; preds = %520
  %528 = load ptr, ptr %4, align 8, !tbaa !5
  %529 = getelementptr inbounds %struct.cbCCF, ptr %528, i32 0, i32 6
  %530 = getelementptr inbounds %struct.cbPKT_SS_STATUS, ptr %529, i32 0, i32 0
  %531 = getelementptr inbounds %struct.cbPKT_HEADER, ptr %530, i32 0, i32 2
  store i16 215, ptr %531, align 1, !tbaa !89
  %532 = load ptr, ptr %4, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.cbCCF, ptr %532, i32 0, i32 6
  %534 = getelementptr inbounds %struct.cbPKT_SS_STATUS, ptr %533, i32 0, i32 2
  %535 = getelementptr inbounds %struct.cbAdaptControl, ptr %534, i32 0, i32 0
  store i32 0, ptr %535, align 1, !tbaa !90
  %536 = load ptr, ptr %4, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct.cbCCF, ptr %536, i32 0, i32 6
  %538 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %539 = load i32, ptr %538, align 8, !tbaa !17
  %540 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef %537, i32 noundef %539)
  br label %541

541:                                              ; preds = %527, %520
  %542 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 4
  %543 = load ptr, ptr %542, align 8, !tbaa !16
  %544 = icmp ne ptr %543, null
  br i1 %544, label %545, label %553

545:                                              ; preds = %541
  %546 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 4
  %547 = load ptr, ptr %546, align 8, !tbaa !16
  %548 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 10
  %549 = load i32, ptr %548, align 8, !tbaa !17
  %550 = load i32, ptr %5, align 4, !tbaa !14
  %551 = getelementptr inbounds %class.CCFUtils, ptr %21, i32 0, i32 12
  %552 = load ptr, ptr %551, align 8, !tbaa !18
  call void %547(i32 noundef %549, i32 noundef %550, ptr noundef %552, i32 noundef 2, i32 noundef 100)
  br label %553

553:                                              ; preds = %545, %541
  %554 = load i32, ptr %5, align 4, !tbaa !14
  store i32 %554, ptr %2, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %555

555:                                              ; preds = %553, %25
  %556 = load i32, ptr %2, align 4
  ret i32 %556
}

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

declare noundef i32 @_Z12cbSendPacketPvj(ptr noundef, i32 noundef) #4

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

declare noundef i32 @_Z26cbGetExpandedChannelNumberjj(i32 noundef, i32 noundef) #4

declare noundef i32 @_Z23GetAIAnalogInChanNumberjj(i32 noundef, i32 noundef) #4

declare noundef i32 @_Z29GetAnalogOrAudioOutChanNumberjj(i32 noundef, i32 noundef) #4

declare noundef i32 @_Z19GetSerialChanNumberjj(i32 noundef, i32 noundef) #4

declare noundef i32 @_Z18GetDiginChanNumberjj(i32 noundef, i32 noundef) #4

declare noundef i32 @_Z19GetDigoutChanNumberjj(i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10cbPcStatus19cbGetNumAnalogChansEv(ptr noundef nonnull align 1 dereferenceable(6160)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10cbPcStatus22cbGetNumAnalogoutChansEv(ptr noundef nonnull align 1 dereferenceable(6160)) #0 align 2

declare noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef, i32 noundef) #4

declare noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef, i32 noundef) #4

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

declare noundef i32 @_Z15cbGetNTrodeInfojPcPA5_19cbMANUALUNITMAPPINGPtS3_S3_j(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #6

declare noundef i32 @_Z21cbGetNTrodeInstrumentjj(i32 noundef, i32 noundef) #4

attributes #0 = { mustprogress 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 = { nounwind willreturn memory(read) }
attributes #2 = { mustprogress 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS8CCFUtils", !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !6, i64 64, !11, i64 72, !11, i64 73}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !12, i64 48}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN3ccf10_ccfResultE", !7, i64 0}
!16 = !{!10, !6, i64 24}
!17 = !{!10, !12, i64 56}
!18 = !{!10, !6, i64 64}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !12, i64 20}
!21 = !{!"_ZTS14cbPKT_FILTINFO", !22, i64 0, !12, i64 16, !12, i64 20, !7, i64 24, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !25, i64 64, !25, i64 72, !25, i64 80, !25, i64 88, !25, i64 96, !25, i64 104, !25, i64 112, !25, i64 120, !25, i64 128}
!22 = !{!"_ZTS12cbPKT_HEADER", !23, i64 0, !24, i64 8, !24, i64 10, !24, i64 12, !7, i64 14, !7, i64 15}
!23 = !{!"long", !7, i64 0}
!24 = !{!"short", !7, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!21, !24, i64 10}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !12, i64 16}
!30 = !{!"_ZTS14cbPKT_CHANINFO", !22, i64 0, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !31, i64 56, !32, i64 80, !31, i64 120, !32, i64 144, !7, i64 184, !12, i64 200, !7, i64 204, !31, i64 220, !31, i64 244, !12, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !7, i64 284, !7, i64 292, !7, i64 293, !7, i64 295, !24, i64 296, !24, i64 298, !12, i64 300, !12, i64 304, !12, i64 308, !12, i64 312, !12, i64 316, !12, i64 320, !12, i64 324, !12, i64 328, !12, i64 332, !12, i64 336, !12, i64 340, !12, i64 344, !12, i64 348, !24, i64 352, !24, i64 354, !12, i64 356, !7, i64 360, !7, i64 520}
!31 = !{!"_ZTS9cbSCALING", !24, i64 0, !24, i64 2, !12, i64 4, !12, i64 8, !12, i64 12, !7, i64 16}
!32 = !{!"_ZTS10cbFILTDESC", !7, i64 0, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!33 = !{!30, !12, i64 32}
!34 = !{!30, !7, i64 14}
!35 = !{!30, !12, i64 40}
!36 = !{!30, !24, i64 10}
!37 = !{!30, !12, i64 20}
!38 = distinct !{!38, !28}
!39 = !{!40, !24, i64 443454}
!40 = !{!"_ZTS5cbCCF", !7, i64 0, !41, i64 405280, !43, i64 405316, !44, i64 405340, !7, i64 405364, !45, i64 443444, !46, i64 443508, !48, i64 443548, !7, i64 443588, !7, i64 725828, !7, i64 817988, !49, i64 818532}
!41 = !{!"_ZTS19cbPKT_ADAPTFILTINFO", !22, i64 0, !12, i64 16, !12, i64 20, !42, i64 24, !12, i64 28, !12, i64 32}
!42 = !{!"float", !7, i64 0}
!43 = !{!"_ZTS15cbPKT_SS_DETECT", !22, i64 0, !42, i64 16, !42, i64 20}
!44 = !{!"_ZTS21cbPKT_SS_ARTIF_REJECT", !22, i64 0, !12, i64 16, !12, i64 20}
!45 = !{!"_ZTS19cbPKT_SS_STATISTICS", !22, i64 0, !12, i64 16, !12, i64 20, !12, i64 24, !42, i64 28, !42, i64 32, !42, i64 36, !42, i64 40, !42, i64 44, !42, i64 48, !42, i64 52, !12, i64 56, !12, i64 60}
!46 = !{!"_ZTS15cbPKT_SS_STATUS", !22, i64 0, !47, i64 16, !47, i64 28}
!47 = !{!"_ZTS14cbAdaptControl", !12, i64 0, !42, i64 4, !42, i64 8}
!48 = !{!"_ZTS13cbPKT_SYSINFO", !22, i64 0, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!49 = !{!"_ZTS9cbPKT_LNC", !22, i64 0, !12, i64 16, !12, i64 20, !12, i64 24}
!50 = !{!51, !12, i64 16}
!51 = !{!"_ZTS23cbPKT_SS_NOISE_BOUNDARY", !22, i64 0, !12, i64 16, !7, i64 20, !7, i64 32}
!52 = !{!51, !24, i64 10}
!53 = distinct !{!53, !28}
!54 = !{!40, !24, i64 405326}
!55 = !{!40, !24, i64 405350}
!56 = !{!40, !24, i64 443558}
!57 = !{!40, !24, i64 818542}
!58 = !{!59, !24, i64 16}
!59 = !{!"_ZTS19cbPKT_AOUT_WAVEFORM", !22, i64 0, !24, i64 16, !24, i64 18, !12, i64 20, !7, i64 24, !7, i64 25, !24, i64 26, !24, i64 28, !7, i64 30, !7, i64 31, !60, i64 32}
!60 = !{!"_ZTS14cbWaveformData", !24, i64 0, !7, i64 2}
!61 = !{!59, !7, i64 14}
!62 = !{!59, !24, i64 10}
!63 = distinct !{!63, !28}
!64 = distinct !{!64, !28}
!65 = !{!66, !7, i64 14}
!66 = !{!"_ZTS16cbPKT_NTRODEINFO", !22, i64 0, !12, i64 16, !7, i64 20, !7, i64 36, !24, i64 996, !24, i64 998, !7, i64 1000}
!67 = !{!66, !12, i64 16}
!68 = !{!66, !24, i64 10}
!69 = distinct !{!69, !28}
!70 = !{!40, !24, i64 405290}
!71 = !{!10, !11, i64 72}
!72 = !{i8 0, i8 2}
!73 = !{}
!74 = !{!45, !24, i64 8}
!75 = !{!45, !24, i64 10}
!76 = !{!45, !24, i64 12}
!77 = !{!45, !12, i64 16}
!78 = !{!45, !12, i64 20}
!79 = !{!45, !12, i64 24}
!80 = !{!45, !42, i64 28}
!81 = !{!45, !42, i64 32}
!82 = !{!45, !42, i64 36}
!83 = !{!45, !42, i64 40}
!84 = !{!45, !42, i64 44}
!85 = !{!45, !42, i64 48}
!86 = !{!45, !42, i64 52}
!87 = !{!45, !12, i64 56}
!88 = !{!45, !12, i64 60}
!89 = !{!40, !24, i64 443518}
!90 = !{!40, !12, i64 443536}


; 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.cbPKT_SS_STATISTICS = type { %struct.cbPKT_HEADER, i32, i32, i32, float, float, float, float, float, float, float, i32, i32 }
%struct.cbPKT_HEADER = type { i64, i16, i16, i16, i8, i8 }
%struct.cbPKT_CHANINFO = type { %struct.cbPKT_HEADER, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.cbSCALING, %struct.cbFILTDESC, %struct.cbSCALING, %struct.cbFILTDESC, [16 x i8], i32, [4 x i32], %struct.cbSCALING, %struct.cbSCALING, i32, i32, i32, i32, %union.anon, i8, [2 x i8], i8, i16, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32, [5 x %struct.cbMANUALUNITMAPPING], [5 x [4 x %struct.cbHOOP]] }
%struct.cbFILTDESC = type { [16 x i8], i32, i32, i32, i32, i32, i32 }
%struct.cbSCALING = type { i16, i16, i32, i32, i32, [8 x i8] }
%union.anon = type { %struct.anon }
%struct.anon = type { i16, i16, i32 }
%struct.cbMANUALUNITMAPPING = type { i16, [3 x i16], [3 x [3 x i16]], i16, i32 }
%struct.cbHOOP = type { i16, i16, i16, i16 }
%struct.cbPKT_SS_NOISE_BOUNDARY = type <{ %struct.cbPKT_HEADER, i32, [3 x float], [3 x [3 x float]] }>
%struct.cbPKT_AOUT_WAVEFORM = type { %struct.cbPKT_HEADER, i16, i16, i32, i8, i8, i16, i16, i8, i8, %struct.cbWaveformData }
%struct.cbWaveformData = type { i16, %union.anon.1 }
%union.anon.1 = type { %struct.anon.3 }
%struct.anon.3 = type { i16, i16, i16, [246 x i16], [246 x i16] }
%struct.cbPKT_NTRODEINFO = type { %struct.cbPKT_HEADER, i32, [16 x i8], [6 x [5 x %struct.cbMANUALUNITMAPPING]], i16, i16, [4 x i16] }

@_ZTI14CCFUtilsXml_v1 = external constant ptr
@_ZTI8CCFUtils = external dso_local constant { ptr, ptr }, align 8
@cb_pc_status_buffer_ptr = external local_unnamed_addr global [4 x ptr], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8CCFUtils18GetInternalVersionEv(ptr noundef nonnull align 8 dereferenceable(74)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 1) i32 @_ZN8CCFUtils7SendCCFEv(ptr nocapture noundef nonnull align 8 dereferenceable(74) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca [17 x i8], align 16
  %3 = alloca %struct.cbPKT_SS_STATISTICS, align 1
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %294, label %7

7:                                                ; preds = %1
  %8 = tail call noundef i32 @_ZN8CCFUtils18GetInternalVersionEv(ptr noundef nonnull align 8 dereferenceable(74) %5)
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %8, ptr %9, align 8, !tbaa !12
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %14, label %12

12:                                               ; preds = %7
  %13 = tail call ptr @__dynamic_cast(ptr nonnull %10, ptr nonnull @_ZTI8CCFUtils, ptr nonnull @_ZTI14CCFUtilsXml_v1, i64 0) #6
  br label %14

14:                                               ; preds = %7, %12
  %15 = phi ptr [ %13, %12 ], [ null, %7 ]
  %16 = getelementptr inbounds i8, ptr %15, i64 189696
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %24, label %19

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  %21 = load i32, ptr %20, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  tail call void %18(i32 noundef %21, i32 noundef 0, ptr noundef %23, i32 noundef 2, i32 noundef 0)
  br label %24

24:                                               ; preds = %19, %14
  %25 = getelementptr inbounds i8, ptr %0, i64 56
  %26 = getelementptr inbounds i8, ptr %15, i64 1007704
  %27 = load i32, ptr %26, align 1, !tbaa !16
  %.not145 = icmp eq i32 %27, 0
  br i1 %.not145, label %33, label %28

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %15, i64 1007684
  %30 = getelementptr inbounds i8, ptr %15, i64 1007694
  store i16 163, ptr %30, align 1, !tbaa !22
  %31 = load i32, ptr %25, align 8, !tbaa !14
  %32 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %29, i32 noundef %31)
  br label %33

33:                                               ; preds = %24, %28
  %34 = getelementptr inbounds i8, ptr %15, i64 1007840
  %35 = load i32, ptr %34, align 1, !tbaa !16
  %.not145.1 = icmp eq i32 %35, 0
  br i1 %.not145.1, label %41, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %15, i64 1007820
  %38 = getelementptr inbounds i8, ptr %15, i64 1007830
  store i16 163, ptr %38, align 1, !tbaa !22
  %39 = load i32, ptr %25, align 8, !tbaa !14
  %40 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %37, i32 noundef %39)
  br label %41

41:                                               ; preds = %36, %33
  %42 = getelementptr inbounds i8, ptr %15, i64 1007976
  %43 = load i32, ptr %42, align 1, !tbaa !16
  %.not145.2 = icmp eq i32 %43, 0
  br i1 %.not145.2, label %49, label %44

44:                                               ; preds = %41
  %45 = getelementptr inbounds i8, ptr %15, i64 1007956
  %46 = getelementptr inbounds i8, ptr %15, i64 1007966
  store i16 163, ptr %46, align 1, !tbaa !22
  %47 = load i32, ptr %25, align 8, !tbaa !14
  %48 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %45, i32 noundef %47)
  br label %49

49:                                               ; preds = %44, %41
  %50 = getelementptr inbounds i8, ptr %15, i64 1008112
  %51 = load i32, ptr %50, align 1, !tbaa !16
  %.not145.3 = icmp eq i32 %51, 0
  br i1 %.not145.3, label %.preheader154.preheader, label %52

.preheader154.preheader:                          ; preds = %52, %49
  br label %.preheader154

52:                                               ; preds = %49
  %53 = getelementptr inbounds i8, ptr %15, i64 1008092
  %54 = getelementptr inbounds i8, ptr %15, i64 1008102
  store i16 163, ptr %54, align 1, !tbaa !22
  %55 = load i32, ptr %25, align 8, !tbaa !14
  %56 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %53, i32 noundef %55)
  br label %.preheader154.preheader

57:                                               ; preds = %.thread
  %58 = getelementptr inbounds i8, ptr %15, i64 633150
  %59 = load i16, ptr %58, align 1, !tbaa !23
  %.not130 = icmp eq i16 %59, 0
  br i1 %.not130, label %105, label %101

.preheader154:                                    ; preds = %.preheader154.preheader, %.thread
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread ], [ 0, %.preheader154.preheader ]
  %.0110160 = phi i32 [ %.2, %.thread ], [ 1, %.preheader154.preheader ]
  %.0111159 = phi i32 [ %.2113, %.thread ], [ 1, %.preheader154.preheader ]
  %.0114158 = phi i32 [ %.2116, %.thread ], [ 1, %.preheader154.preheader ]
  %.0117157 = phi i32 [ %.2119, %.thread ], [ 1, %.preheader154.preheader ]
  %.0120156 = phi i32 [ %.2122, %.thread ], [ 1, %.preheader154.preheader ]
  %60 = getelementptr inbounds [596 x %struct.cbPKT_CHANINFO], ptr %16, i64 0, i64 %indvars.iv
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %62 = load i32, ptr %61, align 1, !tbaa !34
  %.not142 = icmp eq i32 %62, 0
  br i1 %.not142, label %.thread, label %63

63:                                               ; preds = %.preheader154
  %64 = getelementptr inbounds i8, ptr %60, i64 32
  %65 = load i32, ptr %64, align 1, !tbaa !38
  switch i32 %65, label %.thread [
    i32 263, label %66
    i32 259, label %72
    i32 515, label %75
    i32 1027, label %78
    i32 2051, label %88
  ]

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %60, i64 14
  %68 = load i8, ptr %67, align 1, !tbaa !39
  %69 = zext i8 %68 to i32
  %70 = add nuw nsw i32 %69, 1
  %71 = tail call noundef i32 @_Z26cbGetExpandedChannelNumberjj(i32 noundef %70, i32 noundef %62)
  br label %91

72:                                               ; preds = %63
  %73 = add nsw i32 %.0120156, 1
  %74 = tail call noundef i32 @_Z23GetAIAnalogInChanNumberjj(i32 noundef %.0120156, i32 noundef 0)
  br label %91

75:                                               ; preds = %63
  %76 = add nsw i32 %.0117157, 1
  %77 = tail call noundef i32 @_Z29GetAnalogOrAudioOutChanNumberjj(i32 noundef %.0117157, i32 noundef 0)
  br label %91

78:                                               ; preds = %63
  %79 = getelementptr inbounds i8, ptr %60, i64 40
  %80 = load i32, ptr %79, align 1, !tbaa !40
  %81 = and i32 %80, 255
  %.not143 = icmp eq i32 %81, 0
  br i1 %.not143, label %85, label %82

82:                                               ; preds = %78
  %83 = add nsw i32 %.0111159, 1
  %84 = tail call noundef i32 @_Z19GetSerialChanNumberjj(i32 noundef %.0111159, i32 noundef 0)
  br label %91

85:                                               ; preds = %78
  %86 = add nsw i32 %.0114158, 1
  %87 = tail call noundef i32 @_Z18GetDiginChanNumberjj(i32 noundef %.0114158, i32 noundef 0)
  br label %91

88:                                               ; preds = %63
  %89 = add nsw i32 %.0110160, 1
  %90 = tail call noundef i32 @_Z19GetDigoutChanNumberjj(i32 noundef %.0110160, i32 noundef 0)
  br label %91

91:                                               ; preds = %82, %85, %88, %75, %72, %66
  %.1121 = phi i32 [ %.0120156, %88 ], [ %.0120156, %82 ], [ %.0120156, %85 ], [ %.0120156, %75 ], [ %73, %72 ], [ %.0120156, %66 ]
  %.1118 = phi i32 [ %.0117157, %88 ], [ %.0117157, %82 ], [ %.0117157, %85 ], [ %76, %75 ], [ %.0117157, %72 ], [ %.0117157, %66 ]
  %.1115 = phi i32 [ %.0114158, %88 ], [ %.0114158, %82 ], [ %86, %85 ], [ %.0114158, %75 ], [ %.0114158, %72 ], [ %.0114158, %66 ]
  %.1112 = phi i32 [ %.0111159, %88 ], [ %83, %82 ], [ %.0111159, %85 ], [ %.0111159, %75 ], [ %.0111159, %72 ], [ %.0111159, %66 ]
  %.1 = phi i32 [ %89, %88 ], [ %.0110160, %82 ], [ %.0110160, %85 ], [ %.0110160, %75 ], [ %.0110160, %72 ], [ %.0110160, %66 ]
  %.0109 = phi i32 [ %90, %88 ], [ %84, %82 ], [ %87, %85 ], [ %77, %75 ], [ %74, %72 ], [ %71, %66 ]
  %.not144 = icmp eq i32 %.0109, 0
  br i1 %.not144, label %.thread, label %92

92:                                               ; preds = %91
  store i32 %.0109, ptr %61, align 1, !tbaa !34
  %93 = getelementptr inbounds i8, ptr %60, i64 10
  store i16 192, ptr %93, align 1, !tbaa !41
  %94 = getelementptr inbounds i8, ptr %60, i64 20
  %95 = load i32, ptr %94, align 1, !tbaa !42
  %96 = trunc i32 %95 to i8
  %97 = add i8 %96, -1
  %98 = getelementptr inbounds i8, ptr %60, i64 14
  store i8 %97, ptr %98, align 1, !tbaa !39
  %99 = load i32, ptr %25, align 8, !tbaa !14
  %100 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %60, i32 noundef %99)
  br label %.thread

.thread:                                          ; preds = %63, %.preheader154, %92, %91
  %.2122 = phi i32 [ %.1121, %92 ], [ %.1121, %91 ], [ %.0120156, %.preheader154 ], [ %.0120156, %63 ]
  %.2119 = phi i32 [ %.1118, %92 ], [ %.1118, %91 ], [ %.0117157, %.preheader154 ], [ %.0117157, %63 ]
  %.2116 = phi i32 [ %.1115, %92 ], [ %.1115, %91 ], [ %.0114158, %.preheader154 ], [ %.0114158, %63 ]
  %.2113 = phi i32 [ %.1112, %92 ], [ %.1112, %91 ], [ %.0111159, %.preheader154 ], [ %.0111159, %63 ]
  %.2 = phi i32 [ %.1, %92 ], [ %.1, %91 ], [ %.0110160, %.preheader154 ], [ %.0110160, %63 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 596
  br i1 %exitcond.not, label %57, label %.preheader154, !llvm.loop !43

101:                                              ; preds = %57
  %102 = getelementptr inbounds i8, ptr %15, i64 633140
  store i16 213, ptr %58, align 1, !tbaa !23
  %103 = load i32, ptr %25, align 8, !tbaa !14
  %104 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %102, i32 noundef %103)
  br label %105

105:                                              ; preds = %101, %57
  %106 = load ptr, ptr @cb_pc_status_buffer_ptr, align 16, !tbaa !45
  %107 = tail call noundef i32 @_ZN10cbPcStatus19cbGetNumAnalogChansEv(ptr noundef nonnull align 1 dereferenceable(6160) %106)
  %.not166 = icmp eq i32 %107, 0
  br i1 %.not166, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %105
  %108 = getelementptr inbounds i8, ptr %15, i64 595060
  br label %111

._crit_edge:                                      ; preds = %119, %105
  %109 = getelementptr inbounds i8, ptr %15, i64 595022
  %110 = load i16, ptr %109, align 1, !tbaa !46
  %.not131 = icmp eq i16 %110, 0
  br i1 %.not131, label %128, label %124

111:                                              ; preds = %.lr.ph, %119
  %indvars.iv170 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next171, %119 ]
  %112 = getelementptr inbounds [560 x %struct.cbPKT_SS_NOISE_BOUNDARY], ptr %108, i64 0, i64 %indvars.iv170
  %113 = getelementptr inbounds i8, ptr %112, i64 16
  %114 = load i32, ptr %113, align 1, !tbaa !47
  %.not141 = icmp eq i32 %114, 0
  br i1 %.not141, label %119, label %115

115:                                              ; preds = %111
  %116 = getelementptr inbounds i8, ptr %112, i64 10
  store i16 212, ptr %116, align 1, !tbaa !49
  %117 = load i32, ptr %25, align 8, !tbaa !14
  %118 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %112, i32 noundef %117)
  br label %119

119:                                              ; preds = %111, %115
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %120 = load ptr, ptr @cb_pc_status_buffer_ptr, align 16, !tbaa !45
  %121 = tail call noundef i32 @_ZN10cbPcStatus19cbGetNumAnalogChansEv(ptr noundef nonnull align 1 dereferenceable(6160) %120)
  %122 = zext i32 %121 to i64
  %123 = icmp ult i64 %indvars.iv.next171, %122
  br i1 %123, label %111, label %._crit_edge, !llvm.loop !50

124:                                              ; preds = %._crit_edge
  %125 = getelementptr inbounds i8, ptr %15, i64 595012
  store i16 210, ptr %109, align 1, !tbaa !46
  %126 = load i32, ptr %25, align 8, !tbaa !14
  %127 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %125, i32 noundef %126)
  br label %128

128:                                              ; preds = %124, %._crit_edge
  %129 = getelementptr inbounds i8, ptr %15, i64 595046
  %130 = load i16, ptr %129, align 1, !tbaa !51
  %.not132 = icmp eq i16 %130, 0
  br i1 %.not132, label %135, label %131

131:                                              ; preds = %128
  %132 = getelementptr inbounds i8, ptr %15, i64 595036
  store i16 211, ptr %129, align 1, !tbaa !51
  %133 = load i32, ptr %25, align 8, !tbaa !14
  %134 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %132, i32 noundef %133)
  br label %135

135:                                              ; preds = %131, %128
  %136 = getelementptr inbounds i8, ptr %15, i64 633254
  %137 = load i16, ptr %136, align 1, !tbaa !52
  %.not133 = icmp eq i16 %137, 0
  br i1 %.not133, label %142, label %138

138:                                              ; preds = %135
  %139 = getelementptr inbounds i8, ptr %15, i64 633244
  store i16 145, ptr %136, align 1, !tbaa !52
  %140 = load i32, ptr %25, align 8, !tbaa !14
  %141 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %139, i32 noundef %140)
  br label %142

142:                                              ; preds = %138, %135
  %143 = getelementptr inbounds i8, ptr %15, i64 1008238
  %144 = load i16, ptr %143, align 1, !tbaa !53
  %.not134 = icmp eq i16 %144, 0
  br i1 %.not134, label %149, label %145

145:                                              ; preds = %142
  %146 = getelementptr inbounds i8, ptr %15, i64 1008228
  store i16 168, ptr %143, align 1, !tbaa !53
  %147 = load i32, ptr %25, align 8, !tbaa !14
  %148 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %146, i32 noundef %147)
  br label %149

149:                                              ; preds = %145, %142
  %150 = load ptr, ptr @cb_pc_status_buffer_ptr, align 16, !tbaa !45
  %151 = tail call noundef i32 @_ZN10cbPcStatus22cbGetNumAnalogoutChansEv(ptr noundef nonnull align 1 dereferenceable(6160) %150)
  %.not167 = icmp eq i32 %151, 0
  br i1 %.not167, label %.preheader, label %.preheader153.lr.ph

.preheader153.lr.ph:                              ; preds = %149
  %152 = getelementptr inbounds i8, ptr %15, i64 915524
  br label %.preheader153

.preheader153:                                    ; preds = %.preheader153.lr.ph, %229
  %indvars.iv177 = phi i64 [ 0, %.preheader153.lr.ph ], [ %indvars.iv.next178, %229 ]
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %153 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %152, i64 0, i64 %indvars.iv177, i64 0
  %154 = getelementptr inbounds i8, ptr %153, i64 16
  %155 = load i16, ptr %154, align 1, !tbaa !54
  %.not140 = icmp eq i16 %155, 0
  br i1 %.not140, label %169, label %158

.preheader:                                       ; preds = %229, %149
  %156 = getelementptr inbounds i8, ptr %15, i64 633298
  %157 = getelementptr inbounds i8, ptr %15, i64 633284
  br label %237

158:                                              ; preds = %.preheader153
  %159 = trunc nuw i64 %indvars.iv.next178 to i32
  %160 = tail call noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef %159, i32 noundef 0)
  %161 = trunc i32 %160 to i16
  store i16 %161, ptr %154, align 1, !tbaa !54
  %162 = and i32 %160, 65535
  %163 = tail call noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef %162, i32 noundef 0)
  %164 = trunc i32 %163 to i8
  %165 = getelementptr inbounds i8, ptr %153, i64 14
  store i8 %164, ptr %165, align 1, !tbaa !57
  %166 = getelementptr inbounds i8, ptr %153, i64 10
  store i16 179, ptr %166, align 1, !tbaa !58
  %167 = load i32, ptr %25, align 8, !tbaa !14
  %168 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %153, i32 noundef %167)
  br label %169

169:                                              ; preds = %.preheader153, %158
  %170 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %152, i64 0, i64 %indvars.iv177, i64 1
  %171 = getelementptr inbounds i8, ptr %170, i64 16
  %172 = load i16, ptr %171, align 1, !tbaa !54
  %.not140.1 = icmp eq i16 %172, 0
  br i1 %.not140.1, label %184, label %173

173:                                              ; preds = %169
  %174 = trunc nuw i64 %indvars.iv.next178 to i32
  %175 = tail call noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef %174, i32 noundef 0)
  %176 = trunc i32 %175 to i16
  store i16 %176, ptr %171, align 1, !tbaa !54
  %177 = and i32 %175, 65535
  %178 = tail call noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef %177, i32 noundef 0)
  %179 = trunc i32 %178 to i8
  %180 = getelementptr inbounds i8, ptr %170, i64 14
  store i8 %179, ptr %180, align 1, !tbaa !57
  %181 = getelementptr inbounds i8, ptr %170, i64 10
  store i16 179, ptr %181, align 1, !tbaa !58
  %182 = load i32, ptr %25, align 8, !tbaa !14
  %183 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %170, i32 noundef %182)
  br label %184

184:                                              ; preds = %173, %169
  %185 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %152, i64 0, i64 %indvars.iv177, i64 2
  %186 = getelementptr inbounds i8, ptr %185, i64 16
  %187 = load i16, ptr %186, align 1, !tbaa !54
  %.not140.2 = icmp eq i16 %187, 0
  br i1 %.not140.2, label %199, label %188

188:                                              ; preds = %184
  %189 = trunc nuw i64 %indvars.iv.next178 to i32
  %190 = tail call noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef %189, i32 noundef 0)
  %191 = trunc i32 %190 to i16
  store i16 %191, ptr %186, align 1, !tbaa !54
  %192 = and i32 %190, 65535
  %193 = tail call noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef %192, i32 noundef 0)
  %194 = trunc i32 %193 to i8
  %195 = getelementptr inbounds i8, ptr %185, i64 14
  store i8 %194, ptr %195, align 1, !tbaa !57
  %196 = getelementptr inbounds i8, ptr %185, i64 10
  store i16 179, ptr %196, align 1, !tbaa !58
  %197 = load i32, ptr %25, align 8, !tbaa !14
  %198 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %185, i32 noundef %197)
  br label %199

199:                                              ; preds = %188, %184
  %200 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %152, i64 0, i64 %indvars.iv177, i64 3
  %201 = getelementptr inbounds i8, ptr %200, i64 16
  %202 = load i16, ptr %201, align 1, !tbaa !54
  %.not140.3 = icmp eq i16 %202, 0
  br i1 %.not140.3, label %214, label %203

203:                                              ; preds = %199
  %204 = trunc nuw i64 %indvars.iv.next178 to i32
  %205 = tail call noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef %204, i32 noundef 0)
  %206 = trunc i32 %205 to i16
  store i16 %206, ptr %201, align 1, !tbaa !54
  %207 = and i32 %205, 65535
  %208 = tail call noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef %207, i32 noundef 0)
  %209 = trunc i32 %208 to i8
  %210 = getelementptr inbounds i8, ptr %200, i64 14
  store i8 %209, ptr %210, align 1, !tbaa !57
  %211 = getelementptr inbounds i8, ptr %200, i64 10
  store i16 179, ptr %211, align 1, !tbaa !58
  %212 = load i32, ptr %25, align 8, !tbaa !14
  %213 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %200, i32 noundef %212)
  br label %214

214:                                              ; preds = %203, %199
  %215 = getelementptr inbounds [18 x [5 x %struct.cbPKT_AOUT_WAVEFORM]], ptr %152, i64 0, i64 %indvars.iv177, i64 4
  %216 = getelementptr inbounds i8, ptr %215, i64 16
  %217 = load i16, ptr %216, align 1, !tbaa !54
  %.not140.4 = icmp eq i16 %217, 0
  br i1 %.not140.4, label %229, label %218

218:                                              ; preds = %214
  %219 = trunc nuw i64 %indvars.iv.next178 to i32
  %220 = tail call noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef %219, i32 noundef 0)
  %221 = trunc i32 %220 to i16
  store i16 %221, ptr %216, align 1, !tbaa !54
  %222 = and i32 %220, 65535
  %223 = tail call noundef i32 @_Z19cbGetChanInstrumentjj(i32 noundef %222, i32 noundef 0)
  %224 = trunc i32 %223 to i8
  %225 = getelementptr inbounds i8, ptr %215, i64 14
  store i8 %224, ptr %225, align 1, !tbaa !57
  %226 = getelementptr inbounds i8, ptr %215, i64 10
  store i16 179, ptr %226, align 1, !tbaa !58
  %227 = load i32, ptr %25, align 8, !tbaa !14
  %228 = tail call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %215, i32 noundef %227)
  br label %229

229:                                              ; preds = %218, %214
  %230 = load ptr, ptr @cb_pc_status_buffer_ptr, align 16, !tbaa !45
  %231 = tail call noundef i32 @_ZN10cbPcStatus22cbGetNumAnalogoutChansEv(ptr noundef nonnull align 1 dereferenceable(6160) %230)
  %232 = zext i32 %231 to i64
  %233 = icmp ult i64 %indvars.iv.next178, %232
  br i1 %233, label %.preheader153, label %.preheader, !llvm.loop !59

234:                                              ; preds = %254
  %235 = getelementptr inbounds i8, ptr %15, i64 594986
  %236 = load i16, ptr %235, align 1, !tbaa !60
  %.not135 = icmp eq i16 %236, 0
  br i1 %.not135, label %259, label %255

237:                                              ; preds = %.preheader, %254
  %indvars.iv180 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next181, %254 ]
  call void @llvm.lifetime.start.p0(i64 17, ptr nonnull %2) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(17) %2, i8 0, i64 17, i1 false)
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %238 = trunc nuw nsw i64 %indvars.iv.next181 to i32
  %239 = call noundef i32 @_Z15cbGetNTrodeInfojPcPA5_19cbMANUALUNITMAPPINGPtS3_S3_j(i32 noundef %238, ptr noundef nonnull %2, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, i32 noundef 0)
  %char0 = load i8, ptr %2, align 16
  %.not138 = icmp eq i8 %char0, 0
  br i1 %.not138, label %254, label %240

240:                                              ; preds = %237
  %241 = call noundef i32 @_Z21cbGetNTrodeInstrumentjj(i32 noundef %238, i32 noundef 0)
  %242 = load i8, ptr %156, align 1, !tbaa !61
  %243 = zext i8 %242 to i32
  %244 = add nuw nsw i32 %243, 1
  %245 = icmp eq i32 %241, %244
  br i1 %245, label %246, label %254

246:                                              ; preds = %240
  %247 = getelementptr inbounds [280 x %struct.cbPKT_NTRODEINFO], ptr %157, i64 0, i64 %indvars.iv180
  %248 = getelementptr inbounds i8, ptr %247, i64 16
  %249 = load i32, ptr %248, align 1, !tbaa !63
  %.not139 = icmp eq i32 %249, 0
  br i1 %.not139, label %254, label %250

250:                                              ; preds = %246
  %251 = getelementptr inbounds i8, ptr %247, i64 10
  store i16 167, ptr %251, align 1, !tbaa !64
  %252 = load i32, ptr %25, align 8, !tbaa !14
  %253 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %247, i32 noundef %252)
  br label %254

254:                                              ; preds = %246, %250, %240, %237
  call void @llvm.lifetime.end.p0(i64 17, ptr nonnull %2) #6
  %exitcond183.not = icmp eq i64 %indvars.iv.next181, 280
  br i1 %exitcond183.not, label %234, label %237, !llvm.loop !65

255:                                              ; preds = %234
  %256 = getelementptr inbounds i8, ptr %15, i64 594976
  store i16 165, ptr %235, align 1, !tbaa !60
  %257 = load i32, ptr %25, align 8, !tbaa !14
  %258 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %256, i32 noundef %257)
  br label %259

259:                                              ; preds = %255, %234
  %260 = load i32, ptr %9, align 8, !tbaa !12
  %261 = icmp slt i32 %260, 8
  br i1 %261, label %262, label %280

262:                                              ; preds = %259
  %263 = getelementptr inbounds i8, ptr %0, i64 72
  %264 = load i8, ptr %263, align 8, !tbaa !66, !range !67, !noundef !68
  %265 = trunc nuw i8 %264 to i1
  br i1 %265, label %280, label %266

266:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #6
  %267 = getelementptr inbounds i8, ptr %3, i64 8
  store i16 -32768, ptr %267, align 1, !tbaa !69
  %268 = getelementptr inbounds i8, ptr %3, i64 10
  store i16 213, ptr %268, align 1, !tbaa !70
  %269 = getelementptr inbounds i8, ptr %3, i64 12
  store i16 16, ptr %269, align 1, !tbaa !71
  %270 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 300, ptr %270, align 1, !tbaa !72
  %271 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 6, ptr %271, align 1, !tbaa !73
  %272 = getelementptr inbounds i8, ptr %3, i64 24
  store i32 1, ptr %272, align 1, !tbaa !74
  %273 = getelementptr inbounds i8, ptr %3, i64 28
  store <4 x float> <float 9.000000e+00, float 1.250000e+02, float 0x3FE99999A0000000, float 0x3FEE147AE0000000>, ptr %273, align 1, !tbaa !75
  %274 = getelementptr inbounds i8, ptr %3, i64 44
  store <2 x float> <float 5.000000e-01, float 5.000000e-01>, ptr %274, align 1, !tbaa !75
  %275 = getelementptr inbounds i8, ptr %3, i64 52
  store float 0x3F90624DE0000000, ptr %275, align 1, !tbaa !76
  %276 = getelementptr inbounds i8, ptr %3, i64 56
  store i32 250, ptr %276, align 1, !tbaa !77
  %277 = getelementptr inbounds i8, ptr %3, i64 60
  store i32 0, ptr %277, align 1, !tbaa !78
  %278 = load i32, ptr %25, align 8, !tbaa !14
  %279 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %3, i32 noundef %278)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #6
  br label %280

280:                                              ; preds = %266, %262, %259
  %281 = getelementptr inbounds i8, ptr %15, i64 633214
  %282 = load i16, ptr %281, align 1, !tbaa !79
  %.not136 = icmp eq i16 %282, 0
  br i1 %.not136, label %288, label %283

283:                                              ; preds = %280
  %284 = getelementptr inbounds i8, ptr %15, i64 633204
  store i16 215, ptr %281, align 1, !tbaa !79
  %285 = getelementptr inbounds i8, ptr %15, i64 633232
  store i32 0, ptr %285, align 1, !tbaa !80
  %286 = load i32, ptr %25, align 8, !tbaa !14
  %287 = call noundef i32 @_Z12cbSendPacketPvj(ptr noundef nonnull %284, i32 noundef %286)
  br label %288

288:                                              ; preds = %283, %280
  %289 = load ptr, ptr %17, align 8, !tbaa !13
  %.not137 = icmp eq ptr %289, null
  br i1 %.not137, label %294, label %290

290:                                              ; preds = %288
  %291 = load i32, ptr %25, align 8, !tbaa !14
  %292 = getelementptr inbounds i8, ptr %0, i64 64
  %293 = load ptr, ptr %292, align 8, !tbaa !15
  call void %289(i32 noundef %291, i32 noundef 0, ptr noundef %293, i32 noundef 2, i32 noundef 100)
  br label %294

294:                                              ; preds = %288, %290, %1
  %.0124 = phi i32 [ -1, %1 ], [ 0, %290 ], [ 0, %288 ]
  ret i32 %.0124
}

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

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

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

declare noundef i32 @_Z26cbGetExpandedChannelNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i32 @_Z23GetAIAnalogInChanNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i32 @_Z29GetAnalogOrAudioOutChanNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i32 @_Z19GetSerialChanNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i32 @_Z18GetDiginChanNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i32 @_Z19GetDigoutChanNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10cbPcStatus19cbGetNumAnalogChansEv(ptr noundef nonnull align 1 dereferenceable(6160)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10cbPcStatus22cbGetNumAnalogoutChansEv(ptr noundef nonnull align 1 dereferenceable(6160)) local_unnamed_addr #0 align 2

declare noundef i32 @_Z22GetAnalogOutChanNumberjj(i32 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i32 @_Z19cbGetChanInstrumentjj(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

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

declare noundef i32 @_Z21cbGetNTrodeInstrumentjj(i32 noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress 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 nofree nounwind willreturn memory(read) }
attributes #2 = { mustprogress 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !7, i64 8}
!6 = !{!"_ZTS8CCFUtils", !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !7, i64 64, !10, i64 72, !10, i64 73}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !11, i64 48}
!13 = !{!6, !7, i64 24}
!14 = !{!6, !11, i64 56}
!15 = !{!6, !7, i64 64}
!16 = !{!17, !11, i64 20}
!17 = !{!"_ZTS14cbPKT_FILTINFO", !18, i64 0, !11, i64 16, !11, i64 20, !8, i64 24, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !21, i64 64, !21, i64 72, !21, i64 80, !21, i64 88, !21, i64 96, !21, i64 104, !21, i64 112, !21, i64 120, !21, i64 128}
!18 = !{!"_ZTS12cbPKT_HEADER", !19, i64 0, !20, i64 8, !20, i64 10, !20, i64 12, !8, i64 14, !8, i64 15}
!19 = !{!"long", !8, i64 0}
!20 = !{!"short", !8, i64 0}
!21 = !{!"double", !8, i64 0}
!22 = !{!17, !20, i64 10}
!23 = !{!24, !20, i64 443454}
!24 = !{!"_ZTS5cbCCF", !8, i64 0, !25, i64 405280, !27, i64 405316, !28, i64 405340, !8, i64 405364, !29, i64 443444, !30, i64 443508, !32, i64 443548, !8, i64 443588, !8, i64 725828, !8, i64 817988, !33, i64 818532}
!25 = !{!"_ZTS19cbPKT_ADAPTFILTINFO", !18, i64 0, !11, i64 16, !11, i64 20, !26, i64 24, !11, i64 28, !11, i64 32}
!26 = !{!"float", !8, i64 0}
!27 = !{!"_ZTS15cbPKT_SS_DETECT", !18, i64 0, !26, i64 16, !26, i64 20}
!28 = !{!"_ZTS21cbPKT_SS_ARTIF_REJECT", !18, i64 0, !11, i64 16, !11, i64 20}
!29 = !{!"_ZTS19cbPKT_SS_STATISTICS", !18, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !26, i64 28, !26, i64 32, !26, i64 36, !26, i64 40, !26, i64 44, !26, i64 48, !26, i64 52, !11, i64 56, !11, i64 60}
!30 = !{!"_ZTS15cbPKT_SS_STATUS", !18, i64 0, !31, i64 16, !31, i64 28}
!31 = !{!"_ZTS14cbAdaptControl", !11, i64 0, !26, i64 4, !26, i64 8}
!32 = !{!"_ZTS13cbPKT_SYSINFO", !18, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!33 = !{!"_ZTS9cbPKT_LNC", !18, i64 0, !11, i64 16, !11, i64 20, !11, i64 24}
!34 = !{!35, !11, i64 16}
!35 = !{!"_ZTS14cbPKT_CHANINFO", !18, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !36, i64 56, !37, i64 80, !36, i64 120, !37, i64 144, !8, i64 184, !11, i64 200, !8, i64 204, !36, i64 220, !36, i64 244, !11, i64 268, !11, i64 272, !11, i64 276, !11, i64 280, !8, i64 284, !8, i64 292, !8, i64 293, !8, i64 295, !20, i64 296, !20, i64 298, !11, i64 300, !11, i64 304, !11, i64 308, !11, i64 312, !11, i64 316, !11, i64 320, !11, i64 324, !11, i64 328, !11, i64 332, !11, i64 336, !11, i64 340, !11, i64 344, !11, i64 348, !20, i64 352, !20, i64 354, !11, i64 356, !8, i64 360, !8, i64 520}
!36 = !{!"_ZTS9cbSCALING", !20, i64 0, !20, i64 2, !11, i64 4, !11, i64 8, !11, i64 12, !8, i64 16}
!37 = !{!"_ZTS10cbFILTDESC", !8, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36}
!38 = !{!35, !11, i64 32}
!39 = !{!35, !8, i64 14}
!40 = !{!35, !11, i64 40}
!41 = !{!35, !20, i64 10}
!42 = !{!35, !11, i64 20}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!7, !7, i64 0}
!46 = !{!24, !20, i64 405326}
!47 = !{!48, !11, i64 16}
!48 = !{!"_ZTS23cbPKT_SS_NOISE_BOUNDARY", !18, i64 0, !11, i64 16, !8, i64 20, !8, i64 32}
!49 = !{!48, !20, i64 10}
!50 = distinct !{!50, !44}
!51 = !{!24, !20, i64 405350}
!52 = !{!24, !20, i64 443558}
!53 = !{!24, !20, i64 818542}
!54 = !{!55, !20, i64 16}
!55 = !{!"_ZTS19cbPKT_AOUT_WAVEFORM", !18, i64 0, !20, i64 16, !20, i64 18, !11, i64 20, !8, i64 24, !8, i64 25, !20, i64 26, !20, i64 28, !8, i64 30, !8, i64 31, !56, i64 32}
!56 = !{!"_ZTS14cbWaveformData", !20, i64 0, !8, i64 2}
!57 = !{!55, !8, i64 14}
!58 = !{!55, !20, i64 10}
!59 = distinct !{!59, !44}
!60 = !{!24, !20, i64 405290}
!61 = !{!62, !8, i64 14}
!62 = !{!"_ZTS16cbPKT_NTRODEINFO", !18, i64 0, !11, i64 16, !8, i64 20, !8, i64 36, !20, i64 996, !20, i64 998, !8, i64 1000}
!63 = !{!62, !11, i64 16}
!64 = !{!62, !20, i64 10}
!65 = distinct !{!65, !44}
!66 = !{!6, !10, i64 72}
!67 = !{i8 0, i8 2}
!68 = !{}
!69 = !{!29, !20, i64 8}
!70 = !{!29, !20, i64 10}
!71 = !{!29, !20, i64 12}
!72 = !{!29, !11, i64 16}
!73 = !{!29, !11, i64 20}
!74 = !{!29, !11, i64 24}
!75 = !{!26, !26, i64 0}
!76 = !{!29, !26, i64 52}
!77 = !{!29, !11, i64 56}
!78 = !{!29, !11, i64 60}
!79 = !{!24, !20, i64 443518}
!80 = !{!24, !11, i64 443536}


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