	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_wss_thinkpad_twiddle
_snd_wss_thinkpad_twiddle:              ## @snd_wss_thinkpad_twiddle
	.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
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	_AD1848_THINKPAD_CTL_PORT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$28, %edi
	callq	_outb
	movq	_AD1848_THINKPAD_CTL_PORT2@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_inb
	movq	_AD1848_THINKPAD_CS4248_ENABLE_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, %ecx
	orl	%eax, %ecx
	notl	%edi
	andl	%eax, %edi
	testl	%ebx, %ebx
	cmovnel	%ecx, %edi
	movl	(%r14), %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_outb                           ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AD1848_THINKPAD_CTL_PORT1,4,2  ## @AD1848_THINKPAD_CTL_PORT1
	.comm	_AD1848_THINKPAD_CTL_PORT2,4,2  ## @AD1848_THINKPAD_CTL_PORT2
	.comm	_AD1848_THINKPAD_CS4248_ENABLE_BIT,4,2 ## @AD1848_THINKPAD_CS4248_ENABLE_BIT
	.no_dead_strip	_snd_wss_thinkpad_twiddle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_wss_thinkpad_twiddle
_snd_wss_thinkpad_twiddle:              ; @snd_wss_thinkpad_twiddle
	.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	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x8, _AD1848_THINKPAD_CTL_PORT1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AD1848_THINKPAD_CTL_PORT1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #28
	bl	_outb
Lloh3:
	adrp	x20, _AD1848_THINKPAD_CTL_PORT2@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AD1848_THINKPAD_CTL_PORT2@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_inb
Lloh5:
	adrp	x8, _AD1848_THINKPAD_CS4248_ENABLE_BIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AD1848_THINKPAD_CS4248_ENABLE_BIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w9, w8, w0
	bic	w8, w0, w8
	cmp	w19, #0
	csel	w0, w8, w9, eq
	ldr	w1, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_outb
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AD1848_THINKPAD_CTL_PORT1,4,2  ; @AD1848_THINKPAD_CTL_PORT1
	.comm	_AD1848_THINKPAD_CTL_PORT2,4,2  ; @AD1848_THINKPAD_CTL_PORT2
	.comm	_AD1848_THINKPAD_CS4248_ENABLE_BIT,4,2 ; @AD1848_THINKPAD_CS4248_ENABLE_BIT
	.no_dead_strip	_snd_wss_thinkpad_twiddle
.subsections_via_symbols
