; LLVM IR from carlk3/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico :: examples/command_line/tests (app4-IO_module_function_checker)

; 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"

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@__func__.test_diskio = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @test_diskio(i8 noundef zeroext %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i16, align 2
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i8 %0, ptr %6, align 1, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !8
  store ptr %2, ptr %8, align 8, !tbaa !10
  store i32 %3, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %23 = load ptr, ptr %8, align 8, !tbaa !10
  store ptr %23, ptr %19, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %24 = load i8, ptr %6, align 1, !tbaa !5
  %25 = zext i8 %24 to i32
  %26 = load i32, ptr %7, align 4, !tbaa !8
  %27 = load ptr, ptr %8, align 8, !tbaa !10
  %28 = ptrtoint ptr %27 to i32
  %29 = load i32, ptr %9, align 4, !tbaa !8
  %30 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str, i32 noundef %25, i32 noundef %26, i32 noundef %28, i32 noundef %29)
  %31 = load i32, ptr %9, align 4, !tbaa !8
  %32 = icmp ult i32 %31, 520
  br i1 %32, label %33, label %35

33:                                               ; preds = %4
  %34 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 88, ptr noundef @.str.1)
  store i32 1, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

35:                                               ; preds = %4
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %641, %35
  %37 = load i32, ptr %11, align 4, !tbaa !8
  %38 = load i32, ptr %7, align 4, !tbaa !8
  %39 = icmp ule i32 %37, %38
  br i1 %39, label %40, label %644

40:                                               ; preds = %36
  %41 = load i32, ptr %11, align 4, !tbaa !8
  %42 = load i32, ptr %7, align 4, !tbaa !8
  %43 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.2, i32 noundef %41, i32 noundef %42)
  %44 = load i8, ptr %6, align 1, !tbaa !5
  %45 = zext i8 %44 to i32
  %46 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.3, i32 noundef %45)
  %47 = load i8, ptr %6, align 1, !tbaa !5
  %48 = call zeroext i8 @disk_initialize(i8 noundef zeroext %47)
  store i8 %48, ptr %20, align 1, !tbaa !5
  %49 = load i8, ptr %20, align 1, !tbaa !5
  %50 = zext i8 %49 to i32
  %51 = and i32 %50, 1
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %55

53:                                               ; preds = %40
  %54 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 98, ptr noundef @.str.4)
  store i32 2, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

55:                                               ; preds = %40
  %56 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %57

57:                                               ; preds = %55
  %58 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.6)
  %59 = load i8, ptr %6, align 1, !tbaa !5
  %60 = zext i8 %59 to i32
  %61 = ptrtoint ptr %13 to i32
  %62 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.7, i32 noundef %60, i32 noundef %61)
  store i32 0, ptr %13, align 4, !tbaa !8
  %63 = load i8, ptr %6, align 1, !tbaa !5
  %64 = call i32 @disk_ioctl(i8 noundef zeroext %63, i8 noundef zeroext 1, ptr noundef %13)
  store i32 %64, ptr %21, align 4, !tbaa !8
  %65 = load i32, ptr %21, align 4, !tbaa !8
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %57
  %68 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %71

69:                                               ; preds = %57
  %70 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 111, ptr noundef @.str.4)
  store i32 3, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

71:                                               ; preds = %67
  %72 = load i32, ptr %13, align 4, !tbaa !8
  %73 = icmp ult i32 %72, 128
  br i1 %73, label %74, label %76

74:                                               ; preds = %71
  %75 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 115, ptr noundef @.str.8)
  store i32 4, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

76:                                               ; preds = %71
  %77 = load i8, ptr %6, align 1, !tbaa !5
  %78 = zext i8 %77 to i32
  %79 = load i32, ptr %13, align 4, !tbaa !8
  %80 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.9, i32 noundef %78, i32 noundef %79)
  store i16 512, ptr %18, align 2, !tbaa !12
  %81 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.10)
  %82 = load i8, ptr %6, align 1, !tbaa !5
  %83 = zext i8 %82 to i32
  %84 = ptrtoint ptr %16 to i32
  %85 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.11, i32 noundef %83, i32 noundef %84)
  store i32 0, ptr %16, align 4, !tbaa !8
  %86 = load i8, ptr %6, align 1, !tbaa !5
  %87 = call i32 @disk_ioctl(i8 noundef zeroext %86, i8 noundef zeroext 3, ptr noundef %16)
  store i32 %87, ptr %21, align 4, !tbaa !8
  %88 = load i32, ptr %21, align 4, !tbaa !8
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %76
  %91 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %94

92:                                               ; preds = %76
  %93 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 143, ptr noundef @.str.4)
  br label %94

94:                                               ; preds = %92, %90
  %95 = load i32, ptr %21, align 4, !tbaa !8
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %100, label %97

97:                                               ; preds = %94
  %98 = load i32, ptr %16, align 4, !tbaa !8
  %99 = icmp uge i32 %98, 2
  br i1 %99, label %100, label %103

100:                                              ; preds = %97, %94
  %101 = load i32, ptr %16, align 4, !tbaa !8
  %102 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.12, i32 noundef %101)
  br label %105

103:                                              ; preds = %97
  %104 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.13)
  br label %105

105:                                              ; preds = %103, %100
  %106 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.14)
  store i32 0, ptr %14, align 4, !tbaa !8
  store i32 0, ptr %10, align 4, !tbaa !8
  %107 = load i32, ptr %17, align 4, !tbaa !8
  %108 = call i32 @pn(i32 noundef %107)
  br label %109

109:                                              ; preds = %121, %105
  %110 = load i32, ptr %10, align 4, !tbaa !8
  %111 = load i16, ptr %18, align 2, !tbaa !12
  %112 = zext i16 %111 to i32
  %113 = icmp ult i32 %110, %112
  br i1 %113, label %114, label %124

114:                                              ; preds = %109
  %115 = call i32 @pn(i32 noundef 0)
  %116 = trunc i32 %115 to i8
  %117 = load ptr, ptr %19, align 8, !tbaa !10
  %118 = load i32, ptr %10, align 4, !tbaa !8
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %117, i64 %119
  store i8 %116, ptr %120, align 1, !tbaa !5
  br label %121

121:                                              ; preds = %114
  %122 = load i32, ptr %10, align 4, !tbaa !8
  %123 = add i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !8
  br label %109, !llvm.loop !14

124:                                              ; preds = %109
  %125 = load i8, ptr %6, align 1, !tbaa !5
  %126 = zext i8 %125 to i32
  %127 = load ptr, ptr %19, align 8, !tbaa !10
  %128 = ptrtoint ptr %127 to i32
  %129 = load i32, ptr %14, align 4, !tbaa !8
  %130 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.15, i32 noundef %126, i32 noundef %128, i32 noundef %129)
  %131 = load i8, ptr %6, align 1, !tbaa !5
  %132 = load ptr, ptr %19, align 8, !tbaa !10
  %133 = load i32, ptr %14, align 4, !tbaa !8
  %134 = zext i32 %133 to i64
  %135 = call i32 @disk_write(i8 noundef zeroext %131, ptr noundef %132, i64 noundef %134, i32 noundef 1)
  store i32 %135, ptr %21, align 4, !tbaa !8
  %136 = load i32, ptr %21, align 4, !tbaa !8
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %124
  %139 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %142

140:                                              ; preds = %124
  %141 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 160, ptr noundef @.str.4)
  store i32 6, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

142:                                              ; preds = %138
  %143 = load i8, ptr %6, align 1, !tbaa !5
  %144 = zext i8 %143 to i32
  %145 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.16, i32 noundef %144)
  %146 = load i8, ptr %6, align 1, !tbaa !5
  %147 = call i32 @disk_ioctl(i8 noundef zeroext %146, i8 noundef zeroext 0, ptr noundef null)
  store i32 %147, ptr %21, align 4, !tbaa !8
  %148 = load i32, ptr %21, align 4, !tbaa !8
  %149 = icmp eq i32 %148, 0
  br i1 %149, label %150, label %152

150:                                              ; preds = %142
  %151 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %154

152:                                              ; preds = %142
  %153 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 168, ptr noundef @.str.4)
  store i32 7, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

154:                                              ; preds = %150
  %155 = load ptr, ptr %19, align 8, !tbaa !10
  %156 = load i16, ptr %18, align 2, !tbaa !12
  %157 = zext i16 %156 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %155, i8 0, i64 %157, i1 false)
  %158 = load i8, ptr %6, align 1, !tbaa !5
  %159 = zext i8 %158 to i32
  %160 = load ptr, ptr %19, align 8, !tbaa !10
  %161 = ptrtoint ptr %160 to i32
  %162 = load i32, ptr %14, align 4, !tbaa !8
  %163 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.17, i32 noundef %159, i32 noundef %161, i32 noundef %162)
  %164 = load i8, ptr %6, align 1, !tbaa !5
  %165 = load ptr, ptr %19, align 8, !tbaa !10
  %166 = load i32, ptr %14, align 4, !tbaa !8
  %167 = zext i32 %166 to i64
  %168 = call i32 @disk_read(i8 noundef zeroext %164, ptr noundef %165, i64 noundef %167, i32 noundef 1)
  store i32 %168, ptr %21, align 4, !tbaa !8
  %169 = load i32, ptr %21, align 4, !tbaa !8
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %173

171:                                              ; preds = %154
  %172 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %175

173:                                              ; preds = %154
  %174 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 177, ptr noundef @.str.4)
  store i32 8, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

175:                                              ; preds = %171
  store i32 0, ptr %10, align 4, !tbaa !8
  %176 = load i32, ptr %17, align 4, !tbaa !8
  %177 = call i32 @pn(i32 noundef %176)
  br label %178

178:                                              ; preds = %197, %175
  %179 = load i32, ptr %10, align 4, !tbaa !8
  %180 = load i16, ptr %18, align 2, !tbaa !12
  %181 = zext i16 %180 to i32
  %182 = icmp ult i32 %179, %181
  br i1 %182, label %183, label %194

183:                                              ; preds = %178
  %184 = load ptr, ptr %19, align 8, !tbaa !10
  %185 = load i32, ptr %10, align 4, !tbaa !8
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds i8, ptr %184, i64 %186
  %188 = load i8, ptr %187, align 1, !tbaa !5
  %189 = zext i8 %188 to i32
  %190 = call i32 @pn(i32 noundef 0)
  %191 = trunc i32 %190 to i8
  %192 = zext i8 %191 to i32
  %193 = icmp eq i32 %189, %192
  br label %194

194:                                              ; preds = %183, %178
  %195 = phi i1 [ false, %178 ], [ %193, %183 ]
  br i1 %195, label %196, label %200

196:                                              ; preds = %194
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %10, align 4, !tbaa !8
  %199 = add i32 %198, 1
  store i32 %199, ptr %10, align 4, !tbaa !8
  br label %178, !llvm.loop !16

200:                                              ; preds = %194
  %201 = load i32, ptr %10, align 4, !tbaa !8
  %202 = load i16, ptr %18, align 2, !tbaa !12
  %203 = zext i16 %202 to i32
  %204 = icmp eq i32 %201, %203
  br i1 %204, label %205, label %207

205:                                              ; preds = %200
  %206 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.18)
  br label %209

207:                                              ; preds = %200
  %208 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 184, ptr noundef @.str.19)
  store i32 10, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

209:                                              ; preds = %205
  %210 = load i32, ptr %17, align 4, !tbaa !8
  %211 = add i32 %210, 1
  store i32 %211, ptr %17, align 4, !tbaa !8
  %212 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.20)
  store i32 5, ptr %14, align 4, !tbaa !8
  %213 = load i32, ptr %9, align 4, !tbaa !8
  %214 = load i16, ptr %18, align 2, !tbaa !12
  %215 = zext i16 %214 to i32
  %216 = udiv i32 %213, %215
  store i32 %216, ptr %12, align 4, !tbaa !8
  %217 = load i32, ptr %12, align 4, !tbaa !8
  %218 = icmp ugt i32 %217, 4
  br i1 %218, label %219, label %220

219:                                              ; preds = %209
  store i32 4, ptr %12, align 4, !tbaa !8
  br label %220

220:                                              ; preds = %219, %209
  %221 = load i32, ptr %12, align 4, !tbaa !8
  %222 = icmp ugt i32 %221, 1
  br i1 %222, label %223, label %340

223:                                              ; preds = %220
  store i32 0, ptr %10, align 4, !tbaa !8
  %224 = load i32, ptr %17, align 4, !tbaa !8
  %225 = call i32 @pn(i32 noundef %224)
  br label %226

226:                                              ; preds = %240, %223
  %227 = load i32, ptr %10, align 4, !tbaa !8
  %228 = load i16, ptr %18, align 2, !tbaa !12
  %229 = zext i16 %228 to i32
  %230 = load i32, ptr %12, align 4, !tbaa !8
  %231 = mul i32 %229, %230
  %232 = icmp ult i32 %227, %231
  br i1 %232, label %233, label %243

233:                                              ; preds = %226
  %234 = call i32 @pn(i32 noundef 0)
  %235 = trunc i32 %234 to i8
  %236 = load ptr, ptr %19, align 8, !tbaa !10
  %237 = load i32, ptr %10, align 4, !tbaa !8
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds i8, ptr %236, i64 %238
  store i8 %235, ptr %239, align 1, !tbaa !5
  br label %240

240:                                              ; preds = %233
  %241 = load i32, ptr %10, align 4, !tbaa !8
  %242 = add i32 %241, 1
  store i32 %242, ptr %10, align 4, !tbaa !8
  br label %226, !llvm.loop !17

243:                                              ; preds = %226
  %244 = load i8, ptr %6, align 1, !tbaa !5
  %245 = zext i8 %244 to i32
  %246 = load ptr, ptr %19, align 8, !tbaa !10
  %247 = ptrtoint ptr %246 to i32
  %248 = load i32, ptr %14, align 4, !tbaa !8
  %249 = load i32, ptr %12, align 4, !tbaa !8
  %250 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.21, i32 noundef %245, i32 noundef %247, i32 noundef %248, i32 noundef %249)
  %251 = load i8, ptr %6, align 1, !tbaa !5
  %252 = load ptr, ptr %19, align 8, !tbaa !10
  %253 = load i32, ptr %14, align 4, !tbaa !8
  %254 = zext i32 %253 to i64
  %255 = load i32, ptr %12, align 4, !tbaa !8
  %256 = call i32 @disk_write(i8 noundef zeroext %251, ptr noundef %252, i64 noundef %254, i32 noundef %255)
  store i32 %256, ptr %21, align 4, !tbaa !8
  %257 = load i32, ptr %21, align 4, !tbaa !8
  %258 = icmp eq i32 %257, 0
  br i1 %258, label %259, label %261

259:                                              ; preds = %243
  %260 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %263

261:                                              ; preds = %243
  %262 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 199, ptr noundef @.str.4)
  store i32 11, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

263:                                              ; preds = %259
  %264 = load i8, ptr %6, align 1, !tbaa !5
  %265 = zext i8 %264 to i32
  %266 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.16, i32 noundef %265)
  %267 = load i8, ptr %6, align 1, !tbaa !5
  %268 = call i32 @disk_ioctl(i8 noundef zeroext %267, i8 noundef zeroext 0, ptr noundef null)
  store i32 %268, ptr %21, align 4, !tbaa !8
  %269 = load i32, ptr %21, align 4, !tbaa !8
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %273

271:                                              ; preds = %263
  %272 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %275

273:                                              ; preds = %263
  %274 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 207, ptr noundef @.str.4)
  store i32 12, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

275:                                              ; preds = %271
  %276 = load ptr, ptr %19, align 8, !tbaa !10
  %277 = load i16, ptr %18, align 2, !tbaa !12
  %278 = zext i16 %277 to i32
  %279 = load i32, ptr %12, align 4, !tbaa !8
  %280 = mul i32 %278, %279
  %281 = zext i32 %280 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %276, i8 0, i64 %281, i1 false)
  %282 = load i8, ptr %6, align 1, !tbaa !5
  %283 = zext i8 %282 to i32
  %284 = load ptr, ptr %19, align 8, !tbaa !10
  %285 = ptrtoint ptr %284 to i32
  %286 = load i32, ptr %14, align 4, !tbaa !8
  %287 = load i32, ptr %12, align 4, !tbaa !8
  %288 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.22, i32 noundef %283, i32 noundef %285, i32 noundef %286, i32 noundef %287)
  %289 = load i8, ptr %6, align 1, !tbaa !5
  %290 = load ptr, ptr %19, align 8, !tbaa !10
  %291 = load i32, ptr %14, align 4, !tbaa !8
  %292 = zext i32 %291 to i64
  %293 = load i32, ptr %12, align 4, !tbaa !8
  %294 = call i32 @disk_read(i8 noundef zeroext %289, ptr noundef %290, i64 noundef %292, i32 noundef %293)
  store i32 %294, ptr %21, align 4, !tbaa !8
  %295 = load i32, ptr %21, align 4, !tbaa !8
  %296 = icmp eq i32 %295, 0
  br i1 %296, label %297, label %299

297:                                              ; preds = %275
  %298 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %301

299:                                              ; preds = %275
  %300 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 216, ptr noundef @.str.4)
  store i32 13, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

301:                                              ; preds = %297
  store i32 0, ptr %10, align 4, !tbaa !8
  %302 = load i32, ptr %17, align 4, !tbaa !8
  %303 = call i32 @pn(i32 noundef %302)
  br label %304

304:                                              ; preds = %325, %301
  %305 = load i32, ptr %10, align 4, !tbaa !8
  %306 = load i16, ptr %18, align 2, !tbaa !12
  %307 = zext i16 %306 to i32
  %308 = load i32, ptr %12, align 4, !tbaa !8
  %309 = mul i32 %307, %308
  %310 = icmp ult i32 %305, %309
  br i1 %310, label %311, label %322

311:                                              ; preds = %304
  %312 = load ptr, ptr %19, align 8, !tbaa !10
  %313 = load i32, ptr %10, align 4, !tbaa !8
  %314 = zext i32 %313 to i64
  %315 = getelementptr inbounds i8, ptr %312, i64 %314
  %316 = load i8, ptr %315, align 1, !tbaa !5
  %317 = zext i8 %316 to i32
  %318 = call i32 @pn(i32 noundef 0)
  %319 = trunc i32 %318 to i8
  %320 = zext i8 %319 to i32
  %321 = icmp eq i32 %317, %320
  br label %322

322:                                              ; preds = %311, %304
  %323 = phi i1 [ false, %304 ], [ %321, %311 ]
  br i1 %323, label %324, label %328

324:                                              ; preds = %322
  br label %325

325:                                              ; preds = %324
  %326 = load i32, ptr %10, align 4, !tbaa !8
  %327 = add i32 %326, 1
  store i32 %327, ptr %10, align 4, !tbaa !8
  br label %304, !llvm.loop !18

328:                                              ; preds = %322
  %329 = load i32, ptr %10, align 4, !tbaa !8
  %330 = load i16, ptr %18, align 2, !tbaa !12
  %331 = zext i16 %330 to i32
  %332 = load i32, ptr %12, align 4, !tbaa !8
  %333 = mul i32 %331, %332
  %334 = icmp eq i32 %329, %333
  br i1 %334, label %335, label %337

335:                                              ; preds = %328
  %336 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.18)
  br label %339

337:                                              ; preds = %328
  %338 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 223, ptr noundef @.str.19)
  store i32 14, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

339:                                              ; preds = %335
  br label %342

340:                                              ; preds = %220
  %341 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.23)
  br label %342

342:                                              ; preds = %340, %339
  %343 = load i32, ptr %17, align 4, !tbaa !8
  %344 = add i32 %343, 1
  store i32 %344, ptr %17, align 4, !tbaa !8
  %345 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.24)
  store i32 5, ptr %14, align 4, !tbaa !8
  store i32 0, ptr %10, align 4, !tbaa !8
  %346 = load i32, ptr %17, align 4, !tbaa !8
  %347 = call i32 @pn(i32 noundef %346)
  br label %348

348:                                              ; preds = %361, %342
  %349 = load i32, ptr %10, align 4, !tbaa !8
  %350 = load i16, ptr %18, align 2, !tbaa !12
  %351 = zext i16 %350 to i32
  %352 = icmp ult i32 %349, %351
  br i1 %352, label %353, label %364

353:                                              ; preds = %348
  %354 = call i32 @pn(i32 noundef 0)
  %355 = trunc i32 %354 to i8
  %356 = load ptr, ptr %19, align 8, !tbaa !10
  %357 = load i32, ptr %10, align 4, !tbaa !8
  %358 = add i32 %357, 3
  %359 = zext i32 %358 to i64
  %360 = getelementptr inbounds i8, ptr %356, i64 %359
  store i8 %355, ptr %360, align 1, !tbaa !5
  br label %361

361:                                              ; preds = %353
  %362 = load i32, ptr %10, align 4, !tbaa !8
  %363 = add i32 %362, 1
  store i32 %363, ptr %10, align 4, !tbaa !8
  br label %348, !llvm.loop !19

364:                                              ; preds = %348
  %365 = load i8, ptr %6, align 1, !tbaa !5
  %366 = zext i8 %365 to i32
  %367 = load ptr, ptr %19, align 8, !tbaa !10
  %368 = getelementptr inbounds i8, ptr %367, i64 3
  %369 = ptrtoint ptr %368 to i32
  %370 = load i32, ptr %14, align 4, !tbaa !8
  %371 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.15, i32 noundef %366, i32 noundef %369, i32 noundef %370)
  %372 = load i8, ptr %6, align 1, !tbaa !5
  %373 = load ptr, ptr %19, align 8, !tbaa !10
  %374 = getelementptr inbounds i8, ptr %373, i64 3
  %375 = load i32, ptr %14, align 4, !tbaa !8
  %376 = zext i32 %375 to i64
  %377 = call i32 @disk_write(i8 noundef zeroext %372, ptr noundef %374, i64 noundef %376, i32 noundef 1)
  store i32 %377, ptr %21, align 4, !tbaa !8
  %378 = load i32, ptr %21, align 4, !tbaa !8
  %379 = icmp eq i32 %378, 0
  br i1 %379, label %380, label %382

380:                                              ; preds = %364
  %381 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %384

382:                                              ; preds = %364
  %383 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 239, ptr noundef @.str.4)
  store i32 15, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

384:                                              ; preds = %380
  %385 = load i8, ptr %6, align 1, !tbaa !5
  %386 = zext i8 %385 to i32
  %387 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.16, i32 noundef %386)
  %388 = load i8, ptr %6, align 1, !tbaa !5
  %389 = call i32 @disk_ioctl(i8 noundef zeroext %388, i8 noundef zeroext 0, ptr noundef null)
  store i32 %389, ptr %21, align 4, !tbaa !8
  %390 = load i32, ptr %21, align 4, !tbaa !8
  %391 = icmp eq i32 %390, 0
  br i1 %391, label %392, label %394

392:                                              ; preds = %384
  %393 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %396

394:                                              ; preds = %384
  %395 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 247, ptr noundef @.str.4)
  store i32 16, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

396:                                              ; preds = %392
  %397 = load ptr, ptr %19, align 8, !tbaa !10
  %398 = getelementptr inbounds i8, ptr %397, i64 5
  %399 = load i16, ptr %18, align 2, !tbaa !12
  %400 = zext i16 %399 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %398, i8 0, i64 %400, i1 false)
  %401 = load i8, ptr %6, align 1, !tbaa !5
  %402 = zext i8 %401 to i32
  %403 = load ptr, ptr %19, align 8, !tbaa !10
  %404 = getelementptr inbounds i8, ptr %403, i64 5
  %405 = ptrtoint ptr %404 to i32
  %406 = load i32, ptr %14, align 4, !tbaa !8
  %407 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.17, i32 noundef %402, i32 noundef %405, i32 noundef %406)
  %408 = load i8, ptr %6, align 1, !tbaa !5
  %409 = load ptr, ptr %19, align 8, !tbaa !10
  %410 = getelementptr inbounds i8, ptr %409, i64 5
  %411 = load i32, ptr %14, align 4, !tbaa !8
  %412 = zext i32 %411 to i64
  %413 = call i32 @disk_read(i8 noundef zeroext %408, ptr noundef %410, i64 noundef %412, i32 noundef 1)
  store i32 %413, ptr %21, align 4, !tbaa !8
  %414 = load i32, ptr %21, align 4, !tbaa !8
  %415 = icmp eq i32 %414, 0
  br i1 %415, label %416, label %418

416:                                              ; preds = %396
  %417 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %420

418:                                              ; preds = %396
  %419 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 256, ptr noundef @.str.4)
  store i32 17, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

420:                                              ; preds = %416
  store i32 0, ptr %10, align 4, !tbaa !8
  %421 = load i32, ptr %17, align 4, !tbaa !8
  %422 = call i32 @pn(i32 noundef %421)
  br label %423

423:                                              ; preds = %443, %420
  %424 = load i32, ptr %10, align 4, !tbaa !8
  %425 = load i16, ptr %18, align 2, !tbaa !12
  %426 = zext i16 %425 to i32
  %427 = icmp ult i32 %424, %426
  br i1 %427, label %428, label %440

428:                                              ; preds = %423
  %429 = load ptr, ptr %19, align 8, !tbaa !10
  %430 = load i32, ptr %10, align 4, !tbaa !8
  %431 = add i32 %430, 5
  %432 = zext i32 %431 to i64
  %433 = getelementptr inbounds i8, ptr %429, i64 %432
  %434 = load i8, ptr %433, align 1, !tbaa !5
  %435 = zext i8 %434 to i32
  %436 = call i32 @pn(i32 noundef 0)
  %437 = trunc i32 %436 to i8
  %438 = zext i8 %437 to i32
  %439 = icmp eq i32 %435, %438
  br label %440

440:                                              ; preds = %428, %423
  %441 = phi i1 [ false, %423 ], [ %439, %428 ]
  br i1 %441, label %442, label %446

442:                                              ; preds = %440
  br label %443

443:                                              ; preds = %442
  %444 = load i32, ptr %10, align 4, !tbaa !8
  %445 = add i32 %444, 1
  store i32 %445, ptr %10, align 4, !tbaa !8
  br label %423, !llvm.loop !20

446:                                              ; preds = %440
  %447 = load i32, ptr %10, align 4, !tbaa !8
  %448 = load i16, ptr %18, align 2, !tbaa !12
  %449 = zext i16 %448 to i32
  %450 = icmp eq i32 %447, %449
  br i1 %450, label %451, label %453

451:                                              ; preds = %446
  %452 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.18)
  br label %455

453:                                              ; preds = %446
  %454 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 263, ptr noundef @.str.19)
  store i32 18, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

455:                                              ; preds = %451
  %456 = load i32, ptr %17, align 4, !tbaa !8
  %457 = add i32 %456, 1
  store i32 %457, ptr %17, align 4, !tbaa !8
  %458 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.25)
  %459 = load i32, ptr %13, align 4, !tbaa !8
  %460 = load i16, ptr %18, align 2, !tbaa !12
  %461 = zext i16 %460 to i32
  %462 = sdiv i32 %461, 2
  %463 = udiv i32 -2147483648, %462
  %464 = add i32 128, %463
  %465 = icmp uge i32 %459, %464
  br i1 %465, label %466, label %633

466:                                              ; preds = %455
  store i32 6, ptr %14, align 4, !tbaa !8
  %467 = load i32, ptr %14, align 4, !tbaa !8
  %468 = load i16, ptr %18, align 2, !tbaa !12
  %469 = zext i16 %468 to i32
  %470 = sdiv i32 %469, 2
  %471 = udiv i32 -2147483648, %470
  %472 = add i32 %467, %471
  store i32 %472, ptr %15, align 4, !tbaa !8
  store i32 0, ptr %10, align 4, !tbaa !8
  %473 = load i32, ptr %17, align 4, !tbaa !8
  %474 = call i32 @pn(i32 noundef %473)
  br label %475

475:                                              ; preds = %488, %466
  %476 = load i32, ptr %10, align 4, !tbaa !8
  %477 = load i16, ptr %18, align 2, !tbaa !12
  %478 = zext i16 %477 to i32
  %479 = mul nsw i32 %478, 2
  %480 = icmp ult i32 %476, %479
  br i1 %480, label %481, label %491

481:                                              ; preds = %475
  %482 = call i32 @pn(i32 noundef 0)
  %483 = trunc i32 %482 to i8
  %484 = load ptr, ptr %19, align 8, !tbaa !10
  %485 = load i32, ptr %10, align 4, !tbaa !8
  %486 = zext i32 %485 to i64
  %487 = getelementptr inbounds i8, ptr %484, i64 %486
  store i8 %483, ptr %487, align 1, !tbaa !5
  br label %488

488:                                              ; preds = %481
  %489 = load i32, ptr %10, align 4, !tbaa !8
  %490 = add i32 %489, 1
  store i32 %490, ptr %10, align 4, !tbaa !8
  br label %475, !llvm.loop !21

491:                                              ; preds = %475
  %492 = load i8, ptr %6, align 1, !tbaa !5
  %493 = zext i8 %492 to i32
  %494 = load ptr, ptr %19, align 8, !tbaa !10
  %495 = ptrtoint ptr %494 to i32
  %496 = load i32, ptr %14, align 4, !tbaa !8
  %497 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.15, i32 noundef %493, i32 noundef %495, i32 noundef %496)
  %498 = load i8, ptr %6, align 1, !tbaa !5
  %499 = load ptr, ptr %19, align 8, !tbaa !10
  %500 = load i32, ptr %14, align 4, !tbaa !8
  %501 = zext i32 %500 to i64
  %502 = call i32 @disk_write(i8 noundef zeroext %498, ptr noundef %499, i64 noundef %501, i32 noundef 1)
  store i32 %502, ptr %21, align 4, !tbaa !8
  %503 = load i32, ptr %21, align 4, !tbaa !8
  %504 = icmp eq i32 %503, 0
  br i1 %504, label %505, label %507

505:                                              ; preds = %491
  %506 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %509

507:                                              ; preds = %491
  %508 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 277, ptr noundef @.str.4)
  store i32 19, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

509:                                              ; preds = %505
  %510 = load i8, ptr %6, align 1, !tbaa !5
  %511 = zext i8 %510 to i32
  %512 = load ptr, ptr %19, align 8, !tbaa !10
  %513 = load i16, ptr %18, align 2, !tbaa !12
  %514 = zext i16 %513 to i32
  %515 = sext i32 %514 to i64
  %516 = getelementptr inbounds i8, ptr %512, i64 %515
  %517 = ptrtoint ptr %516 to i32
  %518 = load i32, ptr %15, align 4, !tbaa !8
  %519 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.15, i32 noundef %511, i32 noundef %517, i32 noundef %518)
  %520 = load i8, ptr %6, align 1, !tbaa !5
  %521 = load ptr, ptr %19, align 8, !tbaa !10
  %522 = load i16, ptr %18, align 2, !tbaa !12
  %523 = zext i16 %522 to i32
  %524 = sext i32 %523 to i64
  %525 = getelementptr inbounds i8, ptr %521, i64 %524
  %526 = load i32, ptr %15, align 4, !tbaa !8
  %527 = zext i32 %526 to i64
  %528 = call i32 @disk_write(i8 noundef zeroext %520, ptr noundef %525, i64 noundef %527, i32 noundef 1)
  store i32 %528, ptr %21, align 4, !tbaa !8
  %529 = load i32, ptr %21, align 4, !tbaa !8
  %530 = icmp eq i32 %529, 0
  br i1 %530, label %531, label %533

531:                                              ; preds = %509
  %532 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %535

533:                                              ; preds = %509
  %534 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 285, ptr noundef @.str.4)
  store i32 20, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

535:                                              ; preds = %531
  %536 = load i8, ptr %6, align 1, !tbaa !5
  %537 = zext i8 %536 to i32
  %538 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.16, i32 noundef %537)
  %539 = load i8, ptr %6, align 1, !tbaa !5
  %540 = call i32 @disk_ioctl(i8 noundef zeroext %539, i8 noundef zeroext 0, ptr noundef null)
  store i32 %540, ptr %21, align 4, !tbaa !8
  %541 = load i32, ptr %21, align 4, !tbaa !8
  %542 = icmp eq i32 %541, 0
  br i1 %542, label %543, label %545

543:                                              ; preds = %535
  %544 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %547

545:                                              ; preds = %535
  %546 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 293, ptr noundef @.str.4)
  store i32 21, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

547:                                              ; preds = %543
  %548 = load ptr, ptr %19, align 8, !tbaa !10
  %549 = load i16, ptr %18, align 2, !tbaa !12
  %550 = zext i16 %549 to i32
  %551 = mul nsw i32 %550, 2
  %552 = sext i32 %551 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %548, i8 0, i64 %552, i1 false)
  %553 = load i8, ptr %6, align 1, !tbaa !5
  %554 = zext i8 %553 to i32
  %555 = load ptr, ptr %19, align 8, !tbaa !10
  %556 = ptrtoint ptr %555 to i32
  %557 = load i32, ptr %14, align 4, !tbaa !8
  %558 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.17, i32 noundef %554, i32 noundef %556, i32 noundef %557)
  %559 = load i8, ptr %6, align 1, !tbaa !5
  %560 = load ptr, ptr %19, align 8, !tbaa !10
  %561 = load i32, ptr %14, align 4, !tbaa !8
  %562 = zext i32 %561 to i64
  %563 = call i32 @disk_read(i8 noundef zeroext %559, ptr noundef %560, i64 noundef %562, i32 noundef 1)
  store i32 %563, ptr %21, align 4, !tbaa !8
  %564 = load i32, ptr %21, align 4, !tbaa !8
  %565 = icmp eq i32 %564, 0
  br i1 %565, label %566, label %568

566:                                              ; preds = %547
  %567 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %570

568:                                              ; preds = %547
  %569 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 302, ptr noundef @.str.4)
  store i32 22, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

570:                                              ; preds = %566
  %571 = load i8, ptr %6, align 1, !tbaa !5
  %572 = zext i8 %571 to i32
  %573 = load ptr, ptr %19, align 8, !tbaa !10
  %574 = load i16, ptr %18, align 2, !tbaa !12
  %575 = zext i16 %574 to i32
  %576 = sext i32 %575 to i64
  %577 = getelementptr inbounds i8, ptr %573, i64 %576
  %578 = ptrtoint ptr %577 to i32
  %579 = load i32, ptr %15, align 4, !tbaa !8
  %580 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.17, i32 noundef %572, i32 noundef %578, i32 noundef %579)
  %581 = load i8, ptr %6, align 1, !tbaa !5
  %582 = load ptr, ptr %19, align 8, !tbaa !10
  %583 = load i16, ptr %18, align 2, !tbaa !12
  %584 = zext i16 %583 to i32
  %585 = sext i32 %584 to i64
  %586 = getelementptr inbounds i8, ptr %582, i64 %585
  %587 = load i32, ptr %15, align 4, !tbaa !8
  %588 = zext i32 %587 to i64
  %589 = call i32 @disk_read(i8 noundef zeroext %581, ptr noundef %586, i64 noundef %588, i32 noundef 1)
  store i32 %589, ptr %21, align 4, !tbaa !8
  %590 = load i32, ptr %21, align 4, !tbaa !8
  %591 = icmp eq i32 %590, 0
  br i1 %591, label %592, label %594

592:                                              ; preds = %570
  %593 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.5)
  br label %596

594:                                              ; preds = %570
  %595 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 310, ptr noundef @.str.4)
  store i32 23, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

596:                                              ; preds = %592
  store i32 0, ptr %10, align 4, !tbaa !8
  %597 = load i32, ptr %17, align 4, !tbaa !8
  %598 = call i32 @pn(i32 noundef %597)
  br label %599

599:                                              ; preds = %619, %596
  %600 = load ptr, ptr %19, align 8, !tbaa !10
  %601 = load i32, ptr %10, align 4, !tbaa !8
  %602 = zext i32 %601 to i64
  %603 = getelementptr inbounds i8, ptr %600, i64 %602
  %604 = load i8, ptr %603, align 1, !tbaa !5
  %605 = zext i8 %604 to i32
  %606 = call i32 @pn(i32 noundef 0)
  %607 = trunc i32 %606 to i8
  %608 = zext i8 %607 to i32
  %609 = icmp eq i32 %605, %608
  br i1 %609, label %610, label %616

610:                                              ; preds = %599
  %611 = load i32, ptr %10, align 4, !tbaa !8
  %612 = load i16, ptr %18, align 2, !tbaa !12
  %613 = zext i16 %612 to i32
  %614 = mul nsw i32 %613, 2
  %615 = icmp ult i32 %611, %614
  br label %616

616:                                              ; preds = %610, %599
  %617 = phi i1 [ false, %599 ], [ %615, %610 ]
  br i1 %617, label %618, label %622

618:                                              ; preds = %616
  br label %619

619:                                              ; preds = %618
  %620 = load i32, ptr %10, align 4, !tbaa !8
  %621 = add i32 %620, 1
  store i32 %621, ptr %10, align 4, !tbaa !8
  br label %599, !llvm.loop !22

622:                                              ; preds = %616
  %623 = load i32, ptr %10, align 4, !tbaa !8
  %624 = load i16, ptr %18, align 2, !tbaa !12
  %625 = zext i16 %624 to i32
  %626 = mul nsw i32 %625, 2
  %627 = icmp eq i32 %623, %626
  br i1 %627, label %628, label %630

628:                                              ; preds = %622
  %629 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.18)
  br label %632

630:                                              ; preds = %622
  %631 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef @__func__.test_diskio, i32 noundef 317, ptr noundef @.str.19)
  store i32 24, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

632:                                              ; preds = %628
  br label %635

633:                                              ; preds = %455
  %634 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.23)
  br label %635

635:                                              ; preds = %633, %632
  %636 = load i32, ptr %17, align 4, !tbaa !8
  %637 = add i32 %636, 1
  store i32 %637, ptr %17, align 4, !tbaa !8
  %638 = load i32, ptr %11, align 4, !tbaa !8
  %639 = load i32, ptr %7, align 4, !tbaa !8
  %640 = call i32 (ptr, ...) @info_message_printf(ptr noundef @.str.26, i32 noundef %638, i32 noundef %639)
  br label %641

641:                                              ; preds = %635
  %642 = load i32, ptr %11, align 4, !tbaa !8
  %643 = add i32 %642, 1
  store i32 %643, ptr %11, align 4, !tbaa !8
  br label %36, !llvm.loop !23

644:                                              ; preds = %36
  store i32 0, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %645

645:                                              ; preds = %644, %630, %594, %568, %545, %533, %507, %453, %418, %394, %382, %337, %299, %273, %261, %207, %173, %152, %140, %74, %69, %53, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %646 = load i32, ptr %5, align 4
  ret i32 %646
}

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

declare i32 @info_message_printf(ptr noundef, ...) #2

declare i32 @error_message_printf(ptr noundef, i32 noundef, ptr noundef, ...) #2

declare zeroext i8 @disk_initialize(i8 noundef zeroext) #2

declare i32 @disk_ioctl(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @pn(i32 noundef) #0

declare i32 @disk_write(i8 noundef zeroext, ptr noundef, i64 noundef, i32 noundef) #2

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

declare i32 @disk_read(i8 noundef zeroext, ptr noundef, i64 noundef, i32 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: write) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !6, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


; 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"

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@__func__.test_diskio = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 25) i32 @test_diskio(i8 noundef zeroext %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %7 = zext i8 %0 to i32
  %8 = ptrtoint ptr %2 to i64
  %9 = trunc i64 %8 to i32
  %10 = tail call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str, i32 noundef %7, i32 noundef %1, i32 noundef %9, i32 noundef %3) #5
  %11 = icmp ult i32 %3, 520
  br i1 %11, label %28, label %.preheader

.preheader:                                       ; preds = %4
  %.not225 = icmp eq i32 %1, 0
  br i1 %.not225, label %.loopexit, label %.lr.ph228

.lr.ph228:                                        ; preds = %.preheader
  %12 = ptrtoint ptr %5 to i64
  %13 = trunc i64 %12 to i32
  %14 = ptrtoint ptr %6 to i64
  %15 = trunc i64 %14 to i32
  %16 = lshr i32 %3, 9
  %spec.store.select = call i32 @llvm.umin.i32(i32 %16, i32 4)
  %17 = icmp ugt i32 %3, 1023
  %18 = shl nuw nsw i32 %spec.store.select, 9
  %19 = zext nneg i32 %18 to i64
  %invariant.gep = getelementptr inbounds i8, ptr %2, i64 3
  %20 = ptrtoint ptr %invariant.gep to i64
  %21 = trunc i64 %20 to i32
  %22 = getelementptr inbounds i8, ptr %2, i64 5
  %23 = ptrtoint ptr %22 to i64
  %24 = trunc i64 %23 to i32
  %25 = getelementptr inbounds i8, ptr %2, i64 512
  %26 = ptrtoint ptr %25 to i64
  %27 = trunc i64 %26 to i32
  br label %30

28:                                               ; preds = %4
  %29 = tail call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 88, ptr noundef nonnull @.str.1) #5
  br label %.loopexit

30:                                               ; preds = %.lr.ph228, %241
  %.0199227 = phi i32 [ 1, %.lr.ph228 ], [ %245, %241 ]
  %.0200226 = phi i32 [ 1, %.lr.ph228 ], [ %243, %241 ]
  %31 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.2, i32 noundef %.0199227, i32 noundef %1) #5
  %32 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.3, i32 noundef %7) #5
  %33 = call zeroext i8 @disk_initialize(i8 noundef zeroext %0) #5
  %34 = and i8 %33, 1
  %.not205 = icmp eq i8 %34, 0
  br i1 %.not205, label %37, label %35

35:                                               ; preds = %30
  %36 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 98, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

37:                                               ; preds = %30
  %38 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %39 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.6) #5
  %40 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.7, i32 noundef %7, i32 noundef %13) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %41 = call i32 @disk_ioctl(i8 noundef zeroext %0, i8 noundef zeroext 1, ptr noundef nonnull %5) #5
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %47

43:                                               ; preds = %37
  %44 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = icmp ult i32 %45, 128
  br i1 %46, label %49, label %51

47:                                               ; preds = %37
  %48 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 111, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

49:                                               ; preds = %43
  %50 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 115, ptr noundef nonnull @.str.8) #5
  br label %.loopexit

51:                                               ; preds = %43
  %52 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.9, i32 noundef %7, i32 noundef %45) #5
  %53 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.10) #5
  %54 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.11, i32 noundef %7, i32 noundef %15) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  %55 = call i32 @disk_ioctl(i8 noundef zeroext %0, i8 noundef zeroext 3, ptr noundef nonnull %6) #5
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %.thread, label %59

.thread:                                          ; preds = %51
  %57 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %58 = load i32, ptr %6, align 4
  br label %63

59:                                               ; preds = %51
  %60 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 143, ptr noundef nonnull @.str.4) #5
  %61 = load i32, ptr %6, align 4
  %62 = icmp ugt i32 %61, 1
  br i1 %62, label %63, label %66

63:                                               ; preds = %.thread, %59
  %64 = phi i32 [ %58, %.thread ], [ %61, %59 ]
  %65 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.12, i32 noundef %64) #5
  br label %68

66:                                               ; preds = %59
  %67 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.13) #5
  br label %68

68:                                               ; preds = %66, %63
  %69 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.14) #5
  %70 = call i32 @pn(i32 noundef %.0200226)
  br label %71

71:                                               ; preds = %68, %71
  %indvars.iv = phi i64 [ 0, %68 ], [ %indvars.iv.next, %71 ]
  %72 = call i32 @pn(i32 noundef 0)
  %73 = trunc i32 %72 to i8
  %74 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  store i8 %73, ptr %74, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 512
  br i1 %exitcond.not, label %75, label %71, !llvm.loop !10

75:                                               ; preds = %71
  %76 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.15, i32 noundef %7, i32 noundef %9, i32 noundef 0) #5
  %77 = call i32 @disk_write(i8 noundef zeroext %0, ptr noundef nonnull %2, i64 noundef 0, i32 noundef 1) #5
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %84

79:                                               ; preds = %75
  %80 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %81 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.16, i32 noundef %7) #5
  %82 = call i32 @disk_ioctl(i8 noundef zeroext %0, i8 noundef zeroext 0, ptr noundef null) #5
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %86, label %91

84:                                               ; preds = %75
  %85 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 160, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

86:                                               ; preds = %79
  %87 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(512) %2, i8 0, i64 512, i1 false)
  %88 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.17, i32 noundef %7, i32 noundef %9, i32 noundef 0) #5
  %89 = call i32 @disk_read(i8 noundef zeroext %0, ptr noundef nonnull %2, i64 noundef 0, i32 noundef 1) #5
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %93, label %96

91:                                               ; preds = %79
  %92 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 168, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

93:                                               ; preds = %86
  %94 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %95 = call i32 @pn(i32 noundef %.0200226)
  br label %98

96:                                               ; preds = %86
  %97 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 177, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

98:                                               ; preds = %93, %104
  %indvars.iv235 = phi i64 [ 0, %93 ], [ %indvars.iv.next236, %104 ]
  %99 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv235
  %100 = load i8, ptr %99, align 1, !tbaa !9
  %101 = call i32 @pn(i32 noundef 0)
  %102 = trunc i32 %101 to i8
  %103 = icmp eq i8 %100, %102
  br i1 %103, label %104, label %.critedge.thread

104:                                              ; preds = %98
  %indvars.iv.next236 = add nuw nsw i64 %indvars.iv235, 1
  %exitcond238.not = icmp eq i64 %indvars.iv.next236, 512
  br i1 %exitcond238.not, label %.critedge, label %98, !llvm.loop !12

.critedge:                                        ; preds = %104
  %105 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.18) #5
  %106 = add nuw nsw i32 %.0200226, 1
  %107 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.20) #5
  br i1 %17, label %.lr.ph.preheader, label %.critedge3.thread

.critedge.thread:                                 ; preds = %98
  %108 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 184, ptr noundef nonnull @.str.19) #5
  br label %.loopexit

.lr.ph.preheader:                                 ; preds = %.critedge
  %109 = call i32 @pn(i32 noundef %106)
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv239 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next240, %.lr.ph ]
  %110 = call i32 @pn(i32 noundef 0)
  %111 = trunc i32 %110 to i8
  %112 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv239
  store i8 %111, ptr %112, align 1, !tbaa !9
  %indvars.iv.next240 = add nuw nsw i64 %indvars.iv239, 1
  %exitcond242.not = icmp eq i64 %indvars.iv.next240, %19
  br i1 %exitcond242.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph
  %113 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.21, i32 noundef %7, i32 noundef %9, i32 noundef 5, i32 noundef %spec.store.select) #5
  %114 = call i32 @disk_write(i8 noundef zeroext %0, ptr noundef nonnull %2, i64 noundef 5, i32 noundef %spec.store.select) #5
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %121

116:                                              ; preds = %._crit_edge
  %117 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %118 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.16, i32 noundef %7) #5
  %119 = call i32 @disk_ioctl(i8 noundef zeroext %0, i8 noundef zeroext 0, ptr noundef null) #5
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %123, label %128

121:                                              ; preds = %._crit_edge
  %122 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 199, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

123:                                              ; preds = %116
  %124 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %2, i8 0, i64 %19, i1 false)
  %125 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.22, i32 noundef %7, i32 noundef %9, i32 noundef 5, i32 noundef %spec.store.select) #5
  %126 = call i32 @disk_read(i8 noundef zeroext %0, ptr noundef nonnull %2, i64 noundef 5, i32 noundef %spec.store.select) #5
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %.lr.ph216.preheader, label %132

128:                                              ; preds = %116
  %129 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 207, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

.lr.ph216.preheader:                              ; preds = %123
  %130 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %131 = call i32 @pn(i32 noundef %106)
  br label %.lr.ph216

132:                                              ; preds = %123
  %133 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 216, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

.lr.ph216:                                        ; preds = %.lr.ph216.preheader, %139
  %indvars.iv243 = phi i64 [ 0, %.lr.ph216.preheader ], [ %indvars.iv.next244, %139 ]
  %134 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv243
  %135 = load i8, ptr %134, align 1, !tbaa !9
  %136 = call i32 @pn(i32 noundef 0)
  %137 = trunc i32 %136 to i8
  %138 = icmp eq i8 %135, %137
  br i1 %138, label %139, label %.critedge3

139:                                              ; preds = %.lr.ph216
  %indvars.iv.next244 = add nuw nsw i64 %indvars.iv243, 1
  %exitcond247.not = icmp eq i64 %indvars.iv.next244, %19
  br i1 %exitcond247.not, label %.critedge3.thread, label %.lr.ph216, !llvm.loop !14

.critedge3:                                       ; preds = %.lr.ph216
  %140 = trunc nuw nsw i64 %indvars.iv243 to i32
  %141 = icmp eq i32 %18, %140
  br i1 %141, label %.critedge3.thread, label %142

142:                                              ; preds = %.critedge3
  %143 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 223, ptr noundef nonnull @.str.19) #5
  br label %.loopexit

.critedge3.thread:                                ; preds = %139, %.critedge, %.critedge3
  %.str.23.sink = phi ptr [ @.str.18, %.critedge3 ], [ @.str.23, %.critedge ], [ @.str.18, %139 ]
  %144 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull %.str.23.sink) #5
  %145 = add nuw nsw i32 %.0200226, 2
  %146 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.24) #5
  %147 = call i32 @pn(i32 noundef %145)
  br label %148

148:                                              ; preds = %.critedge3.thread, %148
  %indvars.iv248 = phi i64 [ 0, %.critedge3.thread ], [ %indvars.iv.next249, %148 ]
  %149 = call i32 @pn(i32 noundef 0)
  %150 = trunc i32 %149 to i8
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %indvars.iv248
  store i8 %150, ptr %gep, align 1, !tbaa !9
  %indvars.iv.next249 = add nuw nsw i64 %indvars.iv248, 1
  %exitcond251.not = icmp eq i64 %indvars.iv.next249, 512
  br i1 %exitcond251.not, label %151, label %148, !llvm.loop !15

151:                                              ; preds = %148
  %152 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.15, i32 noundef %7, i32 noundef %21, i32 noundef 5) #5
  %153 = call i32 @disk_write(i8 noundef zeroext %0, ptr noundef nonnull %invariant.gep, i64 noundef 5, i32 noundef 1) #5
  %154 = icmp eq i32 %153, 0
  br i1 %154, label %155, label %160

155:                                              ; preds = %151
  %156 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %157 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.16, i32 noundef %7) #5
  %158 = call i32 @disk_ioctl(i8 noundef zeroext %0, i8 noundef zeroext 0, ptr noundef null) #5
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %162, label %167

160:                                              ; preds = %151
  %161 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 239, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

162:                                              ; preds = %155
  %163 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(512) %22, i8 0, i64 512, i1 false)
  %164 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.17, i32 noundef %7, i32 noundef %24, i32 noundef 5) #5
  %165 = call i32 @disk_read(i8 noundef zeroext %0, ptr noundef nonnull %22, i64 noundef 5, i32 noundef 1) #5
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %169, label %172

167:                                              ; preds = %155
  %168 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 247, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

169:                                              ; preds = %162
  %170 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %171 = call i32 @pn(i32 noundef %145)
  br label %174

172:                                              ; preds = %162
  %173 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 256, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

174:                                              ; preds = %169, %179
  %indvars.iv252 = phi i64 [ 0, %169 ], [ %indvars.iv.next253, %179 ]
  %gep222 = getelementptr inbounds i8, ptr %22, i64 %indvars.iv252
  %175 = load i8, ptr %gep222, align 1, !tbaa !9
  %176 = call i32 @pn(i32 noundef 0)
  %177 = trunc i32 %176 to i8
  %178 = icmp eq i8 %175, %177
  br i1 %178, label %179, label %.critedge5.thread

179:                                              ; preds = %174
  %indvars.iv.next253 = add nuw nsw i64 %indvars.iv252, 1
  %exitcond255.not = icmp eq i64 %indvars.iv.next253, 512
  br i1 %exitcond255.not, label %.critedge5, label %174, !llvm.loop !16

.critedge5:                                       ; preds = %179
  %180 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.18) #5
  %181 = add i32 %.0200226, 3
  %182 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.25) #5
  %183 = load i32, ptr %5, align 4, !tbaa !5
  %184 = icmp ugt i32 %183, 8388735
  br i1 %184, label %186, label %241

.critedge5.thread:                                ; preds = %174
  %185 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 263, ptr noundef nonnull @.str.19) #5
  br label %.loopexit

186:                                              ; preds = %.critedge5
  %187 = call i32 @pn(i32 noundef %181)
  br label %188

188:                                              ; preds = %186, %188
  %indvars.iv256 = phi i64 [ 0, %186 ], [ %indvars.iv.next257, %188 ]
  %189 = call i32 @pn(i32 noundef 0)
  %190 = trunc i32 %189 to i8
  %191 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv256
  store i8 %190, ptr %191, align 1, !tbaa !9
  %indvars.iv.next257 = add nuw nsw i64 %indvars.iv256, 1
  %exitcond259.not = icmp eq i64 %indvars.iv.next257, 1024
  br i1 %exitcond259.not, label %192, label %188, !llvm.loop !17

192:                                              ; preds = %188
  %193 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.15, i32 noundef %7, i32 noundef %9, i32 noundef 6) #5
  %194 = call i32 @disk_write(i8 noundef zeroext %0, ptr noundef nonnull %2, i64 noundef 6, i32 noundef 1) #5
  %195 = icmp eq i32 %194, 0
  br i1 %195, label %196, label %201

196:                                              ; preds = %192
  %197 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %198 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.15, i32 noundef %7, i32 noundef %27, i32 noundef 8388614) #5
  %199 = call i32 @disk_write(i8 noundef zeroext %0, ptr noundef nonnull %25, i64 noundef 8388614, i32 noundef 1) #5
  %200 = icmp eq i32 %199, 0
  br i1 %200, label %203, label %208

201:                                              ; preds = %192
  %202 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 277, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

203:                                              ; preds = %196
  %204 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %205 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.16, i32 noundef %7) #5
  %206 = call i32 @disk_ioctl(i8 noundef zeroext %0, i8 noundef zeroext 0, ptr noundef null) #5
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %210, label %215

208:                                              ; preds = %196
  %209 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 285, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

210:                                              ; preds = %203
  %211 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1024) %2, i8 0, i64 1024, i1 false)
  %212 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.17, i32 noundef %7, i32 noundef %9, i32 noundef 6) #5
  %213 = call i32 @disk_read(i8 noundef zeroext %0, ptr noundef nonnull %2, i64 noundef 6, i32 noundef 1) #5
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %217, label %222

215:                                              ; preds = %203
  %216 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 293, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

217:                                              ; preds = %210
  %218 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %219 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.17, i32 noundef %7, i32 noundef %27, i32 noundef 8388614) #5
  %220 = call i32 @disk_read(i8 noundef zeroext %0, ptr noundef nonnull %25, i64 noundef 8388614, i32 noundef 1) #5
  %221 = icmp eq i32 %220, 0
  br i1 %221, label %224, label %227

222:                                              ; preds = %210
  %223 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 302, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

224:                                              ; preds = %217
  %225 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.5) #5
  %226 = call i32 @pn(i32 noundef %181)
  br label %229

227:                                              ; preds = %217
  %228 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 310, ptr noundef nonnull @.str.4) #5
  br label %.loopexit

229:                                              ; preds = %229, %224
  %indvars.iv260 = phi i64 [ %indvars.iv.next261, %229 ], [ 0, %224 ]
  %230 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv260
  %231 = load i8, ptr %230, align 1, !tbaa !9
  %232 = call i32 @pn(i32 noundef 0)
  %233 = trunc i32 %232 to i8
  %234 = icmp eq i8 %231, %233
  %235 = icmp ult i64 %indvars.iv260, 1024
  %236 = and i1 %235, %234
  %indvars.iv.next261 = add nuw nsw i64 %indvars.iv260, 1
  br i1 %236, label %229, label %237, !llvm.loop !18

237:                                              ; preds = %229
  %238 = icmp eq i64 %indvars.iv260, 1024
  br i1 %238, label %241, label %239

239:                                              ; preds = %237
  %240 = call i32 (ptr, i32, ptr, ...) @error_message_printf(ptr noundef nonnull @__func__.test_diskio, i32 noundef 317, ptr noundef nonnull @.str.19) #5
  br label %.loopexit

241:                                              ; preds = %.critedge5, %237
  %.str.23.sink265 = phi ptr [ @.str.18, %237 ], [ @.str.23, %.critedge5 ]
  %242 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull %.str.23.sink265) #5
  %243 = add i32 %.0200226, 4
  %244 = call i32 (ptr, ...) @info_message_printf(ptr noundef nonnull @.str.26, i32 noundef %.0199227, i32 noundef %1) #5
  %245 = add i32 %.0199227, 1
  %.not = icmp ugt i32 %245, %1
  br i1 %.not, label %.loopexit, label %30, !llvm.loop !19

.loopexit:                                        ; preds = %241, %.preheader, %239, %227, %222, %215, %208, %201, %.critedge5.thread, %172, %167, %160, %142, %132, %128, %121, %.critedge.thread, %96, %91, %84, %49, %47, %35, %28
  %.0 = phi i32 [ 1, %28 ], [ 2, %35 ], [ 4, %49 ], [ 24, %239 ], [ 23, %227 ], [ 22, %222 ], [ 21, %215 ], [ 20, %208 ], [ 19, %201 ], [ 18, %.critedge5.thread ], [ 17, %172 ], [ 16, %167 ], [ 15, %160 ], [ 14, %142 ], [ 13, %132 ], [ 12, %128 ], [ 11, %121 ], [ 10, %.critedge.thread ], [ 8, %96 ], [ 7, %91 ], [ 6, %84 ], [ 3, %47 ], [ 0, %.preheader ], [ 0, %241 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  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 i32 @info_message_printf(ptr noundef, ...) local_unnamed_addr #2

declare i32 @error_message_printf(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #2

declare zeroext i8 @disk_initialize(i8 noundef zeroext) local_unnamed_addr #2

declare i32 @disk_ioctl(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @pn(i32 noundef) local_unnamed_addr #0

declare i32 @disk_write(i8 noundef zeroext, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @disk_read(i8 noundef zeroext, ptr noundef, i64 noundef, i32 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #4

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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


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