; LLVM IR from NOAA-PMEL/Ferret :: fer/ccr (EF_InternalUtil)

; 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.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.ExternalFunction = type { ptr, [40 x i8], [128 x i8], i32, i32, ptr }
%struct.ExternalFunctionInternals = type { float, [128 x i8], [40 x i8], [40 x i8], i32, i32, i32, i32, [9 x [6 x i32]], [9 x [6 x i32]], [6 x i32], [6 x i32], [6 x i32], i32, [6 x i32], [6 x %struct.Axis], [9 x [6 x i32]], [9 x [6 x i32]], [9 x [6 x i32]], [9 x i32], [9 x [40 x i8]], [9 x [40 x i8]], [9 x [128 x i8]] }
%struct.Axis = type { i32, i32, i32, i32, i32, double, double, double, [40 x i8] }

@sigjumpbuffer = external hidden global [1 x %struct.__jmp_buf_tag], align 16
@jumpbuffer = external hidden global [1 x %struct.__jmp_buf_tag], align 16
@canjump = external hidden global i32, align 4
@stderr = external global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [58 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
declare dso_local ptr @ef_ptr_from_id_ptr(ptr noundef) #1

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

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #2

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

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

; Function Attrs: nounwind
declare ptr @dlerror() #2

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind returns_twice
declare i32 @__sigsetjmp(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @efcn_gather_info_(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [1024 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = call ptr @ef_ptr_from_id_ptr(ptr noundef %10)
  store ptr %11, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %19

14:                                               ; preds = %1
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = load i32, ptr %16, align 4, !tbaa !9
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str.14, i32 noundef %17) #5
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

19:                                               ; preds = %1
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.ExternalFunction, ptr %20, i32 0, i32 4
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %19
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

25:                                               ; preds = %19
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ExternalFunction, ptr %26, i32 0, i32 2
  %28 = getelementptr inbounds [128 x i8], ptr %27, i64 0, i64 0
  %29 = call i32 @strcmp(ptr noundef %28, ptr noundef @.str.15) #6
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %33

32:                                               ; preds = %25
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %32, %31
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %62, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ExternalFunction, ptr %38, i32 0, i32 2
  %40 = getelementptr inbounds [128 x i8], ptr %39, i64 0, i64 0
  %41 = call ptr @strcpy(ptr noundef %37, ptr noundef %40) #5
  %42 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.ExternalFunction, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds [40 x i8], ptr %44, i64 0, i64 0
  %46 = call ptr @strcat(ptr noundef %42, ptr noundef %45) #5
  %47 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %48 = call ptr @strcat(ptr noundef %47, ptr noundef @.str.16) #5
  %49 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %50 = call ptr @dlopen(ptr noundef %49, i32 noundef 1) #5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ExternalFunction, ptr %51, i32 0, i32 0
  store ptr %50, ptr %52, align 8, !tbaa !13
  %53 = icmp eq ptr %50, null
  br i1 %53, label %54, label %61

54:                                               ; preds = %36
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ExternalFunction, ptr %56, i32 0, i32 1
  %58 = getelementptr inbounds [40 x i8], ptr %57, i64 0, i64 0
  %59 = call ptr @dlerror() #5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.17, ptr noundef %58, ptr noundef %59) #5
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

61:                                               ; preds = %36
  br label %62

62:                                               ; preds = %61, %33
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = call i32 @EF_New(ptr noundef %63)
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %67

66:                                               ; preds = %62
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

67:                                               ; preds = %62
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ExternalFunction, ptr %68, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  store ptr %70, ptr %7, align 8, !tbaa !5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ExternalFunctionInternals, ptr %71, i32 0, i32 4
  %73 = load i32, ptr %72, align 4, !tbaa !15
  %74 = icmp eq i32 %73, 2
  br i1 %74, label %75, label %128

75:                                               ; preds = %67
  %76 = call i32 @EF_Util_setsig(ptr noundef @.str.18)
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %75
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

79:                                               ; preds = %75
  %80 = call i32 @__sigsetjmp(ptr noundef @sigjumpbuffer, i32 noundef 1) #7
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %79
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

83:                                               ; preds = %79
  %84 = call i32 @_setjmp(ptr noundef @jumpbuffer) #7
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %83
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

87:                                               ; preds = %83
  store volatile i32 1, ptr @canjump, align 4, !tbaa !9
  %88 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ExternalFunction, ptr %89, i32 0, i32 1
  %91 = getelementptr inbounds [40 x i8], ptr %90, i64 0, i64 0
  %92 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %88, ptr noundef @.str.19, ptr noundef %91) #5
  %93 = load i32, ptr %5, align 4, !tbaa !9
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %101, label %95

95:                                               ; preds = %87
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.ExternalFunction, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %100 = call ptr @dlsym(ptr noundef %98, ptr noundef %99) #5
  store ptr %100, ptr %8, align 8, !tbaa !5
  br label %104

101:                                              ; preds = %87
  %102 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %103 = call ptr @internal_dlsym(ptr noundef %102)
  store ptr %103, ptr %8, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %101, %95
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = icmp eq ptr %105, null
  br i1 %106, label %107, label %119

107:                                              ; preds = %104
  %108 = load ptr, ptr @stderr, align 8, !tbaa !5
  %109 = getelementptr inbounds [1024 x i8], ptr %6, i64 0, i64 0
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.20, ptr noundef %109) #5
  %111 = load i32, ptr %5, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %117, label %113

113:                                              ; preds = %107
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call ptr @dlerror() #5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.21, ptr noundef %115) #5
  br label %117

117:                                              ; preds = %113, %107
  %118 = call i32 @EF_Util_ressig(ptr noundef @.str.18)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

119:                                              ; preds = %104
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  call void %120(ptr noundef %121)
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ExternalFunction, ptr %122, i32 0, i32 4
  store i32 1, ptr %123, align 4, !tbaa !11
  %124 = call i32 @EF_Util_ressig(ptr noundef @.str.18)
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %119
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

127:                                              ; preds = %119
  br label %134

128:                                              ; preds = %67
  %129 = load ptr, ptr @stderr, align 8, !tbaa !5
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ExternalFunctionInternals, ptr %130, i32 0, i32 4
  %132 = load i32, ptr %131, align 4, !tbaa !15
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str.22, i32 noundef %132) #5
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

134:                                              ; preds = %127
  store i32 0, ptr %2, align 4
  store i32 1, ptr %9, align 4
  br label %135

135:                                              ; preds = %134, %128, %126, %117, %86, %82, %78, %66, %54, %24, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %136 = load i32, ptr %2, align 4
  ret i32 %136
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden ptr @internal_dlsym(ptr noundef) #1

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 180}
!12 = !{!"", !6, i64 0, !7, i64 8, !7, i64 48, !10, i64 176, !10, i64 180, !6, i64 184}
!13 = !{!12, !6, i64 0}
!14 = !{!12, !6, i64 184}
!15 = !{!16, !10, i64 212}
!16 = !{!"", !17, i64 0, !7, i64 4, !7, i64 132, !7, i64 172, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !7, i64 228, !7, i64 444, !7, i64 660, !7, i64 684, !7, i64 708, !10, i64 732, !7, i64 736, !7, i64 760, !7, i64 1288, !7, i64 1504, !7, i64 1720, !7, i64 1936, !7, i64 1972, !7, i64 2332, !7, i64 2692}
!17 = !{!"float", !7, i64 0}


; 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.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@sigjumpbuffer = external hidden global [1 x %struct.__jmp_buf_tag], align 16
@jumpbuffer = external hidden global [1 x %struct.__jmp_buf_tag], align 16
@canjump = external hidden global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [58 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @ef_ptr_from_id_ptr(ptr noundef) local_unnamed_addr #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 #2

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

; Function Attrs: nounwind
declare ptr @dlopen(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nounwind
declare ptr @dlerror() local_unnamed_addr #3

; Function Attrs: nounwind
declare ptr @dlsym(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind returns_twice
declare i32 @__sigsetjmp(ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @efcn_gather_info_(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #7
  %3 = call ptr @ef_ptr_from_id_ptr(ptr noundef %0)
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %9

5:                                                ; preds = %1
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = load i32, ptr %0, align 4, !tbaa !9
  %8 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.14, i32 noundef %7) #8
  br label %65

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %3, i64 180
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %12, label %65

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %3, i64 48
  %14 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %13, ptr noundef nonnull dereferenceable(1) @.str.15) #9
  %.not27 = icmp eq i32 %14, 0
  br i1 %.not27, label %26, label %15

15:                                               ; preds = %12
  %16 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %13) #7
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) %17) #7
  %19 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.16) #7
  %20 = call ptr @dlopen(ptr noundef nonnull %2, i32 noundef 1) #7
  store ptr %20, ptr %3, align 8, !tbaa !13
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %26

22:                                               ; preds = %15
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = call ptr @dlerror() #7
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.17, ptr noundef nonnull %17, ptr noundef %24) #8
  br label %65

26:                                               ; preds = %15, %12
  %27 = call i32 @EF_New(ptr noundef nonnull %3)
  %.not28 = icmp eq i32 %27, 0
  br i1 %.not28, label %28, label %65

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %3, i64 184
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %30, i64 212
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = icmp eq i32 %32, 2
  br i1 %33, label %34, label %62

34:                                               ; preds = %28
  %35 = call i32 @EF_Util_setsig(ptr noundef nonnull @.str.18)
  %.not29 = icmp eq i32 %35, 0
  br i1 %.not29, label %36, label %65

36:                                               ; preds = %34
  %37 = call i32 @__sigsetjmp(ptr noundef nonnull @sigjumpbuffer, i32 noundef 1) #10
  %.not30 = icmp eq i32 %37, 0
  br i1 %.not30, label %38, label %65

38:                                               ; preds = %36
  %39 = call i32 @_setjmp(ptr noundef nonnull @jumpbuffer) #10
  %.not31 = icmp eq i32 %39, 0
  br i1 %.not31, label %40, label %65

40:                                               ; preds = %38
  store volatile i32 1, ptr @canjump, align 4, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %3, i64 8
  %42 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.19, ptr noundef nonnull %41) #7
  br i1 %.not27, label %43, label %.thread

43:                                               ; preds = %40
  %44 = call ptr @internal_dlsym(ptr noundef nonnull %2)
  %45 = icmp eq ptr %44, null
  br i1 %45, label %49, label %60

.thread:                                          ; preds = %40
  %46 = load ptr, ptr %3, align 8, !tbaa !13
  %47 = call ptr @dlsym(ptr noundef %46, ptr noundef nonnull %2) #7
  %48 = icmp eq ptr %47, null
  br i1 %48, label %52, label %60

49:                                               ; preds = %43
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.20, ptr noundef nonnull %2) #8
  br label %58

52:                                               ; preds = %.thread
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.20, ptr noundef nonnull %2) #8
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call ptr @dlerror() #7
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.21, ptr noundef %56) #8
  br label %58

58:                                               ; preds = %49, %52
  %59 = call i32 @EF_Util_ressig(ptr noundef nonnull @.str.18)
  br label %65

60:                                               ; preds = %.thread, %43
  %.034 = phi ptr [ %47, %.thread ], [ %44, %43 ]
  call void %.034(ptr noundef %0) #7
  store i32 1, ptr %10, align 4, !tbaa !11
  %61 = call i32 @EF_Util_ressig(ptr noundef nonnull @.str.18)
  %.not32 = icmp ne i32 %61, 0
  %. = sext i1 %.not32 to i32
  br label %65

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

65:                                               ; preds = %60, %38, %36, %34, %26, %9, %62, %58, %22, %5
  %.022 = phi i32 [ -1, %5 ], [ -1, %58 ], [ -1, %62 ], [ -1, %22 ], [ 0, %9 ], [ -1, %26 ], [ -1, %34 ], [ -1, %36 ], [ -1, %38 ], [ %., %60 ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #7
  ret i32 %.022
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nounwind uwtable
declare hidden ptr @internal_dlsym(ptr noundef) local_unnamed_addr #1

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 180}
!12 = !{!"", !6, i64 0, !7, i64 8, !7, i64 48, !10, i64 176, !10, i64 180, !6, i64 184}
!13 = !{!12, !6, i64 0}
!14 = !{!12, !6, i64 184}
!15 = !{!16, !10, i64 212}
!16 = !{!"", !17, i64 0, !7, i64 4, !7, i64 132, !7, i64 172, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !7, i64 228, !7, i64 444, !7, i64 660, !7, i64 684, !7, i64 708, !10, i64 732, !7, i64 736, !7, i64 760, !7, i64 1288, !7, i64 1504, !7, i64 1720, !7, i64 1936, !7, i64 1972, !7, i64 2332, !7, i64 2692}
!17 = !{!"float", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass