; LLVM IR from dbry/wavpack-stream :: cli (dsf)

; 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.DSFFileChunk = type <{ [4 x i8], i64, i64, i64 }>
%struct.DSFFormatChunk = type <{ [4 x i8], i64, i32, i32, i32, i32, i32, i32, i64, i32, i32 }>
%struct.DSFChunkHeader = type <{ [4 x i8], i64 }>
%struct.WavpackStreamConfig = type { float, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x i8], i8, i32, ptr }

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@debug_logging_mode = external global i32, align 4
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [48 x i8], align 1
@channel_masks = external hidden constant [7 x i16], align 2
@.str.19 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @ParseDsfHeaderConfig(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %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 i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %struct.DSFFileChunk, align 4
  %17 = alloca %struct.DSFFormatChunk, align 4
  %18 = alloca %struct.DSFChunkHeader, align 4
  %19 = alloca i32, align 4
  %20 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 28, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 52, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = call i64 @DoGetFileSize(ptr noundef %21)
  store i64 %22, ptr %12, align 8, !tbaa !9
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 1 %23, i64 4, i1 false)
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %16, i64 4
  %26 = call i32 @DoReadFile(ptr noundef %24, ptr noundef %25, i32 noundef 24, ptr noundef %19)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %32

28:                                               ; preds = %5
  %29 = load i32, ptr %19, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = icmp ne i64 %30, 24
  br i1 %31, label %32, label %34

32:                                               ; preds = %28, %5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ...) @error_line(ptr noundef @.str, ptr noundef %33)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

34:                                               ; preds = %28
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %35, i32 0, i32 4
  %37 = load i32, ptr %36, align 8, !tbaa !13
  %38 = and i32 %37, 512
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %47, label %40

40:                                               ; preds = %34
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = call i32 @WavpackStreamAddWrapper(ptr noundef %41, ptr noundef %16, i32 noundef 28)
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %47, label %44

44:                                               ; preds = %40
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %45)
  call void (ptr, ...) @error_line(ptr noundef @.str.1, ptr noundef %46)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

47:                                               ; preds = %40, %34
  br label %48

48:                                               ; preds = %47
  call void @WavpackStreamLittleEndianToNative(ptr noundef %16, ptr noundef @.str.2)
  %49 = load i32, ptr @debug_logging_mode, align 4, !tbaa !11
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %58

51:                                               ; preds = %48
  %52 = getelementptr inbounds %struct.DSFFileChunk, ptr %16, i32 0, i32 1
  %53 = load i64, ptr %52, align 4, !tbaa !16
  %54 = getelementptr inbounds %struct.DSFFileChunk, ptr %16, i32 0, i32 2
  %55 = load i64, ptr %54, align 4, !tbaa !18
  %56 = getelementptr inbounds %struct.DSFFileChunk, ptr %16, i32 0, i32 3
  %57 = load i64, ptr %56, align 4, !tbaa !19
  call void (ptr, ...) @error_line(ptr noundef @.str.3, i64 noundef %53, i64 noundef %55, i64 noundef %57)
  br label %58

58:                                               ; preds = %51, %48
  %59 = load i64, ptr %12, align 8, !tbaa !9
  %60 = icmp ne i64 %59, 0
  br i1 %60, label %61, label %83

61:                                               ; preds = %58
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %62, i32 0, i32 4
  %64 = load i32, ptr %63, align 8, !tbaa !13
  %65 = and i32 %64, 2048
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %83, label %67

67:                                               ; preds = %61
  %68 = getelementptr inbounds %struct.DSFFileChunk, ptr %16, i32 0, i32 2
  %69 = load i64, ptr %68, align 4, !tbaa !18
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %71, label %83

71:                                               ; preds = %67
  %72 = getelementptr inbounds %struct.DSFFileChunk, ptr %16, i32 0, i32 2
  %73 = load i64, ptr %72, align 4, !tbaa !18
  %74 = add nsw i64 %73, 1
  %75 = icmp ne i64 %74, 0
  br i1 %75, label %76, label %83

76:                                               ; preds = %71
  %77 = getelementptr inbounds %struct.DSFFileChunk, ptr %16, i32 0, i32 2
  %78 = load i64, ptr %77, align 4, !tbaa !18
  %79 = load i64, ptr %12, align 8, !tbaa !9
  %80 = icmp ne i64 %78, %79
  br i1 %80, label %81, label %83

81:                                               ; preds = %76
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ...) @error_line(ptr noundef @.str.4, ptr noundef %82)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

83:                                               ; preds = %76, %71, %67, %61, %58
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %84, i32 0, i32 13
  %86 = load i32, ptr %85, align 4, !tbaa !20
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %94, label %88

88:                                               ; preds = %83
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %89, i32 0, i32 4
  %91 = load i32, ptr %90, align 8, !tbaa !13
  %92 = and i32 %91, 1024
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %88, %83
  call void (ptr, ...) @error_line(ptr noundef @.str.5)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

95:                                               ; preds = %88
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = call i32 @DoReadFile(ptr noundef %96, ptr noundef %17, i32 noundef 52, ptr noundef %19)
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %108

99:                                               ; preds = %95
  %100 = load i32, ptr %19, align 4, !tbaa !11
  %101 = zext i32 %100 to i64
  %102 = icmp ne i64 %101, 52
  br i1 %102, label %108, label %103

103:                                              ; preds = %99
  %104 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 0
  %105 = getelementptr inbounds [4 x i8], ptr %104, i64 0, i64 0
  %106 = call i32 @strncmp(ptr noundef %105, ptr noundef @.str.6, i64 noundef 4) #6
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %103, %99, %95
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ...) @error_line(ptr noundef @.str, ptr noundef %109)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

110:                                              ; preds = %103
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %111, i32 0, i32 4
  %113 = load i32, ptr %112, align 8, !tbaa !13
  %114 = and i32 %113, 512
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %123, label %116

116:                                              ; preds = %110
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = call i32 @WavpackStreamAddWrapper(ptr noundef %117, ptr noundef %17, i32 noundef 52)
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %123, label %120

120:                                              ; preds = %116
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %121)
  call void (ptr, ...) @error_line(ptr noundef @.str.1, ptr noundef %122)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

123:                                              ; preds = %116, %110
  br label %124

124:                                              ; preds = %123
  call void @WavpackStreamLittleEndianToNative(ptr noundef %17, ptr noundef @.str.7)
  %125 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 1
  %126 = load i64, ptr %125, align 4, !tbaa !21
  %127 = icmp ne i64 %126, 52
  br i1 %127, label %169, label %128

128:                                              ; preds = %124
  %129 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 2
  %130 = load i32, ptr %129, align 4, !tbaa !23
  %131 = icmp ne i32 %130, 1
  br i1 %131, label %169, label %132

132:                                              ; preds = %128
  %133 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !24
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %169, label %136

136:                                              ; preds = %132
  %137 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 9
  %138 = load i32, ptr %137, align 4, !tbaa !25
  %139 = icmp ne i32 %138, 4096
  br i1 %139, label %169, label %140

140:                                              ; preds = %136
  %141 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 10
  %142 = load i32, ptr %141, align 4, !tbaa !26
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %169, label %144

144:                                              ; preds = %140
  %145 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 7
  %146 = load i32, ptr %145, align 4, !tbaa !27
  %147 = icmp ne i32 %146, 1
  br i1 %147, label %148, label %152

148:                                              ; preds = %144
  %149 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 7
  %150 = load i32, ptr %149, align 4, !tbaa !27
  %151 = icmp ne i32 %150, 8
  br i1 %151, label %169, label %152

152:                                              ; preds = %148, %144
  %153 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 5
  %154 = load i32, ptr %153, align 4, !tbaa !28
  %155 = icmp ult i32 %154, 1
  br i1 %155, label %169, label %156

156:                                              ; preds = %152
  %157 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 5
  %158 = load i32, ptr %157, align 4, !tbaa !28
  %159 = icmp ugt i32 %158, 6
  br i1 %159, label %169, label %160

160:                                              ; preds = %156
  %161 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 4
  %162 = load i32, ptr %161, align 4, !tbaa !29
  %163 = icmp ult i32 %162, 1
  br i1 %163, label %169, label %164

164:                                              ; preds = %160
  %165 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 4
  %166 = load i32, ptr %165, align 4, !tbaa !29
  %167 = zext i32 %166 to i64
  %168 = icmp ugt i64 %167, 7
  br i1 %168, label %169, label %171

169:                                              ; preds = %164, %160, %156, %152, %148, %140, %136, %132, %128, %124
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ...) @error_line(ptr noundef @.str, ptr noundef %170)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

171:                                              ; preds = %164
  %172 = load i32, ptr @debug_logging_mode, align 4, !tbaa !11
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %187

174:                                              ; preds = %171
  %175 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 6
  %176 = load i32, ptr %175, align 4, !tbaa !30
  call void (ptr, ...) @error_line(ptr noundef @.str.8, i32 noundef %176)
  %177 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 4
  %178 = load i32, ptr %177, align 4, !tbaa !29
  %179 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 5
  %180 = load i32, ptr %179, align 4, !tbaa !28
  call void (ptr, ...) @error_line(ptr noundef @.str.9, i32 noundef %178, i32 noundef %180)
  %181 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 9
  %182 = load i32, ptr %181, align 4, !tbaa !25
  %183 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 7
  %184 = load i32, ptr %183, align 4, !tbaa !27
  call void (ptr, ...) @error_line(ptr noundef @.str.10, i32 noundef %182, i32 noundef %184)
  %185 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 8
  %186 = load i64, ptr %185, align 4, !tbaa !31
  call void (ptr, ...) @error_line(ptr noundef @.str.11, i64 noundef %186)
  br label %187

187:                                              ; preds = %174, %171
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = call i32 @DoReadFile(ptr noundef %188, ptr noundef %18, i32 noundef 12, ptr noundef %19)
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %200

191:                                              ; preds = %187
  %192 = load i32, ptr %19, align 4, !tbaa !11
  %193 = zext i32 %192 to i64
  %194 = icmp ne i64 %193, 12
  br i1 %194, label %200, label %195

195:                                              ; preds = %191
  %196 = getelementptr inbounds %struct.DSFChunkHeader, ptr %18, i32 0, i32 0
  %197 = getelementptr inbounds [4 x i8], ptr %196, i64 0, i64 0
  %198 = call i32 @strncmp(ptr noundef %197, ptr noundef @.str.12, i64 noundef 4) #6
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %202

200:                                              ; preds = %195, %191, %187
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ...) @error_line(ptr noundef @.str, ptr noundef %201)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

202:                                              ; preds = %195
  %203 = load ptr, ptr %11, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %203, i32 0, i32 4
  %205 = load i32, ptr %204, align 8, !tbaa !13
  %206 = and i32 %205, 512
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %215, label %208

208:                                              ; preds = %202
  %209 = load ptr, ptr %10, align 8, !tbaa !5
  %210 = call i32 @WavpackStreamAddWrapper(ptr noundef %209, ptr noundef %18, i32 noundef 12)
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %215, label %212

212:                                              ; preds = %208
  %213 = load ptr, ptr %10, align 8, !tbaa !5
  %214 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %213)
  call void (ptr, ...) @error_line(ptr noundef @.str.1, ptr noundef %214)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

215:                                              ; preds = %208, %202
  br label %216

216:                                              ; preds = %215
  call void @WavpackStreamLittleEndianToNative(ptr noundef %18, ptr noundef @.str.13)
  %217 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 8
  %218 = load i64, ptr %217, align 4, !tbaa !31
  store i64 %218, ptr %13, align 8, !tbaa !9
  %219 = load i64, ptr %13, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 9
  %221 = load i32, ptr %220, align 4, !tbaa !25
  %222 = mul i32 %221, 8
  %223 = zext i32 %222 to i64
  %224 = sdiv i64 %219, %223
  store i64 %224, ptr %14, align 8, !tbaa !9
  %225 = load i64, ptr %13, align 8, !tbaa !9
  %226 = load i64, ptr %14, align 8, !tbaa !9
  %227 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 9
  %228 = load i32, ptr %227, align 4, !tbaa !25
  %229 = zext i32 %228 to i64
  %230 = mul nsw i64 %226, %229
  %231 = mul nsw i64 %230, 8
  %232 = sub nsw i64 %225, %231
  store i64 %232, ptr %15, align 8, !tbaa !9
  %233 = load i64, ptr %15, align 8, !tbaa !9
  %234 = icmp ne i64 %233, 0
  br i1 %234, label %235, label %238

235:                                              ; preds = %216
  %236 = load i64, ptr %14, align 8, !tbaa !9
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %14, align 8, !tbaa !9
  br label %238

238:                                              ; preds = %235, %216
  %239 = load i32, ptr @debug_logging_mode, align 4, !tbaa !11
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %255

241:                                              ; preds = %238
  %242 = load i64, ptr %15, align 8, !tbaa !9
  %243 = load i64, ptr %15, align 8, !tbaa !9
  %244 = srem i64 %243, 8
  %245 = trunc i64 %244 to i32
  call void (ptr, ...) @error_line(ptr noundef @.str.14, i64 noundef %242, i32 noundef %245)
  %246 = getelementptr inbounds %struct.DSFChunkHeader, ptr %18, i32 0, i32 1
  %247 = load i64, ptr %246, align 4, !tbaa !32
  %248 = sub nsw i64 %247, 12
  call void (ptr, ...) @error_line(ptr noundef @.str.15, i64 noundef %248)
  %249 = load i64, ptr %14, align 8, !tbaa !9
  %250 = mul nsw i64 %249, 4096
  %251 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 5
  %252 = load i32, ptr %251, align 4, !tbaa !28
  %253 = zext i32 %252 to i64
  %254 = mul nsw i64 %250, %253
  call void (ptr, ...) @error_line(ptr noundef @.str.16, i64 noundef %254)
  br label %255

255:                                              ; preds = %241, %238
  %256 = load i64, ptr %13, align 8, !tbaa !9
  %257 = and i64 %256, 7
  %258 = icmp ne i64 %257, 0
  br i1 %258, label %259, label %260

259:                                              ; preds = %255
  call void (ptr, ...) @error_line(ptr noundef @.str.17)
  br label %260

260:                                              ; preds = %259, %255
  %261 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 6
  %262 = load i32, ptr %261, align 4, !tbaa !30
  %263 = and i32 %262, 7
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %265, label %266

265:                                              ; preds = %260
  call void (ptr, ...) @error_line(ptr noundef @.str.18)
  br label %266

266:                                              ; preds = %265, %260
  %267 = load ptr, ptr %11, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %267, i32 0, i32 2
  store i32 8, ptr %268, align 8, !tbaa !34
  %269 = load ptr, ptr %11, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %269, i32 0, i32 3
  store i32 1, ptr %270, align 4, !tbaa !35
  %271 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 5
  %272 = load i32, ptr %271, align 4, !tbaa !28
  %273 = load ptr, ptr %11, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %273, i32 0, i32 7
  store i32 %272, ptr %274, align 4, !tbaa !36
  %275 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 4
  %276 = load i32, ptr %275, align 4, !tbaa !29
  %277 = sub i32 %276, 1
  %278 = zext i32 %277 to i64
  %279 = getelementptr inbounds [7 x i16], ptr @channel_masks, i64 0, i64 %278
  %280 = load i16, ptr %279, align 2, !tbaa !37
  %281 = zext i16 %280 to i32
  %282 = load ptr, ptr %11, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %282, i32 0, i32 13
  store i32 %281, ptr %283, align 4, !tbaa !20
  %284 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 6
  %285 = load i32, ptr %284, align 4, !tbaa !30
  %286 = udiv i32 %285, 8
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %287, i32 0, i32 12
  store i32 %286, ptr %288, align 8, !tbaa !39
  %289 = getelementptr inbounds %struct.DSFFormatChunk, ptr %17, i32 0, i32 7
  %290 = load i32, ptr %289, align 4, !tbaa !27
  %291 = icmp eq i32 %290, 1
  br i1 %291, label %292, label %297

292:                                              ; preds = %266
  %293 = load ptr, ptr %11, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %293, i32 0, i32 4
  %295 = load i32, ptr %294, align 8, !tbaa !13
  %296 = or i32 %295, 80
  store i32 %296, ptr %294, align 8, !tbaa !13
  br label %302

297:                                              ; preds = %266
  %298 = load ptr, ptr %11, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.WavpackStreamConfig, ptr %298, i32 0, i32 4
  %300 = load i32, ptr %299, align 8, !tbaa !13
  %301 = or i32 %300, 96
  store i32 %301, ptr %299, align 8, !tbaa !13
  br label %302

302:                                              ; preds = %297, %292
  %303 = load ptr, ptr %10, align 8, !tbaa !5
  %304 = load ptr, ptr %11, align 8, !tbaa !5
  %305 = load i64, ptr %13, align 8, !tbaa !9
  %306 = add nsw i64 %305, 7
  %307 = sdiv i64 %306, 8
  %308 = call i32 @WavpackStreamSetConfiguration64(ptr noundef %303, ptr noundef %304, i64 noundef %307, ptr noundef null)
  %309 = icmp ne i32 %308, 0
  br i1 %309, label %314, label %310

310:                                              ; preds = %302
  %311 = load ptr, ptr %8, align 8, !tbaa !5
  %312 = load ptr, ptr %10, align 8, !tbaa !5
  %313 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %312)
  call void (ptr, ...) @error_line(ptr noundef @.str.19, ptr noundef %311, ptr noundef %313)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

314:                                              ; preds = %302
  store i32 0, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %315

315:                                              ; preds = %314, %310, %212, %200, %169, %120, %108, %94, %81, %44, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 52, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %316 = load i32, ptr %6, align 4
  ret i32 %316
}

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

declare i64 @DoGetFileSize(ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i32 @DoReadFile(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare void @error_line(ptr noundef, ...) #2

declare i32 @WavpackStreamAddWrapper(ptr noundef, ptr noundef, i32 noundef) #2

declare ptr @WavpackStreamGetErrorMessage(ptr noundef) #2

declare void @WavpackStreamLittleEndianToNative(ptr noundef, ptr noundef) #2

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

declare i32 @WavpackStreamSetConfiguration64(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

; 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 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"", !15, i64 0, !15, i64 4, !12, i64 8, !12, i64 12, !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, !7, i64 56, !7, i64 72, !12, i64 76, !6, i64 80}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !10, i64 4}
!17 = !{!"", !7, i64 0, !10, i64 4, !10, i64 12, !10, i64 20}
!18 = !{!17, !10, i64 12}
!19 = !{!17, !10, i64 20}
!20 = !{!14, !12, i64 52}
!21 = !{!22, !10, i64 4}
!22 = !{!"", !7, i64 0, !10, i64 4, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !10, i64 36, !12, i64 44, !12, i64 48}
!23 = !{!22, !12, i64 12}
!24 = !{!22, !12, i64 16}
!25 = !{!22, !12, i64 44}
!26 = !{!22, !12, i64 48}
!27 = !{!22, !12, i64 32}
!28 = !{!22, !12, i64 24}
!29 = !{!22, !12, i64 20}
!30 = !{!22, !12, i64 28}
!31 = !{!22, !10, i64 36}
!32 = !{!33, !10, i64 4}
!33 = !{!"", !7, i64 0, !10, i64 4}
!34 = !{!14, !12, i64 8}
!35 = !{!14, !12, i64 12}
!36 = !{!14, !12, i64 28}
!37 = !{!38, !38, i64 0}
!38 = !{!"short", !7, i64 0}
!39 = !{!14, !12, i64 48}


; 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.DSFFileChunk = type <{ [4 x i8], i64, i64, i64 }>
%struct.DSFFormatChunk = type <{ [4 x i8], i64, i32, i32, i32, i32, i32, i32, i64, i32, i32 }>
%struct.DSFChunkHeader = type <{ [4 x i8], i64 }>

@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@debug_logging_mode = external local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [48 x i8], align 1
@channel_masks = external hidden local_unnamed_addr constant [7 x i16], align 2
@.str.19 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @ParseDsfHeaderConfig(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = alloca %struct.DSFFileChunk, align 4
  %7 = alloca %struct.DSFFormatChunk, align 4
  %8 = alloca %struct.DSFChunkHeader, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %10 = tail call i64 @DoGetFileSize(ptr noundef %0) #4
  %11 = load i32, ptr %2, align 1
  store i32 %11, ptr %6, align 4
  %12 = getelementptr inbounds i8, ptr %6, i64 4
  %13 = call i32 @DoReadFile(ptr noundef %0, ptr noundef nonnull %12, i32 noundef 24, ptr noundef nonnull %9) #4
  %14 = icmp eq i32 %13, 0
  %15 = load i32, ptr %9, align 4
  %16 = icmp ne i32 %15, 24
  %or.cond = select i1 %14, i1 true, i1 %16
  br i1 %or.cond, label %17, label %18

17:                                               ; preds = %5
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str, ptr noundef %1) #4
  br label %173

18:                                               ; preds = %5
  %19 = getelementptr inbounds i8, ptr %4, i64 16
  %20 = load i32, ptr %19, align 8, !tbaa !5
  %21 = and i32 %20, 512
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %22, label %26

22:                                               ; preds = %18
  %23 = call i32 @WavpackStreamAddWrapper(ptr noundef %3, ptr noundef nonnull %6, i32 noundef 28) #4
  %.not87 = icmp eq i32 %23, 0
  br i1 %.not87, label %24, label %26

24:                                               ; preds = %22
  %25 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %3) #4
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.1, ptr noundef %25) #4
  br label %173

26:                                               ; preds = %18, %22
  call void @WavpackStreamLittleEndianToNative(ptr noundef nonnull %6, ptr noundef nonnull @.str.2) #4
  %27 = load i32, ptr @debug_logging_mode, align 4, !tbaa !12
  %.not88 = icmp eq i32 %27, 0
  br i1 %.not88, label %34, label %28

28:                                               ; preds = %26
  %29 = load i64, ptr %12, align 4, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %6, i64 12
  %31 = load i64, ptr %30, align 4, !tbaa !16
  %32 = getelementptr inbounds i8, ptr %6, i64 20
  %33 = load i64, ptr %32, align 4, !tbaa !17
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.3, i64 noundef %29, i64 noundef %31, i64 noundef %33) #4
  br label %34

34:                                               ; preds = %28, %26
  %.not89 = icmp eq i64 %10, 0
  br i1 %.not89, label %44, label %35

35:                                               ; preds = %34
  %36 = load i32, ptr %19, align 8, !tbaa !5
  %37 = and i32 %36, 2048
  %38 = icmp ne i32 %37, 0
  %39 = getelementptr inbounds i8, ptr %6, i64 12
  %40 = load i64, ptr %39, align 4
  %41 = add i64 %40, 1
  %42 = icmp ult i64 %41, 2
  %or.cond106 = select i1 %38, i1 true, i1 %42
  %.not91 = icmp eq i64 %40, %10
  %or.cond107 = select i1 %or.cond106, i1 true, i1 %.not91
  br i1 %or.cond107, label %44, label %43

43:                                               ; preds = %35
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.4, ptr noundef %1) #4
  br label %173

44:                                               ; preds = %35, %34
  %45 = getelementptr inbounds i8, ptr %4, i64 52
  %46 = load i32, ptr %45, align 4, !tbaa !18
  %.not92 = icmp eq i32 %46, 0
  br i1 %.not92, label %47, label %50

47:                                               ; preds = %44
  %48 = load i32, ptr %19, align 8, !tbaa !5
  %49 = and i32 %48, 1024
  %.not93 = icmp eq i32 %49, 0
  br i1 %.not93, label %51, label %50

50:                                               ; preds = %47, %44
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.5) #4
  br label %173

51:                                               ; preds = %47
  %52 = call i32 @DoReadFile(ptr noundef %0, ptr noundef nonnull %7, i32 noundef 52, ptr noundef nonnull %9) #4
  %53 = icmp eq i32 %52, 0
  %54 = load i32, ptr %9, align 4
  %55 = icmp ne i32 %54, 52
  %or.cond8 = select i1 %53, i1 true, i1 %55
  br i1 %or.cond8, label %58, label %56

56:                                               ; preds = %51
  %57 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.6, i64 noundef 4) #5
  %.not94 = icmp eq i32 %57, 0
  br i1 %.not94, label %59, label %58

58:                                               ; preds = %56, %51
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str, ptr noundef %1) #4
  br label %173

59:                                               ; preds = %56
  %60 = load i32, ptr %19, align 8, !tbaa !5
  %61 = and i32 %60, 512
  %.not95 = icmp eq i32 %61, 0
  br i1 %.not95, label %62, label %66

62:                                               ; preds = %59
  %63 = call i32 @WavpackStreamAddWrapper(ptr noundef %3, ptr noundef nonnull %7, i32 noundef 52) #4
  %.not96 = icmp eq i32 %63, 0
  br i1 %.not96, label %64, label %66

64:                                               ; preds = %62
  %65 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %3) #4
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.1, ptr noundef %65) #4
  br label %173

66:                                               ; preds = %59, %62
  call void @WavpackStreamLittleEndianToNative(ptr noundef nonnull %7, ptr noundef nonnull @.str.7) #4
  %67 = getelementptr inbounds i8, ptr %7, i64 4
  %68 = load i64, ptr %67, align 4, !tbaa !19
  %69 = icmp ne i64 %68, 52
  %70 = getelementptr inbounds i8, ptr %7, i64 12
  %71 = load <4 x i32>, ptr %70, align 4
  %72 = getelementptr inbounds i8, ptr %7, i64 44
  %73 = load <2 x i32>, ptr %72, align 4
  %74 = shufflevector <2 x i32> %73, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %75 = shufflevector <4 x i32> %71, <4 x i32> %74, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
  %.fr = freeze <4 x i32> %75
  %76 = icmp ne <4 x i32> %.fr, <i32 1, i32 0, i32 4096, i32 0>
  %77 = bitcast <4 x i1> %76 to i4
  %78 = icmp ne i4 %77, 0
  %op.rdx = or i1 %69, %78
  br i1 %op.rdx, label %92, label %79

79:                                               ; preds = %66
  %80 = getelementptr inbounds i8, ptr %7, i64 32
  %81 = load i32, ptr %80, align 4
  %82 = icmp ne i32 %81, 1
  %83 = icmp ne i32 %81, 8
  %or.cond23 = and i1 %82, %83
  %84 = getelementptr inbounds i8, ptr %7, i64 24
  %85 = load i32, ptr %84, align 4
  %86 = add i32 %85, -7
  %87 = icmp ult i32 %86, -6
  %or.cond29 = select i1 %or.cond23, i1 true, i1 %87
  %88 = getelementptr inbounds i8, ptr %7, i64 20
  %89 = load i32, ptr %88, align 4
  %90 = add i32 %89, -8
  %91 = icmp ult i32 %90, -7
  %or.cond36 = select i1 %or.cond29, i1 true, i1 %91
  br i1 %or.cond36, label %92, label %93

92:                                               ; preds = %79, %66
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str, ptr noundef %1) #4
  br label %173

93:                                               ; preds = %79
  %94 = load i32, ptr @debug_logging_mode, align 4, !tbaa !12
  %.not97 = icmp eq i32 %94, 0
  br i1 %.not97, label %104, label %95

95:                                               ; preds = %93
  %96 = getelementptr inbounds i8, ptr %7, i64 28
  %97 = load i32, ptr %96, align 4, !tbaa !21
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.8, i32 noundef %97) #4
  %98 = load i32, ptr %88, align 4, !tbaa !22
  %99 = load i32, ptr %84, align 4, !tbaa !23
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.9, i32 noundef %98, i32 noundef %99) #4
  %100 = load i32, ptr %72, align 4, !tbaa !24
  %101 = load i32, ptr %80, align 4, !tbaa !25
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.10, i32 noundef %100, i32 noundef %101) #4
  %102 = getelementptr inbounds i8, ptr %7, i64 36
  %103 = load i64, ptr %102, align 4, !tbaa !26
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.11, i64 noundef %103) #4
  br label %104

104:                                              ; preds = %95, %93
  %105 = call i32 @DoReadFile(ptr noundef %0, ptr noundef nonnull %8, i32 noundef 12, ptr noundef nonnull %9) #4
  %106 = icmp eq i32 %105, 0
  %107 = load i32, ptr %9, align 4
  %108 = icmp ne i32 %107, 12
  %or.cond39 = select i1 %106, i1 true, i1 %108
  br i1 %or.cond39, label %111, label %109

109:                                              ; preds = %104
  %110 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str.12, i64 noundef 4) #5
  %.not98 = icmp eq i32 %110, 0
  br i1 %.not98, label %112, label %111

111:                                              ; preds = %109, %104
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str, ptr noundef %1) #4
  br label %173

112:                                              ; preds = %109
  %113 = load i32, ptr %19, align 8, !tbaa !5
  %114 = and i32 %113, 512
  %.not99 = icmp eq i32 %114, 0
  br i1 %.not99, label %115, label %119

115:                                              ; preds = %112
  %116 = call i32 @WavpackStreamAddWrapper(ptr noundef %3, ptr noundef nonnull %8, i32 noundef 12) #4
  %.not100 = icmp eq i32 %116, 0
  br i1 %.not100, label %117, label %119

117:                                              ; preds = %115
  %118 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %3) #4
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.1, ptr noundef %118) #4
  br label %173

119:                                              ; preds = %112, %115
  call void @WavpackStreamLittleEndianToNative(ptr noundef nonnull %8, ptr noundef nonnull @.str.13) #4
  %120 = getelementptr inbounds i8, ptr %7, i64 36
  %121 = load i64, ptr %120, align 4, !tbaa !26
  %122 = load i32, ptr @debug_logging_mode, align 4, !tbaa !12
  %.not102 = icmp eq i32 %122, 0
  br i1 %.not102, label %142, label %123

123:                                              ; preds = %119
  %124 = load i32, ptr %72, align 4, !tbaa !24
  %125 = shl i32 %124, 3
  %126 = zext i32 %125 to i64
  %127 = sdiv i64 %121, %126
  %128 = zext i32 %124 to i64
  %129 = shl nuw nsw i64 %128, 3
  %130 = mul i64 %129, %127
  %.not101 = icmp ne i64 %121, %130
  %131 = zext i1 %.not101 to i64
  %spec.select = add nsw i64 %127, %131
  %132 = sub nsw i64 %121, %130
  %133 = srem i64 %132, 8
  %134 = trunc nsw i64 %133 to i32
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.14, i64 noundef %132, i32 noundef %134) #4
  %135 = getelementptr inbounds i8, ptr %8, i64 4
  %136 = load i64, ptr %135, align 4, !tbaa !27
  %137 = add nsw i64 %136, -12
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.15, i64 noundef %137) #4
  %138 = shl nsw i64 %spec.select, 12
  %139 = load i32, ptr %84, align 4, !tbaa !23
  %140 = zext i32 %139 to i64
  %141 = mul nsw i64 %138, %140
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.16, i64 noundef %141) #4
  br label %142

142:                                              ; preds = %123, %119
  %143 = and i64 %121, 7
  %.not103 = icmp eq i64 %143, 0
  br i1 %.not103, label %145, label %144

144:                                              ; preds = %142
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.17) #4
  br label %145

145:                                              ; preds = %144, %142
  %146 = getelementptr inbounds i8, ptr %7, i64 28
  %147 = load i32, ptr %146, align 4, !tbaa !21
  %148 = and i32 %147, 7
  %.not104 = icmp eq i32 %148, 0
  br i1 %.not104, label %150, label %149

149:                                              ; preds = %145
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.18) #4
  %.pre = load i32, ptr %146, align 4, !tbaa !21
  br label %150

150:                                              ; preds = %149, %145
  %151 = phi i32 [ %.pre, %149 ], [ %147, %145 ]
  %152 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 8, ptr %152, align 8, !tbaa !29
  %153 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 1, ptr %153, align 4, !tbaa !30
  %154 = load i32, ptr %84, align 4, !tbaa !23
  %155 = getelementptr inbounds i8, ptr %4, i64 28
  store i32 %154, ptr %155, align 4, !tbaa !31
  %156 = load i32, ptr %88, align 4, !tbaa !22
  %157 = add i32 %156, -1
  %158 = zext i32 %157 to i64
  %159 = getelementptr inbounds [7 x i16], ptr @channel_masks, i64 0, i64 %158
  %160 = load i16, ptr %159, align 2, !tbaa !32
  %161 = zext i16 %160 to i32
  store i32 %161, ptr %45, align 4, !tbaa !18
  %162 = lshr i32 %151, 3
  %163 = getelementptr inbounds i8, ptr %4, i64 48
  store i32 %162, ptr %163, align 8, !tbaa !34
  %164 = load i32, ptr %80, align 4, !tbaa !25
  %165 = icmp eq i32 %164, 1
  %166 = load i32, ptr %19, align 8, !tbaa !5
  %. = select i1 %165, i32 80, i32 96
  %167 = or i32 %166, %.
  store i32 %167, ptr %19, align 8, !tbaa !5
  %168 = add nsw i64 %121, 7
  %169 = sdiv i64 %168, 8
  %170 = call i32 @WavpackStreamSetConfiguration64(ptr noundef %3, ptr noundef nonnull %4, i64 noundef %169, ptr noundef null) #4
  %.not105 = icmp eq i32 %170, 0
  br i1 %.not105, label %171, label %173

171:                                              ; preds = %150
  %172 = call ptr @WavpackStreamGetErrorMessage(ptr noundef %3) #4
  call void (ptr, ...) @error_line(ptr noundef nonnull @.str.19, ptr noundef %1, ptr noundef %172) #4
  br label %173

173:                                              ; preds = %150, %171, %117, %111, %92, %64, %58, %50, %43, %24, %17
  %.0 = phi i32 [ 1, %17 ], [ 1, %43 ], [ 1, %50 ], [ 1, %58 ], [ 1, %92 ], [ 1, %111 ], [ 1, %171 ], [ 1, %117 ], [ 1, %64 ], [ 1, %24 ], [ 0, %150 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %6) #4
  ret i32 %.0
}

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

declare i64 @DoGetFileSize(ptr noundef) local_unnamed_addr #2

declare i32 @DoReadFile(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @error_line(ptr noundef, ...) local_unnamed_addr #2

declare i32 @WavpackStreamAddWrapper(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @WavpackStreamGetErrorMessage(ptr noundef) local_unnamed_addr #2

declare void @WavpackStreamLittleEndianToNative(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @WavpackStreamSetConfiguration64(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; 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 = { "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: 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 #4 = { nounwind }
attributes #5 = { 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, !10, i64 16}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !8, i64 56, !8, i64 72, !10, i64 76, !11, i64 80}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !15, i64 4}
!14 = !{!"", !8, i64 0, !15, i64 4, !15, i64 12, !15, i64 20}
!15 = !{!"long", !8, i64 0}
!16 = !{!14, !15, i64 12}
!17 = !{!14, !15, i64 20}
!18 = !{!6, !10, i64 52}
!19 = !{!20, !15, i64 4}
!20 = !{!"", !8, i64 0, !15, i64 4, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 36, !10, i64 44, !10, i64 48}
!21 = !{!20, !10, i64 28}
!22 = !{!20, !10, i64 20}
!23 = !{!20, !10, i64 24}
!24 = !{!20, !10, i64 44}
!25 = !{!20, !10, i64 32}
!26 = !{!20, !15, i64 36}
!27 = !{!28, !15, i64 4}
!28 = !{!"", !8, i64 0, !15, i64 4}
!29 = !{!6, !10, i64 8}
!30 = !{!6, !10, i64 12}
!31 = !{!6, !10, i64 28}
!32 = !{!33, !33, i64 0}
!33 = !{!"short", !8, i64 0}
!34 = !{!6, !10, i64 48}


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