// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/string_type.c
// Function: prv_string_str_check_count
static void prv_string_str_check_count(subtilis_parser_t *p,
				       const subtilis_symbol_t *s,
				       subtilis_exp_t *dup,
				       subtilis_ir_operand_t end,
				       subtilis_error_t *err)
{
	subtilis_ir_operand_t lt_one;
	subtilis_ir_operand_t gte_one;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t zero_reg;
	subtilis_exp_t *one = NULL;

	lt_one.label = subtilis_ir_section_new_label(p->current);
	gte_one.label = subtilis_ir_section_new_label(p->current);

	one = subtilis_exp_new_int32(1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	dup = subtilis_type_if_lt(p, dup, one, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	one = NULL;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC,
					  dup->exp.ir_op, lt_one, gte_one, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	subtilis_exp_delete(dup);
	dup = NULL;

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

	op1.integer = 0;
	zero_reg.reg = subtilis_ir_section_add_instr2(
	    p->current, SUBTILIS_OP_INSTR_MOVI_I32, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_reference_type_set_size(p, SUBTILIS_IR_REG_LOCAL, s->loc,
					 zero_reg.reg, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_ir_section_add_instr_no_reg(p->current, SUBTILIS_OP_INSTR_JMP,
					     end, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

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

cleanup:

	subtilis_exp_delete(one);
	subtilis_exp_delete(dup);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rcx, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x50(%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 -0x28(%rbp), %rsi
movl $0x1, %edi
callq 0x37800
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6c556
jmp 0x6c682
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x49770
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6c57d
jmp 0x6c682
movq $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %r9
movq 0x148(%rax), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0x43, %esi
callq 0x38360
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6c5bc
jmp 0x6c682
movq -0x20(%rbp), %rdi
callq 0x36ee0
movq $0x0, -0x20(%rbp)
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 0x6c5f0
jmp 0x6c682
movl $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rdx
movl $0x1b, %esi
callq 0x38490
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6c620
jmp 0x6c682
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %r8
movl $0x2, %esi
callq 0x6dc50
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6c648
jmp 0x6c682
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rdx
movl $0x45, %esi
callq 0x38540
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6c66d
jmp 0x6c682
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x39960
movq -0x50(%rbp), %rdi
callq 0x36ee0
movq -0x20(%rbp), %rdi
callq 0x36ee0
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)