	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsp_opc_tag_enable
_fsp_opc_tag_enable:                    ## @fsp_opc_tag_enable
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_FSP_REG_OPC_QDOWN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	callq	_fsp_reg_read
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	-36(%rbp), %eax
	movq	_FSP_BIT_EN_OPC_TAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %ecx
	orl	%eax, %ecx
	notl	%ebx
	andl	%eax, %ebx
	testl	%r15d, %r15d
	cmovnel	%ecx, %ebx
	xorl	%r15d, %r15d
	cmpl	%eax, %ebx
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_fsp_reg_write_enable
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_fsp_reg_write
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_fsp_reg_write_enable
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	callq	_psmouse_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FSP_REG_OPC_QDOWN,4,2          ## @FSP_REG_OPC_QDOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable get OPC state.\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_FSP_BIT_EN_OPC_TAG,4,2         ## @FSP_BIT_EN_OPC_TAG
L_.str.1:                               ## @.str.1
	.asciz	"Unable to enable OPC tag.\n"

	.no_dead_strip	_fsp_opc_tag_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsp_opc_tag_enable
_fsp_opc_tag_enable:                    ; @fsp_opc_tag_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _FSP_REG_OPC_QDOWN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FSP_REG_OPC_QDOWN@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_fsp_reg_read
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _FSP_BIT_EN_OPC_TAG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FSP_BIT_EN_OPC_TAG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w9, w8, w9
	cmp	w20, #0
	csel	w20, w9, w10, eq
	cmp	w20, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_fsp_reg_write_enable
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_fsp_reg_write
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_fsp_reg_write_enable
	cbz	w20, LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_psmouse_err
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FSP_REG_OPC_QDOWN,4,2          ; @FSP_REG_OPC_QDOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable get OPC state.\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_FSP_BIT_EN_OPC_TAG,4,2         ; @FSP_BIT_EN_OPC_TAG
l_.str.1:                               ; @.str.1
	.asciz	"Unable to enable OPC tag.\n"

	.no_dead_strip	_fsp_opc_tag_enable
.subsections_via_symbols
