	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tifm_ms_complete_cmd
_tifm_ms_complete_cmd:                  ## @tifm_ms_complete_cmd
	.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	%rdi, %rbx
	movq	24(%rdi), %r15
	movq	%r15, %rdi
	callq	_tifm_get_drvdata
	movq	%rax, %r14
	leaq	16(%rbx), %rdi
	callq	_del_timer
	movq	_SOCK_MS_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	(%rbx), %rcx
	movl	%eax, %edx
	andl	$1, %edx
	andl	$14, %eax
	shll	$4, %eax
	orl	%edx, %eax
	movl	%eax, (%rcx)
	movq	_TIFM_FIFO_INT_SETALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DMA_FIFO_INT_ENABLE_CLEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	movq	_TIFM_DMA_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DMA_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_writel
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.1:
	movq	(%rbx), %rsi
	movq	8(%rsi), %rax
	addq	$16, %rsi
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_tifm_unmap_sg
LBB0_5:
	movq	_TIFM_CTRL_LED@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	notl	%r12d
	movq	_SOCK_CONTROL@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	andl	%eax, %r12d
	movq	(%r13), %rsi
	addq	8(%r15), %rsi
	movl	%r12d, %edi
	callq	_writel
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_memstick_next_req
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_tifm_ms_issue_cmd
	testq	%rax, %rax
	jne	LBB0_6
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_MS_STATUS,8,3             ## @SOCK_MS_STATUS
	.comm	_TIFM_FIFO_INT_SETALL,4,2       ## @TIFM_FIFO_INT_SETALL
	.comm	_SOCK_DMA_FIFO_INT_ENABLE_CLEAR,8,3 ## @SOCK_DMA_FIFO_INT_ENABLE_CLEAR
	.comm	_TIFM_DMA_RESET,4,2             ## @TIFM_DMA_RESET
	.comm	_SOCK_DMA_CONTROL,8,3           ## @SOCK_DMA_CONTROL
	.comm	_READ,8,3                       ## @READ
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.comm	_TIFM_CTRL_LED,4,2              ## @TIFM_CTRL_LED
	.comm	_SOCK_CONTROL,8,3               ## @SOCK_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TPC complete\n"

	.no_dead_strip	_tifm_ms_complete_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tifm_ms_complete_cmd
_tifm_ms_complete_cmd:                  ; @tifm_ms_complete_cmd
	.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	x19, x0
	ldr	x21, [x0, #24]
	mov	x0, x21
	bl	_tifm_get_drvdata
	mov	x20, x0
	add	x0, x19, #16
	bl	_del_timer
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _SOCK_MS_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOCK_MS_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	lsr	w8, w0, #1
	ldr	x9, [x19]
	and	w10, w0, #0x1
	bfi	w10, w8, #5, #3
	str	w10, [x9]
Lloh3:
	adrp	x8, _TIFM_FIFO_INT_SETALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIFM_FIFO_INT_SETALL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
Lloh6:
	adrp	x9, _SOCK_DMA_FIFO_INT_ENABLE_CLEAR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SOCK_DMA_FIFO_INT_ENABLE_CLEAR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh9:
	adrp	x8, _TIFM_DMA_RESET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TIFM_DMA_RESET@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
Lloh12:
	adrp	x9, _SOCK_DMA_CONTROL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SOCK_DMA_CONTROL@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	add	x1, x8, #16
	ldr	x8, [x8, #8]
Lloh15:
	adrp	x9, _READ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _READ@GOTPAGEOFF]
Lloh17:
	adrp	x10, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
Lloh20:
	adrp	x11, _PCI_DMA_TODEVICE@GOTPAGE
Lloh21:
	ldr	x11, [x11, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w3, [x8]
	mov	x0, x21
	mov	w2, #1
	bl	_tifm_unmap_sg
LBB0_2:
Lloh22:
	adrp	x8, _TIFM_CTRL_LED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TIFM_CTRL_LED@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
	ldr	x8, [x21, #8]
Lloh25:
	adrp	x23, _SOCK_CONTROL@GOTPAGE
Lloh26:
	ldr	x23, [x23, _SOCK_CONTROL@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	bic	w0, w0, w22
	ldr	x8, [x21, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_memstick_next_req
	cbnz	w0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_tifm_ms_issue_cmd
	cbnz	x0, LBB0_3
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_MS_STATUS,8,3             ; @SOCK_MS_STATUS
	.comm	_TIFM_FIFO_INT_SETALL,4,2       ; @TIFM_FIFO_INT_SETALL
	.comm	_SOCK_DMA_FIFO_INT_ENABLE_CLEAR,8,3 ; @SOCK_DMA_FIFO_INT_ENABLE_CLEAR
	.comm	_TIFM_DMA_RESET,4,2             ; @TIFM_DMA_RESET
	.comm	_SOCK_DMA_CONTROL,8,3           ; @SOCK_DMA_CONTROL
	.comm	_READ,8,3                       ; @READ
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.comm	_TIFM_CTRL_LED,4,2              ; @TIFM_CTRL_LED
	.comm	_SOCK_CONTROL,8,3               ; @SOCK_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TPC complete\n"

	.no_dead_strip	_tifm_ms_complete_cmd
.subsections_via_symbols
