	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ctl_elem_write
_snd_ctl_elem_write:                    ## @snd_ctl_elem_write
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_down_read
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_snd_ctl_find_id
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_snd_ctl_get_ioff
	movq	8(%rbx), %rcx
	movl	%eax, %edx
	movq	%rdx, %rax
	shlq	$4, %rax
	movq	_SNDRV_CTL_ELEM_ACCESS_WRITE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rcx,%rax)
	je	LBB0_8
## %bb.4:
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.5:
	testq	%r12, %r12
	je	LBB0_9
## %bb.6:
	movq	8(%rcx,%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	cmpq	%r12, %rax
	je	LBB0_9
LBB0_8:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jg	LBB0_11
	jmp	LBB0_2
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_2:
	movq	%r15, %rdi
	callq	_up_read
	jmp	LBB0_12
LBB0_9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_snd_ctl_build_ioff
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	*(%rbx)
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jle	LBB0_2
LBB0_11:
	movq	%r15, %rdi
	callq	_up_read
	movq	_SNDRV_CTL_EVENT_MASK_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_snd_ctl_notify
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SNDRV_CTL_ELEM_ACCESS_WRITE,4,2 ## @SNDRV_CTL_ELEM_ACCESS_WRITE
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ## @SNDRV_CTL_EVENT_MASK_VALUE
	.no_dead_strip	_snd_ctl_elem_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ctl_elem_write
_snd_ctl_elem_write:                    ; @snd_ctl_elem_write
	.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, x2
	mov	x22, x1
	mov	x19, x0
	bl	_down_read
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ctl_find_id
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	x1, x20
	bl	_snd_ctl_get_ioff
	ldr	x8, [x21, #8]
	mov	w2, w0
	lsl	x9, x2, #4
	ldr	w9, [x8, x9]
Lloh0:
	adrp	x10, _SNDRV_CTL_ELEM_ACCESS_WRITE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SNDRV_CTL_ELEM_ACCESS_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.2:
	ldr	x9, [x21]
	cbz	x9, LBB0_6
; %bb.3:
	cbz	x22, LBB0_5
; %bb.4:
	add	x8, x8, x2, lsl #4
	ldr	x8, [x8, #8]
	cmp	x8, #0
	ccmp	x8, x22, #4, ne
	b.ne	LBB0_6
LBB0_5:
	mov	x0, x20
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_snd_ctl_build_ioff
	ldr	x8, [x21]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	mov	x21, x0
	cmp	w21, #1
	b.ge	LBB0_7
	b	LBB0_9
LBB0_6:
Lloh3:
	adrp	x8, _EPERM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	cmp	w21, #1
	b.lt	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_up_read
Lloh6:
	adrp	x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SNDRV_CTL_EVENT_MASK_VALUE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_snd_ctl_notify
	mov	w21, #0
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x19
	bl	_up_read
LBB0_10:
	mov	x0, 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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SNDRV_CTL_ELEM_ACCESS_WRITE,4,2 ; @SNDRV_CTL_ELEM_ACCESS_WRITE
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_SNDRV_CTL_EVENT_MASK_VALUE,4,2 ; @SNDRV_CTL_EVENT_MASK_VALUE
	.no_dead_strip	_snd_ctl_elem_write
.subsections_via_symbols
