	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_blk_alloc
_mmc_blk_alloc:                         ## @mmc_blk_alloc
	.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, %r14
	movq	_dev_use@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_MMC_NUM_MINORS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_find_first_zero_bit
	cmpl	(%rbx), %eax
	jge	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	___set_bit
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_mmc_blk_readonly
	movl	%eax, 44(%r15)
	movq	_MMC_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	movl	$1, %edi
	shll	%cl, %edi
	callq	_alloc_disk
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	leaq	40(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_init
	movl	$1, (%r15)
	movq	%r15, %rdi
	addq	$16, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_mmc_init_queue
	testl	%eax, %eax
	je	LBB0_7
## %bb.10:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	callq	_put_disk
	jmp	LBB0_11
LBB0_1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_13
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_kfree
LBB0_12:
	movl	%ebx, %edi
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	_mmc_blk_issue_rq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	%r15, 24(%r15)
	movq	_MMC_BLOCK_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r15), %rdx
	movl	%eax, 40(%rdx)
	movb	(%r13), %cl
	movl	%r12d, %eax
	shll	%cl, %eax
	movl	%eax, (%rdx)
	movq	_mmc_bdops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rdx)
	movq	%r15, 24(%rdx)
	movl	16(%r15), %eax
	movl	%eax, 16(%rdx)
	leaq	12(%r14), %rax
	movq	%rax, 8(%rdx)
	movl	4(%rdx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_sprintf
	movl	16(%r15), %edi
	movl	$512, %esi                      ## imm = 0x200
	callq	_blk_queue_logical_block_size
	movq	%r14, %rdi
	callq	_mmc_card_sd
	testl	%eax, %eax
	je	LBB0_8
LBB0_14:
	movq	8(%r15), %rdi
	movl	(%r14), %esi
	movb	4(%r14), %cl
	addb	$-9, %cl
	shll	%cl, %esi
	jmp	LBB0_15
LBB0_8:
	movq	%r14, %rdi
	callq	_mmc_card_blockaddr
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	8(%r15), %rdi
	movl	8(%r14), %esi
LBB0_15:
	callq	_set_capacity
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_use,4,2                    ## @dev_use
	.comm	_MMC_NUM_MINORS,4,2             ## @MMC_NUM_MINORS
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MMC_SHIFT,4,2                  ## @MMC_SHIFT
	.comm	_mmc_blk_issue_rq,4,2           ## @mmc_blk_issue_rq
	.comm	_MMC_BLOCK_MAJOR,4,2            ## @MMC_BLOCK_MAJOR
	.comm	_mmc_bdops,4,2                  ## @mmc_bdops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmcblk%d"

	.no_dead_strip	_mmc_blk_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_blk_alloc
_mmc_blk_alloc:                         ; @mmc_blk_alloc
	.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	x20, x0
Lloh0:
	adrp	x19, _dev_use@GOTPAGE
Lloh1:
	ldr	x19, [x19, _dev_use@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x22, _MMC_NUM_MINORS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MMC_NUM_MINORS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_find_first_zero_bit
	ldr	w8, [x22]
	cmp	w0, w8
	b.ge	LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	w1, [x19]
	bl	___set_bit
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	bl	_mmc_blk_readonly
	str	w0, [x19, #44]
Lloh7:
	adrp	x23, _MMC_SHIFT@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MMC_SHIFT@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	w24, #1
	lsl	w0, w24, w8
	bl	_alloc_disk
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.3:
	add	x22, x19, #40
	mov	x0, x22
	bl	_spin_lock_init
	mov	x0, x19
	str	w24, [x0], #16
	mov	x1, x20
	mov	x2, x22
	bl	_mmc_init_queue
	cbz	w0, LBB0_11
; %bb.4:
	mov	x22, x0
	ldr	x0, [x19, #8]
	bl	_put_disk
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_7:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x0, x22
LBB0_10:
	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	_ERR_PTR
LBB0_11:
Lloh18:
	adrp	x8, _mmc_blk_issue_rq@GOTPAGE
Lloh19:
	ldr	x8, [x8, _mmc_blk_issue_rq@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	str	x19, [x19, #24]
Lloh21:
	adrp	x8, _MMC_BLOCK_MAJOR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MMC_BLOCK_MAJOR@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9, #40]
	ldr	w8, [x23]
	lsl	w8, w21, w8
	str	w8, [x9]
Lloh24:
	adrp	x8, _mmc_bdops@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mmc_bdops@GOTPAGEOFF]
	stp	x19, x8, [x9, #24]
	ldr	w8, [x19, #16]
	str	w8, [x9, #16]
	add	x8, x20, #12
	str	x8, [x9, #8]
	ldr	w0, [x9, #4]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_sprintf
	ldr	w0, [x19, #16]
	mov	w1, #512
	bl	_blk_queue_logical_block_size
	mov	x0, x20
	bl	_mmc_card_sd
	cbz	w0, LBB0_13
LBB0_12:
	ldr	x0, [x19, #8]
	ldp	w8, w9, [x20]
	sub	w9, w9, #9
	lsl	w1, w8, w9
	b	LBB0_15
LBB0_13:
	mov	x0, x20
	bl	_mmc_card_blockaddr
	cbz	x0, LBB0_12
; %bb.14:
	ldr	x0, [x19, #8]
	ldr	w1, [x20, #8]
LBB0_15:
	bl	_set_capacity
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_use,4,2                    ; @dev_use
	.comm	_MMC_NUM_MINORS,4,2             ; @MMC_NUM_MINORS
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MMC_SHIFT,4,2                  ; @MMC_SHIFT
	.comm	_mmc_blk_issue_rq,4,2           ; @mmc_blk_issue_rq
	.comm	_MMC_BLOCK_MAJOR,4,2            ; @MMC_BLOCK_MAJOR
	.comm	_mmc_bdops,4,2                  ; @mmc_bdops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmcblk%d"

	.no_dead_strip	_mmc_blk_alloc
.subsections_via_symbols
