; LLVM IR from NaokiHori/VerySimpleNSSolver :: src/save (snpyio)

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

@magic_string = external hidden constant [7 x i8], align 1
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__.snpyio_w_header = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden void @memory_free(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @error_handlings() #0

; Function Attrs: nounwind uwtable
define dso_local i32 @snpyio_w_header(i64 noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i8, align 1
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca [6 x ptr], align 16
  %25 = alloca [6 x i64], align 16
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  store i64 %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !9
  %29 = zext i1 %3 to i8
  store i8 %29, ptr %11, align 1, !tbaa !11
  store ptr %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !9
  %30 = load i64, ptr %8, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !9
  %32 = call i32 @sanitise_shape(i64 noundef %30, ptr noundef %31)
  %33 = icmp ne i32 0, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %6
  br label %137

35:                                               ; preds = %6
  %36 = load ptr, ptr %10, align 8, !tbaa !9
  %37 = call i32 @sanitise_dtype(ptr noundef %36)
  %38 = icmp ne i32 0, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %35
  br label %137

40:                                               ; preds = %35
  %41 = load ptr, ptr %12, align 8, !tbaa !9
  %42 = call i32 @sanitise_fp(ptr noundef %41)
  %43 = icmp ne i32 0, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %40
  br label %137

45:                                               ; preds = %40
  store i64 6, ptr %14, align 8, !tbaa !5
  store i8 0, ptr %15, align 1, !tbaa !13
  store ptr null, ptr %16, align 8, !tbaa !9
  store i64 0, ptr %17, align 8, !tbaa !5
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = load ptr, ptr %9, align 8, !tbaa !9
  %48 = load ptr, ptr %10, align 8, !tbaa !9
  %49 = load i8, ptr %11, align 1, !tbaa !11, !range !14, !noundef !15
  %50 = trunc i8 %49 to i1
  %51 = call i32 @create_dict(ptr noundef %16, ptr noundef %17, i64 noundef %46, ptr noundef %47, ptr noundef %48, i1 noundef zeroext %50)
  %52 = icmp ne i32 0, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %45
  br label %137

54:                                               ; preds = %45
  store ptr null, ptr %18, align 8, !tbaa !9
  store i64 0, ptr %19, align 8, !tbaa !5
  store i8 0, ptr %20, align 1, !tbaa !13
  %55 = load ptr, ptr %13, align 8, !tbaa !9
  store i64 0, ptr %55, align 8, !tbaa !5
  %56 = load ptr, ptr %13, align 8, !tbaa !9
  %57 = load i64, ptr %17, align 8, !tbaa !5
  %58 = call i32 @create_padding(ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %56, i64 noundef %57)
  %59 = icmp ne i32 0, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %54
  br label %137

61:                                               ; preds = %54
  store ptr null, ptr %21, align 8, !tbaa !9
  store i64 0, ptr %22, align 8, !tbaa !5
  %62 = load i8, ptr %20, align 1, !tbaa !13
  %63 = load i64, ptr %17, align 8, !tbaa !5
  %64 = load i64, ptr %19, align 8, !tbaa !5
  %65 = call i32 @create_header_len(ptr noundef %21, ptr noundef %22, i8 noundef zeroext %62, i64 noundef %63, i64 noundef %64)
  %66 = icmp ne i32 0, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %61
  br label %137

68:                                               ; preds = %61
  %69 = load ptr, ptr %13, align 8, !tbaa !9
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = call ptr @memory_alloc(i64 noundef 1, i64 noundef %70)
  store ptr %71, ptr %23, align 8, !tbaa !9
  store ptr @magic_string, ptr %24, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %24, i64 1
  store ptr %20, ptr %72, align 8, !tbaa !9
  %73 = getelementptr inbounds ptr, ptr %24, i64 2
  store ptr %15, ptr %73, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %24, i64 3
  %75 = load ptr, ptr %21, align 8, !tbaa !9
  store ptr %75, ptr %74, align 8, !tbaa !9
  %76 = getelementptr inbounds ptr, ptr %24, i64 4
  %77 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %77, ptr %76, align 8, !tbaa !9
  %78 = getelementptr inbounds ptr, ptr %24, i64 5
  %79 = load ptr, ptr %18, align 8, !tbaa !9
  store ptr %79, ptr %78, align 8, !tbaa !9
  store i64 6, ptr %25, align 8, !tbaa !5
  %80 = getelementptr inbounds i64, ptr %25, i64 1
  store i64 1, ptr %80, align 8, !tbaa !5
  %81 = getelementptr inbounds i64, ptr %25, i64 2
  store i64 1, ptr %81, align 8, !tbaa !5
  %82 = getelementptr inbounds i64, ptr %25, i64 3
  %83 = load i64, ptr %22, align 8, !tbaa !5
  %84 = mul i64 %83, 1
  store i64 %84, ptr %82, align 8, !tbaa !5
  %85 = getelementptr inbounds i64, ptr %25, i64 4
  %86 = load i64, ptr %17, align 8, !tbaa !5
  %87 = mul i64 %86, 1
  store i64 %87, ptr %85, align 8, !tbaa !5
  %88 = getelementptr inbounds i64, ptr %25, i64 5
  %89 = load i64, ptr %19, align 8, !tbaa !5
  %90 = mul i64 %89, 1
  store i64 %90, ptr %88, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store i64 0, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store i64 0, ptr %27, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %109, %68
  %92 = load i64, ptr %26, align 8, !tbaa !5
  %93 = icmp ult i64 %92, 6
  br i1 %93, label %95, label %94

94:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %112

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %96 = load i64, ptr %26, align 8, !tbaa !5
  %97 = getelementptr inbounds [6 x i64], ptr %25, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !5
  store i64 %98, ptr %28, align 8, !tbaa !5
  %99 = load ptr, ptr %23, align 8, !tbaa !9
  %100 = load i64, ptr %27, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %99, i64 %100
  %102 = load i64, ptr %26, align 8, !tbaa !5
  %103 = getelementptr inbounds [6 x ptr], ptr %24, i64 0, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = load i64, ptr %28, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %101, ptr align 1 %104, i64 %105, i1 false)
  %106 = load i64, ptr %28, align 8, !tbaa !5
  %107 = load i64, ptr %27, align 8, !tbaa !5
  %108 = add i64 %107, %106
  store i64 %108, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %109

109:                                              ; preds = %95
  %110 = load i64, ptr %26, align 8, !tbaa !5
  %111 = add i64 %110, 1
  store i64 %111, ptr %26, align 8, !tbaa !5
  br label %91, !llvm.loop !16

112:                                              ; preds = %94
  %113 = load ptr, ptr %23, align 8, !tbaa !9
  %114 = load ptr, ptr %13, align 8, !tbaa !9
  %115 = load i64, ptr %114, align 8, !tbaa !5
  %116 = load ptr, ptr %12, align 8, !tbaa !9
  %117 = call i64 @fwrite(ptr noundef %113, i64 noundef %115, i64 noundef 1, ptr noundef %116)
  %118 = icmp ne i64 1, %117
  br i1 %118, label %119, label %132

119:                                              ; preds = %112
  %120 = load ptr, ptr @stderr, align 8, !tbaa !9
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str, ptr noundef @.str.1) #5
  %122 = load ptr, ptr @stderr, align 8, !tbaa !9
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.2, i32 noundef 1128) #5
  %124 = load ptr, ptr @stderr, align 8, !tbaa !9
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.3, ptr noundef @__func__.snpyio_w_header) #5
  %126 = load ptr, ptr @stderr, align 8, !tbaa !9
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.4) #5
  %128 = load ptr, ptr @stderr, align 8, !tbaa !9
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.5) #5
  %130 = load ptr, ptr @stderr, align 8, !tbaa !9
  %131 = call i32 @fflush(ptr noundef %130)
  br label %137

132:                                              ; preds = %112
  %133 = load ptr, ptr %23, align 8, !tbaa !9
  call void @memory_free(ptr noundef %133)
  %134 = load ptr, ptr %16, align 8, !tbaa !9
  call void @memory_free(ptr noundef %134)
  %135 = load ptr, ptr %18, align 8, !tbaa !9
  call void @memory_free(ptr noundef %135)
  %136 = load ptr, ptr %21, align 8, !tbaa !9
  call void @memory_free(ptr noundef %136)
  store i32 0, ptr %7, align 4
  br label %138

137:                                              ; preds = %119, %67, %60, %53, %44, %39, %34
  call void @error_handlings()
  store i32 1, ptr %7, align 4
  br label %138

138:                                              ; preds = %137, %132
  %139 = load i32, ptr %7, align 4
  ret i32 %139
}

; Function Attrs: nounwind uwtable
declare hidden i32 @sanitise_shape(i64 noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden i32 @create_dict(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @create_padding(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @create_header_len(ptr noundef, ptr noundef, i8 noundef zeroext, i64 noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden ptr @memory_alloc(i64 noundef, i64 noundef) #0

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

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

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

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

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

declare i32 @fflush(ptr noundef) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 "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 = !{!"long", !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, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !17}
!17 = !{!"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"

@magic_string = external hidden local_unnamed_addr constant [7 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__.snpyio_w_header = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden void @memory_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @error_handlings() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @snpyio_w_header(i64 noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = tail call i32 @sanitise_shape(i64 noundef %0, ptr noundef %1)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %65

15:                                               ; preds = %6
  %16 = tail call i32 @sanitise_dtype(ptr noundef %2)
  %.not26 = icmp eq i32 %16, 0
  br i1 %.not26, label %17, label %65

17:                                               ; preds = %15
  %18 = tail call i32 @sanitise_fp(ptr noundef %4)
  %.not27 = icmp eq i32 %18, 0
  br i1 %.not27, label %19, label %65

19:                                               ; preds = %17
  store ptr null, ptr %7, align 8, !tbaa !5
  store i64 0, ptr %8, align 8, !tbaa !9
  %20 = call i32 @create_dict(ptr noundef nonnull %7, ptr noundef nonnull %8, i64 noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3)
  %.not28 = icmp eq i32 %20, 0
  br i1 %.not28, label %21, label %65

21:                                               ; preds = %19
  store ptr null, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !9
  store i8 0, ptr %11, align 1, !tbaa !11
  store i64 0, ptr %5, align 8, !tbaa !9
  %22 = load i64, ptr %8, align 8, !tbaa !9
  %23 = call i32 @create_padding(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %5, i64 noundef %22)
  %.not29 = icmp eq i32 %23, 0
  br i1 %.not29, label %24, label %65

24:                                               ; preds = %21
  store ptr null, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !9
  %25 = load i8, ptr %11, align 1, !tbaa !11
  %26 = load i64, ptr %8, align 8, !tbaa !9
  %27 = load i64, ptr %10, align 8, !tbaa !9
  %28 = call i32 @create_header_len(ptr noundef nonnull %12, ptr noundef nonnull %13, i8 noundef zeroext %25, i64 noundef %26, i64 noundef %27)
  %.not30 = icmp eq i32 %28, 0
  br i1 %.not30, label %29, label %65

29:                                               ; preds = %24
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = call ptr @memory_alloc(i64 noundef 1, i64 noundef %30)
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = load i64, ptr %13, align 8, !tbaa !9
  %36 = load i64, ptr %8, align 8, !tbaa !9
  %37 = load i64, ptr %10, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(6) %31, ptr noundef nonnull align 1 dereferenceable(6) @magic_string, i64 6, i1 false)
  %38 = getelementptr inbounds i8, ptr %31, i64 6
  %39 = load i8, ptr %11, align 1
  store i8 %39, ptr %38, align 1
  %40 = getelementptr inbounds i8, ptr %31, i64 7
  store i8 0, ptr %40, align 1
  %41 = getelementptr inbounds i8, ptr %31, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %41, ptr align 1 %32, i64 %35, i1 false)
  %42 = add i64 %35, 8
  %43 = getelementptr inbounds i8, ptr %31, i64 %42
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %43, ptr align 1 %33, i64 %36, i1 false)
  %44 = getelementptr i8, ptr %31, i64 %36
  %45 = getelementptr i8, ptr %44, i64 %42
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %45, ptr align 1 %34, i64 %37, i1 false)
  %46 = load i64, ptr %5, align 8, !tbaa !9
  %47 = call i64 @fwrite(ptr noundef %31, i64 noundef %46, i64 noundef 1, ptr noundef %4)
  %.not31 = icmp eq i64 %47, 1
  br i1 %.not31, label %61, label %48

48:                                               ; preds = %29
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1) #3
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.2, i32 noundef 1128) #3
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.snpyio_w_header) #3
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.4) #3
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.5) #3
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 @fflush(ptr noundef %59)
  br label %65

61:                                               ; preds = %29
  call void @memory_free(ptr noundef nonnull %31)
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  call void @memory_free(ptr noundef %62)
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  call void @memory_free(ptr noundef %63)
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  call void @memory_free(ptr noundef %64)
  br label %66

65:                                               ; preds = %24, %21, %19, %17, %15, %6, %48
  call void @error_handlings()
  br label %66

66:                                               ; preds = %65, %61
  %.0 = phi i32 [ 1, %65 ], [ 0, %61 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @sanitise_shape(i64 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden i32 @create_dict(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @create_padding(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @create_header_len(ptr noundef, ptr noundef, i8 noundef zeroext, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden ptr @memory_alloc(i64 noundef, i64 noundef) 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: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { cold 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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass