	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_espi_init                   ## -- Begin function t1_espi_init
	.p2align	4, 0x90
_t1_espi_init:                          ## @t1_espi_init
	.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, %r12d
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movq	_A_ESPI_TRAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_is_T2
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	$4, %edi
	callq	_V_OUT_OF_SYNC_COUNT
	movl	%eax, %ebx
	movl	$3, %edi
	callq	_V_DIP2_PARITY_ERR_THRES
	orl	%eax, %ebx
	movl	$1, %edi
	callq	_V_DIP4_THRES
	orl	%eax, %ebx
	movq	_A_ESPI_MISC_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	cmpl	$4, %r13d
	movl	$2097216, %eax                  ## imm = 0x200040
	movl	$16777344, %edi                 ## imm = 0x1000080
	cmovel	%eax, %edi
	jmp	LBB0_3
LBB0_1:
	movl	$8388864, %edi                  ## imm = 0x800100
LBB0_3:
	movq	_A_ESPI_MAXBURST1_MAXBURST2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_writel
	movq	_CHBT_MAC_PM3393@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_espi_setup_for_pm3393
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_5:
	movq	_CHBT_MAC_VSC7321@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_espi_setup_for_vsc7321
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_7:
	movl	%r13d, %esi
	movq	_CHBT_MAC_IXF1010@GOTPCREL(%rip), %rax
	movl	$-1, %r13d
	cmpl	%r12d, (%rax)
	jne	LBB0_13
## %bb.8:
	movq	_F_INTEL1010MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_espi_setup_for_ixf1010
LBB0_9:
	movq	_F_RXSTATUSENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_A_ESPI_FIFO_STATUS_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_is_T2
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%r15, %rdi
	callq	_tricn_init
	movq	_A_ESPI_MISC_CONTROL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, (%r14)
	movq	_MON_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movl	%edi, (%r14)
	movq	_F_MONITORED_DIRECTION@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, (%r14)
	cmpl	$1, 8(%r15)
	jne	LBB0_12
## %bb.11:
	movq	_F_MONITORED_INTERFACE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	%edi, (%r14)
LBB0_12:
	movq	(%rbx), %rsi
	addq	(%r15), %rsi
	callq	_writel
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_init
LBB0_13:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A_ESPI_TRAIN,8,3               ## @A_ESPI_TRAIN
	.comm	_A_ESPI_MISC_CONTROL,8,3        ## @A_ESPI_MISC_CONTROL
	.comm	_A_ESPI_MAXBURST1_MAXBURST2,8,3 ## @A_ESPI_MAXBURST1_MAXBURST2
	.comm	_CHBT_MAC_PM3393,4,2            ## @CHBT_MAC_PM3393
	.comm	_CHBT_MAC_VSC7321,4,2           ## @CHBT_MAC_VSC7321
	.comm	_CHBT_MAC_IXF1010,4,2           ## @CHBT_MAC_IXF1010
	.comm	_F_INTEL1010MODE,4,2            ## @F_INTEL1010MODE
	.comm	_F_RXSTATUSENABLE,4,2           ## @F_RXSTATUSENABLE
	.comm	_A_ESPI_FIFO_STATUS_ENABLE,8,3  ## @A_ESPI_FIFO_STATUS_ENABLE
	.comm	_MON_MASK,4,2                   ## @MON_MASK
	.comm	_F_MONITORED_DIRECTION,4,2      ## @F_MONITORED_DIRECTION
	.comm	_F_MONITORED_INTERFACE,4,2      ## @F_MONITORED_INTERFACE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t1_espi_init                   ; -- Begin function t1_espi_init
	.p2align	2
_t1_espi_init:                          ; @t1_espi_init
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _A_ESPI_TRAIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _A_ESPI_TRAIN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	mov	x0, x20
	bl	_is_T2
Lloh3:
	adrp	x24, _A_ESPI_MISC_CONTROL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _A_ESPI_MISC_CONTROL@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #4
	bl	_V_OUT_OF_SYNC_COUNT
	mov	x23, x0
	mov	w0, #3
	bl	_V_DIP2_PARITY_ERR_THRES
	orr	w23, w0, w23
	mov	w0, #1
	bl	_V_DIP4_THRES
	orr	w0, w23, w0
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writel
	mov	w8, #128
	movk	w8, #256, lsl #16
	mov	w9, #64
	movk	w9, #32, lsl #16
	cmp	w21, #4
	csel	w0, w9, w8, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #256
	movk	w0, #128, lsl #16
LBB0_3:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _A_ESPI_MAXBURST1_MAXBURST2@GOTPAGE
Lloh6:
	ldr	x9, [x9, _A_ESPI_MAXBURST1_MAXBURST2@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh8:
	adrp	x8, _CHBT_MAC_PM3393@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHBT_MAC_PM3393@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_espi_setup_for_pm3393
	mov	w22, #0
	b	LBB0_9
LBB0_5:
Lloh11:
	adrp	x8, _CHBT_MAC_VSC7321@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CHBT_MAC_VSC7321@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_espi_setup_for_vsc7321
	mov	w22, #0
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x8, _CHBT_MAC_IXF1010@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CHBT_MAC_IXF1010@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_14
; %bb.8:
Lloh17:
	adrp	x8, _F_INTEL1010MODE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _F_INTEL1010MODE@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_espi_setup_for_ixf1010
LBB0_9:
Lloh20:
	adrp	x8, _F_RXSTATUSENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _F_RXSTATUSENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w0, w8, w22
	ldr	x8, [x20]
Lloh23:
	adrp	x9, _A_ESPI_FIFO_STATUS_ENABLE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _A_ESPI_FIFO_STATUS_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x20
	bl	_is_T2
	cbz	x0, LBB0_13
; %bb.10:
	mov	x0, x20
	bl	_tricn_init
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	str	w0, [x19]
Lloh26:
	adrp	x8, _MON_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MON_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh29:
	adrp	x9, _F_MONITORED_DIRECTION@GOTPAGE
Lloh30:
	ldr	x9, [x9, _F_MONITORED_DIRECTION@GOTPAGEOFF]
	str	w8, [x19]
Lloh31:
	ldr	w9, [x9]
	orr	w0, w9, w8
	str	w0, [x19]
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.11:
Lloh32:
	adrp	x8, _F_MONITORED_INTERFACE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _F_MONITORED_INTERFACE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	orr	w0, w8, w0
	str	w0, [x19]
LBB0_12:
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writel
	add	x0, x19, #4
	bl	_spin_lock_init
	mov	w0, #0
LBB0_13:
	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
LBB0_14:
	mov	w0, #-1
	b	LBB0_13
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_A_ESPI_TRAIN,8,3               ; @A_ESPI_TRAIN
	.comm	_A_ESPI_MISC_CONTROL,8,3        ; @A_ESPI_MISC_CONTROL
	.comm	_A_ESPI_MAXBURST1_MAXBURST2,8,3 ; @A_ESPI_MAXBURST1_MAXBURST2
	.comm	_CHBT_MAC_PM3393,4,2            ; @CHBT_MAC_PM3393
	.comm	_CHBT_MAC_VSC7321,4,2           ; @CHBT_MAC_VSC7321
	.comm	_CHBT_MAC_IXF1010,4,2           ; @CHBT_MAC_IXF1010
	.comm	_F_INTEL1010MODE,4,2            ; @F_INTEL1010MODE
	.comm	_F_RXSTATUSENABLE,4,2           ; @F_RXSTATUSENABLE
	.comm	_A_ESPI_FIFO_STATUS_ENABLE,8,3  ; @A_ESPI_FIFO_STATUS_ENABLE
	.comm	_MON_MASK,4,2                   ; @MON_MASK
	.comm	_F_MONITORED_DIRECTION,4,2      ; @F_MONITORED_DIRECTION
	.comm	_F_MONITORED_INTERFACE,4,2      ; @F_MONITORED_INTERFACE
.subsections_via_symbols
