	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mantis_hif_write_wait
_mantis_hif_write_wait:                 ## @mantis_hif_write_wait
	.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
	movq	8(%rdi), %r15
	movl	(%rdi), %r14d
	movq	_MANTIS_GPIF_WRACK@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	andl	(%r15), %ebx
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	$0, %r14d
	addl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r15), %ecx
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_2:
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r13), %eax
	notl	%eax
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	andl	%eax, (%r15)
	movl	$101, %r13d
	movq	_MANTIS_GPIF_STATUS@GOTPCREL(%rip), %r12
	movq	_MANTIS_SBUF_OPDONE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %edi
	callq	_mmread
	movl	%eax, %ebx
	andl	(%r15), %ebx
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	decl	%r13d
	jne	LBB0_3
## %bb.5:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ecx
	leaq	L_.str.2(%rip), %rdx
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_6:
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_GPIF_WRACK,4,2          ## @MANTIS_GPIF_WRACK
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Adapter(%d) Slot(0): Write ACK timed out !"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Write Acknowledged"

	.comm	_MANTIS_GPIF_STATUS,4,2         ## @MANTIS_GPIF_STATUS
	.comm	_MANTIS_SBUF_OPDONE,4,2         ## @MANTIS_SBUF_OPDONE
L_.str.2:                               ## @.str.2
	.asciz	"Adapter(%d) Slot(0): Write operation timed out!"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.3:                               ## @.str.3
	.asciz	"HIF Write success"

	.no_dead_strip	_mantis_hif_write_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mantis_hif_write_wait
_mantis_hif_write_wait:                 ; @mantis_hif_write_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	ldr	x21, [x0, #8]
	ldr	w19, [x0]
	ldr	w8, [x21]
Lloh0:
	adrp	x23, _MANTIS_GPIF_WRACK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MANTIS_GPIF_WRACK@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w20, w9, w8
	mov	w0, #500
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_wait_event_timeout
Lloh2:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x20, _MANTIS_ERROR@GOTPAGE
Lloh6:
	ldr	x20, [x20, _MANTIS_ERROR@GOTPAGEOFF]
	cmn	w0, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x20]
	ldr	w8, [x21, #4]
	str	x8, [sp]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh9:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_3
LBB0_2:
	mov	w19, #0
LBB0_3:
Lloh12:
	adrp	x22, _MANTIS_DEBUG@GOTPAGE
Lloh13:
	ldr	x22, [x22, _MANTIS_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w25, #0
	ldr	w8, [x23]
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
	mov	w23, #101
Lloh16:
	adrp	x24, _MANTIS_GPIF_STATUS@GOTPAGE
Lloh17:
	ldr	x24, [x24, _MANTIS_GPIF_STATUS@GOTPAGEOFF]
Lloh18:
	adrp	x26, _MANTIS_SBUF_OPDONE@GOTPAGE
Lloh19:
	ldr	x26, [x26, _MANTIS_SBUF_OPDONE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	w25, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	bl	_mmread
	ldr	w8, [x26]
	and	w25, w8, w0
	mov	w0, #500
	bl	_udelay
	subs	w23, w23, #1
	b.ne	LBB0_4
; %bb.6:
	ldr	w0, [x20]
	ldr	w8, [x21, #4]
	str	x8, [sp]
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh22:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_7:
	ldr	w0, [x22]
Lloh25:
	adrp	x2, l_.str.3@PAGE
Lloh26:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_GPIF_WRACK,4,2          ; @MANTIS_GPIF_WRACK
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Adapter(%d) Slot(0): Write ACK timed out !"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Write Acknowledged"

	.comm	_MANTIS_GPIF_STATUS,4,2         ; @MANTIS_GPIF_STATUS
	.comm	_MANTIS_SBUF_OPDONE,4,2         ; @MANTIS_SBUF_OPDONE
l_.str.2:                               ; @.str.2
	.asciz	"Adapter(%d) Slot(0): Write operation timed out!"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.3:                               ; @.str.3
	.asciz	"HIF Write success"

	.no_dead_strip	_mantis_hif_write_wait
.subsections_via_symbols
