	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi6220_mbox_xlate
_hi6220_mbox_xlate:                     ## @hi6220_mbox_xlate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	(%rbx), %rsi
	movl	(%rsi), %edx
	movl	4(%rsi), %ecx
	movl	8(%rsi), %r8d
	movl	(%rax), %esi
	cmpl	%esi, %edx
	jae	LBB0_3
## %bb.1:
	cmpl	%esi, %ecx
	jae	LBB0_3
## %bb.2:
	cmpl	%esi, %r8d
	jae	LBB0_3
## %bb.4:
	shlq	$3, %rdx
	addq	24(%rax), %rdx
	movq	8(%rax), %rsi
	cmpq	%rdx, (%rsi,%r8,8)
	je	LBB0_5
## %bb.7:
	movq	(%rdx), %rax
	movl	%ecx, (%rax)
	movl	%r8d, 4(%rax)
	movq	%rdx, (%rsi,%r8,8)
	movq	%rdx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movl	16(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movl	16(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %ebx
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid channel idx %d dst_irq %d ack_irq %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Channel in use\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_hi6220_mbox_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi6220_mbox_xlate
_hi6220_mbox_xlate:                     ; @hi6220_mbox_xlate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	ldr	x10, [x19]
	ldp	w8, w9, [x10]
	ldr	w10, [x10, #8]
	ldr	w11, [x0]
	cmp	w8, w11
	ccmp	w9, w11, #2, lo
	ccmp	w10, w11, #2, lo
	b.lo	LBB0_2
; %bb.1:
	ldr	w0, [x0, #16]
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x11, [x0, #24]
	add	x8, x11, x8, lsl #3
	ldr	x11, [x0, #8]
	ldr	x12, [x11, x10, lsl #3]
	cmp	x12, x8
	b.eq	LBB0_4
; %bb.3:
	ldr	x12, [x8]
	stp	w9, w10, [x12]
	str	x8, [x11, x10, lsl #3]
	mov	x0, x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	w0, [x0, #16]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid channel idx %d dst_irq %d ack_irq %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Channel in use\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_hi6220_mbox_xlate
.subsections_via_symbols
