; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode/modules/juce_audio_formats/codecs/flac/libFLAC/str_827d2708_FLAC (block)

; 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.FLAC__StreamMetadata = type { i32, i32, i32, %union.anon }
%union.anon = type { %struct.FLAC__StreamMetadata_CueSheet }
%struct.FLAC__StreamMetadata_CueSheet = type { [129 x i8], i64, i32, i32, ptr }
%struct.FLAC__StreamMetadata_VorbisComment = type { %struct.FLAC__StreamMetadata_VorbisComment_Entry, i32, ptr }
%struct.FLAC__StreamMetadata_VorbisComment_Entry = type { i32, ptr }
%struct.FLAC__StreamMetadata_StreamInfo = type { i32, i32, i32, i32, i32, i32, i32, i64, [16 x i8] }
%struct.FLAC__StreamMetadata_Application = type { [4 x i8], ptr }
%struct.FLAC__StreamMetadata_SeekTable = type { i32, ptr }
%struct.FLAC__StreamMetadata_SeekPoint = type { i64, i64, i32 }
%struct.FLAC__StreamMetadata_CueSheet_Track = type { i64, i8, [13 x i8], i8, i8, ptr }
%struct.FLAC__StreamMetadata_CueSheet_Index = type { i64, i8 }
%struct.FLAC__StreamMetadata_Picture = type { i32, ptr, ptr, i32, i32, i32, i32, i32, ptr }
%struct.FLAC__StreamMetadata_Unknown = type { ptr }

@FLAC__VENDOR_STRING = external global ptr, align 8
@FLAC__STREAM_METADATA_IS_LAST_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_TYPE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_LENGTH_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_APPLICATION_ID_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_TYPE_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_COLORS_LEN = external constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN = external constant i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @FLAC__add_metadata_block(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %13 = load ptr, ptr @FLAC__VENDOR_STRING, align 8, !tbaa !5
  %14 = call i64 @strlen(ptr noundef %13) #5
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr %8, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = load i32, ptr @FLAC__STREAM_METADATA_IS_LAST_LEN, align 4, !tbaa !9
  %21 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %16, i32 noundef %19, i32 noundef %20)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

24:                                               ; preds = %2
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = load i32, ptr @FLAC__STREAM_METADATA_TYPE_LEN, align 4, !tbaa !9
  %30 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %25, i32 noundef %28, i32 noundef %29)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %24
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

33:                                               ; preds = %24
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !14
  store i32 %36, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !13
  %40 = icmp eq i32 %39, 4
  br i1 %40, label %41, label %52

41:                                               ; preds = %33
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %42, i32 0, i32 3
  %44 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !15
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = sub i32 %47, %46
  store i32 %48, ptr %6, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = add i32 %50, %49
  store i32 %51, ptr %6, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %41, %33
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = load i32, ptr @FLAC__STREAM_METADATA_LENGTH_LEN, align 4, !tbaa !9
  %56 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %53, i32 noundef %54, i32 noundef %55)
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %59, label %58

58:                                               ; preds = %52
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

59:                                               ; preds = %52
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 8, !tbaa !13
  switch i32 %62, label %634 [
    i32 0, label %63
    i32 1, label %155
    i32 2, label %165
    i32 3, label %192
    i32 4, label %250
    i32 5, label %322
    i32 6, label %509
  ]

63:                                               ; preds = %59
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %65, i32 0, i32 3
  %67 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !15
  %69 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN, align 4, !tbaa !9
  %70 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %64, i32 noundef %68, i32 noundef %69)
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %73, label %72

72:                                               ; preds = %63
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

73:                                               ; preds = %63
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %75, i32 0, i32 3
  %77 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN, align 4, !tbaa !9
  %80 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %74, i32 noundef %78, i32 noundef %79)
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %83, label %82

82:                                               ; preds = %73
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

83:                                               ; preds = %73
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %85, i32 0, i32 3
  %87 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %86, i32 0, i32 2
  %88 = load i32, ptr %87, align 8, !tbaa !15
  %89 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN, align 4, !tbaa !9
  %90 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %84, i32 noundef %88, i32 noundef %89)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %93, label %92

92:                                               ; preds = %83
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

93:                                               ; preds = %83
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %95, i32 0, i32 3
  %97 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %96, i32 0, i32 3
  %98 = load i32, ptr %97, align 4, !tbaa !15
  %99 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN, align 4, !tbaa !9
  %100 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %94, i32 noundef %98, i32 noundef %99)
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %103, label %102

102:                                              ; preds = %93
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

103:                                              ; preds = %93
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %105, i32 0, i32 3
  %107 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %106, i32 0, i32 4
  %108 = load i32, ptr %107, align 8, !tbaa !15
  %109 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN, align 4, !tbaa !9
  %110 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %104, i32 noundef %108, i32 noundef %109)
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %113, label %112

112:                                              ; preds = %103
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

113:                                              ; preds = %103
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %115, i32 0, i32 3
  %117 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %116, i32 0, i32 5
  %118 = load i32, ptr %117, align 4, !tbaa !15
  %119 = sub i32 %118, 1
  %120 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN, align 4, !tbaa !9
  %121 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %114, i32 noundef %119, i32 noundef %120)
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %124, label %123

123:                                              ; preds = %113
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

124:                                              ; preds = %113
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %126, i32 0, i32 3
  %128 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %127, i32 0, i32 6
  %129 = load i32, ptr %128, align 8, !tbaa !15
  %130 = sub i32 %129, 1
  %131 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN, align 4, !tbaa !9
  %132 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %125, i32 noundef %130, i32 noundef %131)
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %135, label %134

134:                                              ; preds = %124
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

135:                                              ; preds = %124
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %137, i32 0, i32 3
  %139 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %138, i32 0, i32 7
  %140 = load i64, ptr %139, align 8, !tbaa !15
  %141 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN, align 4, !tbaa !9
  %142 = call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %136, i64 noundef %140, i32 noundef %141)
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %145, label %144

144:                                              ; preds = %135
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

145:                                              ; preds = %135
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %147, i32 0, i32 3
  %149 = getelementptr inbounds %struct.FLAC__StreamMetadata_StreamInfo, ptr %148, i32 0, i32 8
  %150 = getelementptr inbounds [16 x i8], ptr %149, i64 0, i64 0
  %151 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %146, ptr noundef %150, i32 noundef 16)
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %154, label %153

153:                                              ; preds = %145
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

154:                                              ; preds = %145
  br label %647

155:                                              ; preds = %59
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %157, i32 0, i32 2
  %159 = load i32, ptr %158, align 8, !tbaa !14
  %160 = mul i32 %159, 8
  %161 = call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %156, i32 noundef %160)
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %164, label %163

163:                                              ; preds = %155
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

164:                                              ; preds = %155
  br label %647

165:                                              ; preds = %59
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %167, i32 0, i32 3
  %169 = getelementptr inbounds %struct.FLAC__StreamMetadata_Application, ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds [4 x i8], ptr %169, i64 0, i64 0
  %171 = load i32, ptr @FLAC__STREAM_METADATA_APPLICATION_ID_LEN, align 4, !tbaa !9
  %172 = udiv i32 %171, 8
  %173 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %166, ptr noundef %170, i32 noundef %172)
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %176, label %175

175:                                              ; preds = %165
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

176:                                              ; preds = %165
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %178, i32 0, i32 3
  %180 = getelementptr inbounds %struct.FLAC__StreamMetadata_Application, ptr %179, i32 0, i32 1
  %181 = load ptr, ptr %180, align 8, !tbaa !15
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %182, i32 0, i32 2
  %184 = load i32, ptr %183, align 8, !tbaa !14
  %185 = load i32, ptr @FLAC__STREAM_METADATA_APPLICATION_ID_LEN, align 4, !tbaa !9
  %186 = udiv i32 %185, 8
  %187 = sub i32 %184, %186
  %188 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %177, ptr noundef %181, i32 noundef %187)
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %191, label %190

190:                                              ; preds = %176
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

191:                                              ; preds = %176
  br label %647

192:                                              ; preds = %59
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %246, %192
  %194 = load i32, ptr %6, align 4, !tbaa !9
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %195, i32 0, i32 3
  %197 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekTable, ptr %196, i32 0, i32 0
  %198 = load i32, ptr %197, align 8, !tbaa !15
  %199 = icmp ult i32 %194, %198
  br i1 %199, label %200, label %249

200:                                              ; preds = %193
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %202, i32 0, i32 3
  %204 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekTable, ptr %203, i32 0, i32 1
  %205 = load ptr, ptr %204, align 8, !tbaa !15
  %206 = load i32, ptr %6, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %205, i64 %207
  %209 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %208, i32 0, i32 0
  %210 = load i64, ptr %209, align 8, !tbaa !16
  %211 = load i32, ptr @FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, align 4, !tbaa !9
  %212 = call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %201, i64 noundef %210, i32 noundef %211)
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %215, label %214

214:                                              ; preds = %200
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

215:                                              ; preds = %200
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %217, i32 0, i32 3
  %219 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekTable, ptr %218, i32 0, i32 1
  %220 = load ptr, ptr %219, align 8, !tbaa !15
  %221 = load i32, ptr %6, align 4, !tbaa !9
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %220, i64 %222
  %224 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %223, i32 0, i32 1
  %225 = load i64, ptr %224, align 8, !tbaa !19
  %226 = load i32, ptr @FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, align 4, !tbaa !9
  %227 = call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %216, i64 noundef %225, i32 noundef %226)
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %230, label %229

229:                                              ; preds = %215
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

230:                                              ; preds = %215
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %232, i32 0, i32 3
  %234 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekTable, ptr %233, i32 0, i32 1
  %235 = load ptr, ptr %234, align 8, !tbaa !15
  %236 = load i32, ptr %6, align 4, !tbaa !9
  %237 = zext i32 %236 to i64
  %238 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %235, i64 %237
  %239 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %238, i32 0, i32 2
  %240 = load i32, ptr %239, align 8, !tbaa !20
  %241 = load i32, ptr @FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN, align 4, !tbaa !9
  %242 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %231, i32 noundef %240, i32 noundef %241)
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %245, label %244

244:                                              ; preds = %230
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

245:                                              ; preds = %230
  br label %246

246:                                              ; preds = %245
  %247 = load i32, ptr %6, align 4, !tbaa !9
  %248 = add i32 %247, 1
  store i32 %248, ptr %6, align 4, !tbaa !9
  br label %193, !llvm.loop !21

249:                                              ; preds = %193
  br label %647

250:                                              ; preds = %59
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = load i32, ptr %8, align 4, !tbaa !9
  %253 = call i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef %251, i32 noundef %252)
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %256, label %255

255:                                              ; preds = %250
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

256:                                              ; preds = %250
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = load ptr, ptr @FLAC__VENDOR_STRING, align 8, !tbaa !5
  %259 = load i32, ptr %8, align 4, !tbaa !9
  %260 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %257, ptr noundef %258, i32 noundef %259)
  %261 = icmp ne i32 %260, 0
  br i1 %261, label %263, label %262

262:                                              ; preds = %256
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

263:                                              ; preds = %256
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %265, i32 0, i32 3
  %267 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment, ptr %266, i32 0, i32 1
  %268 = load i32, ptr %267, align 8, !tbaa !15
  %269 = call i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef %264, i32 noundef %268)
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %272, label %271

271:                                              ; preds = %263
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

272:                                              ; preds = %263
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %318, %272
  %274 = load i32, ptr %6, align 4, !tbaa !9
  %275 = load ptr, ptr %4, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %275, i32 0, i32 3
  %277 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment, ptr %276, i32 0, i32 1
  %278 = load i32, ptr %277, align 8, !tbaa !15
  %279 = icmp ult i32 %274, %278
  br i1 %279, label %280, label %321

280:                                              ; preds = %273
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %282, i32 0, i32 3
  %284 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment, ptr %283, i32 0, i32 2
  %285 = load ptr, ptr %284, align 8, !tbaa !15
  %286 = load i32, ptr %6, align 4, !tbaa !9
  %287 = zext i32 %286 to i64
  %288 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %285, i64 %287
  %289 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %288, i32 0, i32 0
  %290 = load i32, ptr %289, align 8, !tbaa !23
  %291 = call i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef %281, i32 noundef %290)
  %292 = icmp ne i32 %291, 0
  br i1 %292, label %294, label %293

293:                                              ; preds = %280
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

294:                                              ; preds = %280
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = load ptr, ptr %4, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %296, i32 0, i32 3
  %298 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment, ptr %297, i32 0, i32 2
  %299 = load ptr, ptr %298, align 8, !tbaa !15
  %300 = load i32, ptr %6, align 4, !tbaa !9
  %301 = zext i32 %300 to i64
  %302 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %299, i64 %301
  %303 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %302, i32 0, i32 1
  %304 = load ptr, ptr %303, align 8, !tbaa !25
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %305, i32 0, i32 3
  %307 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment, ptr %306, i32 0, i32 2
  %308 = load ptr, ptr %307, align 8, !tbaa !15
  %309 = load i32, ptr %6, align 4, !tbaa !9
  %310 = zext i32 %309 to i64
  %311 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %308, i64 %310
  %312 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %311, i32 0, i32 0
  %313 = load i32, ptr %312, align 8, !tbaa !23
  %314 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %295, ptr noundef %304, i32 noundef %313)
  %315 = icmp ne i32 %314, 0
  br i1 %315, label %317, label %316

316:                                              ; preds = %294
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

317:                                              ; preds = %294
  br label %318

318:                                              ; preds = %317
  %319 = load i32, ptr %6, align 4, !tbaa !9
  %320 = add i32 %319, 1
  store i32 %320, ptr %6, align 4, !tbaa !9
  br label %273, !llvm.loop !26

321:                                              ; preds = %273
  br label %647

322:                                              ; preds = %59
  %323 = load ptr, ptr %5, align 8, !tbaa !5
  %324 = load ptr, ptr %4, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %324, i32 0, i32 3
  %326 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet, ptr %325, i32 0, i32 0
  %327 = getelementptr inbounds [129 x i8], ptr %326, i64 0, i64 0
  %328 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN, align 4, !tbaa !9
  %329 = udiv i32 %328, 8
  %330 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %323, ptr noundef %327, i32 noundef %329)
  %331 = icmp ne i32 %330, 0
  br i1 %331, label %333, label %332

332:                                              ; preds = %322
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

333:                                              ; preds = %322
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %335, i32 0, i32 3
  %337 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet, ptr %336, i32 0, i32 1
  %338 = load i64, ptr %337, align 8, !tbaa !15
  %339 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN, align 4, !tbaa !9
  %340 = call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %334, i64 noundef %338, i32 noundef %339)
  %341 = icmp ne i32 %340, 0
  br i1 %341, label %343, label %342

342:                                              ; preds = %333
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

343:                                              ; preds = %333
  %344 = load ptr, ptr %5, align 8, !tbaa !5
  %345 = load ptr, ptr %4, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %345, i32 0, i32 3
  %347 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet, ptr %346, i32 0, i32 2
  %348 = load i32, ptr %347, align 8, !tbaa !15
  %349 = icmp ne i32 %348, 0
  %350 = zext i1 %349 to i64
  %351 = select i1 %349, i32 1, i32 0
  %352 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN, align 4, !tbaa !9
  %353 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %344, i32 noundef %351, i32 noundef %352)
  %354 = icmp ne i32 %353, 0
  br i1 %354, label %356, label %355

355:                                              ; preds = %343
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

356:                                              ; preds = %343
  %357 = load ptr, ptr %5, align 8, !tbaa !5
  %358 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN, align 4, !tbaa !9
  %359 = call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %357, i32 noundef %358)
  %360 = icmp ne i32 %359, 0
  br i1 %360, label %362, label %361

361:                                              ; preds = %356
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

362:                                              ; preds = %356
  %363 = load ptr, ptr %5, align 8, !tbaa !5
  %364 = load ptr, ptr %4, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %364, i32 0, i32 3
  %366 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet, ptr %365, i32 0, i32 3
  %367 = load i32, ptr %366, align 4, !tbaa !15
  %368 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN, align 4, !tbaa !9
  %369 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %363, i32 noundef %367, i32 noundef %368)
  %370 = icmp ne i32 %369, 0
  br i1 %370, label %372, label %371

371:                                              ; preds = %362
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

372:                                              ; preds = %362
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %373

373:                                              ; preds = %505, %372
  %374 = load i32, ptr %6, align 4, !tbaa !9
  %375 = load ptr, ptr %4, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %375, i32 0, i32 3
  %377 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet, ptr %376, i32 0, i32 3
  %378 = load i32, ptr %377, align 4, !tbaa !15
  %379 = icmp ult i32 %374, %378
  br i1 %379, label %380, label %508

380:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %381 = load ptr, ptr %4, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %381, i32 0, i32 3
  %383 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet, ptr %382, i32 0, i32 4
  %384 = load ptr, ptr %383, align 8, !tbaa !15
  %385 = load i32, ptr %6, align 4, !tbaa !9
  %386 = zext i32 %385 to i64
  %387 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %384, i64 %386
  store ptr %387, ptr %10, align 8, !tbaa !5
  %388 = load ptr, ptr %5, align 8, !tbaa !5
  %389 = load ptr, ptr %10, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %389, i32 0, i32 0
  %391 = load i64, ptr %390, align 8, !tbaa !27
  %392 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN, align 4, !tbaa !9
  %393 = call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %388, i64 noundef %391, i32 noundef %392)
  %394 = icmp ne i32 %393, 0
  br i1 %394, label %396, label %395

395:                                              ; preds = %380
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

396:                                              ; preds = %380
  %397 = load ptr, ptr %5, align 8, !tbaa !5
  %398 = load ptr, ptr %10, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %398, i32 0, i32 1
  %400 = load i8, ptr %399, align 8, !tbaa !29
  %401 = zext i8 %400 to i32
  %402 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN, align 4, !tbaa !9
  %403 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %397, i32 noundef %401, i32 noundef %402)
  %404 = icmp ne i32 %403, 0
  br i1 %404, label %406, label %405

405:                                              ; preds = %396
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

406:                                              ; preds = %396
  %407 = load ptr, ptr %5, align 8, !tbaa !5
  %408 = load ptr, ptr %10, align 8, !tbaa !5
  %409 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %408, i32 0, i32 2
  %410 = getelementptr inbounds [13 x i8], ptr %409, i64 0, i64 0
  %411 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN, align 4, !tbaa !9
  %412 = udiv i32 %411, 8
  %413 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %407, ptr noundef %410, i32 noundef %412)
  %414 = icmp ne i32 %413, 0
  br i1 %414, label %416, label %415

415:                                              ; preds = %406
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

416:                                              ; preds = %406
  %417 = load ptr, ptr %5, align 8, !tbaa !5
  %418 = load ptr, ptr %10, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %418, i32 0, i32 3
  %420 = load i8, ptr %419, align 2
  %421 = and i8 %420, 1
  %422 = zext i8 %421 to i32
  %423 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN, align 4, !tbaa !9
  %424 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %417, i32 noundef %422, i32 noundef %423)
  %425 = icmp ne i32 %424, 0
  br i1 %425, label %427, label %426

426:                                              ; preds = %416
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

427:                                              ; preds = %416
  %428 = load ptr, ptr %5, align 8, !tbaa !5
  %429 = load ptr, ptr %10, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %429, i32 0, i32 3
  %431 = load i8, ptr %430, align 2
  %432 = lshr i8 %431, 1
  %433 = and i8 %432, 1
  %434 = zext i8 %433 to i32
  %435 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN, align 4, !tbaa !9
  %436 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %428, i32 noundef %434, i32 noundef %435)
  %437 = icmp ne i32 %436, 0
  br i1 %437, label %439, label %438

438:                                              ; preds = %427
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

439:                                              ; preds = %427
  %440 = load ptr, ptr %5, align 8, !tbaa !5
  %441 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN, align 4, !tbaa !9
  %442 = call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %440, i32 noundef %441)
  %443 = icmp ne i32 %442, 0
  br i1 %443, label %445, label %444

444:                                              ; preds = %439
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

445:                                              ; preds = %439
  %446 = load ptr, ptr %5, align 8, !tbaa !5
  %447 = load ptr, ptr %10, align 8, !tbaa !5
  %448 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %447, i32 0, i32 4
  %449 = load i8, ptr %448, align 1, !tbaa !30
  %450 = zext i8 %449 to i32
  %451 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN, align 4, !tbaa !9
  %452 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %446, i32 noundef %450, i32 noundef %451)
  %453 = icmp ne i32 %452, 0
  br i1 %453, label %455, label %454

454:                                              ; preds = %445
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %502

455:                                              ; preds = %445
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %456

456:                                              ; preds = %498, %455
  %457 = load i32, ptr %7, align 4, !tbaa !9
  %458 = load ptr, ptr %10, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %458, i32 0, i32 4
  %460 = load i8, ptr %459, align 1, !tbaa !30
  %461 = zext i8 %460 to i32
  %462 = icmp ult i32 %457, %461
  br i1 %462, label %463, label %501

463:                                              ; preds = %456
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %464 = load ptr, ptr %10, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %464, i32 0, i32 5
  %466 = load ptr, ptr %465, align 8, !tbaa !31
  %467 = load i32, ptr %7, align 4, !tbaa !9
  %468 = zext i32 %467 to i64
  %469 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Index, ptr %466, i64 %468
  store ptr %469, ptr %11, align 8, !tbaa !5
  %470 = load ptr, ptr %5, align 8, !tbaa !5
  %471 = load ptr, ptr %11, align 8, !tbaa !5
  %472 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Index, ptr %471, i32 0, i32 0
  %473 = load i64, ptr %472, align 8, !tbaa !32
  %474 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN, align 4, !tbaa !9
  %475 = call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %470, i64 noundef %473, i32 noundef %474)
  %476 = icmp ne i32 %475, 0
  br i1 %476, label %478, label %477

477:                                              ; preds = %463
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %495

478:                                              ; preds = %463
  %479 = load ptr, ptr %5, align 8, !tbaa !5
  %480 = load ptr, ptr %11, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Index, ptr %480, i32 0, i32 1
  %482 = load i8, ptr %481, align 8, !tbaa !34
  %483 = zext i8 %482 to i32
  %484 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN, align 4, !tbaa !9
  %485 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %479, i32 noundef %483, i32 noundef %484)
  %486 = icmp ne i32 %485, 0
  br i1 %486, label %488, label %487

487:                                              ; preds = %478
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %495

488:                                              ; preds = %478
  %489 = load ptr, ptr %5, align 8, !tbaa !5
  %490 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN, align 4, !tbaa !9
  %491 = call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %489, i32 noundef %490)
  %492 = icmp ne i32 %491, 0
  br i1 %492, label %494, label %493

493:                                              ; preds = %488
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %495

494:                                              ; preds = %488
  store i32 0, ptr %9, align 4
  br label %495

495:                                              ; preds = %494, %493, %487, %477
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %496 = load i32, ptr %9, align 4
  switch i32 %496, label %502 [
    i32 0, label %497
  ]

497:                                              ; preds = %495
  br label %498

498:                                              ; preds = %497
  %499 = load i32, ptr %7, align 4, !tbaa !9
  %500 = add i32 %499, 1
  store i32 %500, ptr %7, align 4, !tbaa !9
  br label %456, !llvm.loop !35

501:                                              ; preds = %456
  store i32 0, ptr %9, align 4
  br label %502

502:                                              ; preds = %501, %495, %454, %444, %438, %426, %415, %405, %395
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %503 = load i32, ptr %9, align 4
  switch i32 %503, label %648 [
    i32 0, label %504
  ]

504:                                              ; preds = %502
  br label %505

505:                                              ; preds = %504
  %506 = load i32, ptr %6, align 4, !tbaa !9
  %507 = add i32 %506, 1
  store i32 %507, ptr %6, align 4, !tbaa !9
  br label %373, !llvm.loop !36

508:                                              ; preds = %373
  br label %647

509:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %510 = load ptr, ptr %5, align 8, !tbaa !5
  %511 = load ptr, ptr %4, align 8, !tbaa !5
  %512 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %511, i32 0, i32 3
  %513 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %512, i32 0, i32 0
  %514 = load i32, ptr %513, align 8, !tbaa !15
  %515 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_TYPE_LEN, align 4, !tbaa !9
  %516 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %510, i32 noundef %514, i32 noundef %515)
  %517 = icmp ne i32 %516, 0
  br i1 %517, label %519, label %518

518:                                              ; preds = %509
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

519:                                              ; preds = %509
  %520 = load ptr, ptr %4, align 8, !tbaa !5
  %521 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %520, i32 0, i32 3
  %522 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %521, i32 0, i32 1
  %523 = load ptr, ptr %522, align 8, !tbaa !15
  %524 = call i64 @strlen(ptr noundef %523) #5
  store i64 %524, ptr %12, align 8, !tbaa !37
  %525 = load ptr, ptr %5, align 8, !tbaa !5
  %526 = load i64, ptr %12, align 8, !tbaa !37
  %527 = trunc i64 %526 to i32
  %528 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN, align 4, !tbaa !9
  %529 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %525, i32 noundef %527, i32 noundef %528)
  %530 = icmp ne i32 %529, 0
  br i1 %530, label %532, label %531

531:                                              ; preds = %519
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

532:                                              ; preds = %519
  %533 = load ptr, ptr %5, align 8, !tbaa !5
  %534 = load ptr, ptr %4, align 8, !tbaa !5
  %535 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %534, i32 0, i32 3
  %536 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %535, i32 0, i32 1
  %537 = load ptr, ptr %536, align 8, !tbaa !15
  %538 = load i64, ptr %12, align 8, !tbaa !37
  %539 = trunc i64 %538 to i32
  %540 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %533, ptr noundef %537, i32 noundef %539)
  %541 = icmp ne i32 %540, 0
  br i1 %541, label %543, label %542

542:                                              ; preds = %532
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

543:                                              ; preds = %532
  %544 = load ptr, ptr %4, align 8, !tbaa !5
  %545 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %544, i32 0, i32 3
  %546 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %545, i32 0, i32 2
  %547 = load ptr, ptr %546, align 8, !tbaa !15
  %548 = call i64 @strlen(ptr noundef %547) #5
  store i64 %548, ptr %12, align 8, !tbaa !37
  %549 = load ptr, ptr %5, align 8, !tbaa !5
  %550 = load i64, ptr %12, align 8, !tbaa !37
  %551 = trunc i64 %550 to i32
  %552 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN, align 4, !tbaa !9
  %553 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %549, i32 noundef %551, i32 noundef %552)
  %554 = icmp ne i32 %553, 0
  br i1 %554, label %556, label %555

555:                                              ; preds = %543
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

556:                                              ; preds = %543
  %557 = load ptr, ptr %5, align 8, !tbaa !5
  %558 = load ptr, ptr %4, align 8, !tbaa !5
  %559 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %558, i32 0, i32 3
  %560 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %559, i32 0, i32 2
  %561 = load ptr, ptr %560, align 8, !tbaa !15
  %562 = load i64, ptr %12, align 8, !tbaa !37
  %563 = trunc i64 %562 to i32
  %564 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %557, ptr noundef %561, i32 noundef %563)
  %565 = icmp ne i32 %564, 0
  br i1 %565, label %567, label %566

566:                                              ; preds = %556
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

567:                                              ; preds = %556
  %568 = load ptr, ptr %5, align 8, !tbaa !5
  %569 = load ptr, ptr %4, align 8, !tbaa !5
  %570 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %569, i32 0, i32 3
  %571 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %570, i32 0, i32 3
  %572 = load i32, ptr %571, align 8, !tbaa !15
  %573 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN, align 4, !tbaa !9
  %574 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %568, i32 noundef %572, i32 noundef %573)
  %575 = icmp ne i32 %574, 0
  br i1 %575, label %577, label %576

576:                                              ; preds = %567
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

577:                                              ; preds = %567
  %578 = load ptr, ptr %5, align 8, !tbaa !5
  %579 = load ptr, ptr %4, align 8, !tbaa !5
  %580 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %579, i32 0, i32 3
  %581 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %580, i32 0, i32 4
  %582 = load i32, ptr %581, align 4, !tbaa !15
  %583 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN, align 4, !tbaa !9
  %584 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %578, i32 noundef %582, i32 noundef %583)
  %585 = icmp ne i32 %584, 0
  br i1 %585, label %587, label %586

586:                                              ; preds = %577
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

587:                                              ; preds = %577
  %588 = load ptr, ptr %5, align 8, !tbaa !5
  %589 = load ptr, ptr %4, align 8, !tbaa !5
  %590 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %589, i32 0, i32 3
  %591 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %590, i32 0, i32 5
  %592 = load i32, ptr %591, align 8, !tbaa !15
  %593 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN, align 4, !tbaa !9
  %594 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %588, i32 noundef %592, i32 noundef %593)
  %595 = icmp ne i32 %594, 0
  br i1 %595, label %597, label %596

596:                                              ; preds = %587
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

597:                                              ; preds = %587
  %598 = load ptr, ptr %5, align 8, !tbaa !5
  %599 = load ptr, ptr %4, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %599, i32 0, i32 3
  %601 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %600, i32 0, i32 6
  %602 = load i32, ptr %601, align 4, !tbaa !15
  %603 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_COLORS_LEN, align 4, !tbaa !9
  %604 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %598, i32 noundef %602, i32 noundef %603)
  %605 = icmp ne i32 %604, 0
  br i1 %605, label %607, label %606

606:                                              ; preds = %597
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

607:                                              ; preds = %597
  %608 = load ptr, ptr %5, align 8, !tbaa !5
  %609 = load ptr, ptr %4, align 8, !tbaa !5
  %610 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %609, i32 0, i32 3
  %611 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %610, i32 0, i32 7
  %612 = load i32, ptr %611, align 8, !tbaa !15
  %613 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN, align 4, !tbaa !9
  %614 = call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %608, i32 noundef %612, i32 noundef %613)
  %615 = icmp ne i32 %614, 0
  br i1 %615, label %617, label %616

616:                                              ; preds = %607
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

617:                                              ; preds = %607
  %618 = load ptr, ptr %5, align 8, !tbaa !5
  %619 = load ptr, ptr %4, align 8, !tbaa !5
  %620 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %619, i32 0, i32 3
  %621 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %620, i32 0, i32 8
  %622 = load ptr, ptr %621, align 8, !tbaa !15
  %623 = load ptr, ptr %4, align 8, !tbaa !5
  %624 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %623, i32 0, i32 3
  %625 = getelementptr inbounds %struct.FLAC__StreamMetadata_Picture, ptr %624, i32 0, i32 7
  %626 = load i32, ptr %625, align 8, !tbaa !15
  %627 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %618, ptr noundef %622, i32 noundef %626)
  %628 = icmp ne i32 %627, 0
  br i1 %628, label %630, label %629

629:                                              ; preds = %617
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %631

630:                                              ; preds = %617
  store i32 0, ptr %9, align 4
  br label %631

631:                                              ; preds = %630, %629, %616, %606, %596, %586, %576, %566, %555, %542, %531, %518
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %632 = load i32, ptr %9, align 4
  switch i32 %632, label %648 [
    i32 0, label %633
  ]

633:                                              ; preds = %631
  br label %647

634:                                              ; preds = %59
  %635 = load ptr, ptr %5, align 8, !tbaa !5
  %636 = load ptr, ptr %4, align 8, !tbaa !5
  %637 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %636, i32 0, i32 3
  %638 = getelementptr inbounds %struct.FLAC__StreamMetadata_Unknown, ptr %637, i32 0, i32 0
  %639 = load ptr, ptr %638, align 8, !tbaa !15
  %640 = load ptr, ptr %4, align 8, !tbaa !5
  %641 = getelementptr inbounds %struct.FLAC__StreamMetadata, ptr %640, i32 0, i32 2
  %642 = load i32, ptr %641, align 8, !tbaa !14
  %643 = call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %635, ptr noundef %639, i32 noundef %642)
  %644 = icmp ne i32 %643, 0
  br i1 %644, label %646, label %645

645:                                              ; preds = %634
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

646:                                              ; preds = %634
  br label %647

647:                                              ; preds = %646, %633, %508, %321, %249, %191, %164, %154
  store i32 1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %648

648:                                              ; preds = %647, %645, %631, %502, %371, %361, %355, %342, %332, %316, %293, %271, %262, %255, %244, %229, %214, %190, %175, %163, %153, %144, %134, %123, %112, %102, %92, %82, %72, %58, %32, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %649 = load i32, ptr %3, align 4
  ret i32 %649
}

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

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

declare i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef, i32 noundef, i32 noundef) #3

declare i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef, i64 noundef, i32 noundef) #3

declare i32 @FLAC__bitwriter_write_byte_block(ptr noundef, ptr noundef, i32 noundef) #3

declare i32 @FLAC__bitwriter_write_zeroes(ptr noundef, i32 noundef) #3

declare i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef, i32 noundef) #3

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !18, i64 0}
!17 = !{!"", !18, i64 0, !18, i64 8, !10, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!17, !18, i64 8}
!20 = !{!17, !10, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !10, i64 0}
!24 = !{!"", !10, i64 0, !6, i64 8}
!25 = !{!24, !6, i64 8}
!26 = distinct !{!26, !22}
!27 = !{!28, !18, i64 0}
!28 = !{!"", !18, i64 0, !7, i64 8, !7, i64 9, !10, i64 22, !10, i64 22, !7, i64 23, !6, i64 24}
!29 = !{!28, !7, i64 8}
!30 = !{!28, !7, i64 23}
!31 = !{!28, !6, i64 24}
!32 = !{!33, !18, i64 0}
!33 = !{!"", !18, i64 0, !7, i64 8}
!34 = !{!33, !7, i64 8}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}
!37 = !{!18, !18, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.FLAC__StreamMetadata_SeekPoint = type { i64, i64, i32 }
%struct.FLAC__StreamMetadata_VorbisComment_Entry = type { i32, ptr }
%struct.FLAC__StreamMetadata_CueSheet_Track = type { i64, i8, [13 x i8], i8, i8, ptr }
%struct.FLAC__StreamMetadata_CueSheet_Index = type { i64, i8 }

@FLAC__VENDOR_STRING = external local_unnamed_addr global ptr, align 8
@FLAC__STREAM_METADATA_IS_LAST_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_TYPE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_LENGTH_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_APPLICATION_ID_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_TYPE_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_COLORS_LEN = external local_unnamed_addr constant i32, align 4
@FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN = external local_unnamed_addr constant i32, align 4

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @FLAC__add_metadata_block(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = load ptr, ptr @FLAC__VENDOR_STRING, align 8, !tbaa !5
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #3
  %5 = trunc i64 %4 to i32
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !9
  %8 = load i32, ptr @FLAC__STREAM_METADATA_IS_LAST_LEN, align 4, !tbaa !12
  %9 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %7, i32 noundef %8) #4
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %.critedge197, label %10

10:                                               ; preds = %2
  %11 = load i32, ptr %0, align 8, !tbaa !13
  %12 = load i32, ptr @FLAC__STREAM_METADATA_TYPE_LEN, align 4, !tbaa !12
  %13 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %11, i32 noundef %12) #4
  %.not147 = icmp eq i32 %13, 0
  br i1 %.not147, label %.critedge197, label %14

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = load i32, ptr %0, align 8, !tbaa !13
  %18 = icmp eq i32 %17, 4
  br i1 %18, label %19, label %24

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = load i32, ptr %20, align 8, !tbaa !15
  %22 = add i32 %16, %5
  %23 = sub i32 %22, %21
  br label %24

24:                                               ; preds = %19, %14
  %.0139 = phi i32 [ %23, %19 ], [ %16, %14 ]
  %25 = load i32, ptr @FLAC__STREAM_METADATA_LENGTH_LEN, align 4, !tbaa !12
  %26 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %.0139, i32 noundef %25) #4
  %.not148 = icmp eq i32 %26, 0
  br i1 %.not148, label %.critedge197, label %27

27:                                               ; preds = %24
  %28 = load i32, ptr %0, align 8, !tbaa !13
  switch i32 %28, label %286 [
    i32 0, label %35
    i32 1, label %80
    i32 2, label %84
    i32 3, label %.preheader
    i32 4, label %114
    i32 5, label %141
    i32 6, label %231
  ]

.preheader:                                       ; preds = %27
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !15
  %.not219 = icmp eq i32 %30, 0
  br i1 %.not219, label %.loopexit, label %.lr.ph215

.lr.ph215:                                        ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load i32, ptr @FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, align 4, !tbaa !12
  %33 = load i32, ptr @FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, align 4
  %34 = load i32, ptr @FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN, align 4
  br label %99

35:                                               ; preds = %27
  %36 = getelementptr inbounds i8, ptr %0, i64 16
  %37 = load i32, ptr %36, align 8, !tbaa !15
  %38 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN, align 4, !tbaa !12
  %39 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %37, i32 noundef %38) #4
  %.not187 = icmp eq i32 %39, 0
  br i1 %.not187, label %.critedge197, label %40

40:                                               ; preds = %35
  %41 = getelementptr inbounds i8, ptr %0, i64 20
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN, align 4, !tbaa !12
  %44 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %42, i32 noundef %43) #4
  %.not188 = icmp eq i32 %44, 0
  br i1 %.not188, label %.critedge197, label %45

45:                                               ; preds = %40
  %46 = getelementptr inbounds i8, ptr %0, i64 24
  %47 = load i32, ptr %46, align 8, !tbaa !15
  %48 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN, align 4, !tbaa !12
  %49 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %47, i32 noundef %48) #4
  %.not189 = icmp eq i32 %49, 0
  br i1 %.not189, label %.critedge197, label %50

50:                                               ; preds = %45
  %51 = getelementptr inbounds i8, ptr %0, i64 28
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN, align 4, !tbaa !12
  %54 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %52, i32 noundef %53) #4
  %.not190 = icmp eq i32 %54, 0
  br i1 %.not190, label %.critedge197, label %55

55:                                               ; preds = %50
  %56 = getelementptr inbounds i8, ptr %0, i64 32
  %57 = load i32, ptr %56, align 8, !tbaa !15
  %58 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN, align 4, !tbaa !12
  %59 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %57, i32 noundef %58) #4
  %.not191 = icmp eq i32 %59, 0
  br i1 %.not191, label %.critedge197, label %60

60:                                               ; preds = %55
  %61 = getelementptr inbounds i8, ptr %0, i64 36
  %62 = load i32, ptr %61, align 4, !tbaa !15
  %63 = add i32 %62, -1
  %64 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN, align 4, !tbaa !12
  %65 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %63, i32 noundef %64) #4
  %.not192 = icmp eq i32 %65, 0
  br i1 %.not192, label %.critedge197, label %66

66:                                               ; preds = %60
  %67 = getelementptr inbounds i8, ptr %0, i64 40
  %68 = load i32, ptr %67, align 8, !tbaa !15
  %69 = add i32 %68, -1
  %70 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN, align 4, !tbaa !12
  %71 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %69, i32 noundef %70) #4
  %.not193 = icmp eq i32 %71, 0
  br i1 %.not193, label %.critedge197, label %72

72:                                               ; preds = %66
  %73 = getelementptr inbounds i8, ptr %0, i64 48
  %74 = load i64, ptr %73, align 8, !tbaa !15
  %75 = load i32, ptr @FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN, align 4, !tbaa !12
  %76 = tail call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %1, i64 noundef %74, i32 noundef %75) #4
  %.not194 = icmp eq i32 %76, 0
  br i1 %.not194, label %.critedge197, label %77

77:                                               ; preds = %72
  %78 = getelementptr inbounds i8, ptr %0, i64 56
  %79 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef nonnull %78, i32 noundef 16) #4
  %.not195 = icmp eq i32 %79, 0
  br i1 %.not195, label %.critedge197, label %.loopexit

80:                                               ; preds = %27
  %81 = load i32, ptr %15, align 8, !tbaa !14
  %82 = shl i32 %81, 3
  %83 = tail call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %1, i32 noundef %82) #4
  %.not186 = icmp eq i32 %83, 0
  br i1 %.not186, label %.critedge197, label %.loopexit

84:                                               ; preds = %27
  %85 = getelementptr inbounds i8, ptr %0, i64 16
  %86 = load i32, ptr @FLAC__STREAM_METADATA_APPLICATION_ID_LEN, align 4, !tbaa !12
  %87 = lshr i32 %86, 3
  %88 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef nonnull %85, i32 noundef %87) #4
  %.not184 = icmp eq i32 %88, 0
  br i1 %.not184, label %.critedge197, label %89

89:                                               ; preds = %84
  %90 = getelementptr inbounds i8, ptr %0, i64 24
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  %92 = load i32, ptr %15, align 8, !tbaa !14
  %93 = sub i32 %92, %87
  %94 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %91, i32 noundef %93) #4
  %.not185 = icmp eq i32 %94, 0
  br i1 %.not185, label %.critedge197, label %.loopexit

95:                                               ; preds = %109
  %indvars.iv.next233 = add nuw nsw i64 %indvars.iv232, 1
  %96 = load i32, ptr %29, align 8, !tbaa !15
  %97 = zext i32 %96 to i64
  %98 = icmp ult i64 %indvars.iv.next233, %97
  br i1 %98, label %99, label %.loopexit, !llvm.loop !16

99:                                               ; preds = %.lr.ph215, %95
  %indvars.iv232 = phi i64 [ 0, %.lr.ph215 ], [ %indvars.iv.next233, %95 ]
  %100 = load ptr, ptr %31, align 8, !tbaa !15
  %101 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %100, i64 %indvars.iv232
  %102 = load i64, ptr %101, align 8, !tbaa !18
  %103 = tail call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %1, i64 noundef %102, i32 noundef %32) #4
  %.not181 = icmp eq i32 %103, 0
  br i1 %.not181, label %.critedge197, label %104

104:                                              ; preds = %99
  %105 = load ptr, ptr %31, align 8, !tbaa !15
  %106 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %105, i64 %indvars.iv232, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !21
  %108 = tail call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %1, i64 noundef %107, i32 noundef %33) #4
  %.not182 = icmp eq i32 %108, 0
  br i1 %.not182, label %.critedge197, label %109

109:                                              ; preds = %104
  %110 = load ptr, ptr %31, align 8, !tbaa !15
  %111 = getelementptr inbounds %struct.FLAC__StreamMetadata_SeekPoint, ptr %110, i64 %indvars.iv232, i32 2
  %112 = load i32, ptr %111, align 8, !tbaa !22
  %113 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %112, i32 noundef %34) #4
  %.not183 = icmp eq i32 %113, 0
  br i1 %.not183, label %.critedge197, label %95

114:                                              ; preds = %27
  %115 = tail call i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef %1, i32 noundef %5) #4
  %.not176 = icmp eq i32 %115, 0
  br i1 %.not176, label %.critedge197, label %116

116:                                              ; preds = %114
  %117 = load ptr, ptr @FLAC__VENDOR_STRING, align 8, !tbaa !5
  %118 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %117, i32 noundef %5) #4
  %.not177 = icmp eq i32 %118, 0
  br i1 %.not177, label %.critedge197, label %119

119:                                              ; preds = %116
  %120 = getelementptr inbounds i8, ptr %0, i64 32
  %121 = load i32, ptr %120, align 8, !tbaa !15
  %122 = tail call i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef %1, i32 noundef %121) #4
  %.not178 = icmp eq i32 %122, 0
  br i1 %.not178, label %.critedge197, label %.preheader201

.preheader201:                                    ; preds = %119
  %123 = load i32, ptr %120, align 8, !tbaa !15
  %.not218 = icmp eq i32 %123, 0
  br i1 %.not218, label %.loopexit, label %.lr.ph213

.lr.ph213:                                        ; preds = %.preheader201
  %124 = getelementptr inbounds i8, ptr %0, i64 40
  br label %129

125:                                              ; preds = %134
  %indvars.iv.next230 = add nuw nsw i64 %indvars.iv229, 1
  %126 = load i32, ptr %120, align 8, !tbaa !15
  %127 = zext i32 %126 to i64
  %128 = icmp ult i64 %indvars.iv.next230, %127
  br i1 %128, label %129, label %.loopexit, !llvm.loop !23

129:                                              ; preds = %.lr.ph213, %125
  %indvars.iv229 = phi i64 [ 0, %.lr.ph213 ], [ %indvars.iv.next230, %125 ]
  %130 = load ptr, ptr %124, align 8, !tbaa !15
  %131 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %130, i64 %indvars.iv229
  %132 = load i32, ptr %131, align 8, !tbaa !24
  %133 = tail call i32 @FLAC__bitwriter_write_raw_uint32_little_endian(ptr noundef %1, i32 noundef %132) #4
  %.not179 = icmp eq i32 %133, 0
  br i1 %.not179, label %.critedge197, label %134

134:                                              ; preds = %129
  %135 = load ptr, ptr %124, align 8, !tbaa !15
  %136 = getelementptr inbounds %struct.FLAC__StreamMetadata_VorbisComment_Entry, ptr %135, i64 %indvars.iv229
  %137 = getelementptr inbounds i8, ptr %136, i64 8
  %138 = load ptr, ptr %137, align 8, !tbaa !26
  %139 = load i32, ptr %136, align 8, !tbaa !24
  %140 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %138, i32 noundef %139) #4
  %.not180 = icmp eq i32 %140, 0
  br i1 %.not180, label %.critedge197, label %125

141:                                              ; preds = %27
  %142 = getelementptr inbounds i8, ptr %0, i64 16
  %143 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN, align 4, !tbaa !12
  %144 = lshr i32 %143, 3
  %145 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef nonnull %142, i32 noundef %144) #4
  %.not160 = icmp eq i32 %145, 0
  br i1 %.not160, label %.critedge197, label %146

146:                                              ; preds = %141
  %147 = getelementptr inbounds i8, ptr %0, i64 152
  %148 = load i64, ptr %147, align 8, !tbaa !15
  %149 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN, align 4, !tbaa !12
  %150 = tail call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %1, i64 noundef %148, i32 noundef %149) #4
  %.not161 = icmp eq i32 %150, 0
  br i1 %.not161, label %.critedge197, label %151

151:                                              ; preds = %146
  %152 = getelementptr inbounds i8, ptr %0, i64 160
  %153 = load i32, ptr %152, align 8, !tbaa !15
  %.not162 = icmp ne i32 %153, 0
  %154 = zext i1 %.not162 to i32
  %155 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN, align 4, !tbaa !12
  %156 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %154, i32 noundef %155) #4
  %.not163 = icmp eq i32 %156, 0
  br i1 %.not163, label %.critedge197, label %157

157:                                              ; preds = %151
  %158 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN, align 4, !tbaa !12
  %159 = tail call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %1, i32 noundef %158) #4
  %.not164 = icmp eq i32 %159, 0
  br i1 %.not164, label %.critedge197, label %160

160:                                              ; preds = %157
  %161 = getelementptr inbounds i8, ptr %0, i64 164
  %162 = load i32, ptr %161, align 4, !tbaa !15
  %163 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN, align 4, !tbaa !12
  %164 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %162, i32 noundef %163) #4
  %.not165 = icmp eq i32 %164, 0
  br i1 %.not165, label %.critedge197, label %.preheader206

.preheader206:                                    ; preds = %160
  %165 = load i32, ptr %161, align 4, !tbaa !15
  %.not216 = icmp eq i32 %165, 0
  br i1 %.not216, label %.loopexit, label %.lr.ph211

.lr.ph211:                                        ; preds = %.preheader206
  %166 = getelementptr inbounds i8, ptr %0, i64 168
  %167 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN, align 4, !tbaa !12
  %168 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN, align 4
  %169 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN, align 4
  %170 = lshr i32 %169, 3
  %171 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN, align 4
  %172 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN, align 4
  %173 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN, align 4
  %174 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN, align 4
  %175 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN, align 4
  %176 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN, align 4
  %177 = load i32, ptr @FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN, align 4
  br label %178

178:                                              ; preds = %.lr.ph211, %.critedge
  %indvars.iv226 = phi i64 [ 0, %.lr.ph211 ], [ %indvars.iv.next227, %.critedge ]
  %179 = load ptr, ptr %166, align 8, !tbaa !15
  %180 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Track, ptr %179, i64 %indvars.iv226
  %181 = load i64, ptr %180, align 8, !tbaa !27
  %182 = tail call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %1, i64 noundef %181, i32 noundef %167) #4
  %.not166 = icmp eq i32 %182, 0
  br i1 %.not166, label %.critedge197, label %183

183:                                              ; preds = %178
  %184 = getelementptr inbounds i8, ptr %180, i64 8
  %185 = load i8, ptr %184, align 8, !tbaa !29
  %186 = zext i8 %185 to i32
  %187 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %186, i32 noundef %168) #4
  %.not167 = icmp eq i32 %187, 0
  br i1 %.not167, label %.critedge197, label %188

188:                                              ; preds = %183
  %189 = getelementptr inbounds i8, ptr %180, i64 9
  %190 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef nonnull %189, i32 noundef %170) #4
  %.not168 = icmp eq i32 %190, 0
  br i1 %.not168, label %.critedge197, label %191

191:                                              ; preds = %188
  %192 = getelementptr inbounds i8, ptr %180, i64 22
  %193 = load i8, ptr %192, align 2
  %194 = and i8 %193, 1
  %195 = zext nneg i8 %194 to i32
  %196 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %195, i32 noundef %171) #4
  %.not169 = icmp eq i32 %196, 0
  br i1 %.not169, label %.critedge197, label %197

197:                                              ; preds = %191
  %198 = load i8, ptr %192, align 2
  %199 = lshr i8 %198, 1
  %200 = and i8 %199, 1
  %201 = zext nneg i8 %200 to i32
  %202 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %201, i32 noundef %172) #4
  %.not170 = icmp eq i32 %202, 0
  br i1 %.not170, label %.critedge197, label %203

203:                                              ; preds = %197
  %204 = tail call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %1, i32 noundef %173) #4
  %.not171 = icmp eq i32 %204, 0
  br i1 %.not171, label %.critedge197, label %205

205:                                              ; preds = %203
  %206 = getelementptr inbounds i8, ptr %180, i64 23
  %207 = load i8, ptr %206, align 1, !tbaa !30
  %208 = zext i8 %207 to i32
  %209 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %208, i32 noundef %174) #4
  %.not172 = icmp eq i32 %209, 0
  br i1 %.not172, label %.critedge197, label %.preheader204

.preheader204:                                    ; preds = %205
  %210 = load i8, ptr %206, align 1, !tbaa !30
  %.not217 = icmp eq i8 %210, 0
  br i1 %.not217, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader204
  %211 = getelementptr inbounds i8, ptr %180, i64 24
  br label %216

212:                                              ; preds = %226
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %213 = load i8, ptr %206, align 1, !tbaa !30
  %214 = zext i8 %213 to i64
  %215 = icmp ult i64 %indvars.iv.next, %214
  br i1 %215, label %216, label %.critedge, !llvm.loop !31

216:                                              ; preds = %.lr.ph, %212
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %212 ]
  %217 = load ptr, ptr %211, align 8, !tbaa !32
  %218 = getelementptr inbounds %struct.FLAC__StreamMetadata_CueSheet_Index, ptr %217, i64 %indvars.iv
  %219 = load i64, ptr %218, align 8, !tbaa !33
  %220 = tail call i32 @FLAC__bitwriter_write_raw_uint64(ptr noundef %1, i64 noundef %219, i32 noundef %175) #4
  %.not173 = icmp eq i32 %220, 0
  br i1 %.not173, label %.critedge197, label %221

221:                                              ; preds = %216
  %222 = getelementptr inbounds i8, ptr %218, i64 8
  %223 = load i8, ptr %222, align 8, !tbaa !35
  %224 = zext i8 %223 to i32
  %225 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %224, i32 noundef %176) #4
  %.not174 = icmp eq i32 %225, 0
  br i1 %.not174, label %.critedge197, label %226

226:                                              ; preds = %221
  %227 = tail call i32 @FLAC__bitwriter_write_zeroes(ptr noundef %1, i32 noundef %177) #4
  %.not175.not = icmp eq i32 %227, 0
  br i1 %.not175.not, label %.critedge197, label %212

.critedge:                                        ; preds = %212, %.preheader204
  %indvars.iv.next227 = add nuw nsw i64 %indvars.iv226, 1
  %228 = load i32, ptr %161, align 4, !tbaa !15
  %229 = zext i32 %228 to i64
  %230 = icmp ult i64 %indvars.iv.next227, %229
  br i1 %230, label %178, label %.loopexit, !llvm.loop !36

231:                                              ; preds = %27
  %232 = getelementptr inbounds i8, ptr %0, i64 16
  %233 = load i32, ptr %232, align 8, !tbaa !15
  %234 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_TYPE_LEN, align 4, !tbaa !12
  %235 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %233, i32 noundef %234) #4
  %.not149 = icmp eq i32 %235, 0
  br i1 %.not149, label %.critedge197, label %236

236:                                              ; preds = %231
  %237 = getelementptr inbounds i8, ptr %0, i64 24
  %238 = load ptr, ptr %237, align 8, !tbaa !15
  %239 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %238) #3
  %240 = trunc i64 %239 to i32
  %241 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN, align 4, !tbaa !12
  %242 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %240, i32 noundef %241) #4
  %.not150 = icmp eq i32 %242, 0
  br i1 %.not150, label %.critedge197, label %243

243:                                              ; preds = %236
  %244 = load ptr, ptr %237, align 8, !tbaa !15
  %245 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %244, i32 noundef %240) #4
  %.not151 = icmp eq i32 %245, 0
  br i1 %.not151, label %.critedge197, label %246

246:                                              ; preds = %243
  %247 = getelementptr inbounds i8, ptr %0, i64 32
  %248 = load ptr, ptr %247, align 8, !tbaa !15
  %249 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %248) #3
  %250 = trunc i64 %249 to i32
  %251 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN, align 4, !tbaa !12
  %252 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %250, i32 noundef %251) #4
  %.not152 = icmp eq i32 %252, 0
  br i1 %.not152, label %.critedge197, label %253

253:                                              ; preds = %246
  %254 = load ptr, ptr %247, align 8, !tbaa !15
  %255 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %254, i32 noundef %250) #4
  %.not153 = icmp eq i32 %255, 0
  br i1 %.not153, label %.critedge197, label %256

256:                                              ; preds = %253
  %257 = getelementptr inbounds i8, ptr %0, i64 40
  %258 = load i32, ptr %257, align 8, !tbaa !15
  %259 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN, align 4, !tbaa !12
  %260 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %258, i32 noundef %259) #4
  %.not154 = icmp eq i32 %260, 0
  br i1 %.not154, label %.critedge197, label %261

261:                                              ; preds = %256
  %262 = getelementptr inbounds i8, ptr %0, i64 44
  %263 = load i32, ptr %262, align 4, !tbaa !15
  %264 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN, align 4, !tbaa !12
  %265 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %263, i32 noundef %264) #4
  %.not155 = icmp eq i32 %265, 0
  br i1 %.not155, label %.critedge197, label %266

266:                                              ; preds = %261
  %267 = getelementptr inbounds i8, ptr %0, i64 48
  %268 = load i32, ptr %267, align 8, !tbaa !15
  %269 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN, align 4, !tbaa !12
  %270 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %268, i32 noundef %269) #4
  %.not156 = icmp eq i32 %270, 0
  br i1 %.not156, label %.critedge197, label %271

271:                                              ; preds = %266
  %272 = getelementptr inbounds i8, ptr %0, i64 52
  %273 = load i32, ptr %272, align 4, !tbaa !15
  %274 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_COLORS_LEN, align 4, !tbaa !12
  %275 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %273, i32 noundef %274) #4
  %.not157 = icmp eq i32 %275, 0
  br i1 %.not157, label %.critedge197, label %276

276:                                              ; preds = %271
  %277 = getelementptr inbounds i8, ptr %0, i64 56
  %278 = load i32, ptr %277, align 8, !tbaa !15
  %279 = load i32, ptr @FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN, align 4, !tbaa !12
  %280 = tail call i32 @FLAC__bitwriter_write_raw_uint32(ptr noundef %1, i32 noundef %278, i32 noundef %279) #4
  %.not158 = icmp eq i32 %280, 0
  br i1 %.not158, label %.critedge197, label %281

281:                                              ; preds = %276
  %282 = getelementptr inbounds i8, ptr %0, i64 64
  %283 = load ptr, ptr %282, align 8, !tbaa !15
  %284 = load i32, ptr %277, align 8, !tbaa !15
  %285 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %283, i32 noundef %284) #4
  %.not159.not = icmp eq i32 %285, 0
  br i1 %.not159.not, label %.critedge197, label %.loopexit

286:                                              ; preds = %27
  %287 = getelementptr inbounds i8, ptr %0, i64 16
  %288 = load ptr, ptr %287, align 8, !tbaa !15
  %289 = load i32, ptr %15, align 8, !tbaa !14
  %290 = tail call i32 @FLAC__bitwriter_write_byte_block(ptr noundef %1, ptr noundef %288, i32 noundef %289) #4
  %.not196 = icmp eq i32 %290, 0
  br i1 %.not196, label %.critedge197, label %.loopexit

.loopexit:                                        ; preds = %.critedge, %125, %95, %.preheader206, %.preheader201, %.preheader, %286, %281, %89, %80, %77
  br label %.critedge197

.critedge197:                                     ; preds = %178, %183, %188, %191, %197, %203, %205, %226, %221, %216, %134, %129, %109, %104, %99, %231, %236, %243, %246, %253, %256, %261, %266, %271, %276, %286, %160, %157, %151, %146, %141, %119, %116, %114, %89, %84, %80, %77, %72, %66, %60, %55, %50, %45, %40, %35, %24, %10, %2, %281, %.loopexit
  %.5 = phi i32 [ 1, %.loopexit ], [ 0, %281 ], [ 0, %2 ], [ 0, %10 ], [ 0, %24 ], [ 0, %35 ], [ 0, %40 ], [ 0, %45 ], [ 0, %50 ], [ 0, %55 ], [ 0, %60 ], [ 0, %66 ], [ 0, %72 ], [ 0, %77 ], [ 0, %80 ], [ 0, %84 ], [ 0, %89 ], [ 0, %114 ], [ 0, %116 ], [ 0, %119 ], [ 0, %141 ], [ 0, %146 ], [ 0, %151 ], [ 0, %157 ], [ 0, %160 ], [ 0, %286 ], [ 0, %276 ], [ 0, %271 ], [ 0, %266 ], [ 0, %261 ], [ 0, %256 ], [ 0, %253 ], [ 0, %246 ], [ 0, %243 ], [ 0, %236 ], [ 0, %231 ], [ 0, %99 ], [ 0, %104 ], [ 0, %109 ], [ 0, %129 ], [ 0, %134 ], [ 0, %216 ], [ 0, %221 ], [ 0, %226 ], [ 0, %205 ], [ 0, %203 ], [ 0, %197 ], [ 0, %191 ], [ 0, %188 ], [ 0, %183 ], [ 0, %178 ]
  ret i32 %.5
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

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

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

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

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

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

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 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 #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 = { nounwind willreturn memory(read) }
attributes #4 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!10, !11, i64 8}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !20, i64 0}
!19 = !{!"", !20, i64 0, !20, i64 8, !11, i64 16}
!20 = !{!"long", !7, i64 0}
!21 = !{!19, !20, i64 8}
!22 = !{!19, !11, i64 16}
!23 = distinct !{!23, !17}
!24 = !{!25, !11, i64 0}
!25 = !{!"", !11, i64 0, !6, i64 8}
!26 = !{!25, !6, i64 8}
!27 = !{!28, !20, i64 0}
!28 = !{!"", !20, i64 0, !7, i64 8, !7, i64 9, !11, i64 22, !11, i64 22, !7, i64 23, !6, i64 24}
!29 = !{!28, !7, i64 8}
!30 = !{!28, !7, i64 23}
!31 = distinct !{!31, !17}
!32 = !{!28, !6, i64 24}
!33 = !{!34, !20, i64 0}
!34 = !{!"", !20, i64 0, !7, i64 8}
!35 = !{!34, !7, i64 8}
!36 = distinct !{!36, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass