	.file	"extr_vbox_main.c_vbox_hw_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"VRAM %08x\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"vboxvideo: hgsmi_test_query_conf failed\n"
	.text
	.p2align 4
	.globl	vbox_hw_init
	.type	vbox_hw_init, @function
vbox_hw_init:
.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
	mov	r12d, DWORD PTR ENOMEM[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, DWORD PTR VBE_DISPI_IOPORT_DATA[rip]
	call	inl@PLT
	mov	edi, DWORD PTR VBE_DISPI_ID_ANYX[rip]
	mov	DWORD PTR 32[rbx], eax
	call	vbox_check_supported@PLT
	mov	esi, DWORD PTR 32[rbx]
	lea	rdi, .LC0[rip]
	mov	DWORD PTR 36[rbx], eax
	call	DRM_INFO@PLT
	mov	r13d, DWORD PTR GUEST_HEAP_SIZE[rip]
	mov	rdi, rbx
	call	GUEST_HEAP_OFFSET@PLT
	mov	edi, DWORD PTR 8[rbx]
	xor	esi, esi
	mov	edx, eax
	mov	ecx, r13d
	call	pci_iomap_range@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	jne	.L2
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.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
.L2:
	.cfi_restore_state
	mov	esi, -1
	mov	edi, 4
	neg	r12d
	call	gen_pool_create@PLT
	mov	DWORD PTR 16[rbx], eax
	test	eax, eax
	je	.L5
	mov	r12d, DWORD PTR GUEST_HEAP_USABLE_SIZE[rip]
	mov	rdi, rbx
	call	GUEST_HEAP_OFFSET@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	rsi, QWORD PTR [rbx]
	mov	r8d, -1
	mov	ecx, r12d
	mov	edx, eax
	call	gen_pool_add_virt@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L15
.L6:
	mov	edi, DWORD PTR 16[rbx]
	call	gen_pool_destroy@PLT
.L5:
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, QWORD PTR [rbx]
	call	pci_iounmap@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.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
.L15:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbx]
	call	hgsmi_test_query_conf@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L16
	mov	rdi, rbx
	call	GUEST_HEAP_OFFSET@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR VBOX_VBVA_CONF32_MONITOR_COUNT[rip]
	lea	rdx, 24[rbx]
	mov	DWORD PTR 28[rbx], eax
	call	hgsmi_query_conf@PLT
	mov	edi, DWORD PTR u32[rip]
	mov	esi, DWORD PTR 24[rbx]
	mov	edx, 1
	mov	ecx, DWORD PTR VBOX_MAX_SCREENS[rip]
	call	clamp_t@PLT
	mov	rdi, rbx
	mov	DWORD PTR 24[rbx], eax
	call	have_hgsmi_mode_hints@PLT
	test	eax, eax
	jne	.L8
	mov	r12d, DWORD PTR ENOTSUPP[rip]
	neg	r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	mov	esi, DWORD PTR 24[rbx]
	mov	edi, DWORD PTR 12[rbx]
	mov	edx, 4
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	call	devm_kcalloc@PLT
	mov	DWORD PTR 20[rbx], eax
	test	eax, eax
	jne	.L9
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC1[rip]
	call	DRM_ERROR@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbx
	call	vbox_accel_init@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	vbox_hw_init, .-vbox_hw_init
	.comm	u32,4,4
	.comm	VBOX_VBVA_CONF32_MONITOR_COUNT,4,4
	.comm	VBOX_MAX_SCREENS,4,4
	.comm	VBE_DISPI_IOPORT_DATA,4,4
	.comm	VBE_DISPI_ID_ANYX,4,4
	.comm	GUEST_HEAP_USABLE_SIZE,4,4
	.comm	GUEST_HEAP_SIZE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOTSUPP,4,4
	.comm	ENOMEM,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_vbox_main.c_vbox_hw_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"VRAM %08x\012\000"
	.align	2
.LC1:
	.ascii	"vboxvideo: hgsmi_test_query_conf failed\012\000"
	.text
	.align	2
	.global	vbox_hw_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	vbox_hw_init, %function
vbox_hw_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L17
	ldr	r6, .L17+4
	mov	r4, r0
	sub	sp, sp, #12
	ldr	r0, [r3]
	ldr	r5, [r6]
	bl	inl
	ldr	r3, .L17+8
	str	r0, [r4, #28]
	ldr	r0, [r3]
	bl	vbox_check_supported
	ldr	r1, [r4, #28]
	str	r0, [r4, #32]
	ldr	r0, .L17+12
	bl	DRM_INFO
	mov	r0, r4
	ldr	r7, [r4, #4]
	bl	GUEST_HEAP_OFFSET
	ldr	r3, .L17+16
	mov	r2, r0
	mov	r1, #0
	mov	r0, r7
	ldr	r3, [r3]
	bl	pci_iomap_range
	cmp	r0, #0
	str	r0, [r4]
	bne	.L2
	ldr	r5, [r6]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	mvn	r1, #0
	mov	r0, #4
	bl	gen_pool_create
	cmp	r0, #0
	mov	r7, r0
	str	r0, [r4, #12]
	rsbeq	r5, r5, #0
	beq	.L5
	mov	r0, r4
	ldr	r5, [r4]
	bl	GUEST_HEAP_OFFSET
	mvn	ip, #0
	ldr	r3, .L17+20
	str	ip, [sp]
	mov	r2, r0
	mov	r1, r5
	mov	r0, r7
	ldr	r3, [r3]
	bl	gen_pool_add_virt
	subs	r5, r0, #0
	beq	.L15
.L6:
	ldr	r0, [r4, #12]
	bl	gen_pool_destroy
.L5:
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	bl	pci_iounmap
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L15:
	ldr	r0, [r4, #12]
	bl	hgsmi_test_query_conf
	subs	r5, r0, #0
	bne	.L16
	mov	r0, r4
	bl	GUEST_HEAP_OFFSET
	ldr	r3, .L17+24
	str	r0, [r4, #24]
	ldr	r1, [r3]
	add	r2, r4, #20
	ldr	r0, [r4, #12]
	bl	hgsmi_query_conf
	ldr	r2, .L17+28
	ldr	r3, .L17+32
	ldr	r0, [r2]
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, [r4, #20]
	bl	clamp_t
	mov	r3, r0
	mov	r0, r4
	str	r3, [r4, #20]
	bl	have_hgsmi_mode_hints
	cmp	r0, #0
	ldreq	r3, .L17+36
	ldreq	r5, [r3]
	rsbeq	r5, r5, #0
	beq	.L6
.L8:
	ldr	r3, .L17+40
	mov	r2, #4
	ldr	r3, [r3]
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #8]
	bl	devm_kcalloc
	cmp	r0, #0
	str	r0, [r4, #16]
	bne	.L9
	ldr	r5, [r6]
	rsb	r5, r5, #0
	b	.L6
.L16:
	ldr	r0, .L17+44
	bl	DRM_ERROR
	b	.L6
.L9:
	mov	r0, r4
	bl	vbox_accel_init
	subs	r5, r0, #0
	beq	.L1
	b	.L6
.L18:
	.align	2
.L17:
	.word	VBE_DISPI_IOPORT_DATA
	.word	ENOMEM
	.word	VBE_DISPI_ID_ANYX
	.word	.LC0
	.word	GUEST_HEAP_SIZE
	.word	GUEST_HEAP_USABLE_SIZE
	.word	VBOX_VBVA_CONF32_MONITOR_COUNT
	.word	u32
	.word	VBOX_MAX_SCREENS
	.word	ENOTSUPP
	.word	GFP_KERNEL
	.word	.LC1
	.size	vbox_hw_init, .-vbox_hw_init
	.comm	u32,4,4
	.comm	VBOX_VBVA_CONF32_MONITOR_COUNT,4,4
	.comm	VBOX_MAX_SCREENS,4,4
	.comm	VBE_DISPI_IOPORT_DATA,4,4
	.comm	VBE_DISPI_ID_ANYX,4,4
	.comm	GUEST_HEAP_USABLE_SIZE,4,4
	.comm	GUEST_HEAP_SIZE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOTSUPP,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
