	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvmet_bdev_execute_discard
_nvmet_bdev_execute_discard:            ## @nvmet_bdev_execute_discard
	.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, %r14
	movq	$0, -48(%rbp)
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	xorl	%r13d, %r13d
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	$-1, %ebx
	leaq	-56(%rbp), %r15
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r15, %rdx
	movl	$4, %ecx
	callq	_nvmet_copy_from_sgl
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_nvmet_bdev_discard_range
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	incl	%ebx
	addl	$4, %r13d
	cmpl	%eax, %ebx
	jl	LBB0_3
## %bb.7:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.11:
	movq	%r14, 8(%rdi)
	movq	_nvmet_bio_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	callq	_submit_bio
	jmp	LBB0_10
LBB0_5:
	movq	%rax, %r13
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.6:
	movq	%r14, 8(%rdi)
	movq	_nvmet_bio_done@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	callq	_bio_endio
	jmp	LBB0_10
LBB0_8:
	xorl	%r13d, %r13d
LBB0_9:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_nvmet_req_complete
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nvmet_bio_done,4,2             ## @nvmet_bio_done
	.comm	_BLK_STS_IOERR,4,2              ## @BLK_STS_IOERR
	.no_dead_strip	_nvmet_bdev_execute_discard
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvmet_bdev_execute_discard
_nvmet_bdev_execute_discard:            ; @nvmet_bdev_execute_discard
	.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	x19, x0
	str	xzr, [sp]
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	w20, #0
	mov	w21, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #4
	bl	_nvmet_copy_from_sgl
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_nvmet_bdev_discard_range
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	add	w21, w21, #1
	add	w20, w20, #4
	cmp	w21, w0
	b.lt	LBB0_2
; %bb.5:
	ldr	x0, [sp]
	cbz	x0, LBB0_7
; %bb.6:
	str	x19, [x0, #8]
Lloh0:
	adrp	x8, _nvmet_bio_done@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nvmet_bio_done@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #4]
	bl	_submit_bio
	b	LBB0_11
LBB0_7:
	mov	x1, #0
	b	LBB0_10
LBB0_8:
	mov	x1, x0
	ldr	x0, [sp]
	cbz	x0, LBB0_10
; %bb.9:
	str	x19, [x0, #8]
Lloh3:
	adrp	x8, _nvmet_bio_done@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nvmet_bio_done@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BLK_STS_IOERR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BLK_STS_IOERR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0]
	bl	_bio_endio
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_nvmet_req_complete
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_nvmet_bio_done,4,2             ; @nvmet_bio_done
	.comm	_BLK_STS_IOERR,4,2              ; @BLK_STS_IOERR
	.no_dead_strip	_nvmet_bdev_execute_discard
.subsections_via_symbols
