	.file	"extr_switch.c_tb_init_port.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" Port %d: not implemented\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"non switch port without a PHY\n"
	.text
	.p2align 4
	.type	tb_init_port, @function
tb_init_port:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edx, DWORD PTR TB_CFG_PORT[rip]
	mov	r8d, 8
	xor	ecx, ecx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, 24[rdi]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rsi, rbp
	mov	rbx, rdi
	call	tb_port_read@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L2
	add	eax, DWORD PTR ENODEV[rip]
	je	.L14
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	mov	rcx, QWORD PTR TB_TYPE_PORT[rip]
	cmp	QWORD PTR 24[rbx], rcx
	je	.L15
	test	rax, rax
	jne	.L16
.L6:
	mov	rax, QWORD PTR 32[rbx]
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax]
	call	tb_dump_port@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L1
	lea	rdi, 20[rbx]
	call	ida_init@PLT
	lea	rdi, 16[rbx]
	call	ida_init@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	test	rax, rax
	je	.L6
	mov	esi, DWORD PTR TB_PORT_CAP_PHY[rip]
	mov	rdi, rbx
	call	tb_port_find_cap@PLT
	test	eax, eax
	jle	.L7
	mov	DWORD PTR 8[rbx], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, DWORD PTR TB_PORT_CAP_ADAP[rip]
	mov	rdi, rbx
	call	tb_port_find_cap@PLT
	test	eax, eax
	jle	.L6
	mov	DWORD PTR 12[rbx], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR 32[rbx]
	mov	rdx, QWORD PTR [rbx]
	xor	r12d, r12d
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR [rax]
	call	tb_dbg@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	rdi, rbx
	call	tb_port_WARN@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	tb_init_port, .-tb_init_port
	.comm	TB_TYPE_PORT,8,8
	.comm	TB_PORT_CAP_PHY,4,4
	.comm	TB_PORT_CAP_ADAP,4,4
	.comm	TB_CFG_PORT,4,4
	.comm	ENODEV,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_switch.c_tb_init_port.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	" Port %d: not implemented\012\000"
	.align	2
.LC1:
	.ascii	"non switch port without a PHY\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tb_init_port, %function
tb_init_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #8
	push	{r4, r5, r6, lr}
	ldr	r3, .L18
	sub	sp, sp, #8
	add	r6, r0, #20
	str	r2, [sp]
	ldr	r2, [r3]
	mov	r1, r6
	mov	r3, #0
	mov	r4, r0
	bl	tb_port_read
	subs	r5, r0, #0
	beq	.L2
	ldr	r3, .L18+4
	ldr	r3, [r3]
	cmn	r5, r3
	beq	.L15
.L1:
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L18+8
	ldr	r1, [r4, #20]
	ldr	r2, [r3]
	ldr	r3, [r4]
	cmp	r1, r2
	beq	.L16
	cmp	r3, #0
	bne	.L17
.L6:
	ldr	r3, [r4, #24]
	mov	r1, r6
	ldr	r0, [r3]
	bl	tb_dump_port
	ldr	r3, [r4]
	cmp	r3, #0
	moveq	r5, r3
	beq	.L1
	add	r0, r4, #16
	bl	ida_init
	add	r0, r4, #12
	bl	ida_init
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L16:
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L18+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	tb_port_find_cap
	cmp	r0, #0
	strgt	r0, [r4, #4]
	bgt	.L6
	mov	r0, r4
	ldr	r1, .L18+16
	bl	tb_port_WARN
	b	.L6
.L17:
	ldr	r3, .L18+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	tb_port_find_cap
	cmp	r0, #0
	strgt	r0, [r4, #8]
	b	.L6
.L15:
	mov	r5, #0
	ldr	r3, [r4, #24]
	ldr	r2, [r4]
	ldr	r0, [r3]
	ldr	r1, .L18+24
	bl	tb_dbg
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L19:
	.align	2
.L18:
	.word	TB_CFG_PORT
	.word	ENODEV
	.word	TB_TYPE_PORT
	.word	TB_PORT_CAP_PHY
	.word	.LC1
	.word	TB_PORT_CAP_ADAP
	.word	.LC0
	.size	tb_init_port, .-tb_init_port
	.comm	TB_TYPE_PORT,4,4
	.comm	TB_PORT_CAP_PHY,4,4
	.comm	TB_PORT_CAP_ADAP,4,4
	.comm	TB_CFG_PORT,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
