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

; 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.libxsmm_meltw_unary_shape = type { i32, i32, i32, i32, i32, i32, i32 }
%union.libxsmm_xcopykernel = type { ptr }

@libxsmm_xcopy_jit = external dso_local global i32, align 64
@libxsmm_ninit = external global i32, align 4
@libxsmm_verbosity = external global i32, align 4
@stderr = external global ptr, align 8
@.str.60 = external hidden unnamed_addr constant [66 x i8], align 1
@libxsmm_itrans_batch.error_once = external hidden global i32, align 4
@.str.62 = external hidden unnamed_addr constant [66 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

declare void @libxsmm_init() #1

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

declare void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind writable sret(%struct.libxsmm_meltw_unary_shape) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare ptr @libxsmm_dispatch_meltw_unary(i32 noundef, ptr noundef byval(%struct.libxsmm_meltw_unary_shape) align 8, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @libxsmm_itrans_internal(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64, i32 noundef, i32 noundef) #4

declare i32 @libxsmm_xmalloc(ptr noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef) #1

declare void @libxsmm_xfree(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_itrans_batch(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11) #4 {
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca [1 x i8], align 1
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca %union.libxsmm_xcopykernel, align 8
  %35 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %36 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %37 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %38 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store i32 %1, ptr %14, align 4, !tbaa !9
  store i32 %2, ptr %15, align 4, !tbaa !9
  store i32 %3, ptr %16, align 4, !tbaa !9
  store i32 %4, ptr %17, align 4, !tbaa !9
  store i32 %5, ptr %18, align 4, !tbaa !9
  store i32 %6, ptr %19, align 4, !tbaa !9
  store i32 %7, ptr %20, align 4, !tbaa !9
  store ptr %8, ptr %21, align 8, !tbaa !5
  store i32 %9, ptr %22, align 4, !tbaa !9
  store i32 %10, ptr %23, align 4, !tbaa !9
  store i32 %11, ptr %24, align 4, !tbaa !9
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  %40 = icmp ne ptr null, %39
  br i1 %40, label %41, label %190

41:                                               ; preds = %12
  %42 = load i32, ptr %14, align 4, !tbaa !9
  %43 = icmp ult i32 0, %42
  br i1 %43, label %44, label %190

44:                                               ; preds = %41
  %45 = load i32, ptr %15, align 4, !tbaa !9
  %46 = load i32, ptr %17, align 4, !tbaa !9
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %48, label %190

48:                                               ; preds = %44
  %49 = load i32, ptr %16, align 4, !tbaa !9
  %50 = load i32, ptr %18, align 4, !tbaa !9
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %52, label %190

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = load i32, ptr %16, align 4, !tbaa !9
  %55 = mul nsw i32 %53, %54
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = mul i32 %55, %56
  store i32 %57, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %58 = load i32, ptr %22, align 4, !tbaa !9
  %59 = icmp sle i32 0, %58
  br i1 %59, label %60, label %62

60:                                               ; preds = %52
  %61 = load i32, ptr %22, align 4, !tbaa !9
  br label %65

62:                                               ; preds = %52
  %63 = load i32, ptr %22, align 4, !tbaa !9
  %64 = sub nsw i32 0, %63
  br label %65

65:                                               ; preds = %62, %60
  %66 = phi i32 [ %61, %60 ], [ %64, %62 ]
  store i32 %66, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %67 = load i32, ptr %26, align 4, !tbaa !9
  %68 = load i32, ptr %24, align 4, !tbaa !9
  %69 = sub nsw i32 %68, 1
  %70 = add nsw i32 %67, %69
  %71 = load i32, ptr %24, align 4, !tbaa !9
  %72 = sdiv i32 %70, %71
  store i32 %72, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %73 = load i32, ptr %23, align 4, !tbaa !9
  %74 = load i32, ptr %27, align 4, !tbaa !9
  %75 = mul nsw i32 %73, %74
  store i32 %75, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %76 = load i32, ptr %28, align 4, !tbaa !9
  %77 = load i32, ptr %27, align 4, !tbaa !9
  %78 = add nsw i32 %76, %77
  store i32 %78, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %79 = load i32, ptr %29, align 4, !tbaa !9
  %80 = load i32, ptr %26, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %84

82:                                               ; preds = %65
  %83 = load i32, ptr %29, align 4, !tbaa !9
  br label %86

84:                                               ; preds = %65
  %85 = load i32, ptr %26, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %84, %82
  %87 = phi i32 [ %83, %82 ], [ %85, %84 ]
  store i32 %87, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #5
  call void @llvm.memset.p0.i64(ptr align 1 %31, i8 0, i64 1, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %88, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  store ptr null, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  call void @llvm.memset.p0.i64(ptr align 8 %34, i8 0, i64 8, i1 false)
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = load i32, ptr %16, align 4, !tbaa !9
  %91 = icmp ne i32 %89, %90
  br i1 %91, label %99, label %92

92:                                               ; preds = %86
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = load i32, ptr %18, align 4, !tbaa !9
  %95 = icmp ne i32 %93, %94
  br i1 %95, label %99, label %96

96:                                               ; preds = %92
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = icmp ult i32 127, %97
  br i1 %98, label %99, label %166

99:                                               ; preds = %96, %92, %86
  %100 = load i32, ptr %25, align 4, !tbaa !9
  %101 = icmp sle i32 %100, 1
  br i1 %101, label %102, label %104

102:                                              ; preds = %99
  %103 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  store ptr %103, ptr %33, align 8, !tbaa !5
  br label %124

104:                                              ; preds = %99
  %105 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %106 = icmp ugt i32 2, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %104
  call void @libxsmm_init()
  br label %108

108:                                              ; preds = %107, %104
  %109 = load i32, ptr %25, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = call i32 @libxsmm_xmalloc(ptr noundef %33, i64 noundef %110, i64 noundef 0, i32 noundef 3, ptr noundef null, i64 noundef 0)
  %112 = icmp ne i32 0, %111
  br i1 %112, label %113, label %123

113:                                              ; preds = %108
  %114 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  %115 = icmp ne i32 0, %114
  br i1 %115, label %116, label %123

116:                                              ; preds = %113
  %117 = atomicrmw add ptr @libxsmm_itrans_batch.error_once, i32 1 seq_cst, align 4
  %118 = add i32 %117, 1
  %119 = icmp eq i32 1, %118
  br i1 %119, label %120, label %123

120:                                              ; preds = %116
  %121 = load ptr, ptr @stderr, align 8, !tbaa !5
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.60) #5
  br label %123

123:                                              ; preds = %120, %116, %113, %108
  br label %124

124:                                              ; preds = %123, %102
  %125 = load i32, ptr @libxsmm_xcopy_jit, align 64, !tbaa !9
  %126 = and i32 1, %125
  %127 = icmp ne i32 0, %126
  br i1 %127, label %128, label %165

128:                                              ; preds = %124
  %129 = load i32, ptr @libxsmm_xcopy_jit, align 64, !tbaa !9
  %130 = and i32 4, %129
  %131 = icmp ne i32 0, %130
  br i1 %131, label %138, label %132

132:                                              ; preds = %128
  %133 = load i32, ptr %15, align 4, !tbaa !9
  %134 = icmp sle i32 %133, 64
  br i1 %134, label %138, label %135

135:                                              ; preds = %132
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = icmp sle i32 %136, 64
  br i1 %137, label %138, label %165

138:                                              ; preds = %135, %132, %128
  %139 = load i32, ptr %14, align 4, !tbaa !9
  switch i32 %139, label %164 [
    i32 8, label %140
    i32 4, label %146
    i32 2, label %152
    i32 1, label %158
  ]

140:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 28, ptr %35) #5
  %141 = load i32, ptr %15, align 4, !tbaa !9
  %142 = load i32, ptr %16, align 4, !tbaa !9
  %143 = load i32, ptr %15, align 4, !tbaa !9
  %144 = load i32, ptr %18, align 4, !tbaa !9
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %35, i32 noundef %141, i32 noundef %142, i32 noundef %143, i32 noundef %144, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %145 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef byval(%struct.libxsmm_meltw_unary_shape) align 8 %35, i32 noundef 0)
  store ptr %145, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 28, ptr %35) #5
  br label %164

146:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 28, ptr %36) #5
  %147 = load i32, ptr %15, align 4, !tbaa !9
  %148 = load i32, ptr %16, align 4, !tbaa !9
  %149 = load i32, ptr %15, align 4, !tbaa !9
  %150 = load i32, ptr %18, align 4, !tbaa !9
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %36, i32 noundef %147, i32 noundef %148, i32 noundef %149, i32 noundef %150, i32 noundef 1, i32 noundef 1, i32 noundef 1)
  %151 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef byval(%struct.libxsmm_meltw_unary_shape) align 8 %36, i32 noundef 0)
  store ptr %151, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 28, ptr %36) #5
  br label %164

152:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 28, ptr %37) #5
  %153 = load i32, ptr %15, align 4, !tbaa !9
  %154 = load i32, ptr %16, align 4, !tbaa !9
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = load i32, ptr %18, align 4, !tbaa !9
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %37, i32 noundef %153, i32 noundef %154, i32 noundef %155, i32 noundef %156, i32 noundef 10, i32 noundef 10, i32 noundef 10)
  %157 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef byval(%struct.libxsmm_meltw_unary_shape) align 8 %37, i32 noundef 0)
  store ptr %157, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 28, ptr %37) #5
  br label %164

158:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 28, ptr %38) #5
  %159 = load i32, ptr %15, align 4, !tbaa !9
  %160 = load i32, ptr %16, align 4, !tbaa !9
  %161 = load i32, ptr %15, align 4, !tbaa !9
  %162 = load i32, ptr %18, align 4, !tbaa !9
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %38, i32 noundef %159, i32 noundef %160, i32 noundef %161, i32 noundef %162, i32 noundef 12, i32 noundef 12, i32 noundef 12)
  %163 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef byval(%struct.libxsmm_meltw_unary_shape) align 8 %38, i32 noundef 0)
  store ptr %163, ptr %34, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 28, ptr %38) #5
  br label %164

164:                                              ; preds = %158, %152, %146, %140, %138
  br label %165

165:                                              ; preds = %164, %135, %124
  br label %166

166:                                              ; preds = %165, %96
  %167 = load ptr, ptr %32, align 8, !tbaa !5
  %168 = load ptr, ptr %33, align 8, !tbaa !5
  %169 = load i32, ptr %14, align 4, !tbaa !9
  %170 = load i32, ptr %15, align 4, !tbaa !9
  %171 = load i32, ptr %16, align 4, !tbaa !9
  %172 = load i32, ptr %17, align 4, !tbaa !9
  %173 = load i32, ptr %18, align 4, !tbaa !9
  %174 = load i32, ptr %19, align 4, !tbaa !9
  %175 = load i32, ptr %20, align 4, !tbaa !9
  %176 = load ptr, ptr %21, align 8, !tbaa !5
  %177 = load i32, ptr %28, align 4, !tbaa !9
  %178 = load i32, ptr %30, align 4, !tbaa !9
  %179 = getelementptr inbounds %union.libxsmm_xcopykernel, ptr %34, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8
  %181 = ptrtoint ptr %180 to i64
  call void @libxsmm_itrans_internal(ptr noundef %167, ptr noundef %168, i32 noundef %169, i32 noundef %170, i32 noundef %171, i32 noundef %172, i32 noundef %173, i32 noundef %174, i32 noundef %175, ptr noundef %176, i64 %181, i32 noundef %177, i32 noundef %178)
  %182 = load ptr, ptr %33, align 8, !tbaa !5
  %183 = icmp ne ptr null, %182
  br i1 %183, label %184, label %189

184:                                              ; preds = %166
  %185 = load i32, ptr %25, align 4, !tbaa !9
  %186 = icmp slt i32 1, %185
  br i1 %186, label %187, label %189

187:                                              ; preds = %184
  %188 = load ptr, ptr %33, align 8, !tbaa !5
  call void @libxsmm_xfree(ptr noundef %188, i32 noundef 0)
  br label %189

189:                                              ; preds = %187, %184, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %201

190:                                              ; preds = %48, %44, %41, %12
  %191 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  %192 = icmp ne i32 0, %191
  br i1 %192, label %193, label %200

193:                                              ; preds = %190
  %194 = atomicrmw add ptr @libxsmm_itrans_batch.error_once, i32 1 seq_cst, align 4
  %195 = add i32 %194, 1
  %196 = icmp eq i32 1, %195
  br i1 %196, label %197, label %200

197:                                              ; preds = %193
  %198 = load ptr, ptr @stderr, align 8, !tbaa !5
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.62) #5
  br label %200

200:                                              ; preds = %197, %193, %190
  br label %201

201:                                              ; preds = %200, %189
  ret void
}

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


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

@libxsmm_xcopy_jit = external dso_local local_unnamed_addr global i32, align 64
@libxsmm_ninit = external local_unnamed_addr global i32, align 4
@libxsmm_verbosity = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.60 = external hidden unnamed_addr constant [66 x i8], align 1
@libxsmm_itrans_batch.error_once = external hidden global i32, align 4
@.str.62 = external hidden unnamed_addr constant [66 x i8], align 1

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

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

declare void @libxsmm_init() local_unnamed_addr #1

declare void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind writable sret(%struct.libxsmm_meltw_unary_shape) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare ptr @libxsmm_dispatch_meltw_unary(i32 noundef, ptr noundef byval(%struct.libxsmm_meltw_unary_shape) align 8, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @libxsmm_itrans_internal(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @libxsmm_xmalloc(ptr noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @libxsmm_xfree(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @libxsmm_itrans_batch(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11) local_unnamed_addr #3 {
  %13 = alloca [1 x i8], align 1
  %14 = alloca ptr, align 8
  %15 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %16 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %17 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %18 = alloca %struct.libxsmm_meltw_unary_shape, align 8
  %19 = icmp eq ptr %0, null
  %20 = icmp eq i32 %1, 0
  %or.cond.not87 = or i1 %19, %20
  %.not = icmp sgt i32 %2, %4
  %or.cond83 = or i1 %or.cond.not87, %.not
  %.not79 = icmp sgt i32 %3, %5
  %or.cond84 = or i1 %or.cond83, %.not79
  br i1 %or.cond84, label %78, label %21

21:                                               ; preds = %12
  %22 = mul i32 %2, %1
  %23 = mul i32 %22, %3
  %24 = tail call i32 @llvm.abs.i32(i32 %9, i1 true)
  %25 = add nsw i32 %24, -1
  %26 = add i32 %25, %11
  %27 = sdiv i32 %26, %11
  %28 = mul nsw i32 %27, %10
  %29 = add nsw i32 %28, %27
  %30 = tail call i32 @llvm.smin.i32(i32 %29, i32 %24)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  store i8 0, ptr %13, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  store ptr null, ptr %14, align 8, !tbaa !5
  %.not81 = icmp eq i32 %2, %3
  br i1 %.not81, label %31, label %34

31:                                               ; preds = %21
  %32 = icmp ne i32 %4, %5
  %33 = icmp ugt i32 %1, 127
  %or.cond3 = or i1 %33, %32
  br i1 %or.cond3, label %34, label %70

34:                                               ; preds = %31, %21
  %35 = icmp slt i32 %23, 2
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  store ptr %13, ptr %14, align 8, !tbaa !5
  br label %53

37:                                               ; preds = %34
  %38 = load i32, ptr @libxsmm_ninit, align 4, !tbaa !9
  %39 = icmp ult i32 %38, 2
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  tail call void @libxsmm_init() #5
  br label %41

41:                                               ; preds = %40, %37
  %42 = zext nneg i32 %23 to i64
  %43 = call i32 @libxsmm_xmalloc(ptr noundef nonnull %14, i64 noundef %42, i64 noundef 0, i32 noundef 3, ptr noundef null, i64 noundef 0) #5
  %44 = icmp ne i32 %43, 0
  %45 = load i32, ptr @libxsmm_verbosity, align 4
  %46 = icmp ne i32 %45, 0
  %or.cond5 = select i1 %44, i1 %46, i1 false
  br i1 %or.cond5, label %47, label %53

47:                                               ; preds = %41
  %48 = atomicrmw add ptr @libxsmm_itrans_batch.error_once, i32 1 seq_cst, align 4
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %53

50:                                               ; preds = %47
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.60) #6
  br label %53

53:                                               ; preds = %41, %47, %50, %36
  %54 = load i32, ptr @libxsmm_xcopy_jit, align 64, !tbaa !9
  %55 = and i32 %54, 1
  %.not82 = icmp eq i32 %55, 0
  br i1 %.not82, label %70, label %56

56:                                               ; preds = %53
  %57 = and i32 %54, 4
  %58 = icmp ne i32 %57, 0
  %59 = icmp slt i32 %2, 65
  %or.cond7 = or i1 %59, %58
  %60 = icmp slt i32 %3, 65
  %or.cond9 = or i1 %60, %or.cond7
  br i1 %or.cond9, label %61, label %70

61:                                               ; preds = %56
  switch i32 %1, label %70 [
    i32 8, label %62
    i32 4, label %64
    i32 2, label %66
    i32 1, label %68
  ]

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %15) #5
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind nonnull writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %15, i32 noundef %2, i32 noundef %3, i32 noundef %2, i32 noundef %5, i32 noundef 0, i32 noundef 0, i32 noundef 0) #5
  %63 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef nonnull byval(%struct.libxsmm_meltw_unary_shape) align 8 %15, i32 noundef 0) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %15) #5
  br label %70

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %16) #5
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind nonnull writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %16, i32 noundef %2, i32 noundef %3, i32 noundef %2, i32 noundef %5, i32 noundef 1, i32 noundef 1, i32 noundef 1) #5
  %65 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef nonnull byval(%struct.libxsmm_meltw_unary_shape) align 8 %16, i32 noundef 0) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %16) #5
  br label %70

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %17) #5
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind nonnull writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %17, i32 noundef %2, i32 noundef %3, i32 noundef %2, i32 noundef %5, i32 noundef 10, i32 noundef 10, i32 noundef 10) #5
  %67 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef nonnull byval(%struct.libxsmm_meltw_unary_shape) align 8 %17, i32 noundef 0) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %17) #5
  br label %70

68:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %18) #5
  call void @libxsmm_create_meltw_unary_shape(ptr dead_on_unwind nonnull writable sret(%struct.libxsmm_meltw_unary_shape) align 4 %18, i32 noundef %2, i32 noundef %3, i32 noundef %2, i32 noundef %5, i32 noundef 12, i32 noundef 12, i32 noundef 12) #5
  %69 = call ptr @libxsmm_dispatch_meltw_unary(i32 noundef 29, ptr noundef nonnull byval(%struct.libxsmm_meltw_unary_shape) align 8 %18, i32 noundef 0) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %18) #5
  br label %70

70:                                               ; preds = %53, %56, %68, %66, %64, %62, %61, %31
  %.sroa.0.0 = phi ptr [ null, %61 ], [ %69, %68 ], [ %67, %66 ], [ %65, %64 ], [ %63, %62 ], [ null, %56 ], [ null, %53 ], [ null, %31 ]
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = ptrtoint ptr %.sroa.0.0 to i64
  call void @libxsmm_itrans_internal(ptr noundef nonnull %0, ptr noundef %71, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8, i64 %72, i32 noundef %28, i32 noundef %30)
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  %75 = icmp sgt i32 %23, 1
  %or.cond11 = and i1 %74, %75
  br i1 %or.cond11, label %76, label %77

76:                                               ; preds = %70
  call void @libxsmm_xfree(ptr noundef nonnull %73, i32 noundef 0) #5
  br label %77

77:                                               ; preds = %76, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  br label %86

78:                                               ; preds = %12
  %79 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !9
  %.not80 = icmp eq i32 %79, 0
  br i1 %.not80, label %86, label %80

80:                                               ; preds = %78
  %81 = atomicrmw add ptr @libxsmm_itrans_batch.error_once, i32 1 seq_cst, align 4
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %86

83:                                               ; preds = %80
  %84 = load ptr, ptr @stderr, align 8, !tbaa !5
  %85 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.62) #6
  br label %86

86:                                               ; preds = %78, %80, %83, %77
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #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 #2 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { cold 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}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass