	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i801_transaction
_i801_transaction:                      ## @i801_transaction
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_i801_check_pre
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	_FEATURE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.2:
	movq	_SMBHSTCNT_INTREN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SMBHSTCNT_START@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_SMBHSTCNT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb_p
	movl	4(%r14), %ebx
	movl	16(%r14), %edi
	movl	20(%r14), %edx
	movl	%ebx, %esi
	callq	_wait_event_timeout
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movl	$0, 4(%r14)
	jmp	LBB0_6
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_SMBHSTCNT_START@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_SMBHSTCNT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb_p
	movq	%r14, %rdi
	callq	_i801_wait_intr
	movl	%eax, %ebx
LBB0_6:
	movq	%r14, %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_i801_check_post                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FEATURE_IRQ,4,2                ## @FEATURE_IRQ
	.comm	_SMBHSTCNT_INTREN,4,2           ## @SMBHSTCNT_INTREN
	.comm	_SMBHSTCNT_START,4,2            ## @SMBHSTCNT_START
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout waiting for interrupt!\n"

	.no_dead_strip	_i801_transaction
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i801_transaction
_i801_transaction:                      ; @i801_transaction
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_i801_check_pre
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FEATURE_IRQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FEATURE_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _SMBHSTCNT_INTREN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMBHSTCNT_INTREN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, w20
Lloh6:
	adrp	x9, _SMBHSTCNT_START@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SMBHSTCNT_START@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w20, w8, w9
	mov	x0, x19
	bl	_SMBHSTCNT
	mov	x1, x0
	mov	x0, x20
	bl	_outb_p
	ldr	w20, [x19, #4]
	ldp	w0, w2, [x19, #16]
	mov	x1, x20
	bl	_wait_event_timeout
	cbnz	w0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
	str	wzr, [x19, #4]
	b	LBB0_7
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh14:
	adrp	x8, _SMBHSTCNT_START@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SMBHSTCNT_START@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w20, w8, w20
	mov	x0, x19
	bl	_SMBHSTCNT
	mov	x1, x0
	mov	x0, x20
	bl	_outb_p
	mov	x0, x19
	bl	_i801_wait_intr
	mov	x20, x0
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_i801_check_post
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FEATURE_IRQ,4,2                ; @FEATURE_IRQ
	.comm	_SMBHSTCNT_INTREN,4,2           ; @SMBHSTCNT_INTREN
	.comm	_SMBHSTCNT_START,4,2            ; @SMBHSTCNT_START
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout waiting for interrupt!\n"

	.no_dead_strip	_i801_transaction
.subsections_via_symbols
