// File: /workspace/github_c_makefile_star2_O0/Oric4ever[P]lcc65/6502/build/../src/decl.c
// Function: compound
void compound(int loop, struct swtch *swp, int lev) {
	Symbol p;
	Code cp;
	int i, j, nregs;

	walk(0, 0, 0);
	cp = code(Blockbeg);
	enterscope();
	cp->u.block.bnumber = ++bnumber;
	cp->u.block.level = level;
	autos = registers = 0;
	if (level == LOCAL && isstruct(freturn(cfunc->type))) {
		retv = genident(AUTO, ptr(freturn(cfunc->type)), level);
		retv->defined = 1;
		retv->initialized = 1;
		registers = append(retv, registers);	/* insures that retv is the 1st local */
	}
	if (level == LOCAL && events.entry)
		apply(events.entry, (Generic)cfunc, (Generic)0);
	expect('{');
	while (kind[t] == CHAR || kind[t] == STATIC
	|| (t == ID && tsym && tsym->sclass == TYPEDEF && (level < LOCAL || getchr() != ':')))
		decl(dcllocal, 0);
	nregs = length(registers);
	cp->u.block.locals = (Symbol *)list_to_a(registers, (Generic *)talloc((nregs + length(autos) + 1)*sizeof(Symbol)));
	list_to_a(autos, (Generic *)&cp->u.block.locals[nregs]);
	while (kind[t] == IF || kind[t] == ID)
		statement(loop, swp, lev);
	walk(0, 0, 0);
	foreach(identifiers, level, checkref, (Generic)0);
	for (i = nregs; p = cp->u.block.locals[i]; i++) {
		for (j = i; j > nregs && cp->u.block.locals[j-1]->ref < p->ref; j--)
			cp->u.block.locals[j] = cp->u.block.locals[j-1];
		cp->u.block.locals[j] = p;
	}
	cp->u.block.identifiers = identifiers;
	cp->u.block.types = types;
	code(Blockend);
	if (level > LOCAL) {
		exitscope();
		expect('}');
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x3a80
xorl %edi, %edi
callq 0x3300
movq %rax, -0x28(%rbp)
callq 0x24100
leaq 0x3adfa(%rip), %rax     # 0x40fc0
movl (%rax), %eax
addl $0x1, %eax
leaq 0x3adee(%rip), %rcx     # 0x40fc0
movl %eax, (%rcx)
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, 0x20(%rax)
leaq 0x3adaa(%rip), %rax     # 0x40f90
movl (%rax), %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, 0x22(%rax)
movq $0x0, 0x3581a(%rip) # 0x3ba18
movq $0x0, 0x35817(%rip) # 0x3ba20
leaq 0x3ad80(%rip), %rax     # 0x40f90
cmpl $0x5, (%rax)
jne 0x6326
movq 0x357e8(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
cmpl $0xf, (%rax)
jb 0x6248
movq 0x357d3(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x625c
movq 0x357b9(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x9, (%rax)
je 0x62b1
movq 0x3579c(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
cmpl $0xf, (%rax)
jb 0x6294
movq 0x35787(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x62a8
movq 0x3576d(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpl $0xa, (%rax)
jne 0x6326
movq 0x35750(%rip), %rax     # 0x3ba08
movq 0x20(%rax), %rdi
callq 0x28a30
movq %rax, %rdi
callq 0x27120
movq %rax, %rsi
leaq 0x3acbd(%rip), %rax     # 0x40f90
movl (%rax), %edx
movl $0x43, %edi
callq 0x24b00
movq %rax, 0x35742(%rip)     # 0x3ba28
movq 0x3573b(%rip), %rax     # 0x3ba28
movb 0x1b(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x1b(%rax)
movq 0x35728(%rip), %rax     # 0x3ba28
movb 0x1b(%rax), %cl
andb $-0x21, %cl
orb $0x20, %cl
movb %cl, 0x1b(%rax)
movq 0x35715(%rip), %rdi     # 0x3ba28
movq 0x356fe(%rip), %rsi     # 0x3ba18
callq 0x23500
movq %rax, 0x356f2(%rip)     # 0x3ba18
leaq 0x3ac63(%rip), %rax     # 0x40f90
cmpl $0x5, (%rax)
jne 0x6359
leaq 0x37897(%rip), %rax     # 0x3dbd0
cmpq $0x0, (%rax)
je 0x6359
leaq 0x3788a(%rip), %rax     # 0x3dbd0
movq (%rax), %rdi
movq 0x356b8(%rip), %rsi     # 0x3ba08
xorl %eax, %eax
movl %eax, %edx
callq 0x18640
movl $0x7b, %edi
callq 0xd670
leaq 0x37816(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, %ecx
leaq 0x3361b(%rip), %rax     # 0x39990
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x3, %ecx
movb %al, -0x49(%rbp)
je 0x640d
leaq 0x377f2(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, %ecx
leaq 0x335f7(%rip), %rax     # 0x39990
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x51, %ecx
movb %al, -0x49(%rbp)
je 0x640d
xorl %eax, %eax
leaq 0x377d0(%rip), %rcx     # 0x3db80
cmpl $0x20, (%rcx)
movb %al, -0x4a(%rbp)
jne 0x6407
xorl %eax, %eax
leaq 0x3772f(%rip), %rcx     # 0x3daf0
cmpq $0x0, (%rcx)
movb %al, -0x4a(%rbp)
je 0x6407
leaq 0x3771f(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movzbl 0x1a(%rax), %ecx
xorl %eax, %eax
cmpl $0x53, %ecx
movb %al, -0x4a(%rbp)
jne 0x6407
movb $0x1, %al
leaq 0x3aba5(%rip), %rcx     # 0x40f90
cmpl $0x5, (%rcx)
movb %al, -0x4b(%rbp)
jl 0x6401
callq 0x150b0
cmpl $0x3a, %eax
setne %al
movb %al, -0x4b(%rbp)
movb -0x4b(%rbp), %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x6416
jmp 0x6429
leaq 0x673(%rip), %rdi       # 0x6a90
xorl %esi, %esi
callq 0x66e0
jmp 0x6363
movq 0x355e8(%rip), %rdi     # 0x3ba18
callq 0x23630
movl %eax, -0x34(%rbp)
movq 0x355d9(%rip), %rax     # 0x3ba18
movq %rax, -0x58(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
movq 0x355d0(%rip), %rdi     # 0x3ba20
callq 0x23630
movl %eax, %ecx
movl -0x50(%rbp), %eax
addl %ecx, %eax
addl $0x1, %eax
cltq
shlq $0x3, %rax
addq $0x7, %rax
andq $-0x8, %rax
movl %eax, %ecx
leaq 0x351d2(%rip), %rax     # 0x3b648
movq (%rax), %rax
movl %ecx, (%rax)
leaq 0x351c6(%rip), %rax     # 0x3b648
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x351b8(%rip), %rcx     # 0x3b648
movq (%rcx), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
leaq 0x351a8(%rip), %rcx     # 0x3b648
movq (%rcx), %rcx
cmpq 0x10(%rcx), %rax
jb 0x64c7
leaq 0x35198(%rip), %rax     # 0x3b648
movq (%rax), %rax
movl (%rax), %edi
leaq 0x3518c(%rip), %rsi     # 0x3b648
callq 0x253d0
movq %rax, -0x60(%rbp)
jmp 0x6512
leaq 0x3517a(%rip), %rax     # 0x3b648
movq (%rax), %rax
movl (%rax), %edx
leaq 0x3516e(%rip), %rax     # 0x3b648
movq (%rax), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
leaq 0x35156(%rip), %rax     # 0x3b648
movq (%rax), %rax
movq 0x8(%rax), %rax
leaq 0x35148(%rip), %rcx     # 0x3b648
movq (%rcx), %rcx
movslq (%rcx), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x23670
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq 0x354ef(%rip), %rdi     # 0x3ba20
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rsi
movslq -0x34(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x23670
leaq 0x37630(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, %ecx
leaq 0x33435(%rip), %rax     # 0x39990
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x4d, %ecx
movb %al, -0x61(%rbp)
je 0x6588
leaq 0x37610(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, %ecx
leaq 0x33415(%rip), %rax     # 0x39990
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x6591
jmp 0x65a2
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x21500
jmp 0x6549
xorl %eax, %eax
movl %eax, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x3a80
leaq 0x34b82(%rip), %rax     # 0x3b138
movq (%rax), %rdi
leaq 0x3a9d0(%rip), %rax     # 0x40f90
movl (%rax), %esi
leaq 0xe17(%rip), %rdx       # 0x73e0
xorl %eax, %eax
movl %eax, %ecx
callq 0x243f0
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x6689
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
xorl %eax, %eax
cmpl -0x34(%rbp), %ecx
movb %al, -0x62(%rbp)
jle 0x662e
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x1c(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
setl %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
testb $0x1, %al
jne 0x6637
jmp 0x6667
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x65fc
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x65d8
leaq 0x34aa8(%rip), %rax     # 0x3b138
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
leaq 0x34ebe(%rip), %rax     # 0x3b560
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
movl $0x1, %edi
callq 0x3300
leaq 0x3a8d2(%rip), %rax     # 0x40f90
cmpl $0x5, (%rax)
jle 0x66d2
callq 0x24130
movl $0x7d, %edi
callq 0xd670
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)