// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: subtilis_builtin_ir_call_hexstr_to_int32
subtilis_exp_t *subtilis_builtin_ir_call_hexstr_to_int32(subtilis_parser_t *p,
							 size_t str_reg,
							 subtilis_error_t *err)
{
	subtilis_ir_section_t *fn;
	const subtilis_type_t *ptype[1];

	ptype[0] = &subtilis_type_integer;

	fn = prv_add_args(p, "_hexstr_to_int32", 1, ptype,
			  &subtilis_type_integer, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		if (err->type != SUBTILIS_ERROR_ALREADY_DEFINED)
			return NULL;
		subtilis_error_init(err);
	} else {
		prv_builtins_ir_hexstr_to_int32(p, fn, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
	}

	return subtilis_parser_call_1_arg_fn(
	    p, "_hexstr_to_int32", str_reg, SUBTILIS_BUILTINS_MAX,
	    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_integer, true, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x40f08(%rip), %r8      # 0x74918
leaq 0x30(%rsp), %rcx
movq %r8, (%rcx)
subq $0x8, %rsp
leaq 0x41895(%rip), %rsi     # 0x752b8
movl $0x1, %edx
xorl %r9d, %r9d
pushq %rbx
callq 0x34176
addq $0x10, %rsp
movq %rax, %r12
movl (%rbx), %eax
testl %eax, %eax
je 0x33a7c
cmpl $0x20, %eax
jne 0x33c27
movq %rbx, %rdi
callq 0x143b4
leaq 0x41862(%rip), %rsi     # 0x752b8
leaq 0x40ebb(%rip), %r9      # 0x74918
movq %r15, %rdi
movq %r14, %rdx
movl $0x9, %ecx
xorl %r8d, %r8d
pushq %rbx
pushq $0x1
callq 0x1ea76
addq $0x48, %rsp
jmp 0x33c2d
movq 0x48(%r15), %rax
movq %rax, 0x18(%rsp)
movq %r12, 0x48(%r15)
movq 0x98(%r12), %rax
movq %rax, 0x8(%rsp)
movq 0xa8(%r12), %r13
movq %r12, %rdi
callq 0x2cc99
movq %rax, %rbp
movq %r12, %rdi
callq 0x2cc99
movq %rax, 0x10(%rsp)
movq 0x48(%r15), %rdi
movl $0x1b, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2be2c
cmpl $0x0, (%rbx)
jne 0x33c1e
movl $0x4, %esi
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4d8c4
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %r12, %rdi
movl $0x35, %esi
movq %rax, %rdx
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %r12, %rdi
movl $0x43, %esi
movq %rax, %rdx
movq %rbp, %rcx
movq 0x8(%rsp), %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x33c1e
movl $0x4, %esi
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4d258
movq 0x20(%rsp), %rcx
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %rax, %rbp
movq 0x48(%r15), %rdi
xorl %esi, %esi
movq %rax, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x33c1e
leaq 0x28(%rsp), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %rbx, %r8
callq 0x351f5
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %r13, %rcx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
pushq %rbx
pushq 0x30(%rsp)
callq 0x3535e
addq $0x10, %rsp
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x33c1e
movq %r12, %rdi
movl $0x47, %esi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2be1f
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x33c1e
movl $0x14, %edi
movq %rbx, %rsi
callq 0x2b7af
cmpl $0x0, (%rbx)
je 0x33c38
movq 0x18(%rsp), %rax
movq %rax, 0x48(%r15)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2ba50
cmpl $0x0, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x48(%r15)
jne 0x33c27
jmp 0x33a4f