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

; 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_ref_code_pointer = type { ptr }
%struct.libxsmm_generated_code = type { ptr, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_x86_reference_kernel(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %union.libxsmm_ref_code_pointer, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = icmp eq i32 %17, 0
  %19 = zext i1 %18 to i64
  %20 = select i1 %18, i64 96, i64 32
  store i64 %20, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  store ptr %23, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i32 7, ptr %11, align 4, !tbaa !9
  store ptr null, ptr %12, align 8, !tbaa !15
  %24 = load i64, ptr %7, align 8, !tbaa !11
  %25 = call noalias ptr @malloc(i64 noundef %24) #8
  store ptr %25, ptr %9, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load i64, ptr %7, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %26, i8 0, i64 %27, i1 false)
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %35

30:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %31, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %32, ptr %14, align 8, !tbaa !5
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %33, ptr align 1 %34, i64 95, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %40

35:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %36, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %37, ptr %16, align 8, !tbaa !5
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %38, ptr align 1 %39, i64 32, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %40

40:                                               ; preds = %35, %30
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load i32, ptr %11, align 4, !tbaa !9
  call void @libxsmm_x86_instruction_open_stream_alt(ptr noundef %41, i32 noundef %42, i32 noundef 1)
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_push_reg(ptr noundef %43, i32 noundef 5)
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_alu_reg(ptr noundef %44, i32 noundef -1568407413, i32 noundef 4, i32 noundef 5)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load i64, ptr %7, align 8, !tbaa !11
  call void @libxsmm_x86_instruction_alu_imm(ptr noundef %45, i32 noundef 30008, i32 noundef 4, i64 noundef %46)
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef %47, i32 noundef -1568407413, i32 noundef 0, i64 noundef -64)
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_alu_reg(ptr noundef %48, i32 noundef 30001, i32 noundef 0, i32 noundef 4)
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %102, %40
  %50 = load i64, ptr %8, align 8, !tbaa !11
  %51 = load i64, ptr %7, align 8, !tbaa !11
  %52 = udiv i64 %51, 32
  %53 = icmp ult i64 %50, %52
  br i1 %53, label %54, label %105

54:                                               ; preds = %49
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %56, align 4, !tbaa !20
  %58 = icmp ult i32 %57, 1005
  br i1 %58, label %59, label %88

59:                                               ; preds = %54
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = load i64, ptr %8, align 8, !tbaa !11
  %63 = mul i64 32, %62
  %64 = getelementptr inbounds i8, ptr %61, i64 %63
  %65 = getelementptr inbounds i8, ptr %64, i64 0
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %60, ptr noundef %65, ptr noundef @.str, i8 noundef signext 120, i32 noundef 0)
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %67, i32 0, i32 6
  %69 = load i32, ptr %68, align 4, !tbaa !20
  %70 = load i64, ptr %8, align 8, !tbaa !11
  %71 = mul i64 32, %70
  %72 = add i64 0, %71
  %73 = trunc i64 %72 to i32
  call void @libxsmm_x86_instruction_vec_move(ptr noundef %66, i32 noundef %69, i32 noundef 537138704, i32 noundef 4, i32 noundef 127, i32 noundef 0, i32 noundef %73, i8 noundef signext 120, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1)
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i64, ptr %8, align 8, !tbaa !11
  %77 = mul i64 32, %76
  %78 = getelementptr inbounds i8, ptr %75, i64 %77
  %79 = getelementptr inbounds i8, ptr %78, i64 16
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %74, ptr noundef %79, ptr noundef @.str, i8 noundef signext 120, i32 noundef 0)
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %81, i32 0, i32 6
  %83 = load i32, ptr %82, align 4, !tbaa !20
  %84 = load i64, ptr %8, align 8, !tbaa !11
  %85 = mul i64 32, %84
  %86 = add i64 16, %85
  %87 = trunc i64 %86 to i32
  call void @libxsmm_x86_instruction_vec_move(ptr noundef %80, i32 noundef %83, i32 noundef 537138704, i32 noundef 4, i32 noundef 127, i32 noundef 0, i32 noundef %87, i8 noundef signext 120, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1)
  br label %101

88:                                               ; preds = %54
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load i64, ptr %8, align 8, !tbaa !11
  %92 = mul i64 32, %91
  %93 = getelementptr inbounds i8, ptr %90, i64 %92
  call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef %89, ptr noundef %93, ptr noundef @.str, i8 noundef signext 121, i32 noundef 0)
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %95, i32 0, i32 6
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = load i64, ptr %8, align 8, !tbaa !11
  %99 = mul i64 32, %98
  %100 = trunc i64 %99 to i32
  call void @libxsmm_x86_instruction_vec_move(ptr noundef %94, i32 noundef %97, i32 noundef 537138704, i32 noundef 4, i32 noundef 127, i32 noundef 0, i32 noundef %100, i8 noundef signext 121, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1)
  br label %101

101:                                              ; preds = %88, %59
  br label %102

102:                                              ; preds = %101
  %103 = load i64, ptr %8, align 8, !tbaa !11
  %104 = add i64 %103, 1
  store i64 %104, ptr %8, align 8, !tbaa !11
  br label %49, !llvm.loop !21

105:                                              ; preds = %49
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_alu_reg(ptr noundef %106, i32 noundef -1568407413, i32 noundef 4, i32 noundef 6)
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %112

109:                                              ; preds = %105
  store ptr @libxsmm_reference_gemm, ptr %12, align 8, !tbaa !15
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load i64, ptr %12, align 8, !tbaa !15
  call void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef %110, i32 noundef -1568407413, i32 noundef 0, i64 noundef %111)
  br label %115

112:                                              ; preds = %105
  store ptr @libxsmm_reference_elementwise, ptr %12, align 8, !tbaa !15
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load i64, ptr %12, align 8, !tbaa !15
  call void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef %113, i32 noundef -1568407413, i32 noundef 0, i64 noundef %114)
  br label %115

115:                                              ; preds = %112, %109
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 4, !tbaa !23
  %120 = add i32 %119, 1
  store i32 %120, ptr %118, align 4, !tbaa !23
  %121 = zext i32 %119 to i64
  %122 = getelementptr inbounds i8, ptr %116, i64 %121
  store i8 -1, ptr %122, align 1, !tbaa !15
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.libxsmm_generated_code, ptr %124, i32 0, i32 2
  %126 = load i32, ptr %125, align 4, !tbaa !23
  %127 = add i32 %126, 1
  store i32 %127, ptr %125, align 4, !tbaa !23
  %128 = zext i32 %126 to i64
  %129 = getelementptr inbounds i8, ptr %123, i64 %128
  store i8 -48, ptr %129, align 1, !tbaa !15
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_alu_reg(ptr noundef %130, i32 noundef -1568407413, i32 noundef 5, i32 noundef 4)
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_pop_reg(ptr noundef %131, i32 noundef 5)
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  call void @libxsmm_x86_instruction_close_stream_alt(ptr noundef %132, i32 noundef 1)
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %133) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret void
}

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

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

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

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

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

declare void @libxsmm_x86_instruction_open_stream_alt(ptr noundef, i32 noundef, i32 noundef) #5

declare void @libxsmm_x86_instruction_push_reg(ptr noundef, i32 noundef) #5

declare void @libxsmm_x86_instruction_alu_reg(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #5

declare void @libxsmm_x86_instruction_alu_imm(ptr noundef, i32 noundef, i32 noundef, i64 noundef) #5

declare void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef, i32 noundef, i32 noundef, i64 noundef) #5

declare void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext, i32 noundef) #5

declare void @libxsmm_x86_instruction_vec_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

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

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

declare void @libxsmm_x86_instruction_pop_reg(ptr noundef, i32 noundef) #5

declare void @libxsmm_x86_instruction_close_stream_alt(ptr noundef, i32 noundef) #5

; Function Attrs: nounwind
declare void @free(ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"libxsmm_generated_code", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!15 = !{!7, !7, i64 0}
!16 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9, i64 24, i64 4, !9, i64 28, i64 1, !15, i64 29, i64 3, !15, i64 32, i64 1, !15, i64 33, i64 8, !11, i64 41, i64 8, !11, i64 49, i64 1, !15, i64 50, i64 4, !9, i64 54, i64 4, !9, i64 58, i64 4, !9, i64 62, i64 2, !17, i64 64, i64 2, !17, i64 66, i64 1, !15, i64 67, i64 1, !15, i64 68, i64 1, !15, i64 69, i64 1, !15, i64 70, i64 2, !17, i64 72, i64 2, !17, i64 74, i64 2, !17, i64 76, i64 2, !17, i64 78, i64 2, !17, i64 80, i64 2, !17, i64 82, i64 4, !9, i64 86, i64 4, !9, i64 90, i64 4, !9, i64 94, i64 1, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9, i64 24, i64 1, !15, i64 25, i64 1, !15, i64 26, i64 1, !15, i64 27, i64 2, !17, i64 29, i64 2, !17, i64 31, i64 1, !15}
!20 = !{!14, !10, i64 28}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!14, !10, i64 12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_generator_x86_reference_kernel(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq i32 %2, 0
  %5 = select i1 %4, i64 96, i64 32
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %calloc = tail call ptr @calloc(i64 1, i64 %5)
  br i1 %4, label %7, label %8

7:                                                ; preds = %3
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(95) %calloc, ptr noundef nonnull align 1 dereferenceable(95) %1, i64 95, i1 false), !tbaa.struct !11
  br label %9

8:                                                ; preds = %3
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %calloc, ptr noundef nonnull align 1 dereferenceable(32) %1, i64 32, i1 false), !tbaa.struct !18
  br label %9

9:                                                ; preds = %8, %7
  tail call void @libxsmm_x86_instruction_open_stream_alt(ptr noundef nonnull %0, i32 noundef 7, i32 noundef 1) #5
  tail call void @libxsmm_x86_instruction_push_reg(ptr noundef nonnull %0, i32 noundef 5) #5
  tail call void @libxsmm_x86_instruction_alu_reg(ptr noundef nonnull %0, i32 noundef -1568407413, i32 noundef 4, i32 noundef 5) #5
  tail call void @libxsmm_x86_instruction_alu_imm(ptr noundef nonnull %0, i32 noundef 30008, i32 noundef 4, i64 noundef %5) #5
  tail call void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef nonnull %0, i32 noundef -1568407413, i32 noundef 0, i64 noundef -64) #5
  tail call void @libxsmm_x86_instruction_alu_reg(ptr noundef nonnull %0, i32 noundef 30001, i32 noundef 0, i32 noundef 4) #5
  %10 = lshr exact i64 %5, 5
  %11 = getelementptr inbounds i8, ptr %0, i64 28
  br label %12

12:                                               ; preds = %9, %25
  %.056 = phi i64 [ 0, %9 ], [ %26, %25 ]
  %13 = load i32, ptr %11, align 4, !tbaa !19
  %14 = icmp ult i32 %13, 1005
  %15 = shl nuw nsw i64 %.056, 5
  %16 = getelementptr inbounds i8, ptr %calloc, i64 %15
  %17 = trunc nuw nsw i64 %15 to i32
  br i1 %14, label %18, label %23

18:                                               ; preds = %12
  tail call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef nonnull %0, ptr noundef %16, ptr noundef nonnull @.str, i8 noundef signext 120, i32 noundef 0) #5
  %19 = load i32, ptr %11, align 4, !tbaa !19
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef nonnull %0, i32 noundef %19, i32 noundef 537138704, i32 noundef 4, i32 noundef 127, i32 noundef 0, i32 noundef %17, i8 noundef signext 120, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1) #5
  %20 = getelementptr inbounds i8, ptr %16, i64 16
  tail call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef nonnull %0, ptr noundef nonnull %20, ptr noundef nonnull @.str, i8 noundef signext 120, i32 noundef 0) #5
  %21 = load i32, ptr %11, align 4, !tbaa !19
  %22 = or disjoint i32 %17, 16
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef nonnull %0, i32 noundef %21, i32 noundef 537138704, i32 noundef 4, i32 noundef 127, i32 noundef 0, i32 noundef %22, i8 noundef signext 120, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1) #5
  br label %25

23:                                               ; preds = %12
  tail call void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef nonnull %0, ptr noundef %16, ptr noundef nonnull @.str, i8 noundef signext 121, i32 noundef 0) #5
  %24 = load i32, ptr %11, align 4, !tbaa !19
  tail call void @libxsmm_x86_instruction_vec_move(ptr noundef nonnull %0, i32 noundef %24, i32 noundef 537138704, i32 noundef 4, i32 noundef 127, i32 noundef 0, i32 noundef %17, i8 noundef signext 121, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1) #5
  br label %25

25:                                               ; preds = %18, %23
  %26 = add nuw nsw i64 %.056, 1
  %exitcond.not = icmp eq i64 %26, %10
  br i1 %exitcond.not, label %27, label %12, !llvm.loop !20

27:                                               ; preds = %25
  tail call void @libxsmm_x86_instruction_alu_reg(ptr noundef nonnull %0, i32 noundef -1568407413, i32 noundef 4, i32 noundef 6) #5
  %. = select i1 %4, i64 ptrtoint (ptr @libxsmm_reference_gemm to i64), i64 ptrtoint (ptr @libxsmm_reference_elementwise to i64)
  tail call void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef nonnull %0, i32 noundef -1568407413, i32 noundef 0, i64 noundef %.) #5
  %28 = getelementptr inbounds i8, ptr %0, i64 12
  %29 = load i32, ptr %28, align 4, !tbaa !22
  %30 = add i32 %29, 1
  store i32 %30, ptr %28, align 4, !tbaa !22
  %31 = zext i32 %29 to i64
  %32 = getelementptr inbounds i8, ptr %6, i64 %31
  store i8 -1, ptr %32, align 1, !tbaa !13
  %33 = load i32, ptr %28, align 4, !tbaa !22
  %34 = add i32 %33, 1
  store i32 %34, ptr %28, align 4, !tbaa !22
  %35 = zext i32 %33 to i64
  %36 = getelementptr inbounds i8, ptr %6, i64 %35
  store i8 -48, ptr %36, align 1, !tbaa !13
  tail call void @libxsmm_x86_instruction_alu_reg(ptr noundef nonnull %0, i32 noundef -1568407413, i32 noundef 5, i32 noundef 4) #5
  tail call void @libxsmm_x86_instruction_pop_reg(ptr noundef nonnull %0, i32 noundef 5) #5
  tail call void @libxsmm_x86_instruction_close_stream_alt(ptr noundef nonnull %0, i32 noundef 1) #5
  tail call void @free(ptr noundef %calloc) #5
  ret void
}

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

declare void @libxsmm_x86_instruction_open_stream_alt(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_push_reg(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_alu_reg(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_alu_imm(ptr noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_alu_imm_i64(ptr noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_full_vec_load_of_constants(ptr noundef, ptr noundef, ptr noundef, i8 noundef signext, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_vec_move(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i8 noundef signext, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_reference_gemm(ptr noundef, ptr noundef) #2

declare void @libxsmm_reference_elementwise(ptr noundef, ptr noundef) #2

declare void @libxsmm_x86_instruction_pop_reg(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @libxsmm_x86_instruction_close_stream_alt(ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 #4 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"libxsmm_generated_code", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 4, !12, i64 20, i64 4, !12, i64 24, i64 4, !12, i64 28, i64 1, !13, i64 29, i64 3, !13, i64 32, i64 1, !13, i64 33, i64 8, !14, i64 41, i64 8, !14, i64 49, i64 1, !13, i64 50, i64 4, !12, i64 54, i64 4, !12, i64 58, i64 4, !12, i64 62, i64 2, !16, i64 64, i64 2, !16, i64 66, i64 1, !13, i64 67, i64 1, !13, i64 68, i64 1, !13, i64 69, i64 1, !13, i64 70, i64 2, !16, i64 72, i64 2, !16, i64 74, i64 2, !16, i64 76, i64 2, !16, i64 78, i64 2, !16, i64 80, i64 2, !16, i64 82, i64 4, !12, i64 86, i64 4, !12, i64 90, i64 4, !12, i64 94, i64 1, !13}
!12 = !{!10, !10, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !8, i64 0}
!18 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 4, !12, i64 20, i64 4, !12, i64 24, i64 1, !13, i64 25, i64 1, !13, i64 26, i64 1, !13, i64 27, i64 2, !16, i64 29, i64 2, !16, i64 31, i64 1, !13}
!19 = !{!6, !10, i64 28}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !10, i64 12}


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