// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_next
static void prv_parse_next(subtilis_arm_ass_context_t *c, subtilis_error_t *err)
{
	subtilis_ass_block_t *block;
	subtilis_arm_exp_val_t *index_var;
	size_t var;
	bool finished;
	size_t i;

	if (c->num_blocks == 0) {
		subtilis_error_set_keyword_unexpected(
		    err, "NEXT", c->l->stream->name, c->l->line);
		return;
	}

	block = &c->blocks[c->num_blocks - 1];
	var = block->def_start;
	index_var = c->defs[var].val;

	switch (block->upto->type) {
	case SUBTILIS_ARM_EXP_TYPE_INT:
		index_var->val.integer++;
		finished = index_var->val.integer > block->upto->val.integer;
		break;
	case SUBTILIS_ARM_EXP_TYPE_REAL:
		index_var->val.real++;
		finished = index_var->val.real > block->upto->val.real;
		break;
	case SUBTILIS_ARM_EXP_TYPE_FREG:
	case SUBTILIS_ARM_EXP_TYPE_REG:
		index_var->val.reg++;
		finished = index_var->val.reg > block->upto->val.reg;
		break;
	default:
		subtilis_error_set_assertion_failed(err);
		return;
	}

	for (i = var + 1; i < c->def_count; i++) {
		free(c->defs[i].name);
		subtilis_arm_exp_val_free(c->defs[i].val);
	}
	c->def_count = var + 1;
	if (finished) {
		c->num_blocks--;
		subtilis_arm_exp_val_free(c->blocks[c->num_blocks].upto);
		subtilis_lexer_pop_block(c->l, err);
	} else {
		subtilis_lexer_set_block_start(c->l, err);
	}

	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_lexer_get(c->l, c->t, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x92b97
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x11, %esi
leaq 0x1755e(%rip), %rdx     # 0xaa0d1
leaq 0x186fc(%rip), %rcx     # 0xab276
leaq 0x1b59f(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x1033, 0x8(%rsp)      # imm = 0x1033
callq 0x156d0
jmp 0x92d9b
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rcx
movq 0x70(%rax), %rax
shlq $0x4, %rax
leaq -0x10(%rax,%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
subl $0x2, %eax
jb 0x92c61
jmp 0x92be8
movl -0x3c(%rbp), %eax
subl $0x6, %eax
je 0x92bff
jmp 0x92bf2
movl -0x3c(%rbp), %eax
subl $0x7, %eax
je 0x92c2b
jmp 0x92c8f
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
setg %al
andb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x92cae
movq -0x20(%rbp), %rax
movsd 0x197b9(%rip), %xmm0    # 0xac3f0
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
ucomisd 0x8(%rax), %xmm0
seta %al
andb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x92cae
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x8(%rcx), %rax
seta %al
andb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x92cae
movq -0x10(%rbp), %rdi
movl $0xf, %esi
leaq 0x1b481(%rip), %rdx     # 0xae120
movl $0x104a, %ecx           # imm = 0x104A
callq 0x158e0
jmp 0x92d9b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jae 0x92d0d
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x12290
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x9a4c0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x92cba
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
testb $0x1, -0x29(%rbp)
je 0x92d66
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x70(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x9a4c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x13380
jmp 0x92d77
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x13290
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x92d82
jmp 0x92d9b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x133f0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)