	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mspro_block_init_disk
_mspro_block_init_disk:                 ## @mspro_block_init_disk
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_memstick_get_drvdata
	movq	%rax, %r14
	movq	64(%rax), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$8, %ebx
	xorl	%r15d, %r15d
	movq	_MSPRO_BLOCK_ID_DEVINFO@GOTPCREL(%rip), %r12
	movq	_MSPRO_BLOCK_ID_SYSINFO@GOTPCREL(%rip), %r13
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax), %r15
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	64(%r14), %rax
	movq	(%rax,%rbx), %rdi
	addq	$8, %rbx
	testq	%rdi, %rdi
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_mspro_from_sysfs_attr
	movq	(%rax), %rcx
	cmpq	(%r12), %rcx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	(%r13), %rcx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_7:
	testq	%r15, %r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_9
## %bb.8:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.10:
	movl	20(%r15), %edi
	callq	_be16_to_cpu
	movq	%rax, (%r14)
	movl	16(%r15), %edi
	callq	_be16_to_cpu
	movq	%rax, 8(%r14)
	movl	12(%r15), %edi
	callq	_be16_to_cpu
	movq	%rax, 16(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_be16_to_cpu
	movq	%rax, 24(%r14)
	movq	_mspro_block_disk_lock@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_mspro_block_disk_idr@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movl	$256, %ecx                      ## imm = 0x100
	callq	_idr_alloc
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	js	LBB0_16
## %bb.11:
	movq	_MSPRO_BLOCK_PART_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	movl	$1, %edi
	shll	%cl, %edi
	callq	_alloc_disk
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%r14, %rdi
	addq	$56, %rdi
	movq	_BLK_MQ_F_SHOULD_MERGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mspro_mq_ops@GOTPCREL(%rip), %rsi
	movl	$2, %edx
	callq	_blk_mq_init_sq_queue
	movq	%rax, 48(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	48(%r14), %rdi
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	$0, 48(%r14)
	movq	40(%r14), %rdi
	callq	_put_disk
	jmp	LBB0_15
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movq	_mspro_block_disk_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_mspro_block_disk_idr@GOTPCREL(%rip), %rdi
	movl	%r15d, %esi
	callq	_idr_remove
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %r15d
	jmp	LBB0_16
LBB0_17:
	movq	%rbx, (%rdi)
	movq	_MSPRO_BLOCK_MAX_PAGES@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_blk_queue_max_hw_sectors
	movq	48(%r14), %rdi
	movq	_MSPRO_BLOCK_MAX_SEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_blk_queue_max_segments
	movq	48(%r14), %rdi
	movl	(%r12), %esi
	imull	24(%r14), %esi
	callq	_blk_queue_max_segment_size
	movq	_major@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	40(%r14), %rdx
	movl	%eax, 32(%rdx)
	movb	(%r13), %cl
	movl	%r15d, %eax
	shll	%cl, %eax
	movl	%eax, (%rdx)
	movq	_ms_block_bdops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%rdx)
	movl	$1, 32(%r14)
	movq	%r14, 16(%rdx)
	movq	48(%r14), %rax
	movq	%rax, 8(%rdx)
	movl	4(%rdx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_sprintf
	movq	48(%r14), %rdi
	movl	24(%r14), %esi
	callq	_blk_queue_logical_block_size
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	4(%r12), %edi
	callq	_be16_to_cpu
	movq	%rax, %r15
	movl	(%r12), %edi
	callq	_be16_to_cpu
	imulq	%rax, %r15
	movq	24(%r14), %r12
	movq	40(%r14), %rdi
	shrq	$9, %r12
	imulq	%r15, %r12
	movq	%r12, %rsi
	callq	_set_capacity
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_dev_dbg
	movq	40(%r14), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_device_add_disk
	movl	$1, 36(%r14)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MSPRO_BLOCK_ID_DEVINFO,8,3     ## @MSPRO_BLOCK_ID_DEVINFO
	.comm	_MSPRO_BLOCK_ID_SYSINFO,8,3     ## @MSPRO_BLOCK_ID_SYSINFO
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_mspro_block_disk_lock,4,2      ## @mspro_block_disk_lock
	.comm	_mspro_block_disk_idr,4,2       ## @mspro_block_disk_idr
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MSPRO_BLOCK_PART_SHIFT,4,2     ## @MSPRO_BLOCK_PART_SHIFT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mspro_mq_ops,4,2               ## @mspro_mq_ops
	.comm	_BLK_MQ_F_SHOULD_MERGE,4,2      ## @BLK_MQ_F_SHOULD_MERGE
	.comm	_MSPRO_BLOCK_MAX_PAGES,4,2      ## @MSPRO_BLOCK_MAX_PAGES
	.comm	_MSPRO_BLOCK_MAX_SEGS,4,2       ## @MSPRO_BLOCK_MAX_SEGS
	.comm	_major,4,2                      ## @major
	.comm	_ms_block_bdops,4,2             ## @ms_block_bdops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mspblk%d"

L_.str.1:                               ## @.str.1
	.asciz	"capacity set %ld\n"

	.no_dead_strip	_mspro_block_init_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mspro_block_init_disk
_mspro_block_init_disk:                 ; @mspro_block_init_disk
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	bl	_memstick_get_drvdata
	mov	x19, x0
	ldr	x8, [x0, #64]
	ldr	x0, [x8]
	cbz	x0, LBB0_13
; %bb.1:
	mov	x21, #0
	mov	x23, #0
	mov	w22, #8
Lloh0:
	adrp	x24, _MSPRO_BLOCK_ID_DEVINFO@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MSPRO_BLOCK_ID_DEVINFO@GOTPAGEOFF]
Lloh2:
	adrp	x25, _MSPRO_BLOCK_ID_SYSINFO@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MSPRO_BLOCK_ID_SYSINFO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x21, [x0, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #64]
	ldr	x0, [x8, x22]
	add	x22, x22, #8
	cbz	x0, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_mspro_from_sysfs_attr
	ldr	x8, [x0]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [x0, #8]
	b	LBB0_3
LBB0_7:
	cbz	x21, LBB0_13
; %bb.8:
	cbz	x23, LBB0_13
; %bb.9:
	ldr	w0, [x21, #20]
	bl	_be16_to_cpu
	str	x0, [x19]
	ldr	w0, [x21, #16]
	bl	_be16_to_cpu
	str	x0, [x19, #8]
	ldr	w0, [x21, #12]
	bl	_be16_to_cpu
	str	x0, [x19, #16]
	ldr	w0, [x23, #8]
	bl	_be16_to_cpu
	str	x0, [x19, #24]
Lloh4:
	adrp	x22, _mspro_block_disk_lock@GOTPAGE
Lloh5:
	ldr	x22, [x22, _mspro_block_disk_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_mutex_lock
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
Lloh9:
	adrp	x0, _mspro_block_disk_idr@GOTPAGE
Lloh10:
	ldr	x0, [x0, _mspro_block_disk_idr@GOTPAGEOFF]
	mov	x1, x20
	mov	w2, #0
	mov	w3, #256
	bl	_idr_alloc
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	tbnz	w21, #31, LBB0_14
; %bb.10:
Lloh11:
	adrp	x22, _MSPRO_BLOCK_PART_SHIFT@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MSPRO_BLOCK_PART_SHIFT@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w9, #1
	lsl	w0, w9, w8
	bl	_alloc_disk
	str	x0, [x19, #40]
	cbz	x0, LBB0_15
; %bb.11:
	add	x0, x19, #56
Lloh13:
	adrp	x8, _BLK_MQ_F_SHOULD_MERGE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLK_MQ_F_SHOULD_MERGE@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
Lloh16:
	adrp	x1, _mspro_mq_ops@GOTPAGE
Lloh17:
	ldr	x1, [x1, _mspro_mq_ops@GOTPAGEOFF]
	mov	w2, #2
	bl	_blk_mq_init_sq_queue
	str	x0, [x19, #48]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #48]
	cbz	x8, LBB0_17
; %bb.12:
	bl	_PTR_ERR
	mov	x20, x0
	str	xzr, [x19, #48]
	ldr	x0, [x19, #40]
	bl	_put_disk
	b	LBB0_16
LBB0_13:
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_16:
Lloh24:
	adrp	x19, _mspro_block_disk_lock@GOTPAGE
Lloh25:
	ldr	x19, [x19, _mspro_block_disk_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_mutex_lock
Lloh26:
	adrp	x0, _mspro_block_disk_idr@GOTPAGE
Lloh27:
	ldr	x0, [x0, _mspro_block_disk_idr@GOTPAGEOFF]
	mov	x1, x21
	bl	_idr_remove
	mov	x0, x19
	bl	_mutex_unlock
	mov	x21, x20
	b	LBB0_14
LBB0_17:
	str	x20, [x0]
Lloh28:
	adrp	x24, _MSPRO_BLOCK_MAX_PAGES@GOTPAGE
Lloh29:
	ldr	x24, [x24, _MSPRO_BLOCK_MAX_PAGES@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_blk_queue_max_hw_sectors
	ldr	x0, [x19, #48]
Lloh30:
	adrp	x8, _MSPRO_BLOCK_MAX_SEGS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MSPRO_BLOCK_MAX_SEGS@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_blk_queue_max_segments
	ldr	x0, [x19, #48]
	ldr	w8, [x24]
	ldr	w9, [x19, #24]
	mul	w1, w8, w9
	bl	_blk_queue_max_segment_size
Lloh33:
	adrp	x8, _major@GOTPAGE
Lloh34:
	ldr	x8, [x8, _major@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldp	x9, x10, [x19, #40]
	str	w8, [x9, #32]
	ldr	w8, [x22]
	lsl	w8, w21, w8
	str	w8, [x9]
Lloh36:
	adrp	x8, _ms_block_bdops@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ms_block_bdops@GOTPAGEOFF]
	str	x8, [x9, #24]
	mov	w22, #1
	str	w22, [x19, #32]
	stp	x10, x19, [x9, #8]
	ldr	w0, [x9, #4]
Lloh38:
	adrp	x1, l_.str@PAGE
Lloh39:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_sprintf
	ldr	x0, [x19, #48]
	ldr	w1, [x19, #24]
	bl	_blk_queue_logical_block_size
	ldr	w0, [x23, #4]
	bl	_be16_to_cpu
	mov	x21, x0
	ldr	w0, [x23]
	bl	_be16_to_cpu
	mul	x8, x0, x21
	ldr	x9, [x19, #24]
	lsr	x9, x9, #9
	mul	x21, x8, x9
	ldr	x0, [x19, #40]
	mov	x1, x21
	bl	_set_capacity
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	x1, [x19, #40]
	mov	x0, x20
	mov	x2, #0
	bl	_device_add_disk
	mov	w21, #0
	str	w22, [x19, #36]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MSPRO_BLOCK_ID_DEVINFO,8,3     ; @MSPRO_BLOCK_ID_DEVINFO
	.comm	_MSPRO_BLOCK_ID_SYSINFO,8,3     ; @MSPRO_BLOCK_ID_SYSINFO
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_mspro_block_disk_lock,4,2      ; @mspro_block_disk_lock
	.comm	_mspro_block_disk_idr,4,2       ; @mspro_block_disk_idr
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MSPRO_BLOCK_PART_SHIFT,4,2     ; @MSPRO_BLOCK_PART_SHIFT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mspro_mq_ops,4,2               ; @mspro_mq_ops
	.comm	_BLK_MQ_F_SHOULD_MERGE,4,2      ; @BLK_MQ_F_SHOULD_MERGE
	.comm	_MSPRO_BLOCK_MAX_PAGES,4,2      ; @MSPRO_BLOCK_MAX_PAGES
	.comm	_MSPRO_BLOCK_MAX_SEGS,4,2       ; @MSPRO_BLOCK_MAX_SEGS
	.comm	_major,4,2                      ; @major
	.comm	_ms_block_bdops,4,2             ; @ms_block_bdops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mspblk%d"

l_.str.1:                               ; @.str.1
	.asciz	"capacity set %ld\n"

	.no_dead_strip	_mspro_block_init_disk
.subsections_via_symbols
