	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i801_check_post
_i801_check_post:                       ## @i801_check_post
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_SMBHSTCNT
	movl	%eax, %edi
	callq	_inb_p
	movl	%eax, %ebx
	movq	_SMBHSTCNT_KILL@GOTPCREL(%rip), %r15
	orl	(%r15), %ebx
	movq	%r14, %rdi
	callq	_SMBHSTCNT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb_p
	movl	$1, %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_SMBHSTCNT
	movl	%eax, %edi
	callq	_inb_p
	movl	(%r15), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	%r14, %rdi
	callq	_SMBHSTCNT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb_p
	movq	%r14, %rdi
	callq	_SMBHSTSTS
	movl	%eax, %edi
	callq	_inb_p
	movq	_SMBHSTSTS_HOST_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_3:
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_4
LBB0_5:
	movl	%esi, %r15d
	movq	_SMBHSTSTS_FAILED@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_6
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_8
LBB0_2:
	movq	_SMBHSTSTS_FAILED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
LBB0_4:
	movq	_STATUS_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_SMBHSTSTS
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb_p
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movq	_SMBHSTSTS_DEV_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
LBB0_10:
	movq	_SMBHSTSTS_BUS_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
LBB0_12:
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.14:
	movq	_STATUS_FLAGS@GOTPCREL(%rip), %r12
	andl	(%r12), %r15d
	movq	%r14, %rdi
	callq	_SMBHSTSTS
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_outb_p
	movq	%r14, %rdi
	callq	_SMBHSTSTS
	movl	%eax, %edi
	callq	_inb_p
	andl	(%r12), %eax
	je	LBB0_16
## %bb.15:
	movq	(%r14), %rdi
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_16
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transaction timeout\n"

L_.str.1:                               ## @.str.1
	.asciz	"Terminating the current operation\n"

	.comm	_SMBHSTCNT_KILL,4,2             ## @SMBHSTCNT_KILL
	.comm	_SMBHSTSTS_HOST_BUSY,4,2        ## @SMBHSTSTS_HOST_BUSY
	.comm	_SMBHSTSTS_FAILED,4,2           ## @SMBHSTSTS_FAILED
L_.str.2:                               ## @.str.2
	.asciz	"Failed terminating the transaction\n"

	.comm	_STATUS_FLAGS,4,2               ## @STATUS_FLAGS
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"Transaction failed\n"

	.comm	_SMBHSTSTS_DEV_ERR,4,2          ## @SMBHSTSTS_DEV_ERR
	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.4:                               ## @.str.4
	.asciz	"No response\n"

	.comm	_SMBHSTSTS_BUS_ERR,4,2          ## @SMBHSTSTS_BUS_ERR
	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.5:                               ## @.str.5
	.asciz	"Lost arbitration\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed clearing status flags at end of transaction (%02x)\n"

	.no_dead_strip	_i801_check_post
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i801_check_post
_i801_check_post:                       ; @i801_check_post
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	cbz	w2, LBB0_3
; %bb.1:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_SMBHSTCNT
	bl	_inb_p
Lloh4:
	adrp	x21, _SMBHSTCNT_KILL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SMBHSTCNT_KILL@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w20, w8, w0
	mov	x0, x19
	bl	_SMBHSTCNT
	mov	x1, x0
	mov	x0, x20
	bl	_outb_p
	mov	w0, #1
	bl	_msleep
	mov	x0, x19
	bl	_SMBHSTCNT
	bl	_inb_p
	ldr	w8, [x21]
	bic	w20, w0, w8
	mov	x0, x19
	bl	_SMBHSTCNT
	mov	x1, x0
	mov	x0, x20
	bl	_outb_p
	mov	x0, x19
	bl	_SMBHSTSTS
	bl	_inb_p
Lloh6:
	adrp	x8, _SMBHSTSTS_HOST_BUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMBHSTSTS_HOST_BUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
LBB0_2:
	ldr	x0, [x19]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_3:
	mov	x21, x1
Lloh11:
	adrp	x8, _SMBHSTSTS_FAILED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SMBHSTSTS_FAILED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_8
; %bb.4:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	x0, [x19]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_5:
Lloh19:
	adrp	x8, _SMBHSTSTS_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SMBHSTSTS_FAILED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
LBB0_6:
Lloh22:
	adrp	x8, _STATUS_FLAGS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _STATUS_FLAGS@GOTPAGEOFF]
Lloh24:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_SMBHSTSTS
	mov	x1, x0
	mov	x0, x20
	bl	_outb_p
Lloh25:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	w20, #0
LBB0_9:
Lloh28:
	adrp	x8, _SMBHSTSTS_DEV_ERR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SMBHSTSTS_DEV_ERR@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
Lloh31:
	adrp	x8, _ENXIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	x0, [x19]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
LBB0_11:
Lloh36:
	adrp	x8, _SMBHSTSTS_BUS_ERR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SMBHSTSTS_BUS_ERR@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.12:
Lloh39:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	x0, [x19]
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
LBB0_13:
	cbz	w20, LBB0_7
; %bb.14:
Lloh44:
	adrp	x22, _STATUS_FLAGS@GOTPAGE
Lloh45:
	ldr	x22, [x22, _STATUS_FLAGS@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w21, w8, w21
	mov	x0, x19
	bl	_SMBHSTSTS
	mov	x1, x0
	mov	x0, x21
	bl	_outb_p
	mov	x0, x19
	bl	_SMBHSTSTS
	bl	_inb_p
	ldr	w8, [x22]
	ands	w2, w8, w0
	b.eq	LBB0_7
; %bb.15:
	ldr	x0, [x19]
Lloh46:
	adrp	x1, l_.str.6@PAGE
Lloh47:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_warn
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transaction timeout\n"

l_.str.1:                               ; @.str.1
	.asciz	"Terminating the current operation\n"

	.comm	_SMBHSTCNT_KILL,4,2             ; @SMBHSTCNT_KILL
	.comm	_SMBHSTSTS_HOST_BUSY,4,2        ; @SMBHSTSTS_HOST_BUSY
	.comm	_SMBHSTSTS_FAILED,4,2           ; @SMBHSTSTS_FAILED
l_.str.2:                               ; @.str.2
	.asciz	"Failed terminating the transaction\n"

	.comm	_STATUS_FLAGS,4,2               ; @STATUS_FLAGS
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"Transaction failed\n"

	.comm	_SMBHSTSTS_DEV_ERR,4,2          ; @SMBHSTSTS_DEV_ERR
	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.4:                               ; @.str.4
	.asciz	"No response\n"

	.comm	_SMBHSTSTS_BUS_ERR,4,2          ; @SMBHSTSTS_BUS_ERR
	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.5:                               ; @.str.5
	.asciz	"Lost arbitration\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed clearing status flags at end of transaction (%02x)\n"

	.no_dead_strip	_i801_check_post
.subsections_via_symbols
