	.file	"extr_hptiop.c_hptiop_internal_memalloc_mv.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"alloc ctlcfg_dmat failed\n"
.LC1:
	.string	"bus_dmamem_alloc failed!\n"
.LC2:
	.string	"bus_dmamap_load failed!\n"
	.text
	.p2align 4
	.type	hptiop_internal_memalloc_mv, @function
hptiop_internal_memalloc_mv:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	r9d, r9d
	xor	edx, edx
	mov	esi, 1
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR BUS_DMA_ALLOCNOW[rip]
	mov	edi, DWORD PTR 20[rdi]
	mov	r8d, DWORD PTR BUS_SPACE_MAXADDR[rip]
	mov	ecx, DWORD PTR BUS_SPACE_MAXADDR_32BIT[rip]
	push	rbx
	.cfi_def_cfa_offset 40
	push	0
	.cfi_def_cfa_offset 48
	push	0
	.cfi_def_cfa_offset 56
	push	rax
	.cfi_def_cfa_offset 64
	mov	eax, DWORD PTR BUS_SPACE_MAXSIZE_32BIT[rip]
	push	rax
	.cfi_def_cfa_offset 72
	push	1
	.cfi_def_cfa_offset 80
	push	2040
	.cfi_def_cfa_offset 88
	push	0
	.cfi_def_cfa_offset 96
	call	bus_dma_tag_create@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 32
	test	rax, rax
	jne	.L10
	mov	rdi, QWORD PTR [rbx]
	mov	edx, DWORD PTR BUS_DMA_WAITOK[rip]
	lea	rcx, 8[rbx]
	lea	rsi, 12[rbx]
	or	edx, DWORD PTR BUS_DMA_COHERENT[rip]
	call	bus_dmamem_alloc@PLT
	test	rax, rax
	jne	.L11
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	edx, DWORD PTR 12[rbx]
	mov	ecx, DWORD PTR MVIOP_IOCTLCFG_SIZE[rip]
	mov	r9, rbx
	mov	esi, DWORD PTR 8[rbx]
	mov	r8d, DWORD PTR hptiop_mv_map_ctlcfg[rip]
	push	0
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR [rbx]
	call	bus_dmamap_load@PLT
	pop	rdx
	.cfi_def_cfa_offset 40
	pop	rcx
	.cfi_def_cfa_offset 32
	test	rax, rax
	jne	.L12
	xor	r12d, r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbx]
	lea	rsi, .LC0[rip]
	mov	r12d, -1
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, DWORD PTR 16[rbx]
	lea	rsi, .LC1[rip]
	mov	r12d, -1
	call	device_printf@PLT
	mov	rdi, QWORD PTR [rbx]
	call	bus_dma_tag_destroy@PLT
	jmp	.L1
.L12:
	mov	edi, DWORD PTR 16[rbx]
	lea	rsi, .LC2[rip]
	mov	r12d, -1
	call	device_printf@PLT
	mov	rdi, QWORD PTR [rbx]
	test	rdi, rdi
	je	.L1
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 12[rbx]
	call	bus_dmamem_free@PLT
	mov	rdi, QWORD PTR [rbx]
	call	bus_dma_tag_destroy@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	hptiop_internal_memalloc_mv, .-hptiop_internal_memalloc_mv
	.comm	hptiop_mv_map_ctlcfg,4,4
	.comm	MVIOP_IOCTLCFG_SIZE,4,4
	.comm	BUS_SPACE_MAXSIZE_32BIT,4,4
	.comm	BUS_SPACE_MAXADDR_32BIT,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.comm	BUS_DMA_WAITOK,4,4
	.comm	BUS_DMA_COHERENT,4,4
	.comm	BUS_DMA_ALLOCNOW,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_hptiop.c_hptiop_internal_memalloc_mv.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"alloc ctlcfg_dmat failed\012\000"
	.align	2
.LC1:
	.ascii	"bus_dmamem_alloc failed!\012\000"
	.align	2
.LC2:
	.ascii	"bus_dmamap_load failed!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hptiop_internal_memalloc_mv, %function
hptiop_internal_memalloc_mv:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r0
	mov	r2, #0
	mov	r1, #1
	ldr	ip, .L14
	ldr	r0, .L14+4
	ldr	r3, .L14+8
	ldr	r5, [ip]
	sub	sp, sp, #44
	ldr	ip, [r0]
	ldr	lr, [r3]
	str	r4, [sp, #36]
	ldr	r0, [r4, #16]
	ldr	r3, .L14+12
	str	ip, [sp, #20]
	ldr	ip, .L14+16
	str	r5, [sp, #24]
	str	lr, [sp]
	str	r2, [sp, #32]
	str	r2, [sp, #28]
	str	r2, [sp, #8]
	str	r2, [sp, #4]
	str	r1, [sp, #16]
	ldr	r3, [r3]
	str	ip, [sp, #12]
	bl	bus_dma_tag_create
	cmp	r0, #0
	bne	.L11
	mov	r1, r4
	ldr	r2, .L14+20
	ldr	r3, .L14+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r0, [r1], #8
	orr	r2, r2, r3
	add	r3, r4, #4
	bl	bus_dmamem_alloc
	cmp	r0, #0
	bne	.L12
	ldr	r2, .L14+28
	ldr	r3, .L14+32
	ldr	r2, [r2]
	str	r0, [sp, #8]
	stm	sp, {r2, r4}
	ldr	r3, [r3]
	ldm	r4, {r0, r1, r2}
	bl	bus_dmamap_load
	cmp	r0, #0
	bne	.L13
.L1:
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, pc}
.L11:
	ldr	r0, [r4, #12]
	ldr	r1, .L14+36
	bl	device_printf
	mvn	r0, #0
	b	.L1
.L12:
	ldr	r1, .L14+40
	ldr	r0, [r4, #12]
	bl	device_printf
	ldr	r0, [r4]
	bl	bus_dma_tag_destroy
	mvn	r0, #0
	b	.L1
.L13:
	ldr	r1, .L14+44
	ldr	r0, [r4, #12]
	bl	device_printf
	ldr	r0, [r4]
	cmp	r0, #0
	mvneq	r0, #0
	beq	.L1
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	bl	bus_dmamem_free
	ldr	r0, [r4]
	bl	bus_dma_tag_destroy
	mvn	r0, #0
	b	.L1
.L15:
	.align	2
.L14:
	.word	BUS_DMA_ALLOCNOW
	.word	BUS_SPACE_MAXSIZE_32BIT
	.word	BUS_SPACE_MAXADDR
	.word	BUS_SPACE_MAXADDR_32BIT
	.word	2040
	.word	BUS_DMA_WAITOK
	.word	BUS_DMA_COHERENT
	.word	hptiop_mv_map_ctlcfg
	.word	MVIOP_IOCTLCFG_SIZE
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	hptiop_internal_memalloc_mv, .-hptiop_internal_memalloc_mv
	.comm	hptiop_mv_map_ctlcfg,4,4
	.comm	MVIOP_IOCTLCFG_SIZE,4,4
	.comm	BUS_SPACE_MAXSIZE_32BIT,4,4
	.comm	BUS_SPACE_MAXADDR_32BIT,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.comm	BUS_DMA_WAITOK,4,4
	.comm	BUS_DMA_COHERENT,4,4
	.comm	BUS_DMA_ALLOCNOW,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
