// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_array.c
// Function: prv_read_string_table
static void prv_read_string_table(subtilis_parser_t *p, size_t array_base,
				  size_t table_base, size_t entries,
				  size_t element_size, subtilis_error_t *err)
{
	subtilis_ir_operand_t start;
	subtilis_ir_operand_t end;
	subtilis_ir_operand_t zero_len;
	subtilis_ir_operand_t gt_zero;
	subtilis_ir_operand_t table_end;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t size;
	subtilis_ir_operand_t cond;
	subtilis_ir_operand_t skip;
	subtilis_ir_operand_t lca_offset;
	subtilis_ir_operand_t table_ptr;
	subtilis_ir_operand_t array_ptr;

	start.label = subtilis_ir_section_new_label(p->current);
	end.label = subtilis_ir_section_new_label(p->current);
	zero_len.label = subtilis_ir_section_new_label(p->current);
	gt_zero.label = subtilis_ir_section_new_label(p->current);
	skip.label = subtilis_ir_section_new_label(p->current);

	table_ptr.reg = table_base;
	array_ptr.reg = array_base;

	op1.integer = entries * sizeof(int32_t) * 2;
	table_end.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_ADDI_I32, table_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, start.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = 0;
	size.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, table_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  size, gt_zero, zero_len, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, gt_zero.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = sizeof(int32_t);
	lca_offset.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LOADO_I32, table_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_type_deref(p, array_ptr.reg, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_string_init_from_lca(p, array_ptr.reg, 0, lca_offset.reg,
				      size.reg, false, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     skip, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, zero_len.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_reference_type_set_size(p, array_ptr.reg, 0, size.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, skip.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = (int32_t)element_size;
	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_ADDI_I32, array_ptr,
					  array_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	op1.integer = sizeof(int32_t) * 2;
	subtilis_ir_section_add_instr_reg(p->current,
					  SUBTILIS_OP_INSTR_ADDI_I32, table_ptr,
					  table_ptr, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	cond.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LT_I32, table_ptr, table_end, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  cond, start, end, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return;

	subtilis_ir_section_add_label(p->current, end.label, err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
shlq $0x2, %rax
shlq %rax
movl %eax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x88(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x9, %esi
callq 0x38230
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1abaf
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1abd2
jmp 0x1ae73
movl $0x0, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x88(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x12, %esi
callq 0x38230
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ac0c
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x68(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
movl $0x43, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ac3c
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ac5f
jmp 0x1ae73
movl $0x4, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x88(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x12, %esi
callq 0x38230
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ac99
jmp 0x1ae73
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x30(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x6df60
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1acbf
jmp 0x1ae73
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x80(%rbp), %rcx
movq -0x68(%rbp), %r8
movq -0x30(%rbp), %rax
xorl %edx, %edx
xorl %r9d, %r9d
movq %rax, (%rsp)
callq 0x66160
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1acf2
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rcx
movq -0x78(%rbp), %rdx
movl $0x45, %esi
callq 0x38540
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ad1a
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x48(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ad3d
jmp 0x1ae73
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x68(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
callq 0x6dc50
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ad67
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x78(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ad8a
jmp 0x1ae73
movq -0x28(%rbp), %rax
movl %eax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x90(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x60(%rbp), %r8
movl $0x9, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1adc7
jmp 0x1ae73
movl $0x8, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x88(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq -0x60(%rbp), %r8
movl $0x9, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ae01
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r8
movq -0x88(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl $0x3b, %esi
callq 0x38230
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ae31
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %r9
movq -0x70(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movl $0x43, %esi
callq 0x38360
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ae5e
jmp 0x1ae73
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x39960
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)