	.file	"extr_cpuidle-ux500.c_ux500_enter_idle.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ux500_enter_idle, @function
ux500_enter_idle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	smp_processor_id@PLT
	lea	rdi, master[rip]
	mov	ebp, eax
	call	atomic_inc_return@PLT
	mov	rbx, rax
	xor	eax, eax
	call	num_online_cpus@PLT
	cmp	rbx, rax
	je	.L16
.L3:
	xor	eax, eax
	call	cpu_do_idle@PLT
	lea	rdi, master[rip]
	call	atomic_dec@PLT
.L6:
	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
.L16:
	.cfi_restore_state
	lea	rdi, master_lock[rip]
	call	spin_trylock@PLT
	test	eax, eax
	je	.L3
	xor	eax, eax
	call	prcmu_gic_decouple@PLT
	test	rax, rax
	jne	.L17
	xor	edi, edi
	test	ebp, ebp
	sete	dil
	call	prcmu_is_cpu_in_wfi@PLT
	test	eax, eax
	je	.L7
	xor	eax, eax
	call	prcmu_copy_gic_settings@PLT
	test	rax, rax
	je	.L18
.L7:
	lea	rdi, master[rip]
	call	atomic_dec@PLT
	xor	eax, eax
	call	prcmu_gic_recouple@PLT
	lea	rdi, master_lock[rip]
	call	spin_unlock@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
.L17:
	.cfi_restore_state
	lea	rdi, master_lock[rip]
	call	spin_unlock@PLT
	lea	rdi, master[rip]
	call	atomic_dec@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	call	prcmu_gic_pending_irq@PLT
	test	rax, rax
	jne	.L7
	call	prcmu_pending_irq@PLT
	test	rax, rax
	jne	.L7
	mov	edi, DWORD PTR PRCMU_AP_IDLE[rip]
	mov	edx, 1
	mov	esi, 1
	call	prcmu_set_power_state@PLT
	test	rax, rax
	jne	.L7
	lea	rdi, master_lock[rip]
	call	spin_unlock@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	ux500_enter_idle, .-ux500_enter_idle
	.comm	master_lock,4,4
	.comm	master,4,4
	.comm	PRCMU_AP_IDLE,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_cpuidle-ux500.c_ux500_enter_idle.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ux500_enter_idle, %function
ux500_enter_idle:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r2
	bl	smp_processor_id
	mov	r6, r0
	ldr	r0, .L19
	bl	atomic_inc_return
	mov	r5, r0
	bl	num_online_cpus
	cmp	r5, r0
	beq	.L16
.L3:
	bl	cpu_do_idle
	ldr	r0, .L19
	bl	atomic_dec
.L6:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r0, .L19+4
	bl	spin_trylock
	cmp	r0, #0
	beq	.L3
	bl	prcmu_gic_decouple
	cmp	r0, #0
	bne	.L17
	clz	r0, r6
	lsr	r0, r0, #5
	bl	prcmu_is_cpu_in_wfi
	cmp	r0, #0
	beq	.L7
	bl	prcmu_copy_gic_settings
	cmp	r0, #0
	beq	.L18
.L7:
	ldr	r0, .L19
	bl	atomic_dec
	bl	prcmu_gic_recouple
	ldr	r0, .L19+4
	bl	spin_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L17:
	ldr	r0, .L19+4
	bl	spin_unlock
	ldr	r0, .L19
	bl	atomic_dec
	b	.L6
.L18:
	bl	prcmu_gic_pending_irq
	cmp	r0, #0
	bne	.L7
	bl	prcmu_pending_irq
	cmp	r0, #0
	bne	.L7
	mov	r2, #1
	ldr	r3, .L19+8
	mov	r1, r2
	ldr	r0, [r3]
	bl	prcmu_set_power_state
	cmp	r0, #0
	bne	.L7
	ldr	r0, .L19+4
	bl	spin_unlock
	b	.L3
.L20:
	.align	2
.L19:
	.word	master
	.word	master_lock
	.word	PRCMU_AP_IDLE
	.size	ux500_enter_idle, .-ux500_enter_idle
	.comm	master_lock,4,4
	.comm	master,4,4
	.comm	PRCMU_AP_IDLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
