	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_run_bkops                  ## -- Begin function mmc_run_bkops
	.p2align	4, 0x90
_mmc_run_bkops:                         ## @mmc_run_bkops
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	callq	_mmc_read_bkops_status
	testl	%eax, %eax
	je	LBB0_2
## %bb.8:
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_2:
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_EXT_CSD_BKOPS_LEVEL_2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_7
## %bb.4:
	movl	(%r15), %edi
	callq	_mmc_retune_hold
	movq	_EXT_CSD_CMD_SET_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EXT_CSD_BKOPS_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MMC_OPS_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_mmc_switch
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movl	(%r15), %edi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_pr_warn
LBB0_6:
	movl	(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_retune_release             ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Failed to read bkops status: %d\n"

	.comm	_EXT_CSD_BKOPS_LEVEL_2,8,3      ## @EXT_CSD_BKOPS_LEVEL_2
	.comm	_EXT_CSD_CMD_SET_NORMAL,4,2     ## @EXT_CSD_CMD_SET_NORMAL
	.comm	_EXT_CSD_BKOPS_START,4,2        ## @EXT_CSD_BKOPS_START
	.comm	_MMC_OPS_TIMEOUT_MS,4,2         ## @MMC_OPS_TIMEOUT_MS
L_.str.1:                               ## @.str.1
	.asciz	"%s: Error %d starting bkops\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_run_bkops                  ; -- Begin function mmc_run_bkops
	.p2align	2
_mmc_run_bkops:                         ; @mmc_run_bkops
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	bl	_mmc_read_bkops_status
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_mmc_hostname
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pr_err
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.4:
Lloh2:
	adrp	x9, _EXT_CSD_BKOPS_LEVEL_2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EXT_CSD_BKOPS_LEVEL_2@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.5:
	ldr	w0, [x19]
	bl	_mmc_retune_hold
Lloh5:
	adrp	x8, _EXT_CSD_CMD_SET_NORMAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXT_CSD_CMD_SET_NORMAL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _EXT_CSD_BKOPS_START@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EXT_CSD_BKOPS_START@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _MMC_OPS_TIMEOUT_MS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMC_OPS_TIMEOUT_MS@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_mmc_switch
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_mmc_hostname
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_pr_warn
LBB0_7:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mmc_retune_release
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Failed to read bkops status: %d\n"

	.comm	_EXT_CSD_BKOPS_LEVEL_2,8,3      ; @EXT_CSD_BKOPS_LEVEL_2
	.comm	_EXT_CSD_CMD_SET_NORMAL,4,2     ; @EXT_CSD_CMD_SET_NORMAL
	.comm	_EXT_CSD_BKOPS_START,4,2        ; @EXT_CSD_BKOPS_START
	.comm	_MMC_OPS_TIMEOUT_MS,4,2         ; @MMC_OPS_TIMEOUT_MS
l_.str.1:                               ; @.str.1
	.asciz	"%s: Error %d starting bkops\n"

.subsections_via_symbols
