	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cec_pin_thread_func
_cec_pin_thread_func:                   ## @cec_pin_thread_func
	.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	%rdi, %r14
	movq	(%rdi), %rbx
	leaq	32(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	36(%rbx), %r12
	leaq	56(%rbx), %r13
	leaq	20(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_cec_pin_to_idle
	xorl	%edi, %edi
	callq	_ns_to_ktime
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_hrtimer_start
LBB0_26:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_27
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movl	80(%rbx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_kthread_should_stop
	movb	$1, %r15b
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, 56(%rbx)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	setne	%r15b
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%r15b, %esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_wait_event_interruptible
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$2, %eax
	jl	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_CEC_MAX_MSG_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_rx_add_byte
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	64(%rbx), %rax
	movslq	56(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 56(%rbx)
	movl	$85, (%rax,%rcx,4)
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %ecx
	cmpl	$3, %ecx
	jl	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_rx_remove_byte
	movl	56(%rbx), %ecx
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	decl	%ecx
	movl	%ecx, (%r13)
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_CEC_MAX_MSG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jle	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, (%r13)
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	72(%rbx), %edi
	callq	_ns_to_ktime
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_cec_received_msg_ts
	movl	$0, 56(%rbx)
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%rbx)
	movl	48(%rbx), %edx
	movq	%r14, %rdi
	callq	_cec_transmit_attempt_done_ts
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	movq	_CEC_PIN_EVENT_FL_IS_HIGH@GOTPCREL(%rip), %rcx
	movq	%r12, %rbx
	movq	%r14, %r12
	movq	_CEC_PIN_EVENT_FL_DROPPED@GOTPCREL(%rip), %r8
	movq	_CEC_NUM_PIN_EVENTS@GOTPCREL(%rip), %r13
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, %r14
	movl	4(%rax), %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%rbx,4), %edx
	movl	(%rcx), %esi
	andl	%edx, %esi
	andl	(%r8), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	40(%rax), %rax
	movl	(%rax,%rbx,4), %ecx
	movq	%r8, %r15
	movq	%r12, %rdi
	callq	_cec_queue_pin_cec_event
	leal	1(%rbx), %eax
	movq	%r14, %rbx
	xorl	%edx, %edx
	divl	(%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%edx, 4(%rax)
	movq	%r14, %rdi
	callq	_atomic_dec
	movq	%r14, %rdi
	callq	_atomic_read
	movq	%r15, %r8
	movq	_CEC_PIN_EVENT_FL_IS_HIGH@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_CEC_PIN_IRQ_UNCHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_xchg
	cmpl	$128, %eax
	je	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$129, %eax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r12, %r14
	movq	%rbx, %r12
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%rbx), %rax
	movq	%r14, %rdi
	callq	*8(%rax)
	movq	%rbx, %rdi
	callq	_cec_pin_high
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	24(%r15), %rax
	movq	%r12, %r14
	movq	%r12, %rdi
	callq	*(%rax)
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movl	%ecx, 16(%r15)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%rbx, %r12
	movq	%r15, %rbx
	jne	LBB0_26
	jmp	LBB0_25
LBB0_27:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_MAX_MSG_SIZE,4,2           ## @CEC_MAX_MSG_SIZE
	.comm	_CEC_PIN_EVENT_FL_IS_HIGH,4,2   ## @CEC_PIN_EVENT_FL_IS_HIGH
	.comm	_CEC_PIN_EVENT_FL_DROPPED,4,2   ## @CEC_PIN_EVENT_FL_DROPPED
	.comm	_CEC_NUM_PIN_EVENTS,4,2         ## @CEC_NUM_PIN_EVENTS
	.comm	_CEC_PIN_IRQ_UNCHANGED,4,2      ## @CEC_PIN_IRQ_UNCHANGED
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.no_dead_strip	_cec_pin_thread_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cec_pin_thread_func
_cec_pin_thread_func:                   ; @cec_pin_thread_func
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x20, [x0]
	add	x21, x20, #32
	add	x22, x20, #36
	add	x23, x20, #56
Lloh0:
	adrp	x28, _CEC_PIN_EVENT_FL_IS_HIGH@GOTPAGE
Lloh1:
	ldr	x28, [x28, _CEC_PIN_EVENT_FL_IS_HIGH@GOTPAGEOFF]
Lloh2:
	adrp	x27, _CEC_PIN_EVENT_FL_DROPPED@GOTPAGE
Lloh3:
	ldr	x27, [x27, _CEC_PIN_EVENT_FL_DROPPED@GOTPAGEOFF]
	add	x8, x20, #20
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh4:
	adrp	x24, _CEC_NUM_PIN_EVENTS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CEC_NUM_PIN_EVENTS@GOTPAGEOFF]
Lloh6:
	adrp	x26, _CEC_MAX_MSG_SIZE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _CEC_MAX_MSG_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_cec_pin_to_idle
	mov	w0, #0
	bl	_ns_to_ktime
	mov	x1, x0
Lloh8:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_hrtimer_start
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_kthread_should_stop
	cbnz	x0, LBB0_27
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	ldr	w25, [x20, #80]
	bl	_kthread_should_stop
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #56]
	cbnz	w8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	cbnz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_atomic_read
	cbz	x0, LBB0_26
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w1, #1
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	bl	_wait_event_interruptible
	ldr	w8, [x23]
	cbz	w8, LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x26]
	cmp	w8, #2
	ccmp	w8, w9, #0, ge
	b.ge	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_rx_add_byte
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #64]
	ldrsw	x9, [x20, #56]
	add	w10, w9, #1
	str	w10, [x20, #56]
	mov	w10, #85
	str	w10, [x8, x9, lsl #2]
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	cmp	w8, #2
	b.le	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_rx_remove_byte
	ldr	w8, [x20, #56]
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w8, #1
	str	w8, [x23]
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x26]
	cmp	w8, w9
	b.le	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	str	w9, [x23]
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20, #72]
	bl	_ns_to_ktime
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_cec_received_msg_ts
	str	wzr, [x20, #56]
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x20]
	cbz	w1, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x20]
	ldr	w2, [x20, #48]
	mov	x0, x19
	bl	_cec_transmit_attempt_done_ts
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
	ldr	w25, [x20, #4]
	ldr	x8, [x20, #8]
	lsl	x9, x25, #2
	ldr	w8, [x8, x9]
	ldr	w10, [x28]
	and	w1, w10, w8
	ldr	w10, [x27]
	and	w2, w10, w8
	ldr	x8, [x20, #40]
	ldr	w3, [x8, x9]
	mov	x0, x19
	bl	_cec_queue_pin_cec_event
	add	w8, w25, #1
	ldr	w9, [x24]
	udiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x20, #4]
	mov	x0, x22
	bl	_atomic_dec
LBB0_21:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_atomic_read
	cbnz	x0, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh11:
	adrp	x8, _CEC_PIN_IRQ_UNCHANGED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CEC_PIN_IRQ_UNCHANGED@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_atomic_xchg
	cmp	w0, #128
	b.eq	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #129
	b.ne	LBB0_2
; %bb.24:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	mov	x0, x20
	bl	_cec_pin_high
	b	LBB0_1
LBB0_25:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cmp	w0, #0
	cset	w8, eq
	str	w8, [x20, #16]
	cbnz	w0, LBB0_2
	b	LBB0_1
LBB0_26:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_atomic_read
	cmp	x0, #0
	cset	w1, ne
	b	LBB0_8
LBB0_27:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_MAX_MSG_SIZE,4,2           ; @CEC_MAX_MSG_SIZE
	.comm	_CEC_PIN_EVENT_FL_IS_HIGH,4,2   ; @CEC_PIN_EVENT_FL_IS_HIGH
	.comm	_CEC_PIN_EVENT_FL_DROPPED,4,2   ; @CEC_PIN_EVENT_FL_DROPPED
	.comm	_CEC_NUM_PIN_EVENTS,4,2         ; @CEC_NUM_PIN_EVENTS
	.comm	_CEC_PIN_IRQ_UNCHANGED,4,2      ; @CEC_PIN_IRQ_UNCHANGED
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.no_dead_strip	_cec_pin_thread_func
.subsections_via_symbols
