	.file	"extr_ecore_sp.c_ecore_state_wait.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"waiting for state to become %d\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"timeout waiting for state %d\n"
	.text
	.p2align 4
	.type	ecore_state_wait, @function
ecore_state_wait:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	CHIP_REV_IS_EMUL@PLT
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	cmp	rax, 1
	sbb	ebx, ebx
	call	ECORE_MSG@PLT
	and	ebx, -95000
	xor	eax, eax
	add	ebx, 99999
	call	ECORE_MIGHT_SLEEP@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	mov	ebx, eax
.L6:
	mov	rsi, r13
	mov	edi, r12d
	call	ECORE_TEST_BIT@PLT
	test	eax, eax
	je	.L11
	mov	esi, DWORD PTR delay_us[rip]
	mov	rdi, rbp
	call	ECORE_WAIT@PLT
	cmp	QWORD PTR 0[rbp], 0
	jne	.L12
	lea	eax, -1[rbx]
	test	ebx, ebx
	jne	.L8
	mov	esi, r12d
	lea	rdi, .LC1[rip]
	call	ECORE_ERR@PLT
	mov	eax, DWORD PTR ECORE_TIMEOUT[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR ECORE_SUCCESS[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L12:
	.cfi_restore_state
	mov	eax, DWORD PTR ECORE_IO[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ecore_state_wait, .-ecore_state_wait
	.comm	delay_us,4,4
	.comm	ECORE_TIMEOUT,4,4
	.comm	ECORE_SUCCESS,4,4
	.comm	ECORE_IO,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_ecore_sp.c_ecore_state_wait.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"waiting for state to become %d\012\000"
	.align	2
.LC1:
	.ascii	"timeout waiting for state %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ecore_state_wait, %function
ecore_state_wait:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r5, r0
	mov	r7, r2
	bl	CHIP_REV_IS_EMUL
	mov	r1, r0
	ldr	r3, .L13
	cmp	r1, #0
	mov	r2, r6
	mov	r0, r5
	ldr	r1, .L13+4
	ldr	r4, .L13+8
	ldr	r8, .L13+12
	movne	r4, r3
	bl	ECORE_MSG
	bl	ECORE_MIGHT_SLEEP
	b	.L6
.L8:
	mov	r4, r0
.L6:
	mov	r1, r7
	mov	r0, r6
	bl	ECORE_TEST_BIT
	cmp	r0, #0
	beq	.L11
	mov	r0, r5
	ldr	r1, [r8]
	bl	ECORE_WAIT
	ldr	r3, [r5]
	sub	r0, r4, #1
	cmp	r3, #0
	bne	.L12
	cmp	r4, #0
	bne	.L8
	mov	r1, r6
	ldr	r0, .L13+16
	bl	ECORE_ERR
	ldr	r3, .L13+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L13+24
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L13+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	.align	2
.L13:
	.word	99999
	.word	.LC0
	.word	4999
	.word	delay_us
	.word	.LC1
	.word	ECORE_TIMEOUT
	.word	ECORE_SUCCESS
	.word	ECORE_IO
	.size	ecore_state_wait, .-ecore_state_wait
	.comm	delay_us,4,4
	.comm	ECORE_TIMEOUT,4,4
	.comm	ECORE_SUCCESS,4,4
	.comm	ECORE_IO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
