; LLVM IR from darnstrom/daqp :: codegen (codegen)

; 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.DAQPWorkspace = type { ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, i32, ptr, i32, i32, i32, double, ptr, ptr, i32, ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @render_daqp_workspace(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call i64 @strlen(ptr noundef %15) #8
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call i64 @strlen(ptr noundef %17) #8
  %19 = add i64 %16, %18
  %20 = add i64 %19, 3
  %21 = call noalias ptr @malloc(i64 noundef %20) #9
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call i64 @strlen(ptr noundef %22) #8
  %24 = add i64 %23, 3
  %25 = call noalias ptr @malloc(i64 noundef %24) #9
  store ptr %25, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call i64 @strlen(ptr noundef %26) #8
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call i64 @strlen(ptr noundef %28) #8
  %30 = add i64 %27, %29
  %31 = add i64 %30, 3
  %32 = call noalias ptr @malloc(i64 noundef %31) #9
  store ptr %32, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = call ptr @strcpy(ptr noundef %33, ptr noundef %34) #7
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call ptr @strcat(ptr noundef %36, ptr noundef %37) #7
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call ptr @strcat(ptr noundef %39, ptr noundef @.str) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call noalias ptr @fopen(ptr noundef %41, ptr noundef @.str.1)
  store ptr %42, ptr %10, align 8, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = call ptr @strcpy(ptr noundef %43, ptr noundef %44) #7
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = call ptr @strcat(ptr noundef %46, ptr noundef %47) #7
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = call ptr @strcat(ptr noundef %49, ptr noundef @.str.2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = call noalias ptr @fopen(ptr noundef %51, ptr noundef @.str.1)
  store ptr %52, ptr %11, align 8, !tbaa !5
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call ptr @strcpy(ptr noundef %53, ptr noundef %54) #7
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = call ptr @strcat(ptr noundef %56, ptr noundef @.str.3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %58, ptr %12, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %63, %3
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = load i8, ptr %60, align 1, !tbaa !9
  %62 = icmp ne i8 %61, 0
  br i1 %62, label %63, label %78

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %64 = call ptr @__ctype_toupper_loc() #10
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = load i8, ptr %66, align 1, !tbaa !9
  %68 = zext i8 %67 to i32
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %65, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !10
  store i32 %71, ptr %13, align 4, !tbaa !10
  %72 = load i32, ptr %13, align 4, !tbaa !10
  store i32 %72, ptr %14, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %73 = load i32, ptr %14, align 4, !tbaa !10
  %74 = trunc i32 %73 to i8
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 %74, ptr %75, align 1, !tbaa !9
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i32 1
  store ptr %77, ptr %12, align 8, !tbaa !5
  br label %59, !llvm.loop !12

78:                                               ; preds = %59
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.4, ptr noundef %80) #7
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.5, ptr noundef %83) #7
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.6) #7
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.7) #7
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.6) #7
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef @.str.7) #7
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str.8) #7
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.9) #7
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.DAQPWorkspace, ptr %98, i32 0, i32 28
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  call void @write_daqp_settings_src(ptr noundef %97, ptr noundef %100)
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.DAQPWorkspace, ptr %101, i32 0, i32 29
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %120

105:                                              ; preds = %78
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.DAQPWorkspace, ptr %107, i32 0, i32 29
  %109 = load ptr, ptr %108, align 8, !tbaa !17
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.DAQPWorkspace, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 8, !tbaa !18
  call void @write_daqp_bnb_h(ptr noundef %106, ptr noundef %109, i32 noundef %112)
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.DAQPWorkspace, ptr %114, i32 0, i32 29
  %116 = load ptr, ptr %115, align 8, !tbaa !17
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.DAQPWorkspace, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 8, !tbaa !18
  call void @write_daqp_bnb_src(ptr noundef %113, ptr noundef %116, i32 noundef %119)
  br label %120

120:                                              ; preds = %105, %78
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  call void @write_daqp_workspace_h(ptr noundef %121, ptr noundef %122)
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  call void @write_daqp_workspace_src(ptr noundef %123, ptr noundef %124)
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.10, ptr noundef %126) #7
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = call i32 @fclose(ptr noundef %128)
  %130 = load ptr, ptr %11, align 8, !tbaa !5
  %131 = call i32 @fclose(ptr noundef %130)
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %132) #7
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %133) #7
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %134) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret void
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() #6

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @write_daqp_settings_src(ptr noundef, ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @write_daqp_workspace_h(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @write_daqp_workspace_src(ptr noundef, ptr noundef) #0

declare i32 @fclose(ptr noundef) #5

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

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 = { nounwind allocsize(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 #3 = { 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 #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 = { "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 = { nounwind willreturn memory(none) "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 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(none) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 208}
!15 = !{!"", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !16, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !11, i64 168, !6, i64 176, !11, i64 184, !11, i64 188, !11, i64 192, !16, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !6, i64 232}
!16 = !{!"double", !7, i64 0}
!17 = !{!15, !6, i64 216}
!18 = !{!15, !11, i64 8}


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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @render_daqp_workspace(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #7
  %5 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %6 = add i64 %5, 3
  %7 = add i64 %6, %4
  %8 = tail call noalias ptr @malloc(i64 noundef %7) #8
  %9 = tail call noalias ptr @malloc(i64 noundef %6) #8
  %10 = tail call noalias ptr @malloc(i64 noundef %7) #8
  %11 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) %2) #9
  %12 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) %1) #9
  %13 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %8, ptr noundef nonnull dereferenceable(1) @.str) #9
  %14 = tail call noalias ptr @fopen(ptr noundef %8, ptr noundef nonnull @.str.1)
  %15 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) %2) #9
  %16 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) %1) #9
  %17 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.2) #9
  %18 = tail call noalias ptr @fopen(ptr noundef %10, ptr noundef nonnull @.str.1)
  %19 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) %1) #9
  %20 = tail call ptr @strcat(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.3) #9
  %21 = load i8, ptr %9, align 1, !tbaa !5
  %.not59 = icmp eq i8 %21, 0
  br i1 %.not59, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %22 = tail call ptr @__ctype_toupper_loc() #10
  br label %23

23:                                               ; preds = %.lr.ph, %23
  %24 = phi i8 [ %21, %.lr.ph ], [ %31, %23 ]
  %.060 = phi ptr [ %9, %.lr.ph ], [ %30, %23 ]
  %25 = load ptr, ptr %22, align 8, !tbaa !8
  %26 = zext i8 %24 to i64
  %27 = getelementptr inbounds i32, ptr %25, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !10
  %29 = trunc i32 %28 to i8
  store i8 %29, ptr %.060, align 1, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %.060, i64 1
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %.not = icmp eq i8 %31, 0
  br i1 %.not, label %._crit_edge, label %23, !llvm.loop !12

._crit_edge:                                      ; preds = %23, %3
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.4, ptr noundef nonnull %9) #9
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.5, ptr noundef nonnull %9) #9
  %34 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.6) #9
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.7) #9
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.6) #9
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.7) #9
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.8) #9
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.9) #9
  %40 = getelementptr inbounds i8, ptr %0, i64 208
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  tail call void @write_daqp_settings_src(ptr noundef %18, ptr noundef %41)
  %42 = getelementptr inbounds i8, ptr %0, i64 216
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %.not58 = icmp eq ptr %43, null
  br i1 %.not58, label %49, label %44

44:                                               ; preds = %._crit_edge
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  %46 = load i32, ptr %45, align 8, !tbaa !18
  tail call void @write_daqp_bnb_h(ptr noundef %14, ptr noundef nonnull %43, i32 noundef %46)
  %47 = load ptr, ptr %42, align 8, !tbaa !17
  %48 = load i32, ptr %45, align 8, !tbaa !18
  tail call void @write_daqp_bnb_src(ptr noundef %18, ptr noundef %47, i32 noundef %48)
  br label %49

49:                                               ; preds = %44, %._crit_edge
  tail call void @write_daqp_workspace_h(ptr noundef %14, ptr noundef nonnull %0)
  tail call void @write_daqp_workspace_src(ptr noundef %18, ptr noundef nonnull %0)
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.10, ptr noundef nonnull %9) #9
  %51 = tail call i32 @fclose(ptr noundef %14)
  %52 = tail call i32 @fclose(ptr noundef %18)
  tail call void @free(ptr noundef %8) #9
  tail call void @free(ptr noundef %10) #9
  tail call void @free(ptr noundef %9) #9
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() local_unnamed_addr #5

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

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

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

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

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

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

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

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

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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #2 = { 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 #3 = { 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 #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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 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 #7 = { nounwind willreturn memory(read) }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(none) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !9, i64 208}
!15 = !{!"", !9, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !9, i64 88, !9, i64 96, !9, i64 104, !9, i64 112, !9, i64 120, !16, i64 128, !9, i64 136, !9, i64 144, !9, i64 152, !9, i64 160, !11, i64 168, !9, i64 176, !11, i64 184, !11, i64 188, !11, i64 192, !16, i64 200, !9, i64 208, !9, i64 216, !11, i64 224, !9, i64 232}
!16 = !{!"double", !6, i64 0}
!17 = !{!15, !9, i64 216}
!18 = !{!15, !11, i64 8}


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