; LLVM IR from cvxgrp/scs :: docs/src/examples (qp)

; 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.ScsMatrix = type { ptr, ptr, ptr, i32, i32 }
%struct.ScsData = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.ScsCone = type { i32, i32, ptr, ptr, i32, ptr, i32, ptr, i32, i32, i32, ptr, i32 }
%struct.ScsSettings = type { i32, double, i32, double, i32, double, double, double, double, double, i32, i32, i32, i32, ptr, ptr }
%struct.ScsInfo = type { i32, [128 x i8], [128 x i8], i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, double, double, double }
%struct.ScsSolution = type { ptr, ptr, ptr }

@__const.main.P_x = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.P_i = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.P_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.A_x = external hidden unnamed_addr constant [4 x double], align 16
@__const.main.A_i = external hidden unnamed_addr constant [4 x i32], align 16
@__const.main.A_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.b = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.c = external hidden unnamed_addr constant [2 x double], align 16
@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [3 x double], align 16
  %7 = alloca [3 x i32], align 4
  %8 = alloca [3 x i32], align 4
  %9 = alloca [4 x double], align 16
  %10 = alloca [4 x i32], align 16
  %11 = alloca [3 x i32], align 4
  %12 = alloca [3 x double], align 16
  %13 = alloca [2 x double], align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %struct.ScsMatrix, align 8
  %22 = alloca %struct.ScsMatrix, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.main.P_x, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 @__const.main.P_i, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 @__const.main.P_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.main.A_x, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.main.A_i, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 @__const.main.A_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.main.b, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const.main.c, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 2, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 3, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %27 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 88) #7
  store ptr %27, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %28 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 40) #7
  store ptr %28, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %29 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 112) #7
  store ptr %29, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %30 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 24) #7
  store ptr %30, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %31 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 400) #7
  store ptr %31, ptr %20, align 8, !tbaa !9
  %32 = load i32, ptr %15, align 4, !tbaa !5
  %33 = load ptr, ptr %17, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.ScsData, ptr %33, i32 0, i32 0
  store i32 %32, ptr %34, align 8, !tbaa !11
  %35 = load i32, ptr %14, align 4, !tbaa !5
  %36 = load ptr, ptr %17, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.ScsData, ptr %36, i32 0, i32 1
  store i32 %35, ptr %37, align 4, !tbaa !13
  %38 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  %39 = load ptr, ptr %17, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.ScsData, ptr %39, i32 0, i32 4
  store ptr %38, ptr %40, align 8, !tbaa !14
  %41 = getelementptr inbounds [2 x double], ptr %13, i64 0, i64 0
  %42 = load ptr, ptr %17, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.ScsData, ptr %42, i32 0, i32 5
  store ptr %41, ptr %43, align 8, !tbaa !15
  %44 = getelementptr inbounds %struct.ScsMatrix, ptr %21, i32 0, i32 0
  %45 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  store ptr %45, ptr %44, align 8, !tbaa !16
  %46 = getelementptr inbounds %struct.ScsMatrix, ptr %21, i32 0, i32 1
  %47 = getelementptr inbounds [4 x i32], ptr %10, i64 0, i64 0
  store ptr %47, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds %struct.ScsMatrix, ptr %21, i32 0, i32 2
  %49 = getelementptr inbounds [3 x i32], ptr %11, i64 0, i64 0
  store ptr %49, ptr %48, align 8, !tbaa !19
  %50 = getelementptr inbounds %struct.ScsMatrix, ptr %21, i32 0, i32 3
  %51 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %51, ptr %50, align 8, !tbaa !20
  %52 = getelementptr inbounds %struct.ScsMatrix, ptr %21, i32 0, i32 4
  %53 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %53, ptr %52, align 4, !tbaa !21
  %54 = load ptr, ptr %17, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.ScsData, ptr %54, i32 0, i32 2
  store ptr %21, ptr %55, align 8, !tbaa !22
  %56 = getelementptr inbounds %struct.ScsMatrix, ptr %22, i32 0, i32 0
  %57 = getelementptr inbounds [3 x double], ptr %6, i64 0, i64 0
  store ptr %57, ptr %56, align 8, !tbaa !16
  %58 = getelementptr inbounds %struct.ScsMatrix, ptr %22, i32 0, i32 1
  %59 = getelementptr inbounds [3 x i32], ptr %7, i64 0, i64 0
  store ptr %59, ptr %58, align 8, !tbaa !18
  %60 = getelementptr inbounds %struct.ScsMatrix, ptr %22, i32 0, i32 2
  %61 = getelementptr inbounds [3 x i32], ptr %8, i64 0, i64 0
  store ptr %61, ptr %60, align 8, !tbaa !19
  %62 = getelementptr inbounds %struct.ScsMatrix, ptr %22, i32 0, i32 3
  %63 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %63, ptr %62, align 8, !tbaa !20
  %64 = getelementptr inbounds %struct.ScsMatrix, ptr %22, i32 0, i32 4
  %65 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %65, ptr %64, align 4, !tbaa !21
  %66 = load ptr, ptr %17, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.ScsData, ptr %66, i32 0, i32 3
  store ptr %22, ptr %67, align 8, !tbaa !23
  %68 = load ptr, ptr %16, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.ScsCone, ptr %68, i32 0, i32 0
  store i32 1, ptr %69, align 8, !tbaa !24
  %70 = load ptr, ptr %16, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.ScsCone, ptr %70, i32 0, i32 1
  store i32 2, ptr %71, align 4, !tbaa !26
  %72 = load ptr, ptr %18, align 8, !tbaa !9
  call void @scs_set_default_settings(ptr noundef %72)
  %73 = load ptr, ptr %18, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.ScsSettings, ptr %73, i32 0, i32 5
  store double 1.000000e-09, ptr %74, align 8, !tbaa !27
  %75 = load ptr, ptr %18, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.ScsSettings, ptr %75, i32 0, i32 6
  store double 1.000000e-09, ptr %76, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %77 = load ptr, ptr %17, align 8, !tbaa !9
  %78 = load ptr, ptr %16, align 8, !tbaa !9
  %79 = load ptr, ptr %18, align 8, !tbaa !9
  %80 = call ptr @scs_init(ptr noundef %77, ptr noundef %78, ptr noundef %79)
  store ptr %80, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %81 = load ptr, ptr %23, align 8, !tbaa !9
  %82 = load ptr, ptr %19, align 8, !tbaa !9
  %83 = load ptr, ptr %20, align 8, !tbaa !9
  %84 = call i32 @scs_solve(ptr noundef %81, ptr noundef %82, ptr noundef %83, i32 noundef 0)
  store i32 %84, ptr %24, align 4, !tbaa !5
  %85 = load ptr, ptr %23, align 8, !tbaa !9
  call void @scs_finish(ptr noundef %85)
  %86 = load i32, ptr %24, align 4, !tbaa !5
  %87 = icmp eq i32 %86, 1
  %88 = zext i1 %87 to i32
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %88)
  %90 = load ptr, ptr %20, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.ScsInfo, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 8, !tbaa !31
  %93 = load ptr, ptr %20, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.ScsInfo, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds [128 x i8], ptr %94, i64 0, i64 0
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %92, ptr noundef %95)
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %113, %2
  %99 = load i32, ptr %25, align 4, !tbaa !5
  %100 = load i32, ptr %14, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %116

103:                                              ; preds = %98
  %104 = load i32, ptr %25, align 4, !tbaa !5
  %105 = load ptr, ptr %19, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.ScsSolution, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !33
  %108 = load i32, ptr %25, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !35
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %104, double noundef %111)
  br label %113

113:                                              ; preds = %103
  %114 = load i32, ptr %25, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %25, align 4, !tbaa !5
  br label %98, !llvm.loop !36

116:                                              ; preds = %102
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %133, %116
  %119 = load i32, ptr %26, align 4, !tbaa !5
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %136

123:                                              ; preds = %118
  %124 = load i32, ptr %26, align 4, !tbaa !5
  %125 = load ptr, ptr %19, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.ScsSolution, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !38
  %128 = load i32, ptr %26, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %127, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !35
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %124, double noundef %131)
  br label %133

133:                                              ; preds = %123
  %134 = load i32, ptr %26, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %26, align 4, !tbaa !5
  br label %118, !llvm.loop !39

136:                                              ; preds = %122
  %137 = load ptr, ptr %16, align 8, !tbaa !9
  call void @free(ptr noundef %137) #6
  %138 = load ptr, ptr %17, align 8, !tbaa !9
  call void @free(ptr noundef %138) #6
  %139 = load ptr, ptr %18, align 8, !tbaa !9
  call void @free(ptr noundef %139) #6
  %140 = load ptr, ptr %20, align 8, !tbaa !9
  call void @free(ptr noundef %140) #6
  %141 = load ptr, ptr %19, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.ScsSolution, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !33
  call void @free(ptr noundef %143) #6
  %144 = load ptr, ptr %19, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.ScsSolution, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !38
  call void @free(ptr noundef %146) #6
  %147 = load ptr, ptr %19, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.ScsSolution, ptr %147, i32 0, i32 2
  %149 = load ptr, ptr %148, align 8, !tbaa !40
  call void @free(ptr noundef %149) #6
  %150 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %150) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  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: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #3

declare void @scs_set_default_settings(ptr noundef) #4

declare ptr @scs_init(ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @scs_solve(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

declare void @scs_finish(ptr noundef) #4

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

; 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 void @free(ptr noundef) #5

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 = { nounwind allocsize(0,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 #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 = { 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 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }

!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 0}
!12 = !{!"", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !10, i64 24}
!15 = !{!12, !10, i64 32}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 28}
!18 = !{!17, !10, i64 8}
!19 = !{!17, !10, i64 16}
!20 = !{!17, !6, i64 24}
!21 = !{!17, !6, i64 28}
!22 = !{!12, !10, i64 8}
!23 = !{!12, !10, i64 16}
!24 = !{!25, !6, i64 0}
!25 = !{!"", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !10, i64 72, !6, i64 80}
!26 = !{!25, !6, i64 4}
!27 = !{!28, !29, i64 40}
!28 = !{!"", !6, i64 0, !29, i64 8, !6, i64 16, !29, i64 24, !6, i64 32, !29, i64 40, !29, i64 48, !29, i64 56, !29, i64 64, !29, i64 72, !6, i64 80, !6, i64 84, !6, i64 88, !6, i64 92, !10, i64 96, !10, i64 104}
!29 = !{!"double", !7, i64 0}
!30 = !{!28, !29, i64 48}
!31 = !{!32, !6, i64 0}
!32 = !{!"", !6, i64 0, !7, i64 4, !7, i64 132, !6, i64 260, !6, i64 264, !29, i64 272, !29, i64 280, !29, i64 288, !29, i64 296, !29, i64 304, !29, i64 312, !29, i64 320, !29, i64 328, !29, i64 336, !29, i64 344, !29, i64 352, !29, i64 360, !6, i64 368, !6, i64 372, !29, i64 376, !29, i64 384, !29, i64 392}
!33 = !{!34, !10, i64 0}
!34 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16}
!35 = !{!29, !29, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!34, !10, i64 8}
!39 = distinct !{!39, !37}
!40 = !{!34, !10, i64 16}


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

@__const.main.P_x = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.P_i = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.P_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.A_x = external hidden unnamed_addr constant [4 x double], align 16
@__const.main.A_i = external hidden unnamed_addr constant [4 x i32], align 16
@__const.main.A_p = external hidden unnamed_addr constant [3 x i32], align 4
@__const.main.b = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.c = external hidden unnamed_addr constant [2 x double], align 16
@.str = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca [3 x double], align 16
  %4 = alloca [3 x i32], align 4
  %5 = alloca [3 x i32], align 4
  %6 = alloca [4 x double], align 16
  %7 = alloca [4 x i32], align 16
  %8 = alloca [3 x i32], align 4
  %9 = alloca [3 x double], align 16
  %10 = alloca [2 x double], align 16
  %11 = alloca %struct.ScsMatrix, align 8
  %12 = alloca %struct.ScsMatrix, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %3, ptr noundef nonnull align 16 dereferenceable(24) @__const.main.P_x, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) @__const.main.P_i, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) @__const.main.P_p, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, ptr noundef nonnull align 16 dereferenceable(32) @__const.main.A_x, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.A_i, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) @__const.main.A_p, i64 12, i1 false)
  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.b, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.c, i64 16, i1 false)
  %13 = tail call noalias dereferenceable_or_null(88) ptr @calloc(i64 noundef 1, i64 noundef 88) #8
  %14 = tail call noalias dereferenceable_or_null(40) ptr @calloc(i64 noundef 1, i64 noundef 40) #8
  %15 = tail call noalias dereferenceable_or_null(112) ptr @calloc(i64 noundef 1, i64 noundef 112) #8
  %16 = tail call noalias dereferenceable_or_null(24) ptr @calloc(i64 noundef 1, i64 noundef 24) #8
  %17 = tail call noalias dereferenceable_or_null(400) ptr @calloc(i64 noundef 1, i64 noundef 400) #8
  store i32 3, ptr %14, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %14, i64 4
  store i32 2, ptr %18, align 4, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %14, i64 24
  store ptr %9, ptr %19, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %14, i64 32
  store ptr %10, ptr %20, align 8, !tbaa !13
  store ptr %6, ptr %11, align 8, !tbaa !14
  %21 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr %7, ptr %21, align 8, !tbaa !16
  %22 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr %8, ptr %22, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %11, i64 24
  store i32 3, ptr %23, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %11, i64 28
  store i32 2, ptr %24, align 4, !tbaa !19
  %25 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %11, ptr %25, align 8, !tbaa !20
  store ptr %3, ptr %12, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %4, ptr %26, align 8, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %12, i64 16
  store ptr %5, ptr %27, align 8, !tbaa !17
  %28 = getelementptr inbounds i8, ptr %12, i64 24
  store i32 2, ptr %28, align 8, !tbaa !18
  %29 = getelementptr inbounds i8, ptr %12, i64 28
  store i32 2, ptr %29, align 4, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %14, i64 16
  store ptr %12, ptr %30, align 8, !tbaa !21
  store i32 1, ptr %13, align 8, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %13, i64 4
  store i32 2, ptr %31, align 4, !tbaa !24
  call void @scs_set_default_settings(ptr noundef %15) #7
  %32 = getelementptr inbounds i8, ptr %15, i64 40
  store <2 x double> <double 1.000000e-09, double 1.000000e-09>, ptr %32, align 8, !tbaa !25
  %33 = call ptr @scs_init(ptr noundef nonnull %14, ptr noundef nonnull %13, ptr noundef %15) #7
  %34 = call i32 @scs_solve(ptr noundef %33, ptr noundef %16, ptr noundef %17, i32 noundef 0) #7
  call void @scs_finish(ptr noundef %33) #7
  %35 = icmp eq i32 %34, 1
  %36 = zext i1 %35 to i32
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %36)
  %38 = load i32, ptr %17, align 8, !tbaa !27
  %39 = getelementptr inbounds i8, ptr %17, i64 132
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %38, ptr noundef nonnull %39)
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %42 = load ptr, ptr %16, align 8, !tbaa !29
  %43 = load double, ptr %42, align 8, !tbaa !25
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 0, double noundef %43)
  %45 = load ptr, ptr %16, align 8, !tbaa !29
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !25
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1, double noundef %47)
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %50 = getelementptr inbounds i8, ptr %16, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !31
  %52 = load double, ptr %51, align 8, !tbaa !25
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 0, double noundef %52)
  %54 = load ptr, ptr %50, align 8, !tbaa !31
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load double, ptr %55, align 8, !tbaa !25
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1, double noundef %56)
  %58 = load ptr, ptr %50, align 8, !tbaa !31
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %60 = load double, ptr %59, align 8, !tbaa !25
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2, double noundef %60)
  call void @free(ptr noundef %13) #7
  call void @free(ptr noundef %14) #7
  call void @free(ptr noundef %15) #7
  call void @free(ptr noundef %17) #7
  %62 = load ptr, ptr %16, align 8, !tbaa !29
  call void @free(ptr noundef %62) #7
  %63 = load ptr, ptr %50, align 8, !tbaa !31
  call void @free(ptr noundef %63) #7
  %64 = getelementptr inbounds i8, ptr %16, i64 16
  %65 = load ptr, ptr %64, align 8, !tbaa !32
  call void @free(ptr noundef %65) #7
  call void @free(ptr noundef %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #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,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

declare void @scs_set_default_settings(ptr noundef) local_unnamed_addr #4

declare ptr @scs_init(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare void @scs_finish(ptr noundef) local_unnamed_addr #4

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

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

; 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 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,zeroed") allocsize(0,1) 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,1) }

!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 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !10, i64 24}
!13 = !{!6, !10, i64 32}
!14 = !{!15, !10, i64 0}
!15 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28}
!16 = !{!15, !10, i64 8}
!17 = !{!15, !10, i64 16}
!18 = !{!15, !7, i64 24}
!19 = !{!15, !7, i64 28}
!20 = !{!6, !10, i64 8}
!21 = !{!6, !10, i64 16}
!22 = !{!23, !7, i64 0}
!23 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !7, i64 60, !7, i64 64, !10, i64 72, !7, i64 80}
!24 = !{!23, !7, i64 4}
!25 = !{!26, !26, i64 0}
!26 = !{!"double", !8, i64 0}
!27 = !{!28, !7, i64 0}
!28 = !{!"", !7, i64 0, !8, i64 4, !8, i64 132, !7, i64 260, !7, i64 264, !26, i64 272, !26, i64 280, !26, i64 288, !26, i64 296, !26, i64 304, !26, i64 312, !26, i64 320, !26, i64 328, !26, i64 336, !26, i64 344, !26, i64 352, !26, i64 360, !7, i64 368, !7, i64 372, !26, i64 376, !26, i64 384, !26, i64 392}
!29 = !{!30, !10, i64 0}
!30 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16}
!31 = !{!30, !10, i64 8}
!32 = !{!30, !10, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass