	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi6220_mbox_send_data
_hi6220_mbox_send_data:                 ## @hi6220_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %rcx
	movq	16(%rcx), %r14
	movl	(%rcx), %r13d
	movq	_MBOX_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, 8(%rcx)
	movq	_MBOX_STATE_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_mbox_set_state
	cmpq	$0, 16(%r14)
	jne	LBB0_1
## %bb.2:
	movq	_MBOX_ACK_AUTOMATIC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MBOX_ACK_IRQ@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_mbox_set_mode
	movq	_MBOX_MSG_LEN@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_6
## %bb.4:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %ebx
	andl	$-4, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %rbx
	movl	%r13d, %edi
	callq	_MBOX_DATA_REG
	addq	%rax, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	callq	_writel
	incq	%r15
	movslq	(%r12), %rax
	addq	$4, %r14
	cmpq	%rax, %r15
	jl	LBB0_5
LBB0_6:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_DST_INT_RAW_REG
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_writel
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBOX_TX,4,2                    ## @MBOX_TX
	.comm	_MBOX_STATE_TX,4,2              ## @MBOX_STATE_TX
	.comm	_MBOX_ACK_IRQ,4,2               ## @MBOX_ACK_IRQ
	.comm	_MBOX_ACK_AUTOMATIC,4,2         ## @MBOX_ACK_AUTOMATIC
	.comm	_MBOX_MSG_LEN,4,2               ## @MBOX_MSG_LEN
	.no_dead_strip	_hi6220_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 hi6220_mbox_send_data
_hi6220_mbox_send_data:                 ; @hi6220_mbox_send_data
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	ldr	x23, [x0]
	ldr	x19, [x23, #16]
Lloh0:
	adrp	x8, _MBOX_TX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBOX_TX@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x23, #8]
Lloh3:
	adrp	x8, _MBOX_STATE_TX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBOX_STATE_TX@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_mbox_set_state
Lloh6:
	adrp	x8, _MBOX_ACK_AUTOMATIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBOX_ACK_AUTOMATIC@GOTPAGEOFF]
	ldr	x9, [x19, #16]
Lloh8:
	adrp	x10, _MBOX_ACK_IRQ@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MBOX_ACK_IRQ@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_mbox_set_mode
Lloh10:
	adrp	x24, _MBOX_MSG_LEN@GOTPAGE
Lloh11:
	ldr	x24, [x24, _MBOX_MSG_LEN@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x25, #0
	mov	x26, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x20, x25]
	ldr	x27, [x19, #8]
	mov	x0, x21
	bl	_MBOX_DATA_REG
	and	x8, x25, #0xfffffffc
	add	x8, x27, x8
	add	x1, x8, x0
	mov	x0, x22
	bl	_writel
	add	x26, x26, #1
	ldrsw	x8, [x24]
	add	x25, x25, #4
	cmp	x26, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x23, #4]
	bl	_BIT
	mov	x20, x0
	ldr	w0, [x19]
	bl	_DST_INT_RAW_REG
	mov	x1, x0
	mov	x0, x20
	bl	_writel
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MBOX_TX,4,2                    ; @MBOX_TX
	.comm	_MBOX_STATE_TX,4,2              ; @MBOX_STATE_TX
	.comm	_MBOX_ACK_IRQ,4,2               ; @MBOX_ACK_IRQ
	.comm	_MBOX_ACK_AUTOMATIC,4,2         ; @MBOX_ACK_AUTOMATIC
	.comm	_MBOX_MSG_LEN,4,2               ; @MBOX_MSG_LEN
	.no_dead_strip	_hi6220_mbox_send_data
.subsections_via_symbols
