// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: prv_find_first_stop_hex
static size_t prv_find_first_stop_hex(subtilis_parser_t *p,
				      subtilis_ir_operand_t str_data,
				      subtilis_ir_operand_t str_len,
				      subtilis_ir_operand_t end_str,
				      subtilis_ir_operand_t end_label,
				      subtilis_ir_operand_t *minus,
				      subtilis_error_t *err)
{
	subtilis_ir_operand_t skip_sign_label;
	subtilis_ir_operand_t first_end_label;
	subtilis_ir_operand_t op1;
	subtilis_ir_operand_t max_digit;
	subtilis_ir_operand_t condee;
	subtilis_ir_operand_t condee2;
	subtilis_ir_operand_t lta;
	subtilis_ir_operand_t gtf;
	size_t ptr;
	subtilis_ir_operand_t byte;

	skip_sign_label.label = subtilis_ir_section_new_label(p->current);
	first_end_label.label = subtilis_ir_section_new_label(p->current);

	max_digit.integer = '9';
	ptr = prv_find_first_stop_prolog(
	    p, str_data, str_len, max_digit, true, end_str, &byte,
	    skip_sign_label, first_end_label, end_label, minus, &condee, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	op1.integer = 32;
	byte.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_ORI_I32, byte, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	op1.integer = 'a';
	lta.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_LTI_I32, byte, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	op1.integer = 'f';
	gtf.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_GTI_I32, byte, op1, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	condee2.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_OR_I32, lta, gtf, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	condee.reg = subtilis_ir_section_add_instr(
	    p->current, SUBTILIS_OP_INSTR_EOR_I32, condee, condee2, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

	subtilis_ir_section_add_instr_reg(p->current, SUBTILIS_OP_INSTR_JMPC_NF,
					  condee, skip_sign_label,
					  first_end_label, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return SIZE_MAX;

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

	return ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq 0x10(%rbp), %rax
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movq %rdi, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x39940
movq %rax, -0x68(%rbp)
movl $0x39, -0x78(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %r11
movq 0x10(%rbp), %rax
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x78(%rbp), %rcx
movq -0x40(%rbp), %r9
movq -0x60(%rbp), %r15
movq -0x68(%rbp), %r14
movq -0x48(%rbp), %rbx
movl $0x1, %r8d
leaq -0xa8(%rbp), %r12
leaq -0x80(%rbp), %r10
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x45a60
movq %rax, -0xa0(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x46114
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movl $0x20, -0x70(%rbp)
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rbp), %r8
movq -0xa8(%rbp), %rdx
movq -0x70(%rbp), %rcx
movl $0x27, %esi
callq 0x38230
movq %rax, -0xa8(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x46159
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movl $0x61, -0x70(%rbp)
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rbp), %r8
movq -0xa8(%rbp), %rdx
movq -0x70(%rbp), %rcx
movl $0x3d, %esi
callq 0x38230
movq %rax, -0x90(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x4619e
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movl $0x66, -0x70(%rbp)
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rbp), %r8
movq -0xa8(%rbp), %rdx
movq -0x70(%rbp), %rcx
movl $0x35, %esi
callq 0x38230
movq %rax, -0x98(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x461e3
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rbp), %r8
movq -0x90(%rbp), %rdx
movq -0x98(%rbp), %rcx
movl $0x26, %esi
callq 0x38230
movq %rax, -0x88(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x46224
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rbp), %r8
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rcx
movl $0x28, %esi
callq 0x38230
movq %rax, -0x80(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x4625c
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rbp), %r9
movq -0x80(%rbp), %rdx
movq -0x60(%rbp), %rcx
movq -0x68(%rbp), %r8
movl $0x44, %esi
callq 0x38360
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x46291
movq $-0x1, -0x28(%rbp)
jmp 0x462b1
movq -0x50(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x68(%rbp), %rsi
movq 0x10(%rbp), %rdx
callq 0x39960
movq -0xa0(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)