; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/MINC/src/libminc/nifti (nifti1_io)

; 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.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] }
%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]] }

@.str.219 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.228 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #0

; 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) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @nifti_convert_nim2nhdr(ptr dead_on_unwind noalias writable sret(%struct.nifti_1_header) align 4 %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  store ptr %1, ptr %3, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 348, i1 false)
  %4 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 0
  store i32 348, ptr %4, align 4, !tbaa !9
  %5 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 5
  store i8 114, ptr %5, align 2, !tbaa !14
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.nifti_image, ptr %6, i32 0, i32 0
  %8 = load i32, ptr %7, align 8, !tbaa !15
  %9 = trunc i32 %8 to i16
  %10 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %11 = getelementptr inbounds [8 x i16], ptr %10, i64 0, i64 0
  store i16 %9, ptr %11, align 4, !tbaa !19
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.nifti_image, ptr %12, i32 0, i32 1
  %14 = load i32, ptr %13, align 4, !tbaa !20
  %15 = trunc i32 %14 to i16
  %16 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %17 = getelementptr inbounds [8 x i16], ptr %16, i64 0, i64 1
  store i16 %15, ptr %17, align 2, !tbaa !19
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.nifti_image, ptr %18, i32 0, i32 2
  %20 = load i32, ptr %19, align 8, !tbaa !21
  %21 = trunc i32 %20 to i16
  %22 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %23 = getelementptr inbounds [8 x i16], ptr %22, i64 0, i64 2
  store i16 %21, ptr %23, align 4, !tbaa !19
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.nifti_image, ptr %24, i32 0, i32 3
  %26 = load i32, ptr %25, align 4, !tbaa !22
  %27 = trunc i32 %26 to i16
  %28 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %29 = getelementptr inbounds [8 x i16], ptr %28, i64 0, i64 3
  store i16 %27, ptr %29, align 2, !tbaa !19
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.nifti_image, ptr %30, i32 0, i32 4
  %32 = load i32, ptr %31, align 8, !tbaa !23
  %33 = trunc i32 %32 to i16
  %34 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %35 = getelementptr inbounds [8 x i16], ptr %34, i64 0, i64 4
  store i16 %33, ptr %35, align 4, !tbaa !19
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.nifti_image, ptr %36, i32 0, i32 5
  %38 = load i32, ptr %37, align 4, !tbaa !24
  %39 = trunc i32 %38 to i16
  %40 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %41 = getelementptr inbounds [8 x i16], ptr %40, i64 0, i64 5
  store i16 %39, ptr %41, align 2, !tbaa !19
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.nifti_image, ptr %42, i32 0, i32 6
  %44 = load i32, ptr %43, align 8, !tbaa !25
  %45 = trunc i32 %44 to i16
  %46 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %47 = getelementptr inbounds [8 x i16], ptr %46, i64 0, i64 6
  store i16 %45, ptr %47, align 4, !tbaa !19
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.nifti_image, ptr %48, i32 0, i32 7
  %50 = load i32, ptr %49, align 4, !tbaa !26
  %51 = trunc i32 %50 to i16
  %52 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 7
  %53 = getelementptr inbounds [8 x i16], ptr %52, i64 0, i64 7
  store i16 %51, ptr %53, align 2, !tbaa !19
  %54 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %55 = getelementptr inbounds [8 x float], ptr %54, i64 0, i64 0
  store float 0.000000e+00, ptr %55, align 4, !tbaa !27
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.nifti_image, ptr %56, i32 0, i32 12
  %58 = load float, ptr %57, align 8, !tbaa !28
  %59 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %60 = getelementptr inbounds [8 x float], ptr %59, i64 0, i64 1
  store float %58, ptr %60, align 4, !tbaa !27
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.nifti_image, ptr %61, i32 0, i32 13
  %63 = load float, ptr %62, align 4, !tbaa !29
  %64 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %65 = getelementptr inbounds [8 x float], ptr %64, i64 0, i64 2
  store float %63, ptr %65, align 4, !tbaa !27
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.nifti_image, ptr %66, i32 0, i32 14
  %68 = load float, ptr %67, align 8, !tbaa !30
  %69 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %70 = getelementptr inbounds [8 x float], ptr %69, i64 0, i64 3
  store float %68, ptr %70, align 4, !tbaa !27
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.nifti_image, ptr %71, i32 0, i32 15
  %73 = load float, ptr %72, align 4, !tbaa !31
  %74 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %75 = getelementptr inbounds [8 x float], ptr %74, i64 0, i64 4
  store float %73, ptr %75, align 4, !tbaa !27
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.nifti_image, ptr %76, i32 0, i32 16
  %78 = load float, ptr %77, align 8, !tbaa !32
  %79 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %80 = getelementptr inbounds [8 x float], ptr %79, i64 0, i64 5
  store float %78, ptr %80, align 4, !tbaa !27
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.nifti_image, ptr %81, i32 0, i32 17
  %83 = load float, ptr %82, align 4, !tbaa !33
  %84 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %85 = getelementptr inbounds [8 x float], ptr %84, i64 0, i64 6
  store float %83, ptr %85, align 4, !tbaa !27
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.nifti_image, ptr %86, i32 0, i32 18
  %88 = load float, ptr %87, align 8, !tbaa !34
  %89 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %90 = getelementptr inbounds [8 x float], ptr %89, i64 0, i64 7
  store float %88, ptr %90, align 4, !tbaa !27
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.nifti_image, ptr %91, i32 0, i32 11
  %93 = load i32, ptr %92, align 4, !tbaa !35
  %94 = trunc i32 %93 to i16
  %95 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 12
  store i16 %94, ptr %95, align 2, !tbaa !36
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.nifti_image, ptr %96, i32 0, i32 10
  %98 = load i32, ptr %97, align 8, !tbaa !37
  %99 = mul nsw i32 8, %98
  %100 = trunc i32 %99 to i16
  %101 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 13
  store i16 %100, ptr %101, align 4, !tbaa !38
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.nifti_image, ptr %102, i32 0, i32 23
  %104 = load float, ptr %103, align 8, !tbaa !39
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.nifti_image, ptr %105, i32 0, i32 22
  %107 = load float, ptr %106, align 4, !tbaa !40
  %108 = fcmp ogt float %104, %107
  br i1 %108, label %109, label %118

109:                                              ; preds = %2
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.nifti_image, ptr %110, i32 0, i32 23
  %112 = load float, ptr %111, align 8, !tbaa !39
  %113 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 22
  store float %112, ptr %113, align 4, !tbaa !41
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.nifti_image, ptr %114, i32 0, i32 22
  %116 = load float, ptr %115, align 4, !tbaa !40
  %117 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 23
  store float %116, ptr %117, align 4, !tbaa !42
  br label %118

118:                                              ; preds = %109, %2
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.nifti_image, ptr %119, i32 0, i32 20
  %121 = load float, ptr %120, align 4, !tbaa !43
  %122 = fpext float %121 to double
  %123 = fcmp une double %122, 0.000000e+00
  br i1 %123, label %124, label %133

124:                                              ; preds = %118
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.nifti_image, ptr %125, i32 0, i32 20
  %127 = load float, ptr %126, align 4, !tbaa !43
  %128 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 17
  store float %127, ptr %128, align 4, !tbaa !44
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.nifti_image, ptr %129, i32 0, i32 21
  %131 = load float, ptr %130, align 8, !tbaa !45
  %132 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 18
  store float %131, ptr %132, align 4, !tbaa !46
  br label %133

133:                                              ; preds = %124, %118
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.nifti_image, ptr %134, i32 0, i32 53
  %136 = getelementptr inbounds [80 x i8], ptr %135, i64 0, i64 0
  %137 = load i8, ptr %136, align 4, !tbaa !47
  %138 = sext i8 %137 to i32
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %148

140:                                              ; preds = %133
  %141 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 28
  %142 = getelementptr inbounds [80 x i8], ptr %141, i64 0, i64 0
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.nifti_image, ptr %143, i32 0, i32 53
  %145 = getelementptr inbounds [80 x i8], ptr %144, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %142, ptr align 4 %145, i64 79, i1 false)
  %146 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 28
  %147 = getelementptr inbounds [80 x i8], ptr %146, i64 0, i64 79
  store i8 0, ptr %147, align 1, !tbaa !47
  br label %148

148:                                              ; preds = %140, %133
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.nifti_image, ptr %149, i32 0, i32 54
  %151 = getelementptr inbounds [24 x i8], ptr %150, i64 0, i64 0
  %152 = load i8, ptr %151, align 4, !tbaa !47
  %153 = sext i8 %152 to i32
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %163

155:                                              ; preds = %148
  %156 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 29
  %157 = getelementptr inbounds [24 x i8], ptr %156, i64 0, i64 0
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.nifti_image, ptr %158, i32 0, i32 54
  %160 = getelementptr inbounds [24 x i8], ptr %159, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %157, ptr align 4 %160, i64 23, i1 false)
  %161 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 29
  %162 = getelementptr inbounds [24 x i8], ptr %161, i64 0, i64 23
  store i8 0, ptr %162, align 1, !tbaa !47
  br label %163

163:                                              ; preds = %155, %148
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.nifti_image, ptr %164, i32 0, i32 47
  %166 = load i32, ptr %165, align 8, !tbaa !48
  %167 = icmp sgt i32 %166, 0
  br i1 %167, label %168, label %489

168:                                              ; preds = %163
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.nifti_image, ptr %169, i32 0, i32 47
  %171 = load i32, ptr %170, align 8, !tbaa !48
  %172 = icmp eq i32 %171, 1
  br i1 %172, label %173, label %177

173:                                              ; preds = %168
  %174 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 42
  %175 = getelementptr inbounds [4 x i8], ptr %174, i64 0, i64 0
  %176 = call ptr @strcpy(ptr noundef %175, ptr noundef @.str.219) #5
  br label %181

177:                                              ; preds = %168
  %178 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 42
  %179 = getelementptr inbounds [4 x i8], ptr %178, i64 0, i64 0
  %180 = call ptr @strcpy(ptr noundef %179, ptr noundef @.str.228) #5
  br label %181

181:                                              ; preds = %177, %173
  %182 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %183 = getelementptr inbounds [8 x float], ptr %182, i64 0, i64 1
  %184 = load float, ptr %183, align 4, !tbaa !27
  %185 = fpext float %184 to double
  %186 = call double @llvm.fabs.f64(double %185)
  %187 = fptrunc double %186 to float
  %188 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %189 = getelementptr inbounds [8 x float], ptr %188, i64 0, i64 1
  store float %187, ptr %189, align 4, !tbaa !27
  %190 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %191 = getelementptr inbounds [8 x float], ptr %190, i64 0, i64 2
  %192 = load float, ptr %191, align 4, !tbaa !27
  %193 = fpext float %192 to double
  %194 = call double @llvm.fabs.f64(double %193)
  %195 = fptrunc double %194 to float
  %196 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %197 = getelementptr inbounds [8 x float], ptr %196, i64 0, i64 2
  store float %195, ptr %197, align 4, !tbaa !27
  %198 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %199 = getelementptr inbounds [8 x float], ptr %198, i64 0, i64 3
  %200 = load float, ptr %199, align 4, !tbaa !27
  %201 = fpext float %200 to double
  %202 = call double @llvm.fabs.f64(double %201)
  %203 = fptrunc double %202 to float
  %204 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %205 = getelementptr inbounds [8 x float], ptr %204, i64 0, i64 3
  store float %203, ptr %205, align 4, !tbaa !27
  %206 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %207 = getelementptr inbounds [8 x float], ptr %206, i64 0, i64 4
  %208 = load float, ptr %207, align 4, !tbaa !27
  %209 = fpext float %208 to double
  %210 = call double @llvm.fabs.f64(double %209)
  %211 = fptrunc double %210 to float
  %212 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %213 = getelementptr inbounds [8 x float], ptr %212, i64 0, i64 4
  store float %211, ptr %213, align 4, !tbaa !27
  %214 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %215 = getelementptr inbounds [8 x float], ptr %214, i64 0, i64 5
  %216 = load float, ptr %215, align 4, !tbaa !27
  %217 = fpext float %216 to double
  %218 = call double @llvm.fabs.f64(double %217)
  %219 = fptrunc double %218 to float
  %220 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %221 = getelementptr inbounds [8 x float], ptr %220, i64 0, i64 5
  store float %219, ptr %221, align 4, !tbaa !27
  %222 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %223 = getelementptr inbounds [8 x float], ptr %222, i64 0, i64 6
  %224 = load float, ptr %223, align 4, !tbaa !27
  %225 = fpext float %224 to double
  %226 = call double @llvm.fabs.f64(double %225)
  %227 = fptrunc double %226 to float
  %228 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %229 = getelementptr inbounds [8 x float], ptr %228, i64 0, i64 6
  store float %227, ptr %229, align 4, !tbaa !27
  %230 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %231 = getelementptr inbounds [8 x float], ptr %230, i64 0, i64 7
  %232 = load float, ptr %231, align 4, !tbaa !27
  %233 = fpext float %232 to double
  %234 = call double @llvm.fabs.f64(double %233)
  %235 = fptrunc double %234 to float
  %236 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %237 = getelementptr inbounds [8 x float], ptr %236, i64 0, i64 7
  store float %235, ptr %237, align 4, !tbaa !27
  %238 = load ptr, ptr %3, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.nifti_image, ptr %238, i32 0, i32 48
  %240 = load i32, ptr %239, align 4, !tbaa !49
  %241 = trunc i32 %240 to i16
  %242 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 11
  store i16 %241, ptr %242, align 4, !tbaa !50
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.nifti_image, ptr %243, i32 0, i32 49
  %245 = load float, ptr %244, align 8, !tbaa !51
  %246 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 8
  store float %245, ptr %246, align 4, !tbaa !52
  %247 = load ptr, ptr %3, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.nifti_image, ptr %247, i32 0, i32 50
  %249 = load float, ptr %248, align 4, !tbaa !53
  %250 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 9
  store float %249, ptr %250, align 4, !tbaa !54
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.nifti_image, ptr %251, i32 0, i32 51
  %253 = load float, ptr %252, align 8, !tbaa !55
  %254 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 10
  store float %253, ptr %254, align 4, !tbaa !56
  %255 = load ptr, ptr %3, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.nifti_image, ptr %255, i32 0, i32 52
  %257 = getelementptr inbounds [16 x i8], ptr %256, i64 0, i64 0
  %258 = load i8, ptr %257, align 4, !tbaa !47
  %259 = sext i8 %258 to i32
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %261, label %269

261:                                              ; preds = %181
  %262 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 41
  %263 = getelementptr inbounds [16 x i8], ptr %262, i64 0, i64 0
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.nifti_image, ptr %264, i32 0, i32 52
  %266 = getelementptr inbounds [16 x i8], ptr %265, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %263, ptr align 4 %266, i64 15, i1 false)
  %267 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 41
  %268 = getelementptr inbounds [16 x i8], ptr %267, i64 0, i64 15
  store i8 0, ptr %268, align 1, !tbaa !47
  br label %269

269:                                              ; preds = %261, %181
  %270 = load ptr, ptr %3, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.nifti_image, ptr %270, i32 0, i32 57
  %272 = load i32, ptr %271, align 8, !tbaa !57
  %273 = sitofp i32 %272 to float
  %274 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 16
  store float %273, ptr %274, align 4, !tbaa !58
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.nifti_image, ptr %275, i32 0, i32 45
  %277 = load i32, ptr %276, align 8, !tbaa !59
  %278 = trunc i32 %277 to i8
  %279 = sext i8 %278 to i32
  %280 = and i32 %279, 7
  %281 = load ptr, ptr %3, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.nifti_image, ptr %281, i32 0, i32 46
  %283 = load i32, ptr %282, align 4, !tbaa !60
  %284 = trunc i32 %283 to i8
  %285 = sext i8 %284 to i32
  %286 = and i32 %285, 56
  %287 = or i32 %280, %286
  %288 = trunc i32 %287 to i8
  %289 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 21
  store i8 %288, ptr %289, align 1, !tbaa !61
  %290 = load ptr, ptr %3, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.nifti_image, ptr %290, i32 0, i32 44
  %292 = load float, ptr %291, align 4, !tbaa !62
  %293 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 25
  store float %292, ptr %293, align 4, !tbaa !63
  %294 = load ptr, ptr %3, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.nifti_image, ptr %294, i32 0, i32 24
  %296 = load i32, ptr %295, align 4, !tbaa !64
  %297 = icmp sgt i32 %296, 0
  br i1 %297, label %298, label %338

298:                                              ; preds = %269
  %299 = load ptr, ptr %3, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.nifti_image, ptr %299, i32 0, i32 24
  %301 = load i32, ptr %300, align 4, !tbaa !64
  %302 = trunc i32 %301 to i16
  %303 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 30
  store i16 %302, ptr %303, align 4, !tbaa !65
  %304 = load ptr, ptr %3, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.nifti_image, ptr %304, i32 0, i32 33
  %306 = load float, ptr %305, align 8, !tbaa !66
  %307 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 32
  store float %306, ptr %307, align 4, !tbaa !67
  %308 = load ptr, ptr %3, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.nifti_image, ptr %308, i32 0, i32 34
  %310 = load float, ptr %309, align 4, !tbaa !68
  %311 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 33
  store float %310, ptr %311, align 4, !tbaa !69
  %312 = load ptr, ptr %3, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.nifti_image, ptr %312, i32 0, i32 35
  %314 = load float, ptr %313, align 8, !tbaa !70
  %315 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 34
  store float %314, ptr %315, align 4, !tbaa !71
  %316 = load ptr, ptr %3, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.nifti_image, ptr %316, i32 0, i32 36
  %318 = load float, ptr %317, align 4, !tbaa !72
  %319 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 35
  store float %318, ptr %319, align 4, !tbaa !73
  %320 = load ptr, ptr %3, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.nifti_image, ptr %320, i32 0, i32 37
  %322 = load float, ptr %321, align 8, !tbaa !74
  %323 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 36
  store float %322, ptr %323, align 4, !tbaa !75
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.nifti_image, ptr %324, i32 0, i32 38
  %326 = load float, ptr %325, align 4, !tbaa !76
  %327 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 37
  store float %326, ptr %327, align 4, !tbaa !77
  %328 = load ptr, ptr %3, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.nifti_image, ptr %328, i32 0, i32 39
  %330 = load float, ptr %329, align 8, !tbaa !78
  %331 = fpext float %330 to double
  %332 = fcmp oge double %331, 0.000000e+00
  %333 = zext i1 %332 to i64
  %334 = select i1 %332, double 1.000000e+00, double -1.000000e+00
  %335 = fptrunc double %334 to float
  %336 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 15
  %337 = getelementptr inbounds [8 x float], ptr %336, i64 0, i64 0
  store float %335, ptr %337, align 4, !tbaa !27
  br label %338

338:                                              ; preds = %298, %269
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.nifti_image, ptr %339, i32 0, i32 25
  %341 = load i32, ptr %340, align 8, !tbaa !79
  %342 = icmp sgt i32 %341, 0
  br i1 %342, label %343, label %445

343:                                              ; preds = %338
  %344 = load ptr, ptr %3, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.nifti_image, ptr %344, i32 0, i32 25
  %346 = load i32, ptr %345, align 8, !tbaa !79
  %347 = trunc i32 %346 to i16
  %348 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 31
  store i16 %347, ptr %348, align 2, !tbaa !80
  %349 = load ptr, ptr %3, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.nifti_image, ptr %349, i32 0, i32 42
  %351 = getelementptr inbounds %struct.mat44, ptr %350, i32 0, i32 0
  %352 = getelementptr inbounds [4 x [4 x float]], ptr %351, i64 0, i64 0
  %353 = getelementptr inbounds [4 x float], ptr %352, i64 0, i64 0
  %354 = load float, ptr %353, align 4, !tbaa !27
  %355 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 38
  %356 = getelementptr inbounds [4 x float], ptr %355, i64 0, i64 0
  store float %354, ptr %356, align 4, !tbaa !27
  %357 = load ptr, ptr %3, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.nifti_image, ptr %357, i32 0, i32 42
  %359 = getelementptr inbounds %struct.mat44, ptr %358, i32 0, i32 0
  %360 = getelementptr inbounds [4 x [4 x float]], ptr %359, i64 0, i64 0
  %361 = getelementptr inbounds [4 x float], ptr %360, i64 0, i64 1
  %362 = load float, ptr %361, align 4, !tbaa !27
  %363 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 38
  %364 = getelementptr inbounds [4 x float], ptr %363, i64 0, i64 1
  store float %362, ptr %364, align 4, !tbaa !27
  %365 = load ptr, ptr %3, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.nifti_image, ptr %365, i32 0, i32 42
  %367 = getelementptr inbounds %struct.mat44, ptr %366, i32 0, i32 0
  %368 = getelementptr inbounds [4 x [4 x float]], ptr %367, i64 0, i64 0
  %369 = getelementptr inbounds [4 x float], ptr %368, i64 0, i64 2
  %370 = load float, ptr %369, align 4, !tbaa !27
  %371 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 38
  %372 = getelementptr inbounds [4 x float], ptr %371, i64 0, i64 2
  store float %370, ptr %372, align 4, !tbaa !27
  %373 = load ptr, ptr %3, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.nifti_image, ptr %373, i32 0, i32 42
  %375 = getelementptr inbounds %struct.mat44, ptr %374, i32 0, i32 0
  %376 = getelementptr inbounds [4 x [4 x float]], ptr %375, i64 0, i64 0
  %377 = getelementptr inbounds [4 x float], ptr %376, i64 0, i64 3
  %378 = load float, ptr %377, align 4, !tbaa !27
  %379 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 38
  %380 = getelementptr inbounds [4 x float], ptr %379, i64 0, i64 3
  store float %378, ptr %380, align 4, !tbaa !27
  %381 = load ptr, ptr %3, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.nifti_image, ptr %381, i32 0, i32 42
  %383 = getelementptr inbounds %struct.mat44, ptr %382, i32 0, i32 0
  %384 = getelementptr inbounds [4 x [4 x float]], ptr %383, i64 0, i64 1
  %385 = getelementptr inbounds [4 x float], ptr %384, i64 0, i64 0
  %386 = load float, ptr %385, align 4, !tbaa !27
  %387 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 39
  %388 = getelementptr inbounds [4 x float], ptr %387, i64 0, i64 0
  store float %386, ptr %388, align 4, !tbaa !27
  %389 = load ptr, ptr %3, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.nifti_image, ptr %389, i32 0, i32 42
  %391 = getelementptr inbounds %struct.mat44, ptr %390, i32 0, i32 0
  %392 = getelementptr inbounds [4 x [4 x float]], ptr %391, i64 0, i64 1
  %393 = getelementptr inbounds [4 x float], ptr %392, i64 0, i64 1
  %394 = load float, ptr %393, align 4, !tbaa !27
  %395 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 39
  %396 = getelementptr inbounds [4 x float], ptr %395, i64 0, i64 1
  store float %394, ptr %396, align 4, !tbaa !27
  %397 = load ptr, ptr %3, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.nifti_image, ptr %397, i32 0, i32 42
  %399 = getelementptr inbounds %struct.mat44, ptr %398, i32 0, i32 0
  %400 = getelementptr inbounds [4 x [4 x float]], ptr %399, i64 0, i64 1
  %401 = getelementptr inbounds [4 x float], ptr %400, i64 0, i64 2
  %402 = load float, ptr %401, align 4, !tbaa !27
  %403 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 39
  %404 = getelementptr inbounds [4 x float], ptr %403, i64 0, i64 2
  store float %402, ptr %404, align 4, !tbaa !27
  %405 = load ptr, ptr %3, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.nifti_image, ptr %405, i32 0, i32 42
  %407 = getelementptr inbounds %struct.mat44, ptr %406, i32 0, i32 0
  %408 = getelementptr inbounds [4 x [4 x float]], ptr %407, i64 0, i64 1
  %409 = getelementptr inbounds [4 x float], ptr %408, i64 0, i64 3
  %410 = load float, ptr %409, align 4, !tbaa !27
  %411 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 39
  %412 = getelementptr inbounds [4 x float], ptr %411, i64 0, i64 3
  store float %410, ptr %412, align 4, !tbaa !27
  %413 = load ptr, ptr %3, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.nifti_image, ptr %413, i32 0, i32 42
  %415 = getelementptr inbounds %struct.mat44, ptr %414, i32 0, i32 0
  %416 = getelementptr inbounds [4 x [4 x float]], ptr %415, i64 0, i64 2
  %417 = getelementptr inbounds [4 x float], ptr %416, i64 0, i64 0
  %418 = load float, ptr %417, align 4, !tbaa !27
  %419 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 40
  %420 = getelementptr inbounds [4 x float], ptr %419, i64 0, i64 0
  store float %418, ptr %420, align 4, !tbaa !27
  %421 = load ptr, ptr %3, align 8, !tbaa !5
  %422 = getelementptr inbounds %struct.nifti_image, ptr %421, i32 0, i32 42
  %423 = getelementptr inbounds %struct.mat44, ptr %422, i32 0, i32 0
  %424 = getelementptr inbounds [4 x [4 x float]], ptr %423, i64 0, i64 2
  %425 = getelementptr inbounds [4 x float], ptr %424, i64 0, i64 1
  %426 = load float, ptr %425, align 4, !tbaa !27
  %427 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 40
  %428 = getelementptr inbounds [4 x float], ptr %427, i64 0, i64 1
  store float %426, ptr %428, align 4, !tbaa !27
  %429 = load ptr, ptr %3, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct.nifti_image, ptr %429, i32 0, i32 42
  %431 = getelementptr inbounds %struct.mat44, ptr %430, i32 0, i32 0
  %432 = getelementptr inbounds [4 x [4 x float]], ptr %431, i64 0, i64 2
  %433 = getelementptr inbounds [4 x float], ptr %432, i64 0, i64 2
  %434 = load float, ptr %433, align 4, !tbaa !27
  %435 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 40
  %436 = getelementptr inbounds [4 x float], ptr %435, i64 0, i64 2
  store float %434, ptr %436, align 4, !tbaa !27
  %437 = load ptr, ptr %3, align 8, !tbaa !5
  %438 = getelementptr inbounds %struct.nifti_image, ptr %437, i32 0, i32 42
  %439 = getelementptr inbounds %struct.mat44, ptr %438, i32 0, i32 0
  %440 = getelementptr inbounds [4 x [4 x float]], ptr %439, i64 0, i64 2
  %441 = getelementptr inbounds [4 x float], ptr %440, i64 0, i64 3
  %442 = load float, ptr %441, align 4, !tbaa !27
  %443 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 40
  %444 = getelementptr inbounds [4 x float], ptr %443, i64 0, i64 3
  store float %442, ptr %444, align 4, !tbaa !27
  br label %445

445:                                              ; preds = %343, %338
  %446 = load ptr, ptr %3, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.nifti_image, ptr %446, i32 0, i32 26
  %448 = load i32, ptr %447, align 4, !tbaa !81
  %449 = trunc i32 %448 to i8
  %450 = sext i8 %449 to i32
  %451 = and i32 %450, 3
  %452 = load ptr, ptr %3, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.nifti_image, ptr %452, i32 0, i32 27
  %454 = load i32, ptr %453, align 8, !tbaa !82
  %455 = trunc i32 %454 to i8
  %456 = sext i8 %455 to i32
  %457 = and i32 %456, 3
  %458 = shl i32 %457, 2
  %459 = or i32 %451, %458
  %460 = load ptr, ptr %3, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.nifti_image, ptr %460, i32 0, i32 28
  %462 = load i32, ptr %461, align 4, !tbaa !83
  %463 = trunc i32 %462 to i8
  %464 = sext i8 %463 to i32
  %465 = and i32 %464, 3
  %466 = shl i32 %465, 4
  %467 = or i32 %459, %466
  %468 = trunc i32 %467 to i8
  %469 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 6
  store i8 %468, ptr %469, align 1, !tbaa !84
  %470 = load ptr, ptr %3, align 8, !tbaa !5
  %471 = getelementptr inbounds %struct.nifti_image, ptr %470, i32 0, i32 29
  %472 = load i32, ptr %471, align 8, !tbaa !85
  %473 = trunc i32 %472 to i8
  %474 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 20
  store i8 %473, ptr %474, align 2, !tbaa !86
  %475 = load ptr, ptr %3, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct.nifti_image, ptr %475, i32 0, i32 30
  %477 = load i32, ptr %476, align 4, !tbaa !87
  %478 = trunc i32 %477 to i16
  %479 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 14
  store i16 %478, ptr %479, align 2, !tbaa !88
  %480 = load ptr, ptr %3, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.nifti_image, ptr %480, i32 0, i32 31
  %482 = load i32, ptr %481, align 8, !tbaa !89
  %483 = trunc i32 %482 to i16
  %484 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 19
  store i16 %483, ptr %484, align 4, !tbaa !90
  %485 = load ptr, ptr %3, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.nifti_image, ptr %485, i32 0, i32 32
  %487 = load float, ptr %486, align 4, !tbaa !91
  %488 = getelementptr inbounds %struct.nifti_1_header, ptr %0, i32 0, i32 24
  store float %487, ptr %488, align 4, !tbaa !92
  br label %489

489:                                              ; preds = %445, %163
  ret void
}

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"nifti_1_header", !11, i64 0, !7, i64 4, !7, i64 14, !11, i64 32, !12, i64 36, !7, i64 38, !7, i64 39, !7, i64 40, !13, i64 56, !13, i64 60, !13, i64 64, !12, i64 68, !12, i64 70, !12, i64 72, !12, i64 74, !7, i64 76, !13, i64 108, !13, i64 112, !13, i64 116, !12, i64 120, !7, i64 122, !7, i64 123, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !11, i64 140, !11, i64 144, !7, i64 148, !7, i64 228, !12, i64 252, !12, i64 254, !13, i64 256, !13, i64 260, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !7, i64 280, !7, i64 296, !7, i64 312, !7, i64 328, !7, i64 344}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!10, !7, i64 38}
!15 = !{!16, !11, i64 0}
!16 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !7, i64 32, !17, i64 64, !11, i64 72, !11, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !7, i64 108, !13, i64 140, !13, i64 144, !13, i64 148, !13, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !13, i64 188, !13, i64 192, !13, i64 196, !13, i64 200, !13, i64 204, !13, i64 208, !13, i64 212, !13, i64 216, !18, i64 220, !18, i64 284, !18, i64 348, !18, i64 412, !13, i64 476, !11, i64 480, !11, i64 484, !11, i64 488, !11, i64 492, !13, i64 496, !13, i64 500, !13, i64 504, !7, i64 508, !7, i64 524, !7, i64 604, !6, i64 632, !6, i64 640, !11, i64 648, !11, i64 652, !11, i64 656, !6, i64 664, !11, i64 672, !6, i64 680, !11, i64 688}
!17 = !{!"long", !7, i64 0}
!18 = !{!"", !7, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!16, !11, i64 4}
!21 = !{!16, !11, i64 8}
!22 = !{!16, !11, i64 12}
!23 = !{!16, !11, i64 16}
!24 = !{!16, !11, i64 20}
!25 = !{!16, !11, i64 24}
!26 = !{!16, !11, i64 28}
!27 = !{!13, !13, i64 0}
!28 = !{!16, !13, i64 80}
!29 = !{!16, !13, i64 84}
!30 = !{!16, !13, i64 88}
!31 = !{!16, !13, i64 92}
!32 = !{!16, !13, i64 96}
!33 = !{!16, !13, i64 100}
!34 = !{!16, !13, i64 104}
!35 = !{!16, !11, i64 76}
!36 = !{!10, !12, i64 70}
!37 = !{!16, !11, i64 72}
!38 = !{!10, !12, i64 72}
!39 = !{!16, !13, i64 152}
!40 = !{!16, !13, i64 148}
!41 = !{!10, !13, i64 124}
!42 = !{!10, !13, i64 128}
!43 = !{!16, !13, i64 140}
!44 = !{!10, !13, i64 112}
!45 = !{!16, !13, i64 144}
!46 = !{!10, !13, i64 116}
!47 = !{!7, !7, i64 0}
!48 = !{!16, !11, i64 488}
!49 = !{!16, !11, i64 492}
!50 = !{!10, !12, i64 68}
!51 = !{!16, !13, i64 496}
!52 = !{!10, !13, i64 56}
!53 = !{!16, !13, i64 500}
!54 = !{!10, !13, i64 60}
!55 = !{!16, !13, i64 504}
!56 = !{!10, !13, i64 64}
!57 = !{!16, !11, i64 648}
!58 = !{!10, !13, i64 108}
!59 = !{!16, !11, i64 480}
!60 = !{!16, !11, i64 484}
!61 = !{!10, !7, i64 123}
!62 = !{!16, !13, i64 476}
!63 = !{!10, !13, i64 136}
!64 = !{!16, !11, i64 156}
!65 = !{!10, !12, i64 252}
!66 = !{!16, !13, i64 192}
!67 = !{!10, !13, i64 256}
!68 = !{!16, !13, i64 196}
!69 = !{!10, !13, i64 260}
!70 = !{!16, !13, i64 200}
!71 = !{!10, !13, i64 264}
!72 = !{!16, !13, i64 204}
!73 = !{!10, !13, i64 268}
!74 = !{!16, !13, i64 208}
!75 = !{!10, !13, i64 272}
!76 = !{!16, !13, i64 212}
!77 = !{!10, !13, i64 276}
!78 = !{!16, !13, i64 216}
!79 = !{!16, !11, i64 160}
!80 = !{!10, !12, i64 254}
!81 = !{!16, !11, i64 164}
!82 = !{!16, !11, i64 168}
!83 = !{!16, !11, i64 172}
!84 = !{!10, !7, i64 39}
!85 = !{!16, !11, i64 176}
!86 = !{!10, !7, i64 122}
!87 = !{!16, !11, i64 180}
!88 = !{!10, !12, i64 74}
!89 = !{!16, !11, i64 184}
!90 = !{!10, !12, i64 120}
!91 = !{!16, !13, i64 188}
!92 = !{!10, !13, i64 132}


; 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.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] }

@.str.219 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.228 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #0

; 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) #1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @nifti_convert_nim2nhdr(ptr dead_on_unwind noalias writable sret(%struct.nifti_1_header) align 4 %0, ptr noundef readonly %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(348) %3, i8 0, i64 344, i1 false)
  store i32 348, ptr %0, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 38
  store i8 114, ptr %4, align 2, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = load <8 x i32>, ptr %1, align 8, !tbaa !13
  %7 = trunc <8 x i32> %6 to <8 x i16>
  store <8 x i16> %7, ptr %5, align 4, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %0, i64 76
  %9 = getelementptr inbounds i8, ptr %1, i64 80
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  %11 = load <4 x float>, ptr %9, align 8, !tbaa !15
  store <4 x float> %11, ptr %10, align 4, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %1, i64 96
  %13 = getelementptr inbounds i8, ptr %0, i64 96
  %14 = load <2 x float>, ptr %12, align 8, !tbaa !15
  store <2 x float> %14, ptr %13, align 4, !tbaa !15
  %15 = getelementptr inbounds i8, ptr %1, i64 104
  %16 = load float, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %0, i64 104
  store float %16, ptr %17, align 4, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %1, i64 76
  %19 = load i32, ptr %18, align 4, !tbaa !21
  %20 = trunc i32 %19 to i16
  %21 = getelementptr inbounds i8, ptr %0, i64 70
  store i16 %20, ptr %21, align 2, !tbaa !22
  %22 = getelementptr inbounds i8, ptr %1, i64 72
  %23 = load i32, ptr %22, align 8, !tbaa !23
  %.tr = trunc i32 %23 to i16
  %24 = shl i16 %.tr, 3
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  store i16 %24, ptr %25, align 4, !tbaa !24
  %26 = getelementptr inbounds i8, ptr %1, i64 152
  %27 = load float, ptr %26, align 8, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %1, i64 148
  %29 = load float, ptr %28, align 4, !tbaa !26
  %30 = fcmp ogt float %27, %29
  br i1 %30, label %31, label %34

31:                                               ; preds = %2
  %32 = getelementptr inbounds i8, ptr %0, i64 124
  store float %27, ptr %32, align 4, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %0, i64 128
  store float %29, ptr %33, align 4, !tbaa !28
  br label %34

34:                                               ; preds = %31, %2
  %35 = getelementptr inbounds i8, ptr %1, i64 140
  %36 = load float, ptr %35, align 4, !tbaa !29
  %37 = fcmp une float %36, 0.000000e+00
  br i1 %37, label %38, label %43

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %0, i64 112
  store float %36, ptr %39, align 4, !tbaa !30
  %40 = getelementptr inbounds i8, ptr %1, i64 144
  %41 = load float, ptr %40, align 8, !tbaa !31
  %42 = getelementptr inbounds i8, ptr %0, i64 116
  store float %41, ptr %42, align 4, !tbaa !32
  br label %43

43:                                               ; preds = %38, %34
  %44 = getelementptr inbounds i8, ptr %1, i64 524
  %45 = load i8, ptr %44, align 4, !tbaa !33
  %.not = icmp eq i8 %45, 0
  br i1 %.not, label %49, label %46

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %0, i64 148
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(79) %47, ptr noundef nonnull align 4 dereferenceable(79) %44, i64 79, i1 false)
  %48 = getelementptr inbounds i8, ptr %0, i64 227
  store i8 0, ptr %48, align 1, !tbaa !33
  br label %49

49:                                               ; preds = %46, %43
  %50 = getelementptr inbounds i8, ptr %1, i64 604
  %51 = load i8, ptr %50, align 4, !tbaa !33
  %.not73 = icmp eq i8 %51, 0
  br i1 %.not73, label %55, label %52

52:                                               ; preds = %49
  %53 = getelementptr inbounds i8, ptr %0, i64 228
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(23) %53, ptr noundef nonnull align 4 dereferenceable(23) %50, i64 23, i1 false)
  %54 = getelementptr inbounds i8, ptr %0, i64 251
  store i8 0, ptr %54, align 1, !tbaa !33
  br label %55

55:                                               ; preds = %52, %49
  %56 = getelementptr inbounds i8, ptr %1, i64 488
  %57 = load i32, ptr %56, align 8, !tbaa !34
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %59, label %161

59:                                               ; preds = %55
  %60 = icmp eq i32 %57, 1
  %61 = getelementptr inbounds i8, ptr %0, i64 344
  %.str.219..str.228 = select i1 %60, ptr @.str.219, ptr @.str.228
  %62 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %61, ptr noundef nonnull dereferenceable(1) %.str.219..str.228) #5
  %63 = tail call <4 x float> @llvm.fabs.v4f32(<4 x float> %11)
  store <4 x float> %63, ptr %10, align 4, !tbaa !15
  %64 = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %14)
  store <2 x float> %64, ptr %13, align 4, !tbaa !15
  %65 = tail call float @llvm.fabs.f32(float %16)
  store float %65, ptr %17, align 4, !tbaa !15
  %66 = getelementptr inbounds i8, ptr %1, i64 492
  %67 = load i32, ptr %66, align 4, !tbaa !35
  %68 = trunc i32 %67 to i16
  %69 = getelementptr inbounds i8, ptr %0, i64 68
  store i16 %68, ptr %69, align 4, !tbaa !36
  %70 = getelementptr inbounds i8, ptr %1, i64 496
  %71 = getelementptr inbounds i8, ptr %0, i64 56
  %72 = load <2 x float>, ptr %70, align 8, !tbaa !15
  store <2 x float> %72, ptr %71, align 4, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %1, i64 504
  %74 = load float, ptr %73, align 8, !tbaa !37
  %75 = getelementptr inbounds i8, ptr %0, i64 64
  store float %74, ptr %75, align 4, !tbaa !38
  %76 = getelementptr inbounds i8, ptr %1, i64 508
  %77 = load i8, ptr %76, align 4, !tbaa !33
  %.not74 = icmp eq i8 %77, 0
  br i1 %.not74, label %81, label %78

78:                                               ; preds = %59
  %79 = getelementptr inbounds i8, ptr %0, i64 328
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(15) %79, ptr noundef nonnull align 4 dereferenceable(15) %76, i64 15, i1 false)
  %80 = getelementptr inbounds i8, ptr %0, i64 343
  store i8 0, ptr %80, align 1, !tbaa !33
  br label %81

81:                                               ; preds = %78, %59
  %82 = getelementptr inbounds i8, ptr %1, i64 648
  %83 = load i32, ptr %82, align 8, !tbaa !39
  %84 = sitofp i32 %83 to float
  %85 = getelementptr inbounds i8, ptr %0, i64 108
  store float %84, ptr %85, align 4, !tbaa !40
  %86 = getelementptr inbounds i8, ptr %1, i64 480
  %87 = load i32, ptr %86, align 8, !tbaa !41
  %88 = and i32 %87, 7
  %89 = getelementptr inbounds i8, ptr %1, i64 484
  %90 = load i32, ptr %89, align 4, !tbaa !42
  %91 = and i32 %90, 56
  %92 = or disjoint i32 %91, %88
  %93 = trunc nuw nsw i32 %92 to i8
  %94 = getelementptr inbounds i8, ptr %0, i64 123
  store i8 %93, ptr %94, align 1, !tbaa !43
  %95 = getelementptr inbounds i8, ptr %1, i64 476
  %96 = load float, ptr %95, align 4, !tbaa !44
  %97 = getelementptr inbounds i8, ptr %0, i64 136
  store float %96, ptr %97, align 4, !tbaa !45
  %98 = getelementptr inbounds i8, ptr %1, i64 156
  %99 = load i32, ptr %98, align 4, !tbaa !46
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %101, label %114

101:                                              ; preds = %81
  %102 = trunc i32 %99 to i16
  %103 = getelementptr inbounds i8, ptr %0, i64 252
  store i16 %102, ptr %103, align 4, !tbaa !47
  %104 = getelementptr inbounds i8, ptr %1, i64 192
  %105 = getelementptr inbounds i8, ptr %0, i64 256
  %106 = load <4 x float>, ptr %104, align 8, !tbaa !15
  store <4 x float> %106, ptr %105, align 4, !tbaa !15
  %107 = getelementptr inbounds i8, ptr %1, i64 208
  %108 = getelementptr inbounds i8, ptr %0, i64 272
  %109 = load <2 x float>, ptr %107, align 8, !tbaa !15
  store <2 x float> %109, ptr %108, align 4, !tbaa !15
  %110 = getelementptr inbounds i8, ptr %1, i64 216
  %111 = load float, ptr %110, align 8, !tbaa !48
  %112 = fcmp oge float %111, 0.000000e+00
  %113 = select i1 %112, float 1.000000e+00, float -1.000000e+00
  store float %113, ptr %8, align 4, !tbaa !15
  br label %114

114:                                              ; preds = %101, %81
  %115 = getelementptr inbounds i8, ptr %1, i64 160
  %116 = load i32, ptr %115, align 8, !tbaa !49
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %118, label %130

118:                                              ; preds = %114
  %119 = trunc i32 %116 to i16
  %120 = getelementptr inbounds i8, ptr %0, i64 254
  store i16 %119, ptr %120, align 2, !tbaa !50
  %121 = getelementptr inbounds i8, ptr %1, i64 348
  %122 = getelementptr inbounds i8, ptr %0, i64 280
  %123 = load <4 x float>, ptr %121, align 4, !tbaa !15
  store <4 x float> %123, ptr %122, align 4, !tbaa !15
  %124 = getelementptr inbounds i8, ptr %1, i64 364
  %125 = getelementptr inbounds i8, ptr %0, i64 296
  %126 = load <4 x float>, ptr %124, align 4, !tbaa !15
  store <4 x float> %126, ptr %125, align 4, !tbaa !15
  %127 = getelementptr inbounds i8, ptr %1, i64 380
  %128 = getelementptr inbounds i8, ptr %0, i64 312
  %129 = load <4 x float>, ptr %127, align 4, !tbaa !15
  store <4 x float> %129, ptr %128, align 4, !tbaa !15
  br label %130

130:                                              ; preds = %118, %114
  %131 = getelementptr inbounds i8, ptr %1, i64 164
  %132 = load i32, ptr %131, align 4, !tbaa !51
  %133 = and i32 %132, 3
  %134 = getelementptr inbounds i8, ptr %1, i64 168
  %135 = load i32, ptr %134, align 8, !tbaa !52
  %136 = shl i32 %135, 2
  %137 = and i32 %136, 12
  %138 = or disjoint i32 %137, %133
  %139 = getelementptr inbounds i8, ptr %1, i64 172
  %140 = load i32, ptr %139, align 4, !tbaa !53
  %141 = shl i32 %140, 4
  %142 = and i32 %141, 48
  %143 = or disjoint i32 %138, %142
  %144 = trunc nuw nsw i32 %143 to i8
  %145 = getelementptr inbounds i8, ptr %0, i64 39
  store i8 %144, ptr %145, align 1, !tbaa !54
  %146 = getelementptr inbounds i8, ptr %1, i64 176
  %147 = load i32, ptr %146, align 8, !tbaa !55
  %148 = trunc i32 %147 to i8
  %149 = getelementptr inbounds i8, ptr %0, i64 122
  store i8 %148, ptr %149, align 2, !tbaa !56
  %150 = getelementptr inbounds i8, ptr %1, i64 180
  %151 = load i32, ptr %150, align 4, !tbaa !57
  %152 = trunc i32 %151 to i16
  %153 = getelementptr inbounds i8, ptr %0, i64 74
  store i16 %152, ptr %153, align 2, !tbaa !58
  %154 = getelementptr inbounds i8, ptr %1, i64 184
  %155 = load i32, ptr %154, align 8, !tbaa !59
  %156 = trunc i32 %155 to i16
  %157 = getelementptr inbounds i8, ptr %0, i64 120
  store i16 %156, ptr %157, align 4, !tbaa !60
  %158 = getelementptr inbounds i8, ptr %1, i64 188
  %159 = load float, ptr %158, align 4, !tbaa !61
  %160 = getelementptr inbounds i8, ptr %0, i64 132
  store float %159, ptr %160, align 4, !tbaa !62
  br label %161

161:                                              ; preds = %130, %55
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fabs.v4f32(<4 x float>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fabs.v2f32(<2 x float>) #4

attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) 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 #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, !7, i64 0}
!6 = !{!"nifti_1_header", !7, i64 0, !8, i64 4, !8, i64 14, !7, i64 32, !10, i64 36, !8, i64 38, !8, i64 39, !8, i64 40, !11, i64 56, !11, i64 60, !11, i64 64, !10, i64 68, !10, i64 70, !10, i64 72, !10, i64 74, !8, i64 76, !11, i64 108, !11, i64 112, !11, i64 116, !10, i64 120, !8, i64 122, !8, i64 123, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !7, i64 140, !7, i64 144, !8, i64 148, !8, i64 228, !10, i64 252, !10, i64 254, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !11, i64 272, !11, i64 276, !8, i64 280, !8, i64 296, !8, i64 312, !8, i64 328, !8, i64 344}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !8, i64 38}
!13 = !{!7, !7, i64 0}
!14 = !{!10, !10, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !11, i64 104}
!17 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !8, i64 32, !18, i64 64, !7, i64 72, !7, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !8, i64 108, !11, i64 140, !11, i64 144, !11, i64 148, !11, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !7, i64 168, !7, i64 172, !7, i64 176, !7, i64 180, !7, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !19, i64 220, !19, i64 284, !19, i64 348, !19, i64 412, !11, i64 476, !7, i64 480, !7, i64 484, !7, i64 488, !7, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !8, i64 508, !8, i64 524, !8, i64 604, !20, i64 632, !20, i64 640, !7, i64 648, !7, i64 652, !7, i64 656, !20, i64 664, !7, i64 672, !20, i64 680, !7, i64 688}
!18 = !{!"long", !8, i64 0}
!19 = !{!"", !8, i64 0}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!17, !7, i64 76}
!22 = !{!6, !10, i64 70}
!23 = !{!17, !7, i64 72}
!24 = !{!6, !10, i64 72}
!25 = !{!17, !11, i64 152}
!26 = !{!17, !11, i64 148}
!27 = !{!6, !11, i64 124}
!28 = !{!6, !11, i64 128}
!29 = !{!17, !11, i64 140}
!30 = !{!6, !11, i64 112}
!31 = !{!17, !11, i64 144}
!32 = !{!6, !11, i64 116}
!33 = !{!8, !8, i64 0}
!34 = !{!17, !7, i64 488}
!35 = !{!17, !7, i64 492}
!36 = !{!6, !10, i64 68}
!37 = !{!17, !11, i64 504}
!38 = !{!6, !11, i64 64}
!39 = !{!17, !7, i64 648}
!40 = !{!6, !11, i64 108}
!41 = !{!17, !7, i64 480}
!42 = !{!17, !7, i64 484}
!43 = !{!6, !8, i64 123}
!44 = !{!17, !11, i64 476}
!45 = !{!6, !11, i64 136}
!46 = !{!17, !7, i64 156}
!47 = !{!6, !10, i64 252}
!48 = !{!17, !11, i64 216}
!49 = !{!17, !7, i64 160}
!50 = !{!6, !10, i64 254}
!51 = !{!17, !7, i64 164}
!52 = !{!17, !7, i64 168}
!53 = !{!17, !7, i64 172}
!54 = !{!6, !8, i64 39}
!55 = !{!17, !7, i64 176}
!56 = !{!6, !8, i64 122}
!57 = !{!17, !7, i64 180}
!58 = !{!6, !10, i64 74}
!59 = !{!17, !7, i64 184}
!60 = !{!6, !10, i64 120}
!61 = !{!17, !11, i64 188}
!62 = !{!6, !11, i64 132}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass