	.file	"extr_pvscsi.c_pvscsi_dma_alloc_per_hcb.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Error allocation sg list DMA memory, error %d\n"
	.align 8
.LC1:
	.string	"Error creating dma map for hcb %d, error %d\n"
	.text
	.p2align 4
	.type	pvscsi_dma_alloc_per_hcb, @function
pvscsi_dma_alloc_per_hcb:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rsi, 24[rdi]
	mov	ecx, 1
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	eax, DWORD PTR [rdi]
	lea	edx, 0[0+rax*4]
	call	pvscsi_dma_alloc@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L4
	mov	edx, DWORD PTR [r12]
	lea	rsi, 40[r12]
	mov	ecx, 1
	mov	rdi, r12
	imul	edx, DWORD PTR PVSCSI_SENSE_LENGTH[rip]
	call	pvscsi_dma_alloc@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR [r12]
	xor	ebx, ebx
	lea	r13, 16[r12]
	test	eax, eax
	jg	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	lea	r13, 4[r12]
	mov	rdi, r13
	call	SLIST_INIT@PLT
	movsx	rax, DWORD PTR [r12]
	mov	edx, eax
	sub	edx, 1
	js	.L8
	movsx	rcx, edx
	mov	edx, edx
	sub	rax, rdx
	lea	rbx, [rcx+rcx*2]
	lea	rbp, [rax+rax*2]
	sal	rbx, 4
	sal	rbp, 4
	sub	rbp, 96
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rsi, QWORD PTR 8[r12]
	mov	edx, DWORD PTR links[rip]
	mov	rdi, r13
	add	rsi, rbx
	sub	rbx, 48
	call	SLIST_INSERT_HEAD@PLT
	cmp	rbx, rbp
	jne	.L9
.L8:
	xor	r14d, r14d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR PVSCSI_SENSE_LENGTH[rip]
	mov	rdx, QWORD PTR 48[r12]
	mov	rsi, r13
	mov	rdi, rbp
	imul	eax, ebx
	cdqe
	add	rdx, rax
	add	rax, QWORD PTR 40[r12]
	mov	QWORD PTR 32[rbp], rdx
	mov	rdx, QWORD PTR 32[r12]
	mov	QWORD PTR 24[rbp], rax
	lea	rax, 0[0+rbx*4]
	add	rbx, 1
	add	rdx, rax
	add	rax, QWORD PTR 24[r12]
	mov	QWORD PTR 16[rbp], rdx
	xor	edx, edx
	mov	QWORD PTR 8[rbp], rax
	call	callout_init_mtx@PLT
	cmp	DWORD PTR [r12], ebx
	jle	.L6
.L5:
	lea	rbp, [rbx+rbx*2]
	mov	edi, DWORD PTR 60[r12]
	xor	esi, esi
	mov	r15d, ebx
	sal	rbp, 4
	add	rbp, QWORD PTR 8[r12]
	lea	rdx, 40[rbp]
	call	bus_dmamap_create@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L7
	mov	edi, DWORD PTR 56[r12]
	mov	ecx, eax
	mov	edx, ebx
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	device_printf@PLT
.L3:
	mov	esi, r15d
	mov	rdi, r12
	call	pvscsi_dma_free_per_hcb@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	edi, DWORD PTR 56[r12]
	mov	edx, r14d
	xor	eax, eax
	xor	r15d, r15d
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pvscsi_dma_alloc_per_hcb, .-pvscsi_dma_alloc_per_hcb
	.comm	links,4,4
	.comm	PVSCSI_SENSE_LENGTH,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_pvscsi.c_pvscsi_dma_alloc_per_hcb.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Error allocation sg list DMA memory, error %d\012\000"
	.align	2
.LC1:
	.ascii	"Error creating dma map for hcb %d, error %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pvscsi_dma_alloc_per_hcb, %function
pvscsi_dma_alloc_per_hcb:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r1, r0
	ldr	r2, [r1], #16
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r3, #1
	lsl	r2, r2, #2
	mov	r4, r0
	bl	pvscsi_dma_alloc
	subs	r6, r0, #0
	bne	.L16
	mov	r1, r4
	ldr	r9, .L17
	ldr	r3, [r1], #24
	ldr	r2, [r9]
	mov	r0, r4
	mul	r2, r3, r2
	mov	r3, #1
	bl	pvscsi_dma_alloc
	subs	r5, r0, #0
	bne	.L4
	ldr	r3, [r4]
	cmp	r3, #0
	movgt	r7, r5
	addgt	r10, r4, #12
	movgt	r8, r7
	bgt	.L5
.L6:
	add	r6, r4, #4
	mov	r0, r6
	bl	SLIST_INIT
	ldr	r5, [r4]
	subs	r5, r5, #1
	bmi	.L8
	ldr	r7, .L17+4
.L9:
	ldr	r3, [r4, #8]
	add	r1, r5, r5, lsl #1
	mov	r0, r6
	ldr	r2, [r7]
	add	r1, r3, r1, lsl #3
	sub	r5, r5, #1
	bl	SLIST_INSERT_HEAD
	cmn	r5, #1
	bne	.L9
.L8:
	mov	r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	ldr	r3, [r9]
	ldr	r2, [r4, #24]
	mul	r3, r7, r3
	ldr	ip, [r4, #28]
	ldr	r0, [r4, #20]
	ldr	r1, [r4, #16]
	add	ip, ip, r3
	add	r0, r0, r7, lsl #2
	add	r3, r2, r3
	add	r1, r1, r7, lsl #2
	str	r3, [r5, #12]
	str	r0, [r5, #8]
	str	r1, [r5, #4]
	mov	r2, r6
	mov	r0, r5
	mov	r1, r10
	str	ip, [r5, #16]
	bl	callout_init_mtx
	ldr	r3, [r4]
	add	r7, r7, #1
	cmp	r3, r7
	add	r8, r8, #24
	ble	.L6
.L5:
	ldr	r5, [r4, #8]
	mov	r1, #0
	add	r5, r5, r8
	ldr	r0, [r4, #36]
	add	r2, r5, #20
	bl	bus_dmamap_create
	subs	r6, r0, #0
	beq	.L7
	mov	r3, r6
	mov	r2, r7
	ldr	r1, .L17+8
	ldr	r0, [r4, #32]
	bl	device_printf
.L3:
	mov	r1, r7
	mov	r0, r4
	bl	pvscsi_dma_free_per_hcb
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	mov	r2, r6
	ldr	r1, .L17+12
	ldr	r0, [r4, #32]
	bl	device_printf
	mov	r7, #0
	b	.L3
.L4:
	mov	r2, r5
	ldr	r1, .L17+12
	ldr	r0, [r4, #32]
	mov	r7, r6
	bl	device_printf
	mov	r6, r5
	b	.L3
.L18:
	.align	2
.L17:
	.word	PVSCSI_SENSE_LENGTH
	.word	links
	.word	.LC1
	.word	.LC0
	.size	pvscsi_dma_alloc_per_hcb, .-pvscsi_dma_alloc_per_hcb
	.comm	links,4,4
	.comm	PVSCSI_SENSE_LENGTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
