	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function bcm3510_set_frontend
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_bcm3510_set_frontend:                  ## @bcm3510_set_frontend
	.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	$72, %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	-80(%rbp), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	8(%r14), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_6
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movl	$8, -80(%rbp)
	jmp	LBB0_4
LBB0_5:
	movl	$9, -80(%rbp)
LBB0_4:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_2:
	movl	$2, -80(%rbp)
	movl	$1, %ecx
	movl	$2, %eax
	jmp	LBB0_8
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_7:
	movl	$1, -80(%rbp)
	movl	$1, %eax
	movl	$1, %ecx
LBB0_8:
	movl	%eax, -48(%rbp)
	movl	%ecx, -44(%rbp)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -76(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movq	_CMD_ACQUIRE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSGID_EXT_TUNER_ACQUIRE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	xorl	%r15d, %r15d
	leaq	-80(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$40, %r8d
	xorl	%r9d, %r9d
	callq	_bcm3510_do_hab_cmd
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	_CMD_STATE_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_MSGID_BERT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	leaq	-96(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rcx
	movl	$16, %r8d
	xorl	%r9d, %r9d
	callq	_bcm3510_do_hab_cmd
	movl	(%r13), %esi
	movq	_MSGID_BERT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rcx
	movl	$16, %r8d
	xorl	%r9d, %r9d
	callq	_bcm3510_do_hab_cmd
	movq	%rbx, %rdi
	callq	_bcm3510_bert_reset
	movl	12(%r14), %esi
	movq	%rbx, %rdi
	callq	_bcm3510_set_freq
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	leaq	48(%rbx), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	leaq	8(%rbx), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	$500, (%rbx)                    ## imm = 0x1F4
	movl	$200, %edi
	callq	_msleep
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CMD_ACQUIRE,4,2                ## @CMD_ACQUIRE
	.comm	_MSGID_EXT_TUNER_ACQUIRE,4,2    ## @MSGID_EXT_TUNER_ACQUIRE
	.comm	_CMD_STATE_CONTROL,4,2          ## @CMD_STATE_CONTROL
	.comm	_MSGID_BERT_CONTROL,4,2         ## @MSGID_BERT_CONTROL
	.comm	_MSGID_BERT_SET,4,2             ## @MSGID_BERT_SET
	.no_dead_strip	_bcm3510_set_frontend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function bcm3510_set_frontend
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bcm3510_set_frontend:                  ; @bcm3510_set_frontend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x0
	ldr	x19, [x0]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w8, [x20, #8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w8, #8
	b	LBB0_4
LBB0_3:
	mov	w8, #9
LBB0_4:
	str	w8, [sp, #24]
	movi.2d	v0, #0000000000000000
	b	LBB0_8
LBB0_5:
	mov	w8, #2
	str	w8, [sp, #24]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_7:
	mov	w8, #1
	str	w8, [sp, #24]
	movi.2s	v0, #1
LBB0_8:
	str	d0, [sp, #56]
	movi.2s	v0, #1
	stur	d0, [sp, #28]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #40]
Lloh7:
	adrp	x8, _CMD_ACQUIRE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CMD_ACQUIRE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _MSGID_EXT_TUNER_ACQUIRE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSGID_EXT_TUNER_ACQUIRE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	mov	w4, #40
	mov	x5, #0
	mov	w6, #0
	bl	_bcm3510_do_hab_cmd
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #8]
Lloh13:
	adrp	x21, _CMD_STATE_CONTROL@GOTPAGE
Lloh14:
	ldr	x21, [x21, _CMD_STATE_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh15:
	adrp	x8, _MSGID_BERT_CONTROL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSGID_BERT_CONTROL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w4, #16
	mov	x5, #0
	mov	w6, #0
	bl	_bcm3510_do_hab_cmd
	ldr	w1, [x21]
Lloh18:
	adrp	x8, _MSGID_BERT_SET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSGID_BERT_SET@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w4, #16
	mov	x5, #0
	mov	w6, #0
	bl	_bcm3510_do_hab_cmd
	mov	x0, x19
	bl	_bcm3510_bert_reset
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_bcm3510_set_freq
	tbnz	w0, #31, LBB0_10
; %bb.9:
	add	x0, x19, #48
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	add	x0, x19, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	w8, #500
	str	w8, [x19]
	mov	w0, #200
	bl	_msleep
	mov	w0, #0
LBB0_10:
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CMD_ACQUIRE,4,2                ; @CMD_ACQUIRE
	.comm	_MSGID_EXT_TUNER_ACQUIRE,4,2    ; @MSGID_EXT_TUNER_ACQUIRE
	.comm	_CMD_STATE_CONTROL,4,2          ; @CMD_STATE_CONTROL
	.comm	_MSGID_BERT_CONTROL,4,2         ; @MSGID_BERT_CONTROL
	.comm	_MSGID_BERT_SET,4,2             ; @MSGID_BERT_SET
	.no_dead_strip	_bcm3510_set_frontend
.subsections_via_symbols
