	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_espi_get_mon_t204           ## -- Begin function t1_espi_get_mon_t204
	.p2align	4, 0x90
_t1_espi_get_mon_t204:                  ## @t1_espi_get_mon_t204
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	16(%rdi), %r14
	movslq	8(%rdi), %r15
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.3:
	callq	_spin_lock
	jmp	LBB0_4
LBB0_1:
	callq	_spin_trylock
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	movq	_MON_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	andl	%edi, %edx
	movq	_F_MONITORED_DIRECTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %edx
	je	LBB0_6
## %bb.5:
	notl	%eax
	andl	%eax, %edi
	orl	%ecx, %edi
	movl	%edi, (%r14)
	movq	_A_ESPI_MISC_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel
LBB0_6:
	testl	%r15d, %r15d
	movq	%r14, %rax
	jle	LBB0_10
## %bb.7:
	movq	_A_ESPI_SCH_TOKEN3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%r12), %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_readl
	movl	%eax, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$1, %r15d
	je	LBB0_10
## %bb.8:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %r14
	movq	%r13, %r15
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_V_MONITORED_PORT_NUM
	orl	%eax, %r13d
	movq	_A_ESPI_MISC_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%r13d, %edi
	movq	%r15, %r13
	movq	%r14, %r15
	movq	_A_ESPI_SCH_TOKEN3@GOTPCREL(%rip), %r14
	callq	_writel
	movq	(%r14), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movl	%eax, (%r13,%rbx,4)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_9
LBB0_10:
	movl	(%rax), %edi
	movq	_A_ESPI_MISC_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	xorl	%eax, %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$-1, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MON_MASK,4,2                   ## @MON_MASK
	.comm	_F_MONITORED_DIRECTION,4,2      ## @F_MONITORED_DIRECTION
	.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_t204           ; -- Begin function t1_espi_get_mon_t204
	.p2align	2
_t1_espi_get_mon_t204:                  ; @t1_espi_get_mon_t204
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	ldr	x23, [x0, #16]
	ldrsw	x24, [x0, #8]
	add	x19, x23, #4
	mov	x0, x19
	cbz	x2, LBB0_2
; %bb.1:
	bl	_spin_lock
	b	LBB0_3
LBB0_2:
	bl	_spin_trylock
	cbz	w0, LBB0_11
LBB0_3:
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _MON_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MON_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w11, w9, w8
Lloh3:
	adrp	x10, _F_MONITORED_DIRECTION@GOTPAGE
Lloh4:
	ldr	x10, [x10, _F_MONITORED_DIRECTION@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x25, _A_ESPI_MISC_CONTROL@GOTPAGE
Lloh7:
	ldr	x25, [x25, _A_ESPI_MISC_CONTROL@GOTPAGEOFF]
	cmp	w11, w10
	b.eq	LBB0_5
; %bb.4:
	bic	w8, w8, w9
	orr	w0, w8, w10
	str	w0, [x23]
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
LBB0_5:
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.6:
	ldr	x8, [x20]
Lloh8:
	adrp	x26, _A_ESPI_SCH_TOKEN3@GOTPAGE
Lloh9:
	ldr	x26, [x26, _A_ESPI_SCH_TOKEN3@GOTPAGEOFF]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	str	w0, [x21]
	cmp	w24, #1
	b.eq	LBB0_9
; %bb.7:
	mov	w22, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w27, [x23]
	mov	x0, x22
	bl	_V_MONITORED_PORT_NUM
	orr	w0, w0, w27
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	str	w0, [x21, x22, lsl #2]
	add	x22, x22, #1
	cmp	x24, x22
	b.ne	LBB0_8
LBB0_9:
	ldr	w0, [x23]
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_spin_unlock
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	w0, #-1
	b	LBB0_10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MON_MASK,4,2                   ; @MON_MASK
	.comm	_F_MONITORED_DIRECTION,4,2      ; @F_MONITORED_DIRECTION
	.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
