	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_at73c213_set_bitrate
_snd_at73c213_set_bitrate:              ## @snd_at73c213_set_bitrate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	16(%rdi), %rax
	movl	4(%rax), %edi
	callq	_clk_get_rate
	movq	%rax, %r15
	movq	_BITRATE_TARGET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	shlq	$5, %rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r12
	jmp	LBB0_3
LBB0_1:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r12d
LBB0_3:
	movq	_BITRATE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	movq	%rdi, %rcx
	shlq	$5, %rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rcx
	jmp	LBB0_6
LBB0_4:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ecx
LBB0_6:
	movq	_BITRATE_MIN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	%rbx, %rsi
	shlq	$5, %rsi
	movq	%r15, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_7
## %bb.8:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_9
LBB0_7:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	subq	%rcx, %rax
	shrq	%rax
	cmpl	$2, %eax
	movl	$1, %r14d
	cmovgel	%eax, %r14d
	incq	%r12
	andq	$-2, %r12
	movq	%r12, %rcx
	shlq	$5, %rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_10
## %bb.11:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	cmpq	%rbx, %rax
	jb	LBB0_13
	jmp	LBB0_18
LBB0_10:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rbx, %rax
	jae	LBB0_18
LBB0_13:
	addq	$-2, %r12
	movq	%r12, %rcx
	shlq	$5, %rcx
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_14
## %bb.15:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	cmpq	%rdi, %rax
	jbe	LBB0_18
	jmp	LBB0_17
LBB0_14:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rdi, %rax
	ja	LBB0_17
LBB0_18:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %r13
	shlq	$5, %r13
	movq	%r15, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_19
## %bb.20:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%r13
	cmpq	%rbx, %rax
	jb	LBB0_17
	jmp	LBB0_22
LBB0_19:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rbx, %rax
	jae	LBB0_22
LBB0_17:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_35:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	addq	$64, %r13
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_23 Depth=1
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%r13
LBB0_32:                                ##   in Loop: Header=BB0_23 Depth=1
	addq	$64, %r13
	addq	$2, %r12
	cmpq	%rcx, %rax
	jb	LBB0_17
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_24
## %bb.25:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%r12
	movq	%rax, %rbx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_23 Depth=1
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %ebx
LBB0_26:                                ##   in Loop: Header=BB0_23 Depth=1
	shlq	$3, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clk_round_rate
	testl	%eax, %eax
	js	LBB0_35
## %bb.27:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	%eax, %ecx
	shrl	$8, %ecx
	shrq	$8, %rbx
	cmpq	%rcx, %rbx
	je	LBB0_33
## %bb.28:                              ##   in Loop: Header=BB0_23 Depth=1
	decl	%r14d
	je	LBB0_17
## %bb.29:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	_BITRATE_MIN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	%r15, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	jne	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_32
LBB0_33:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	24(%rbx), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_clk_set_rate
	testl	%eax, %eax
	js	LBB0_35
## %bb.34:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	movq	_CMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	shrq	%rdx
	callq	_ssc_writel
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rbx)
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rcx
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_BITRATE_TARGET,4,2             ## @BITRATE_TARGET
	.comm	_BITRATE_MAX,4,2                ## @BITRATE_MAX
	.comm	_BITRATE_MIN,4,2                ## @BITRATE_MIN
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_CMR,4,2                        ## @CMR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"at73c213: supported bitrate is %lu (%lu divider)\n"

	.no_dead_strip	_snd_at73c213_set_bitrate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_at73c213_set_bitrate
_snd_at73c213_set_bitrate:              ; @snd_at73c213_set_bitrate
	.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	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8, #4]
	bl	_clk_get_rate
	mov	x21, x0
Lloh0:
	adrp	x8, _BITRATE_TARGET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITRATE_TARGET@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	lsl	x8, x8, #5
Lloh3:
	adrp	x9, _BITRATE_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BITRATE_MAX@GOTPAGEOFF]
	udiv	x10, x0, x8
Lloh5:
	ldrsw	x9, [x9]
	lsl	x8, x9, #5
	udiv	x11, x0, x8
Lloh6:
	adrp	x24, _BITRATE_MIN@GOTPAGE
Lloh7:
	ldr	x24, [x24, _BITRATE_MIN@GOTPAGEOFF]
	ldrsw	x8, [x24]
	lsl	x12, x8, #5
	udiv	x12, x0, x12
	sub	x11, x12, x11
	lsr	x11, x11, #1
	cmp	w11, #1
	csinc	w25, w11, wzr, gt
	add	x10, x10, #1
	and	x20, x10, #0xfffffffffffffffe
	lsl	x10, x20, #5
	udiv	x10, x0, x10
	cmp	x10, x8
	b.hs	LBB0_2
; %bb.1:
	sub	x20, x20, #2
	lsl	x10, x20, #5
	udiv	x10, x21, x10
	cmp	x10, x9
	b.hi	LBB0_3
LBB0_2:
	lsl	x9, x20, #5
	udiv	x22, x21, x9
	cmp	x22, x8
	b.hs	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w1, w8
LBB0_4:
	mov	x0, x1
	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
LBB0_5:
	add	x26, x9, #64
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	udiv	x8, x21, x20
	lsl	x23, x8, #3
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	mov	x1, x23
	bl	_clk_round_rate
	mov	x1, x0
	tbnz	w0, #31, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsr	w8, w1, #8
	cmp	x8, x23, lsr #8
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	subs	w25, w25, #1
	b.eq	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	udiv	x22, x21, x26
	add	x26, x26, #64
	add	x20, x20, #2
	ldrsw	x8, [x24]
	cmp	x22, x8
	b.hs	LBB0_6
	b	LBB0_3
LBB0_10:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_clk_set_rate
	tbnz	w0, #31, LBB0_12
; %bb.11:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _CMR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CMR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	lsr	x2, x20, #1
	bl	_ssc_writel
	str	x22, [x19]
	ldr	x0, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x20
	bl	_dev_info
	mov	w1, #0
	b	LBB0_4
LBB0_12:
	mov	x1, x0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_BITRATE_TARGET,4,2             ; @BITRATE_TARGET
	.comm	_BITRATE_MAX,4,2                ; @BITRATE_MAX
	.comm	_BITRATE_MIN,4,2                ; @BITRATE_MIN
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_CMR,4,2                        ; @CMR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"at73c213: supported bitrate is %lu (%lu divider)\n"

	.no_dead_strip	_snd_at73c213_set_bitrate
.subsections_via_symbols
