	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p9_virtio_request
_p9_virtio_request:                     ## @p9_virtio_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	16(%rsi), %r15
	addq	$4, %r15
	movq	_P9_DEBUG_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_P9_DPRINTK
	movl	4(%r14), %edi
	movq	_VIRTQUEUE_NUM@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	(%r13), %rax
	movq	(%rax), %rcx
	movl	8(%rax), %r8d
	xorl	%esi, %esi
	callq	_pack_sg_list
	movl	4(%r14), %edi
	movq	(%rbx), %rdx
	movslq	%eax, %rbx
	subq	%rbx, %rdx
	movl	(%r12), %r8d
	movl	%ebx, %esi
	movq	%r15, %rcx
	callq	_pack_sg_list
	movq	_REQ_STATUS_SENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%r13)
	movl	(%r14), %edi
	movl	4(%r14), %esi
	movq	(%r13), %r8
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_virtqueue_add_buf
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	callq	_virtqueue_kick
	movq	_P9_DEBUG_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_P9_DPRINTK
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_P9_DEBUG_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_P9_DPRINTK
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P9_DEBUG_TRANS,4,2             ## @P9_DEBUG_TRANS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"9p debug: virtio request\n"

	.comm	_VIRTQUEUE_NUM,8,3              ## @VIRTQUEUE_NUM
	.comm	_REQ_STATUS_SENT,4,2            ## @REQ_STATUS_SENT
L_.str.1:                               ## @.str.1
	.asciz	"9p debug: virtio rpc add_buf returned failure"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"9p debug: virtio request kicked\n"

	.no_dead_strip	_p9_virtio_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p9_virtio_request
_p9_virtio_request:                     ; @p9_virtio_request
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
	ldr	x8, [x1, #16]
	add	x21, x8, #4
Lloh0:
	adrp	x23, _P9_DEBUG_TRANS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _P9_DEBUG_TRANS@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_P9_DPRINTK
	ldr	w0, [x24, #4]
Lloh4:
	adrp	x25, _VIRTQUEUE_NUM@GOTPAGE
Lloh5:
	ldr	x25, [x25, _VIRTQUEUE_NUM@GOTPAGEOFF]
	ldr	x2, [x25]
	ldr	x8, [x19]
	ldr	x3, [x8]
	ldr	w4, [x8, #8]
	mov	w1, #0
	bl	_pack_sg_list
	mov	x22, x0
	ldr	w0, [x24, #4]
	ldr	x8, [x25]
	sub	x2, x8, w22, sxtw
	ldr	w4, [x20]
	mov	x1, x22
	mov	x3, x21
	bl	_pack_sg_list
	mov	x3, x0
Lloh6:
	adrp	x8, _REQ_STATUS_SENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REQ_STATUS_SENT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldp	w0, w1, [x24]
	ldr	x4, [x19]
	mov	x2, x22
	bl	_virtqueue_add_buf
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	w0, [x24]
	bl	_virtqueue_kick
	ldr	w0, [x23]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_P9_DPRINTK
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x23]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_P9_DPRINTK
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_P9_DEBUG_TRANS,4,2             ; @P9_DEBUG_TRANS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"9p debug: virtio request\n"

	.comm	_VIRTQUEUE_NUM,8,3              ; @VIRTQUEUE_NUM
	.comm	_REQ_STATUS_SENT,4,2            ; @REQ_STATUS_SENT
l_.str.1:                               ; @.str.1
	.asciz	"9p debug: virtio rpc add_buf returned failure"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"9p debug: virtio request kicked\n"

	.no_dead_strip	_p9_virtio_request
.subsections_via_symbols
