	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function av7110_fe_lock_fix
_av7110_fe_lock_fix:                    ## @av7110_fe_lock_fix
	.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	_FE_HAS_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%r13d, %r13d
	testl	%esi, %r14d
	setne	%r13b
	movl	%esi, (%rdi)
	xorl	%r12d, %r12d
	cmpl	%r13d, 4(%rdi)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r15
	cmpq	$0, 24(%rdi)
	je	LBB0_3
## %bb.2:
	movl	%r13d, 4(%r15)
	jmp	LBB0_14
LBB0_3:
	movl	%esi, %ebx
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_5:
	testl	%ebx, %r14d
	je	LBB0_8
## %bb.6:
	movq	%r12, %rbx
	movq	16(%r15), %rax
	movq	_DMX_PES_VIDEO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_DMX_PES_AUDIO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	movq	_DMX_PES_TELETEXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	_DMX_PES_PCR@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movl	(%rax,%rdi,4), %r9d
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	callq	_SetPIDs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	_COMTYPE_PIDFILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_Scan@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_av7110_fw_cmd
LBB0_11:
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movl	%r13d, 4(%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_8:
	movq	%r12, %rbx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_SetPIDs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	_COMTYPE_PID_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FlushTSQueue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_av7110_fw_cmd
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_10
LBB0_13:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_GPMQBusy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_av7110_wait_msgstate
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_FE_HAS_LOCK,4,2                ## @FE_HAS_LOCK
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_DMX_PES_VIDEO,8,3              ## @DMX_PES_VIDEO
	.comm	_DMX_PES_AUDIO,8,3              ## @DMX_PES_AUDIO
	.comm	_DMX_PES_TELETEXT,8,3           ## @DMX_PES_TELETEXT
	.comm	_DMX_PES_PCR,8,3                ## @DMX_PES_PCR
	.comm	_COMTYPE_PIDFILTER,4,2          ## @COMTYPE_PIDFILTER
	.comm	_Scan,4,2                       ## @Scan
	.comm	_COMTYPE_PID_FILTER,4,2         ## @COMTYPE_PID_FILTER
	.comm	_FlushTSQueue,4,2               ## @FlushTSQueue
	.comm	_GPMQBusy,4,2                   ## @GPMQBusy
	.no_dead_strip	_av7110_fe_lock_fix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function av7110_fe_lock_fix
_av7110_fe_lock_fix:                    ; @av7110_fe_lock_fix
	.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
Lloh0:
	adrp	x8, _FE_HAS_LOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FE_HAS_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ands	w21, w8, w1
	cset	w22, ne
	str	w1, [x0]
	ldr	w8, [x0, #4]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_14
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w21, #0
	str	w22, [x19, #4]
	b	LBB0_14
LBB0_4:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_6:
	cbz	w21, LBB0_9
; %bb.7:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _DMX_PES_VIDEO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMX_PES_VIDEO@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
Lloh9:
	adrp	x9, _DMX_PES_AUDIO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMX_PES_AUDIO@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
Lloh12:
	adrp	x9, _DMX_PES_TELETEXT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DMX_PES_TELETEXT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
Lloh15:
	adrp	x9, _DMX_PES_PCR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DMX_PES_PCR@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	w5, [x8, x9, lsl #2]
	mov	x0, x19
	mov	w4, #0
	bl	_SetPIDs
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.8:
Lloh18:
	adrp	x8, _COMTYPE_PIDFILTER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COMTYPE_PIDFILTER@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _Scan@GOTPAGE
Lloh22:
	ldr	x8, [x8, _Scan@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_av7110_fw_cmd
	mov	x21, x0
	cbnz	w0, LBB0_13
	b	LBB0_12
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_SetPIDs
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.10:
Lloh24:
	adrp	x8, _COMTYPE_PID_FILTER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _COMTYPE_PID_FILTER@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _FlushTSQueue@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FlushTSQueue@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_av7110_fw_cmd
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:
Lloh30:
	adrp	x8, _GPMQBusy@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GPMQBusy@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_av7110_wait_msgstate
	mov	x21, x0
	cbnz	w0, LBB0_13
LBB0_12:
	str	w22, [x19, #4]
LBB0_13:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_14:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_FE_HAS_LOCK,4,2                ; @FE_HAS_LOCK
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_DMX_PES_VIDEO,8,3              ; @DMX_PES_VIDEO
	.comm	_DMX_PES_AUDIO,8,3              ; @DMX_PES_AUDIO
	.comm	_DMX_PES_TELETEXT,8,3           ; @DMX_PES_TELETEXT
	.comm	_DMX_PES_PCR,8,3                ; @DMX_PES_PCR
	.comm	_COMTYPE_PIDFILTER,4,2          ; @COMTYPE_PIDFILTER
	.comm	_Scan,4,2                       ; @Scan
	.comm	_COMTYPE_PID_FILTER,4,2         ; @COMTYPE_PID_FILTER
	.comm	_FlushTSQueue,4,2               ; @FlushTSQueue
	.comm	_GPMQBusy,4,2                   ; @GPMQBusy
	.no_dead_strip	_av7110_fe_lock_fix
.subsections_via_symbols
