	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi3660_mbox_xlate
_hi3660_mbox_xlate:                     ## @hi3660_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
	callq	_to_hi3660_mbox
	movq	%rax, %rcx
	movq	(%rbx), %rdx
	movl	(%rdx), %eax
	movq	_MBOX_CHAN_MAX@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jae	LBB0_2
## %bb.1:
	movq	8(%rcx), %rsi
	movl	4(%rdx), %edi
	movl	%edi, (%rsi,%rax,8)
	movl	8(%rdx), %edx
	movl	%edx, 4(%rsi,%rax,8)
	shlq	$2, %rax
	addq	(%rcx), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movl	16(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MBOX_CHAN_MAX,4,2              ## @MBOX_CHAN_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid channel idx %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hi3660_mbox_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi3660_mbox_xlate
_hi3660_mbox_xlate:                     ; @hi3660_mbox_xlate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_to_hi3660_mbox
	ldr	x8, [x19]
	ldr	w2, [x8]
Lloh0:
	adrp	x9, _MBOX_CHAN_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBOX_CHAN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w2, w9
	b.hs	LBB0_2
; %bb.1:
	ldr	w9, [x8, #4]
	ldp	x11, x10, [x0]
	add	x10, x10, x2, lsl #3
	str	w9, [x10]
	ldr	w8, [x8, #8]
	str	w8, [x10, #4]
	add	x0, x11, x2, lsl #2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w0, [x0, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MBOX_CHAN_MAX,4,2              ; @MBOX_CHAN_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid channel idx %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hi3660_mbox_xlate
.subsections_via_symbols
