// File: /workspace/github_c_makefile_star2_O1/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 0x146a0
movq %rax, -0x40(%rbp)
movl %ebx, 0x10(%rax)
testl %ebx, %ebx
jle 0x3b1e1
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 0x3aed9
movslq 0x4(%rbx), %rax
testq %rax, %rax
je 0x3aed9
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 0x47e96
movq %rax, -0x30(%rbp)
testb $0x1, 0x9(%rbx)
je 0x3af6c
movl 0x4(%rbx), %edi
callq 0x146a0
movq %rax, %r14
cmpl $0x0, 0x4(%rbx)
jle 0x3af2a
xorl %r13d, %r13d
movq (%r15,%r13,8), %rsi
movq %r14, %rdi
callq 0x148b3
incq %r13
movslq 0x4(%rbx), %rax
cmpq %rax, %r13
jl 0x3af12
leaq 0x320ea(%rip), %rdi     # 0x6d01b
callq 0x47cd3
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x4f9ad
movq %rax, %r13
movq %r14, %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x4f9f2
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x481b3
movl 0x8(%rbx), %eax
testl $0xc00, %eax            # imm = 0xC00
je 0x3af8a
btl $0x10, %eax
leaq 0x18b95(%rip), %r12     # 0x53b16
leaq 0x186af(%rip), %rax     # 0x53637
jmp 0x3afc8
btl $0xc, %eax
jb 0x3afb6
testl $0x6000, %eax           # imm = 0x6000
je 0x3b0b1
btl $0x9, %eax
leaq 0x25bdf(%rip), %r14     # 0x60b85
leaq 0x18cf0(%rip), %rax     # 0x53c9d
cmovaeq %rax, %r14
jmp 0x3b11c
btl $0x10, %eax
leaq 0x305fc(%rip), %r12     # 0x6b5bd
leaq 0x221da(%rip), %rax     # 0x5d1a2
cmovaeq %rax, %r12
leaq 0x286ce(%rip), %rdi     # 0x636a1
callq 0x47cd3
movq %rax, %rdi
movabsq $-0x5000000000000, %r13 # imm = 0xFFFB000000000000
movq %r13, %rsi
callq 0x4f9ad
movq %rax, %r14
movq %r12, %rdi
movq %r13, %r12
callq 0x47cd3
movq %rax, %rdi
movq %r13, %rsi
callq 0x4f9ad
movq -0x30(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1e48c(%rip), %rdi     # 0x594ab
callq 0x47cd3
movq %rax, %rdi
movq %r12, %rsi
callq 0x4f9ad
movq %rax, %r14
cvtsi2sdl 0x10(%rbx), %xmm0
callq 0x4fab8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x481b3
leaq 0x1e466(%rip), %rdi     # 0x594b7
callq 0x47cd3
movq %rax, %rdi
movq %r12, %rsi
callq 0x4f9ad
movq %rax, %r14
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%rbx), %xmm0
callq 0x4fab8
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x481b3
movq %r13, %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x4f9f2
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %rcx
movq %rax, (%rcx,%rbx,8)
cmpq $0x1, -0x68(%rbp)
movq -0x50(%rbp), %r12
jg 0x3aeaa
jmp 0x3b1e1
btl $0x11, %eax
leaq 0x2d6c3(%rip), %r14     # 0x6877f
jb 0x3b11c
btl $0x12, %eax
leaq 0x2d6be(%rip), %r14     # 0x68787
jb 0x3b11c
btl $0x10, %eax
leaq 0x18c47(%rip), %r12     # 0x53d1d
jb 0x3afcc
leaq 0x22eb8(%rip), %r12     # 0x5df9b
testw %ax, %ax
jns 0x3afcc
leaq 0x2ead5(%rip), %r12     # 0x69bc8
cmpb $0x27, %al
je 0x3afcc
movzbl %al, %ecx
cmpl $0x2c, %ecx
je 0x3b1bc
cmpl $0x3b, %ecx
jne 0x3b1c8
leaq 0x2ebb2(%rip), %r12     # 0x69cc9
jmp 0x3afcc
leaq 0x2857e(%rip), %rdi     # 0x636a1
callq 0x47cd3
movq %rax, %rdi
movabsq $-0x5000000000000, %r13 # imm = 0xFFFB000000000000
movq %r13, %rsi
callq 0x4f9ad
movq %rax, %r12
movq %r14, %rdi
callq 0x47cd3
movq %rax, %rdi
movq %r13, %rsi
callq 0x4f9ad
movq -0x30(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x481b3
movq -0x48(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x45094
movq %rax, %r14
leaq 0x25a0a(%rip), %rdi     # 0x60b85
callq 0x47cd3
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x4f9ad
movq %rax, %r12
movq %r14, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x4f9ad
movq %r13, %rdi
movq %r12, %rsi
movabsq $-0x5000000000000, %r12 # imm = 0xFFFB000000000000
jmp 0x3b010
leaq 0x2d535(%rip), %r12     # 0x686f8
jmp 0x3afcc
cmpb $0x7e, %al
leaq 0x2d5bc(%rip), %r12     # 0x6878d
leaq 0x2e9b1(%rip), %rax     # 0x69b89
cmoveq %rax, %r12
jmp 0x3afcc
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 0x4f9f2