	.file	"extr_msgdma.c_msgdma_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"could not allocate resources for device\n"
	.align 8
.LC1:
	.string	"Unable to alloc interrupt resource.\n"
	.text
	.p2align 4
	.type	msgdma_attach, @function
msgdma_attach:
.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, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	call	device_get_softc@PLT
	mov	esi, DWORD PTR msgdma_spec[rip]
	mov	edi, r12d
	mov	DWORD PTR 48[rax], r12d
	mov	rdx, QWORD PTR 8[rax]
	mov	rbp, rax
	call	bus_alloc_resources@PLT
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR [rax]
	call	rman_get_bustag@PLT
	mov	QWORD PTR 40[rbp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR [rax]
	call	rman_get_bushandle@PLT
	mov	QWORD PTR 32[rbp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 4[rax]
	call	rman_get_bustag@PLT
	mov	QWORD PTR 24[rbp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 4[rax]
	call	rman_get_bushandle@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	r9, rbp
	xor	ecx, ecx
	mov	QWORD PTR 16[rbp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, r12d
	mov	r8d, DWORD PTR msgdma_intr[rip]
	mov	edx, DWORD PTR INTR_TYPE_MISC[rip]
	mov	esi, DWORD PTR 8[rax]
	or	edx, DWORD PTR INTR_MPSAFE[rip]
	push	rbp
	.cfi_def_cfa_offset 48
	call	bus_setup_intr@PLT
	mov	r13d, eax
	pop	rax
	.cfi_def_cfa_offset 40
	pop	rdx
	.cfi_def_cfa_offset 32
	test	r13d, r13d
	jne	.L9
	mov	edi, r12d
	call	ofw_bus_get_node@PLT
	mov	edi, eax
	call	OF_xref_from_node@PLT
	mov	esi, r12d
	mov	edi, eax
	call	OF_device_register_xref@PLT
	mov	rdi, rbp
	call	msgdma_reset@PLT
	test	rax, rax
	jne	.L5
	mov	edx, DWORD PTR CONTROL_GIEM[rip]
	mov	esi, DWORD PTR DMA_CONTROL[rip]
	mov	rdi, rbp
	call	WRITE4@PLT
.L1:
	mov	eax, r13d
	pop	rbp
	.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
.L9:
	.cfi_restore_state
	mov	edi, r12d
	lea	rsi, .LC1[rip]
	call	device_printf@PLT
	mov	r13d, DWORD PTR ENXIO[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edi, r12d
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	mov	r13d, DWORD PTR ENXIO[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	mov	r13d, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	msgdma_attach, .-msgdma_attach
	.comm	msgdma_spec,4,4
	.comm	msgdma_intr,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	INTR_MPSAFE,4,4
	.comm	ENXIO,4,4
	.comm	DMA_CONTROL,4,4
	.comm	CONTROL_GIEM,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_msgdma.c_msgdma_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"could not allocate resources for device\012\000"
	.align	2
.LC1:
	.ascii	"Unable to alloc interrupt resource.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msgdma_attach, %function
msgdma_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #16
	mov	r5, r0
	bl	device_get_softc
	ldr	r3, .L10
	ldr	r2, [r0, #4]
	str	r5, [r0, #24]
	mov	r4, r0
	ldr	r1, [r3]
	mov	r0, r5
	bl	bus_alloc_resources
	subs	r6, r0, #0
	bne	.L8
	ldr	r3, [r4, #4]
	ldr	r0, [r3]
	bl	rman_get_bustag
	ldr	r3, [r4, #4]
	str	r0, [r4, #20]
	ldr	r0, [r3]
	bl	rman_get_bushandle
	ldr	r3, [r4, #4]
	str	r0, [r4, #16]
	ldr	r0, [r3, #4]
	bl	rman_get_bustag
	ldr	r3, [r4, #4]
	str	r0, [r4, #12]
	ldr	r0, [r3, #4]
	bl	rman_get_bushandle
	ldr	ip, .L10+4
	ldr	r3, .L10+8
	ldr	r2, .L10+12
	ldr	lr, [ip]
	ldr	r1, [r4, #4]
	ldr	r2, [r2]
	ldr	ip, [r3]
	ldr	r1, [r1, #8]
	mov	r3, r6
	str	r0, [r4, #8]
	orr	r2, lr, r2
	mov	r0, r5
	str	r4, [sp, #8]
	str	r4, [sp, #4]
	str	ip, [sp]
	bl	bus_setup_intr
	cmp	r0, #0
	mov	r0, r5
	bne	.L9
	bl	ofw_bus_get_node
	bl	OF_xref_from_node
	mov	r1, r5
	bl	OF_device_register_xref
	mov	r0, r4
	bl	msgdma_reset
	subs	r5, r0, #0
	bne	.L5
	ldr	r2, .L10+16
	ldr	r3, .L10+20
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	WRITE4
.L1:
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r1, .L10+24
	bl	device_printf
	ldr	r3, .L10+28
	ldr	r5, [r3]
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L8:
	mov	r0, r5
	ldr	r1, .L10+32
	bl	device_printf
	ldr	r3, .L10+28
	ldr	r5, [r3]
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	mvn	r5, #0
	b	.L1
.L11:
	.align	2
.L10:
	.word	msgdma_spec
	.word	INTR_TYPE_MISC
	.word	msgdma_intr
	.word	INTR_MPSAFE
	.word	CONTROL_GIEM
	.word	DMA_CONTROL
	.word	.LC1
	.word	ENXIO
	.word	.LC0
	.size	msgdma_attach, .-msgdma_attach
	.comm	msgdma_spec,4,4
	.comm	msgdma_intr,4,4
	.comm	INTR_TYPE_MISC,4,4
	.comm	INTR_MPSAFE,4,4
	.comm	ENXIO,4,4
	.comm	DMA_CONTROL,4,4
	.comm	CONTROL_GIEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
