	.file	"extr_adm6996fc.c_adm6996fc_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"adm6996fc"
	.text
	.p2align 4
	.type	adm6996fc_attach, @function
adm6996fc_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	ecx, DWORD PTR MTX_DEF[rip]
	xor	edx, edx
	lea	rsi, .LC0[rip]
	mov	DWORD PTR 68[rax], r12d
	lea	rdi, 64[rax]
	mov	rbp, rax
	call	mtx_init@PLT
	mov	edi, r12d
	call	device_get_desc@PLT
	mov	edi, DWORD PTR 60[rbp]
	mov	edx, 4
	mov	esi, eax
	call	strlcpy@PLT
	mov	DWORD PTR 52[rbp], 16
	mov	edi, 48
	movabs	rax, 133143986182
	mov	QWORD PTR 0[rbp], rax
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	movabs	rax, 429496729605
	mov	QWORD PTR 8[rbp], rax
	mov	eax, DWORD PTR ETHERSWITCH_VLAN_PORT[rip]
	or	eax, DWORD PTR ETHERSWITCH_VLAN_DOT1Q[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	DWORD PTR 56[rbp], eax
	or	edx, DWORD PTR M_ZERO[rip]
	call	malloc@PLT
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	QWORD PTR 16[rbp], rax
	mov	eax, DWORD PTR 0[rbp]
	or	edx, DWORD PTR M_ZERO[rip]
	lea	edi, 0[0+rax*8]
	call	malloc@PLT
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	QWORD PTR 24[rbp], rax
	mov	eax, DWORD PTR 0[rbp]
	or	edx, DWORD PTR M_ZERO[rip]
	lea	edi, 0[0+rax*8]
	call	malloc@PLT
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	QWORD PTR 32[rbp], rax
	mov	eax, DWORD PTR 0[rbp]
	or	edx, DWORD PTR M_ZERO[rip]
	lea	edi, 0[0+rax*4]
	call	malloc@PLT
	cmp	QWORD PTR 16[rbp], 0
	mov	QWORD PTR 40[rbp], rax
	mov	rdi, rax
	je	.L2
	cmp	QWORD PTR 24[rbp], 0
	je	.L2
	cmp	QWORD PTR 32[rbp], 0
	je	.L2
	test	rax, rax
	je	.L2
	mov	rdi, rbp
	call	adm6996fc_attach_phys@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L26
.L6:
	mov	rdi, QWORD PTR 40[rbp]
	test	rdi, rdi
	je	.L9
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	call	free@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR 32[rbp]
	test	rdi, rdi
	je	.L10
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	call	free@PLT
.L10:
	mov	rdi, QWORD PTR 24[rbp]
	test	rdi, rdi
	je	.L11
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	call	free@PLT
.L11:
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L1
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	call	free@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
.L2:
	.cfi_restore_state
.L5:
	endbr64
	mov	r13d, DWORD PTR ENOMEM[rip]
	test	rdi, rdi
	je	.L9
	mov	esi, DWORD PTR M_ADM6996FC[rip]
	call	free@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, r12d
	call	bus_generic_probe@PLT
	mov	edi, r12d
	call	bus_enumerate_hinted_children@PLT
	mov	edi, r12d
	call	bus_generic_attach@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L6
	lea	rdi, 48[rbp]
	xor	esi, esi
	call	callout_init@PLT
	mov	rdi, rbp
	call	adm6996fc_tick@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	adm6996fc_attach, .-adm6996fc_attach
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_ADM6996FC,4,4
	.comm	MTX_DEF,4,4
	.comm	ETHERSWITCH_VLAN_PORT,4,4
	.comm	ETHERSWITCH_VLAN_DOT1Q,4,4
	.comm	ENOMEM,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_adm6996fc.c_adm6996fc_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"adm6996fc\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adm6996fc_attach, %function
adm6996fc_attach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	bl	device_get_softc
	mov	r4, r0
	ldr	r3, .L32
	mov	r2, #0
	ldr	r3, [r3]
	ldr	r1, .L32+4
	str	r6, [r0, #52]
	add	r0, r0, #48
	bl	mtx_init
	mov	r0, r6
	ldr	r5, [r4, #44]
	bl	device_get_desc
	mov	r2, #4
	mov	r1, r0
	mov	r0, r5
	bl	strlcpy
	mov	r1, #31
	mov	r2, #5
	mov	lr, #6
	mov	ip, #100
	mov	r0, #16
	ldr	r3, .L32+8
	ldr	r5, .L32+12
	ldr	r8, .L32+16
	ldr	r5, [r5]
	ldr	r7, .L32+20
	ldr	r3, [r3]
	str	r1, [r4, #4]
	orr	r3, r3, r5
	ldr	r1, [r8]
	ldr	r5, .L32+24
	str	r2, [r4, #8]
	ldr	r2, [r7]
	str	lr, [r4]
	str	ip, [r4, #12]
	orr	r2, r1, r2
	str	r0, [r4, #36]
	ldr	r1, [r5]
	str	r3, [r4, #40]
	mov	r0, #24
	bl	malloc
	ldr	r1, [r4]
	ldr	r3, [r7]
	ldr	r2, [r8]
	str	r0, [r4, #16]
	orr	r2, r2, r3
	lsl	r0, r1, #2
	ldr	r1, [r5]
	bl	malloc
	ldr	r1, [r4]
	ldr	r3, [r7]
	ldr	r2, [r8]
	str	r0, [r4, #20]
	orr	r2, r2, r3
	lsl	r0, r1, #2
	ldr	r1, [r5]
	bl	malloc
	ldr	r1, [r8]
	ldr	r3, [r4]
	ldr	r2, [r7]
	str	r0, [r4, #24]
	orr	r2, r1, r2
	lsl	r0, r3, #2
	ldr	r1, [r5]
	bl	malloc
	ldr	r3, [r4, #16]
	str	r0, [r4, #28]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r4, #24]
	cmp	r0, #0
	cmpne	r3, #0
	beq	.L2
	mov	r0, r4
	bl	adm6996fc_attach_phys
	subs	r7, r0, #0
	beq	.L31
.L5:
	ldr	r0, [r4, #28]
	cmp	r0, #0
	beq	.L8
	ldr	r1, [r5]
	bl	free
.L8:
	ldr	r0, [r4, #24]
	cmp	r0, #0
	beq	.L9
	ldr	r1, [r5]
	bl	free
.L9:
	ldr	r0, [r4, #20]
	cmp	r0, #0
	beq	.L10
	ldr	r1, [r5]
	bl	free
.L10:
	ldr	r0, [r4, #16]
	cmp	r0, #0
	beq	.L1
	ldr	r1, [r5]
	bl	free
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
.L4:
	ldr	r3, .L32+28
	cmp	r0, #0
	ldr	r7, [r3]
	beq	.L8
	ldr	r1, [r5]
	bl	free
	b	.L8
.L31:
	mov	r0, r6
	bl	bus_generic_probe
	mov	r0, r6
	bl	bus_enumerate_hinted_children
	mov	r0, r6
	bl	bus_generic_attach
	subs	r7, r0, #0
	bne	.L5
	mov	r1, r7
	add	r0, r4, #32
	bl	callout_init
	mov	r0, r4
	bl	adm6996fc_tick
	b	.L1
.L33:
	.align	2
.L32:
	.word	MTX_DEF
	.word	.LC0
	.word	ETHERSWITCH_VLAN_PORT
	.word	ETHERSWITCH_VLAN_DOT1Q
	.word	M_WAITOK
	.word	M_ZERO
	.word	M_ADM6996FC
	.word	ENOMEM
	.size	adm6996fc_attach, .-adm6996fc_attach
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_ADM6996FC,4,4
	.comm	MTX_DEF,4,4
	.comm	ETHERSWITCH_VLAN_PORT,4,4
	.comm	ETHERSWITCH_VLAN_DOT1Q,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
