; LLVM IR from PREDICT-EPFL/piqp :: examples/c (c_sparse_example)

; 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.piqp_settings = type { double, double, double, double, i32, double, double, double, double, i32, i32, i32, i32, i32, i32, double, i32, i32, double, double, i32, double, double, double, i32, i32 }
%struct.piqp_data_sparse = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.piqp_workspace = type { ptr, %struct.pipq_solver_info, ptr }
%struct.pipq_solver_info = type { i32, i32, i32, i32 }
%struct.piqp_result = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.piqp_info }
%struct.piqp_info = type { i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, double, i32, i32, double, double, double, double }

@__const.main.P_x = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.P_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.P_i = external hidden unnamed_addr constant [2 x i32], align 4
@__const.main.c = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.A_x = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.A_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.b = external hidden unnamed_addr constant [1 x double], align 8
@__const.main.G_x = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.G_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.G_i = external hidden unnamed_addr constant [4 x i32], align 16
@__const.main.h = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.x_lb = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.x_ub = external hidden unnamed_addr constant [2 x double], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [2 x double], align 16
  %6 = alloca i32, align 4
  %7 = alloca [3 x i32], align 4
  %8 = alloca [2 x i32], align 4
  %9 = alloca [2 x double], align 16
  %10 = alloca [2 x double], align 16
  %11 = alloca i32, align 4
  %12 = alloca [3 x i32], align 4
  %13 = alloca [2 x i32], align 4
  %14 = alloca [1 x double], align 8
  %15 = alloca [3 x double], align 16
  %16 = alloca i32, align 4
  %17 = alloca [3 x i32], align 4
  %18 = alloca [4 x i32], align 16
  %19 = alloca [2 x double], align 16
  %20 = alloca [2 x double], align 16
  %21 = alloca [2 x double], align 16
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 2, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 2, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.main.P_x, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 @__const.main.P_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 @__const.main.P_i, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.main.c, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.main.A_x, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 2, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 @__const.main.A_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 4 %13, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 @__const.main.b, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 @__const.main.G_x, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 3, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 @__const.main.G_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 @__const.main.G_i, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 @__const.main.h, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const.main.x_lb, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 @__const.main.x_ub, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %26 = call noalias ptr @malloc(i64 noundef 168) #8
  store ptr %26, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %27 = call noalias ptr @malloc(i64 noundef 80) #8
  store ptr %27, ptr %24, align 8, !tbaa !9
  %28 = load ptr, ptr %23, align 8, !tbaa !9
  call void @piqp_set_default_settings_sparse(ptr noundef %28)
  %29 = load ptr, ptr %23, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.piqp_settings, ptr %29, i32 0, i32 24
  store i32 1, ptr %30, align 8, !tbaa !11
  %31 = load ptr, ptr %23, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.piqp_settings, ptr %31, i32 0, i32 25
  store i32 1, ptr %32, align 4, !tbaa !14
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load ptr, ptr %24, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.piqp_data_sparse, ptr %34, i32 0, i32 0
  store i32 %33, ptr %35, align 8, !tbaa !15
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = load ptr, ptr %24, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.piqp_data_sparse, ptr %37, i32 0, i32 1
  store i32 %36, ptr %38, align 4, !tbaa !17
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = load ptr, ptr %24, align 8, !tbaa !9
  %41 = getelementptr inbounds %struct.piqp_data_sparse, ptr %40, i32 0, i32 2
  store i32 %39, ptr %41, align 8, !tbaa !18
  %42 = load ptr, ptr %24, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.piqp_data_sparse, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !15
  %45 = load ptr, ptr %24, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.piqp_data_sparse, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !15
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = getelementptr inbounds [3 x i32], ptr %7, i64 0, i64 0
  %50 = getelementptr inbounds [2 x i32], ptr %8, i64 0, i64 0
  %51 = getelementptr inbounds [2 x double], ptr %5, i64 0, i64 0
  %52 = call ptr @piqp_csc_matrix(i32 noundef %44, i32 noundef %47, i32 noundef %48, ptr noundef %49, ptr noundef %50, ptr noundef %51)
  %53 = load ptr, ptr %24, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.piqp_data_sparse, ptr %53, i32 0, i32 3
  store ptr %52, ptr %54, align 8, !tbaa !19
  %55 = getelementptr inbounds [2 x double], ptr %9, i64 0, i64 0
  %56 = load ptr, ptr %24, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.piqp_data_sparse, ptr %56, i32 0, i32 4
  store ptr %55, ptr %57, align 8, !tbaa !20
  %58 = load ptr, ptr %24, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.piqp_data_sparse, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = load ptr, ptr %24, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.piqp_data_sparse, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !15
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 0
  %66 = getelementptr inbounds [2 x i32], ptr %13, i64 0, i64 0
  %67 = getelementptr inbounds [2 x double], ptr %10, i64 0, i64 0
  %68 = call ptr @piqp_csc_matrix(i32 noundef %60, i32 noundef %63, i32 noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %67)
  %69 = load ptr, ptr %24, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.piqp_data_sparse, ptr %69, i32 0, i32 5
  store ptr %68, ptr %70, align 8, !tbaa !21
  %71 = getelementptr inbounds [1 x double], ptr %14, i64 0, i64 0
  %72 = load ptr, ptr %24, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.piqp_data_sparse, ptr %72, i32 0, i32 6
  store ptr %71, ptr %73, align 8, !tbaa !22
  %74 = load ptr, ptr %24, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.piqp_data_sparse, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 8, !tbaa !18
  %77 = load ptr, ptr %24, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.piqp_data_sparse, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 8, !tbaa !15
  %80 = load i32, ptr %16, align 4, !tbaa !5
  %81 = getelementptr inbounds [3 x i32], ptr %17, i64 0, i64 0
  %82 = getelementptr inbounds [4 x i32], ptr %18, i64 0, i64 0
  %83 = getelementptr inbounds [3 x double], ptr %15, i64 0, i64 0
  %84 = call ptr @piqp_csc_matrix(i32 noundef %76, i32 noundef %79, i32 noundef %80, ptr noundef %81, ptr noundef %82, ptr noundef %83)
  %85 = load ptr, ptr %24, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct.piqp_data_sparse, ptr %85, i32 0, i32 7
  store ptr %84, ptr %86, align 8, !tbaa !23
  %87 = getelementptr inbounds [2 x double], ptr %19, i64 0, i64 0
  %88 = load ptr, ptr %24, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.piqp_data_sparse, ptr %88, i32 0, i32 8
  store ptr %87, ptr %89, align 8, !tbaa !24
  %90 = getelementptr inbounds [2 x double], ptr %20, i64 0, i64 0
  %91 = load ptr, ptr %24, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.piqp_data_sparse, ptr %91, i32 0, i32 9
  store ptr %90, ptr %92, align 8, !tbaa !25
  %93 = getelementptr inbounds [2 x double], ptr %21, i64 0, i64 0
  %94 = load ptr, ptr %24, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.piqp_data_sparse, ptr %94, i32 0, i32 10
  store ptr %93, ptr %95, align 8, !tbaa !26
  %96 = load ptr, ptr %24, align 8, !tbaa !9
  %97 = load ptr, ptr %23, align 8, !tbaa !9
  call void @piqp_setup_sparse(ptr noundef %22, ptr noundef %96, ptr noundef %97)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %98 = load ptr, ptr %22, align 8, !tbaa !9
  %99 = call i32 @piqp_solve(ptr noundef %98)
  store i32 %99, ptr %25, align 4, !tbaa !5
  %100 = load i32, ptr %25, align 4, !tbaa !5
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %100)
  %102 = load ptr, ptr %22, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.piqp_workspace, ptr %102, i32 0, i32 2
  %104 = load ptr, ptr %103, align 8, !tbaa !27
  %105 = getelementptr inbounds %struct.piqp_result, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !30
  %107 = getelementptr inbounds double, ptr %106, i64 0
  %108 = load double, ptr %107, align 8, !tbaa !33
  %109 = load ptr, ptr %22, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.piqp_workspace, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  %112 = getelementptr inbounds %struct.piqp_result, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !30
  %114 = getelementptr inbounds double, ptr %113, i64 1
  %115 = load double, ptr %114, align 8, !tbaa !33
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %108, double noundef %115)
  %117 = load ptr, ptr %22, align 8, !tbaa !9
  call void @piqp_cleanup(ptr noundef %117)
  %118 = load ptr, ptr %23, align 8, !tbaa !9
  call void @free(ptr noundef %118) #7
  %119 = load ptr, ptr %24, align 8, !tbaa !9
  call void @free(ptr noundef %119) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  ret i32 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare void @piqp_set_default_settings_sparse(ptr noundef) #5

declare ptr @piqp_csc_matrix(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #5

declare void @piqp_setup_sparse(ptr noundef, ptr noundef, ptr noundef) #5

declare i32 @piqp_solve(ptr noundef) #5

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

declare void @piqp_cleanup(ptr noundef) #5

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 "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 allocsize(0) }

!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 = !{!"int", !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, !6, i64 160}
!12 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !13, i64 96, !6, i64 104, !6, i64 108, !13, i64 112, !13, i64 120, !6, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !6, i64 160, !6, i64 164}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !6, i64 164}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !6, i64 8}
!19 = !{!16, !10, i64 16}
!20 = !{!16, !10, i64 24}
!21 = !{!16, !10, i64 32}
!22 = !{!16, !10, i64 40}
!23 = !{!16, !10, i64 48}
!24 = !{!16, !10, i64 56}
!25 = !{!16, !10, i64 64}
!26 = !{!16, !10, i64 72}
!27 = !{!28, !10, i64 24}
!28 = !{!"", !10, i64 0, !29, i64 8, !10, i64 24}
!29 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!30 = !{!31, !10, i64 0}
!31 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !32, i64 104}
!32 = !{!"", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !6, i64 120, !13, i64 128, !6, i64 136, !6, i64 140, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168}
!33 = !{!13, !13, 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"

@__const.main.P_x = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.P_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.P_i = external hidden unnamed_addr constant [2 x i32], align 4
@__const.main.c = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.A_x = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.A_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.b = external hidden unnamed_addr constant [1 x double], align 8
@__const.main.G_x = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.G_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.G_i = external hidden unnamed_addr constant [4 x i32], align 16
@__const.main.h = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.x_lb = external hidden unnamed_addr constant [2 x double], align 16
@__const.main.x_ub = external hidden unnamed_addr constant [2 x double], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [2 x double], align 16
  %2 = alloca [3 x i32], align 4
  %3 = alloca [2 x i32], align 8
  %4 = alloca [2 x double], align 16
  %5 = alloca [2 x double], align 16
  %6 = alloca [3 x i32], align 4
  %7 = alloca [2 x i32], align 8
  %8 = alloca [1 x double], align 8
  %9 = alloca [3 x double], align 16
  %10 = alloca [3 x i32], align 4
  %11 = alloca [4 x i32], align 16
  %12 = alloca [2 x double], align 16
  %13 = alloca [2 x double], align 16
  %14 = alloca [2 x double], align 16
  %15 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %1, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.P_x, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) @__const.main.P_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %16 = load i64, ptr @__const.main.P_i, align 4
  store i64 %16, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.c, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.A_x, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) @__const.main.A_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %17 = load i64, ptr @__const.main.b, align 8
  store i64 %17, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %9, ptr noundef nonnull align 16 dereferenceable(24) @__const.main.G_x, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) @__const.main.G_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.G_i, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %12, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.h, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.x_lb, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.x_ub, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %18 = tail call noalias dereferenceable_or_null(168) ptr @malloc(i64 noundef 168) #8
  %19 = tail call noalias dereferenceable_or_null(80) ptr @malloc(i64 noundef 80) #8
  tail call void @piqp_set_default_settings_sparse(ptr noundef %18) #7
  %20 = getelementptr inbounds i8, ptr %18, i64 160
  store i32 1, ptr %20, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %18, i64 164
  store i32 1, ptr %21, align 4, !tbaa !11
  store i32 2, ptr %19, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %19, i64 4
  store i32 1, ptr %22, align 4, !tbaa !15
  %23 = getelementptr inbounds i8, ptr %19, i64 8
  store i32 2, ptr %23, align 8, !tbaa !16
  %24 = call ptr @piqp_csc_matrix(i32 noundef 2, i32 noundef 2, i32 noundef 2, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %1) #7
  %25 = getelementptr inbounds i8, ptr %19, i64 16
  store ptr %24, ptr %25, align 8, !tbaa !17
  %26 = getelementptr inbounds i8, ptr %19, i64 24
  store ptr %4, ptr %26, align 8, !tbaa !18
  %27 = call ptr @piqp_csc_matrix(i32 noundef 1, i32 noundef 2, i32 noundef 2, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %5) #7
  %28 = getelementptr inbounds i8, ptr %19, i64 32
  store ptr %27, ptr %28, align 8, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %19, i64 40
  store ptr %8, ptr %29, align 8, !tbaa !20
  %30 = call ptr @piqp_csc_matrix(i32 noundef 2, i32 noundef 2, i32 noundef 3, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %9) #7
  %31 = getelementptr inbounds i8, ptr %19, i64 48
  store ptr %30, ptr %31, align 8, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %19, i64 56
  store ptr %12, ptr %32, align 8, !tbaa !22
  %33 = getelementptr inbounds i8, ptr %19, i64 64
  store ptr %13, ptr %33, align 8, !tbaa !23
  %34 = getelementptr inbounds i8, ptr %19, i64 72
  store ptr %14, ptr %34, align 8, !tbaa !24
  call void @piqp_setup_sparse(ptr noundef nonnull %15, ptr noundef nonnull %19, ptr noundef %18) #7
  %35 = load ptr, ptr %15, align 8, !tbaa !25
  %36 = call i32 @piqp_solve(ptr noundef %35) #7
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %36)
  %38 = load ptr, ptr %15, align 8, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load ptr, ptr %39, align 8, !tbaa !26
  %41 = load ptr, ptr %40, align 8, !tbaa !29
  %42 = load double, ptr %41, align 8, !tbaa !32
  %43 = getelementptr inbounds i8, ptr %41, i64 8
  %44 = load double, ptr %43, align 8, !tbaa !32
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %42, double noundef %44)
  %46 = load ptr, ptr %15, align 8, !tbaa !25
  call void @piqp_cleanup(ptr noundef %46) #7
  call void @free(ptr noundef %18) #7
  call void @free(ptr noundef %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

declare void @piqp_set_default_settings_sparse(ptr noundef) local_unnamed_addr #4

declare ptr @piqp_csc_matrix(i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @piqp_setup_sparse(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @piqp_solve(ptr noundef) local_unnamed_addr #4

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

declare void @piqp_cleanup(ptr 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

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

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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "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 = { 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 #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 }
attributes #8 = { nounwind allocsize(0) }

!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, !10, i64 160}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !10, i64 104, !10, i64 108, !7, i64 112, !7, i64 120, !10, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !10, i64 160, !10, i64 164}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 164}
!12 = !{!13, !10, i64 0}
!13 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!13, !10, i64 4}
!16 = !{!13, !10, i64 8}
!17 = !{!13, !14, i64 16}
!18 = !{!13, !14, i64 24}
!19 = !{!13, !14, i64 32}
!20 = !{!13, !14, i64 40}
!21 = !{!13, !14, i64 48}
!22 = !{!13, !14, i64 56}
!23 = !{!13, !14, i64 64}
!24 = !{!13, !14, i64 72}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !14, i64 24}
!27 = !{!"", !14, i64 0, !28, i64 8, !14, i64 24}
!28 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!29 = !{!30, !14, i64 0}
!30 = !{!"", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !31, i64 104}
!31 = !{!"", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !10, i64 120, !7, i64 128, !10, i64 136, !10, i64 140, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168}
!32 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass