	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcm_set_speed
_pcm_set_speed:                         ## @pcm_set_speed
	.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	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	testl	%edi, %edi
	je	LBB0_15
## %bb.1:
	cmpl	$44100, %edi                    ## imm = 0xAC44
	movl	$44100, %eax                    ## imm = 0xAC44
	cmovll	%edi, %eax
	cmpl	$5001, %eax                     ## imm = 0x1389
	movl	$5000, %esi                     ## imm = 0x1388
	cmovgel	%eax, %esi
	movq	_pcm_channels@GOTPCREL(%rip), %rax
	testb	$2, (%rax)
	movq	_CLOCK_TICK_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	je	LBB0_3
## %bb.2:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, %ecx
LBB0_3:
	movl	%esi, %eax
	shrl	%eax
	addl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %esi
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	addl	%ecx, %eax
	cltd
	movl	%esi, %ebx
	idivl	%esi
	movq	_pcm_speed@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movl	$2954, %edi                     ## imm = 0xB8A
	callq	_pas_read
	movl	%eax, %r12d
	andl	$224, %r12d
	movl	(%r14), %eax
	cmpl	$35794, %eax                    ## imm = 0x8BD2
	jl	LBB0_5
## %bb.4:
	orl	$1, %r12d
	jmp	LBB0_14
LBB0_5:
	cmpl	$31818, %eax                    ## imm = 0x7C4A
	jl	LBB0_7
## %bb.6:
	orl	$2, %r12d
	jmp	LBB0_14
LBB0_7:
	cmpl	$23862, %eax                    ## imm = 0x5D36
	jl	LBB0_9
## %bb.8:
	orl	$9, %r12d
	jmp	LBB0_14
LBB0_9:
	cmpl	$17896, %eax                    ## imm = 0x45E8
	jl	LBB0_11
## %bb.10:
	orl	$17, %r12d
	jmp	LBB0_14
LBB0_11:
	cmpl	$11930, %eax                    ## imm = 0x2E9A
	jl	LBB0_13
## %bb.12:
	orl	$25, %r12d
	jmp	LBB0_14
LBB0_13:
	movl	%r12d, %ecx
	orl	$4, %ecx
	cmpl	$5964, %eax                     ## imm = 0x174C
	cmovgel	%ecx, %r12d
LBB0_14:
	movq	_pcm_filter@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movq	_pas_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	%r12d, %edi
	andl	$63, %edi
	movl	$2954, %esi                     ## imm = 0xB8A
	callq	_pas_write
	movl	$52, %edi
	movl	$5003, %esi                     ## imm = 0x138B
	callq	_pas_write
	movzbl	%bl, %edi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_pas_write
	movzbl	%bh, %edi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_pas_write
	movl	%r12d, %edi
	movl	$2954, %esi                     ## imm = 0xB8A
	callq	_pas_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_15:
	movq	_pcm_speed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pcm_speed,4,2                  ## @pcm_speed
	.comm	_pcm_channels,4,2               ## @pcm_channels
	.comm	_CLOCK_TICK_RATE,4,2            ## @CLOCK_TICK_RATE
	.comm	_pcm_filter,4,2                 ## @pcm_filter
	.comm	_pas_lock,4,2                   ## @pas_lock
	.no_dead_strip	_pcm_set_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcm_set_speed
_pcm_set_speed:                         ; @pcm_set_speed
	.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
Lloh0:
	adrp	x21, _pcm_speed@GOTPAGE
Lloh1:
	ldr	x21, [x21, _pcm_speed@GOTPAGEOFF]
	cbz	w0, LBB0_2
; %bb.1:
	mov	w8, #44100
	cmp	w0, w8
	csel	w8, w0, w8, lt
	mov	w9, #5000
	cmp	w8, w9
	csel	w8, w8, w9, gt
Lloh2:
	adrp	x9, _pcm_channels@GOTPAGE
Lloh3:
	ldr	x9, [x9, _pcm_channels@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _CLOCK_TICK_RATE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CLOCK_TICK_RATE@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w10, #0
	cinc	w11, w10, lt
	asr	w11, w11, #1
	tst	w9, #0x2
	csel	w9, w10, w11, eq
	add	w10, w9, w8, lsr #1
	sdiv	w22, w10, w8
	cmp	w22, #0
	cinc	w8, w22, lt
	add	w8, w9, w8, asr #1
	sdiv	w8, w8, w22
	str	w8, [x21]
	mov	w0, #2954
	bl	_pas_read
	and	w8, w0, #0xe0
	ldr	w9, [x21]
	mov	w10, #35794
	mov	w11, #31818
	mov	w12, #23862
	mov	w13, #17896
	mov	w14, #11930
	orr	w15, w8, #0x4
	mov	w16, #5963
	cmp	w9, w16
	csel	w15, w15, w8, gt
	mov	w16, #25
	orr	w16, w8, w16
	cmp	w9, w14
	csel	w14, w15, w16, lt
	mov	w15, #17
	orr	w15, w8, w15
	cmp	w9, w13
	csel	w13, w14, w15, lt
	mov	w14, #9
	orr	w14, w8, w14
	cmp	w9, w12
	csel	w12, w13, w14, lt
	orr	w13, w8, #0x2
	cmp	w9, w11
	csel	w11, w12, w13, lt
	orr	w8, w8, #0x1
	cmp	w9, w10
	csel	w19, w11, w8, lt
Lloh8:
	adrp	x8, _pcm_filter@GOTPAGE
Lloh9:
	ldr	x8, [x8, _pcm_filter@GOTPAGEOFF]
Lloh10:
	str	w19, [x8]
Lloh11:
	adrp	x20, _pas_lock@GOTPAGE
Lloh12:
	ldr	x20, [x20, _pas_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	and	w0, w19, #0x3f
	mov	w1, #2954
	bl	_pas_write
	mov	w0, #52
	mov	w1, #5003
	bl	_pas_write
	and	w0, w22, #0xff
	mov	w1, #5000
	bl	_pas_write
	ubfx	w0, w22, #8, #8
	mov	w1, #5000
	bl	_pas_write
	mov	x0, x19
	mov	w1, #2954
	bl	_pas_write
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_2:
	ldr	w0, [x21]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_pcm_speed,4,2                  ; @pcm_speed
	.comm	_pcm_channels,4,2               ; @pcm_channels
	.comm	_CLOCK_TICK_RATE,4,2            ; @CLOCK_TICK_RATE
	.comm	_pcm_filter,4,2                 ; @pcm_filter
	.comm	_pas_lock,4,2                   ; @pas_lock
	.no_dead_strip	_pcm_set_speed
.subsections_via_symbols
