	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxl5007t_set_params
_mxl5007t_set_params:                   ## @mxl5007t_set_params
	.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	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	16(%rdi), %r14
	movl	8(%rsi), %edx
	movq	_FE_ATSC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movl	4(%r15), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	jae	LBB0_2
## %bb.8:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cltq
	leaq	l_switch.table.mxl5007t_set_params(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	movq	_MxL_BW_6MHz@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_FE_OFDM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movl	$-132, %eax
	addl	(%r15), %eax
	cmpl	$3, %eax
	jae	LBB0_6
## %bb.9:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cltq
	leaq	l_switch.table.mxl5007t_set_params.3(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_MxL_MODE_DVBT@GOTPCREL(%rip), %rcx
LBB0_10:
	movl	(%rcx), %ebx
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_12:
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mxl5007t_tuner_init
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_mxl_fail
	testq	%rax, %rax
	jne	LBB0_17
## %bb.13:
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_mxl5007t_tuner_rf_tune
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_mxl_fail
	testq	%rax, %rax
	jne	LBB0_17
## %bb.14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r14)
	movq	8(%r13), %rcx
	movq	_FE_OFDM@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_16
## %bb.15:
	movl	(%r15), %eax
LBB0_16:
	movl	%eax, (%r14)
LBB0_17:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.18:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	*%rcx
	jmp	LBB0_19
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_3
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	callq	_mxl_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FE_ATSC,8,3                    ## @FE_ATSC
	.comm	_MxL_MODE_ATSC,4,2              ## @MxL_MODE_ATSC
	.comm	_MxL_MODE_CABLE,4,2             ## @MxL_MODE_CABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"modulation not set!"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MxL_BW_6MHz,4,2                ## @MxL_BW_6MHz
	.comm	_FE_OFDM,8,3                    ## @FE_OFDM
	.comm	_MxL_BW_7MHz,4,2                ## @MxL_BW_7MHz
	.comm	_MxL_BW_8MHz,4,2                ## @MxL_BW_8MHz
L_.str.1:                               ## @.str.1
	.asciz	"bandwidth not set!"

	.comm	_MxL_MODE_DVBT,4,2              ## @MxL_MODE_DVBT
L_.str.2:                               ## @.str.2
	.asciz	"modulation type not supported!"

	.no_dead_strip	_mxl5007t_set_params
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mxl5007t_set_params
l_switch.table.mxl5007t_set_params:
	.quad	_MxL_MODE_ATSC
	.quad	_MxL_MODE_ATSC
	.quad	_MxL_MODE_CABLE
	.quad	_MxL_MODE_CABLE

	.p2align	3                               ## @switch.table.mxl5007t_set_params.3
l_switch.table.mxl5007t_set_params.3:
	.quad	_MxL_BW_8MHz
	.quad	_MxL_BW_7MHz
	.quad	_MxL_BW_6MHz

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxl5007t_set_params
_mxl5007t_set_params:                   ; @mxl5007t_set_params
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w22, [x1, #8]
	ldp	x8, x20, [x0, #8]
Lloh0:
	adrp	x9, _FE_ATSC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FE_ATSC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x21, #4]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hs	LBB0_12
; %bb.2:
Lloh3:
	adrp	x9, l_switch.table.mxl5007t_set_params@PAGE
Lloh4:
	add	x9, x9, l_switch.table.mxl5007t_set_params@PAGEOFF
	ldr	x9, [x9, w8, sxtw #3]
Lloh5:
	adrp	x8, _MxL_BW_6MHz@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MxL_BW_6MHz@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh7:
	adrp	x9, _FE_OFDM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _FE_OFDM@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.4:
	ldr	w8, [x21]
	sub	w8, w8, #132
	cmp	w8, #3
	b.hs	LBB0_14
; %bb.5:
Lloh10:
	adrp	x9, l_switch.table.mxl5007t_set_params.3@PAGE
Lloh11:
	add	x9, x9, l_switch.table.mxl5007t_set_params.3@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
Lloh12:
	adrp	x9, _MxL_MODE_DVBT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MxL_MODE_DVBT@GOTPAGEOFF]
LBB0_6:
	ldr	w23, [x9]
	ldr	w25, [x8]
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_8:
	add	x24, x20, #4
	mov	x0, x24
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x23
	bl	_mxl5007t_tuner_init
	mov	x23, x0
	bl	_mxl_fail
	cbnz	x0, LBB0_18
; %bb.9:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x25
	bl	_mxl5007t_tuner_rf_tune
	mov	x23, x0
	bl	_mxl_fail
	cbnz	x0, LBB0_18
; %bb.10:
	str	w22, [x20, #8]
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _FE_OFDM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FE_OFDM@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.11:
	ldr	w8, [x21]
	b	LBB0_17
LBB0_12:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_15:
	bl	_mxl_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_20
LBB0_16:
	mov	w8, #0
LBB0_17:
	str	w8, [x20]
LBB0_18:
	mov	x0, x24
	bl	_mutex_unlock
	ldr	x8, [x19]
	cbz	x8, LBB0_20
; %bb.19:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_20:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_FE_ATSC,8,3                    ; @FE_ATSC
	.comm	_MxL_MODE_ATSC,4,2              ; @MxL_MODE_ATSC
	.comm	_MxL_MODE_CABLE,4,2             ; @MxL_MODE_CABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"modulation not set!"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MxL_BW_6MHz,4,2                ; @MxL_BW_6MHz
	.comm	_FE_OFDM,8,3                    ; @FE_OFDM
	.comm	_MxL_BW_7MHz,4,2                ; @MxL_BW_7MHz
	.comm	_MxL_BW_8MHz,4,2                ; @MxL_BW_8MHz
l_.str.1:                               ; @.str.1
	.asciz	"bandwidth not set!"

	.comm	_MxL_MODE_DVBT,4,2              ; @MxL_MODE_DVBT
l_.str.2:                               ; @.str.2
	.asciz	"modulation type not supported!"

	.no_dead_strip	_mxl5007t_set_params
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mxl5007t_set_params
l_switch.table.mxl5007t_set_params:
	.quad	_MxL_MODE_ATSC
	.quad	_MxL_MODE_ATSC
	.quad	_MxL_MODE_CABLE
	.quad	_MxL_MODE_CABLE

	.p2align	3                               ; @switch.table.mxl5007t_set_params.3
l_switch.table.mxl5007t_set_params.3:
	.quad	_MxL_BW_8MHz
	.quad	_MxL_BW_7MHz
	.quad	_MxL_BW_6MHz

.subsections_via_symbols
