	.file	"extr_rtl8366rb.c_smi_select.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"smi_select"
	.text
	.p2align 4
	.type	smi_select, @function
smi_select:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	device_get_softc@PLT
	mov	edi, ebx
	mov	r15, rax
	call	device_get_parent@PLT
	mov	edi, ebx
	mov	ebp, eax
	call	IICBUS_IVAR@PLT
	mov	edi, ebx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 12[rsp], eax
	call	device_get_softc@PLT
	mov	rdi, rax
	call	RTL_SMI_ACQUIRED_ASSERT@PLT
	mov	rax, QWORD PTR RTL8366SR[rip]
	cmp	QWORD PTR [r15], rax
	je	.L7
.L5:
	mov	ebx, DWORD PTR RTL_IICBUS_RETRIES[rip]
	or	r13d, DWORD PTR 12[rsp]
	lea	r15, .LC0[rip]
	test	ebx, ebx
	jne	.L6
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	cmp	DWORD PTR RTL_WAITOK[rip], r14d
	jne	.L1
	mov	edi, DWORD PTR iic_select_retries[rip]
	call	DEBUG_INCRVAR@PLT
	mov	esi, DWORD PTR RTL_IICBUS_RETRY_SLEEP[rip]
	mov	rdi, r15
	call	pause@PLT
	sub	ebx, 1
	je	.L1
.L6:
	mov	edx, DWORD PTR RTL_IICBUS_TIMEOUT[rip]
	mov	esi, r13d
	mov	edi, ebp
	call	iicbus_start@PLT
	cmp	DWORD PTR IIC_ENOACK[rip], eax
	mov	r12d, eax
	je	.L13
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	r15d, 3
.L2:
	mov	edi, ebx
	call	device_get_parent@PLT
	mov	edi, eax
	call	device_get_parent@PLT
	mov	edi, eax
	call	IICBUS_STOP@PLT
	sub	r15d, 1
	jne	.L2
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	smi_select, .-smi_select
	.comm	iic_select_retries,4,4
	.comm	RTL_WAITOK,4,4
	.comm	RTL_IICBUS_TIMEOUT,4,4
	.comm	RTL_IICBUS_RETRY_SLEEP,4,4
	.comm	RTL_IICBUS_RETRIES,4,4
	.comm	RTL8366SR,8,8
	.comm	IIC_ENOACK,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_rtl8366rb.c_smi_select.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"smi_select\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smi_select, %function
smi_select:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	str	r2, [sp]
	str	r1, [sp, #4]
	mov	r5, r0
	bl	device_get_softc
	mov	r8, r0
	mov	r0, r5
	bl	device_get_parent
	mov	r6, r0
	mov	r0, r5
	bl	IICBUS_IVAR
	mov	r3, r0
	mov	r0, r5
	ldr	r7, [r3]
	bl	device_get_softc
	bl	RTL_SMI_ACQUIRED_ASSERT
	ldr	r3, .L15
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L7
.L5:
	ldr	r3, .L15+4
	ldr	r5, [r3]
	cmp	r5, #0
	beq	.L1
	ldr	r3, [sp, #4]
	ldr	r9, .L15+8
	ldr	r8, .L15+12
	ldr	r10, .L15+16
	ldr	fp, .L15+20
	orr	r7, r7, r3
	b	.L6
.L14:
	ldr	r2, [r10]
	ldr	r3, [sp]
	cmp	r2, r3
	bne	.L1
	ldr	r3, .L15+24
	ldr	r0, [r3]
	bl	DEBUG_INCRVAR
	ldr	r3, .L15+28
	mov	r0, fp
	ldr	r1, [r3]
	bl	pause
	subs	r5, r5, #1
	beq	.L1
.L6:
	ldr	r2, [r9]
	mov	r1, r7
	mov	r0, r6
	bl	iicbus_start
	ldr	r2, [r8]
	mov	r4, r0
	cmp	r2, r0
	beq	.L14
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r8, #3
.L2:
	mov	r0, r5
	bl	device_get_parent
	bl	device_get_parent
	bl	IICBUS_STOP
	subs	r8, r8, #1
	bne	.L2
	b	.L5
.L16:
	.align	2
.L15:
	.word	RTL8366SR
	.word	RTL_IICBUS_RETRIES
	.word	RTL_IICBUS_TIMEOUT
	.word	IIC_ENOACK
	.word	RTL_WAITOK
	.word	.LC0
	.word	iic_select_retries
	.word	RTL_IICBUS_RETRY_SLEEP
	.size	smi_select, .-smi_select
	.comm	iic_select_retries,4,4
	.comm	RTL_WAITOK,4,4
	.comm	RTL_IICBUS_TIMEOUT,4,4
	.comm	RTL_IICBUS_RETRY_SLEEP,4,4
	.comm	RTL_IICBUS_RETRIES,4,4
	.comm	RTL8366SR,4,4
	.comm	IIC_ENOACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
