	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_playback_hw_params
_snd_emu10k1_playback_hw_params:        ## @snd_emu10k1_playback_hw_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, %rbx
	movq	%rdi, %r13
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	(%r13), %rax
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_params_channels
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_snd_emu10k1_pcm_channel_alloc
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_params_buffer_bytes
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_snd_pcm_lib_malloc_pages
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_snd_emu10k1_free_pages
LBB0_5:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_snd_emu10k1_alloc_pages
	movq	%rax, 8(%r14)
	movl	$0, (%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	(%rax), %eax
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, (%r14)
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_snd_emu10k1_playback_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_playback_hw_params
_snd_emu10k1_playback_hw_params:        ; @snd_emu10k1_playback_hw_params
	.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	x22, x1
	mov	x20, x0
	bl	_snd_pcm_substream_chip
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x19, [x8]
	mov	x0, x22
	bl	_params_channels
	mov	x1, x0
	mov	x0, x19
	bl	_snd_emu10k1_pcm_channel_alloc
	tbnz	w0, #31, LBB0_9
; %bb.1:
	mov	x0, x22
	bl	_params_buffer_bytes
	mov	x1, x0
	mov	x0, x20
	bl	_snd_pcm_lib_malloc_pages
	tbnz	w0, #31, LBB0_9
; %bb.2:
	cbz	w0, LBB0_9
; %bb.3:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_snd_emu10k1_free_pages
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	bl	_snd_emu10k1_alloc_pages
	str	x0, [x19, #8]
	str	wzr, [x19]
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_8
; %bb.7:
	mov	w0, #0
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	str	w8, [x19]
	b	LBB0_9
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_snd_emu10k1_playback_hw_params
.subsections_via_symbols
