	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_es18xx_rate_set
_snd_es18xx_rate_set:                   ## @snd_es18xx_rate_set
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r8d
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movl	(%rdi), %esi
	movq	_ES18XX_NEW_RATE@GOTPCREL(%rip), %rdx
	movq	(%rax), %rcx
	testl	%esi, (%rdx)
	je	LBB0_3
## %bb.1:
	movq	_new_clocks@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movl	8(%rax), %edx
	cmpq	(%rdi), %rcx
	jne	LBB0_2
LBB0_4:
	movl	$128, %ecx
	jmp	LBB0_5
LBB0_3:
	movq	_old_clocks@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movl	8(%rax), %edx
	cmpq	(%rdi), %rcx
	jne	LBB0_4
LBB0_2:
	movl	$256, %ecx                      ## imm = 0x100
LBB0_5:
	subl	%edx, %ecx
	imull	$656, 12(%rax), %edi            ## imm = 0x290
	movl	$143200000, %eax                ## imm = 0x8890F00
	xorl	%edx, %edx
	idivl	%edi
	movl	$256, %ebx                      ## imm = 0x100
	subl	%eax, %ebx
	movq	_ES18XX_PCM2@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_8
## %bb.6:
	movq	_DAC2@GOTPCREL(%rip), %rax
	cmpl	%r8d, (%rax)
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movl	$112, %esi
	movl	%ecx, %edx
	callq	_snd_es18xx_mixer_write
	movq	%r14, %rdi
	movl	$162, %esi
	movl	%ebx, %edx
	callq	_snd_es18xx_write
	movq	%r14, %rdi
	movl	$114, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_snd_es18xx_mixer_write         ## TAILCALL
LBB0_8:
	movq	%r14, %rdi
	movl	$161, %esi
	movl	%ecx, %edx
	callq	_snd_es18xx_write
	movq	%r14, %rdi
	movl	$162, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_snd_es18xx_write               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ES18XX_NEW_RATE,4,2            ## @ES18XX_NEW_RATE
	.comm	_new_clocks,8,3                 ## @new_clocks
	.comm	_old_clocks,8,3                 ## @old_clocks
	.comm	_ES18XX_PCM2,4,2                ## @ES18XX_PCM2
	.comm	_DAC2,4,2                       ## @DAC2
	.no_dead_strip	_snd_es18xx_rate_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_es18xx_rate_set
_snd_es18xx_rate_set:                   ; @snd_es18xx_rate_set
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x10, [x1]
	ldr	w9, [x0]
Lloh0:
	adrp	x8, _ES18XX_NEW_RATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ES18XX_NEW_RATE@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	ldr	x8, [x10]
	tst	w11, w9
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x11, _new_clocks@GOTPAGE
Lloh4:
	ldr	x11, [x11, _new_clocks@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	ldr	x11, [x11]
	ldr	w12, [x10, #8]
	mov	w13, #256
	sub	w13, w13, w12
	mov	w14, #128
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x11, _old_clocks@GOTPAGE
Lloh7:
	ldr	x11, [x11, _old_clocks@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	ldr	x11, [x11]
	ldr	w12, [x10, #8]
	mov	w13, #128
	sub	w13, w13, w12
	mov	w14, #256
LBB0_3:
	sub	w12, w14, w12
	cmp	x8, x11
	csel	w8, w13, w12, ne
	ldr	w10, [x10, #12]
	mov	w11, #656
	mul	w10, w10, w11
	mov	w11, #3840
	movk	w11, #2185, lsl #16
	sdiv	w10, w11, w10
	mov	w11, #256
	sub	w20, w11, w10
Lloh9:
	adrp	x10, _ES18XX_PCM2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ES18XX_PCM2@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh12:
	adrp	x10, _DAC2@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DAC2@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w9, #0
	mov	x0, x19
	ccmp	w10, w2, #0, ne
	b.eq	LBB0_5
; %bb.4:
	mov	w1, #161
	mov	x2, x8
	bl	_snd_es18xx_write
	mov	x0, x19
	mov	w1, #162
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_snd_es18xx_write
LBB0_5:
	mov	w1, #112
	mov	x2, x8
	bl	_snd_es18xx_mixer_write
	mov	x0, x19
	mov	w1, #162
	mov	x2, x20
	bl	_snd_es18xx_write
	mov	x0, x19
	mov	w1, #114
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_snd_es18xx_mixer_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ES18XX_NEW_RATE,4,2            ; @ES18XX_NEW_RATE
	.comm	_new_clocks,8,3                 ; @new_clocks
	.comm	_old_clocks,8,3                 ; @old_clocks
	.comm	_ES18XX_PCM2,4,2                ; @ES18XX_PCM2
	.comm	_DAC2,4,2                       ; @DAC2
	.no_dead_strip	_snd_es18xx_rate_set
.subsections_via_symbols
