	.file	"extr_ntb_hw_intel.c_intel_ntb_atom_init_dev.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	intel_ntb_atom_init_dev, @function
intel_ntb_atom_init_dev:
.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	r12, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rsi, QWORD PTR [rdi]
	xor	edi, edi
	cmp	QWORD PTR NTB_CONN_B2B[rip], rsi
	sete	dil
	call	KASSERT@PLT
	mov	eax, DWORD PTR ATOM_SPAD_COUNT[rip]
	mov	edi, DWORD PTR 28[r12]
	mov	edx, 4
	mov	rcx, QWORD PTR ATOM_DB_COUNT[rip]
	mov	esi, 252
	mov	DWORD PTR 72[r12], eax
	mov	eax, DWORD PTR ATOM_DB_MSIX_VECTOR_COUNT[rip]
	mov	QWORD PTR 8[r12], rcx
	mov	DWORD PTR 68[r12], eax
	mov	eax, DWORD PTR ATOM_DB_MSIX_VECTOR_SHIFT[rip]
	mov	DWORD PTR 64[r12], eax
	mov	eax, 1
	sal	rax, cl
	mov	ecx, 4
	sub	rax, 1
	mov	QWORD PTR 16[r12], rax
	lea	rax, atom_reg[rip]
	mov	QWORD PTR 56[r12], rax
	lea	rax, atom_pri_reg[rip]
	mov	QWORD PTR 48[r12], rax
	lea	rax, atom_b2b_reg[rip]
	mov	QWORD PTR 40[r12], rax
	lea	rax, atom_sec_xlat[rip]
	mov	QWORD PTR 32[r12], rax
	call	pci_write_config@PLT
	mov	rdi, r12
	call	configure_atom_secondary_side_bars@PLT
	mov	esi, DWORD PTR ATOM_SPCICMD_OFFSET[rip]
	mov	edx, DWORD PTR PCIM_CMD_MEMEN[rip]
	mov	edi, 2
	or	edx, DWORD PTR PCIM_CMD_BUSMASTEREN[rip]
	call	intel_ntb_reg_write@PLT
	mov	rdi, r12
	call	intel_ntb_init_isr@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L1
	mov	edi, DWORD PTR 28[r12]
	mov	edx, DWORD PTR NTB_WIDTH_AUTO[rip]
	mov	esi, DWORD PTR NTB_SPEED_AUTO[rip]
	call	intel_ntb_link_enable@PLT
	mov	edx, DWORD PTR atom_link_hb[rip]
	mov	rcx, r12
	xor	esi, esi
	lea	rdi, 24[r12]
	call	callout_reset@PLT
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, r13d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	intel_ntb_atom_init_dev, .-intel_ntb_atom_init_dev
	.comm	atom_sec_xlat,4,4
	.comm	atom_reg,4,4
	.comm	atom_pri_reg,4,4
	.comm	atom_link_hb,4,4
	.comm	atom_b2b_reg,4,4
	.comm	PCIM_CMD_MEMEN,4,4
	.comm	PCIM_CMD_BUSMASTEREN,4,4
	.comm	NTB_WIDTH_AUTO,4,4
	.comm	NTB_SPEED_AUTO,4,4
	.comm	NTB_CONN_B2B,8,8
	.comm	ATOM_SPCICMD_OFFSET,4,4
	.comm	ATOM_SPAD_COUNT,4,4
	.comm	ATOM_DB_MSIX_VECTOR_SHIFT,4,4
	.comm	ATOM_DB_MSIX_VECTOR_COUNT,4,4
	.comm	ATOM_DB_COUNT,8,8
	.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_ntb_hw_intel.c_intel_ntb_atom_init_dev.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_ntb_atom_init_dev, %function
intel_ntb_atom_init_dev:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L5
	push	{r4, r5, r6, lr}
	ldr	r1, [r0]
	mov	r4, r0
	ldr	r0, [r3]
	sub	r0, r0, r1
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	mov	ip, #1
	mov	r3, #4
	ldr	r2, .L5+4
	ldr	lr, .L5+8
	ldr	r0, .L5+12
	ldr	r1, [r2]
	ldr	r5, [lr]
	ldr	lr, [r2, #4]
	ldr	r2, .L5+16
	ldr	r0, [r0]
	str	r5, [r4, #56]
	ldr	r5, [r2]
	sub	r2, r1, #32
	lsl	r2, ip, r2
	str	r1, [r4, #8]
	str	r0, [r4, #52]
	lsl	r0, ip, r1
	rsb	r1, r1, #32
	subs	r0, r0, #1
	orr	r2, r2, ip, lsr r1
	sbc	r2, r2, #0
	ldr	ip, .L5+20
	ldr	r1, .L5+24
	str	lr, [r4, #12]
	str	r2, [r4, #20]
	ldr	lr, .L5+28
	ldr	r2, .L5+32
	str	lr, [r4, #44]
	str	ip, [r4, #40]
	str	r5, [r4, #48]
	str	r0, [r4, #16]
	str	r1, [r4, #36]
	str	r2, [r4, #32]
	mov	r1, #252
	mov	r2, r3
	ldr	r0, [r4, #28]
	bl	pci_write_config
	mov	r0, r4
	bl	configure_atom_secondary_side_bars
	ldr	r2, .L5+36
	ldr	r3, .L5+40
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L5+44
	orr	r2, r1, r2
	mov	r0, #2
	ldr	r1, [r3]
	bl	intel_ntb_reg_write
	mov	r0, r4
	bl	intel_ntb_init_isr
	subs	r5, r0, #0
	bne	.L1
	ldr	r3, .L5+48
	ldr	r2, .L5+52
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, [r4, #28]
	bl	intel_ntb_link_enable
	ldr	r2, .L5+56
	mov	r3, r4
	mov	r1, r5
	ldr	r2, [r2]
	add	r0, r4, #24
	bl	callout_reset
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L6:
	.align	2
.L5:
	.word	NTB_CONN_B2B
	.word	ATOM_DB_COUNT
	.word	ATOM_SPAD_COUNT
	.word	ATOM_DB_MSIX_VECTOR_COUNT
	.word	ATOM_DB_MSIX_VECTOR_SHIFT
	.word	atom_pri_reg
	.word	atom_b2b_reg
	.word	atom_reg
	.word	atom_sec_xlat
	.word	PCIM_CMD_MEMEN
	.word	PCIM_CMD_BUSMASTEREN
	.word	ATOM_SPCICMD_OFFSET
	.word	NTB_SPEED_AUTO
	.word	NTB_WIDTH_AUTO
	.word	atom_link_hb
	.size	intel_ntb_atom_init_dev, .-intel_ntb_atom_init_dev
	.comm	atom_sec_xlat,4,4
	.comm	atom_reg,4,4
	.comm	atom_pri_reg,4,4
	.comm	atom_link_hb,4,4
	.comm	atom_b2b_reg,4,4
	.comm	PCIM_CMD_MEMEN,4,4
	.comm	PCIM_CMD_BUSMASTEREN,4,4
	.comm	NTB_WIDTH_AUTO,4,4
	.comm	NTB_SPEED_AUTO,4,4
	.comm	NTB_CONN_B2B,4,4
	.comm	ATOM_SPCICMD_OFFSET,4,4
	.comm	ATOM_SPAD_COUNT,4,4
	.comm	ATOM_DB_MSIX_VECTOR_SHIFT,4,4
	.comm	ATOM_DB_MSIX_VECTOR_COUNT,4,4
	.comm	ATOM_DB_COUNT,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
