// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: subtilis_builtin_ir_call_hex_to_str
subtilis_exp_t *subtilis_builtin_ir_call_hex_to_str(subtilis_parser_t *p,
						    size_t val_reg,
						    size_t buf_reg,
						    subtilis_error_t *err)
{
	subtilis_ir_section_t *fn;

	const subtilis_type_t *ptype[2];

	ptype[0] = &subtilis_type_integer;
	ptype[1] = &subtilis_type_integer;

	fn = prv_add_args(p, "_hex_to_str", 2, 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_hex_to_str(p, fn, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return NULL;
	}

	return subtilis_parser_call_2_arg_fn(
	    p, "_hex_to_str", val_reg, buf_reg, SUBTILIS_IR_REG_TYPE_INTEGER,
	    SUBTILIS_IR_REG_TYPE_INTEGER, &subtilis_type_integer, false, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x41505(%rip), %r14     # 0x74918
leaq 0x50(%rsp), %rcx
movq %r14, (%rcx)
movq %r14, 0x8(%rcx)
subq $0x8, %rsp
leaq 0x41e6c(%rip), %rsi     # 0x75296
movl $0x2, %edx
movq %r14, %r8
xorl %r9d, %r9d
pushq %rbx
callq 0x34176
addq $0x10, %rsp
movq %rax, %rbp
movl (%rbx), %eax
testl %eax, %eax
je 0x33489
cmpl $0x20, %eax
jne 0x33856
movq %rbx, %rdi
callq 0x143b4
subq $0x8, %rsp
leaq 0x41e32(%rip), %rsi     # 0x75296
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq $0x0
pushq %r14
callq 0x1eb59
addq $0x88, %rsp
jmp 0x3385c
movq %r12, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movq 0x48(%r13), %rax
movq %rax, 0x38(%rsp)
movq %rbp, 0x48(%r13)
movq 0x98(%rbp), %rax
movq %rax, 0x18(%rsp)
movq %rbp, %rdi
callq 0x2cc99
movq %rax, %r12
movq %rbp, %rdi
callq 0x2cc99
movq %rax, %r15
movq %rbp, %rdi
callq 0x2cc99
movq %rax, 0x30(%rsp)
movq %rbp, %rdi
callq 0x2cc99
movq %rax, 0x28(%rsp)
movq %rbp, %rdi
callq 0x2cc99
movq %rax, 0x10(%rsp)
movq 0xa8(%rbp), %rax
movq %rax, 0x20(%rsp)
movl $0x4, %edx
movq %rbp, %rdi
movl $0x43, %esi
movq %r15, %rcx
movq %r12, %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x30, %edx
movq %rbp, %rdi
movl $0x1b, %esi
movq %rbx, %rcx
callq 0x2be09
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x5, %ecx
movq %rbp, %rdi
movl $0x16, %esi
movq %rax, %rdx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x1, %edx
movq %rbp, %rdi
movl $0x48, %esi
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x5, %edx
movq %rbp, %rdi
movl $0x1d, %esi
movq %rbx, %rcx
callq 0x2be09
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rax, %r12
movl $0x20, %edx
movq %rbp, %rdi
movl $0x1b, %esi
movq %rbx, %rcx
callq 0x2be09
movq %rax, 0x8(%rsp)
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movq 0x30(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x4, %ecx
movq %rbp, %rdi
movl $0xb, %esi
movq 0x8(%rsp), %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movl $0x1d, %esi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2be2c
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x4, %edx
movq %rbp, %rdi
movl $0x4d, %esi
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0xf, %ecx
movq %rbp, %rdi
movl $0x25, %esi
movq %rax, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rax, %r15
movl $0x5, %edx
movq %rbp, %rdi
movl $0x33, %esi
movq %r12, %rcx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movl $0x26, %esi
movq %r15, %rdx
movq %rax, %rcx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movl $0x43, %esi
movq %rax, %rdx
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x30, %ecx
movq %rbp, %rdi
movl $0x9, %esi
movq %r15, %rdx
movq %rbx, %r8
callq 0x2bc8f
movq %rax, 0x10(%rsp)
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0xa, %ecx
movq %rbp, %rdi
movl $0x41, %esi
movq %r15, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0xfffffff9, %ecx       # imm = 0xFFFFFFF9
movq %rbp, %rdi
movl $0xd, %esi
movq %rax, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
xorl %esi, %esi
movq %rax, %rdx
movq 0x10(%rsp), %rcx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x5, %ecx
movq %rbp, %rdi
movl $0x16, %esi
movq %rax, %rdx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x5, %edx
movl $0x5, %ecx
movl $0x1, %r8d
movq %rbp, %rdi
movl $0x9, %esi
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movl $0x43, %esi
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3384d
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3384d
movl $0x5, %ecx
movq %rbp, %rdi
movl $0x2, %esi
movq 0x20(%rsp), %rdx
movq %r12, %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
je 0x33867
movq 0x38(%rsp), %rax
movq %rax, 0x48(%r13)
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rdi
movl $0x47, %esi
movq 0x20(%rsp), %rdx
movq %rbx, %rcx
callq 0x2be1f
cmpl $0x0, (%rbx)
movq 0x38(%rsp), %rax
movq %rax, 0x48(%r13)
movq 0x48(%rsp), %r15
movq 0x40(%rsp), %r12
jne 0x33856
jmp 0x33459