// File: /workspace/github_c_makefile_star2_O0/afi-lambda[P]a_little_smalltalk/src/parser.c
// Function: block
static void block()
{
    int saveTemporary, argumentCount, fixLocation;
    object tempsym, newBlk;
    enum blockstatus savebstat;

    saveTemporary = temporaryTop;
    savebstat = blockstat;
    argumentCount = 0;
    nextToken();
    if ((token == binary) && streq(tokenString, ":"))
    {
        while (parseok && (token == binary) && streq(tokenString,":"))
        {
            if (nextToken() != nameconst)
                compilError(selector, "name must follow colon",
                                 "in block argument list");
            if (++temporaryTop > maxTemporary)
                maxTemporary = temporaryTop;
            argumentCount++;
            if (temporaryTop > temporaryLimit)
                compilError(selector, "too many temporaries in method", "");
            else
            {
                tempsym = newSymbol(tokenString);
                temporaryName[temporaryTop] = charPtr(tempsym);
            }
            nextToken();
        }
        if ((token != binary) || !streq(tokenString, "|"))
            compilError(selector, "block argument list must be terminated",
                             "by |");
        nextToken();
    }
    newBlk = newBlock();
    basicAtPut(newBlk, argumentCountInBlock, newInteger(argumentCount));
    basicAtPut(newBlk, argumentLocationInBlock,
               newInteger(saveTemporary + 1));
    genInstruction(PushLiteral, genLiteral(newBlk));
    genInstruction(PushConstant, contextConst);
    genInstruction(DoPrimitive, 2);
    genCode(29);
    genInstruction(DoSpecial, Branch);
    fixLocation = codeTop;
    genCode(0);
    /*genInstruction(DoSpecial, PopTop);*/
    basicAtPut(newBlk, bytecountPositionInBlock, newInteger(codeTop+1));
    blockstat = InBlock;
    body();
    if ((token == closing) && streq(tokenString, "]"))
        nextToken();
    else
        compilError(selector, "block not terminated by ]", "");
    genInstruction(DoSpecial, StackReturn);
    codeArray[fixLocation] = codeTop + 1;
    temporaryTop = saveTemporary;
    blockstat = savebstat;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl 0x1fcf2(%rip), %eax     # 0x2ad90
movl %eax, -0x4(%rbp)
movl 0x1fcdd(%rip), %eax     # 0x2ad84
movl %eax, -0x14(%rbp)
movl $0x0, -0x8(%rbp)
callq 0x8710
leaq 0x1f483(%rip), %rax     # 0x2a540
cmpl $0x9, (%rax)
jne 0xb280
leaq 0x1f423(%rip), %rdi     # 0x2a4f0
leaq 0x11a1(%rip), %rsi      # 0xc275
callq 0x2150
cmpl $0x0, %eax
jne 0xb280
jmp 0xb0e4
xorl %eax, %eax
cmpl $0x0, 0x1fc93(%rip)     # 0x2ad80
movb %al, -0x15(%rbp)
je 0xb11f
xorl %eax, %eax
leaq 0x1f445(%rip), %rcx     # 0x2a540
cmpl $0x9, (%rcx)
movb %al, -0x15(%rbp)
jne 0xb11f
leaq 0x1f3e6(%rip), %rdi     # 0x2a4f0
leaq 0x1164(%rip), %rsi      # 0xc275
callq 0x2150
cmpl $0x0, %eax
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0xb12b
jmp 0xb23d
callq 0x8710
cmpl $0x1, %eax
je 0xb14f
leaq 0x1fd64(%rip), %rdi     # 0x2aea0
leaq 0x19ed(%rip), %rsi      # 0xcb30
leaq 0x19fd(%rip), %rdx      # 0xcb47
callq 0x64b0
movl 0x1fc3b(%rip), %eax     # 0x2ad90
addl $0x1, %eax
movl %eax, 0x1fc32(%rip)     # 0x2ad90
cmpl 0x1fc34(%rip), %eax     # 0x2ad98
jle 0xb172
movl 0x1fc24(%rip), %eax     # 0x2ad90
movl %eax, 0x1fc26(%rip)     # 0x2ad98
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x100, 0x1fc0b(%rip)   # imm = 0x100
jle 0xb1a6
leaq 0x1fd12(%rip), %rdi     # 0x2aea0
leaq 0x178c(%rip), %rsi      # 0xc921
leaq 0x1519(%rip), %rdx      # 0xc6b5
callq 0x64b0
jmp 0xb233
leaq 0x1f343(%rip), %rdi     # 0x2a4f0
callq 0x4000
movw %ax, -0xe(%rbp)
movw -0xe(%rbp), %ax
leaq 0x1e6ef(%rip), %rcx     # 0x298b0
movw %ax, (%rcx)
movswl %ax, %edi
callq 0x2fb0
cmpl $0x0, %eax
je 0xb1f8
leaq 0x1e6d8(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x5079(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xb21d
leaq 0x1e6b1(%rip), %rax     # 0x298b0
movswl (%rax), %eax
sarl %eax
movslq %eax, %rcx
leaq 0x5052(%rip), %rax      # 0x10260
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
movslq 0x1fb68(%rip), %rcx     # 0x2ad90
leaq 0x206c1(%rip), %rax     # 0x2b8f0
movq %rdx, (%rax,%rcx,8)
callq 0x8710
jmp 0xb0e4
leaq 0x1f2fc(%rip), %rax     # 0x2a540
cmpl $0x9, (%rax)
jne 0xb261
leaq 0x1f2a0(%rip), %rdi     # 0x2a4f0
leaq 0x1931(%rip), %rsi      # 0xcb88
callq 0x2150
cmpl $0x0, %eax
je 0xb27b
leaq 0x1fc38(%rip), %rdi     # 0x2aea0
leaq 0x18ef(%rip), %rsi      # 0xcb5e
leaq 0x190f(%rip), %rdx      # 0xcb85
callq 0x64b0
callq 0x8710
movb $0x0, %al
callq 0x3de0
movw %ax, -0x10(%rbp)
movl -0x8(%rbp), %edi
callq 0x34a0
movswl -0x10(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x4fbd(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, 0x2(%rcx)
movswl %ax, %edi
callq 0x2fd0
movl -0x4(%rbp), %edi
addl $0x1, %edi
callq 0x34a0
movswl -0x10(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x4f8b(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, 0x4(%rcx)
movswl %ax, %edi
callq 0x2fd0
movswl -0x10(%rbp), %edi
callq 0xa290
movl %eax, %esi
movl $0x4, %edi
callq 0x9650
movl $0x5, %edi
movl $0x4, %esi
callq 0x9650
movl $0xd, %edi
movl $0x2, %esi
callq 0x9650
movl $0x1d, %edi
callq 0xa750
movl $0xf, %edi
movl $0x6, %esi
callq 0x9650
movl 0x1fa4a(%rip), %eax     # 0x2ad88
movl %eax, -0xc(%rbp)
xorl %edi, %edi
callq 0xa750
movl 0x1fa3a(%rip), %edi     # 0x2ad88
addl $0x1, %edi
callq 0x34a0
movswl -0x10(%rbp), %ecx
sarl %ecx
movslq %ecx, %rdx
leaq 0x4efa(%rip), %rcx      # 0x10260
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
movw %ax, 0x6(%rcx)
movswl %ax, %edi
callq 0x2fd0
movl $0x1, 0x1f9fd(%rip)     # 0x2ad84
callq 0x9aa0
leaq 0x1f1ad(%rip), %rax     # 0x2a540
cmpl $0xa, (%rax)
jne 0xb3b7
leaq 0x1f151(%rip), %rdi     # 0x2a4f0
leaq 0x17fc(%rip), %rsi      # 0xcba2
callq 0x2150
cmpl $0x0, %eax
jne 0xb3b7
callq 0x8710
jmp 0xb3d1
leaq 0x1fae2(%rip), %rdi     # 0x2aea0
leaq 0x17c5(%rip), %rsi      # 0xcb8a
leaq 0x12e9(%rip), %rdx      # 0xc6b5
callq 0x64b0
movl $0xf, %edi
movl $0x2, %esi
callq 0x9650
movl 0x1f9a2(%rip), %eax     # 0x2ad88
addl $0x1, %eax
movb %al, %dl
movslq -0xc(%rbp), %rcx
leaq 0x1f9aa(%rip), %rax     # 0x2ada0
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
movl %eax, 0x1f98e(%rip)     # 0x2ad90
movl -0x14(%rbp), %eax
movl %eax, 0x1f979(%rip)     # 0x2ad84
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)