	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_hda_enable_beep_device     ## -- Begin function snd_hda_enable_beep_device
	.p2align	4, 0x90
_snd_hda_enable_beep_device:            ## @snd_hda_enable_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	xorl	%r14d, %r14d
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	xorl	%eax, %eax
	testl	%esi, %esi
	setne	%al
	cmpl	%eax, (%rbx)
	je	LBB0_7
## %bb.2:
	movl	%eax, (%rbx)
	testl	%esi, %esi
	je	LBB0_5
## %bb.3:
	movq	8(%rbx), %rax
	movq	_HDA_BEEP_MODE_SWREG@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	leaq	16(%rbx), %rdi
	callq	_cancel_delayed_work
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_schedule_work
	jmp	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	callq	_turn_off_beep
	movq	8(%rbx), %rax
	movq	_HDA_BEEP_MODE_SWREG@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	addq	$16, %rbx
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_schedule_delayed_work
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDA_BEEP_MODE_SWREG,8,3        ## @HDA_BEEP_MODE_SWREG
	.comm	_HZ,4,2                         ## @HZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_hda_enable_beep_device     ; -- Begin function snd_hda_enable_beep_device
	.p2align	2
_snd_hda_enable_beep_device:            ; @snd_hda_enable_beep_device
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	cbz	x19, LBB0_2
; %bb.1:
	cmp	w1, #0
	cset	w8, ne
	ldr	w9, [x19]
	cmp	w9, w8
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
	str	w8, [x19]
	cbz	w1, LBB0_6
; %bb.4:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _HDA_BEEP_MODE_SWREG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HDA_BEEP_MODE_SWREG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	add	x0, x19, #16
	bl	_cancel_delayed_work
	add	x0, x19, #20
	bl	_schedule_work
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_turn_off_beep
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _HDA_BEEP_MODE_SWREG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HDA_BEEP_MODE_SWREG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	add	x0, x19, #16
Lloh6:
	adrp	x8, _HZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_schedule_delayed_work
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_HDA_BEEP_MODE_SWREG,8,3        ; @HDA_BEEP_MODE_SWREG
	.comm	_HZ,4,2                         ; @HZ
.subsections_via_symbols
