// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/parse.c
// Function: parser_state_frames
static Janet parser_state_frames(const JanetParser *p) {
    int32_t count = (int32_t) p->statecount;
    JanetArray *states = janet_array(count);
    states->count = count;
    uint8_t *buf = p->buf;
    /* Iterate arg stack backwards */
    Janet *args = p->argcount ? p->args + p->argcount : p->args; /* avoid ptr arithmetic on NULL */
    for (int32_t i = count - 1; i >= 0; --i) {
        JanetParseState *s = p->states + i;
        /* avoid ptr arithmetic on args if NULL */
        if ((s->flags & PFLAG_CONTAINER) && s->argn) {
            args -= s->argn;
        }
        states->data[i] = janet_wrap_parse_state(s, args, buf, (uint32_t) p->bufcount);
    }
    return janet_wrap_array(states);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r15
movabsq $-0x5000000000000, %r14 # imm = 0xFFFB000000000000
movq 0x30(%rdi), %rbx
movl %ebx, %r13d
movl %ebx, %edi
callq 0x12f68
movq %rax, -0x38(%rbp)
movl %ebx, 0x10(%rax)
movq %r15, %rbx
movq 0x18(%r15), %rax
movq %rax, -0x40(%rbp)
movq 0x20(%r15), %r15
shlq $0x3, %r15
addq (%rbx), %r15
movq %rbx, -0x50(%rbp)
testl %r13d, %r13d
jle 0x37a61
decq %r13
movq 0x10(%rbx), %rax
movq %r13, -0x68(%rbp)
imulq $0x28, %r13, %rcx
leaq (%rax,%rcx), %r13
testb $0x1, 0x9(%rax,%rcx)
je 0x37781
movslq 0x4(%r13), %rax
testq %rax, %rax
je 0x37781
shlq $0x3, %rax
subq %rax, %r15
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movl 0x40(%rbx), %eax
movl %eax, -0x2c(%rbp)
xorl %edi, %edi
callq 0x43b8a
movq %rax, %r12
movl 0x8(%r13), %eax
btl $0x8, %eax
jae 0x3781c
movq %r12, -0x48(%rbp)
movq %r14, %rbx
movl 0x4(%r13), %edi
callq 0x12f68
movq %rax, %r12
xorl %r14d, %r14d
movslq 0x4(%r13), %rax
cmpq %rax, %r14
jge 0x377d7
movq (%r15,%r14,8), %rsi
movq %r12, %rdi
callq 0x131d2
incq %r14
jmp 0x377bd
leaq 0x3083d(%rip), %rdi     # 0x6801b
callq 0x439c6
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4b366
movq %rax, %r14
movq %r12, %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x4b3ab
movq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %r14
movq %rax, %rdx
callq 0x43e19
movl 0x8(%r13), %eax
testw $0xc00, %ax             # imm = 0xC00
movq %r15, -0x58(%rbp)
je 0x3783a
btl $0x10, %eax
leaq 0x172e5(%rip), %rbx     # 0x4eb16
leaq 0x16dff(%rip), %rax     # 0x4e637
jmp 0x37877
btl $0xc, %eax
jb 0x37865
testw $0x6000, %ax            # imm = 0x6000
je 0x3794d
btl $0x9, %eax
leaq 0x24330(%rip), %rbx     # 0x5bb85
leaq 0x17441(%rip), %rax     # 0x4ec9d
cmovaeq %rax, %rbx
jmp 0x379b8
btl $0x10, %eax
leaq 0x2ed4d(%rip), %rbx     # 0x665bd
leaq 0x2092b(%rip), %rax     # 0x581a2
cmovaeq %rax, %rbx
leaq 0x26e1f(%rip), %rdi     # 0x5e6a1
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r15
movq %rbx, %rdi
callq 0x439c6
movq %rax, %rdi
movq %r14, %rbx
movq %r14, %rsi
callq 0x4b366
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1cbeb(%rip), %rdi     # 0x544ab
callq 0x439c6
movq %rax, %rdi
movq %rbx, %r14
movq %rbx, %rsi
callq 0x4b366
movq %rax, %rbx
cvtsi2sdl 0x10(%r13), %xmm0
callq 0x4b471
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x43e19
leaq 0x1cbc1(%rip), %rdi     # 0x544b7
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %rbx
cvtsi2sdl 0x18(%r13), %xmm0
callq 0x4b471
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x43e19
movq %r12, %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x4b3ab
movq -0x68(%rbp), %r13
movq -0x60(%rbp), %rcx
movq %rax, (%rcx,%r13,8)
movq -0x50(%rbp), %rbx
movq -0x58(%rbp), %r15
jmp 0x3774e
btl $0x11, %eax
leaq 0x2be27(%rip), %rbx     # 0x6377f
jb 0x379b8
btl $0x12, %eax
leaq 0x2be22(%rip), %rbx     # 0x63787
jb 0x379b8
btl $0x10, %eax
leaq 0x173ab(%rip), %rbx     # 0x4ed1d
jb 0x3787b
leaq 0x2161c(%rip), %rbx     # 0x58f9b
testw %ax, %ax
jns 0x3787b
leaq 0x2d239(%rip), %rbx     # 0x64bc8
cmpb $0x27, %al
je 0x3787b
movzbl %al, %ecx
cmpl $0x2c, %ecx
je 0x37a3c
cmpl $0x3b, %ecx
jne 0x37a48
leaq 0x2d316(%rip), %rbx     # 0x64cc9
jmp 0x3787b
leaq 0x26ce2(%rip), %rdi     # 0x5e6a1
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %rax, %r15
movq %rbx, %rdi
callq 0x439c6
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b366
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x43e19
movq -0x40(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x41116
movq %rax, %r15
leaq 0x2417c(%rip), %rdi     # 0x5bb85
callq 0x439c6
movq %rax, %rdi
movq %r14, %rbx
movq %r14, %rsi
callq 0x4b366
movq %rax, %r14
movq %r15, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x4b366
movq %r12, %rdi
movq %r14, %rsi
jmp 0x378b1
leaq 0x2bcb5(%rip), %rbx     # 0x636f8
jmp 0x3787b
cmpb $0x7e, %al
leaq 0x2bd3c(%rip), %rbx     # 0x6378d
leaq 0x2d131(%rip), %rax     # 0x64b89
cmoveq %rax, %rbx
jmp 0x3787b
movq -0x38(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4b3ab