	.file	"extr_platform_mpc85xx.c_mpc85xx_smp_timebase_sync.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mpc85xx_smp_timebase_sync, @function
mpc85xx_smp_timebase_sync:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, esi
	test	edx, edx
	jne	.L16
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
	call	atomic_thread_fence_seq_cst@PLT
.L16:
	mov	eax, DWORD PTR tb_ready.1933[rip]
	test	eax, eax
	je	.L4
	mov	edi, ebp
	call	mttb@PLT
	mov	esi, 1
	lea	rdi, cpu_done.1934[rip]
	call	atomic_add_int@PLT
	mov	edx, DWORD PTR cpu_done.1934[rip]
	mov	eax, DWORD PTR mp_ncpus[rip]
	cmp	edx, eax
	jge	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	xor	eax, eax
	call	atomic_thread_fence_seq_cst@PLT
	mov	edx, DWORD PTR cpu_done.1934[rip]
	mov	eax, DWORD PTR mp_ncpus[rip]
	cmp	edx, eax
	jl	.L5
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR rcpm_dev[rip]
	mov	esi, 1
	call	freeze_timebase@PLT
	mov	edi, ebp
	mov	DWORD PTR tb_ready.1933[rip], 1
	call	mttb@PLT
	mov	esi, 1
	lea	rdi, cpu_done.1934[rip]
	call	atomic_add_int@PLT
	mov	edx, DWORD PTR cpu_done.1934[rip]
	mov	eax, DWORD PTR mp_ncpus[rip]
	cmp	edx, eax
	jge	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	xor	eax, eax
	call	atomic_thread_fence_seq_cst@PLT
	mov	edx, DWORD PTR cpu_done.1934[rip]
	mov	eax, DWORD PTR mp_ncpus[rip]
	cmp	edx, eax
	jl	.L9
.L8:
	mov	edi, DWORD PTR rcpm_dev[rip]
	xor	esi, esi
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	freeze_timebase@PLT
	.cfi_endproc
.LFE0:
	.size	mpc85xx_smp_timebase_sync, .-mpc85xx_smp_timebase_sync
	.local	cpu_done.1934
	.comm	cpu_done.1934,4,4
	.local	tb_ready.1933
	.comm	tb_ready.1933,4,4
	.comm	rcpm_dev,4,4
	.comm	mp_ncpus,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_platform_mpc85xx.c_mpc85xx_smp_timebase_sync.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpc85xx_smp_timebase_sync, %function
mpc85xx_smp_timebase_sync:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	beq	.L2
	ldr	r4, .L18
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L3
.L4:
	bl	atomic_thread_fence_seq_cst
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L4
.L3:
	mov	r0, r6
	ldr	r5, .L18+4
	bl	mttb
	mov	r1, #1
	ldr	r0, .L18+8
	bl	atomic_add_int
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	cmp	r2, r3
	popge	{r4, r5, r6, r7, r8, pc}
.L5:
	bl	atomic_thread_fence_seq_cst
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	cmp	r2, r3
	blt	.L5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r8, #1
	ldr	r7, .L18+12
	mov	r1, r8
	ldr	r4, .L18
	ldr	r0, [r7]
	bl	freeze_timebase
	ldr	r5, .L18+4
	mov	r0, r6
	str	r8, [r4]
	bl	mttb
	mov	r1, r8
	add	r0, r4, #4
	bl	atomic_add_int
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	cmp	r2, r3
	bge	.L8
.L9:
	bl	atomic_thread_fence_seq_cst
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	cmp	r2, r3
	blt	.L9
.L8:
	ldr	r0, [r7]
	mov	r1, #0
	pop	{r4, r5, r6, r7, r8, lr}
	b	freeze_timebase
.L19:
	.align	2
.L18:
	.word	.LANCHOR0
	.word	mp_ncpus
	.word	.LANCHOR0+4
	.word	rcpm_dev
	.size	mpc85xx_smp_timebase_sync, .-mpc85xx_smp_timebase_sync
	.comm	rcpm_dev,4,4
	.comm	mp_ncpus,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	tb_ready.4217, %object
	.size	tb_ready.4217, 4
tb_ready.4217:
	.space	4
	.type	cpu_done.4218, %object
	.size	cpu_done.4218, 4
cpu_done.4218:
	.space	4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
