// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq 0x30(%rdi), %rbx
movl %ebx, %edi
callq 0x14690
movq %rax, -0x40(%rbp)
movl %ebx, 0x10(%rax)
testl %ebx, %ebx
jle 0x3ac86
movq 0x18(%r12), %rax
movq %rax, -0x48(%rbp)
movq 0x20(%r12), %r15
shlq $0x3, %r15
addq (%r12), %r15
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
movq %r12, -0x50(%rbp)
movq %rbx, -0x68(%rbp)
leaq -0x1(%rbx), %rcx
movq 0x10(%r12), %rax
movq %rcx, -0x60(%rbp)
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %rbx
testb $0x1, 0x9(%rbx)
je 0x3a97b
movslq 0x4(%rbx), %rax
testq %rax, %rax
je 0x3a97b
shlq $0x3, %rax
subq %rax, %r15
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movl 0x40(%r12), %eax
movl %eax, -0x34(%rbp)
xorl %edi, %edi
callq 0x47425
movq %rax, -0x30(%rbp)
movl 0x8(%rbx), %eax
btl $0x8, %eax
jae 0x3aa14
movl 0x4(%rbx), %edi
callq 0x14690
movq %rax, %r14
cmpl $0x0, 0x4(%rbx)
jle 0x3a9cf
xorl %r13d, %r13d
movq (%r15,%r13,8), %rsi
movq %r14, %rdi
callq 0x148a3
incq %r13
movslq 0x4(%rbx), %rax
cmpq %rax, %r13
jl 0x3a9b7
leaq 0x31625(%rip), %rdi     # 0x6bffb
callq 0x47261
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x4ed39
movq %rax, %r13
movq %r14, %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x4ed7e
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x476f0
movl 0x8(%rbx), %eax
testl $0xc00, %eax            # imm = 0xC00
je 0x3aa2f
btl $0x10, %eax
leaq 0x180f0(%rip), %r12     # 0x52b16
leaq 0x17c0a(%rip), %rax     # 0x52637
jmp 0x3aa6d
btl $0xc, %eax
jb 0x3aa5b
testl $0x6000, %eax           # imm = 0x6000
je 0x3ab56
btl $0x9, %eax
leaq 0x2513a(%rip), %r14     # 0x5fb85
leaq 0x1824b(%rip), %rax     # 0x52c9d
cmovaeq %rax, %r14
jmp 0x3abc1
btl $0x10, %eax
leaq 0x2fb37(%rip), %r12     # 0x6a59d
leaq 0x21735(%rip), %rax     # 0x5c1a2
cmovaeq %rax, %r12
leaq 0x27c19(%rip), %rdi     # 0x62691
callq 0x47261
movq %rax, %rdi
movabsq $-0x5000000000000, %r13 # imm = 0xFFFB000000000000
movq %r13, %rsi
callq 0x4ed39
movq %rax, %r14
movq %r12, %rdi
movq %r13, %r12
callq 0x47261
movq %rax, %rdi
movq %r13, %rsi
callq 0x4ed39
movq -0x30(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1d9e7(%rip), %rdi     # 0x584ab
callq 0x47261
movq %rax, %rdi
movq %r12, %rsi
callq 0x4ed39
movq %rax, %r14
cvtsi2sdl 0x10(%rbx), %xmm0
callq 0x4ee44
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x476f0
leaq 0x1d9c1(%rip), %rdi     # 0x584b7
callq 0x47261
movq %rax, %rdi
movq %r12, %rsi
callq 0x4ed39
movq %rax, %r14
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rbx), %xmm0
callq 0x4ee44
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x476f0
movq %r13, %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x4ed7e
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %rcx
movq %rax, (%rcx,%rbx,8)
cmpq $0x1, -0x68(%rbp)
movq -0x50(%rbp), %r12
jg 0x3a94c
jmp 0x3ac86
btl $0x11, %eax
leaq 0x2cbfe(%rip), %r14     # 0x6775f
jb 0x3abc1
btl $0x12, %eax
leaq 0x2cbf9(%rip), %r14     # 0x67767
jb 0x3abc1
btl $0x10, %eax
leaq 0x181a2(%rip), %r12     # 0x52d1d
jb 0x3aa71
leaq 0x22413(%rip), %r12     # 0x5cf9b
testw %ax, %ax
jns 0x3aa71
leaq 0x2e010(%rip), %r12     # 0x68ba8
cmpb $0x27, %al
je 0x3aa71
movzbl %al, %ecx
cmpl $0x2c, %ecx
je 0x3ac61
cmpl $0x3b, %ecx
jne 0x3ac6d
leaq 0x2e0ed(%rip), %r12     # 0x68ca9
jmp 0x3aa71
leaq 0x27ac9(%rip), %rdi     # 0x62691
callq 0x47261
movq %rax, %rdi
movabsq $-0x5000000000000, %r13 # imm = 0xFFFB000000000000
movq %r13, %rsi
callq 0x4ed39
movq %rax, %r12
movq %r14, %rdi
callq 0x47261
movq %rax, %rdi
movq %r13, %rsi
callq 0x4ed39
movq -0x30(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x476f0
movq -0x48(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x44754
movq %rax, %r14
leaq 0x24f65(%rip), %rdi     # 0x5fb85
callq 0x47261
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x4ed39
movq %rax, %r12
movq %r14, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x4ed39
movq %r13, %rdi
movq %r12, %rsi
movabsq $-0x5000000000000, %r12 # imm = 0xFFFB000000000000
jmp 0x3aab5
leaq 0x2ca70(%rip), %r12     # 0x676d8
jmp 0x3aa71
cmpb $0x7e, %al
leaq 0x2caf7(%rip), %r12     # 0x6776d
leaq 0x2deec(%rip), %rax     # 0x68b69
cmoveq %rax, %r12
jmp 0x3aa71
movq -0x40(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ed7e