	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_seq_cell_alloc
_snd_seq_cell_alloc:                    ## @snd_seq_cell_alloc
	.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
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	$0, (%rsi)
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdi
	callq	_init_waitqueue_entry
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 48(%rbx)
	je	LBB0_20
## %bb.3:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	leaq	40(%rbx), %r15
	leaq	-52(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %r13
	movq	32(%rbx), %rax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%r13, %r13
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	testq	%rax, %rax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_add_wait_queue
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	callq	_schedule
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_remove_wait_queue
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_20:
	leaq	L_.str(%rip), %rdi
	callq	_snd_printd
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_10:
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_18:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
LBB0_19:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	testq	%r13, %r13
	je	LBB0_16
## %bb.13:
	movq	(%r13), %rax
	movq	%rax, 24(%rbx)
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%r14, %rdi
	callq	_atomic_read
	cmpl	%eax, (%rbx)
	jge	LBB0_15
## %bb.14:
	movl	%eax, (%rbx)
LBB0_15:
	incl	12(%rbx)
	movq	$0, (%r13)
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_16:
	incl	8(%rbx)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_current,4,2                    ## @current
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"seq: pool is not initialized\n"

	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_snd_seq_cell_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_seq_cell_alloc
_snd_seq_cell_alloc:                    ; @snd_seq_cell_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_8
; %bb.1:
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	str	xzr, [x1]
Lloh3:
	adrp	x25, _current@GOTPAGE
Lloh4:
	ldr	x25, [x25, _current@GOTPAGEOFF]
	ldr	w1, [x25]
	add	x0, sp, #12
	bl	_init_waitqueue_entry
	add	x19, x21, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x21, #48]
	cbz	x8, LBB0_9
; %bb.2:
	neg	w22, w22
	add	x24, x21, #40
Lloh5:
	adrp	x27, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh6:
	ldr	x27, [x27, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x26, x8, [x21, #24]
	cbnz	w23, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	x26, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	x8, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x27]
	bl	_set_current_state
	add	x1, sp, #12
	mov	x0, x24
	bl	_add_wait_queue
	mov	x0, x19
	bl	_spin_unlock_irq
	bl	_schedule
	mov	x0, x19
	bl	_spin_lock_irq
	add	x1, sp, #12
	mov	x0, x24
	bl	_remove_wait_queue
	ldr	w0, [x25]
	bl	_signal_pending
	cbz	x0, LBB0_3
; %bb.7:
Lloh7:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_9:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_snd_printd
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	cbz	x8, LBB0_15
LBB0_11:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_13:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_14:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	cbz	x26, LBB0_19
; %bb.16:
	ldr	x8, [x26]
	str	x8, [x21, #24]
	add	x22, x21, #16
	mov	x0, x22
	bl	_atomic_inc
	mov	x0, x22
	bl	_atomic_read
	ldr	w8, [x21]
	cmp	w8, w0
	b.ge	LBB0_18
; %bb.17:
	str	w0, [x21]
LBB0_18:
	mov	w22, #0
	ldr	w8, [x21, #12]
	add	w8, w8, #1
	str	w8, [x21, #12]
	str	xzr, [x26]
	b	LBB0_20
LBB0_19:
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
LBB0_20:
	str	x26, [x20]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_current,4,2                    ; @current
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"seq: pool is not initialized\n"

	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_snd_seq_cell_alloc
.subsections_via_symbols
