	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ixp4xx_spkr_control
_ixp4xx_spkr_control:                   ## @ixp4xx_spkr_control
	.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
	movl	%esi, %ebx
	movl	%edi, %r14d
	movq	_beep_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_gpio_direction_output
	movq	_IXP4XX_OST_RELOAD_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ebx, %eax
	movq	_IXP4XX_OST_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_gpio_direction_output
	movl	%r14d, %edi
	callq	_gpio_direction_input
	xorl	%eax, %eax
LBB0_3:
	movq	_IXP4XX_OSRT2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_beep_lock@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_beep_lock,4,2                  ## @beep_lock
	.comm	_IXP4XX_OST_RELOAD_MASK,4,2     ## @IXP4XX_OST_RELOAD_MASK
	.comm	_IXP4XX_OST_ENABLE,4,2          ## @IXP4XX_OST_ENABLE
	.comm	_IXP4XX_OSRT2,8,3               ## @IXP4XX_OSRT2
	.no_dead_strip	_ixp4xx_spkr_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ixp4xx_spkr_control
_ixp4xx_spkr_control:                   ; @ixp4xx_spkr_control
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _beep_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _beep_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	cbz	w20, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_gpio_direction_output
Lloh2:
	adrp	x8, _IXP4XX_OST_RELOAD_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IXP4XX_OST_RELOAD_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w20, w8
Lloh5:
	adrp	x9, _IXP4XX_OST_ENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IXP4XX_OST_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w8, w9
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	bl	_gpio_direction_output
	mov	x0, x19
	bl	_gpio_direction_input
	mov	w8, #0
LBB0_3:
Lloh8:
	adrp	x9, _IXP4XX_OSRT2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IXP4XX_OSRT2@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	w8, [x9]
Lloh11:
	adrp	x0, _beep_lock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _beep_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_beep_lock,4,2                  ; @beep_lock
	.comm	_IXP4XX_OST_RELOAD_MASK,4,2     ; @IXP4XX_OST_RELOAD_MASK
	.comm	_IXP4XX_OST_ENABLE,4,2          ; @IXP4XX_OST_ENABLE
	.comm	_IXP4XX_OSRT2,8,3               ; @IXP4XX_OSRT2
	.no_dead_strip	_ixp4xx_spkr_control
.subsections_via_symbols
