	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_ubd_request
_do_ubd_request:                        ## @do_ubd_request
	.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	$40, %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	%rdi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, (%rbx)
	movq	$0, 16(%rbx)
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	(%r14), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_blk_fetch_request
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	32(%rbx), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_blk_rq_map_sg
	movq	%rax, (%rbx)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rbx), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_blk_rq_pos
	movq	8(%rbx), %r12
	cmpq	(%rbx), %r12
	jge	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%rbx), %r13
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	%rax, %r14
	leaq	(,%r12,8), %rdi
	addq	%r13, %rdi
	movq	%r15, %rbx
	shlq	$9, %rbx
	movl	(%r13,%r12,8), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%r13,%r12,8), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	callq	_sg_page
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	%eax, %r9d
	callq	_prepare_request
	movl	(%r13,%r12,8), %ebx
	movq	_thread_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	movl	$8, %edx
	callq	_os_write_file
	cmpl	$8, %eax
	jne	LBB0_10
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=2
	sarl	$9, %ebx
	movslq	%ebx, %rax
	addq	%rax, %r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %r12
	incq	%r12
	movq	%r12, 8(%rbx)
	cmpq	(%rbx), %r12
	jl	LBB0_6
	jmp	LBB0_17
LBB0_7:
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	_restart@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add
	jmp	LBB0_15
LBB0_10:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	jne	LBB0_11
## %bb.12:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addq	$24, %rbx
	movq	%rbx, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_restart@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add
	jmp	LBB0_14
LBB0_11:
	negl	%eax
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printk
LBB0_14:
	movq	-64(%rbp), %rdi
	callq	_kfree
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_restart,4,2                    ## @restart
	.comm	_thread_fd,4,2                  ## @thread_fd
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write to io thread failed, errno = %d\n"

	.no_dead_strip	_do_ubd_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_ubd_request
_do_ubd_request:                        ; @do_ubd_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x28, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x28, [x28, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	adrp	x19, _thread_fd@GOTPAGE
Lloh3:
	ldr	x19, [x19, _thread_fd@GOTPAGEOFF]
	str	x0, [sp]                        ; 8-byte Folded Spill
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [x27]
	str	xzr, [x27, #16]
	ldr	x20, [sp]                       ; 8-byte Folded Reload
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x27, [x20]
	ldr	x8, [x27]
	cbnz	x8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_blk_fetch_request
	cbz	x0, LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x0
	stp	xzr, x0, [x27, #8]
	ldr	x2, [x27, #32]
	mov	x0, x20
	bl	_blk_rq_map_sg
	str	x0, [x27]
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x20, [x27, #16]
	mov	x0, x20
	bl	_blk_rq_pos
	ldp	x8, x23, [x27]
	cmp	x23, x8
	b.ge	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
LBB0_7:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x24, [x27, #32]
	ldr	w1, [x28]
	mov	w0, #4
	bl	_kmalloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x22, x0
	add	x23, x24, x23, lsl #3
	lsl	x24, x21, #9
	ldp	w26, w25, [x23]
	mov	x0, x23
	bl	_sg_page
	mov	x5, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	mov	x3, x25
	mov	x4, x26
	bl	_prepare_request
	ldr	w22, [x23]
	ldr	w0, [x19]
	add	x1, sp, #8
	mov	w2, #8
	bl	_os_write_file
	cmp	w0, #8
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	asr	w8, w22, #9
	add	x21, x21, w8, sxtw
	ldp	x9, x8, [x27]
	add	x23, x8, #1
	str	x23, [x27, #8]
	cmp	x23, x9
	b.lt	LBB0_7
	b	LBB0_1
LBB0_10:
	add	x19, x27, #24
	mov	x0, x19
	bl	_list_empty
	cbz	x0, LBB0_17
; %bb.11:
Lloh4:
	adrp	x1, _restart@GOTPAGE
Lloh5:
	ldr	x1, [x1, _restart@GOTPAGEOFF]
	mov	x0, x19
	bl	_list_add
	b	LBB0_17
LBB0_12:
Lloh6:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_15
; %bb.13:
	add	x19, x27, #24
	mov	x0, x19
	bl	_list_empty
	cbz	x0, LBB0_16
; %bb.14:
Lloh9:
	adrp	x1, _restart@GOTPAGE
Lloh10:
	ldr	x1, [x1, _restart@GOTPAGEOFF]
	mov	x0, x19
	bl	_list_add
	b	LBB0_16
LBB0_15:
	neg	w1, w0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
LBB0_16:
	ldr	x0, [sp, #8]
	bl	_kfree
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_restart,4,2                    ; @restart
	.comm	_thread_fd,4,2                  ; @thread_fd
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write to io thread failed, errno = %d\n"

	.no_dead_strip	_do_ubd_request
.subsections_via_symbols
