	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xfer_msg
_xfer_msg:                              ## @xfer_msg
	.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, %r13
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.2:
	movq	_SUN4I_HDMI_DDC_CTRL_REG@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	48(%r14), %rdi
	callq	_readl
	movq	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	notl	%r15d
	andl	%eax, %r15d
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	jne	LBB0_3
## %bb.4:
	movq	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
                                        ## implicit-def: $r15d
	jmp	LBB0_6
LBB0_3:
	movq	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rax), %r15d
	movl	%r15d, -44(%rbp)
	movq	(%rbx), %rsi
	addq	48(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
LBB0_6:
	movl	40(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_regmap_field_write
	movl	36(%r14), %edi
	movl	4(%r13), %esi
	callq	_regmap_field_write
	movl	32(%r14), %edi
	movq	24(%r14), %rax
	xorl	%esi, %esi
	cmpq	$0, (%rax)
	sete	%sil
	callq	_regmap_field_write
	movl	20(%r14), %edi
	movq	_RX_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_field_write
	movl	16(%r14), %edi
	movl	$1, %esi
	callq	_regmap_field_write
	movl	16(%r14), %edi
	xorl	%r12d, %r12d
	testl	%r15d, %r15d
	sete	%r12b
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	$100, %ecx
	movl	$2000, %r8d                     ## imm = 0x7D0
	callq	_regmap_field_read_poll_timeout
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_8:
	movl	12(%r14), %edi
	movl	8(%r13), %esi
	callq	_regmap_field_write
	movl	8(%r14), %edi
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	jne	LBB0_9
## %bb.10:
	movq	_SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	_SUN4I_HDMI_DDC_CMD_IMPLICIT_READ@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	callq	_regmap_field_write
	movq	_SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK@GOTPCREL(%rip), %rcx
	movq	_SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%rcx), %esi
	movl	(%r14), %edi
	movq	_SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_regmap_field_force_write
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_regmap_field_write
	movl	8(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_15
## %bb.12:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r12d, %rax
	movq	16(%r13), %rsi
	addq	%rax, %rsi
	subl	%eax, %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_fifo_transfer
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	addl	%ebx, %r12d
	movl	8(%r13), %edx
	cmpl	%r12d, %edx
	jg	LBB0_13
LBB0_15:
	movl	4(%r14), %edi
	movl	%r15d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	$100, %ecx
	movl	$100000, %r8d                   ## imm = 0x186A0
	callq	_regmap_field_read_poll_timeout
	testq	%rax, %rax
	jne	LBB0_18
## %bb.16:
	movl	(%r14), %edi
	leaq	-44(%rbp), %rsi
	callq	_regmap_field_read
	movl	-44(%rbp), %eax
	movq	_SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_18
## %bb.17:
	xorl	%ebx, %ebx
	movq	_SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_20
LBB0_18:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_19:
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_HDMI_DDC_CTRL_REG,8,3    ## @SUN4I_HDMI_DDC_CTRL_REG
	.comm	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK,4,2 ## @SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ,4,2 ## @SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ
	.comm	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE,4,2 ## @SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE
	.comm	_RX_THRESHOLD,4,2               ## @RX_THRESHOLD
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SUN4I_HDMI_DDC_CMD_IMPLICIT_READ,4,2 ## @SUN4I_HDMI_DDC_CMD_IMPLICIT_READ
	.comm	_SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE,4,2 ## @SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE
	.comm	_SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK,4,2 ## @SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK
	.comm	_SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST,4,2 ## @SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST
	.comm	_SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE,4,2 ## @SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE
	.no_dead_strip	_xfer_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xfer_msg
_xfer_msg:                              ; @xfer_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #48]
Lloh0:
	adrp	x22, _SUN4I_HDMI_DDC_CTRL_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SUN4I_HDMI_DDC_CTRL_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w9, [x20]
Lloh5:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ@GOTPAGE
Lloh9:
	ldr	x11, [x11, _SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ@GOTPAGEOFF]
Lloh10:
	adrp	x12, _SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE@GOTPAGE
Lloh11:
	ldr	x12, [x12, _SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE@GOTPAGEOFF]
	tst	w10, w9
	csel	x9, x12, x11, eq
	ldr	w9, [x9]
	orr	w21, w9, w8
	str	w21, [sp, #12]
	ldr	x8, [x19, #48]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	b	LBB0_3
LBB0_2:
                                        ; implicit-def: $w21
LBB0_3:
	ldr	w0, [x19, #40]
	mov	w1, #0
	bl	_regmap_field_write
	ldr	w0, [x19, #36]
	ldr	w1, [x20, #4]
	bl	_regmap_field_write
	ldr	w0, [x19, #32]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w1, eq
	bl	_regmap_field_write
	ldr	w0, [x19, #20]
Lloh12:
	adrp	x8, _RX_THRESHOLD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RX_THRESHOLD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_regmap_field_write
	ldr	w0, [x19, #16]
	mov	w1, #1
	bl	_regmap_field_write
	ldr	w0, [x19, #16]
	cmp	w21, #0
	cset	w22, eq
	mov	x1, x21
	mov	x2, x22
	mov	w3, #100
	mov	w4, #2000
	bl	_regmap_field_read_poll_timeout
	cbnz	x0, LBB0_10
; %bb.4:
	ldr	w0, [x19, #12]
	ldr	w1, [x20, #8]
	bl	_regmap_field_write
	ldr	w0, [x19, #8]
	ldr	w8, [x20]
Lloh15:
	adrp	x25, _I2C_M_RD@GOTPAGE
Lloh16:
	ldr	x25, [x25, _I2C_M_RD@GOTPAGEOFF]
Lloh17:
	adrp	x9, _SUN4I_HDMI_DDC_CMD_IMPLICIT_READ@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SUN4I_HDMI_DDC_CMD_IMPLICIT_READ@GOTPAGEOFF]
	ldr	w10, [x25]
Lloh19:
	adrp	x11, _SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE@GOTPAGE
Lloh20:
	ldr	x11, [x11, _SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE@GOTPAGEOFF]
	tst	w10, w8
	csel	x8, x11, x9, eq
	ldr	w1, [x8]
	bl	_regmap_field_write
	ldr	w0, [x19]
Lloh21:
	adrp	x23, _SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK@GOTPAGE
Lloh22:
	ldr	x23, [x23, _SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh23:
	adrp	x9, _SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x24, _SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE@GOTPAGE
Lloh27:
	ldr	x24, [x24, _SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w1, w8, w9
	bl	_regmap_field_force_write
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_regmap_field_write
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w26, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #16]
	add	x1, x9, w26, sxtw
	sub	w2, w8, w26
	ldr	w8, [x20]
	ldr	w9, [x25]
	and	w3, w9, w8
	mov	x0, x19
	bl	_fifo_transfer
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20, #8]
	add	w26, w0, w26
	cmp	w8, w26
	b.gt	LBB0_6
LBB0_8:
	ldr	w0, [x19, #4]
	mov	x1, x21
	mov	x2, x22
	mov	w3, #100
	mov	w4, #34464
	movk	w4, #1, lsl #16
	bl	_regmap_field_read_poll_timeout
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x19]
	add	x1, sp, #12
	bl	_regmap_field_read
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_10:
Lloh28:
	adrp	x8, _EIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #96
	ret
LBB0_12:
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.13:
	mov	w0, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_HDMI_DDC_CTRL_REG,8,3    ; @SUN4I_HDMI_DDC_CTRL_REG
	.comm	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK,4,2 ; @SUN4I_HDMI_DDC_CTRL_FIFO_DIR_MASK
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ,4,2 ; @SUN4I_HDMI_DDC_CTRL_FIFO_DIR_READ
	.comm	_SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE,4,2 ; @SUN4I_HDMI_DDC_CTRL_FIFO_DIR_WRITE
	.comm	_RX_THRESHOLD,4,2               ; @RX_THRESHOLD
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SUN4I_HDMI_DDC_CMD_IMPLICIT_READ,4,2 ; @SUN4I_HDMI_DDC_CMD_IMPLICIT_READ
	.comm	_SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE,4,2 ; @SUN4I_HDMI_DDC_CMD_IMPLICIT_WRITE
	.comm	_SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK,4,2 ; @SUN4I_HDMI_DDC_INT_STATUS_ERROR_MASK
	.comm	_SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST,4,2 ; @SUN4I_HDMI_DDC_INT_STATUS_FIFO_REQUEST
	.comm	_SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE,4,2 ; @SUN4I_HDMI_DDC_INT_STATUS_TRANSFER_COMPLETE
	.no_dead_strip	_xfer_msg
.subsections_via_symbols
