// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_file.c
// Function: subtilis_parser_get_hash
subtilis_exp_t *subtilis_parser_get_hash(subtilis_parser_t *p,
					 subtilis_token_t *t,
					 subtilis_error_t *err)
{
	subtilis_ir_operand_t handle;
	subtilis_ir_operand_t ret;
	subtilis_ir_operand_t zero;
	subtilis_ir_operand_t data;
	subtilis_ir_operand_t skip_label;
	subtilis_ir_operand_t array_size;
	subtilis_ir_operand_t get_label;
	bool check_dims;
	bool arg1_tmp;
	size_t val_reg;
	const char *tbuf;
	size_t el_size;
	subtilis_exp_t *a1;
	subtilis_exp_t *a2;
	bool cow = false;

	skip_label.label = subtilis_ir_section_new_label(p->current);
	get_label.label = subtilis_ir_section_new_label(p->current);

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

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, "(")) {
		subtilis_error_set_expected(err, "(", tbuf, p->l->stream->name,
					    p->l->line);
		return NULL;
	}

	check_dims =
	    prv_block_operation_prep(p, t, &handle, &array_size, &val_reg, &cow,
				     &arg1_tmp, &el_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, ")")) {
		subtilis_error_set_expected(err, ")", tbuf, p->l->stream->name,
					    p->l->line);
		return NULL;
	}

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

	if (arg1_tmp) {
		subtilis_error_set_temporary_not_allowed(
		    err, "second argument to get#", p->l->stream->name,
		    p->l->line);
		return NULL;
	}

	ret.reg = p->current->reg_counter++;
	if (check_dims) {
		zero.integer = 0;
		subtilis_ir_section_add_instr_no_reg2(
		    p->current, SUBTILIS_OP_INSTR_MOVI_I32, ret, zero, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;

		subtilis_ir_section_add_instr_reg(
		    p->current, SUBTILIS_OP_INSTR_JMPC, array_size, get_label,
		    skip_label, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;

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

	if (cow)
		data.reg = subtilis_reference_type_copy_on_write(
		    p, val_reg, 0, array_size.reg, err);
	else
		data.reg = subtilis_reference_get_data(p, val_reg, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	subtilis_ir_section_add_instr4(p->current, SUBTILIS_OP_INSTR_BLOCK_GET,
				       ret, handle, data, array_size, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	subtilis_exp_handle_errors(p, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (check_dims)
		subtilis_ir_section_add_label(p->current, skip_label.label,
					      err);

	a1 = subtilis_exp_new_int32_var(ret.reg, err);
	if (el_size == 1)
		return a1;

	a2 = subtilis_exp_new_int32((int32_t)el_size, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		subtilis_exp_delete(a1);
		return NULL;
	}

	return subtilis_type_if_div(p, a1, a2, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movb $0x0, 0xe(%rsp)
movq 0x48(%rdi), %rdi
callq 0x2cc99
movq %rax, %r15
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, %r12
movq (%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x210a3
movq %r13, %rdi
callq 0x12ad0
cmpl $0x2, (%r13)
jne 0x2106f
cmpb $0x28, (%rax)
jne 0x2106f
cmpb $0x0, 0x1(%rax)
je 0x210b8
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x528bc(%rip), %r10     # 0x7393d
leaq 0x531aa(%rip), %rdx     # 0x74232
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x17f                  # imm = 0x17F
pushq %r10
callq 0x143da
addq $0x10, %rsp
xorl %r13d, %r13d
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq $0x8, %rsp
leaq 0x28(%rsp), %rax
leaq 0x17(%rsp), %r10
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x30(%rsp), %r8
leaq 0x16(%rsp), %r9
movq %r14, %rdi
movq %r13, %rsi
pushq %rbx
pushq %rax
pushq %r10
callq 0x212eb
addq $0x20, %rsp
cmpl $0x0, (%rbx)
jne 0x210a3
movl %eax, %ebp
movq %r13, %rdi
callq 0x12ad0
cmpl $0x2, (%r13)
jne 0x2110e
cmpb $0x29, (%rax)
jne 0x2110e
cmpb $0x0, 0x1(%rax)
je 0x2113c
movq (%r14), %rcx
movq 0x30(%rcx), %r8
movl 0x38(%rcx), %r9d
leaq 0x5281d(%rip), %r10     # 0x7393d
leaq 0x529de(%rip), %rdx     # 0x73b05
movq %rbx, %rdi
movl $0x1d, %esi
movq %rax, %rcx
pushq $0x18c                  # imm = 0x18C
jmp 0x21098
movq (%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x12edc
cmpl $0x0, (%rbx)
jne 0x210a3
cmpb $0x1, 0xf(%rsp)
jne 0x2118d
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x527d1(%rip), %rax     # 0x7393d
leaq 0x527e1(%rip), %rdx     # 0x73954
leaq 0x52c9b(%rip), %rcx     # 0x73e15
movq %rbx, %rdi
movl $0x53, %esi
pushq $0x197                  # imm = 0x197
pushq %rax
jmp 0x2109a
movq 0x48(%r14), %rdi
movq 0x18(%rdi), %rdx
leaq 0x1(%rdx), %rax
movq %rax, 0x18(%rdi)
testb %bpl, %bpl
je 0x21204
xorl %r13d, %r13d
movl $0x1b, %esi
movq %rdx, 0x18(%rsp)
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2be2c
cmpl $0x0, (%rbx)
jne 0x210a6
movq 0x48(%r14), %rdi
movq 0x10(%rsp), %rdx
movl $0x43, %esi
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x210a3
movq 0x48(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
movq 0x18(%rsp), %rdx
jne 0x210a3
movq %rdx, %r12
movq 0x28(%rsp), %rsi
cmpb $0x1, 0xe(%rsp)
jne 0x21227
movq 0x10(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %r8
callq 0x4db4f
jmp 0x21234
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4d258
cmpl $0x0, (%rbx)
jne 0x210a3
movq 0x48(%r14), %rdi
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %r9
subq $0x8, %rsp
movl $0x91, %esi
movq %r12, %rdx
movq %rax, %r8
pushq %rbx
callq 0x2bea4
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x210a3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b01f
cmpl $0x0, (%rbx)
jne 0x210a3
testb %bpl, %bpl
je 0x21295
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cca6
movl %r12d, %edi
movq %rbx, %rsi
callq 0x2b71f
movq %rax, %r13
movq 0x20(%rsp), %rdi
cmpq $0x1, %rdi
je 0x210a6
movq %rbx, %rsi
callq 0x2b7af
cmpl $0x0, (%rbx)
je 0x212cc
movq %r13, %rdi
callq 0x2b166
jmp 0x210a3
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36e2e