	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vscsi_check_response_queue
_vscsi_check_response_queue:            ## @vscsi_check_response_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
	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, %rbx
	addq	$64, %rdi
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mtx_assert
	movq	(%rbx), %rax
	movq	56(%rbx), %rcx
	leaq	(%rax,%rax,2), %rax
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_20
## %bb.1:
	leaq	36(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	32(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_H_VIO_SIGNAL@GOTPCREL(%rip), %r14
	movq	_BUS_DMASYNC_POSTREAD@GOTPCREL(%rip), %r15
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rcx
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, (%rbx)
	movl	20(%rbx), %esi
	movl	24(%rbx), %edi
	movl	(%r12), %edx
	callq	_bus_dmamap_sync
	movl	(%r14), %edi
	movl	16(%rbx), %esi
	movl	$1, %edx
	callq	_phyp_hcall
	movq	(%rbx), %rax
	movq	56(%rbx), %rcx
	leaq	(%rax,%rax,2), %rax
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_20
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movl	16(%rbx), %esi
	xorl	%edx, %edx
	callq	_phyp_hcall
	movl	20(%rbx), %esi
	movl	24(%rbx), %edi
	movl	(%r15), %edx
	callq	_bus_dmamap_sync
	movq	(%rbx), %rcx
	movq	56(%rbx), %rax
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %r13
	movq	(%rax,%rcx,8), %rdx
	cmpq	$128, %rdx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$192, %rdx
	jne	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, 8(%rax,%rcx,8)
	jne	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, 8(%rbx)
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rax,%rcx,8), %r12
	movl	8(%rax,%rcx,8), %esi
	cmpl	$2, %esi
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %esi
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%rbx), %rax
	movslq	4(%r12), %rcx
	movl	(%rax,%rcx,4), %edx
	cmpl	$129, %edx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, %edx
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_vscsi_srp_response
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	28(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_device_printf
	jmp	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_vscsi_login_response
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	28(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	40(%rbx), %edi
	movl	(%r12), %edx
	movl	4(%r12), %esi
	callq	_vmem_free
	movq	_queue@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r15), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	_BUS_DMASYNC_POSTREAD@GOTPCREL(%rip), %r15
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %r12
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, (%r13)
	movq	(%rbx), %rax
	incq	%rax
	movslq	12(%rbx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_19
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_H_VIO_SIGNAL,4,2               ## @H_VIO_SIGNAL
	.comm	_BUS_DMASYNC_POSTREAD,4,2       ## @BUS_DMASYNC_POSTREAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown SRP response code %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unknown CRQ format %d\n"

	.comm	_queue,4,2                      ## @queue
L_.str.2:                               ## @.str.2
	.asciz	"Unknown CRQ message type %d\n"

	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
	.no_dead_strip	_vscsi_check_response_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vscsi_check_response_queue
_vscsi_check_response_queue:            ; @vscsi_check_response_queue
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	add	x0, x0, #64
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mtx_assert
	ldr	x8, [x19, #56]
	ldr	x9, [x19]
	mov	w10, #24
	mul	x9, x9, x10
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_17
; %bb.1:
	add	x20, x19, #36
	add	x21, x19, #32
Lloh3:
	adrp	x27, _H_VIO_SIGNAL@GOTPAGE
Lloh4:
	ldr	x27, [x27, _H_VIO_SIGNAL@GOTPAGEOFF]
Lloh5:
	adrp	x28, _BUS_DMASYNC_POSTREAD@GOTPAGE
Lloh6:
	ldr	x28, [x28, _BUS_DMASYNC_POSTREAD@GOTPAGEOFF]
Lloh7:
	adrp	x22, _queue@GOTPAGE
Lloh8:
	ldr	x22, [x22, _queue@GOTPAGEOFF]
	mov	w23, #24
Lloh9:
	adrp	x24, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #28]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_device_printf
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x25]
	ldr	x8, [x19]
	add	x8, x8, #1
	ldrsw	x9, [x19, #12]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19]
	ldp	w1, w0, [x19, #20]
	ldr	w2, [x24]
	bl	_bus_dmamap_sync
	ldr	w0, [x27]
	ldr	w1, [x19, #16]
	mov	w2, #1
	bl	_phyp_hcall
	ldr	x8, [x19, #56]
	ldr	x9, [x19]
	mul	x9, x9, x23
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x27]
	ldr	w1, [x19, #16]
	mov	w2, #0
	bl	_phyp_hcall
	ldp	w1, w0, [x19, #20]
	ldr	w2, [x28]
	bl	_bus_dmamap_sync
	ldr	x8, [x19, #56]
	ldr	x9, [x19]
	madd	x25, x9, x23, x8
	ldr	x2, [x25]
	cmp	x2, #128
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x2, #192
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x9, x23, x8
	ldr	w8, [x8, #8]
	cmp	w8, #2
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x9, x23, x8
	ldr	x26, [x8, #16]
	ldr	w1, [x8, #8]
	cmp	w1, #2
	b.eq	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w1, #1
	b.ne	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #48]
	ldrsw	x9, [x26, #4]
	ldr	w2, [x8, x9, lsl #2]
	cmp	w2, #129
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w2, #128
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	mov	x1, x25
	bl	_vscsi_srp_response
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x26
	mov	x1, x25
	bl	_vscsi_login_response
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #28]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #40]
	ldp	w2, w1, [x26]
	bl	_vmem_free
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x26
	bl	_TAILQ_REMOVE
	ldr	w2, [x22]
	mov	x0, x21
	mov	x1, x26
	bl	_TAILQ_INSERT_TAIL
	b	LBB0_3
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_H_VIO_SIGNAL,4,2               ; @H_VIO_SIGNAL
	.comm	_BUS_DMASYNC_POSTREAD,4,2       ; @BUS_DMASYNC_POSTREAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown SRP response code %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unknown CRQ format %d\n"

	.comm	_queue,4,2                      ; @queue
l_.str.2:                               ; @.str.2
	.asciz	"Unknown CRQ message type %d\n"

	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
	.no_dead_strip	_vscsi_check_response_queue
.subsections_via_symbols
