	.file	"extr_pci_virtio_block.c_pci_vtblk_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"virtio-block: backing device required\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d:%d"
.LC2:
	.string	"Could not open backing file"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"BHYVE-%02X%02X-%02X%02X-%02X%02X"
	.text
	.p2align 4
	.type	pci_vtblk_init, @function
pci_vtblk_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	test	rdx, rdx
	je	.L18
	mov	r8d, DWORD PTR 4[rsi]
	mov	ecx, DWORD PTR [rsi]
	lea	rbp, 81[rsp]
	mov	r13, rdx
	mov	rdi, rbp
	lea	rdx, .LC1[rip]
	mov	r12, rsi
	xor	eax, eax
	mov	esi, 7
	call	snprintf@PLT
	mov	rsi, rbp
	mov	rdi, r13
	call	blockif_open@PLT
	mov	r15, rax
	test	rax, rax
	je	.L19
	mov	rdi, rax
	call	blockif_size@PLT
	mov	rdi, r15
	mov	ebx, eax
	call	blockif_sectsz@PLT
	lea	rdx, 12[rsp]
	lea	rsi, 8[rsp]
	mov	rdi, r15
	mov	r14d, eax
	call	blockif_psectsz@PLT
	mov	esi, 128
	mov	edi, 1
	call	calloc@PLT
	mov	edx, DWORD PTR VTBLK_RINGSZ[rip]
	mov	QWORD PTR 8[rax], r15
	mov	rbp, rax
	test	edx, edx
	jle	.L5
	mov	esi, DWORD PTR pci_vtblk_done[rip]
	mov	rcx, QWORD PTR 120[rax]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L6:
	mov	DWORD PTR [rcx], eax
	add	eax, 1
	mov	DWORD PTR 24[rcx], esi
	mov	QWORD PTR 16[rcx], rcx
	add	rcx, 32
	mov	QWORD PTR -24[rcx], rbp
	cmp	eax, edx
	jne	.L6
.L5:
	lea	r15, 112[rbp]
	xor	esi, esi
	mov	rdi, r15
	call	pthread_mutex_init@PLT
	lea	r8, 108[rbp]
	mov	rcx, r12
	mov	rdx, rbp
	lea	rsi, vtblk_vi_consts[rip]
	mov	rdi, rbp
	call	vi_softc_linkup@PLT
	mov	eax, DWORD PTR VTBLK_RINGSZ[rip]
	mov	QWORD PTR 0[rbp], r15
	lea	r15, 4[rsp]
	mov	rdi, r15
	mov	DWORD PTR 108[rbp], eax
	call	MD5Init@PLT
	mov	rdi, r13
	call	strlen@PLT
	mov	rsi, r13
	mov	rdi, r15
	mov	edx, eax
	call	MD5Update@PLT
	lea	rdi, 16[rsp]
	mov	rsi, r15
	call	MD5Final@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 168
	movsx	rdi, DWORD PTR 104[rbp]
	mov	esi, DWORD PTR VTBLK_BLK_ID_BYTES[rip]
	mov	eax, DWORD PTR 44[rsp]
	lea	rdx, .LC3[rip]
	push	rax
	.cfi_def_cfa_offset 176
	mov	eax, DWORD PTR 48[rsp]
	push	rax
	.cfi_def_cfa_offset 184
	mov	eax, DWORD PTR 52[rsp]
	push	rax
	.cfi_def_cfa_offset 192
	mov	r9d, DWORD PTR 56[rsp]
	xor	eax, eax
	mov	r8d, DWORD PTR 52[rsp]
	mov	ecx, DWORD PTR 48[rsp]
	call	snprintf@PLT
	mov	eax, ebx
	mov	esi, DWORD PTR BLOCKIF_IOV_MAX[rip]
	mov	QWORD PTR 96[rbp], 0
	cdq
	add	rsp, 32
	.cfi_def_cfa_offset 160
	idiv	DWORD PTR DEV_BSIZE[rip]
	mov	DWORD PTR 16[rbp], eax
	mov	eax, DWORD PTR VTBLK_RINGSZ[rip]
	lea	edi, -2[rax]
	call	MIN@PLT
	mov	QWORD PTR 80[rbp], 0
	xor	edx, edx
	mov	DWORD PTR 88[rbp], eax
	mov	eax, DWORD PTR 8[rsp]
	mov	QWORD PTR 72[rbp], 0
	mov	QWORD PTR 64[rbp], 0
	mov	DWORD PTR 20[rbp], r14d
	cmp	eax, r14d
	jg	.L20
	mov	eax, DWORD PTR 12[rsp]
	mov	QWORD PTR 56[rbp], rdx
	test	eax, eax
	je	.L8
.L23:
	mov	ebx, DWORD PTR 8[rsp]
	sub	ebx, eax
	mov	eax, ebx
	cdq
	idiv	r14d
.L8:
	mov	DWORD PTR 32[rbp], eax
	mov	edx, DWORD PTR VIRTIO_DEV_BLOCK[rip]
	mov	QWORD PTR 48[rbp], 0
	mov	esi, DWORD PTR PCIR_DEVICE[rip]
	mov	QWORD PTR 40[rbp], 0
	mov	QWORD PTR 24[rbp], 0
	mov	rdi, r12
	call	pci_set_cfgdata16@PLT
	mov	edx, DWORD PTR VIRTIO_VENDOR[rip]
	mov	esi, DWORD PTR PCIR_VENDOR[rip]
	mov	rdi, r12
	call	pci_set_cfgdata16@PLT
	mov	edx, DWORD PTR PCIC_STORAGE[rip]
	mov	esi, DWORD PTR PCIR_CLASS[rip]
	mov	rdi, r12
	call	pci_set_cfgdata8@PLT
	mov	edx, DWORD PTR VIRTIO_TYPE_BLOCK[rip]
	mov	esi, DWORD PTR PCIR_SUBDEV_0[rip]
	mov	rdi, r12
	call	pci_set_cfgdata16@PLT
	mov	edx, DWORD PTR VIRTIO_VENDOR[rip]
	mov	esi, DWORD PTR PCIR_SUBVEND_0[rip]
	mov	rdi, r12
	call	pci_set_cfgdata16@PLT
	xor	eax, eax
	call	fbsdrun_virtio_msix@PLT
	mov	esi, 1
	mov	rdi, rbp
	mov	edx, eax
	call	vi_intr_init@PLT
	test	rax, rax
	jne	.L21
	xor	esi, esi
	mov	rdi, rbp
	call	vi_set_io_bar@PLT
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 88[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L21:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbp]
	call	blockif_close@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	cdq
	idiv	r14d
	mov	edi, eax
	call	ffsll@PLT
	lea	rdx, -1[rax]
	mov	eax, DWORD PTR 12[rsp]
	mov	QWORD PTR 56[rbp], rdx
	test	eax, eax
	je	.L8
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pci_vtblk_init, .-pci_vtblk_init
	.comm	vtblk_vi_consts,4,4
	.comm	pci_vtblk_done,4,4
	.comm	VTBLK_RINGSZ,4,4
	.comm	VTBLK_BLK_ID_BYTES,4,4
	.comm	VIRTIO_VENDOR,4,4
	.comm	VIRTIO_TYPE_BLOCK,4,4
	.comm	VIRTIO_DEV_BLOCK,4,4
	.comm	PCIR_VENDOR,4,4
	.comm	PCIR_SUBVEND_0,4,4
	.comm	PCIR_SUBDEV_0,4,4
	.comm	PCIR_DEVICE,4,4
	.comm	PCIR_CLASS,4,4
	.comm	PCIC_STORAGE,4,4
	.comm	DEV_BSIZE,4,4
	.comm	BLOCKIF_IOV_MAX,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_pci_virtio_block.c_pci_vtblk_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"virtio-block: backing device required\012\000"
	.align	2
.LC1:
	.ascii	"%d:%d\000"
	.align	2
.LC2:
	.ascii	"Could not open backing file\000"
	.align	2
.LC3:
	.ascii	"BHYVE-%02X%02X-%02X%02X-%02X%02X\000"
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pci_vtblk_init, %function
pci_vtblk_init:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L24
	sub	sp, sp, #112
	subs	r6, r2, #0
	ldr	r3, [r3]
	str	r3, [sp, #108]
	mov	r3,#0
	beq	.L18
	ldr	r3, [r1, #4]
	ldr	r2, .L24+4
	str	r3, [sp]
	ldr	r3, [r1]
	mov	r5, r1
	add	r0, sp, #100
	mov	r1, #7
	bl	snprintf
	mov	r0, r6
	add	r1, sp, #100
	bl	blockif_open
	subs	r10, r0, #0
	beq	.L19
	bl	blockif_size
	mov	r9, r0
	mov	r0, r10
	bl	blockif_sectsz
	add	r2, sp, #32
	add	r1, sp, #28
	mov	r7, r0
	mov	r0, r10
	bl	blockif_psectsz
	mov	r1, #72
	mov	r0, #1
	bl	calloc
	ldr	r8, .L24+8
	mov	r4, r0
	ldr	r2, [r8]
	str	r10, [r0, #4]
	cmp	r2, #0
	ble	.L5
	mov	ip, #0
	ldr	r1, .L24+12
	ldr	r3, [r0, #68]
	ldr	r1, [r1]
.L6:
	str	r1, [r3, #12]
	str	r3, [r3, #8]
	str	r4, [r3, #4]
	str	ip, [r3], #16
	add	ip, ip, #1
	cmp	ip, r2
	bne	.L6
.L5:
	add	r10, r4, #64
	mov	r1, #0
	mov	r0, r10
	bl	pthread_mutex_init
	add	r3, r4, #60
	mov	r2, r4
	ldr	r1, .L24+16
	str	r3, [sp]
	mov	r0, r4
	mov	r3, r5
	bl	vi_softc_linkup
	ldr	r3, [r8]
	add	r0, sp, #24
	str	r3, [r4, #60]
	str	r10, [r4]
	bl	MD5Init
	mov	r0, r6
	bl	strlen
	mov	r1, r6
	mov	r2, r0
	add	r0, sp, #24
	bl	MD5Update
	add	r1, sp, #24
	add	r0, sp, #36
	bl	MD5Final
	ldr	r2, [sp, #44]
	ldr	r3, [sp, #40]
	ldr	r1, .L24+20
	add	r0, sp, #48
	ldm	r0, {r0, ip, lr}
	ldr	r1, [r1]
	str	lr, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r2, .L24+24
	ldr	r3, [sp, #36]
	ldr	r0, [r4, #56]
	bl	snprintf
	ldr	r3, .L24+28
	mov	r0, r9
	ldr	r1, [r3]
	bl	__aeabi_idiv
	mov	r6, #0
	mov	r3, r0
	ldr	r2, .L24+32
	ldr	r0, [r8]
	ldr	r1, [r2]
	sub	r0, r0, #2
	str	r3, [r4, #8]
	str	r6, [r4, #52]
	bl	MIN
	ldr	r3, [sp, #28]
	str	r6, [r4, #44]
	cmp	r3, r7
	str	r6, [r4, #40]
	str	r6, [r4, #36]
	str	r0, [r4, #48]
	str	r7, [r4, #12]
	bgt	.L20
	ldr	r3, [sp, #32]
	str	r6, [r4, #32]
	cmp	r3, #0
	beq	.L8
.L23:
	ldr	r0, [sp, #28]
	mov	r1, r7
	sub	r0, r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
.L8:
	mov	ip, #0
	ldr	r2, .L24+36
	ldr	r1, .L24+40
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	ip, [r4, #28]
	str	ip, [r4, #24]
	str	ip, [r4, #16]
	ldr	r6, .L24+44
	str	r3, [r4, #20]
	bl	pci_set_cfgdata16
	ldr	r3, .L24+48
	mov	r0, r5
	ldr	r1, [r3]
	ldr	r2, [r6]
	bl	pci_set_cfgdata16
	ldr	r3, .L24+52
	ldr	r2, .L24+56
	ldr	r1, [r3]
	mov	r0, r5
	ldr	r2, [r2]
	bl	pci_set_cfgdata8
	ldr	r3, .L24+60
	ldr	r2, .L24+64
	ldr	r1, [r3]
	mov	r0, r5
	ldr	r2, [r2]
	bl	pci_set_cfgdata16
	ldr	r3, .L24+68
	ldr	r2, [r6]
	ldr	r1, [r3]
	mov	r0, r5
	bl	pci_set_cfgdata16
	bl	fbsdrun_virtio_msix
	mov	r1, #1
	mov	r2, r0
	mov	r0, r4
	bl	vi_intr_init
	subs	r5, r0, #0
	bne	.L21
	mov	r0, r4
	mov	r1, r5
	bl	vi_set_io_bar
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #108]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r5
	add	sp, sp, #112
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	r0, [r4, #4]
	bl	blockif_close
	mov	r0, r4
	bl	free
	mov	r5, #1
	b	.L1
.L20:
	mov	r0, r3
	mov	r1, r7
	bl	__aeabi_idiv
	bl	ffsll
	ldr	r3, [sp, #32]
	sub	r6, r0, #1
	cmp	r3, #0
	str	r6, [r4, #32]
	beq	.L8
	b	.L23
.L18:
	ldr	r0, .L24+72
	bl	printf
	mov	r5, #1
	b	.L1
.L19:
	ldr	r0, .L24+76
	bl	perror
	mov	r5, #1
	b	.L1
.L22:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC4
	.word	.LC1
	.word	VTBLK_RINGSZ
	.word	pci_vtblk_done
	.word	vtblk_vi_consts
	.word	VTBLK_BLK_ID_BYTES
	.word	.LC3
	.word	DEV_BSIZE
	.word	BLOCKIF_IOV_MAX
	.word	VIRTIO_DEV_BLOCK
	.word	PCIR_DEVICE
	.word	VIRTIO_VENDOR
	.word	PCIR_VENDOR
	.word	PCIR_CLASS
	.word	PCIC_STORAGE
	.word	PCIR_SUBDEV_0
	.word	VIRTIO_TYPE_BLOCK
	.word	PCIR_SUBVEND_0
	.word	.LC0
	.word	.LC2
	.size	pci_vtblk_init, .-pci_vtblk_init
	.comm	vtblk_vi_consts,4,4
	.comm	pci_vtblk_done,4,4
	.comm	VTBLK_RINGSZ,4,4
	.comm	VTBLK_BLK_ID_BYTES,4,4
	.comm	VIRTIO_VENDOR,4,4
	.comm	VIRTIO_TYPE_BLOCK,4,4
	.comm	VIRTIO_DEV_BLOCK,4,4
	.comm	PCIR_VENDOR,4,4
	.comm	PCIR_SUBVEND_0,4,4
	.comm	PCIR_SUBDEV_0,4,4
	.comm	PCIR_DEVICE,4,4
	.comm	PCIR_CLASS,4,4
	.comm	PCIC_STORAGE,4,4
	.comm	DEV_BSIZE,4,4
	.comm	BLOCKIF_IOV_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
