	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xc_load_fw_and_init_tuner
_xc_load_fw_and_init_tuner:             ## @xc_load_fw_and_init_tuner
	.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	%rdi, %r15
	movq	(%rdi), %r14
	callq	_xc5000_is_firmware_loaded
	movq	_XC_RESULT_SUCCESS@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	cmpl	(%r12), %eax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_xc5000_fwupload
	movl	%eax, %ebx
	cmpl	(%r12), %eax
	jne	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	callq	_xc_initialize
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movl	$100, %edi
	callq	_xc_wait
	movq	_XREG_SIGNALSOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XC_RF_MODE_CABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_xc_write_reg
	movl	%eax, %ebx
	orl	%r15d, %ebx
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XC_RESULT_SUCCESS,4,2          ## @XC_RESULT_SUCCESS
	.comm	_XREG_SIGNALSOURCE,4,2          ## @XREG_SIGNALSOURCE
	.comm	_XC_RF_MODE_CABLE,4,2           ## @XC_RF_MODE_CABLE
	.no_dead_strip	_xc_load_fw_and_init_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xc_load_fw_and_init_tuner
_xc_load_fw_and_init_tuner:             ; @xc_load_fw_and_init_tuner
	.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	x20, x0
	ldr	x19, [x0]
	bl	_xc5000_is_firmware_loaded
Lloh0:
	adrp	x21, _XC_RESULT_SUCCESS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _XC_RESULT_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_xc5000_fwupload
	mov	x20, x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_xc_initialize
	orr	w20, w0, w20
	mov	w0, #100
	bl	_xc_wait
Lloh2:
	adrp	x8, _XREG_SIGNALSOURCE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XREG_SIGNALSOURCE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _XC_RF_MODE_CABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XC_RF_MODE_CABLE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_xc_write_reg
	orr	w20, w20, w0
LBB0_4:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_XC_RESULT_SUCCESS,4,2          ; @XC_RESULT_SUCCESS
	.comm	_XREG_SIGNALSOURCE,4,2          ; @XREG_SIGNALSOURCE
	.comm	_XC_RF_MODE_CABLE,4,2           ; @XC_RF_MODE_CABLE
	.no_dead_strip	_xc_load_fw_and_init_tuner
.subsections_via_symbols
