	.file	"extr_phyp_vscsi.c_vscsi_check_response_queue.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Unknown SRP response code %d\n"
.LC1:
	.string	"Unknown CRQ format %d\n"
.LC2:
	.string	"Unknown CRQ message type %d\n"
	.text
	.p2align 4
	.type	vscsi_check_response_queue, @function
vscsi_check_response_queue:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	add	rdi, 64
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR MA_OWNED[rip]
	call	mtx_assert@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 56[rbx]
	lea	rax, [rax+rax*2]
	lea	rax, [rcx+rax*8]
	cmp	QWORD PTR [rax], 0
	je	.L1
	lea	rbp, 36[rbx]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	cmp	DWORD PTR 8[r12], 2
	jne	.L5
	mov	DWORD PTR 8[rbx], 1
	.p2align 4,,10
	.p2align 3
.L5:
	movsx	rcx, DWORD PTR 12[rbx]
	add	rax, 1
	xor	edx, edx
	mov	esi, DWORD PTR 20[rbx]
	mov	QWORD PTR [r12], 0
	mov	edi, DWORD PTR 24[rbx]
	div	rcx
	mov	QWORD PTR [rbx], rdx
	mov	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	call	bus_dmamap_sync@PLT
	mov	esi, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR H_VIO_SIGNAL[rip]
	mov	edx, 1
	call	phyp_hcall@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 56[rbx]
	lea	rax, [rax+rax*2]
	lea	rax, [rdx+rax*8]
	cmp	QWORD PTR [rax], 0
	je	.L1
.L2:
	mov	esi, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR H_VIO_SIGNAL[rip]
	xor	edx, edx
	call	phyp_hcall@PLT
	mov	edx, DWORD PTR BUS_DMASYNC_POSTREAD[rip]
	mov	esi, DWORD PTR 20[rbx]
	mov	edi, DWORD PTR 24[rbx]
	call	bus_dmamap_sync@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 56[rbx]
	lea	rcx, [rax+rax*2]
	lea	r12, [rdx+rcx*8]
	mov	rdx, QWORD PTR [r12]
	cmp	rdx, 128
	je	.L3
	cmp	rdx, 192
	je	.L22
	mov	edi, DWORD PTR 28[rbx]
	lea	rsi, .LC2[rip]
	call	device_printf@PLT
	mov	rax, QWORD PTR [rbx]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, DWORD PTR 8[r12]
	mov	r13, QWORD PTR 16[r12]
	cmp	esi, 1
	je	.L6
	cmp	esi, 2
	je	.L7
	lea	rdi, .LC1[rip]
	call	panic@PLT
.L7:
	mov	esi, DWORD PTR 4[r13]
	mov	edi, DWORD PTR 40[rbx]
	mov	edx, DWORD PTR 0[r13]
	call	vmem_free@PLT
	mov	edx, DWORD PTR queue[rip]
	mov	rsi, r13
	mov	rdi, rbp
	call	TAILQ_REMOVE@PLT
	mov	edx, DWORD PTR queue[rip]
	lea	rdi, 32[rbx]
	mov	rsi, r13
	call	TAILQ_INSERT_TAIL@PLT
	mov	rax, QWORD PTR [rbx]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movsx	rdx, DWORD PTR 4[r13]
	mov	rax, QWORD PTR 48[rbx]
	mov	edx, DWORD PTR [rax+rdx*4]
	cmp	edx, 128
	je	.L9
	cmp	edx, 129
	je	.L10
	mov	edi, DWORD PTR 28[rbx]
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, r12
	mov	rdi, r13
	call	vscsi_login_response@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rsi, r12
	mov	rdi, r13
	call	vscsi_srp_response@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	vscsi_check_response_queue, .-vscsi_check_response_queue
	.comm	queue,4,4
	.comm	MA_OWNED,4,4
	.comm	H_VIO_SIGNAL,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_POSTREAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_phyp_vscsi.c_vscsi_check_response_queue.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unknown SRP response code %d\012\000"
	.align	2
.LC1:
	.ascii	"Unknown CRQ format %d\012\000"
	.align	2
.LC2:
	.ascii	"Unknown CRQ message type %d\012\000"
	.global	__aeabi_uidivmod
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vscsi_check_response_queue, %function
vscsi_check_response_queue:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L23
	add	r0, r0, #48
	ldr	r1, [r3]
	bl	mtx_assert
	ldr	r3, [r4]
	ldr	r2, [r4, #44]
	add	r3, r3, r3, lsl #1
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r10, #0
	ldr	r7, .L23+4
	ldr	r8, .L23+8
	ldr	r9, .L23+12
	b	.L2
.L22:
	ldr	r3, [r3, #4]
	cmp	r3, #2
	moveq	r3, #1
	streq	r3, [r4, #4]
.L5:
	ldr	r1, [r4, #8]
	str	r10, [r5, r6, lsl #2]
	add	r0, r0, #1
	bl	__aeabi_uidivmod
	ldr	r2, [r9]
	ldr	r0, [r4, #20]
	str	r1, [r4]
	ldr	r1, [r4, #16]
	bl	bus_dmamap_sync
	mov	r2, #1
	ldr	r1, [r4, #12]
	ldr	r0, [r7]
	bl	phyp_hcall
	ldr	r3, [r4]
	ldr	r2, [r4, #44]
	add	r3, r3, r3, lsl #1
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r2, #0
	ldr	r1, [r4, #12]
	ldr	r0, [r7]
	bl	phyp_hcall
	ldr	r2, [r8]
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	bl	bus_dmamap_sync
	ldr	r0, [r4]
	ldr	r5, [r4, #44]
	add	r6, r0, r0, lsl #1
	ldr	r2, [r5, r6, lsl #2]
	add	r3, r5, r6, lsl #2
	cmp	r2, #128
	beq	.L3
	cmp	r2, #192
	beq	.L22
	ldr	r1, .L23+16
	ldr	r0, [r4, #24]
	bl	device_printf
	ldr	r0, [r4]
	b	.L5
.L3:
	ldmib	r3, {r1, fp}
	cmp	r1, #1
	beq	.L6
	cmp	r1, #2
	beq	.L7
	ldr	r0, .L23+20
	bl	panic
.L7:
	ldr	r2, [fp]
	ldr	r1, [fp, #4]
	ldr	r0, [r4, #36]
	bl	vmem_free
	ldr	r3, .L23+24
	mov	r1, fp
	ldr	r2, [r3]
	add	r0, r4, #32
	bl	TAILQ_REMOVE
	ldr	r3, .L23+24
	mov	r1, fp
	ldr	r2, [r3]
	add	r0, r4, #28
	bl	TAILQ_INSERT_TAIL
	ldr	r0, [r4]
	b	.L5
.L6:
	ldr	r1, [fp, #4]
	ldr	r2, [r4, #40]
	ldr	r2, [r2, r1, lsl #2]
	cmp	r2, #128
	beq	.L9
	cmp	r2, #129
	beq	.L10
	ldr	r1, .L23+28
	ldr	r0, [r4, #24]
	bl	device_printf
	b	.L7
.L10:
	mov	r1, r3
	mov	r0, fp
	bl	vscsi_login_response
	b	.L7
.L9:
	mov	r1, r3
	mov	r0, fp
	bl	vscsi_srp_response
	b	.L7
.L24:
	.align	2
.L23:
	.word	MA_OWNED
	.word	H_VIO_SIGNAL
	.word	BUS_DMASYNC_POSTREAD
	.word	BUS_DMASYNC_PREWRITE
	.word	.LC2
	.word	.LC1
	.word	queue
	.word	.LC0
	.size	vscsi_check_response_queue, .-vscsi_check_response_queue
	.comm	queue,4,4
	.comm	MA_OWNED,4,4
	.comm	H_VIO_SIGNAL,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_POSTREAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
