	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stb6100_set_bandwidth
_stb6100_set_bandwidth:                 ## @stb6100_set_bandwidth
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movq	_verbose@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edx
	movl	%ebx, %r8d
	callq	_dprintk
	movl	$223, %r15d
	cmpl	$71999999, %ebx                 ## imm = 0x44AA1FF
	jg	LBB0_3
## %bb.1:
	movl	$192, %r15d
	cmpl	$10000002, %ebx                 ## imm = 0x989682
	jl	LBB0_3
## %bb.2:
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	addl	$500000, %eax                   ## imm = 0x7A120
	cltq
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rcx
	sarq	$50, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %r15d
	addl	$-5, %r15d
	orl	$192, %r15d
LBB0_3:
	movq	_STB6100_FCCK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_STB6100_FCCK_FCCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	$13, %edx
	movq	%r14, %rdi
	callq	_stb6100_write_reg
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movq	_STB6100_F@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_stb6100_write_reg
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movl	$5, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	$13, %edx
	callq	_stb6100_write_reg
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movl	$10, %edi
	callq	_msleep
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbose,4,2                    ## @verbose
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set bandwidth to %u Hz"

	.comm	_STB6100_FCCK,4,2               ## @STB6100_FCCK
	.comm	_STB6100_FCCK_FCCK,4,2          ## @STB6100_FCCK_FCCK
	.comm	_STB6100_F,4,2                  ## @STB6100_F
	.no_dead_strip	_stb6100_set_bandwidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stb6100_set_bandwidth
_stb6100_set_bandwidth:                 ; @stb6100_set_bandwidth
	.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, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _verbose@GOTPAGE
Lloh1:
	ldr	x8, [x8, _verbose@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	w2, #1
	mov	x4, x20
	bl	_dprintk
	cmp	w20, #0
	cinc	w8, w20, lt
	asr	w8, w8, #1
	mov	w9, #223
	mov	w10, #41471
	movk	w10, #1098, lsl #16
	mov	w11, #192
	mov	w12, #38530
	movk	w12, #152, lsl #16
	add	w8, w8, #122, lsl #12           ; =499712
	add	w8, w8, #288
	mov	w13, #56963
	movk	w13, #17179, lsl #16
	smull	x8, w8, w13
	lsr	x13, x8, #63
	asr	x8, x8, #50
	add	w8, w8, w13
	sub	w8, w8, #5
	orr	w8, w8, #0xc0
	cmp	w20, w12
	csel	w8, w11, w8, lt
	cmp	w20, w10
	csel	w20, w9, w8, gt
Lloh8:
	adrp	x21, _STB6100_FCCK@GOTPAGE
Lloh9:
	ldr	x21, [x21, _STB6100_FCCK@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _STB6100_FCCK_FCCK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _STB6100_FCCK_FCCK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	mov	w9, #13
	orr	w2, w8, w9
	mov	x0, x19
	bl	_stb6100_write_reg
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh13:
	adrp	x8, _STB6100_F@GOTPAGE
Lloh14:
	ldr	x8, [x8, _STB6100_F@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_stb6100_write_reg
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w0, #5
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #13
	bl	_stb6100_write_reg
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	w0, #10
	bl	_msleep
	mov	w0, #0
LBB0_4:
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_verbose,4,2                    ; @verbose
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set bandwidth to %u Hz"

	.comm	_STB6100_FCCK,4,2               ; @STB6100_FCCK
	.comm	_STB6100_FCCK_FCCK,4,2          ; @STB6100_FCCK_FCCK
	.comm	_STB6100_F,4,2                  ; @STB6100_F
	.no_dead_strip	_stb6100_set_bandwidth
.subsections_via_symbols
