	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_hif_read_iom            ## -- Begin function mantis_hif_read_iom
	.p2align	4, 0x90
_mantis_hif_read_iom:                   ## @mantis_hif_read_iom
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_MANTIS_GPIF_PCMCIAIOM@GOTPCREL(%rip), %rax
	movq	_MANTIS_HIF_STATUS@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	_MANTIS_GPIF_BRADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_mmwrite
	movq	_MANTIS_GPIF_BRBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_mmwrite
	movl	$20, %edi
	callq	_udelay
	movq	_MANTIS_GPIF_HIFRDWRN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_MANTIS_GPIF_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_mmwrite
	movq	%r14, %rdi
	callq	_mantis_hif_sbuf_opdone_wait
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %ecx
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movq	_MANTIS_GPIF_DIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mmread
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rdx
	movl	$1, %esi
	movl	%eax, %ecx
	callq	_dprintk
	movl	$50, %edi
	callq	_udelay
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adapter(%d) Slot(0): Request HIF I/O Read"

	.comm	_MANTIS_GPIF_PCMCIAREG,4,2      ## @MANTIS_GPIF_PCMCIAREG
	.comm	_MANTIS_GPIF_PCMCIAIOM,4,2      ## @MANTIS_GPIF_PCMCIAIOM
	.comm	_MANTIS_HIF_STATUS,4,2          ## @MANTIS_HIF_STATUS
	.comm	_MANTIS_GPIF_BRADDR,4,2         ## @MANTIS_GPIF_BRADDR
	.comm	_MANTIS_GPIF_BRBYTES,4,2        ## @MANTIS_GPIF_BRBYTES
	.comm	_MANTIS_GPIF_HIFRDWRN,4,2       ## @MANTIS_GPIF_HIFRDWRN
	.comm	_MANTIS_GPIF_ADDR,4,2           ## @MANTIS_GPIF_ADDR
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Adapter(%d) Slot(0): HIF Smart Buffer operation failed"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_MANTIS_GPIF_DIN,4,2            ## @MANTIS_GPIF_DIN
L_.str.2:                               ## @.str.2
	.asciz	"I/O Read: 0x%02x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_hif_read_iom            ; -- Begin function mantis_hif_read_iom
	.p2align	2
_mantis_hif_read_iom:                   ; @mantis_hif_read_iom
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x21, _MANTIS_DEBUG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MANTIS_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w3, [x22]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	x0, x19
	bl	_mutex_lock
Lloh4:
	adrp	x8, _MANTIS_GPIF_PCMCIAIOM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MANTIS_GPIF_PCMCIAIOM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _MANTIS_HIF_STATUS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MANTIS_HIF_STATUS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w8, w20
	orr	w20, w8, w9
Lloh10:
	adrp	x8, _MANTIS_GPIF_BRADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MANTIS_GPIF_BRADDR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mmwrite
Lloh13:
	adrp	x8, _MANTIS_GPIF_BRBYTES@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MANTIS_GPIF_BRBYTES@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_mmwrite
	mov	w0, #20
	bl	_udelay
Lloh16:
	adrp	x8, _MANTIS_GPIF_HIFRDWRN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MANTIS_GPIF_HIFRDWRN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w0, w8, w20
Lloh19:
	adrp	x8, _MANTIS_GPIF_ADDR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MANTIS_GPIF_ADDR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_mmwrite
	mov	x0, x19
	bl	_mantis_hif_sbuf_opdone_wait
	cbz	x0, LBB0_2
; %bb.1:
Lloh22:
	adrp	x8, _MANTIS_ERROR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MANTIS_ERROR@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w3, [x22]
Lloh25:
	adrp	x2, l_.str.1@PAGE
Lloh26:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	x0, x19
	bl	_mutex_unlock
Lloh27:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_3
LBB0_2:
Lloh30:
	adrp	x8, _MANTIS_GPIF_DIN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MANTIS_GPIF_DIN@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_mmread
	mov	x20, x0
	ldr	w0, [x21]
Lloh33:
	adrp	x2, l_.str.2@PAGE
Lloh34:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #1
	mov	x3, x20
	bl	_dprintk
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_mutex_unlock
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adapter(%d) Slot(0): Request HIF I/O Read"

	.comm	_MANTIS_GPIF_PCMCIAREG,4,2      ; @MANTIS_GPIF_PCMCIAREG
	.comm	_MANTIS_GPIF_PCMCIAIOM,4,2      ; @MANTIS_GPIF_PCMCIAIOM
	.comm	_MANTIS_HIF_STATUS,4,2          ; @MANTIS_HIF_STATUS
	.comm	_MANTIS_GPIF_BRADDR,4,2         ; @MANTIS_GPIF_BRADDR
	.comm	_MANTIS_GPIF_BRBYTES,4,2        ; @MANTIS_GPIF_BRBYTES
	.comm	_MANTIS_GPIF_HIFRDWRN,4,2       ; @MANTIS_GPIF_HIFRDWRN
	.comm	_MANTIS_GPIF_ADDR,4,2           ; @MANTIS_GPIF_ADDR
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Adapter(%d) Slot(0): HIF Smart Buffer operation failed"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_MANTIS_GPIF_DIN,4,2            ; @MANTIS_GPIF_DIN
l_.str.2:                               ; @.str.2
	.asciz	"I/O Read: 0x%02x"

.subsections_via_symbols
