	.file	"extr_subr_ndis.c_NdisMAllocateSharedMemory.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	NdisMAllocateSharedMemory, @function
NdisMAllocateSharedMemory:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L12
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR [rdi]
	mov	rbx, rcx
	mov	edi, DWORD PTR [rax]
	call	device_get_softc@PLT
	mov	esi, DWORD PTR M_DEVBUF[rip]
	mov	edx, DWORD PTR M_NOWAIT[rip]
	mov	edi, 32
	or	edx, DWORD PTR M_ZERO[rip]
	mov	r14, rax
	call	malloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L1
	mov	rdi, rax
	call	InitializeListHead@PLT
	lea	rax, 20[rbp]
	mov	edi, DWORD PTR 4[r14]
	xor	r9d, r9d
	push	rax
	.cfi_def_cfa_offset 56
	mov	eax, DWORD PTR BUS_DMA_ALLOCNOW[rip]
	xor	edx, edx
	mov	esi, 64
	mov	r8d, DWORD PTR BUS_SPACE_MAXADDR[rip]
	mov	ecx, DWORD PTR NDIS_BUS_SPACE_SHARED_MAXADDR[rip]
	push	0
	.cfi_def_cfa_offset 64
	push	0
	.cfi_def_cfa_offset 72
	push	rax
	.cfi_def_cfa_offset 80
	push	r12
	.cfi_def_cfa_offset 88
	push	1
	.cfi_def_cfa_offset 96
	push	r12
	.cfi_def_cfa_offset 104
	push	0
	.cfi_def_cfa_offset 112
	call	bus_dma_tag_create@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 48
	test	eax, eax
	jne	.L15
	mov	edi, DWORD PTR 20[rbp]
	mov	edx, DWORD PTR BUS_DMA_NOWAIT[rip]
	lea	rcx, 24[rbp]
	mov	rsi, rbx
	or	edx, DWORD PTR BUS_DMA_ZERO[rip]
	call	bus_dmamem_alloc@PLT
	test	eax, eax
	jne	.L16
	mov	eax, DWORD PTR BUS_DMA_NOWAIT[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	esi, DWORD PTR 24[rbp]
	mov	ecx, r12d
	mov	edi, DWORD PTR 20[rbp]
	mov	r8d, DWORD PTR ndis_mapshared_cb[rip]
	mov	r9, r13
	push	rax
	.cfi_def_cfa_offset 64
	mov	rdx, QWORD PTR [rbx]
	call	bus_dmamap_load@PLT
	pop	rdx
	.cfi_def_cfa_offset 56
	pop	rcx
	.cfi_def_cfa_offset 48
	test	eax, eax
	jne	.L18
	mov	rdi, r14
	call	NDIS_LOCK@PLT
	mov	eax, DWORD PTR 0[r13]
	mov	rdi, r14
	mov	rsi, rbp
	mov	DWORD PTR 16[rbp], eax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 8[rbp], rax
	call	InsertHeadList@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	mov	rdi, r14
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	NDIS_UNLOCK@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	edx, DWORD PTR 24[rbp]
	mov	edi, DWORD PTR 20[rbp]
	mov	rsi, QWORD PTR [rbx]
	call	bus_dmamem_free@PLT
.L16:
	mov	edi, DWORD PTR 20[rbp]
	call	bus_dma_tag_destroy@PLT
.L15:
	mov	esi, DWORD PTR M_DEVBUF[rip]
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	ret
	.cfi_endproc
.LFE0:
	.size	NdisMAllocateSharedMemory, .-NdisMAllocateSharedMemory
	.comm	ndis_mapshared_cb,4,4
	.comm	NDIS_BUS_SPACE_SHARED_MAXADDR,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_DEVBUF,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.comm	BUS_DMA_ZERO,4,4
	.comm	BUS_DMA_NOWAIT,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_subr_ndis.c_NdisMAllocateSharedMemory.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	NdisMAllocateSharedMemory, %function
NdisMAllocateSharedMemory:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	cmp	r0, #0
	sub	sp, sp, #40
	ldr	r8, [sp, #72]
	beq	.L1
	mov	r7, r3
	ldr	r3, [r0]
	mov	r5, r1
	ldr	r0, [r3]
	bl	device_get_softc
	ldr	r2, .L16
	ldr	r3, .L16+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r9, .L16+8
	mov	r6, r0
	ldr	r1, [r9]
	mov	r0, #20
	orr	r2, r2, r3
	bl	malloc
	subs	r4, r0, #0
	beq	.L1
	bl	InitializeListHead
	mov	r2, #0
	mov	ip, #1
	ldr	r3, .L16+12
	ldr	r1, .L16+16
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r0, [r6, #4]
	str	r3, [sp, #24]
	ldr	r3, .L16+20
	str	r1, [sp]
	str	r5, [sp, #20]
	str	r5, [sp, #12]
	add	r1, r4, #12
	str	r2, [sp, #32]
	str	r2, [sp, #28]
	str	r2, [sp, #8]
	str	r2, [sp, #4]
	str	ip, [sp, #16]
	ldr	r3, [r3]
	str	r1, [sp, #36]
	mov	r1, #64
	bl	bus_dma_tag_create
	cmp	r0, #0
	bne	.L12
	ldr	r3, .L16+24
	ldr	r10, .L16+28
	ldr	r2, [r3]
	ldr	r1, [r10]
	ldr	r0, [r4, #12]
	orr	r2, r1, r2
	add	r3, r4, #16
	mov	r1, r7
	bl	bus_dmamem_alloc
	cmp	r0, #0
	bne	.L13
	ldr	r3, .L16+32
	ldr	ip, [r10]
	ldr	r2, [r3]
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #12]
	stm	sp, {r2, r8, ip}
	mov	r3, r5
	ldr	r2, [r7]
	bl	bus_dmamap_load
	cmp	r0, #0
	bne	.L15
	mov	r0, r6
	bl	NDIS_LOCK
	ldr	r2, [r8]
	ldr	r3, [r7]
	mov	r1, r4
	mov	r0, r6
	str	r2, [r4, #8]
	str	r3, [r4, #4]
	bl	InsertHeadList
	mov	r0, r6
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	NDIS_UNLOCK
.L1:
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	ldr	r1, [r7]
	ldr	r2, [r4, #16]
	ldr	r0, [r4, #12]
	bl	bus_dmamem_free
.L13:
	ldr	r0, [r4, #12]
	bl	bus_dma_tag_destroy
.L12:
	mov	r0, r4
	ldr	r1, [r9]
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	free
.L17:
	.align	2
.L16:
	.word	M_NOWAIT
	.word	M_ZERO
	.word	M_DEVBUF
	.word	BUS_DMA_ALLOCNOW
	.word	BUS_SPACE_MAXADDR
	.word	NDIS_BUS_SPACE_SHARED_MAXADDR
	.word	BUS_DMA_ZERO
	.word	BUS_DMA_NOWAIT
	.word	ndis_mapshared_cb
	.size	NdisMAllocateSharedMemory, .-NdisMAllocateSharedMemory
	.comm	ndis_mapshared_cb,4,4
	.comm	NDIS_BUS_SPACE_SHARED_MAXADDR,4,4
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_DEVBUF,4,4
	.comm	BUS_SPACE_MAXADDR,4,4
	.comm	BUS_DMA_ZERO,4,4
	.comm	BUS_DMA_NOWAIT,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
