	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_setup_queue
_mmc_setup_queue:                       ## @mmc_setup_queue
	.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	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rsi), %r14
	movq	_QUEUE_FLAG_NONROT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r13), %esi
	callq	_blk_queue_flag_set
	movq	_QUEUE_FLAG_ADD_RANDOM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r13), %esi
	callq	_blk_queue_flag_clear
	movq	%r15, %rdi
	callq	_mmc_can_erase
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	16(%r13), %edi
	movq	%r15, %rsi
	callq	_mmc_queue_setup_discard
LBB0_2:
	movq	%r14, %rdi
	callq	_mmc_dev
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_mmc_dev
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
LBB0_4:
	movl	16(%r13), %edi
	movq	_BLK_BOUNCE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_blk_queue_bounce_limit
LBB0_5:
	movl	16(%r13), %r12d
	movl	(%r14), %eax
	movl	16(%r14), %edi
	leal	511(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$9, %esi
	callq	_min
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_blk_queue_max_hw_sectors
	cmpq	$0, 8(%r14)
	je	LBB0_7
## %bb.6:
	movl	16(%r13), %r12d
	movq	%r14, %rdi
	callq	_mmc_dev
	movl	%r12d, %edi
	movq	%rax, %rsi
	callq	_blk_queue_can_use_dma_map_merging
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
LBB0_7:
	movl	16(%r13), %ebx
	movq	%r14, %rdi
	callq	_mmc_get_max_segments
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_blk_queue_max_segments
	movq	%r15, %rdi
	callq	_mmc_card_mmc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	(%r15), %r15d
	jmp	LBB0_10
LBB0_8:
	movl	$512, %r15d                     ## imm = 0x200
LBB0_10:
	movl	16(%r13), %edi
	movl	%r15d, %esi
	callq	_blk_queue_logical_block_size
	cmpq	$0, 8(%r14)
	jne	LBB0_12
## %bb.11:
	movl	16(%r13), %ebx
	movl	4(%r14), %edi
	movl	%r15d, %esi
	callq	_round_down
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_blk_queue_max_segment_size
LBB0_12:
	movq	%r14, %rdi
	callq	_mmc_dev
	movq	%rax, %rbx
	movl	16(%r13), %edi
	callq	_queue_max_segment_size
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_set_max_seg_size
	leaq	12(%r13), %rdi
	movq	_mmc_mq_recovery_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	8(%r13), %rdi
	movq	_mmc_blk_mq_complete_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	4(%r13), %rdi
	callq	_mutex_init
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_init_waitqueue_head            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QUEUE_FLAG_NONROT,4,2          ## @QUEUE_FLAG_NONROT
	.comm	_QUEUE_FLAG_ADD_RANDOM,4,2      ## @QUEUE_FLAG_ADD_RANDOM
	.comm	_BLK_BOUNCE_HIGH,4,2            ## @BLK_BOUNCE_HIGH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"merging was advertised but not possible"

	.comm	_mmc_mq_recovery_handler,4,2    ## @mmc_mq_recovery_handler
	.comm	_mmc_blk_mq_complete_work,4,2   ## @mmc_blk_mq_complete_work
	.no_dead_strip	_mmc_setup_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_setup_queue
_mmc_setup_queue:                       ; @mmc_setup_queue
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x1, #8]
Lloh0:
	adrp	x8, _QUEUE_FLAG_NONROT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QUEUE_FLAG_NONROT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_blk_queue_flag_set
Lloh3:
	adrp	x8, _QUEUE_FLAG_ADD_RANDOM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QUEUE_FLAG_ADD_RANDOM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_blk_queue_flag_clear
	mov	x0, x21
	bl	_mmc_can_erase
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_mmc_queue_setup_discard
LBB0_2:
	mov	x0, x20
	bl	_mmc_dev
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_mmc_dev
	ldr	x8, [x0]
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
LBB0_4:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _BLK_BOUNCE_HIGH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BLK_BOUNCE_HIGH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_blk_queue_bounce_limit
LBB0_5:
	ldr	w22, [x19, #16]
	ldr	w0, [x20, #16]
	ldr	w8, [x20]
	add	w9, w8, #511
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #9
	bl	_min
	mov	x1, x0
	mov	x0, x22
	bl	_blk_queue_max_hw_sectors
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w22, [x19, #16]
	mov	x0, x20
	bl	_mmc_dev
	mov	x1, x0
	mov	x0, x22
	bl	_blk_queue_can_use_dma_map_merging
	cmp	w0, #0
	cset	w0, eq
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
LBB0_7:
	ldr	w22, [x19, #16]
	mov	x0, x20
	bl	_mmc_get_max_segments
	mov	x1, x0
	mov	x0, x22
	bl	_blk_queue_max_segments
	mov	x0, x21
	bl	_mmc_card_mmc
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w21, [x21]
	b	LBB0_10
LBB0_9:
	mov	w21, #512
LBB0_10:
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_blk_queue_logical_block_size
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_12
; %bb.11:
	ldr	w22, [x19, #16]
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_round_down
	mov	x1, x0
	mov	x0, x22
	bl	_blk_queue_max_segment_size
LBB0_12:
	mov	x0, x20
	bl	_mmc_dev
	mov	x20, x0
	ldr	w0, [x19, #16]
	bl	_queue_max_segment_size
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_max_seg_size
	add	x0, x19, #12
Lloh11:
	adrp	x8, _mmc_mq_recovery_handler@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mmc_mq_recovery_handler@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #8
Lloh14:
	adrp	x8, _mmc_blk_mq_complete_work@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mmc_blk_mq_complete_work@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #4
	bl	_mutex_init
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_init_waitqueue_head
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_QUEUE_FLAG_NONROT,4,2          ; @QUEUE_FLAG_NONROT
	.comm	_QUEUE_FLAG_ADD_RANDOM,4,2      ; @QUEUE_FLAG_ADD_RANDOM
	.comm	_BLK_BOUNCE_HIGH,4,2            ; @BLK_BOUNCE_HIGH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"merging was advertised but not possible"

	.comm	_mmc_mq_recovery_handler,4,2    ; @mmc_mq_recovery_handler
	.comm	_mmc_blk_mq_complete_work,4,2   ; @mmc_blk_mq_complete_work
	.no_dead_strip	_mmc_setup_queue
.subsections_via_symbols
