; LLVM IR from ggml-org/ggml :: src/ggml-opencl/ggml-opencl.ll (Z23ggml_cl_compute_forwardP12ggml_backendP11ggml_tensor)

; 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.ggml_tensor = type { i32, ptr, [4 x i64], [4 x i64], i32, [16 x i32], i32, [10 x ptr], ptr, i64, ptr, [64 x i8], ptr, [8 x i8] }

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z23ggml_cl_compute_forwardP12ggml_backendP11ggml_tensor(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ggml_tensor, ptr %11, i32 0, i32 7
  %13 = getelementptr inbounds [10 x ptr], ptr %12, i64 0, i64 0
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %14, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.ggml_tensor, ptr %15, i32 0, i32 7
  %17 = getelementptr inbounds [10 x ptr], ptr %16, i64 0, i64 1
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %18, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ggml_tensor, ptr %19, i32 0, i32 12
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = icmp ne ptr %21, null
  br i1 %22, label %41, label %23

23:                                               ; preds = %2
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ggml_tensor, ptr %27, i32 0, i32 12
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = icmp ne ptr %29, null
  br i1 %30, label %41, label %31

31:                                               ; preds = %26, %23
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %39

34:                                               ; preds = %31
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ggml_tensor, ptr %35, i32 0, i32 12
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = icmp ne ptr %37, null
  br label %39

39:                                               ; preds = %34, %31
  %40 = phi i1 [ false, %31 ], [ %38, %34 ]
  br label %41

41:                                               ; preds = %39, %26, %2
  %42 = phi i1 [ true, %26 ], [ true, %2 ], [ %40, %39 ]
  %43 = zext i1 %42 to i8
  store i8 %43, ptr %9, align 1, !tbaa !15
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ggml_tensor, ptr %44, i32 0, i32 4
  %46 = load i32, ptr %45, align 8, !tbaa !17
  switch i32 %46, label %166 [
    i32 38, label %47
    i32 32, label %52
    i32 1, label %57
    i32 33, label %57
    i32 2, label %62
    i32 6, label %75
    i32 74, label %80
    i32 47, label %105
    i32 22, label %110
    i32 23, label %115
    i32 27, label %120
    i32 30, label %136
    i32 34, label %141
    i32 35, label %141
    i32 36, label %141
    i32 37, label %141
    i32 41, label %146
    i32 43, label %151
    i32 45, label %156
    i32 49, label %161
  ]

47:                                               ; preds = %41
  %48 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %49 = trunc i8 %48 to i1
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

51:                                               ; preds = %47
  store ptr @_ZL16ggml_cl_get_rowsP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

52:                                               ; preds = %41
  %53 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %54 = trunc i8 %53 to i1
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

56:                                               ; preds = %52
  store ptr @_ZL11ggml_cl_cpyP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

57:                                               ; preds = %41, %41
  %58 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %59 = trunc i8 %58 to i1
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

61:                                               ; preds = %57
  store ptr @_ZL11ggml_cl_dupP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

62:                                               ; preds = %41
  %63 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %64 = trunc i8 %63 to i1
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

66:                                               ; preds = %62
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = call zeroext i1 @ggml_is_contiguous(ptr noundef %67)
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 4858, ptr noundef @.str.2, ptr noundef @.str.3) #6
  unreachable

70:                                               ; preds = %66
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = call zeroext i1 @ggml_is_contiguous(ptr noundef %71)
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.1, i32 noundef 4859, ptr noundef @.str.2, ptr noundef @.str.4) #6
  unreachable

74:                                               ; preds = %70
  store ptr @_ZL11ggml_cl_addP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

75:                                               ; preds = %41
  %76 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %77 = trunc i8 %76 to i1
  br i1 %77, label %79, label %78

78:                                               ; preds = %75
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

79:                                               ; preds = %75
  store ptr @_ZL11ggml_cl_mulP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

80:                                               ; preds = %41
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = call i32 @ggml_get_unary_op(ptr noundef %81)
  switch i32 %82, label %103 [
    i32 8, label %83
    i32 9, label %88
    i32 10, label %93
    i32 6, label %98
  ]

83:                                               ; preds = %80
  %84 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %85 = trunc i8 %84 to i1
  br i1 %85, label %87, label %86

86:                                               ; preds = %83
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

87:                                               ; preds = %83
  store ptr @_ZL12ggml_cl_geluP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %104

88:                                               ; preds = %80
  %89 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %90 = trunc i8 %89 to i1
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

92:                                               ; preds = %88
  store ptr @_ZL18ggml_cl_gelu_quickP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %104

93:                                               ; preds = %80
  %94 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %95 = trunc i8 %94 to i1
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

97:                                               ; preds = %93
  store ptr @_ZL12ggml_cl_siluP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %104

98:                                               ; preds = %80
  %99 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %100 = trunc i8 %99 to i1
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

102:                                              ; preds = %98
  store ptr @_ZL12ggml_cl_reluP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %104

103:                                              ; preds = %80
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

104:                                              ; preds = %102, %97, %92, %87
  br label %167

105:                                              ; preds = %41
  %106 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %107 = trunc i8 %106 to i1
  br i1 %107, label %109, label %108

108:                                              ; preds = %105
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

109:                                              ; preds = %105
  store ptr @_ZL13ggml_cl_clampP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

110:                                              ; preds = %41
  %111 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %112 = trunc i8 %111 to i1
  br i1 %112, label %114, label %113

113:                                              ; preds = %110
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

114:                                              ; preds = %110
  store ptr @_ZL12ggml_cl_normP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

115:                                              ; preds = %41
  %116 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %117 = trunc i8 %116 to i1
  br i1 %117, label %119, label %118

118:                                              ; preds = %115
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

119:                                              ; preds = %115
  store ptr @_ZL16ggml_cl_rms_normP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

120:                                              ; preds = %41
  %121 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %122 = trunc i8 %121 to i1
  br i1 %122, label %135, label %123

123:                                              ; preds = %120
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ggml_tensor, ptr %124, i32 0, i32 7
  %126 = getelementptr inbounds [10 x ptr], ptr %125, i64 0, i64 0
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ggml_tensor, ptr %128, i32 0, i32 7
  %130 = getelementptr inbounds [10 x ptr], ptr %129, i64 0, i64 1
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = call noundef zeroext i1 @_ZL19ggml_cl_can_mul_matPK11ggml_tensorS1_PS_(ptr noundef %127, ptr noundef %131, ptr noundef %132)
  br i1 %133, label %135, label %134

134:                                              ; preds = %123
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

135:                                              ; preds = %123, %120
  store ptr @_ZL15ggml_cl_mul_matP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

136:                                              ; preds = %41
  %137 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %138 = trunc i8 %137 to i1
  br i1 %138, label %140, label %139

139:                                              ; preds = %136
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

140:                                              ; preds = %136
  store ptr @_ZL13ggml_cl_scaleP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

141:                                              ; preds = %41, %41, %41, %41
  %142 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %143 = trunc i8 %142 to i1
  br i1 %143, label %145, label %144

144:                                              ; preds = %141
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

145:                                              ; preds = %141
  store ptr @_ZL11ggml_cl_nopP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

146:                                              ; preds = %41
  %147 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %148 = trunc i8 %147 to i1
  br i1 %148, label %150, label %149

149:                                              ; preds = %146
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

150:                                              ; preds = %146
  store ptr @_ZL21ggml_cl_diag_mask_infP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

151:                                              ; preds = %41
  %152 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %153 = trunc i8 %152 to i1
  br i1 %153, label %155, label %154

154:                                              ; preds = %151
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

155:                                              ; preds = %151
  store ptr @_ZL16ggml_cl_soft_maxP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

156:                                              ; preds = %41
  %157 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %158 = trunc i8 %157 to i1
  br i1 %158, label %160, label %159

159:                                              ; preds = %156
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

160:                                              ; preds = %156
  store ptr @_ZL12ggml_cl_ropeP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

161:                                              ; preds = %41
  %162 = load i8, ptr %9, align 1, !tbaa !15, !range !18, !noundef !19
  %163 = trunc i8 %162 to i1
  br i1 %163, label %165, label %164

164:                                              ; preds = %161
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

165:                                              ; preds = %161
  store ptr @_ZL14ggml_cl_im2colP12ggml_backendPK11ggml_tensorS3_PS1_, ptr %6, align 8, !tbaa !5
  br label %167

166:                                              ; preds = %41
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

167:                                              ; preds = %165, %160, %155, %150, %145, %140, %135, %119, %114, %109, %104, %79, %74, %61, %56, %51
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ggml_tensor, ptr %170, i32 0, i32 7
  %172 = getelementptr inbounds [10 x ptr], ptr %171, i64 0, i64 0
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.ggml_tensor, ptr %174, i32 0, i32 7
  %176 = getelementptr inbounds [10 x ptr], ptr %175, i64 0, i64 1
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  call void %168(ptr noundef %169, ptr noundef %173, ptr noundef %177, ptr noundef %178)
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %179

179:                                              ; preds = %167, %166, %164, %159, %154, %149, %144, %139, %134, %118, %113, %108, %103, %101, %96, %91, %86, %78, %65, %60, %55, %50
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %180 = load i1, ptr %3, align 1
  ret i1 %180
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16ggml_cl_get_rowsP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_cpyP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_dupP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare zeroext i1 @ggml_is_contiguous(ptr noundef) #2

; Function Attrs: noreturn
declare void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_addP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_mulP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @ggml_get_unary_op(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_geluP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18ggml_cl_gelu_quickP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_siluP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_reluP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13ggml_cl_clampP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_normP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16ggml_cl_rms_normP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL19ggml_cl_can_mul_matPK11ggml_tensorS1_PS_(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15ggml_cl_mul_matP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13ggml_cl_scaleP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL11ggml_cl_nopP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL21ggml_cl_diag_mask_infP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16ggml_cl_soft_maxP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_ropeP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL14ggml_cl_im2colP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { "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 = { noreturn "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 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 }
attributes #6 = { noreturn }

!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++ TBAA"}
!9 = !{!10, !6, i64 320}
!10 = !{!"_ZTS11ggml_tensor", !11, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !12, i64 80, !7, i64 84, !13, i64 148, !7, i64 152, !6, i64 232, !14, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!11 = !{!"_ZTS9ggml_type", !7, i64 0}
!12 = !{!"_ZTS7ggml_op", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!10, !12, i64 80}
!18 = !{i8 0, i8 2}
!19 = !{}


; 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.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z23ggml_cl_compute_forwardP12ggml_backendP11ggml_tensor(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 152
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 160
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 320
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %9, label %18

9:                                                ; preds = %2
  %.not41 = icmp eq ptr %4, null
  br i1 %.not41, label %13, label %10

10:                                               ; preds = %9
  %11 = getelementptr inbounds i8, ptr %4, i64 320
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %.not42 = icmp eq ptr %12, null
  br i1 %.not42, label %13, label %18

13:                                               ; preds = %10, %9
  %.not43 = icmp eq ptr %6, null
  br i1 %.not43, label %18, label %14

14:                                               ; preds = %13
  %15 = getelementptr inbounds i8, ptr %6, i64 320
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = icmp ne ptr %16, null
  br label %18

18:                                               ; preds = %13, %14, %10, %2
  %19 = phi i1 [ true, %10 ], [ true, %2 ], [ false, %13 ], [ %17, %14 ]
  %20 = getelementptr inbounds i8, ptr %1, i64 80
  %21 = load i32, ptr %20, align 8, !tbaa !15
  switch i32 %21, label %54 [
    i32 38, label %22
    i32 32, label %23
    i32 1, label %24
    i32 33, label %24
    i32 2, label %25
    i32 6, label %32
    i32 74, label %33
    i32 47, label %39
    i32 22, label %40
    i32 23, label %41
    i32 27, label %42
    i32 30, label %45
    i32 34, label %46
    i32 35, label %46
    i32 36, label %46
    i32 37, label %46
    i32 41, label %47
    i32 43, label %48
    i32 45, label %49
    i32 49, label %50
  ]

22:                                               ; preds = %18
  br i1 %19, label %51, label %54

23:                                               ; preds = %18
  br i1 %19, label %51, label %54

24:                                               ; preds = %18, %18
  br i1 %19, label %51, label %54

25:                                               ; preds = %18
  br i1 %19, label %26, label %54

26:                                               ; preds = %25
  %27 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %4)
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.1, i32 noundef 4858, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3) #4
  unreachable

29:                                               ; preds = %26
  %30 = tail call zeroext i1 @ggml_is_contiguous(ptr noundef %6)
  br i1 %30, label %51, label %31

31:                                               ; preds = %29
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.1, i32 noundef 4859, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.4) #4
  unreachable

32:                                               ; preds = %18
  br i1 %19, label %51, label %54

33:                                               ; preds = %18
  %34 = tail call i32 @ggml_get_unary_op(ptr noundef nonnull %1)
  switch i32 %34, label %54 [
    i32 8, label %35
    i32 9, label %36
    i32 10, label %37
    i32 6, label %38
  ]

35:                                               ; preds = %33
  br i1 %19, label %51, label %54

36:                                               ; preds = %33
  br i1 %19, label %51, label %54

37:                                               ; preds = %33
  br i1 %19, label %51, label %54

38:                                               ; preds = %33
  br i1 %19, label %51, label %54

39:                                               ; preds = %18
  br i1 %19, label %51, label %54

40:                                               ; preds = %18
  br i1 %19, label %51, label %54

41:                                               ; preds = %18
  br i1 %19, label %51, label %54

42:                                               ; preds = %18
  br i1 %19, label %51, label %43

43:                                               ; preds = %42
  %44 = tail call noundef zeroext i1 @_ZL19ggml_cl_can_mul_matPK11ggml_tensorS1_PS_(ptr noundef %4, ptr noundef %6, ptr noundef nonnull %1)
  br i1 %44, label %51, label %54

45:                                               ; preds = %18
  br i1 %19, label %51, label %54

46:                                               ; preds = %18, %18, %18, %18
  br i1 %19, label %51, label %54

47:                                               ; preds = %18
  br i1 %19, label %51, label %54

48:                                               ; preds = %18
  br i1 %19, label %51, label %54

49:                                               ; preds = %18
  br i1 %19, label %51, label %54

50:                                               ; preds = %18
  br i1 %19, label %51, label %54

51:                                               ; preds = %50, %49, %48, %47, %46, %45, %42, %43, %41, %40, %39, %38, %37, %36, %35, %32, %29, %24, %23, %22
  %.038 = phi ptr [ @_ZL16ggml_cl_get_rowsP12ggml_backendPK11ggml_tensorS3_PS1_, %22 ], [ @_ZL11ggml_cl_cpyP12ggml_backendPK11ggml_tensorS3_PS1_, %23 ], [ @_ZL11ggml_cl_dupP12ggml_backendPK11ggml_tensorS3_PS1_, %24 ], [ @_ZL11ggml_cl_addP12ggml_backendPK11ggml_tensorS3_PS1_, %29 ], [ @_ZL11ggml_cl_mulP12ggml_backendPK11ggml_tensorS3_PS1_, %32 ], [ @_ZL12ggml_cl_geluP12ggml_backendPK11ggml_tensorS3_PS1_, %35 ], [ @_ZL18ggml_cl_gelu_quickP12ggml_backendPK11ggml_tensorS3_PS1_, %36 ], [ @_ZL12ggml_cl_siluP12ggml_backendPK11ggml_tensorS3_PS1_, %37 ], [ @_ZL12ggml_cl_reluP12ggml_backendPK11ggml_tensorS3_PS1_, %38 ], [ @_ZL13ggml_cl_clampP12ggml_backendPK11ggml_tensorS3_PS1_, %39 ], [ @_ZL12ggml_cl_normP12ggml_backendPK11ggml_tensorS3_PS1_, %40 ], [ @_ZL16ggml_cl_rms_normP12ggml_backendPK11ggml_tensorS3_PS1_, %41 ], [ @_ZL15ggml_cl_mul_matP12ggml_backendPK11ggml_tensorS3_PS1_, %43 ], [ @_ZL15ggml_cl_mul_matP12ggml_backendPK11ggml_tensorS3_PS1_, %42 ], [ @_ZL13ggml_cl_scaleP12ggml_backendPK11ggml_tensorS3_PS1_, %45 ], [ @_ZL11ggml_cl_nopP12ggml_backendPK11ggml_tensorS3_PS1_, %46 ], [ @_ZL21ggml_cl_diag_mask_infP12ggml_backendPK11ggml_tensorS3_PS1_, %47 ], [ @_ZL16ggml_cl_soft_maxP12ggml_backendPK11ggml_tensorS3_PS1_, %48 ], [ @_ZL12ggml_cl_ropeP12ggml_backendPK11ggml_tensorS3_PS1_, %49 ], [ @_ZL14ggml_cl_im2colP12ggml_backendPK11ggml_tensorS3_PS1_, %50 ]
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  tail call void %.038(ptr noundef %0, ptr noundef %52, ptr noundef %53, ptr noundef nonnull %1)
  br label %54

54:                                               ; preds = %18, %50, %49, %48, %47, %46, %45, %43, %41, %40, %39, %33, %38, %37, %36, %35, %32, %25, %24, %23, %22, %51
  %.0 = phi i1 [ true, %51 ], [ false, %22 ], [ false, %23 ], [ false, %24 ], [ false, %25 ], [ false, %32 ], [ false, %35 ], [ false, %36 ], [ false, %37 ], [ false, %38 ], [ false, %33 ], [ false, %39 ], [ false, %40 ], [ false, %41 ], [ false, %43 ], [ false, %45 ], [ false, %46 ], [ false, %47 ], [ false, %48 ], [ false, %49 ], [ false, %50 ], [ false, %18 ]
  ret i1 %.0
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16ggml_cl_get_rowsP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_cpyP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_dupP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare zeroext i1 @ggml_is_contiguous(ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn
declare void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_addP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11ggml_cl_mulP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @ggml_get_unary_op(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_geluP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL18ggml_cl_gelu_quickP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_siluP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_reluP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13ggml_cl_clampP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_normP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16ggml_cl_rms_normP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL19ggml_cl_can_mul_matPK11ggml_tensorS1_PS_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15ggml_cl_mul_matP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13ggml_cl_scaleP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL11ggml_cl_nopP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL21ggml_cl_diag_mask_infP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16ggml_cl_soft_maxP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12ggml_cl_ropeP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL14ggml_cl_im2colP12ggml_backendPK11ggml_tensorS3_PS1_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { mustprogress 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 = { "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 = { noreturn "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 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 = { noreturn }

!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++ TBAA"}
!9 = !{!10, !6, i64 320}
!10 = !{!"_ZTS11ggml_tensor", !11, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !12, i64 80, !7, i64 84, !13, i64 148, !7, i64 152, !6, i64 232, !14, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!11 = !{!"_ZTS9ggml_type", !7, i64 0}
!12 = !{!"_ZTS7ggml_op", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!10, !12, i64 80}


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