	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_hda_attach_beep_device     ## -- Begin function snd_hda_attach_beep_device
	.p2align	4, 0x90
_snd_hda_attach_beep_device:            ## @snd_hda_attach_beep_device
	.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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_snd_hda_get_bool_hint
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %rax
	movq	_HDA_BEEP_MODE_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movl	40(%rax), %edi
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	8(%rbx), %r8d
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_AC_VERB_SET_DIGI_CONVERT_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	callq	_snd_hda_codec_write_cache
	movl	%r12d, (%r14)
	movq	%rbx, 32(%r14)
	movq	(%rbx), %rax
	movq	%rax, 8(%r14)
	movq	%r14, 16(%rbx)
	leaq	28(%r14), %rdi
	movq	_snd_hda_do_register@GOTPCREL(%rip), %rsi
	callq	_INIT_WORK
	leaq	24(%r14), %rdi
	movq	_snd_hda_do_unregister@GOTPCREL(%rip), %rsi
	callq	_INIT_DELAYED_WORK
	leaq	20(%r14), %rdi
	movq	_snd_hda_generate_beep@GOTPCREL(%rip), %rsi
	callq	_INIT_WORK
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	movq	8(%r14), %rax
	movq	_HDA_BEEP_MODE_ON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_snd_hda_do_attach
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_kfree
	movq	$0, 16(%rbx)
	movl	%r12d, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"beep"

	.comm	_HDA_BEEP_MODE_OFF,8,3          ## @HDA_BEEP_MODE_OFF
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"card%d/codec#%d/beep0"

	.comm	_AC_VERB_SET_DIGI_CONVERT_2,4,2 ## @AC_VERB_SET_DIGI_CONVERT_2
	.comm	_snd_hda_do_register,4,2        ## @snd_hda_do_register
	.comm	_snd_hda_do_unregister,4,2      ## @snd_hda_do_unregister
	.comm	_snd_hda_generate_beep,4,2      ## @snd_hda_generate_beep
	.comm	_HDA_BEEP_MODE_ON,8,3           ## @HDA_BEEP_MODE_ON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_hda_attach_beep_device     ; -- Begin function snd_hda_attach_beep_device
	.p2align	2
_snd_hda_attach_beep_device:            ; @snd_hda_attach_beep_device
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_snd_hda_get_bool_hint
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _HDA_BEEP_MODE_OFF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HDA_BEEP_MODE_OFF@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_2:
	mov	w21, #0
LBB0_3:
	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
LBB0_4:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x20, x0
	ldr	w0, [x0, #40]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w3, [x8]
	ldr	w4, [x19, #8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh10:
	adrp	x8, _AC_VERB_SET_DIGI_CONVERT_2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AC_VERB_SET_DIGI_CONVERT_2@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w4, #1
	bl	_snd_hda_codec_write_cache
	str	w21, [x20]
	str	x19, [x20, #32]
	ldr	x8, [x19]
	str	x8, [x20, #8]
	str	x20, [x19, #16]
	add	x0, x20, #28
Lloh13:
	adrp	x1, _snd_hda_do_register@GOTPAGE
Lloh14:
	ldr	x1, [x1, _snd_hda_do_register@GOTPAGEOFF]
	bl	_INIT_WORK
	add	x0, x20, #24
Lloh15:
	adrp	x1, _snd_hda_do_unregister@GOTPAGE
Lloh16:
	ldr	x1, [x1, _snd_hda_do_unregister@GOTPAGEOFF]
	bl	_INIT_DELAYED_WORK
	add	x0, x20, #20
Lloh17:
	adrp	x1, _snd_hda_generate_beep@GOTPAGE
Lloh18:
	ldr	x1, [x1, _snd_hda_generate_beep@GOTPAGEOFF]
	bl	_INIT_WORK
	add	x0, x20, #16
	bl	_mutex_init
	mov	w21, #0
	ldr	x8, [x20, #8]
Lloh19:
	adrp	x9, _HDA_BEEP_MODE_ON@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HDA_BEEP_MODE_ON@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.6:
	mov	x0, x20
	bl	_snd_hda_do_attach
	tbz	w0, #31, LBB0_2
; %bb.7:
	mov	x21, x0
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19, #16]
	b	LBB0_3
LBB0_8:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"beep"

	.comm	_HDA_BEEP_MODE_OFF,8,3          ; @HDA_BEEP_MODE_OFF
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"card%d/codec#%d/beep0"

	.comm	_AC_VERB_SET_DIGI_CONVERT_2,4,2 ; @AC_VERB_SET_DIGI_CONVERT_2
	.comm	_snd_hda_do_register,4,2        ; @snd_hda_do_register
	.comm	_snd_hda_do_unregister,4,2      ; @snd_hda_do_unregister
	.comm	_snd_hda_generate_beep,4,2      ; @snd_hda_generate_beep
	.comm	_HDA_BEEP_MODE_ON,8,3           ; @HDA_BEEP_MODE_ON
.subsections_via_symbols
