// File: /workspace/github_c_makefile_star2_O1/chgzm[P]minic/parser.c
// Function: create_stmt_node
static StmtNode* create_stmt_node(const Vector* vec, int* index) {
    StmtNode* stmt_node = calloc(1, sizeof(StmtNode));

    const Token* token = vec->elements[*index];
    switch (token->type) {
    case TK_CASE:
    case TK_DEFAULT: {
        stmt_node->labeled_stmt_node = create_labeled_stmt_node(vec, index);
        if (stmt_node->labeled_stmt_node == NULL) {
            error("Failed to create labeled-statement node.\n");
            return NULL;
        }

        break;
    }
    case TK_WHILE: 
    case TK_FOR: {
        stmt_node->itr_stmt_node = create_itr_stmt_node(vec, index);
        if (stmt_node->itr_stmt_node == NULL) {
            error("Failed to create iteration-statement node.\n");
            return NULL;
        }

        break;
    } 
    case TK_RETURN: 
    case TK_BREAK:
    case TK_CONTINUE: {
        stmt_node->jump_stmt_node = create_jump_stmt_node(vec, index);
        if (stmt_node->jump_stmt_node == NULL) {
            error("Failed to create jump-statement node.\n");
            return NULL;
        }

        break;
    }
    case TK_IF: 
    case TK_SWITCH: {
        stmt_node->selection_stmt_node = create_selection_stmt_node(vec, index);
        if (stmt_node->selection_stmt_node == NULL) {
            error("Failed to create selection-statement node.\n");
            return NULL;
        }

        break;
    }
    case TK_LBRCKT: {
        stmt_node->compound_stmt_node = create_compound_stmt_node(vec, index);
        if (stmt_node->compound_stmt_node == NULL) {
            error("Failed to create compound-statement node.\n");
            return NULL;
        }

        break;
    }
    default: {
        stmt_node->expr_stmt_node = create_expr_stmt_node(vec, index);
        if (stmt_node->expr_stmt_node == NULL) {
            error("Failed to create expression-statement node.\n");
            return NULL;
        }

        break;
    }
    }

    return stmt_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, %edi
movl $0x30, %esi
callq 0x10c0
movq %rax, (%rsp)
movq %rbx, %r14
movq (%rbx), %rbx
movq %r15, 0x8(%rsp)
movl (%r15), %r13d
movslq %r13d, %r15
movq (%rbx,%r15,8), %rax
movl (%rax), %ebp
leal -0xd(%rbp), %eax
cmpl $0x16, %eax
ja 0x7311
leaq 0x3987(%rip), %rcx      # 0xaa44
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r12
cmpl $0x14, %ebp
je 0x73c2
cmpl $0x16, %ebp
je 0x7368
cmpl $0x15, %ebp
jne 0x73ff
movl $0x0, (%r12)
jmp 0x73ca
movl $0x1, %edi
movl $0x30, %esi
callq 0x10c0
movq %rax, %r12
xorl %eax, %eax
callq 0x8b08
movq %rax, 0x28(%r12)
movq %r14, %r15
movq (%r14), %rcx
movq 0x8(%rsp), %r14
movslq (%r14), %rax
movq (%rcx,%rax,8), %rdx
movl (%rdx), %edx
cmpl $0xf, %edx
je 0x743a
cmpl $0x10, %edx
jne 0x77ba
movl $0x0, (%r12)
leaq 0x1(%rax), %r13
movl %r13d, (%r14)
movq 0x8(%rcx,%rax,8), %rcx
movl (%rcx), %edi
cmpl $0x21, %edi
jne 0x76ad
addl $0x2, %eax
movl %eax, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x60d0
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x77a9
movq (%r15), %rcx
movslq (%r14), %rax
movq (%rcx,%rax,8), %rcx
movl (%rcx), %edi
cmpl $0x22, %edi
jne 0x778e
incl %eax
movl %eax, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x706c
movq %rax, 0x8(%r12)
jmp 0x7511
movl $0x1, %edi
movl $0x20, %esi
callq 0x10c0
cmpl $0x11, %ebp
je 0x7526
cmpl $0xd, %ebp
jne 0x7622
movq %rax, 0x10(%rsp)
movq %r15, %rbp
incq %rbp
movq 0x8(%rsp), %r12
movl %ebp, (%r12)
movq 0x8(%rbx,%r15,8), %rax
movl (%rax), %edi
cmpl $0x21, %edi
jne 0x75c3
addl $0x2, %r13d
movl %r13d, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x60d0
movq 0x10(%rsp), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x7831
movq %r12, %r15
movq (%r14), %rax
movslq (%r12), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %edi
cmpl $0x22, %edi
jne 0x7624
leal 0x1(%r13), %eax
movl %eax, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x706c
movq 0x10(%rsp), %r12
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x78d2
movq (%r14), %rcx
movslq (%r15), %rax
movq (%rcx,%rax,8), %rcx
cmpl $0xe, (%rcx)
movq (%rsp), %rbx
jne 0x78e8
incl %eax
movl %eax, (%r15)
movl $0x1, (%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x706c
movq %rax, 0x18(%r12)
testq %rax, %rax
jne 0x7644
jmp 0x75ad
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r12
cmpl $0x13, %ebp
je 0x75d6
cmpl $0x12, %ebp
jne 0x765d
incl %r13d
movq 0x8(%rsp), %rbx
movl %r13d, (%rbx)
movl $0x0, (%r12)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5f58
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x76e1
movq (%r14), %rax
movslq (%rbx), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %edi
cmpl $0x20, %edi
jne 0x76f4
leal 0x1(%r13), %eax
movl %eax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x7603
movl $0x1, %edi
movl $0x8, %esi
callq 0x10c0
movq %rax, %r12
cmpl $0x1f, %ebp
jne 0x7670
movq $0x0, (%r12)
movq 0x8(%rsp), %rbx
jmp 0x76a2
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x5995
movq (%rsp), %rbx
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x7809
leaq 0x4252(%rip), %rdi      # 0xb5b5
jmp 0x7800
movl $0x2, (%r12)
movq %r15, %rax
incq %rax
movq 0x8(%rsp), %r13
movl %eax, (%r13)
movq 0x8(%rbx,%r15,8), %rax
cmpl $0x1f, (%rax)
movq (%rsp), %rbx
je 0x73bc
movq %r14, %rdi
movq %r13, %rsi
callq 0x60d0
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x781b
movq (%r14), %rax
movslq (%r13), %r15
movq (%rax,%r15,8), %rax
movl (%rax), %edi
cmpl $0x1f, %edi
jne 0x7849
incl (%r13)
jmp 0x7421
movl $0x1, (%r12)
movq %r15, %rbp
incq %rbp
movq 0x8(%rsp), %rcx
movl %ebp, (%rcx)
movq 0x8(%rbx,%r15,8), %rax
movl (%rax), %edi
cmpl $0x1f, %edi
jne 0x73ec
addl $0x2, %r13d
movl %r13d, (%rcx)
jmp 0x741d
callq 0x8a51
leaq 0x39f8(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %ebp, %esi
jmp 0x7413
movl %ebp, %edi
callq 0x8a51
leaq 0x39e3(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq (%rsp), %rbx
movq %r12, 0x28(%rbx)
testq %r12, %r12
jne 0x7809
leaq 0x412d(%rip), %rdi      # 0xb562
jmp 0x7800
movl $0x1, (%r12)
leal 0x1(%rax), %edx
movl %edx, (%r14)
movq 0x8(%rcx,%rax,8), %rdx
movl (%rdx), %edi
cmpl $0x21, %edi
jne 0x778e
movq %rax, %rsi
addq $0x2, %rsi
movl %esi, (%r14)
movq 0x10(%rcx,%rax,8), %rcx
movl (%rcx), %ebx
cmpl $0x1f, %ebx
jne 0x7742
movq %r12, %r13
addl $0x3, %eax
movl %eax, (%r14)
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x1f, (%rax)
je 0x74b7
movq %r15, %rdi
movq %r14, %rsi
callq 0x60d0
movq %rax, 0x18(%r13)
testq %rax, %rax
je 0x77a9
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %edi
cmpl $0x1f, %edi
jne 0x778e
leal 0x1(%rcx), %eax
movl %eax, (%r14)
movq (%r15), %rdx
movslq %ecx, %rcx
movq 0x8(%rdx,%rcx,8), %rcx
cmpl $0x22, (%rcx)
je 0x74fa
movq %r15, %rdi
movq %r14, %rsi
callq 0x60d0
movq %rax, 0x20(%r13)
testq %rax, %rax
je 0x77a9
movq (%r15), %rcx
movslq (%r14), %rax
movq (%rcx,%rax,8), %rcx
movl (%rcx), %edi
cmpl $0x22, %edi
jne 0x778e
incl %eax
movl %eax, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x706c
movq %rax, 0x8(%r13)
movq %r13, %r12
testq %rax, %rax
jne 0x77ba
leaq 0x414a(%rip), %rdi      # 0xb66b
jmp 0x77b0
movl $0x2, (%rax)
movq %r15, %rbp
incq %rbp
movq %rax, %rcx
movq 0x8(%rsp), %r12
movl %ebp, (%r12)
movq 0x8(%rbx,%r15,8), %rax
movl (%rax), %edi
cmpl $0x21, %edi
jne 0x75c3
addl $0x2, %r13d
movl %r13d, (%r12)
movq %r14, %rdi
movq %r12, %rsi
movq %rcx, %r15
callq 0x60d0
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x783d
movq (%r14), %rax
movslq (%r12), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %edi
cmpl $0x22, %edi
jne 0x7624
movq %r15, %rbx
leal 0x1(%r13), %eax
movl %eax, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x706c
movq %r15, %r12
movq %rax, 0x10(%rbx)
testq %rax, %rax
movq (%rsp), %rbx
jne 0x7644
leaq 0x3f36(%rip), %rdi      # 0xb4ea
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
jmp 0x7644
callq 0x8a51
leaq 0x3821(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %ebp, %esi
jmp 0x7636
leaq 0x1(%r15), %rbp
movq 0x8(%rsp), %rsi
movl %ebp, (%rsi)
movl $0x1, (%r12)
movq 0x8(%rbx,%r15,8), %rax
movl (%rax), %edi
cmpl $0x20, %edi
jne 0x76ce
addl $0x2, %r13d
movl %r13d, (%rsi)
movq %r14, %rdi
callq 0x706c
movq %rax, 0x10(%r12)
testq %rax, %rax
jne 0x7710
leaq 0x3ff0(%rip), %rdi      # 0xb60d
jmp 0x76e8
movl %ebp, %edi
callq 0x8a51
leaq 0x37c0(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq (%rsp), %rbx
movq %r12, 0x18(%rbx)
testq %r12, %r12
jne 0x7809
leaq 0x3f31(%rip), %rdi      # 0xb589
jmp 0x7800
movl %ebp, %edi
callq 0x8a51
leaq 0x3fcf(%rip), %rdi      # 0xb63a
jmp 0x7700
movq %r14, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x60d0
movq %rax, (%r12)
testq %rax, %rax
je 0x772c
movq (%r14), %rax
movslq (%rbx), %r13
movq (%rax,%r13,8), %rax
movl (%rax), %edi
cmpl $0x1f, %edi
jne 0x77d0
incl %r13d
movl %r13d, (%rbx)
jmp 0x77ec
callq 0x8a51
leaq 0x3737(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
jmp 0x77ba
callq 0x8a51
leaq 0x3716(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %ebp, %esi
jmp 0x7706
leaq 0x39e9(%rip), %rdi      # 0xb0d1
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
jmp 0x7710
callq 0x8a51
leaq 0x36f0(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq (%rsp), %rbx
movq %r12, (%rbx)
testq %r12, %r12
jne 0x7809
leaq 0x3de5(%rip), %rdi      # 0xb50c
jmp 0x7800
leaq 0x3cca(%rip), %rdi      # 0xb3fd
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
jmp 0x77ec
movq %r15, %rdi
callq 0x5ac1
andl $-0x9, %ebx
cmpl $0x4, %ebx
je 0x786a
testb %al, %al
jne 0x786a
movq %r15, %rdi
movq %r14, %rsi
callq 0x60d0
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x77a9
movq (%r15), %rcx
movslq (%r14), %rax
movq (%rcx,%rax,8), %rcx
movl (%rcx), %edi
cmpl $0x1f, %edi
jne 0x778e
movq %r12, %r13
incl %eax
jmp 0x7478
callq 0x8a51
leaq 0x3eb8(%rip), %rdi      # 0xb652
xorl %r12d, %r12d
movq %rax, %rsi
xorl %eax, %eax
callq 0x8a7c
jmp 0x77ba
leaq 0x3c4d(%rip), %rdi      # 0xb3fd
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
movq (%rsp), %rbx
movq %r12, 0x20(%rbx)
testq %r12, %r12
jne 0x7809
leaq 0x3d68(%rip), %rdi      # 0xb536
jmp 0x7800
callq 0x8a51
leaq 0x3614(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq (%rsp), %rbx
movq %r12, 0x8(%rbx)
testq %r12, %r12
jne 0x7809
leaq 0x3de0(%rip), %rdi      # 0xb5e0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x388c(%rip), %rdi      # 0xb0ae
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
jmp 0x7421
leaq 0x3da8(%rip), %rdi      # 0xb5e0
jmp 0x78d9
leaq 0x386a(%rip), %rdi      # 0xb0ae
jmp 0x78d9
callq 0x8a51
leaq 0x359b(%rip), %rdi      # 0xadf0
xorl %r12d, %r12d
movl %r15d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
jmp 0x7421
movq %r12, %r13
xorl %r12d, %r12d
movslq (%r14), %rsi
movq (%r15), %rax
movq (%rax,%rsi,8), %rax
movl (%rax), %ebx
movq %r15, %rdi
callq 0x5ac1
testb %al, %al
jne 0x7894
andl $-0x9, %ebx
cmpl $0x4, %ebx
jne 0x747b
movq %r15, %rdi
movq %r14, %rsi
callq 0x53b5
movq %rax, %rbp
testq %rax, %rax
je 0x78b5
movq 0x28(%r13), %rdi
movq %rbp, %rsi
callq 0x8b3b
jmp 0x78c3
leaq 0x3dd1(%rip), %rdi      # 0xb68d
xorl %eax, %eax
callq 0x8a7c
testq %rbp, %rbp
movq 0x8(%rsp), %r14
jne 0x7870
jmp 0x77ba
leaq 0x3c11(%rip), %rdi      # 0xb4ea
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8a7c
jmp 0x7640
movl $0x0, (%r12)
jmp 0x7644