	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv_cec_tx_raw_status
_adv_cec_tx_raw_status:                 ## @adv_cec_tx_raw_status
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_ADV7533@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	movq	_ADV7533_REG_CEC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	12(%rdi), %edi
	movq	_ADV7511_REG_CEC_TX_ENABLE@GOTPCREL(%rip), %rcx
	cmoveq	%rax, %rbx
	movq	(%rcx), %rsi
	addq	%rbx, %rsi
	leaq	-32(%rbp), %rdx
	callq	_regmap_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.1:
	testb	$1, -32(%rbp)
	je	LBB0_16
## %bb.2:
	movq	_ADV7511_INT1_CEC_TX_ARBIT_LOST@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	movq	_CEC_TX_STATUS_ARB_LOST@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %esi
	callq	_cec_transmit_attempt_done
	jmp	LBB0_16
LBB0_4:
	movq	_ADV7511_INT1_CEC_TX_RETRY_TIMEOUT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_13
## %bb.5:
	movq	_CEC_TX_STATUS_MAX_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	12(%r14), %edi
	movq	_ADV7511_REG_CEC_TX_LOW_DRV_CNT@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_regmap_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_CEC_TX_STATUS_ERROR@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	xorl	%ecx, %ecx
	movl	$1, %r9d
	movl	%r15d, %esi
	xorl	%r8d, %r8d
	jmp	LBB0_12
LBB0_13:
	movq	_ADV7511_INT1_CEC_TX_READY@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_16
## %bb.14:
	movl	8(%r14), %edi
	movq	_CEC_TX_STATUS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movl	-28(%rbp), %r8d
	xorl	%r9d, %r9d
	movl	%r8d, %ecx
	movl	$0, %esi
	andl	$15, %ecx
	je	LBB0_9
## %bb.8:
	movq	_CEC_TX_STATUS_NACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_9:
	orl	%r15d, %esi
	cmpl	$16, %r8d
	jae	LBB0_11
## %bb.10:
	xorl	%r8d, %r8d
	jmp	LBB0_12
LBB0_11:
	shrl	$4, %r8d
	movq	_CEC_TX_STATUS_LOW_DRIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
LBB0_12:
	movl	8(%r14), %edi
	xorl	%edx, %edx
	callq	_cec_transmit_done
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV7533,8,3                    ## @ADV7533
	.comm	_ADV7533_REG_CEC_OFFSET,4,2     ## @ADV7533_REG_CEC_OFFSET
	.comm	_ADV7511_REG_CEC_TX_ENABLE,8,3  ## @ADV7511_REG_CEC_TX_ENABLE
	.comm	_ADV7511_INT1_CEC_TX_ARBIT_LOST,4,2 ## @ADV7511_INT1_CEC_TX_ARBIT_LOST
	.comm	_CEC_TX_STATUS_ARB_LOST,4,2     ## @CEC_TX_STATUS_ARB_LOST
	.comm	_ADV7511_INT1_CEC_TX_RETRY_TIMEOUT,4,2 ## @ADV7511_INT1_CEC_TX_RETRY_TIMEOUT
	.comm	_CEC_TX_STATUS_MAX_RETRIES,4,2  ## @CEC_TX_STATUS_MAX_RETRIES
	.comm	_ADV7511_REG_CEC_TX_LOW_DRV_CNT,8,3 ## @ADV7511_REG_CEC_TX_LOW_DRV_CNT
	.comm	_CEC_TX_STATUS_ERROR,4,2        ## @CEC_TX_STATUS_ERROR
	.comm	_CEC_TX_STATUS_NACK,4,2         ## @CEC_TX_STATUS_NACK
	.comm	_CEC_TX_STATUS_LOW_DRIVE,4,2    ## @CEC_TX_STATUS_LOW_DRIVE
	.comm	_ADV7511_INT1_CEC_TX_READY,4,2  ## @ADV7511_INT1_CEC_TX_READY
	.comm	_CEC_TX_STATUS_OK,4,2           ## @CEC_TX_STATUS_OK
	.no_dead_strip	_adv_cec_tx_raw_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv_cec_tx_raw_status
_adv_cec_tx_raw_status:                 ; @adv_cec_tx_raw_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ADV7533@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADV7533@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _ADV7533_REG_CEC_OFFSET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ADV7533_REG_CEC_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	ldr	w0, [x0, #12]
Lloh6:
	adrp	x11, _ADV7511_REG_CEC_TX_ENABLE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ADV7511_REG_CEC_TX_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x9, x8
	csel	x21, x10, xzr, eq
	add	x1, x11, x21
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	x0, LBB0_14
; %bb.1:
	ldrb	w8, [sp, #12]
	tbz	w8, #0, LBB0_14
; %bb.2:
Lloh9:
	adrp	x8, _ADV7511_INT1_CEC_TX_ARBIT_LOST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADV7511_INT1_CEC_TX_ARBIT_LOST@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.3:
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x8, _CEC_TX_STATUS_ARB_LOST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CEC_TX_STATUS_ARB_LOST@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	bl	_cec_transmit_attempt_done
	b	LBB0_14
LBB0_5:
Lloh14:
	adrp	x8, _ADV7511_INT1_CEC_TX_RETRY_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ADV7511_INT1_CEC_TX_RETRY_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.6:
Lloh17:
	adrp	x8, _CEC_TX_STATUS_MAX_RETRIES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CEC_TX_STATUS_MAX_RETRIES@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	ldr	w0, [x19, #12]
Lloh20:
	adrp	x8, _ADV7511_REG_CEC_TX_LOW_DRV_CNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADV7511_REG_CEC_TX_LOW_DRV_CNT@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	add	x1, x8, x21
	add	x2, sp, #8
	bl	_regmap_read
	cbz	x0, LBB0_10
; %bb.7:
	mov	w3, #0
	mov	w4, #0
Lloh23:
	adrp	x8, _CEC_TX_STATUS_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CEC_TX_STATUS_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	orr	w1, w8, w20
	mov	w5, #1
	b	LBB0_13
LBB0_8:
Lloh26:
	adrp	x8, _ADV7511_INT1_CEC_TX_READY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ADV7511_INT1_CEC_TX_READY@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_14
; %bb.9:
	ldr	w0, [x19, #8]
Lloh29:
	adrp	x8, _CEC_TX_STATUS_OK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CEC_TX_STATUS_OK@GOTPAGEOFF]
	b	LBB0_4
LBB0_10:
	ldr	w8, [sp, #8]
	ands	w3, w8, #0xf
Lloh31:
	adrp	x9, _CEC_TX_STATUS_NACK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CEC_TX_STATUS_NACK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	csel	w9, wzr, w9, eq
	orr	w1, w9, w20
	cmp	w8, #16
	b.hs	LBB0_12
; %bb.11:
	mov	w5, #0
	mov	w4, #0
	b	LBB0_13
LBB0_12:
	mov	w5, #0
	lsr	w4, w8, #4
Lloh34:
	adrp	x8, _CEC_TX_STATUS_LOW_DRIVE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CEC_TX_STATUS_LOW_DRIVE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	orr	w1, w8, w1
LBB0_13:
	ldr	w0, [x19, #8]
	mov	w2, #0
	bl	_cec_transmit_done
LBB0_14:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7533,8,3                    ; @ADV7533
	.comm	_ADV7533_REG_CEC_OFFSET,4,2     ; @ADV7533_REG_CEC_OFFSET
	.comm	_ADV7511_REG_CEC_TX_ENABLE,8,3  ; @ADV7511_REG_CEC_TX_ENABLE
	.comm	_ADV7511_INT1_CEC_TX_ARBIT_LOST,4,2 ; @ADV7511_INT1_CEC_TX_ARBIT_LOST
	.comm	_CEC_TX_STATUS_ARB_LOST,4,2     ; @CEC_TX_STATUS_ARB_LOST
	.comm	_ADV7511_INT1_CEC_TX_RETRY_TIMEOUT,4,2 ; @ADV7511_INT1_CEC_TX_RETRY_TIMEOUT
	.comm	_CEC_TX_STATUS_MAX_RETRIES,4,2  ; @CEC_TX_STATUS_MAX_RETRIES
	.comm	_ADV7511_REG_CEC_TX_LOW_DRV_CNT,8,3 ; @ADV7511_REG_CEC_TX_LOW_DRV_CNT
	.comm	_CEC_TX_STATUS_ERROR,4,2        ; @CEC_TX_STATUS_ERROR
	.comm	_CEC_TX_STATUS_NACK,4,2         ; @CEC_TX_STATUS_NACK
	.comm	_CEC_TX_STATUS_LOW_DRIVE,4,2    ; @CEC_TX_STATUS_LOW_DRIVE
	.comm	_ADV7511_INT1_CEC_TX_READY,4,2  ; @ADV7511_INT1_CEC_TX_READY
	.comm	_CEC_TX_STATUS_OK,4,2           ; @CEC_TX_STATUS_OK
	.no_dead_strip	_adv_cec_tx_raw_status
.subsections_via_symbols
