	.file	"extr_nvme_ctrlr.c_nvme_ctrlr_construct_io_qpairs.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hw.nvme.io_entries"
.LC1:
	.string	"hw.nvme.io_trackers"
	.text
	.p2align 4
	.type	nvme_ctrlr_construct_io_qpairs, @function
nvme_ctrlr_construct_io_qpairs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 40[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	rman_get_size@PLT
	mov	ebx, eax
	mov	rax, QWORD PTR doorbell[rip]
	mov	edi, DWORD PTR [rax]
	call	nvme_mmio_offsetof@PLT
	mov	ecx, DWORD PTR 0[rbp]
	mov	edx, 1
	mov	rsi, rsp
	sub	ebx, eax
	lea	rdi, .LC0[rip]
	add	ecx, 1
	mov	eax, ebx
	sal	edx, cl
	mov	ecx, edx
	cdq
	idiv	ecx
	mov	r12d, eax
	mov	eax, DWORD PTR NVME_IO_ENTRIES[rip]
	mov	DWORD PTR [rsp], eax
	call	TUNABLE_INT_FETCH@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	nvme_mmio_read_4@PLT
	mov	edi, eax
	call	NVME_CAP_LO_MQES@PLT
	mov	edi, DWORD PTR [rsp]
	lea	esi, 1[rax]
	call	min@PLT
	mov	esi, r12d
	mov	edi, eax
	mov	DWORD PTR [rsp], eax
	call	min@PLT
	lea	rsi, 4[rsp]
	lea	rdi, .LC1[rip]
	mov	DWORD PTR [rsp], eax
	mov	eax, DWORD PTR NVME_IO_TRACKERS[rip]
	mov	DWORD PTR 4[rsp], eax
	call	TUNABLE_INT_FETCH@PLT
	mov	esi, DWORD PTR NVME_MIN_IO_TRACKERS[rip]
	mov	edi, DWORD PTR 4[rsp]
	call	max@PLT
	mov	esi, DWORD PTR NVME_MAX_IO_TRACKERS[rip]
	mov	edi, eax
	mov	DWORD PTR 4[rsp], eax
	call	min@PLT
	mov	edi, eax
	mov	DWORD PTR 4[rsp], eax
	mov	eax, DWORD PTR [rsp]
	lea	esi, -1[rax]
	call	min@PLT
	mov	ecx, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR M_NVME[rip]
	mov	DWORD PTR 4[rsp], eax
	imul	eax, ecx
	lea	edi, [rcx+rcx*2]
	lea	edx, [rax+rax*2]
	test	edx, edx
	lea	eax, 3[rdx]
	cmovns	eax, edx
	mov	edx, DWORD PTR M_ZERO[rip]
	sal	edi, 3
	or	edx, DWORD PTR M_WAITOK[rip]
	sar	eax, 2
	mov	DWORD PTR 4[rbp], eax
	call	malloc@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	QWORD PTR 32[rbp], rax
	test	edx, edx
	jle	.L2
	xor	r12d, r12d
	xor	ebx, ebx
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rcx, [r12+r12*2]
	lea	r14, [rax+rcx*8]
	lea	eax, 1[r12]
	mov	DWORD PTR [r14], eax
	cmp	edx, 1
	je	.L14
	mov	ebx, 1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	add	ebx, 1
.L3:
	lea	esi, [rbx+r13]
	mov	rdi, rbp
	call	QP@PLT
	cmp	eax, r12d
	je	.L5
	mov	edi, DWORD PTR 24[rbp]
	call	device_get_unit@PLT
	mov	r8d, eax
	mov	eax, ebx
	sar	eax
	add	eax, r8d
	cdq
	idiv	ebx
	lea	edi, [rdx+r13]
	mov	DWORD PTR 4[r14], edi
	call	pcpu_find@PLT
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 8[r14], rax
.L6:
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, DWORD PTR [rsp]
	mov	rcx, rbp
	mov	rdi, r14
	call	nvme_qpair_construct@PLT
	test	eax, eax
	jne	.L1
	cmp	DWORD PTR 8[rbp], 1
	jg	.L15
.L2:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[r14]
	mov	esi, DWORD PTR 16[r14]
	add	r12, 1
	add	r13d, ebx
	mov	edi, DWORD PTR 24[rbp]
	call	bus_bind_intr@PLT
	mov	edx, DWORD PTR 8[rbp]
	cmp	edx, r12d
	jle	.L2
	mov	rax, QWORD PTR 32[rbp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR cpuset_domain[rip]
	lea	rdi, [rax+rdx*4]
	call	CPU_FFS@PLT
	sub	eax, 1
	mov	DWORD PTR 4[r14], eax
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR 8[r14], rax
	jmp	.L6
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nvme_ctrlr_construct_io_qpairs, .-nvme_ctrlr_construct_io_qpairs
	.comm	doorbell,8,8
	.comm	cpuset_domain,8,8
	.comm	NVME_MIN_IO_TRACKERS,4,4
	.comm	NVME_MAX_IO_TRACKERS,4,4
	.comm	NVME_IO_TRACKERS,4,4
	.comm	NVME_IO_ENTRIES,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_NVME,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_nvme_ctrlr.c_nvme_ctrlr_construct_io_qpairs.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"hw.nvme.io_entries\000"
	.align	2
.LC1:
	.ascii	"hw.nvme.io_trackers\000"
	.global	__aeabi_idivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvme_ctrlr_construct_io_qpairs, %function
nvme_ctrlr_construct_io_qpairs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L17
	sub	sp, sp, #16
	mov	r5, r0
	ldr	r0, [r0, #24]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	rman_get_size
	ldr	r3, .L17+4
	mov	r4, r0
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	nvme_mmio_offsetof
	mov	r1, #1
	ldr	r3, [r5]
	sub	r0, r4, r0
	add	r3, r3, r1
	lsl	r1, r1, r3
	bl	__aeabi_idiv
	ldr	r3, .L17+8
	mov	r4, r0
	ldr	r3, [r3]
	add	r1, sp, #4
	ldr	r0, .L17+12
	str	r3, [sp, #4]
	bl	TUNABLE_INT_FETCH
	mov	r1, #0
	mov	r0, r5
	bl	nvme_mmio_read_4
	bl	NVME_CAP_LO_MQES
	mov	r1, r0
	ldr	r0, [sp, #4]
	add	r1, r1, #1
	bl	min
	mov	r1, r4
	str	r0, [sp, #4]
	bl	min
	mov	r2, r0
	ldr	r3, .L17+16
	add	r1, sp, #8
	ldr	r3, [r3]
	ldr	r0, .L17+20
	stmib	sp, {r2, r3}
	bl	TUNABLE_INT_FETCH
	ldr	r3, .L17+24
	ldr	r0, [sp, #8]
	ldr	r1, [r3]
	bl	max
	ldr	r3, .L17+28
	str	r0, [sp, #8]
	ldr	r1, [r3]
	bl	min
	ldr	r1, [sp, #4]
	str	r0, [sp, #8]
	sub	r1, r1, #1
	bl	min
	mov	ip, r0
	ldr	r0, [r5, #8]
	ldr	r1, .L17+32
	mul	r3, r0, ip
	add	r3, r3, r3, lsl #1
	cmp	r3, #0
	add	r2, r3, #3
	movlt	r3, r2
	ldr	r2, .L17+36
	asr	r3, r3, #2
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r3, [r5, #4]
	ldr	r3, .L17+40
	orr	r2, r1, r2
	lsl	r0, r0, #4
	ldr	r1, [r3]
	str	ip, [sp, #8]
	bl	malloc
	ldr	r3, [r5, #8]
	str	r0, [r5, #20]
	cmp	r3, #0
	ble	.L2
	mov	r6, #0
	mov	r7, r0
	mov	r4, r6
	mov	r8, r6
	ldr	r10, .L17+44
.L8:
	cmp	r3, #1
	add	r9, r6, #1
	str	r9, [r7, r6, lsl #4]
	movne	r4, #1
	add	r7, r7, r6, lsl #4
	bne	.L3
	b	.L14
.L5:
	add	r4, r4, #1
.L3:
	mov	r0, r5
	add	r1, r4, r8
	bl	QP
	cmp	r0, r6
	beq	.L5
	ldr	r0, [r5, #16]
	bl	device_get_unit
	mov	r1, r4
	add	r0, r0, r4, asr #1
	bl	__aeabi_idivmod
	add	r0, r1, r8
	str	r0, [r7, #4]
	bl	pcpu_find
	ldr	r3, [r0]
	str	r3, [r7, #8]
.L6:
	mov	r3, r5
	ldmib	sp, {r1, r2}
	mov	r0, r7
	bl	nvme_qpair_construct
	cmp	r0, #0
	bne	.L1
	ldr	r3, [r5, #8]
	cmp	r3, #1
	bgt	.L15
.L2:
	mov	r0, #0
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	ldr	r2, [r7, #4]
	ldr	r1, [r7, #12]
	ldr	r0, [r5, #16]
	bl	bus_bind_intr
	ldr	r3, [r5, #8]
	add	r8, r8, r4
	cmp	r3, r9
	ble	.L2
	mov	r6, r9
	ldr	r7, [r5, #20]
	b	.L8
.L14:
	ldr	r3, [r10]
	ldr	r0, [r5, #12]
	add	r0, r3, r0, lsl #2
	bl	CPU_FFS
	ldr	r3, [r5, #12]
	sub	r0, r0, #1
	stmib	r7, {r0, r3}
	b	.L6
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC2
	.word	doorbell
	.word	NVME_IO_ENTRIES
	.word	.LC0
	.word	NVME_IO_TRACKERS
	.word	.LC1
	.word	NVME_MIN_IO_TRACKERS
	.word	NVME_MAX_IO_TRACKERS
	.word	M_ZERO
	.word	M_WAITOK
	.word	M_NVME
	.word	cpuset_domain
	.size	nvme_ctrlr_construct_io_qpairs, .-nvme_ctrlr_construct_io_qpairs
	.comm	doorbell,4,4
	.comm	cpuset_domain,4,4
	.comm	NVME_MIN_IO_TRACKERS,4,4
	.comm	NVME_MAX_IO_TRACKERS,4,4
	.comm	NVME_IO_TRACKERS,4,4
	.comm	NVME_IO_ENTRIES,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_NVME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
