	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_espi_get_mon                ## -- Begin function t1_espi_get_mon
	.p2align	4, 0x90
_t1_espi_get_mon:                       ## @t1_espi_get_mon
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	callq	_is_T2
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	shrl	$2, %ebx
	andl	$15, %ebx
	movl	%ebx, %edi
	callq	_V_MONITORED_PORT_NUM
	movl	%eax, %ebx
	leaq	4(%r12), %rdi
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.3:
	movq	%rdi, %r13
	callq	_spin_lock
	jmp	LBB0_4
LBB0_2:
	movq	%rdi, %r13
	callq	_spin_trylock
	testl	%eax, %eax
	je	LBB0_8
LBB0_4:
	movl	(%r12), %edi
	movq	_MON_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	andl	%edi, %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_5
## %bb.6:
	movq	_A_ESPI_SCH_TOKEN3@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %r15d
	jmp	LBB0_7
LBB0_5:
	notl	%eax
	andl	%eax, %edi
	orl	%ebx, %edi
	movq	_A_ESPI_MISC_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_A_ESPI_SCH_TOKEN3@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movl	%eax, %r15d
	movl	(%r12), %edi
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
LBB0_7:
	movq	%r13, %rdi
	callq	_spin_unlock
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MON_MASK,4,2                   ## @MON_MASK
	.comm	_A_ESPI_MISC_CONTROL,8,3        ## @A_ESPI_MISC_CONTROL
	.comm	_A_ESPI_SCH_TOKEN3,8,3          ## @A_ESPI_SCH_TOKEN3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_espi_get_mon                ; -- Begin function t1_espi_get_mon
	.p2align	2
_t1_espi_get_mon:                       ; @t1_espi_get_mon
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x23, [x0, #8]
	bl	_is_T2
	cbz	w0, LBB0_6
; %bb.1:
	ubfx	w0, w19, #2, #4
	bl	_V_MONITORED_PORT_NUM
	mov	x21, x0
	add	x19, x23, #4
	mov	x0, x19
	cbz	w22, LBB0_3
; %bb.2:
	bl	_spin_lock
	b	LBB0_4
LBB0_3:
	bl	_spin_trylock
	cbz	w0, LBB0_6
LBB0_4:
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _MON_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MON_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w10, w9, w8
	cmp	w21, w10
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _A_ESPI_SCH_TOKEN3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _A_ESPI_SCH_TOKEN3@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	b	LBB0_8
LBB0_6:
	mov	w21, #0
	b	LBB0_9
LBB0_7:
	bic	w8, w8, w9
	orr	w0, w8, w21
	ldr	x8, [x20]
Lloh6:
	adrp	x22, _A_ESPI_MISC_CONTROL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _A_ESPI_MISC_CONTROL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _A_ESPI_SCH_TOKEN3@GOTPAGE
Lloh9:
	ldr	x9, [x9, _A_ESPI_SCH_TOKEN3@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	w0, [x23]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock
LBB0_9:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MON_MASK,4,2                   ; @MON_MASK
	.comm	_A_ESPI_MISC_CONTROL,8,3        ; @A_ESPI_MISC_CONTROL
	.comm	_A_ESPI_SCH_TOKEN3,8,3          ; @A_ESPI_SCH_TOKEN3
.subsections_via_symbols
