	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msb_init_card
_msb_init_card:                         ## @msb_init_card
	.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
	movq	%rdi, %rbx
	callq	_memstick_get_drvdata
	movq	%rax, %r14
	movq	8(%rbx), %r12
	movl	$0, (%rax)
	movq	(%rbx), %rax
	movq	_MEMSTICK_CLASS_ROM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	$1, 4(%r14)
LBB0_2:
	movl	$-1, 8(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_msb_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
## %bb.3:
	movq	_MEMSTICK_CAP_PAR4@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_msb_switch_to_parallel
LBB0_5:
	movl	$20, 12(%r14)
	movq	%r14, %rdi
	callq	_msb_read_boot_blocks
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_28
LBB0_8:
	movq	48(%r14), %rbx
	movl	(%rbx), %eax
	movl	%eax, 16(%r14)
	movl	4(%rbx), %esi
	movl	%esi, 12(%r14)
	movl	8(%rbx), %edi
	addl	%edi, %edi
	movl	%edi, 20(%r14)
	imull	%esi, %edi
	movl	%edi, 24(%r14)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jle	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_28
LBB0_10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movl	%eax, 40(%r14)
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	16(%r14), %esi
	movq	_chs_table@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r8), %edx
	testl	%edx, %edx
	je	LBB0_17
## %bb.13:
	movl	24(%r14), %ecx
	imull	%esi, %ecx
	sarl	$20, %ecx
	leaq	16(%r8), %rax
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, %edx
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rdi
	movl	(%rax), %edx
	addq	$16, %rax
	testl	%edx, %edx
	jne	LBB0_14
	jmp	LBB0_17
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_15:
	movl	%edi, %eax
	shlq	$4, %rax
	movl	12(%r8,%rax), %ecx
	movl	%ecx, 36(%r14)
	movl	8(%r8,%rax), %ecx
	movl	%ecx, 32(%r14)
	movl	4(%r8,%rax), %eax
	movl	%eax, 28(%r14)
LBB0_17:
	cmpl	$1, 12(%rbx)
	jne	LBB0_19
## %bb.18:
	movl	(%r15), %eax
	orl	%eax, (%r14)
LBB0_19:
	testb	$3, 16(%rbx)
	je	LBB0_21
## %bb.20:
	movl	$1, 4(%r14)
LBB0_21:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movl	20(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movl	12(%r14), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movl	(%r15), %eax
	xorl	%esi, %esi
	andl	(%r14), %eax
	setne	%sil
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movl	4(%r14), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movq	%r14, %rdi
	callq	_msb_cache_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
## %bb.22:
	movq	%r14, %rdi
	callq	_msb_ftl_initialize
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_23
LBB0_28:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_msb_read_bad_block_table
	testl	%eax, %eax
	je	LBB0_26
## %bb.24:
	movl	%eax, %ebx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_28
## %bb.25:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_msb_read_bad_block_table
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
LBB0_26:
	movq	%r14, %rdi
	callq	_msb_ftl_scan
	movl	$0, %ebx
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %r14d
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_err
	movl	%r14d, %ebx
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMSTICK_CLASS_ROM,8,3         ## @MEMSTICK_CLASS_ROM
	.comm	_MEMSTICK_CAP_PAR4,4,2          ## @MEMSTICK_CAP_PAR4
	.comm	_EIO,4,2                        ## @EIO
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device page %d size isn't supported"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_chs_table,8,3                  ## @chs_table
L_.str.1:                               ## @.str.1
	.asciz	"Total block count = %d"

L_.str.2:                               ## @.str.2
	.asciz	"Each block consists of %d pages"

L_.str.3:                               ## @.str.3
	.asciz	"Page size = %d bytes"

L_.str.4:                               ## @.str.4
	.asciz	"Parallel mode supported: %d"

L_.str.5:                               ## @.str.5
	.asciz	"Read only: %d"

L_.str.6:                               ## @.str.6
	.asciz	"failed to read bad block table from primary boot block, trying from backup"

L_.str.7:                               ## @.str.7
	.asciz	"Scan of media failed"

	.no_dead_strip	_msb_init_card
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msb_init_card
_msb_init_card:                         ; @msb_init_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_memstick_get_drvdata
	mov	x19, x0
	str	wzr, [x0]
	ldp	x8, x21, [x20]
Lloh0:
	adrp	x9, _MEMSTICK_CLASS_ROM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEMSTICK_CLASS_ROM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_2:
	mov	w8, #-1
	str	w8, [x19, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_msb_reset
	mov	x20, x0
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	w8, [x21]
Lloh3:
	adrp	x20, _MEMSTICK_CAP_PAR4@GOTPAGE
Lloh4:
	ldr	x20, [x20, _MEMSTICK_CAP_PAR4@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_msb_switch_to_parallel
LBB0_5:
	mov	w8, #20
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_msb_read_boot_blocks
	cbz	w0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_15
LBB0_7:
	ldr	x21, [x19, #48]
	ldp	w9, w8, [x21]
	stp	w8, w9, [x19, #12]
	ldr	w9, [x21, #8]
	lsl	w9, w9, #1
	mul	w0, w9, w8
	stp	w9, w0, [x19, #20]
Lloh7:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_9
; %bb.8:
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_kzalloc
	str	w0, [x19, #40]
	cbz	w0, LBB0_14
; %bb.10:
	ldr	w8, [x19, #16]
Lloh17:
	adrp	x9, _chs_table@GOTPAGE
Lloh18:
	ldr	x9, [x9, _chs_table@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w12, [x9]
	cbz	w12, LBB0_18
; %bb.11:
	mov	x10, #0
	ldr	w11, [x19, #24]
	mul	w11, w8, w11
	asr	w11, w11, #20
	add	x13, x9, #16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	w12, w11
	b.eq	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x10, x10, #1
	ldr	w12, [x13], #16
	cbnz	w12, LBB0_12
	b	LBB0_18
LBB0_14:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_16:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_17:
	add	x9, x9, w10, uxtw #4
	ldr	w10, [x9, #12]
	str	w10, [x19, #36]
	ldur	d0, [x9, #4]
	stur	d0, [x19, #28]
LBB0_18:
	ldr	w9, [x21, #12]
	cmp	w9, #1
	b.ne	LBB0_20
; %bb.19:
	ldr	w9, [x20]
	ldr	w10, [x19]
	orr	w9, w10, w9
	str	w9, [x19]
LBB0_20:
	ldrb	w9, [x21, #16]
	tst	w9, #0x3
	b.eq	LBB0_22
; %bb.21:
	mov	w9, #1
	str	w9, [x19, #4]
LBB0_22:
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg
	ldr	w8, [x19, #20]
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dbg
	ldr	w8, [x19, #12]
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dbg
	ldr	w8, [x19]
	ldr	w9, [x20]
	tst	w9, w8
	cset	w8, ne
	str	x8, [sp]
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dbg
	ldr	w8, [x19, #4]
	str	x8, [sp]
Lloh30:
	adrp	x0, l_.str.5@PAGE
Lloh31:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_dbg
	mov	x0, x19
	bl	_msb_cache_init
	mov	x20, x0
	cbnz	w0, LBB0_16
; %bb.23:
	mov	x0, x19
	bl	_msb_ftl_initialize
	mov	x20, x0
	cbnz	w0, LBB0_16
; %bb.24:
	mov	x0, x19
	mov	w1, #0
	bl	_msb_read_bad_block_table
	cbz	w0, LBB0_27
; %bb.25:
	mov	x20, x0
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_16
; %bb.26:
Lloh35:
	adrp	x0, l_.str.6@PAGE
Lloh36:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dbg
	mov	x0, x19
	mov	w1, #1
	bl	_msb_read_bad_block_table
	mov	x20, x0
	cbnz	w0, LBB0_16
LBB0_27:
	mov	x0, x19
	bl	_msb_ftl_scan
	mov	x20, x0
	cbz	w0, LBB0_16
; %bb.28:
Lloh37:
	adrp	x0, l_.str.7@PAGE
Lloh38:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_err
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMSTICK_CLASS_ROM,8,3         ; @MEMSTICK_CLASS_ROM
	.comm	_MEMSTICK_CAP_PAR4,4,2          ; @MEMSTICK_CAP_PAR4
	.comm	_EIO,4,2                        ; @EIO
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device page %d size isn't supported"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_chs_table,8,3                  ; @chs_table
l_.str.1:                               ; @.str.1
	.asciz	"Total block count = %d"

l_.str.2:                               ; @.str.2
	.asciz	"Each block consists of %d pages"

l_.str.3:                               ; @.str.3
	.asciz	"Page size = %d bytes"

l_.str.4:                               ; @.str.4
	.asciz	"Parallel mode supported: %d"

l_.str.5:                               ; @.str.5
	.asciz	"Read only: %d"

l_.str.6:                               ; @.str.6
	.asciz	"failed to read bad block table from primary boot block, trying from backup"

l_.str.7:                               ; @.str.7
	.asciz	"Scan of media failed"

	.no_dead_strip	_msb_init_card
.subsections_via_symbols
