	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tifm_ms_data_event
_tifm_ms_data_event:                    ## @tifm_ms_data_event
	.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
	callq	_spin_lock
	movq	%rbx, %rdi
	callq	_tifm_get_drvdata
	movq	%rax, %rdi
	callq	_memstick_priv
	movq	%rax, %r14
	movq	_SOCK_DMA_FIFO_STATUS@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r15d
	movq	_SOCK_MS_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	leaq	16(%rbx), %rdi
	movl	(%r14), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	cmpq	$0, 16(%r14)
	je	LBB0_1
## %bb.2:
	movq	8(%r14), %rax
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	%r15d, %ecx
	andl	$1, %ecx
	je	LBB0_5
## %bb.4:
	movq	_FIFO_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_tifm_ms_check_status
	movl	%eax, %r12d
	movq	8(%r14), %rax
LBB0_5:
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movq	_TIFM_FIFO_MORE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_tifm_ms_transfer_data
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_FIFO_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_tifm_ms_check_status
	movl	%eax, %r12d
	jmp	LBB0_9
LBB0_1:
	movl	$1, %r12d
LBB0_9:
	movq	(%r13), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
	testl	%r12d, %r12d
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_tifm_ms_complete_cmd
LBB0_11:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_DMA_FIFO_STATUS,8,3       ## @SOCK_DMA_FIFO_STATUS
	.comm	_SOCK_MS_STATUS,8,3             ## @SOCK_MS_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data event: fifo_status %x, host_status %x, flags %x\n"

	.comm	_FIFO_READY,4,2                 ## @FIFO_READY
	.comm	_TIFM_FIFO_MORE,4,2             ## @TIFM_FIFO_MORE
	.no_dead_strip	_tifm_ms_data_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tifm_ms_data_event
_tifm_ms_data_event:                    ; @tifm_ms_data_event
	.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
	bl	_spin_lock
	mov	x0, x19
	bl	_tifm_get_drvdata
	bl	_memstick_priv
	mov	x20, x0
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x23, _SOCK_DMA_FIFO_STATUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SOCK_DMA_FIFO_STATUS@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _SOCK_MS_STATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SOCK_MS_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x3, x0
	add	x0, x19, #16
	ldr	w4, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x20, #8]
	and	w9, w21, #0x1
	cmp	x8, #0
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_4
; %bb.2:
	mov	w22, #1
	cbnz	x8, LBB0_8
	b	LBB0_5
LBB0_3:
	mov	w22, #1
	b	LBB0_8
LBB0_4:
Lloh7:
	adrp	x8, _FIFO_READY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FIFO_READY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	bl	_tifm_ms_check_status
	mov	x22, x0
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_8
LBB0_5:
Lloh10:
	adrp	x8, _TIFM_FIFO_MORE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TIFM_FIFO_MORE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_tifm_ms_transfer_data
	cbnz	w0, LBB0_8
; %bb.7:
Lloh13:
	adrp	x8, _FIFO_READY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FIFO_READY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	bl	_tifm_ms_check_status
	mov	x22, x0
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	cbnz	w22, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_tifm_ms_complete_cmd
LBB0_10:
	mov	x0, x19
	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
	b	_spin_unlock
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_DMA_FIFO_STATUS,8,3       ; @SOCK_DMA_FIFO_STATUS
	.comm	_SOCK_MS_STATUS,8,3             ; @SOCK_MS_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data event: fifo_status %x, host_status %x, flags %x\n"

	.comm	_FIFO_READY,4,2                 ; @FIFO_READY
	.comm	_TIFM_FIFO_MORE,4,2             ; @TIFM_FIFO_MORE
	.no_dead_strip	_tifm_ms_data_event
.subsections_via_symbols
