1# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14.record i32[][] <external>
15
16.function void i32[][].ctor(i32[][] a0, i32 a1, i32 a2) <ctor, external>
17
18.function u32 main() {
19	movi v0, 0x0
20	movi v2, 0x4
21	movi v3, 0x2
22	initobj.short i32[][].ctor, v2, v3
23	sta.obj v1
24	mov v2, v0
25	movi v5, 0x0
26jump_label_3:
27	lenarr v1
28	jle v2, jump_label_0
29	mov v3, v0
30jump_label_2:
31	lda v2
32	ldarr.obj v1
33	sta.obj v4
34	lenarr v4
35	jle v3, jump_label_1
36	add v3, v2
37	starr v4, v3
38	inci v3, 0x1
39	jmp jump_label_2
40jump_label_1:
41	inci v2, 0x1
42	jmp jump_label_3
43jump_label_0:
44
45	mov v2, v0
46	movi v5, 0x0
47jump_label_7:
48	lenarr v1
49	jle v2, jump_label_4
50	mov v3, v0
51jump_label_6:
52	lda v2
53	ldarr.obj v1
54	sta.obj v4
55	lenarr v4
56	jle v3, jump_label_5
57	lda v3
58	ldarr v4
59	add2 v5
60	sta v5 
61	inci v3, 0x1
62	jmp jump_label_6
63jump_label_5:
64	inci v2, 0x1
65	jmp jump_label_7
66jump_label_4:
67	lda v5
68    addi -16
69	return
70}