; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/NIFTI/src/nifti/niftilib (nifti1_tool)

; 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.field_s = type { i32, i32, i32, i32, [20 x i8] }
%struct.nt_opts = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x i32], [8 x i32], i32, i32, i32, i32, ptr, %struct.str_list, %struct.int_list, %struct.str_list, %struct.str_list, %struct.str_list, [2048 x i8] }
%struct.int_list = type { i32, ptr }
%struct.str_list = type { i32, ptr }
%struct.nifti_image = type { i32, i32, i32, i32, i32, i32, i32, i32, [8 x i32], i64, i32, i32, float, float, float, float, float, float, float, [8 x float], float, float, float, float, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, float, float, %struct.mat44, %struct.mat44, %struct.mat44, %struct.mat44, float, i32, i32, i32, i32, float, float, float, [16 x i8], [80 x i8], [24 x i8], ptr, ptr, i32, i32, i32, ptr, i32, ptr, i32 }
%struct.mat44 = type { [4 x [4 x float]] }
%struct.nifti_1_header = type { i32, [10 x i8], [18 x i8], i32, i16, i8, i8, [8 x i16], float, float, float, i16, i16, i16, i16, [8 x float], float, float, float, i16, i8, i8, float, float, float, float, i32, i32, [80 x i8], [24 x i8], i16, i16, float, float, float, float, float, float, [4 x float], [4 x float], [4 x float], [16 x i8], [4 x i8] }

@g_hdr_fields = external hidden global [43 x %struct.field_s], align 16
@stderr = external global ptr, align 8
@g_debug = external hidden global i32, align 4
@.str.230 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.232 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.274 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [8 x i8], align 1
@__const.act_mod_hdrs.func = external hidden unnamed_addr constant [13 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.285 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.286 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.288 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @act_mod_hdrs(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [13 x i8], align 1
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 13, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %10, ptr align 1 @__const.act_mod_hdrs.func, i64 13, i1 false)
  %12 = load i32, ptr @g_debug, align 4, !tbaa !9
  %13 = icmp sgt i32 %12, 2
  br i1 %13, label %14, label %25

14:                                               ; preds = %1
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.nt_opts, ptr %16, i32 0, i32 31
  %18 = getelementptr inbounds %struct.str_list, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.nt_opts, ptr %20, i32 0, i32 33
  %22 = getelementptr inbounds %struct.str_list, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !14
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str.283, i32 noundef %19, i32 noundef %23) #6
  br label %25

25:                                               ; preds = %14, %1
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.nt_opts, ptr %26, i32 0, i32 31
  %28 = getelementptr inbounds %struct.str_list, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !11
  %30 = icmp sle i32 %29, 0
  br i1 %30, label %37, label %31

31:                                               ; preds = %25
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.nt_opts, ptr %32, i32 0, i32 33
  %34 = getelementptr inbounds %struct.str_list, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !14
  %36 = icmp sle i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %31, %25
  store i32 0, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

38:                                               ; preds = %31
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %237, %38
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.nt_opts, ptr %41, i32 0, i32 33
  %43 = getelementptr inbounds %struct.str_list, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !14
  %45 = icmp slt i32 %40, %44
  br i1 %45, label %46, label %240

46:                                               ; preds = %39
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.nt_opts, ptr %47, i32 0, i32 33
  %49 = getelementptr inbounds %struct.str_list, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds ptr, ptr %50, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  store ptr %54, ptr %8, align 8, !tbaa !5
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = call i32 @nifti_is_gzfile(ptr noundef %55)
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %62

58:                                               ; preds = %46
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef @.str.284, ptr noundef %60) #6
  br label %237

62:                                               ; preds = %46
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = call ptr @nt_read_header(ptr noundef %63, ptr noundef %64, ptr noundef %7, i32 noundef 0)
  store ptr %65, ptr %4, align 8, !tbaa !5
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %69, label %68

68:                                               ; preds = %62
  store i32 1, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

69:                                               ; preds = %62
  %70 = load i32, ptr @g_debug, align 4, !tbaa !9
  %71 = icmp sgt i32 %70, 1
  br i1 %71, label %72, label %87

72:                                               ; preds = %69
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.nt_opts, ptr %74, i32 0, i32 31
  %76 = getelementptr inbounds %struct.str_list, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !11
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.285, i32 noundef %77, ptr noundef %78) #6
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call i32 @nifti_hdr_looks_good(ptr noundef %81)
  %83 = icmp ne i32 %82, 0
  %84 = zext i1 %83 to i64
  %85 = select i1 %83, ptr @.str.275, ptr @.str.276
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef @.str.274, ptr noundef %85) #6
  br label %87

87:                                               ; preds = %72, %69
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = call i32 @modify_all_fields(ptr noundef %88, ptr noundef %89, ptr noundef @g_hdr_fields, i32 noundef 43)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %94

92:                                               ; preds = %87
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %93) #6
  store i32 1, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

94:                                               ; preds = %87
  store ptr null, ptr %9, align 8, !tbaa !5
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.nt_opts, ptr %95, i32 0, i32 28
  %97 = load ptr, ptr %96, align 8, !tbaa !16
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %174

99:                                               ; preds = %94
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call ptr @nt_image_read(ptr noundef %100, ptr noundef %101, i32 noundef 1)
  store ptr %102, ptr %5, align 8, !tbaa !5
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %109, label %105

105:                                              ; preds = %99
  %106 = load ptr, ptr @stderr, align 8, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.286, ptr noundef %107) #6
  store i32 1, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

109:                                              ; preds = %99
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.nt_opts, ptr %110, i32 0, i32 26
  %112 = load i32, ptr %111, align 8, !tbaa !17
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %129

114:                                              ; preds = %109
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.nt_opts, ptr %116, i32 0, i32 34
  %118 = getelementptr inbounds [2048 x i8], ptr %117, i64 0, i64 0
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.nt_opts, ptr %119, i32 0, i32 34
  %121 = getelementptr inbounds [2048 x i8], ptr %120, i64 0, i64 0
  %122 = call i64 @strlen(ptr noundef %121) #7
  %123 = trunc i64 %122 to i32
  %124 = call i32 @nifti_add_extension(ptr noundef %115, ptr noundef %118, i32 noundef %123, i32 noundef 6)
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %129

126:                                              ; preds = %114
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.230) #6
  br label %129

129:                                              ; preds = %126, %114, %109
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.nt_opts, ptr %131, i32 0, i32 28
  %133 = load ptr, ptr %132, align 8, !tbaa !16
  %134 = call i32 @nifti_set_filenames(ptr noundef %130, ptr noundef %133, i32 noundef 1, i32 noundef 1)
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %144

136:                                              ; preds = %129
  %137 = load ptr, ptr @stderr, align 8, !tbaa !5
  %138 = getelementptr inbounds [13 x i8], ptr %10, i64 0, i64 0
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.nt_opts, ptr %139, i32 0, i32 28
  %141 = load ptr, ptr %140, align 8, !tbaa !16
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.287, ptr noundef %138, ptr noundef @.str.288, ptr noundef %141) #6
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  call void @nifti_image_free(ptr noundef %143)
  store i32 1, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

144:                                              ; preds = %129
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.nifti_image, ptr %145, i32 0, i32 55
  %147 = load ptr, ptr %146, align 8, !tbaa !18
  %148 = call ptr @nifti_strdup(ptr noundef %147)
  store ptr %148, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %149, ptr %8, align 8, !tbaa !5
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = call i32 @nifti_image_write_status(ptr noundef %150)
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %160

153:                                              ; preds = %144
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.nifti_image, ptr %155, i32 0, i32 55
  %157 = load ptr, ptr %156, align 8, !tbaa !18
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.232, ptr noundef %157) #6
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  call void @nifti_image_free(ptr noundef %159)
  store i32 1, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

160:                                              ; preds = %144
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.nifti_image, ptr %161, i32 0, i32 57
  %163 = load i32, ptr %162, align 8, !tbaa !23
  %164 = icmp sge i32 %163, 348
  br i1 %164, label %165, label %172

165:                                              ; preds = %160
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.nifti_image, ptr %166, i32 0, i32 57
  %168 = load i32, ptr %167, align 8, !tbaa !23
  %169 = sitofp i32 %168 to float
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.nifti_1_header, ptr %170, i32 0, i32 16
  store float %169, ptr %171, align 4, !tbaa !24
  br label %172

172:                                              ; preds = %165, %160
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  call void @nifti_image_free(ptr noundef %173)
  br label %231

174:                                              ; preds = %94
  %175 = load i32, ptr %7, align 4, !tbaa !9
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %230

177:                                              ; preds = %174
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.nifti_1_header, ptr %179, i32 0, i32 42
  %181 = getelementptr inbounds [4 x i8], ptr %180, i64 0, i64 0
  %182 = load i8, ptr %181, align 4, !tbaa !27
  %183 = sext i8 %182 to i32
  %184 = icmp eq i32 %183, 110
  br i1 %184, label %185, label %227

185:                                              ; preds = %177
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.nifti_1_header, ptr %186, i32 0, i32 42
  %188 = getelementptr inbounds [4 x i8], ptr %187, i64 0, i64 3
  %189 = load i8, ptr %188, align 1, !tbaa !27
  %190 = sext i8 %189 to i32
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %192, label %227

192:                                              ; preds = %185
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.nifti_1_header, ptr %193, i32 0, i32 42
  %195 = getelementptr inbounds [4 x i8], ptr %194, i64 0, i64 1
  %196 = load i8, ptr %195, align 1, !tbaa !27
  %197 = sext i8 %196 to i32
  %198 = icmp eq i32 %197, 105
  br i1 %198, label %206, label %199

199:                                              ; preds = %192
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.nifti_1_header, ptr %200, i32 0, i32 42
  %202 = getelementptr inbounds [4 x i8], ptr %201, i64 0, i64 1
  %203 = load i8, ptr %202, align 1, !tbaa !27
  %204 = sext i8 %203 to i32
  %205 = icmp eq i32 %204, 43
  br i1 %205, label %206, label %227

206:                                              ; preds = %199, %192
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.nifti_1_header, ptr %207, i32 0, i32 42
  %209 = getelementptr inbounds [4 x i8], ptr %208, i64 0, i64 2
  %210 = load i8, ptr %209, align 2, !tbaa !27
  %211 = sext i8 %210 to i32
  %212 = icmp sge i32 %211, 49
  br i1 %212, label %213, label %227

213:                                              ; preds = %206
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.nifti_1_header, ptr %214, i32 0, i32 42
  %216 = getelementptr inbounds [4 x i8], ptr %215, i64 0, i64 2
  %217 = load i8, ptr %216, align 2, !tbaa !27
  %218 = sext i8 %217 to i32
  %219 = icmp sle i32 %218, 57
  br i1 %219, label %220, label %227

220:                                              ; preds = %213
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.nifti_1_header, ptr %221, i32 0, i32 42
  %223 = getelementptr inbounds [4 x i8], ptr %222, i64 0, i64 2
  %224 = load i8, ptr %223, align 2, !tbaa !27
  %225 = sext i8 %224 to i32
  %226 = sub nsw i32 %225, 48
  br label %228

227:                                              ; preds = %213, %206, %199, %185, %177
  br label %228

228:                                              ; preds = %227, %220
  %229 = phi i32 [ %226, %220 ], [ 0, %227 ]
  call void @swap_nifti_header(ptr noundef %178, i32 noundef %229)
  br label %230

230:                                              ; preds = %228, %174
  br label %231

231:                                              ; preds = %230, %172
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = call i32 @write_hdr_to_file(ptr noundef %232, ptr noundef %233)
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %235) #6
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %236) #6
  br label %237

237:                                              ; preds = %231, %58
  %238 = load i32, ptr %6, align 4, !tbaa !9
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %6, align 4, !tbaa !9
  br label %39, !llvm.loop !28

240:                                              ; preds = %39
  store i32 0, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %241

241:                                              ; preds = %240, %153, %136, %105, %92, %68, %37
  call void @llvm.lifetime.end.p0(i64 13, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %242 = load i32, ptr %2, align 4
  ret i32 %242
}

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @nt_image_read(ptr noundef, ptr noundef, i32 noundef) #1

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

declare void @nifti_image_free(ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

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

declare i32 @nifti_image_write_status(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @nt_read_header(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare i32 @nifti_hdr_looks_good(ptr noundef) #4

declare i32 @nifti_is_gzfile(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @modify_all_fields(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare ptr @nifti_strdup(ptr noundef) #4

declare void @swap_nifti_header(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @write_hdr_to_file(ptr noundef, ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 208}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !7, i64 88, !7, i64 120, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !6, i64 168, !13, i64 176, !13, i64 192, !13, i64 208, !13, i64 224, !13, i64 240, !7, i64 256}
!13 = !{!"", !10, i64 0, !6, i64 8}
!14 = !{!12, !10, i64 240}
!15 = !{!12, !6, i64 248}
!16 = !{!12, !6, i64 168}
!17 = !{!12, !10, i64 160}
!18 = !{!19, !6, i64 632}
!19 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !20, i64 64, !10, i64 72, !10, i64 76, !21, i64 80, !21, i64 84, !21, i64 88, !21, i64 92, !21, i64 96, !21, i64 100, !21, i64 104, !7, i64 108, !21, i64 140, !21, i64 144, !21, i64 148, !21, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !21, i64 188, !21, i64 192, !21, i64 196, !21, i64 200, !21, i64 204, !21, i64 208, !21, i64 212, !21, i64 216, !22, i64 220, !22, i64 284, !22, i64 348, !22, i64 412, !21, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !21, i64 496, !21, i64 500, !21, i64 504, !7, i64 508, !7, i64 524, !7, i64 604, !6, i64 632, !6, i64 640, !10, i64 648, !10, i64 652, !10, i64 656, !6, i64 664, !10, i64 672, !6, i64 680, !10, i64 688}
!20 = !{!"long", !7, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = !{!"", !7, i64 0}
!23 = !{!19, !10, i64 648}
!24 = !{!25, !21, i64 108}
!25 = !{!"nifti_1_header", !10, i64 0, !7, i64 4, !7, i64 14, !10, i64 32, !26, i64 36, !7, i64 38, !7, i64 39, !7, i64 40, !21, i64 56, !21, i64 60, !21, i64 64, !26, i64 68, !26, i64 70, !26, i64 72, !26, i64 74, !7, i64 76, !21, i64 108, !21, i64 112, !21, i64 116, !26, i64 120, !7, i64 122, !7, i64 123, !21, i64 124, !21, i64 128, !21, i64 132, !21, i64 136, !10, i64 140, !10, i64 144, !7, i64 148, !7, i64 228, !26, i64 252, !26, i64 254, !21, i64 256, !21, i64 260, !21, i64 264, !21, i64 268, !21, i64 272, !21, i64 276, !7, i64 280, !7, i64 296, !7, i64 312, !7, i64 328, !7, i64 344}
!26 = !{!"short", !7, i64 0}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


; 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.field_s = type { i32, i32, i32, i32, [20 x i8] }

@g_hdr_fields = external hidden global [43 x %struct.field_s], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@g_debug = external hidden local_unnamed_addr global i32, align 4
@.str.230 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.232 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.274 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.275 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [8 x i8], align 1
@__const.act_mod_hdrs.func = external hidden unnamed_addr constant [13 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.285 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.286 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.288 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @act_mod_hdrs(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca i32, align 4
  %3 = alloca [13 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 13, ptr nonnull %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(13) %3, ptr noundef nonnull align 1 dereferenceable(13) @__const.act_mod_hdrs.func, i64 13, i1 false)
  %4 = load i32, ptr @g_debug, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 2
  br i1 %5, label %6, label %13

6:                                                ; preds = %1
  %7 = load ptr, ptr @stderr, align 8, !tbaa !9
  %8 = getelementptr inbounds i8, ptr %0, i64 208
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %0, i64 240
  %11 = load i32, ptr %10, align 8, !tbaa !14
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.283, i32 noundef %9, i32 noundef %11) #8
  br label %13

13:                                               ; preds = %6, %1
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = icmp slt i32 %15, 1
  br i1 %16, label %.loopexit, label %17

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 240
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %20 = icmp slt i32 %19, 1
  br i1 %20, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 248
  %22 = getelementptr inbounds i8, ptr %0, i64 168
  %23 = getelementptr inbounds i8, ptr %0, i64 160
  %24 = getelementptr inbounds i8, ptr %0, i64 256
  br label %25

25:                                               ; preds = %.lr.ph, %113
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %113 ]
  %26 = load ptr, ptr %21, align 8, !tbaa !15
  %27 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call i32 @nifti_is_gzfile(ptr noundef %28) #7
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %33, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr @stderr, align 8, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.284, ptr noundef %28) #8
  br label %113

33:                                               ; preds = %25
  %34 = call ptr @nt_read_header(ptr noundef nonnull %0, ptr noundef %28, ptr noundef nonnull %2, i32 noundef 0)
  %.not62 = icmp eq ptr %34, null
  br i1 %.not62, label %.loopexit, label %35

35:                                               ; preds = %33
  %36 = load i32, ptr @g_debug, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 1
  br i1 %37, label %38, label %46

38:                                               ; preds = %35
  %39 = load ptr, ptr @stderr, align 8, !tbaa !9
  %40 = load i32, ptr %14, align 8, !tbaa !11
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.285, i32 noundef %40, ptr noundef %28) #8
  %42 = load ptr, ptr @stderr, align 8, !tbaa !9
  %43 = call i32 @nifti_hdr_looks_good(ptr noundef nonnull %34) #7
  %.not63 = icmp eq i32 %43, 0
  %44 = select i1 %.not63, ptr @.str.276, ptr @.str.275
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef nonnull @.str.274, ptr noundef nonnull %44) #8
  br label %46

46:                                               ; preds = %38, %35
  %47 = call i32 @modify_all_fields(ptr noundef nonnull %34, ptr noundef nonnull %0, ptr noundef nonnull @g_hdr_fields, i32 noundef 43)
  %.not64 = icmp eq i32 %47, 0
  br i1 %.not64, label %49, label %48

48:                                               ; preds = %46
  call void @free(ptr noundef nonnull %34) #7
  br label %.loopexit

49:                                               ; preds = %46
  %50 = load ptr, ptr %22, align 8, !tbaa !16
  %.not65 = icmp eq ptr %50, null
  br i1 %.not65, label %90, label %51

51:                                               ; preds = %49
  %52 = call ptr @nt_image_read(ptr noundef nonnull %0, ptr noundef %28, i32 noundef 1)
  %.not67 = icmp eq ptr %52, null
  br i1 %.not67, label %53, label %56

53:                                               ; preds = %51
  %54 = load ptr, ptr @stderr, align 8, !tbaa !9
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.286, ptr noundef %28) #8
  br label %.loopexit

56:                                               ; preds = %51
  %57 = load i32, ptr %23, align 8, !tbaa !17
  %.not68 = icmp eq i32 %57, 0
  br i1 %.not68, label %65, label %58

58:                                               ; preds = %56
  %59 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %24) #9
  %60 = trunc i64 %59 to i32
  %61 = call i32 @nifti_add_extension(ptr noundef nonnull %52, ptr noundef nonnull %24, i32 noundef %60, i32 noundef 6) #7
  %.not69 = icmp eq i32 %61, 0
  br i1 %.not69, label %65, label %62

62:                                               ; preds = %58
  %63 = load ptr, ptr @stderr, align 8, !tbaa !9
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.230) #8
  br label %65

65:                                               ; preds = %62, %58, %56
  %66 = load ptr, ptr %22, align 8, !tbaa !16
  %67 = call i32 @nifti_set_filenames(ptr noundef nonnull %52, ptr noundef %66, i32 noundef 1, i32 noundef 1) #7
  %.not70 = icmp eq i32 %67, 0
  br i1 %.not70, label %72, label %68

68:                                               ; preds = %65
  %69 = load ptr, ptr @stderr, align 8, !tbaa !9
  %70 = load ptr, ptr %22, align 8, !tbaa !16
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str.287, ptr noundef nonnull %3, ptr noundef nonnull @.str.288, ptr noundef %70) #8
  call void @nifti_image_free(ptr noundef nonnull %52) #7
  br label %.loopexit

72:                                               ; preds = %65
  %73 = getelementptr inbounds i8, ptr %52, i64 632
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = call ptr @nifti_strdup(ptr noundef %74) #7
  %76 = call i32 @nifti_image_write_status(ptr noundef nonnull %52) #7
  %.not71 = icmp eq i32 %76, 0
  br i1 %.not71, label %82, label %77

77:                                               ; preds = %72
  %78 = getelementptr inbounds i8, ptr %52, i64 632
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = load ptr, ptr %78, align 8, !tbaa !18
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.232, ptr noundef %80) #8
  call void @nifti_image_free(ptr noundef nonnull %52) #7
  br label %.loopexit

82:                                               ; preds = %72
  %83 = getelementptr inbounds i8, ptr %52, i64 648
  %84 = load i32, ptr %83, align 8, !tbaa !23
  %85 = icmp sgt i32 %84, 347
  br i1 %85, label %86, label %89

86:                                               ; preds = %82
  %87 = uitofp nneg i32 %84 to float
  %88 = getelementptr inbounds i8, ptr %34, i64 108
  store float %87, ptr %88, align 4, !tbaa !24
  br label %89

89:                                               ; preds = %86, %82
  call void @nifti_image_free(ptr noundef nonnull %52) #7
  br label %111

90:                                               ; preds = %49
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %.not66 = icmp eq i32 %91, 0
  br i1 %.not66, label %111, label %92

92:                                               ; preds = %90
  %93 = getelementptr inbounds i8, ptr %34, i64 344
  %94 = load i8, ptr %93, align 4, !tbaa !27
  %95 = icmp eq i8 %94, 110
  br i1 %95, label %96, label %109

96:                                               ; preds = %92
  %97 = getelementptr inbounds i8, ptr %34, i64 347
  %98 = load i8, ptr %97, align 1, !tbaa !27
  %99 = icmp eq i8 %98, 0
  br i1 %99, label %100, label %109

100:                                              ; preds = %96
  %101 = getelementptr inbounds i8, ptr %34, i64 345
  %102 = load i8, ptr %101, align 1, !tbaa !27
  switch i8 %102, label %109 [
    i8 105, label %103
    i8 43, label %103
  ]

103:                                              ; preds = %100, %100
  %104 = getelementptr inbounds i8, ptr %34, i64 346
  %105 = load i8, ptr %104, align 2, !tbaa !27
  %106 = add i8 %105, -49
  %or.cond = icmp ult i8 %106, 9
  br i1 %or.cond, label %107, label %109

107:                                              ; preds = %103
  %narrow = add nsw i8 %105, -48
  %108 = zext nneg i8 %narrow to i32
  br label %109

109:                                              ; preds = %100, %92, %96, %103, %107
  %110 = phi i32 [ %108, %107 ], [ 0, %103 ], [ 0, %96 ], [ 0, %92 ], [ 0, %100 ]
  call void @swap_nifti_header(ptr noundef nonnull %34, i32 noundef %110) #7
  br label %111

111:                                              ; preds = %90, %109, %89
  %.054 = phi ptr [ %75, %89 ], [ %28, %109 ], [ %28, %90 ]
  %.0 = phi ptr [ %75, %89 ], [ null, %109 ], [ null, %90 ]
  %112 = call i32 @write_hdr_to_file(ptr noundef nonnull %34, ptr noundef %.054)
  call void @free(ptr noundef %.0) #7
  call void @free(ptr noundef nonnull %34) #7
  br label %113

113:                                              ; preds = %111, %30
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %114 = load i32, ptr %18, align 8, !tbaa !14
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next, %115
  br i1 %116, label %25, label %.loopexit, !llvm.loop !28

.loopexit:                                        ; preds = %33, %113, %13, %17, %77, %68, %53, %48
  %.056 = phi i32 [ 1, %48 ], [ 1, %68 ], [ 1, %77 ], [ 1, %53 ], [ 0, %17 ], [ 0, %13 ], [ 1, %33 ], [ 0, %113 ]
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  ret i32 %.056
}

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @nt_image_read(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare void @nifti_image_free(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

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

declare i32 @nifti_image_write_status(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @nt_read_header(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @nifti_hdr_looks_good(ptr noundef) local_unnamed_addr #4

declare i32 @nifti_is_gzfile(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @modify_all_fields(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @nifti_strdup(ptr noundef) local_unnamed_addr #4

declare void @swap_nifti_header(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @write_hdr_to_file(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 208}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !7, i64 88, !7, i64 120, !6, i64 152, !6, i64 156, !6, i64 160, !6, i64 164, !10, i64 168, !13, i64 176, !13, i64 192, !13, i64 208, !13, i64 224, !13, i64 240, !7, i64 256}
!13 = !{!"", !6, i64 0, !10, i64 8}
!14 = !{!12, !6, i64 240}
!15 = !{!12, !10, i64 248}
!16 = !{!12, !10, i64 168}
!17 = !{!12, !6, i64 160}
!18 = !{!19, !10, i64 632}
!19 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !7, i64 32, !20, i64 64, !6, i64 72, !6, i64 76, !21, i64 80, !21, i64 84, !21, i64 88, !21, i64 92, !21, i64 96, !21, i64 100, !21, i64 104, !7, i64 108, !21, i64 140, !21, i64 144, !21, i64 148, !21, i64 152, !6, i64 156, !6, i64 160, !6, i64 164, !6, i64 168, !6, i64 172, !6, i64 176, !6, i64 180, !6, i64 184, !21, i64 188, !21, i64 192, !21, i64 196, !21, i64 200, !21, i64 204, !21, i64 208, !21, i64 212, !21, i64 216, !22, i64 220, !22, i64 284, !22, i64 348, !22, i64 412, !21, i64 476, !6, i64 480, !6, i64 484, !6, i64 488, !6, i64 492, !21, i64 496, !21, i64 500, !21, i64 504, !7, i64 508, !7, i64 524, !7, i64 604, !10, i64 632, !10, i64 640, !6, i64 648, !6, i64 652, !6, i64 656, !10, i64 664, !6, i64 672, !10, i64 680, !6, i64 688}
!20 = !{!"long", !7, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = !{!"", !7, i64 0}
!23 = !{!19, !6, i64 648}
!24 = !{!25, !21, i64 108}
!25 = !{!"nifti_1_header", !6, i64 0, !7, i64 4, !7, i64 14, !6, i64 32, !26, i64 36, !7, i64 38, !7, i64 39, !7, i64 40, !21, i64 56, !21, i64 60, !21, i64 64, !26, i64 68, !26, i64 70, !26, i64 72, !26, i64 74, !7, i64 76, !21, i64 108, !21, i64 112, !21, i64 116, !26, i64 120, !7, i64 122, !7, i64 123, !21, i64 124, !21, i64 128, !21, i64 132, !21, i64 136, !6, i64 140, !6, i64 144, !7, i64 148, !7, i64 228, !26, i64 252, !26, i64 254, !21, i64 256, !21, i64 260, !21, i64 264, !21, i64 268, !21, i64 272, !21, i64 276, !7, i64 280, !7, i64 296, !7, i64 312, !7, i64 328, !7, i64 344}
!26 = !{!"short", !7, i64 0}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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