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

; 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_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 }
%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_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 }
%struct.libxsmm_meqn_unary_op = type { i32, i32, i32, i32 }
%struct.libxsmm_meqn_gather_fusion_info = type { i32, i32, i32, i32 }

@libxsmm_verbosity = external global i32, align 4
@stderr = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1

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

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

13:                                               ; preds = %5
  %14 = load ptr, ptr %7, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %14, i32 0, i32 5
  %16 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %15, i32 0, i32 1
  %17 = load i32, ptr %16, align 4, !tbaa !11
  %18 = and i32 %17, 128
  %19 = icmp ugt i32 %18, 0
  %20 = zext i1 %19 to i64
  %21 = select i1 %19, i32 8, i32 6
  %22 = load ptr, ptr %7, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %22, i32 0, i32 12
  %24 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %23, i32 0, i32 3
  store i32 %21, ptr %24, align 4, !tbaa !11
  %25 = load ptr, ptr %7, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %27, i32 0, i32 5
  %29 = getelementptr inbounds %struct.libxsmm_meqn_arg, ptr %28, i32 0, i32 3
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %31, i32 0, i32 12
  %33 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %32, i32 0, i32 2
  store i32 %30, ptr %33, align 4, !tbaa !11
  %34 = load ptr, ptr %7, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %34, i32 0, i32 5
  %36 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %35, i32 0, i32 1
  store i32 0, ptr %36, align 4, !tbaa !11
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %39, i32 0, i32 5
  %41 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = icmp eq i32 %42, 18
  br i1 %43, label %44, label %78

44:                                               ; preds = %13
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %45, i32 0, i32 12
  %47 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %46, i32 0, i32 0
  store i32 1, ptr %47, align 4, !tbaa !11
  %48 = load ptr, ptr %7, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %48, i32 0, i32 5
  %50 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %49, i32 0, i32 0
  store i32 44, ptr %50, align 4, !tbaa !11
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %51, i32 0, i32 5
  %53 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %52, i32 0, i32 1
  store i32 0, ptr %53, align 4, !tbaa !11
  %54 = load ptr, ptr %7, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %54, i32 0, i32 12
  %56 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %58 = icmp eq i32 %57, 8
  br i1 %58, label %59, label %65

59:                                               ; preds = %44
  %60 = load ptr, ptr %7, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %60, i32 0, i32 5
  %62 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !11
  %64 = or i32 %63, 128
  store i32 %64, ptr %62, align 4, !tbaa !11
  br label %71

65:                                               ; preds = %44
  %66 = load ptr, ptr %7, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %66, i32 0, i32 5
  %68 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = or i32 %69, 256
  store i32 %70, ptr %68, align 4, !tbaa !11
  br label %71

71:                                               ; preds = %65, %59
  %72 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !5
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %77

74:                                               ; preds = %71
  %75 = load ptr, ptr @stderr, align 8, !tbaa !9
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.9) #2
  br label %77

77:                                               ; preds = %74, %71
  br label %165

78:                                               ; preds = %13
  %79 = load ptr, ptr %7, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %81, i32 0, i32 5
  %83 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = icmp eq i32 %84, 21
  br i1 %85, label %86, label %120

86:                                               ; preds = %78
  %87 = load ptr, ptr %7, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %87, i32 0, i32 12
  %89 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %88, i32 0, i32 1
  store i32 1, ptr %89, align 4, !tbaa !11
  %90 = load ptr, ptr %7, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %90, i32 0, i32 5
  %92 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %91, i32 0, i32 0
  store i32 53, ptr %92, align 4, !tbaa !11
  %93 = load ptr, ptr %7, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %93, i32 0, i32 5
  %95 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %94, i32 0, i32 1
  store i32 512, ptr %95, align 4, !tbaa !11
  %96 = load ptr, ptr %7, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %96, i32 0, i32 12
  %98 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %97, i32 0, i32 3
  %99 = load i32, ptr %98, align 4, !tbaa !11
  %100 = icmp eq i32 %99, 8
  br i1 %100, label %101, label %107

101:                                              ; preds = %86
  %102 = load ptr, ptr %7, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %102, i32 0, i32 5
  %104 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = or i32 %105, 128
  store i32 %106, ptr %104, align 4, !tbaa !11
  br label %113

107:                                              ; preds = %86
  %108 = load ptr, ptr %7, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %108, i32 0, i32 5
  %110 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = or i32 %111, 256
  store i32 %112, ptr %110, align 4, !tbaa !11
  br label %113

113:                                              ; preds = %107, %101
  %114 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !5
  %115 = icmp slt i32 %114, 0
  br i1 %115, label %116, label %119

116:                                              ; preds = %113
  %117 = load ptr, ptr @stderr, align 8, !tbaa !9
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str.10) #2
  br label %119

119:                                              ; preds = %116, %113
  br label %164

120:                                              ; preds = %78
  %121 = load ptr, ptr %7, align 8, !tbaa !9
  %122 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %121, i32 0, i32 3
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %123, i32 0, i32 5
  %125 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %125, align 4, !tbaa !11
  %127 = icmp eq i32 %126, 69
  br i1 %127, label %128, label %162

128:                                              ; preds = %120
  %129 = load ptr, ptr %7, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %129, i32 0, i32 12
  %131 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %130, i32 0, i32 1
  store i32 1, ptr %131, align 4, !tbaa !11
  %132 = load ptr, ptr %7, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %132, i32 0, i32 5
  %134 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %133, i32 0, i32 0
  store i32 68, ptr %134, align 4, !tbaa !11
  %135 = load ptr, ptr %7, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %135, i32 0, i32 5
  %137 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %136, i32 0, i32 1
  store i32 512, ptr %137, align 4, !tbaa !11
  %138 = load ptr, ptr %7, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %138, i32 0, i32 12
  %140 = getelementptr inbounds %struct.libxsmm_meqn_gather_fusion_info, ptr %139, i32 0, i32 3
  %141 = load i32, ptr %140, align 4, !tbaa !11
  %142 = icmp eq i32 %141, 8
  br i1 %142, label %143, label %149

143:                                              ; preds = %128
  %144 = load ptr, ptr %7, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %144, i32 0, i32 5
  %146 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %145, i32 0, i32 1
  %147 = load i32, ptr %146, align 4, !tbaa !11
  %148 = or i32 %147, 128
  store i32 %148, ptr %146, align 4, !tbaa !11
  br label %155

149:                                              ; preds = %128
  %150 = load ptr, ptr %7, align 8, !tbaa !9
  %151 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %150, i32 0, i32 5
  %152 = getelementptr inbounds %struct.libxsmm_meqn_unary_op, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 4, !tbaa !11
  %154 = or i32 %153, 256
  store i32 %154, ptr %152, align 4, !tbaa !11
  br label %155

155:                                              ; preds = %149, %143
  %156 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !5
  %157 = icmp slt i32 %156, 0
  br i1 %157, label %158, label %161

158:                                              ; preds = %155
  %159 = load ptr, ptr @stderr, align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.11) #2
  br label %161

161:                                              ; preds = %158, %155
  br label %163

162:                                              ; preds = %120
  br label %163

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

164:                                              ; preds = %163, %119
  br label %165

165:                                              ; preds = %164, %77
  %166 = load ptr, ptr %8, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %166, i32 0, i32 8
  %168 = getelementptr inbounds %struct.libxsmm_meqn_tmp_info, ptr %167, i32 0, i32 2
  store i32 1, ptr %168, align 8, !tbaa !11
  %169 = load ptr, ptr %9, align 8, !tbaa !9
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = add i32 %170, 1
  store i32 %171, ptr %169, align 4, !tbaa !5
  %172 = load ptr, ptr %9, align 8, !tbaa !9
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = load i32, ptr %10, align 4, !tbaa !5
  %175 = icmp ult i32 %173, %174
  br i1 %175, label %176, label %233

176:                                              ; preds = %165
  %177 = load ptr, ptr %7, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %177, i32 0, i32 3
  %179 = load ptr, ptr %178, align 8, !tbaa !11
  %180 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %179, i32 0, i32 3
  %181 = load ptr, ptr %180, align 8, !tbaa !11
  %182 = load ptr, ptr %8, align 8, !tbaa !9
  %183 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %182, i32 0, i32 3
  store ptr %181, ptr %183, align 8, !tbaa !11
  %184 = load ptr, ptr %7, align 8, !tbaa !9
  %185 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %184, i32 0, i32 3
  %186 = load ptr, ptr %185, align 8, !tbaa !11
  %187 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %186, i32 0, i32 3
  %188 = load ptr, ptr %187, align 8, !tbaa !11
  %189 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %188, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !11
  %191 = load ptr, ptr %7, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %191, i32 0, i32 3
  %193 = load ptr, ptr %192, align 8, !tbaa !11
  %194 = icmp eq ptr %190, %193
  br i1 %194, label %195, label %203

195:                                              ; preds = %176
  %196 = load ptr, ptr %8, align 8, !tbaa !9
  %197 = load ptr, ptr %7, align 8, !tbaa !9
  %198 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %197, i32 0, i32 3
  %199 = load ptr, ptr %198, align 8, !tbaa !11
  %200 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %199, i32 0, i32 3
  %201 = load ptr, ptr %200, align 8, !tbaa !11
  %202 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %201, i32 0, i32 0
  store ptr %196, ptr %202, align 8, !tbaa !11
  br label %232

203:                                              ; preds = %176
  %204 = load ptr, ptr %7, align 8, !tbaa !9
  %205 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %204, i32 0, i32 3
  %206 = load ptr, ptr %205, align 8, !tbaa !11
  %207 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %206, i32 0, i32 3
  %208 = load ptr, ptr %207, align 8, !tbaa !11
  %209 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %208, i32 0, i32 1
  %210 = load ptr, ptr %209, align 8, !tbaa !11
  %211 = load ptr, ptr %7, align 8, !tbaa !9
  %212 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %211, i32 0, i32 3
  %213 = load ptr, ptr %212, align 8, !tbaa !11
  %214 = icmp eq ptr %210, %213
  br i1 %214, label %215, label %223

215:                                              ; preds = %203
  %216 = load ptr, ptr %8, align 8, !tbaa !9
  %217 = load ptr, ptr %7, align 8, !tbaa !9
  %218 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %217, i32 0, i32 3
  %219 = load ptr, ptr %218, align 8, !tbaa !11
  %220 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %219, i32 0, i32 3
  %221 = load ptr, ptr %220, align 8, !tbaa !11
  %222 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %221, i32 0, i32 1
  store ptr %216, ptr %222, align 8, !tbaa !11
  br label %231

223:                                              ; preds = %203
  %224 = load ptr, ptr %8, align 8, !tbaa !9
  %225 = load ptr, ptr %7, align 8, !tbaa !9
  %226 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %225, i32 0, i32 3
  %227 = load ptr, ptr %226, align 8, !tbaa !11
  %228 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %227, i32 0, i32 3
  %229 = load ptr, ptr %228, align 8, !tbaa !11
  %230 = getelementptr inbounds %struct.libxsmm_meqn_elem, ptr %229, i32 0, i32 2
  store ptr %224, ptr %230, align 8, !tbaa !11
  br label %231

231:                                              ; preds = %223, %215
  br label %232

232:                                              ; preds = %231, %195
  br label %233

233:                                              ; preds = %232, %165
  br label %235

234:                                              ; preds = %5
  br label %235

235:                                              ; preds = %234, %233
  ret void
}

attributes #0 = { 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 = { 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 #2 = { 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 = !{!"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 = !{!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"

@libxsmm_verbosity = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @libxsmm_generator_matequation_apply_gather_fusion_pattern_transformation(i32 noundef %0, ptr nocapture noundef %1, ptr noundef %2, ptr nocapture noundef %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = icmp eq i32 %0, 4
  br i1 %6, label %7, label %56

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %1, i64 36
  %9 = getelementptr inbounds i8, ptr %1, i64 40
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = and i32 %10, 128
  %.not.not.not.not = icmp eq i32 %11, 0
  %12 = select i1 %.not.not.not.not, i32 6, i32 8
  %13 = getelementptr inbounds i8, ptr %1, i64 176
  store i32 %12, ptr %13, align 4, !tbaa !5
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 48
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %1, i64 172
  store i32 %16, ptr %17, align 4, !tbaa !5
  store i32 0, ptr %9, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %1, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 36
  %21 = load i32, ptr %20, align 4, !tbaa !5
  switch i32 %21, label %36 [
    i32 18, label %22
    i32 21, label %26
    i32 69, label %30
  ]

22:                                               ; preds = %7
  %23 = getelementptr inbounds i8, ptr %1, i64 164
  store i32 1, ptr %23, align 4, !tbaa !5
  store i32 44, ptr %8, align 4, !tbaa !5
  %. = select i1 %.not.not.not.not, i32 256, i32 128
  store i32 %., ptr %9, align 4, !tbaa !5
  %24 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !8
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %.sink.split, label %36

26:                                               ; preds = %7
  %27 = getelementptr inbounds i8, ptr %1, i64 168
  store i32 1, ptr %27, align 4, !tbaa !5
  store i32 53, ptr %8, align 4, !tbaa !5
  %.45 = select i1 %.not.not.not.not, i32 768, i32 640
  store i32 %.45, ptr %9, align 4, !tbaa !5
  %28 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !8
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %.sink.split, label %36

30:                                               ; preds = %7
  %31 = getelementptr inbounds i8, ptr %1, i64 168
  store i32 1, ptr %31, align 4, !tbaa !5
  store i32 68, ptr %8, align 4, !tbaa !5
  %.46 = select i1 %.not.not.not.not, i32 768, i32 640
  store i32 %.46, ptr %9, align 4, !tbaa !5
  %32 = load i32, ptr @libxsmm_verbosity, align 4, !tbaa !8
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %.sink.split, label %36

.sink.split:                                      ; preds = %30, %26, %22
  %.str.10.sink = phi ptr [ @.str.9, %22 ], [ @.str.10, %26 ], [ @.str.11, %30 ]
  %34 = load ptr, ptr @stderr, align 8, !tbaa !10
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull %.str.10.sink) #2
  br label %36

36:                                               ; preds = %.sink.split, %7, %26, %30, %22
  %37 = getelementptr inbounds i8, ptr %2, i64 96
  store i32 1, ptr %37, align 8, !tbaa !5
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = add i32 %38, 1
  store i32 %39, ptr %3, align 4, !tbaa !8
  %40 = icmp ult i32 %39, %4
  br i1 %40, label %41, label %56

41:                                               ; preds = %36
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 24
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %2, i64 24
  store ptr %44, ptr %45, align 8, !tbaa !5
  %46 = load ptr, ptr %18, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 24
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = icmp eq ptr %49, %46
  br i1 %50, label %.sink.split47, label %51

51:                                               ; preds = %41
  %52 = getelementptr inbounds i8, ptr %48, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = icmp eq ptr %53, %46
  %55 = getelementptr inbounds i8, ptr %48, i64 16
  %spec.select = select i1 %54, ptr %52, ptr %55
  br label %.sink.split47

.sink.split47:                                    ; preds = %51, %41
  %.sink = phi ptr [ %48, %41 ], [ %spec.select, %51 ]
  store ptr %2, ptr %.sink, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %.sink.split47, %5, %36
  ret void
}

attributes #0 = { 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 #1 = { nofree 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 #2 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}


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