// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/string_type_if.c
// Function: prv_eq_non_const_non_const
static subtilis_exp_t *prv_eq_non_const_non_const(subtilis_parser_t *p,
						  subtilis_exp_t *a1,
						  subtilis_exp_t *a2,
						  subtilis_error_t *err)
{
	subtilis_ir_operand_t len_eq;
	subtilis_ir_operand_t len_neq;
	subtilis_ir_operand_t ptr_neq;
	subtilis_ir_operand_t op0;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t op2;
	size_t a1_ptr;
	size_t a2_ptr;
	size_t dest_reg = p->current->reg_counter++;
	subtilis_exp_t *len1 = NULL;
	subtilis_exp_t *len2 = NULL;
	subtilis_exp_t *eq = NULL;

	len_eq.label = subtilis_ir_section_new_label(p->current);
	len_neq.label = subtilis_ir_section_new_label(p->current);
	ptr_neq.label = subtilis_ir_section_new_label(p->current);

	len1 = subtilis_type_if_dup(a1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	len1 = subtilis_string_type_len(p, len1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	len2 = subtilis_type_if_dup(a2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	len2 = subtilis_string_type_len(p, len2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op0.reg = dest_reg;
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_EQ_I32,
					  op0, len1->exp.ir_op, len2->exp.ir_op,
					  err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC_NF,
					  op0, len_eq, len_neq, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	subtilis_ir_section_add_label(p->current, len_eq.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	a1_ptr = subtilis_reference_get_data(p, a1->exp.ir_op.reg, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	a2_ptr = subtilis_reference_get_data(p, a2->exp.ir_op.reg, 0, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	op0.reg = dest_reg;
	op1.reg = a1_ptr;
	op2.reg = a2_ptr;
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_EQ_I32,
					  op0, op1, op2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC_NF,
					  op0, len_neq, ptr_neq, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	subtilis_ir_section_add_label(p->current, ptr_neq.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	eq = subtilis_string_type_eq(p, a1_ptr, a2_ptr, len1->exp.ir_op.reg,
				     err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_instr_no_reg2(p->current, SUBTILIS_OP_INSTR_MOV,
					      op0, eq->exp.ir_op, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_label(p->current, len_neq.label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	a1->exp.ir_op.reg = dest_reg;
	a1->type.type = SUBTILIS_TYPE_INTEGER;

	subtilis_exp_delete(eq);
	subtilis_exp_delete(len1);
	subtilis_exp_delete(len2);
	subtilis_exp_delete(a2);
	return a1;

cleanup:

	subtilis_exp_delete(eq);
	subtilis_exp_delete(len1);
	subtilis_exp_delete(len2);
	subtilis_exp_delete(a1);
	subtilis_exp_delete(a2);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq 0x18(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rcx)
movq %rax, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x47d20
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64de3
jmp 0x650aa
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x67350
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64e06
jmp 0x650aa
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x47d20
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64e25
jmp 0x650aa
movq -0x10(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x67350
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64e48
jmp 0x650aa
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x78(%rbp), %rcx
movq -0x80(%rbp), %rax
movq -0x28(%rbp), %r9
movq -0x48(%rbp), %rdx
movq 0x148(%rcx), %rcx
movq 0x148(%rax), %r8
movl $0x2b, %esi
callq 0x38360
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64e8e
jmp 0x650aa
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %r9
movq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0x44, %esi
callq 0x38360
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64ebe
jmp 0x650aa
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x39960
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64ee1
jmp 0x650aa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x148(%rax), %rsi
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x6d1e0
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64f0f
jmp 0x650aa
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x148(%rax), %rsi
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x6d1e0
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64f3d
jmp 0x650aa
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %r9
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %r8
movl $0x2b, %esi
callq 0x38360
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64f85
jmp 0x650aa
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %r9
movq -0x48(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movl $0x44, %esi
callq 0x38360
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64fb5
jmp 0x650aa
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x39960
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x64fd8
jmp 0x650aa
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x78(%rbp), %rax
movq 0x148(%rax), %rcx
movq -0x28(%rbp), %r8
callq 0x67990
movq %rax, -0x88(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6500d
jmp 0x650aa
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x88(%rbp), %rax
movq -0x28(%rbp), %r8
movq -0x48(%rbp), %rdx
movq 0x148(%rax), %rcx
movl $0x1d, %esi
callq 0x385a0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x65040
jmp 0x650aa
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x39960
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x65060
jmp 0x650aa
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x148(%rax)
movq -0x18(%rbp), %rax
movl $0x5, (%rax)
movq -0x88(%rbp), %rdi
callq 0x36ee0
movq -0x78(%rbp), %rdi
callq 0x36ee0
movq -0x80(%rbp), %rdi
callq 0x36ee0
movq -0x20(%rbp), %rdi
callq 0x36ee0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x650e2
movq -0x88(%rbp), %rdi
callq 0x36ee0
movq -0x78(%rbp), %rdi
callq 0x36ee0
movq -0x80(%rbp), %rdi
callq 0x36ee0
movq -0x18(%rbp), %rdi
callq 0x36ee0
movq -0x20(%rbp), %rdi
callq 0x36ee0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop