	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_pcm_link
_snd_pcm_link:                          ## @snd_pcm_link
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_snd_pcm_file_fd
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	(%rax), %r15
	movq	_snd_pcm_link_rwsem@GOTPCREL(%rip), %rdi
	callq	_down_write
	movq	_snd_pcm_link_rwlock@GOTPCREL(%rip), %rdi
	callq	_write_lock_irq
	movq	16(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_SNDRV_PCM_STATE_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.6:
	movq	%r15, %rdi
	callq	_snd_pcm_stream_linked
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EALREADY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EBADFD@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	_snd_pcm_link_rwlock@GOTPCREL(%rip), %rdi
	callq	_write_unlock_irq
	movq	_snd_pcm_link_rwsem@GOTPCREL(%rip), %rdi
	callq	_up_write
	movq	%r12, %rdi
	callq	_fput
	jmp	LBB0_15
LBB0_1:
	movq	_EBADFD@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_snd_pcm_stream_linked
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%r14), %rsi
	jmp	LBB0_13
LBB0_10:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	addq	$8, %rax
	movq	%rax, %rdi
	callq	_spin_lock_init
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	leaq	8(%r14), %rdi
	movq	(%r14), %rsi
	addq	$4, %rsi
	callq	_list_add_tail
	movq	(%r14), %rsi
	movl	$1, (%rsi)
LBB0_13:
	leaq	8(%r15), %rdi
	addq	$4, %rsi
	callq	_list_add_tail
	movq	(%r14), %rax
	incl	(%rax)
	movq	%rax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADFD,4,2                     ## @EBADFD
	.comm	_snd_pcm_link_rwsem,4,2         ## @snd_pcm_link_rwsem
	.comm	_snd_pcm_link_rwlock,4,2        ## @snd_pcm_link_rwlock
	.comm	_SNDRV_PCM_STATE_OPEN,8,3       ## @SNDRV_PCM_STATE_OPEN
	.comm	_EALREADY,4,2                   ## @EALREADY
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_snd_pcm_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_pcm_link
_snd_pcm_link:                          ; @snd_pcm_link
	.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	x20, x0
	mov	x0, x1
	bl	_snd_pcm_file_fd
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
Lloh0:
	adrp	x0, _snd_pcm_link_rwsem@GOTPAGE
Lloh1:
	ldr	x0, [x0, _snd_pcm_link_rwsem@GOTPAGEOFF]
	bl	_down_write
Lloh2:
	adrp	x0, _snd_pcm_link_rwlock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _snd_pcm_link_rwlock@GOTPAGEOFF]
	bl	_write_lock_irq
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh4:
	adrp	x9, _SNDRV_PCM_STATE_OPEN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SNDRV_PCM_STATE_OPEN@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.2:
	ldr	x9, [x21, #16]
	ldr	x9, [x9]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_snd_pcm_stream_linked
	cbz	x0, LBB0_10
; %bb.4:
Lloh7:
	adrp	x8, _EALREADY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _EBADFD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
Lloh11:
	adrp	x0, _snd_pcm_link_rwlock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _snd_pcm_link_rwlock@GOTPAGEOFF]
	bl	_write_unlock_irq
Lloh13:
	adrp	x0, _snd_pcm_link_rwsem@GOTPAGE
Lloh14:
	ldr	x0, [x0, _snd_pcm_link_rwsem@GOTPAGEOFF]
	bl	_up_write
	mov	x0, x19
	bl	_fput
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _EBADFD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBADFD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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
LBB0_10:
	mov	x0, x20
	bl	_snd_pcm_stream_linked
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x8, [x20]
	b	LBB0_14
LBB0_12:
Lloh18:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	str	x0, [x20]
	cbz	x0, LBB0_15
; %bb.13:
	add	x0, x0, #8
	bl	_spin_lock_init
	ldr	x8, [x20]
	add	x0, x8, #4
	bl	_INIT_LIST_HEAD
	add	x0, x20, #8
	ldr	x8, [x20]
	add	x1, x8, #4
	bl	_list_add_tail
	ldr	x8, [x20]
	mov	w9, #1
	str	w9, [x8]
LBB0_14:
	add	x0, x21, #8
	add	x1, x8, #4
	bl	_list_add_tail
	mov	w22, #0
	ldr	x8, [x20]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	x8, [x21]
	b	LBB0_7
LBB0_15:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADFD,4,2                     ; @EBADFD
	.comm	_snd_pcm_link_rwsem,4,2         ; @snd_pcm_link_rwsem
	.comm	_snd_pcm_link_rwlock,4,2        ; @snd_pcm_link_rwlock
	.comm	_SNDRV_PCM_STATE_OPEN,8,3       ; @SNDRV_PCM_STATE_OPEN
	.comm	_EALREADY,4,2                   ; @EALREADY
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_snd_pcm_link
.subsections_via_symbols
