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

@g_ana_fields = external hidden global [47 x %struct.field_s], align 16
@stderr = external global ptr, align 8
@g_debug = external hidden global i32, align 4
@stdout = external global ptr, align 8
@.str.275 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.277 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [26 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_disp_anas(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 ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.nt_opts, ptr %11, i32 0, i32 31
  %13 = getelementptr inbounds %struct.str_list, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %16, label %21

16:                                               ; preds = %1
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.nt_opts, ptr %17, i32 0, i32 31
  %19 = getelementptr inbounds %struct.str_list, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !9
  br label %22

21:                                               ; preds = %1
  br label %22

22:                                               ; preds = %21, %16
  %23 = phi i32 [ %20, %16 ], [ 47, %21 ]
  store i32 %23, ptr %7, align 4, !tbaa !13
  %24 = load i32, ptr @g_debug, align 4, !tbaa !13
  %25 = icmp sgt i32 %24, 2
  br i1 %25, label %26, label %34

26:                                               ; preds = %22
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = load i32, ptr %7, align 4, !tbaa !13
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.nt_opts, ptr %29, i32 0, i32 33
  %31 = getelementptr inbounds %struct.str_list, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !14
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.278, i32 noundef %28, i32 noundef %32) #4
  br label %34

34:                                               ; preds = %26, %22
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %35

35:                                               ; preds = %137, %34
  %36 = load i32, ptr %8, align 4, !tbaa !13
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.nt_opts, ptr %37, i32 0, i32 33
  %39 = getelementptr inbounds %struct.str_list, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !14
  %41 = icmp slt i32 %36, %40
  br i1 %41, label %42, label %140

42:                                               ; preds = %35
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.nt_opts, ptr %44, i32 0, i32 33
  %46 = getelementptr inbounds %struct.str_list, ptr %45, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = load i32, ptr %8, align 4, !tbaa !13
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds ptr, ptr %47, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = call ptr @nt_read_header(ptr noundef %43, ptr noundef %51, ptr noundef null, i32 noundef 0)
  store ptr %52, ptr %4, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %56, label %55

55:                                               ; preds = %42
  store i32 1, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %141

56:                                               ; preds = %42
  %57 = load i32, ptr @g_debug, align 4, !tbaa !13
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %59, label %71

59:                                               ; preds = %56
  %60 = load ptr, ptr @stdout, align 8, !tbaa !5
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.nt_opts, ptr %61, i32 0, i32 33
  %63 = getelementptr inbounds %struct.str_list, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !15
  %65 = load i32, ptr %8, align 4, !tbaa !13
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds ptr, ptr %64, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = load i32, ptr %7, align 4, !tbaa !13
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.279, ptr noundef %68, i32 noundef %69) #4
  br label %71

71:                                               ; preds = %59, %56
  %72 = load i32, ptr @g_debug, align 4, !tbaa !13
  %73 = icmp sgt i32 %72, 1
  br i1 %73, label %74, label %82

74:                                               ; preds = %71
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call i32 @nifti_hdr_looks_good(ptr noundef %76)
  %78 = icmp ne i32 %77, 0
  %79 = zext i1 %78 to i64
  %80 = select i1 %78, ptr @.str.275, ptr @.str.276
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.280, ptr noundef %80) #4
  br label %82

82:                                               ; preds = %74, %71
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.nt_opts, ptr %83, i32 0, i32 31
  %85 = getelementptr inbounds %struct.str_list, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !9
  %87 = icmp sle i32 %86, 0
  br i1 %87, label %88, label %95

88:                                               ; preds = %82
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load i32, ptr %7, align 4, !tbaa !13
  %91 = load i32, ptr @g_debug, align 4, !tbaa !13
  %92 = icmp sgt i32 %91, 0
  %93 = zext i1 %92 to i32
  %94 = call i32 @disp_field(ptr noundef @.str.277, ptr noundef @g_ana_fields, ptr noundef %89, i32 noundef %90, i32 noundef %93)
  br label %135

95:                                               ; preds = %82
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.nt_opts, ptr %96, i32 0, i32 31
  %98 = getelementptr inbounds %struct.str_list, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  store ptr %99, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !13
  br label %100

100:                                              ; preds = %131, %95
  %101 = load i32, ptr %9, align 4, !tbaa !13
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.nt_opts, ptr %102, i32 0, i32 31
  %104 = getelementptr inbounds %struct.str_list, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !9
  %106 = icmp slt i32 %101, %105
  br i1 %106, label %107, label %134

107:                                              ; preds = %100
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !13
  %111 = icmp eq i32 %110, 0
  %112 = zext i1 %111 to i32
  %113 = call ptr @get_hdr_field(ptr noundef %109, i32 noundef %112)
  store ptr %113, ptr %5, align 8, !tbaa !5
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %128

116:                                              ; preds = %107
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = load i32, ptr @g_debug, align 4, !tbaa !13
  %120 = icmp sgt i32 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %116
  %122 = load i32, ptr %9, align 4, !tbaa !13
  %123 = icmp eq i32 %122, 0
  br label %124

124:                                              ; preds = %121, %116
  %125 = phi i1 [ false, %116 ], [ %123, %121 ]
  %126 = zext i1 %125 to i32
  %127 = call i32 @disp_field(ptr noundef null, ptr noundef %117, ptr noundef %118, i32 noundef 1, i32 noundef %126)
  br label %128

128:                                              ; preds = %124, %107
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds ptr, ptr %129, i32 1
  store ptr %130, ptr %6, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %128
  %132 = load i32, ptr %9, align 4, !tbaa !13
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %9, align 4, !tbaa !13
  br label %100, !llvm.loop !17

134:                                              ; preds = %100
  br label %135

135:                                              ; preds = %134, %88
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %136) #4
  br label %137

137:                                              ; preds = %135
  %138 = load i32, ptr %8, align 4, !tbaa !13
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %8, align 4, !tbaa !13
  br label %35, !llvm.loop !19

140:                                              ; preds = %35
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %141

141:                                              ; preds = %140, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %142 = load i32, ptr %2, align 4
  ret i32 %142
}

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @get_hdr_field(ptr noundef, i32 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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 208}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !7, i64 88, !7, i64 120, !11, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !6, i64 168, !12, i64 176, !12, i64 192, !12, i64 208, !12, i64 224, !12, i64 240, !7, i64 256}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !11, i64 0, !6, i64 8}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 240}
!15 = !{!10, !6, i64 248}
!16 = !{!10, !6, i64 216}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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_ana_fields = external hidden global [47 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
@stdout = external local_unnamed_addr global ptr, align 8
@.str.275 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.277 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @act_disp_anas(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 208
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  %spec.select = select i1 %4, i32 %3, i32 47
  %5 = load i32, ptr @g_debug, align 4, !tbaa !12
  %6 = icmp sgt i32 %5, 2
  br i1 %6, label %7, label %12

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

12:                                               ; preds = %7, %1
  %13 = getelementptr inbounds i8, ptr %0, i64 248
  %14 = getelementptr inbounds i8, ptr %0, i64 240
  %15 = load i32, ptr %14, align 8, !tbaa !14
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph41, label %._crit_edge

.lr.ph41:                                         ; preds = %12
  %17 = getelementptr inbounds i8, ptr %0, i64 216
  br label %18

18:                                               ; preds = %.lr.ph41, %.loopexit
  %indvars.iv = phi i64 [ 0, %.lr.ph41 ], [ %indvars.iv.next, %.loopexit ]
  %19 = load ptr, ptr %13, align 8, !tbaa !15
  %20 = getelementptr inbounds ptr, ptr %19, i64 %indvars.iv
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = tail call ptr @nt_read_header(ptr noundef nonnull %0, ptr noundef %21, ptr noundef null, i32 noundef 0)
  %.not = icmp eq ptr %22, null
  br i1 %.not, label %._crit_edge, label %23

23:                                               ; preds = %18
  %24 = load i32, ptr @g_debug, align 4, !tbaa !12
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %.thread

26:                                               ; preds = %23
  %27 = load ptr, ptr @stdout, align 8, !tbaa !13
  %28 = load ptr, ptr %13, align 8, !tbaa !15
  %29 = getelementptr inbounds ptr, ptr %28, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.279, ptr noundef %30, i32 noundef %spec.select) #5
  %.pr = load i32, ptr @g_debug, align 4, !tbaa !12
  %32 = icmp sgt i32 %.pr, 1
  br i1 %32, label %33, label %.thread

33:                                               ; preds = %26
  %34 = load ptr, ptr @stderr, align 8, !tbaa !13
  %35 = tail call i32 @nifti_hdr_looks_good(ptr noundef nonnull %22) #5
  %.not36 = icmp eq i32 %35, 0
  %36 = select i1 %.not36, ptr @.str.276, ptr @.str.275
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.280, ptr noundef nonnull %36) #4
  br label %.thread

.thread:                                          ; preds = %23, %33, %26
  %38 = load i32, ptr %2, align 8, !tbaa !5
  %39 = icmp slt i32 %38, 1
  br i1 %39, label %40, label %.lr.ph

40:                                               ; preds = %.thread
  %41 = load i32, ptr @g_debug, align 4, !tbaa !12
  %42 = icmp sgt i32 %41, 0
  %43 = zext i1 %42 to i32
  %44 = tail call i32 @disp_field(ptr noundef nonnull @.str.277, ptr noundef nonnull @g_ana_fields, ptr noundef nonnull %22, i32 noundef %spec.select, i32 noundef %43)
  br label %.loopexit

.lr.ph:                                           ; preds = %.thread
  %45 = load ptr, ptr %17, align 8, !tbaa !16
  %46 = icmp eq i64 %indvars.iv, 0
  %47 = zext i1 %46 to i32
  br label %48

48:                                               ; preds = %.lr.ph, %58
  %.039 = phi i32 [ 0, %.lr.ph ], [ %60, %58 ]
  %.03238 = phi ptr [ %45, %.lr.ph ], [ %59, %58 ]
  %49 = load ptr, ptr %.03238, align 8, !tbaa !13
  %50 = tail call ptr @get_hdr_field(ptr noundef %49, i32 noundef %47)
  %.not37 = icmp eq ptr %50, null
  br i1 %.not37, label %58, label %51

51:                                               ; preds = %48
  %52 = load i32, ptr @g_debug, align 4, !tbaa !12
  %53 = icmp sgt i32 %52, 0
  %54 = icmp eq i32 %.039, 0
  %55 = and i1 %54, %53
  %56 = zext i1 %55 to i32
  %57 = tail call i32 @disp_field(ptr noundef null, ptr noundef nonnull %50, ptr noundef nonnull %22, i32 noundef 1, i32 noundef %56)
  br label %58

58:                                               ; preds = %51, %48
  %59 = getelementptr inbounds i8, ptr %.03238, i64 8
  %60 = add nuw nsw i32 %.039, 1
  %61 = load i32, ptr %2, align 8, !tbaa !5
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %48, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %58, %40
  tail call void @free(ptr noundef %22) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = load i32, ptr %14, align 8, !tbaa !14
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next, %64
  br i1 %65, label %18, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %18, %.loopexit, %12
  %.031 = phi i32 [ 0, %12 ], [ 0, %.loopexit ], [ 1, %18 ]
  ret i32 %.031
}

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

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

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

declare i32 @nifti_hdr_looks_good(ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { cold nounwind }
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 208}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !8, i64 88, !8, i64 120, !7, i64 152, !7, i64 156, !7, i64 160, !7, i64 164, !10, i64 168, !11, i64 176, !11, i64 192, !11, i64 208, !11, i64 224, !11, i64 240, !8, i64 256}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0, !10, i64 8}
!12 = !{!7, !7, i64 0}
!13 = !{!10, !10, i64 0}
!14 = !{!6, !7, i64 240}
!15 = !{!6, !10, i64 248}
!16 = !{!6, !10, i64 216}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


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