// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movb $0x0, 0x6(%rsp)
movq 0x48(%rdi), %rdi
callq 0x2d00a
movq %rax, %r15
movq 0x48(%r14), %rdi
callq 0x2d00a
movq %rax, %r12
movq (%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x12eda
cmpl $0x0, (%rbx)
jne 0x21124
movq %r13, %rdi
callq 0x12ad0
movq %rax, %rbp
cmpl $0x2, (%r13)
jne 0x210f1
leaq 0x5312d(%rip), %rsi     # 0x74212
movq %rbp, %rdi
callq 0x12160
testl %eax, %eax
je 0x21139
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x52818(%rip), %rax     # 0x7391b
leaq 0x53108(%rip), %rdx     # 0x74212
movq %rbx, %rdi
movl $0x1d, %esi
movq %rbp, %rcx
pushq $0x17f                  # imm = 0x17F
pushq %rax
callq 0x1442a
addq $0x10, %rsp
xorl %r13d, %r13d
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq $0x8, %rsp
leaq 0x18(%rsp), %rax
leaq 0xf(%rsp), %r10
leaq 0x28(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0xe(%rsp), %r9
movq %r14, %rdi
movq %r13, %rsi
pushq %rbx
pushq %rax
pushq %r10
callq 0x21371
addq $0x20, %rsp
cmpl $0x0, (%rbx)
jne 0x21124
movb %al, 0x5(%rsp)
movq %r13, %rdi
callq 0x12ad0
movq %rax, %rbp
cmpl $0x2, (%r13)
jne 0x2119c
leaq 0x5295d(%rip), %rsi     # 0x73aed
movq %rbp, %rdi
callq 0x12160
testl %eax, %eax
je 0x211ca
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5276d(%rip), %rax     # 0x7391b
leaq 0x52938(%rip), %rdx     # 0x73aed
movq %rbx, %rdi
movl $0x1d, %esi
movq %rbp, %rcx
pushq $0x18c                  # imm = 0x18C
jmp 0x2111a
movq (%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x12eda
cmpl $0x0, (%rbx)
jne 0x21124
cmpb $0x1, 0x7(%rsp)
jne 0x2121a
movq (%r14), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x52721(%rip), %rax     # 0x7391b
leaq 0x52731(%rip), %rdx     # 0x73932
leaq 0x52bed(%rip), %rcx     # 0x73df5
movq %rbx, %rdi
movl $0x53, %esi
pushq $0x197                  # imm = 0x197
jmp 0x2111a
movq 0x48(%r14), %rdi
movq 0x18(%rdi), %rbp
leaq 0x1(%rbp), %rax
movq %rax, 0x18(%rdi)
cmpb $0x0, 0x5(%rsp)
je 0x2128c
xorl %r13d, %r13d
movl $0x1b, %esi
movq %rbp, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2c1ac
cmpl $0x0, (%rbx)
jne 0x21127
movq 0x48(%r14), %rdi
movq 0x8(%rsp), %rdx
movl $0x43, %esi
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x2c0c2
cmpl $0x0, (%rbx)
jne 0x21124
movq 0x48(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2d017
cmpl $0x0, (%rbx)
jne 0x21124
movq 0x18(%rsp), %rsi
cmpb $0x1, 0x6(%rsp)
jne 0x212ac
movq 0x8(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %r8
callq 0x4db93
jmp 0x212b9
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4d29c
cmpl $0x0, (%rbx)
jne 0x21124
movq 0x48(%r14), %rdi
movq 0x20(%rsp), %rcx
movq 0x8(%rsp), %r9
subq $0x8, %rsp
movl $0x91, %esi
movq %rbp, %rdx
movq %rax, %r8
pushq %rbx
callq 0x2c224
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x21124
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b37c
cmpl $0x0, (%rbx)
jne 0x21124
cmpb $0x0, 0x5(%rsp)
je 0x2131c
movq 0x48(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2d017
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2ba99
movq %rax, %r13
movq 0x10(%rsp), %rdi
cmpq $0x1, %rdi
je 0x21127
movq %rbx, %rsi
callq 0x2bb29
cmpl $0x0, (%rbx)
je 0x21352
movq %r13, %rdi
callq 0x2b4c3
jmp 0x21124
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %rbx, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36f6d