; LLVM IR from libxsmm/libxsmm :: src (libxsmm_matrixeqn)

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

%union.libxsmm_meqn_info = type { %struct.libxsmm_meqn_arg }
%struct.libxsmm_meqn_arg = type { i32, i32, i32, i32, i32, i32, i32, %struct.libxsmm_matrix_arg_attributes }
%struct.libxsmm_matrix_arg_attributes = type { i32, i32, i32, i32 }
%struct.libxsmm_meqn_elem = type { ptr, ptr, ptr, ptr, i32, %union.libxsmm_meqn_info, i32, i32, %struct.libxsmm_meqn_tmp_info, i32, i32, i32, %union.libxsmm_meqn_fusion_info }
%struct.libxsmm_meqn_tmp_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%union.libxsmm_meqn_fusion_info = type { %struct.libxsmm_meqn_xgemm_fusion_info }
%struct.libxsmm_meqn_xgemm_fusion_info = type { i32, i32, i32, i32, i32 }

@.str.5 = external hidden unnamed_addr constant [73 x i8], align 1
@stderr = external global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_meqn_add_node = external hidden unnamed_addr constant [105 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [39 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @libxsmm_meqn_add_node(ptr noundef %0, i32 noundef %1, ptr noundef byval(%union.libxsmm_meqn_info) align 8 %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  %10 = load i32, ptr %6, align 4, !tbaa !9
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %15

12:                                               ; preds = %3
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef @.str.19) #6
  br label %15

15:                                               ; preds = %12, %3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %16, i32 0, i32 4
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = icmp eq i32 %18, 1
  br i1 %19, label %20, label %55

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %21 = call noalias ptr @malloc(i64 noundef 184) #7
  store ptr %21, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = icmp ne ptr null, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %20
  br label %26

25:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.5, i32 noundef 1005, ptr noundef @__PRETTY_FUNCTION__.libxsmm_meqn_add_node) #8
  unreachable

26:                                               ; preds = %24
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %27, i32 0, i32 0
  store ptr null, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %29, i32 0, i32 1
  store ptr null, ptr %30, align 8, !tbaa !11
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %31, i32 0, i32 2
  store ptr null, ptr %32, align 8, !tbaa !11
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %34, i32 0, i32 3
  store ptr %33, ptr %35, align 8, !tbaa !11
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %37, i32 0, i32 4
  store i32 %36, ptr %38, align 8, !tbaa !11
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %39, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 8 %2, i64 44, i1 false), !tbaa.struct !12
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %49

45:                                               ; preds = %26
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %47, i32 0, i32 0
  store ptr %46, ptr %48, align 8, !tbaa !11
  br label %53

49:                                               ; preds = %26
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str.21) #6
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %52) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %49, %45
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %54, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %195

55:                                               ; preds = %15
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %56, i32 0, i32 4
  %58 = load i32, ptr %57, align 8, !tbaa !11
  %59 = icmp eq i32 %58, 2
  br i1 %59, label %60, label %105

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %61 = call noalias ptr @malloc(i64 noundef 184) #7
  store ptr %61, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = icmp ne ptr null, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %60
  br label %66

65:                                               ; preds = %60
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.5, i32 noundef 1023, ptr noundef @__PRETTY_FUNCTION__.libxsmm_meqn_add_node) #8
  unreachable

66:                                               ; preds = %64
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %67, i32 0, i32 0
  store ptr null, ptr %68, align 8, !tbaa !11
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %69, i32 0, i32 1
  store ptr null, ptr %70, align 8, !tbaa !11
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %71, i32 0, i32 2
  store ptr null, ptr %72, align 8, !tbaa !11
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %74, i32 0, i32 3
  store ptr %73, ptr %75, align 8, !tbaa !11
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %77, i32 0, i32 4
  store i32 %76, ptr %78, align 8, !tbaa !11
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %79, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %80, ptr align 8 %2, i64 44, i1 false), !tbaa.struct !12
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %89

85:                                               ; preds = %66
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %87, i32 0, i32 0
  store ptr %86, ptr %88, align 8, !tbaa !11
  br label %103

89:                                               ; preds = %66
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %98

94:                                               ; preds = %89
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %96, i32 0, i32 1
  store ptr %95, ptr %97, align 8, !tbaa !11
  br label %102

98:                                               ; preds = %89
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.21) #6
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %101) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %102

102:                                              ; preds = %98, %94
  br label %103

103:                                              ; preds = %102, %85
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %104, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %195

105:                                              ; preds = %55
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %106, i32 0, i32 4
  %108 = load i32, ptr %107, align 8, !tbaa !11
  %109 = icmp eq i32 %108, 4
  br i1 %109, label %110, label %165

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %111 = call noalias ptr @malloc(i64 noundef 184) #7
  store ptr %111, ptr %9, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = icmp ne ptr null, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %110
  br label %116

115:                                              ; preds = %110
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.5, i32 noundef 1043, ptr noundef @__PRETTY_FUNCTION__.libxsmm_meqn_add_node) #8
  unreachable

116:                                              ; preds = %114
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %117, i32 0, i32 0
  store ptr null, ptr %118, align 8, !tbaa !11
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %119, i32 0, i32 1
  store ptr null, ptr %120, align 8, !tbaa !11
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %121, i32 0, i32 2
  store ptr null, ptr %122, align 8, !tbaa !11
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %124, i32 0, i32 3
  store ptr %123, ptr %125, align 8, !tbaa !11
  %126 = load i32, ptr %6, align 4, !tbaa !9
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %127, i32 0, i32 4
  store i32 %126, ptr %128, align 8, !tbaa !11
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %129, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %130, ptr align 8 %2, i64 44, i1 false), !tbaa.struct !12
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !11
  %134 = icmp eq ptr %133, null
  br i1 %134, label %135, label %139

135:                                              ; preds = %116
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %137, i32 0, i32 0
  store ptr %136, ptr %138, align 8, !tbaa !11
  br label %163

139:                                              ; preds = %116
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !11
  %143 = icmp eq ptr %142, null
  br i1 %143, label %144, label %148

144:                                              ; preds = %139
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %146, i32 0, i32 1
  store ptr %145, ptr %147, align 8, !tbaa !11
  br label %162

148:                                              ; preds = %139
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %149, i32 0, i32 2
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = icmp eq ptr %151, null
  br i1 %152, label %153, label %157

153:                                              ; preds = %148
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %155, i32 0, i32 2
  store ptr %154, ptr %156, align 8, !tbaa !11
  br label %161

157:                                              ; preds = %148
  %158 = load ptr, ptr @stderr, align 8, !tbaa !5
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str.21) #6
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %160) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  br label %161

161:                                              ; preds = %157, %153
  br label %162

162:                                              ; preds = %161, %144
  br label %163

163:                                              ; preds = %162, %135
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %164, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %195

165:                                              ; preds = %105
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %166, i32 0, i32 4
  %168 = load i32, ptr %167, align 8, !tbaa !11
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %188

170:                                              ; preds = %165
  %171 = load i32, ptr %6, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 8
  br i1 %172, label %173, label %188

173:                                              ; preds = %170
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %174, i32 0, i32 0
  store ptr null, ptr %175, align 8, !tbaa !11
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %176, i32 0, i32 1
  store ptr null, ptr %177, align 8, !tbaa !11
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %178, i32 0, i32 2
  store ptr null, ptr %179, align 8, !tbaa !11
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %180, i32 0, i32 3
  store ptr null, ptr %181, align 8, !tbaa !11
  %182 = load i32, ptr %6, align 4, !tbaa !9
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %183, i32 0, i32 4
  store i32 %182, ptr %184, align 8, !tbaa !11
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %185, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %186, ptr align 8 %2, i64 44, i1 false), !tbaa.struct !12
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %187, ptr %4, align 8
  br label %195

188:                                              ; preds = %170, %165
  %189 = load ptr, ptr @stderr, align 8, !tbaa !5
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.22) #6
  br label %191

191:                                              ; preds = %188
  br label %192

192:                                              ; preds = %191
  br label %193

193:                                              ; preds = %192
  br label %194

194:                                              ; preds = %193
  store ptr null, ptr %4, align 8
  br label %195

195:                                              ; preds = %194, %173, %163, %103, %53
  %196 = load ptr, ptr %4, align 8
  ret ptr %196
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i64 0, i64 44, !11}


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

%union.libxsmm_meqn_info = type { %struct.libxsmm_meqn_arg }
%struct.libxsmm_meqn_arg = type { i32, i32, i32, i32, i32, i32, i32, %struct.libxsmm_matrix_arg_attributes }
%struct.libxsmm_matrix_arg_attributes = type { i32, i32, i32, i32 }

@.str.5 = external hidden unnamed_addr constant [73 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.libxsmm_meqn_add_node = external hidden unnamed_addr constant [105 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @libxsmm_meqn_add_node(ptr noundef %0, i32 noundef %1, ptr nocapture noundef readonly byval(%union.libxsmm_meqn_info) align 8 %2) local_unnamed_addr #3 {
  %4 = icmp eq i32 %1, 0
  br i1 %4, label %5, label %8

5:                                                ; preds = %3
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.19) #7
  br label %8

8:                                                ; preds = %5, %3
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = load i32, ptr %9, align 8, !tbaa !9
  switch i32 %10, label %65 [
    i32 1, label %11
    i32 2, label %24
    i32 4, label %42
  ]

11:                                               ; preds = %8
  %12 = tail call noalias dereferenceable_or_null(184) ptr @malloc(i64 noundef 184) #8
  %.not75 = icmp eq ptr %12, null
  br i1 %.not75, label %13, label %14

13:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.5, i32 noundef 1005, ptr noundef nonnull @__PRETTY_FUNCTION__.libxsmm_meqn_add_node) #9
  unreachable

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %12, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %12, i8 0, i64 24, i1 false)
  store ptr %0, ptr %15, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %12, i64 32
  store i32 %1, ptr %16, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %12, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %17, ptr noundef nonnull align 8 dereferenceable(44) %2, i64 44, i1 false), !tbaa.struct !10
  %18 = load ptr, ptr %0, align 8, !tbaa !9
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %14
  store ptr %12, ptr %0, align 8, !tbaa !9
  br label %73

21:                                               ; preds = %14
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.21) #7
  tail call void @free(ptr noundef nonnull %12) #10
  br label %73

24:                                               ; preds = %8
  %25 = tail call noalias dereferenceable_or_null(184) ptr @malloc(i64 noundef 184) #8
  %.not74 = icmp eq ptr %25, null
  br i1 %.not74, label %26, label %27

26:                                               ; preds = %24
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.5, i32 noundef 1023, ptr noundef nonnull @__PRETTY_FUNCTION__.libxsmm_meqn_add_node) #9
  unreachable

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %25, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %25, i8 0, i64 24, i1 false)
  store ptr %0, ptr %28, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %25, i64 32
  store i32 %1, ptr %29, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %25, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %30, ptr noundef nonnull align 8 dereferenceable(44) %2, i64 44, i1 false), !tbaa.struct !10
  %31 = load ptr, ptr %0, align 8, !tbaa !9
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %34

33:                                               ; preds = %27
  store ptr %25, ptr %0, align 8, !tbaa !9
  br label %73

34:                                               ; preds = %27
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  store ptr %25, ptr %35, align 8, !tbaa !9
  br label %73

39:                                               ; preds = %34
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.21) #7
  tail call void @free(ptr noundef nonnull %25) #10
  br label %73

42:                                               ; preds = %8
  %43 = tail call noalias dereferenceable_or_null(184) ptr @malloc(i64 noundef 184) #8
  %.not = icmp eq ptr %43, null
  br i1 %.not, label %44, label %45

44:                                               ; preds = %42
  tail call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.5, i32 noundef 1043, ptr noundef nonnull @__PRETTY_FUNCTION__.libxsmm_meqn_add_node) #9
  unreachable

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %43, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %43, i8 0, i64 24, i1 false)
  store ptr %0, ptr %46, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %43, i64 32
  store i32 %1, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %43, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %48, ptr noundef nonnull align 8 dereferenceable(44) %2, i64 44, i1 false), !tbaa.struct !10
  %49 = load ptr, ptr %0, align 8, !tbaa !9
  %50 = icmp eq ptr %49, null
  br i1 %50, label %51, label %52

51:                                               ; preds = %45
  store ptr %43, ptr %0, align 8, !tbaa !9
  br label %73

52:                                               ; preds = %45
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %57

56:                                               ; preds = %52
  store ptr %43, ptr %53, align 8, !tbaa !9
  br label %73

57:                                               ; preds = %52
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = icmp eq ptr %59, null
  br i1 %60, label %61, label %62

61:                                               ; preds = %57
  store ptr %43, ptr %58, align 8, !tbaa !9
  br label %73

62:                                               ; preds = %57
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.21) #7
  tail call void @free(ptr noundef nonnull %43) #10
  br label %73

65:                                               ; preds = %8
  %66 = icmp eq i32 %10, 0
  %67 = icmp ne i32 %1, 8
  %or.cond = and i1 %67, %66
  br i1 %or.cond, label %68, label %70

68:                                               ; preds = %65
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, i8 0, i64 32, i1 false)
  store i32 %1, ptr %9, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %0, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %69, ptr noundef nonnull align 8 dereferenceable(44) %2, i64 44, i1 false), !tbaa.struct !10
  br label %73

70:                                               ; preds = %65
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.22) #7
  br label %73

73:                                               ; preds = %51, %61, %62, %56, %33, %39, %38, %20, %21, %70, %68
  %.068 = phi ptr [ %0, %68 ], [ null, %70 ], [ %12, %20 ], [ null, %21 ], [ %25, %33 ], [ %25, %38 ], [ null, %39 ], [ %43, %51 ], [ %43, %56 ], [ %43, %61 ], [ null, %62 ]
  ret ptr %.068
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{i64 0, i64 44, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass