	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tifm_ms_card_event
_tifm_ms_card_event:                    ## @tifm_ms_card_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, %r15
	callq	_spin_lock
	movq	%r15, %rdi
	callq	_tifm_get_drvdata
	movq	%rax, %rdi
	callq	_memstick_priv
	movq	%rax, %r14
	movq	_SOCK_MS_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	leaq	16(%r15), %rdi
	movl	(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	_TIFM_MS_STAT_TOE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_ETIME@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_12:
	movq	_TIFM_MS_SYS_INTCLR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SOCK_MS_SYSTEM@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	orl	%eax, %ebx
	movq	(%r14), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	jmp	LBB0_13
LBB0_3:
	movq	_TIFM_MS_STAT_CRC@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_6
## %bb.4:
	movq	_EILSEQ@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%edx, %edx
	subl	(%rcx), %edx
	movl	%edx, (%rax)
LBB0_6:
	movq	_TIFM_MS_STAT_RDY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_CMD_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_8:
	movq	_TIFM_MS_STAT_MSINT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_CARD_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_10:
	movq	%r14, %rdi
	callq	_tifm_ms_check_status
	movl	%eax, %r12d
	movq	_TIFM_MS_SYS_INTCLR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SOCK_MS_SYSTEM@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	orl	%eax, %ebx
	movq	(%r13), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	testl	%r12d, %r12d
	jne	LBB0_13
## %bb.11:
	movq	%r14, %rdi
	callq	_tifm_ms_complete_cmd
LBB0_13:
	movq	%r15, %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_MS_STATUS,8,3             ## @SOCK_MS_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"host event: host_status %x, flags %x\n"

	.comm	_TIFM_MS_STAT_TOE,4,2           ## @TIFM_MS_STAT_TOE
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_TIFM_MS_STAT_CRC,4,2           ## @TIFM_MS_STAT_CRC
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_TIFM_MS_STAT_RDY,4,2           ## @TIFM_MS_STAT_RDY
	.comm	_CMD_READY,4,2                  ## @CMD_READY
	.comm	_TIFM_MS_STAT_MSINT,4,2         ## @TIFM_MS_STAT_MSINT
	.comm	_CARD_INT,4,2                   ## @CARD_INT
	.comm	_TIFM_MS_SYS_INTCLR,4,2         ## @TIFM_MS_SYS_INTCLR
	.comm	_SOCK_MS_SYSTEM,8,3             ## @SOCK_MS_SYSTEM
	.no_dead_strip	_tifm_ms_card_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_card_event
_tifm_ms_card_event:                    ; @tifm_ms_card_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	x9, _SOCK_MS_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SOCK_MS_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	add	x0, x19, #16
	ldr	w3, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh5:
	adrp	x9, _TIFM_MS_STAT_TOE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TIFM_MS_STAT_TOE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_4
; %bb.2:
Lloh8:
	adrp	x9, _ETIME@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ETIME@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh10:
	adrp	x8, _TIFM_MS_SYS_INTCLR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TIFM_MS_SYS_INTCLR@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x21, _SOCK_MS_SYSTEM@GOTPAGE
Lloh14:
	ldr	x21, [x21, _SOCK_MS_SYSTEM@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	orr	w0, w0, w20
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	b	LBB0_13
LBB0_4:
Lloh15:
	adrp	x9, _TIFM_MS_STAT_CRC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TIFM_MS_STAT_CRC@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_7
; %bb.5:
Lloh18:
	adrp	x9, _EILSEQ@GOTPAGE
Lloh19:
	ldr	x9, [x9, _EILSEQ@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	neg	w9, w9
	str	w9, [x8]
LBB0_7:
Lloh20:
	adrp	x8, _TIFM_MS_STAT_RDY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TIFM_MS_STAT_RDY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
Lloh23:
	adrp	x8, _CMD_READY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CMD_READY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_9:
Lloh26:
	adrp	x8, _TIFM_MS_STAT_MSINT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TIFM_MS_STAT_MSINT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
Lloh29:
	adrp	x8, _CARD_INT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CARD_INT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_11:
	mov	x0, x20
	bl	_tifm_ms_check_status
	mov	x21, x0
Lloh32:
	adrp	x8, _TIFM_MS_SYS_INTCLR@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TIFM_MS_SYS_INTCLR@GOTPAGEOFF]
Lloh34:
	ldr	w22, [x8]
	ldr	x8, [x19, #8]
Lloh35:
	adrp	x23, _SOCK_MS_SYSTEM@GOTPAGE
Lloh36:
	ldr	x23, [x23, _SOCK_MS_SYSTEM@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	orr	w0, w0, w22
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	cbnz	w21, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_tifm_ms_complete_cmd
LBB0_13:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_MS_STATUS,8,3             ; @SOCK_MS_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"host event: host_status %x, flags %x\n"

	.comm	_TIFM_MS_STAT_TOE,4,2           ; @TIFM_MS_STAT_TOE
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_TIFM_MS_STAT_CRC,4,2           ; @TIFM_MS_STAT_CRC
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_TIFM_MS_STAT_RDY,4,2           ; @TIFM_MS_STAT_RDY
	.comm	_CMD_READY,4,2                  ; @CMD_READY
	.comm	_TIFM_MS_STAT_MSINT,4,2         ; @TIFM_MS_STAT_MSINT
	.comm	_CARD_INT,4,2                   ; @CARD_INT
	.comm	_TIFM_MS_SYS_INTCLR,4,2         ; @TIFM_MS_SYS_INTCLR
	.comm	_SOCK_MS_SYSTEM,8,3             ; @SOCK_MS_SYSTEM
	.no_dead_strip	_tifm_ms_card_event
.subsections_via_symbols
