// File: fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pSwitchCaseStatement()
static void pSwitchCaseStatement()
{
    std::string switched_val;
    DataType switched_dtype;
    std::string end_label = genLabel(); // switch end label

    assert(g_sym == SWITCHSY);
    readSymbol();
    test3(Symset({LPARENT}));
    readSymbol();
    pExpression(switched_val, switched_dtype);
    test3(Symset({RPARENT}));
    readSymbol();
    test3(Symset({LBRACE}));
    readSymbol(); // skip LBRACE
    pushMidCodeCacheStack();
    do {
        pCaseItem(switched_val, switched_dtype, end_label);
    } while (g_sym != RBRACE);
    // flush cached mid code here
    flushCachedMidCode();
    genMidCode(LABEL, end_label, NONE, NONE);
    readSymbol(); // skip RBRACE
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
leaq -0x20(%rbp), %rdi
callq 0x3450
leaq -0x48(%rbp), %rdi
callq 0x272a0
jmp 0x1ce7f
leaq 0x2e82a(%rip), %rax     # 0x4b6b0
cmpl $0x9, (%rax)
jne 0x1ce8d
jmp 0x1cebd
leaq 0x18955(%rip), %rdi     # 0x357e9
leaq 0x1858d(%rip), %rsi     # 0x35428
movl $0xf8, %edx
leaq 0x18954(%rip), %rcx     # 0x357fb
callq 0x3230
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1d2a3
callq 0x2e050
jmp 0x1cec4
jmp 0x1cec6
movl $0x1d, -0x74(%rbp)
leaq -0x74(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x1, -0x68(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x227f0
jmp 0x1cef0
movl $0x22, -0x98(%rbp)
movl $0x26, -0x94(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x2, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x227f0
jmp 0x1cf36
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x18170
jmp 0x1cf45
movl $0x1d, -0xb4(%rbp)
leaq -0xb4(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x1, -0xa8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x227f0
jmp 0x1cf84
leaq 0x2e725(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0xa0(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1cfa1
jmp 0x1cfd1
callq 0x2e050
jmp 0x1cfa8
movl $0x1, -0xb8(%rbp)
jmp 0x1d288
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x35e8
jmp 0x1d2a3
jmp 0x1cfd3
jmp 0x1cfd5
callq 0x2e050
jmp 0x1cfdc
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x1f630
jmp 0x1cfeb
jmp 0x1cfed
movl $0x1e, -0xd4(%rbp)
leaq -0xd4(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq $0x1, -0xc8(%rbp)
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0x227f0
jmp 0x1d02c
movl $0x22, -0xf8(%rbp)
movl $0x26, -0xf4(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq $0x2, -0xe8(%rbp)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
leaq -0xe0(%rbp), %rdi
callq 0x227f0
jmp 0x1d075
movq -0xc0(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0x18170
jmp 0x1d08a
movl $0x1e, -0x114(%rbp)
leaq -0x114(%rbp), %rax
movq %rax, -0x110(%rbp)
movq $0x1, -0x108(%rbp)
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x227f0
jmp 0x1d0c9
leaq 0x2e5e0(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x100(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1d0e6
jmp 0x1d0fc
callq 0x2e050
jmp 0x1d0ed
movl $0x1, -0xb8(%rbp)
jmp 0x1d288
jmp 0x1d0fe
jmp 0x1d100
callq 0x2e050
jmp 0x1d107
jmp 0x1d109
movl $0x21, -0x134(%rbp)
leaq -0x134(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x1, -0x128(%rbp)
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x227f0
jmp 0x1d148
movl $0x22, -0x158(%rbp)
movl $0x26, -0x154(%rbp)
leaq -0x158(%rbp), %rax
movq %rax, -0x150(%rbp)
movq $0x2, -0x148(%rbp)
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdx
leaq -0x140(%rbp), %rdi
callq 0x227f0
jmp 0x1d191
movq -0x120(%rbp), %rdi
movq -0x140(%rbp), %rsi
callq 0x18170
jmp 0x1d1a6
movl $0x21, -0x174(%rbp)
leaq -0x174(%rbp), %rax
movq %rax, -0x170(%rbp)
movq $0x1, -0x168(%rbp)
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
leaq -0x160(%rbp), %rdi
callq 0x227f0
jmp 0x1d1e5
leaq 0x2e4c4(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x160(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1d202
jmp 0x1d215
callq 0x2e050
jmp 0x1d209
movl $0x1, -0xb8(%rbp)
jmp 0x1d288
jmp 0x1d217
jmp 0x1d219
callq 0x2e050
jmp 0x1d220
callq 0x27030
jmp 0x1d227
jmp 0x1d229
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x21630
jmp 0x1d23c
jmp 0x1d23e
leaq 0x2e46b(%rip), %rax     # 0x4b6b0
cmpl $0x22, (%rax)
jne 0x1d229
callq 0x270f0
jmp 0x1d251
movl $0x13, -0x178(%rbp)
leaq 0x29d9e(%rip), %rcx     # 0x47000
leaq -0x178(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq %rcx, %rdx
callq 0x26340
jmp 0x1d277
callq 0x2e050
jmp 0x1d27e
movl $0x0, -0xb8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x35e8
leaq -0x20(%rbp), %rdi
callq 0x35e8
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x35e8
movq -0x50(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)