	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_mbox_send_data
_rockchip_mbox_send_data:               ## @rockchip_mbox_send_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_dev_get_drvdata
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rdx
	movl	24(%rax), %edi
	cmpq	%rdx, (%r14)
	jle	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movq	16(%rbx), %r13
	movq	(%r13), %rdx
	movq	8(%r14), %rcx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movq	16(%rbx), %rax
	movq	(%r13), %rdi
	movq	%rdi, %rcx
	shlq	$4, %rcx
	movq	%r14, 8(%rax,%rcx)
	movq	8(%r14), %r15
	movq	8(%rbx), %r12
	callq	_MAILBOX_A2B_CMD
	addq	%rax, %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_writel_relaxed
	movq	(%r14), %r14
	movq	8(%rbx), %rbx
	movq	(%r13), %rdi
	callq	_MAILBOX_A2B_DAT
	addq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_writel_relaxed
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transmit size over buf size(%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Chan[%d]: A2B message, cmd 0x%08x\n"

	.no_dead_strip	_rockchip_mbox_send_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_mbox_send_data
_rockchip_mbox_send_data:               ; @rockchip_mbox_send_data
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_dev_get_drvdata
	cbz	x19, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x2, [x0]
	ldr	w0, [x0, #24]
	cmp	x8, x2
	b.le	LBB0_4
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	ldr	x22, [x20, #16]
	ldr	x2, [x22]
	ldr	x3, [x19, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	x0, [x22]
	ldp	x23, x8, [x20, #8]
	add	x8, x8, x0, lsl #4
	str	x19, [x8, #8]
	ldr	x21, [x19, #8]
	bl	_MAILBOX_A2B_CMD
	add	x1, x0, x23
	mov	x0, x21
	bl	_writel_relaxed
	ldr	x19, [x19]
	ldr	x20, [x20, #8]
	ldr	x0, [x22]
	bl	_MAILBOX_A2B_DAT
	add	x1, x0, x20
	mov	x0, x19
	bl	_writel_relaxed
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transmit size over buf size(%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Chan[%d]: A2B message, cmd 0x%08x\n"

	.no_dead_strip	_rockchip_mbox_send_data
.subsections_via_symbols
