; LLVM IR from AngelPn/DBMS-Simulator :: src (main_HP)

; 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.record = type { i32, [15 x i8], [25 x i8], [50 x i8] }
%struct.HP_info = type { i32, i32, i8, ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [15 x i8], align 1
  %6 = alloca [25 x i8], align 16
  %7 = alloca [50 x i8], align 16
  %8 = alloca %struct.record, align 8
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %10 = call i32 @HP_CreateFile(ptr noundef @.str, i8 noundef signext 105, ptr noundef @.str.1, i32 noundef 4)
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %14

12:                                               ; preds = %0
  %13 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %16

14:                                               ; preds = %0
  %15 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %16

16:                                               ; preds = %14, %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %17 = call ptr @HP_OpenFile(ptr noundef @.str)
  store ptr %17, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %35

20:                                               ; preds = %16
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.HP_info, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.HP_info, ptr %24, i32 0, i32 2
  %26 = load i8, ptr %25, align 8, !tbaa !12
  %27 = sext i8 %26 to i32
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.HP_info, ptr %28, i32 0, i32 3
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.HP_info, ptr %31, i32 0, i32 4
  %33 = load i32, ptr %32, align 8, !tbaa !14
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %23, i32 noundef %27, ptr noundef %30, i32 noundef %33)
  br label %37

35:                                               ; preds = %16
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %37

37:                                               ; preds = %35, %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %38 = call noalias ptr @fopen(ptr noundef @.str.6, ptr noundef @.str.7)
  store ptr %38, ptr %3, align 8, !tbaa !5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @exit(i32 noundef 1) #5
  unreachable

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 15, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 25, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 50, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 96, ptr %8) #4
  br label %44

44:                                               ; preds = %62, %43
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds [15 x i8], ptr %5, i64 0, i64 0
  %47 = getelementptr inbounds [25 x i8], ptr %6, i64 0, i64 0
  %48 = getelementptr inbounds [50 x i8], ptr %7, i64 0, i64 0
  %49 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %45, ptr noundef @.str.9, ptr noundef %4, ptr noundef %46, ptr noundef %47, ptr noundef %48)
  %50 = icmp ne i32 %49, -1
  br i1 %50, label %51, label %63

51:                                               ; preds = %44
  %52 = load i32, ptr %4, align 4, !tbaa !15
  %53 = getelementptr inbounds [15 x i8], ptr %5, i64 0, i64 0
  %54 = getelementptr inbounds [25 x i8], ptr %6, i64 0, i64 0
  %55 = getelementptr inbounds [50 x i8], ptr %7, i64 0, i64 0
  call void @init_record(ptr noundef %8, i32 noundef %52, ptr noundef %53, ptr noundef %54, ptr noundef %55)
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = call i32 @HP_InsertEntry(ptr noundef byval(%struct.HP_info) align 8 %56, ptr noundef byval(%struct.record) align 8 %8)
  %58 = icmp eq i32 %57, -1
  br i1 %58, label %59, label %62

59:                                               ; preds = %51
  %60 = load i32, ptr %4, align 4, !tbaa !15
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %60)
  br label %62

62:                                               ; preds = %59, %51
  br label %44, !llvm.loop !16

63:                                               ; preds = %44
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = call i32 @fclose(ptr noundef %64)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 54, ptr %9, align 4, !tbaa !15
  %66 = load i32, ptr %9, align 4, !tbaa !15
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %66)
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %68, ptr noundef %9)
  %70 = icmp eq i32 %69, -1
  br i1 %70, label %71, label %73

71:                                               ; preds = %63
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  br label %73

73:                                               ; preds = %71, %63
  store i32 107, ptr %9, align 4, !tbaa !15
  %74 = load i32, ptr %9, align 4, !tbaa !15
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %74)
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %76, ptr noundef %9)
  %78 = icmp eq i32 %77, -1
  br i1 %78, label %79, label %81

79:                                               ; preds = %73
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  br label %81

81:                                               ; preds = %79, %73
  store i32 803, ptr %9, align 4, !tbaa !15
  %82 = load i32, ptr %9, align 4, !tbaa !15
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %82)
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %84, ptr noundef %9)
  %86 = icmp eq i32 %85, -1
  br i1 %86, label %87, label %89

87:                                               ; preds = %81
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  br label %89

89:                                               ; preds = %87, %81
  %90 = load i32, ptr %9, align 4, !tbaa !15
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %90)
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = call i32 @HP_DeleteEntry(ptr noundef byval(%struct.HP_info) align 8 %92, ptr noundef %9)
  %94 = icmp eq i32 %93, -1
  br i1 %94, label %95, label %97

95:                                               ; preds = %89
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  br label %97

97:                                               ; preds = %95, %89
  %98 = load i32, ptr %9, align 4, !tbaa !15
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %98)
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %100, ptr noundef %9)
  %102 = icmp eq i32 %101, -1
  br i1 %102, label %103, label %105

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

105:                                              ; preds = %103, %97
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = call i32 @HP_CloseFile(ptr noundef %106)
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %105
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  br label %113

111:                                              ; preds = %105
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  br label %113

113:                                              ; preds = %111, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 50, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 25, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 15, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  ret i32 0
}

declare i32 @HP_CreateFile(ptr noundef, i8 noundef signext, ptr noundef, i32 noundef) #1

declare i32 @printf(ptr noundef, ...) #1

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

declare ptr @HP_OpenFile(ptr noundef) #1

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #1

declare void @init_record(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @HP_InsertEntry(ptr noundef byval(%struct.HP_info) align 8, ptr noundef byval(%struct.record) align 8) #1

declare i32 @fclose(ptr noundef) #1

declare i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8, ptr noundef) #1

declare i32 @HP_DeleteEntry(ptr noundef byval(%struct.HP_info) align 8, ptr noundef) #1

declare i32 @HP_CloseFile(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { noreturn 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 #4 = { nounwind }
attributes #5 = { noreturn 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 4}
!10 = !{!"HP_info", !11, i64 0, !11, i64 4, !7, i64 8, !6, i64 16, !11, i64 24, !11, i64 28}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !7, i64 8}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !11, i64 24}
!15 = !{!11, !11, i64 0}
!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"

%struct.record = type { i32, [15 x i8], [25 x i8], [50 x i8] }
%struct.HP_info = type { i32, i32, i8, ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [15 x i8], align 1
  %3 = alloca [25 x i8], align 16
  %4 = alloca [50 x i8], align 16
  %5 = alloca %struct.record, align 8
  %6 = alloca i32, align 4
  %7 = tail call i32 @HP_CreateFile(ptr noundef nonnull @.str, i8 noundef signext 105, ptr noundef nonnull @.str.1, i32 noundef 4) #5
  %8 = icmp eq i32 %7, 0
  %.str.2..str.3 = select i1 %8, ptr @.str.2, ptr @.str.3
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3)
  %10 = tail call ptr @HP_OpenFile(ptr noundef nonnull @.str) #5
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %22, label %11

11:                                               ; preds = %0
  %12 = getelementptr inbounds i8, ptr %10, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %10, i64 8
  %15 = load i8, ptr %14, align 8, !tbaa !11
  %16 = sext i8 %15 to i32
  %17 = getelementptr inbounds i8, ptr %10, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %10, i64 24
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %13, i32 noundef %16, ptr noundef %18, i32 noundef %20)
  br label %24

22:                                               ; preds = %0
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %24

24:                                               ; preds = %22, %11
  %25 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7)
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  tail call void @exit(i32 noundef 1) #6
  unreachable

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 25, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 50, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #5
  %30 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %25, ptr noundef nonnull @.str.9, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %.not1617 = icmp eq i32 %30, -1
  br i1 %.not1617, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %29, %37
  %31 = load i32, ptr %1, align 4, !tbaa !14
  call void @init_record(ptr noundef nonnull %5, i32 noundef %31, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %32 = call i32 @HP_InsertEntry(ptr noundef byval(%struct.HP_info) align 8 %10, ptr noundef nonnull byval(%struct.record) align 8 %5) #5
  %33 = icmp eq i32 %32, -1
  br i1 %33, label %34, label %37

34:                                               ; preds = %.lr.ph
  %35 = load i32, ptr %1, align 4, !tbaa !14
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %35)
  br label %37

37:                                               ; preds = %34, %.lr.ph
  %38 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %25, ptr noundef nonnull @.str.9, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %.not16 = icmp eq i32 %38, -1
  br i1 %.not16, label %._crit_edge, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %37, %29
  %39 = call i32 @fclose(ptr noundef nonnull %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 54, ptr %6, align 4, !tbaa !14
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef 54)
  %41 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %10, ptr noundef nonnull %6) #5
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %45

43:                                               ; preds = %._crit_edge
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %45

45:                                               ; preds = %43, %._crit_edge
  store i32 107, ptr %6, align 4, !tbaa !14
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef 107)
  %47 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %10, ptr noundef nonnull %6) #5
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %51

51:                                               ; preds = %49, %45
  store i32 803, ptr %6, align 4, !tbaa !14
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef 803)
  %53 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %10, ptr noundef nonnull %6) #5
  %54 = icmp eq i32 %53, -1
  br i1 %54, label %55, label %57

55:                                               ; preds = %51
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %57

57:                                               ; preds = %55, %51
  %58 = load i32, ptr %6, align 4, !tbaa !14
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %58)
  %60 = call i32 @HP_DeleteEntry(ptr noundef byval(%struct.HP_info) align 8 %10, ptr noundef nonnull %6) #5
  %61 = icmp eq i32 %60, -1
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  br label %64

64:                                               ; preds = %62, %57
  %65 = load i32, ptr %6, align 4, !tbaa !14
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %65)
  %67 = call i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8 %10, ptr noundef nonnull %6) #5
  %68 = icmp eq i32 %67, -1
  br i1 %68, label %69, label %71

69:                                               ; preds = %64
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %71

71:                                               ; preds = %69, %64
  %72 = call i32 @HP_CloseFile(ptr noundef %10) #5
  %73 = icmp eq i32 %72, 0
  %.str.15..str.16 = select i1 %73, ptr @.str.15, ptr @.str.16
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.15..str.16)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 50, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 25, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

declare i32 @HP_CreateFile(ptr noundef, i8 noundef signext, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

declare ptr @HP_OpenFile(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @init_record(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @HP_InsertEntry(ptr noundef byval(%struct.HP_info) align 8, ptr noundef byval(%struct.record) align 8) local_unnamed_addr #1

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

declare i32 @HP_GetAllEntries(ptr noundef byval(%struct.HP_info) align 8, ptr noundef) local_unnamed_addr #1

declare i32 @HP_DeleteEntry(ptr noundef byval(%struct.HP_info) align 8, ptr noundef) local_unnamed_addr #1

declare i32 @HP_CloseFile(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noreturn 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 }
attributes #6 = { noreturn 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 4}
!6 = !{!"HP_info", !7, i64 0, !7, i64 4, !8, i64 8, !10, i64 16, !7, i64 24, !7, i64 28}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !8, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 24}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass