	.file	"extr_virtio_mmio.c_vm_finalize_features.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"New virtio-mmio devices (version 2) must provide VIRTIO_F_VERSION_1 feature!\n"
	.text
	.p2align 4
	.type	vm_finalize_features, @function
vm_finalize_features:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	to_virtio_mmio_device@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	vring_transport_features@PLT
	cmp	DWORD PTR [rbx], 2
	je	.L6
.L2:
	mov	rsi, QWORD PTR VIRTIO_MMIO_DRIVER_FEATURES_SEL[rip]
	mov	edi, 1
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	ecx, 32
	mov	rsi, QWORD PTR VIRTIO_MMIO_DRIVER_FEATURES[rip]
	add	rsi, QWORD PTR 8[rbx]
	sar	edi, cl
	call	writel@PLT
	mov	rsi, QWORD PTR VIRTIO_MMIO_DRIVER_FEATURES_SEL[rip]
	xor	edi, edi
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, QWORD PTR VIRTIO_MMIO_DRIVER_FEATURES[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	esi, DWORD PTR VIRTIO_F_VERSION_1[rip]
	mov	rdi, rbp
	call	__virtio_test_bit@PLT
	test	eax, eax
	jne	.L2
	lea	rdi, 4[rbp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	vm_finalize_features, .-vm_finalize_features
	.comm	VIRTIO_MMIO_DRIVER_FEATURES_SEL,8,8
	.comm	VIRTIO_MMIO_DRIVER_FEATURES,8,8
	.comm	VIRTIO_F_VERSION_1,4,4
	.comm	EINVAL,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_virtio_mmio.c_vm_finalize_features.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"New virtio-mmio devices (version 2) must provide VI"
	.ascii	"RTIO_F_VERSION_1 feature!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vm_finalize_features, %function
vm_finalize_features:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r0
	bl	to_virtio_mmio_device
	mov	r4, r0
	mov	r0, r7
	bl	vring_transport_features
	ldr	r3, [r4]
	cmp	r3, #2
	beq	.L6
.L2:
	ldr	r6, .L7
	ldr	r1, [r4, #4]
	ldr	r3, [r6]
	mov	r0, #1
	add	r1, r1, r3
	bl	writel
	mov	r3, #32
	ldr	r5, .L7+4
	ldr	r1, [r4, #4]
	ldr	r2, [r5]
	ldr	r0, [r7]
	add	r1, r1, r2
	asr	r0, r0, r3
	bl	writel
	ldr	r3, [r6]
	ldr	r1, [r4, #4]
	mov	r0, #0
	add	r1, r1, r3
	bl	writel
	ldr	r3, [r5]
	ldr	r1, [r4, #4]
	ldr	r0, [r7]
	add	r1, r1, r3
	bl	writel
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r3, .L7+8
	mov	r0, r7
	ldr	r1, [r3]
	bl	__virtio_test_bit
	cmp	r0, #0
	bne	.L2
	ldr	r1, .L7+12
	add	r0, r7, #4
	bl	dev_err
	ldr	r3, .L7+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	VIRTIO_MMIO_DRIVER_FEATURES_SEL
	.word	VIRTIO_MMIO_DRIVER_FEATURES
	.word	VIRTIO_F_VERSION_1
	.word	.LC0
	.word	EINVAL
	.size	vm_finalize_features, .-vm_finalize_features
	.comm	VIRTIO_MMIO_DRIVER_FEATURES_SEL,4,4
	.comm	VIRTIO_MMIO_DRIVER_FEATURES,4,4
	.comm	VIRTIO_F_VERSION_1,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
