	.file	"extr_drm_pci.c_drm_pci_alloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"drm_pci_alloc with non-power-of-two alignment %d\n"
	.align 8
.LC1:
	.string	"called while holding dma_lock\n"
	.text
	.p2align 4
	.globl	drm_pci_alloc
	.type	drm_pci_alloc, @function
drm_pci_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, -1[rdx]
	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
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	test	rax, rdx
	jne	.L20
	mov	r13, rsi
	mov	esi, DWORD PTR DRM_MEM_DMA[rip]
	mov	rbx, rdi
	mov	r14d, ecx
	mov	edx, DWORD PTR M_ZERO[rip]
	mov	edi, 12
	or	edx, DWORD PTR M_NOWAIT[rip]
	call	malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	lea	r15, 4[rbx]
	mov	esi, DWORD PTR MA_NOTOWNED[rip]
	mov	rdi, r15
	call	mtx_assert@PLT
	mov	rdi, r15
	call	mtx_owned@PLT
	test	rax, rax
	jne	.L21
.L4:
	mov	edi, DWORD PTR [rbx]
	mov	r15d, DWORD PTR BUS_SPACE_MAXADDR[rip]
	call	bus_get_dma_tag@PLT
	push	r12
	.cfi_def_cfa_offset 72
	xor	r9d, r9d
	mov	r8d, r15d
	push	0
	.cfi_def_cfa_offset 80
	mov	edi, eax
	mov	ecx, r14d
	xor	edx, edx
	push	0
	.cfi_def_cfa_offset 88
	mov	rsi, rbp
	push	0
	.cfi_def_cfa_offset 96
	push	r13
	.cfi_def_cfa_offset 104
	push	1
	.cfi_def_cfa_offset 112
	push	r13
	.cfi_def_cfa_offset 120
	push	0
	.cfi_def_cfa_offset 128
	call	bus_dma_tag_create@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 64
	test	eax, eax
	jne	.L17
	mov	edi, DWORD PTR [r12]
	mov	edx, DWORD PTR BUS_DMA_WAITOK[rip]
	lea	rcx, 4[r12]
	lea	rsi, 8[r12]
	or	edx, DWORD PTR BUS_DMA_ZERO[rip]
	or	edx, DWORD PTR BUS_DMA_NOCACHE[rip]
	call	bus_dmamem_alloc@PLT
	test	eax, eax
	jne	.L18
	mov	eax, DWORD PTR BUS_DMA_NOWAIT[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	rcx, r13
	mov	r9, r12
	mov	edx, DWORD PTR 8[r12]
	mov	esi, DWORD PTR 4[r12]
	push	rax
	.cfi_def_cfa_offset 80
	mov	r8d, DWORD PTR drm_pci_busdma_callback[rip]
	mov	edi, DWORD PTR [r12]
	call	bus_dmamap_load@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	test	eax, eax
	jne	.L22
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DRM_ERROR@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR 4[r12]
	mov	esi, DWORD PTR 8[r12]
	mov	edi, DWORD PTR [r12]
	call	bus_dmamem_free@PLT
.L18:
	mov	edi, DWORD PTR [r12]
	call	bus_dma_tag_destroy@PLT
.L17:
	mov	esi, DWORD PTR DRM_MEM_DMA[rip]
	mov	rdi, r12
	xor	r12d, r12d
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, edx
	lea	rdi, .LC0[rip]
	xor	eax, eax
	xor	r12d, r12d
	call	DRM_ERROR@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	drm_pci_alloc, .-drm_pci_alloc
	.comm	drm_pci_busdma_callback,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	MA_NOTOWNED,4,4
	.comm	DRM_MEM_DMA,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.comm	BUS_DMA_ZERO,4,4
	.comm	BUS_DMA_WAITOK,4,4
	.comm	BUS_DMA_NOWAIT,4,4
	.comm	BUS_DMA_NOCACHE,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_drm_pci.c_drm_pci_alloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"drm_pci_alloc with non-power-of-two alignment %d\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"called while holding dma_lock\012\000"
	.text
	.align	2
	.global	drm_pci_alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	drm_pci_alloc, %function
drm_pci_alloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r2
	sub	r2, r2, #1
	tst	r2, r5
	sub	sp, sp, #40
	bne	.L19
	mov	r8, r3
	ldr	r2, .L23
	ldr	r3, .L23+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r10, .L23+8
	mov	r6, r0
	mov	r7, r1
	mov	r0, #12
	ldr	r1, [r10]
	orr	r2, r2, r3
	bl	malloc
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, .L23+12
	add	r9, r6, #4
	ldr	r1, [r3]
	mov	r0, r9
	bl	mtx_assert
	mov	r0, r9
	bl	mtx_owned
	cmp	r0, #0
	bne	.L20
.L4:
	ldr	r0, [r6]
	bl	bus_get_dma_tag
	mov	r6, #0
	mov	ip, #1
	ldr	r3, .L23+16
	str	r4, [sp, #36]
	ldr	r2, [r3]
	mov	r1, r5
	str	r2, [sp]
	mov	r3, r8
	mov	r2, r6
	str	r7, [sp, #20]
	str	r7, [sp, #12]
	str	r6, [sp, #32]
	str	r6, [sp, #28]
	str	r6, [sp, #24]
	str	r6, [sp, #8]
	str	r6, [sp, #4]
	str	ip, [sp, #16]
	bl	bus_dma_tag_create
	subs	r5, r0, #0
	bne	.L17
	mov	r1, r4
	ldr	r0, .L23+20
	ldr	r3, .L23+24
	ldr	r2, .L23+28
	ldr	ip, [r0]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, ip
	orr	r2, r3, r2
	ldr	r0, [r1], #8
	add	r3, r4, #4
	bl	bus_dmamem_alloc
	subs	r6, r0, #0
	bne	.L21
	ldr	r2, .L23+32
	ldr	r3, .L23+36
	ldr	lr, [r2]
	ldr	ip, [r3]
	ldm	r4, {r0, r1, r2}
	mov	r3, r7
	stmib	sp, {r4, lr}
	str	ip, [sp]
	bl	bus_dmamap_load
	cmp	r0, #0
	bne	.L22
.L1:
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	ldr	r0, .L23+40
	bl	DRM_ERROR
	b	.L4
.L21:
	ldr	r0, [r4]
	bl	bus_dma_tag_destroy
	mov	r0, r4
	mov	r4, r5
	ldr	r1, [r10]
	bl	free
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	mov	r4, #0
	mov	r1, r5
	ldr	r0, .L23+44
	bl	DRM_ERROR
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	ldr	r0, [r4]
	bl	bus_dmamem_free
	ldr	r0, [r4]
	bl	bus_dma_tag_destroy
.L17:
	mov	r0, r4
	mov	r4, r6
	ldr	r1, [r10]
	bl	free
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	.align	2
.L23:
	.word	M_ZERO
	.word	M_NOWAIT
	.word	DRM_MEM_DMA
	.word	MA_NOTOWNED
	.word	BUS_SPACE_MAXADDR
	.word	BUS_DMA_ZERO
	.word	BUS_DMA_WAITOK
	.word	BUS_DMA_NOCACHE
	.word	BUS_DMA_NOWAIT
	.word	drm_pci_busdma_callback
	.word	.LC1
	.word	.LC0
	.size	drm_pci_alloc, .-drm_pci_alloc
	.comm	drm_pci_busdma_callback,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	MA_NOTOWNED,4,4
	.comm	DRM_MEM_DMA,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.comm	BUS_DMA_ZERO,4,4
	.comm	BUS_DMA_WAITOK,4,4
	.comm	BUS_DMA_NOWAIT,4,4
	.comm	BUS_DMA_NOCACHE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
