// File: yanlinlin82[P]icpp/icpp.cpp
// Function: parse_init_value(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<std::pair<std::vector<int, std::allocator<int>>, int>, std::allocator<std::pair<std::vector<int, std::allocator<int>>, int>>>&)
void parse_init_value(vector<int>& dim, vector<int>& dim2, vector<int>& cursor,
		vector<pair<vector<int>, int>>& init)
{
	if (token == "{") {
		if (cursor.size() >= dim.size()) err("too many level in init val!\n");
		next();
		size_t i = cursor.size();
		for (cursor.push_back(0); ; ++cursor[i]) {
			if (dim[i] == 0) {
				if (cursor[i] >= dim2[i]) dim2[i] = cursor[i] + 1;
			} else {
				if (cursor[i] >= dim[i]) err("array init overflow!\n");
			}
			parse_init_value(dim, dim2, cursor, init);
			if (token == "}") break;
			expect_token(",", "init-value");
			next();
		}
		cursor.pop_back();
		expect_token("}", "init-value");
		next();
	} else {
		//parse_expression(",");
		int v = eval_number(token);
		next();
		init.push_back(make_pair(cursor, v));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x40c66(%rip), %rdi     # 0x504e8
leaq 0x27b29(%rip), %rsi     # 0x373b2
callq 0x1a9c0
testb $0x1, %al
jne 0xf897
jmp 0xfbf1
movq -0x18(%rbp), %rdi
callq 0x19990
movq %rax, -0x128(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19990
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jb 0xf8cd
leaq 0x2807e(%rip), %rdi     # 0x37944
movb $0x0, %al
callq 0x1a780
callq 0x6030
movq -0x18(%rbp), %rdi
callq 0x19990
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movl $0x0, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x1a400
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
cmpl $0x0, (%rax)
jne 0xf963
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movl (%rax), %eax
movl %eax, -0x12c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movq %rax, %rcx
movl -0x12c(%rbp), %eax
cmpl (%rcx), %eax
jl 0xf961
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x130(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movl -0x130(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xf9a2
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movl (%rax), %eax
movl %eax, -0x134(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movq %rax, %rcx
movl -0x134(%rbp), %eax
cmpl (%rcx), %eax
jl 0xf9a0
leaq 0x27fc8(%rip), %rdi     # 0x37961
movb $0x0, %al
callq 0x1a780
jmp 0xf9a2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xf860
leaq 0x40b2a(%rip), %rdi     # 0x504e8
leaq 0x2778b(%rip), %rsi     # 0x37150
callq 0x1a9c0
testb $0x1, %al
jne 0xf9d0
jmp 0xf9d5
jmp 0xfade
leaq -0x51(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x3470
movq -0x140(%rbp), %rdx
leaq 0x27759(%rip), %rsi     # 0x3714c
leaq -0x50(%rbp), %rdi
callq 0x199b0
jmp 0xf9fe
leaq -0x89(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x3470
movq -0x148(%rbp), %rdx
leaq 0x27f58(%rip), %rsi     # 0x37977
leaq -0x88(%rbp), %rdi
callq 0x199b0
jmp 0xfa2d
leaq -0x50(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x6790
jmp 0xfa3f
leaq -0x88(%rbp), %rdi
callq 0x34d8
leaq -0x89(%rbp), %rdi
callq 0x32b0
leaq -0x50(%rbp), %rdi
callq 0x34d8
leaq -0x51(%rbp), %rdi
callq 0x32b0
callq 0x6030
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19cf0
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xf8f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xfad0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xfabb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x34d8
leaq -0x89(%rbp), %rdi
callq 0x32b0
leaq -0x50(%rbp), %rdi
callq 0x34d8
leaq -0x51(%rbp), %rdi
callq 0x32b0
jmp 0xfcc5
movq -0x18(%rbp), %rdi
callq 0x1ba30
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x3470
movq -0x150(%rbp), %rdx
leaq 0x27648(%rip), %rsi     # 0x37150
leaq -0xb0(%rbp), %rdi
callq 0x199b0
jmp 0xfb16
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x3470
movq -0x158(%rbp), %rdx
leaq 0x27e40(%rip), %rsi     # 0x37977
leaq -0xd8(%rbp), %rdi
callq 0x199b0
jmp 0xfb45
leaq -0xb0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x6790
jmp 0xfb5a
leaq -0xd8(%rbp), %rdi
callq 0x34d8
leaq -0xd9(%rbp), %rdi
callq 0x32b0
leaq -0xb0(%rbp), %rdi
callq 0x34d8
leaq -0xb1(%rbp), %rdi
callq 0x32b0
callq 0x6030
jmp 0xfcbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xfbe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xfbc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x34d8
leaq -0xd9(%rbp), %rdi
callq 0x32b0
leaq -0xb0(%rbp), %rdi
callq 0x34d8
leaq -0xb1(%rbp), %rdi
callq 0x32b0
jmp 0xfcc5
leaq 0x408f0(%rip), %rsi     # 0x504e8
leaq -0x100(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x3120
movq -0x168(%rbp), %rdi
callq 0x6ba0
movl %eax, -0x15c(%rbp)
jmp 0xfc1f
leaq -0x100(%rbp), %rdi
callq 0x34d8
movl -0x15c(%rbp), %eax
movl %eax, -0xe0(%rbp)
callq 0x6030
movq -0x20(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x120(%rbp), %rdi
movq %rdi, -0x170(%rbp)
leaq -0xe0(%rbp), %rdx
callq 0x1ba90
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rsi
callq 0x1ba60
jmp 0xfc7a
leaq -0x120(%rbp), %rdi
callq 0x1bad0
jmp 0xfcbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x34d8
jmp 0xfcc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x1bad0
jmp 0xfcc5
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x3460
nop