	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_cec_adap_transmit
_tegra_cec_adap_transmit:               ## @tegra_cec_adap_transmit
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	_CEC_SIGNAL_FREE_TIME_RETRY@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	(%rdi), %r15
	movq	%rcx, %rdi
	callq	_cec_msg_is_broadcast
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_TEGRA_CEC_TX_REG_BCAST@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_2:
	movq	$0, 16(%r15)
	movl	(%rbx), %r8d
	movl	%r8d, (%r15)
	testq	%r8, %r8
	je	LBB0_19
## %bb.3:
	movq	8(%rbx), %r11
	movq	8(%r15), %rcx
	leal	-1(%r8), %edi
	movq	(%r11), %rdx
	orq	%rax, %rdx
	movq	%rdx, (%rcx)
	movq	_TEGRA_CEC_TX_REG_START_BIT@GOTPCREL(%rip), %rsi
	orq	(%rsi), %rdx
	movq	%rdx, (%rcx)
	testl	%edi, %edi
	je	LBB0_4
## %bb.5:
	cmpq	%r14, %r12
	je	LBB0_6
LBB0_7:
	cmpl	$1, %r8d
	jne	LBB0_8
	jmp	LBB0_19
LBB0_4:
	movq	_TEGRA_CEC_TX_REG_EOM@GOTPCREL(%rip), %rsi
	orq	(%rsi), %rdx
	movq	%rdx, (%rcx)
	cmpq	%r14, %r12
	jne	LBB0_7
LBB0_6:
	movq	_TEGRA_CEC_TX_REG_RETRY@GOTPCREL(%rip), %rsi
	orq	(%rsi), %rdx
	movq	%rdx, (%rcx)
	cmpl	$1, %r8d
	je	LBB0_19
LBB0_8:
	movl	%r8d, %edx
	decq	%r8
	movl	$1, %ebx
	cmpl	$2, %edx
	je	LBB0_16
## %bb.9:
	movq	%r8, %r10
	andq	$-2, %r10
	movl	$1, %edx
	movq	_TEGRA_CEC_TX_REG_EOM@GOTPCREL(%rip), %r9
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	leaq	1(%rsi), %rdx
	cmpq	%r10, %rsi
	je	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdx, %rbx
	movq	(%r11,%rdx,8), %rdx
	orq	%rax, %rdx
	movq	%rdx, (%rcx,%rbx,8)
	cmpq	%rbx, %rdi
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	orq	(%r9), %rdx
	movq	%rdx, (%rcx,%rbx,8)
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r11,%rbx,8), %rdx
	orq	%rax, %rdx
	movq	%rdx, 8(%rcx,%rbx,8)
	leaq	1(%rbx), %rsi
	cmpq	%rdi, %rsi
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	orq	(%r9), %rdx
	movq	%rdx, 8(%rcx,%rbx,8)
	jmp	LBB0_14
LBB0_15:
	addq	$2, %rbx
LBB0_16:
	testb	$1, %r8b
	je	LBB0_19
## %bb.17:
	orq	(%r11,%rbx,8), %rax
	movq	%rax, (%rcx,%rbx,8)
	cmpq	%rdi, %rbx
	jne	LBB0_19
## %bb.18:
	movq	_TEGRA_CEC_TX_REG_EOM@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rax
	movq	%rax, (%rcx,%rbx,8)
LBB0_19:
	movq	_TEGRA_CEC_INT_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_cec_read
	movl	(%rbx), %esi
	movq	_TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_cec_write
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_SIGNAL_FREE_TIME_RETRY,8,3 ## @CEC_SIGNAL_FREE_TIME_RETRY
	.comm	_TEGRA_CEC_TX_REG_BCAST,8,3     ## @TEGRA_CEC_TX_REG_BCAST
	.comm	_TEGRA_CEC_TX_REG_START_BIT,8,3 ## @TEGRA_CEC_TX_REG_START_BIT
	.comm	_TEGRA_CEC_TX_REG_EOM,8,3       ## @TEGRA_CEC_TX_REG_EOM
	.comm	_TEGRA_CEC_TX_REG_RETRY,8,3     ## @TEGRA_CEC_TX_REG_RETRY
	.comm	_TEGRA_CEC_INT_MASK,4,2         ## @TEGRA_CEC_INT_MASK
	.comm	_TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY,8,3 ## @TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY
	.no_dead_strip	_tegra_cec_adap_transmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function tegra_cec_adap_transmit
lCPI0_0:
	.quad	1                               ; 0x1
	.quad	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tegra_cec_adap_transmit:               ; @tegra_cec_adap_transmit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x3
	mov	x20, x2
Lloh0:
	adrp	x8, _CEC_SIGNAL_FREE_TIME_RETRY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CEC_SIGNAL_FREE_TIME_RETRY@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	x19, [x0]
	mov	x0, x3
	bl	_cec_msg_is_broadcast
Lloh3:
	adrp	x8, _TEGRA_CEC_TX_REG_BCAST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TEGRA_CEC_TX_REG_BCAST@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x8, xzr, x8, eq
	str	xzr, [x19, #16]
	ldr	w9, [x21]
	str	w9, [x19]
	cbz	w9, LBB0_6
; %bb.1:
	ldr	x11, [x21, #8]
	ldr	x10, [x19, #8]
	ldr	x12, [x11]
	orr	x12, x12, x8
	str	x12, [x10]
Lloh6:
	adrp	x13, _TEGRA_CEC_TX_REG_START_BIT@GOTPAGE
Lloh7:
	ldr	x13, [x13, _TEGRA_CEC_TX_REG_START_BIT@GOTPAGEOFF]
Lloh8:
	ldr	x13, [x13]
	orr	x12, x13, x12
	str	x12, [x10]
	subs	w13, w9, #1
	b.eq	LBB0_4
; %bb.2:
	cmp	x22, x20
	b.eq	LBB0_5
LBB0_3:
	cmp	w9, #1
	b.eq	LBB0_6
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x14, _TEGRA_CEC_TX_REG_EOM@GOTPAGE
Lloh10:
	ldr	x14, [x14, _TEGRA_CEC_TX_REG_EOM@GOTPAGEOFF]
Lloh11:
	ldr	x14, [x14]
	orr	x12, x12, x14
	str	x12, [x10]
	cmp	x22, x20
	b.ne	LBB0_3
LBB0_5:
Lloh12:
	adrp	x14, _TEGRA_CEC_TX_REG_RETRY@GOTPAGE
Lloh13:
	ldr	x14, [x14, _TEGRA_CEC_TX_REG_RETRY@GOTPAGEOFF]
Lloh14:
	ldr	x14, [x14]
	orr	x12, x12, x14
	str	x12, [x10]
	cmp	w9, #1
	b.ne	LBB0_7
LBB0_6:
Lloh15:
	adrp	x20, _TEGRA_CEC_INT_MASK@GOTPAGE
Lloh16:
	ldr	x20, [x20, _TEGRA_CEC_INT_MASK@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_cec_read
	ldr	w1, [x20]
Lloh17:
	adrp	x8, _TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	orr	x2, x8, x0
	mov	x0, x19
	bl	_cec_write
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	sub	x15, x9, #1
Lloh20:
	adrp	x12, _TEGRA_CEC_TX_REG_EOM@GOTPAGE
Lloh21:
	ldr	x12, [x12, _TEGRA_CEC_TX_REG_EOM@GOTPAGEOFF]
	cmp	x15, #4
	b.hs	LBB0_9
; %bb.8:
	mov	w14, #1
	b	LBB0_22
LBB0_9:
	add	x14, x10, #8
	lsl	x16, x9, #3
	add	x17, x11, #8
	add	x0, x11, x16
	cmp	x10, x12
	add	x1, x10, x16
	ccmp	x1, x12, #0, lo
	cset	w16, hi
	cmp	x17, x1
	ccmp	x14, x0, #2, lo
	mov	w14, #1
	b.lo	LBB0_22
; %bb.10:
	tbnz	w16, #0, LBB0_22
; %bb.11:
	and	x16, x15, #0xfffffffffffffffc
	orr	x14, x16, #0x1
	dup.2d	v0, x8
	dup.2d	v1, x13
	ldr	x17, [x12]
	add	x0, x10, #16
Lloh22:
	adrp	x1, lCPI0_0@PAGE
Lloh23:
	ldr	q2, [x1, lCPI0_0@PAGEOFF]
	add	x1, x11, #24
	mov	w2, #2
	dup.2d	v3, x2
	mov	w2, #4
	dup.2d	v4, x2
	mov	x2, x16
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add.2d	v2, v2, v4
	add	x0, x0, #32
	add	x1, x1, #32
	subs	x2, x2, #4
	b.eq	LBB0_21
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	q5, q7, [x1, #-16]
	orr.16b	v6, v5, v0
	orr.16b	v5, v7, v0
	stur	q6, [x0, #-8]
	stur	q5, [x0, #8]
	cmeq.2d	v7, v2, v1
	xtn.2s	v7, v7
	fmov	w3, s7
	tbz	w3, #0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	fmov	x3, d6
	orr	x3, x3, x17
	stur	x3, [x0, #-8]
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	mov.s	w3, v7[1]
	tbz	w3, #0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov.d	x3, v6[1]
	orr	x3, x3, x17
	str	x3, [x0]
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	add.2d	v6, v2, v3
	cmeq.2d	v6, v6, v1
	xtn.2s	v6, v6
	fmov	w3, s6
	tbz	w3, #0, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	fmov	x3, d5
	orr	x3, x3, x17
	str	x3, [x0, #8]
LBB0_19:                                ;   in Loop: Header=BB0_13 Depth=1
	mov.s	w3, v6[1]
	tbz	w3, #0, LBB0_12
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=1
	mov.d	x3, v5[1]
	orr	x3, x3, x17
	str	x3, [x0, #16]
	b	LBB0_12
LBB0_21:
	cmp	x15, x16
	b.eq	LBB0_6
LBB0_22:
	sub	x13, x13, x14
	lsl	x15, x14, #3
	add	x11, x11, x15
	add	x10, x10, x15
	sub	x9, x9, x14
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	sub	x13, x13, #1
	add	x11, x11, #8
	add	x10, x10, #8
	subs	x9, x9, #1
	b.eq	LBB0_6
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x11]
	orr	x14, x14, x8
	str	x14, [x10]
	cbnz	x13, LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x15, [x12]
	orr	x14, x14, x15
	str	x14, [x10]
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdr	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_SIGNAL_FREE_TIME_RETRY,8,3 ; @CEC_SIGNAL_FREE_TIME_RETRY
	.comm	_TEGRA_CEC_TX_REG_BCAST,8,3     ; @TEGRA_CEC_TX_REG_BCAST
	.comm	_TEGRA_CEC_TX_REG_START_BIT,8,3 ; @TEGRA_CEC_TX_REG_START_BIT
	.comm	_TEGRA_CEC_TX_REG_EOM,8,3       ; @TEGRA_CEC_TX_REG_EOM
	.comm	_TEGRA_CEC_TX_REG_RETRY,8,3     ; @TEGRA_CEC_TX_REG_RETRY
	.comm	_TEGRA_CEC_INT_MASK,4,2         ; @TEGRA_CEC_INT_MASK
	.comm	_TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY,8,3 ; @TEGRA_CEC_INT_MASK_TX_REGISTER_EMPTY
	.no_dead_strip	_tegra_cec_adap_transmit
.subsections_via_symbols
