	.file	"extr_if_rum.c_rum_enable_tsf_sync.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Enabling TSF failed. undefined opmode %d\n"
	.text
	.p2align 4
	.type	rum_enable_tsf_sync, @function
rum_enable_tsf_sync:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	add	rdi, 4
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	TAILQ_FIRST@PLT
	cmp	DWORD PTR [rax], 128
	mov	r13, rax
	je	.L2
	mov	esi, DWORD PTR RT2573_TXRX_CSR10[rip]
	mov	edx, 4104
	mov	rdi, rbp
	call	rum_write@PLT
	test	rax, rax
	jne	.L13
.L2:
	mov	esi, DWORD PTR RT2573_TXRX_CSR9[rip]
	mov	rdi, rbp
	call	rum_read@PLT
	mov	edx, DWORD PTR RT2573_TSF_TIMER_EN[rip]
	or	edx, DWORD PTR RT2573_TBTT_TIMER_EN[rip]
	and	eax, -16777216
	mov	ebx, eax
	mov	rax, QWORD PTR 8[r13]
	mov	r12d, DWORD PTR [rax]
	mov	eax, r12d
	sal	eax, 4
	or	edx, eax
	or	ebx, edx
	mov	edx, DWORD PTR 0[r13]
	cmp	edx, 129
	je	.L4
	cmp	edx, 130
	je	.L5
	cmp	edx, 128
	je	.L15
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	mov	eax, DWORD PTR EINVAL[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
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR EIO[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
.L4:
	.cfi_restore_state
	mov	edi, DWORD PTR RT2573_TSF_SYNC_MODE_IBSS[rip]
	call	RT2573_TSF_SYNC_MODE@PLT
	or	ebx, DWORD PTR RT2573_BCN_TX_EN[rip]
	mov	edx, ebx
	or	edx, eax
.L7:
	mov	esi, DWORD PTR RT2573_TXRX_CSR9[rip]
	mov	rdi, rbp
	call	rum_write@PLT
	test	rax, rax
	jne	.L13
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, r12d
	mov	rdi, rbp
	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
	jmp	rum_set_sleep_time@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR RT2573_TSF_SYNC_MODE_HOSTAP[rip]
	call	RT2573_TSF_SYNC_MODE@PLT
	or	ebx, DWORD PTR RT2573_BCN_TX_EN[rip]
	mov	edx, ebx
	or	edx, eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR RT2573_TSF_SYNC_MODE_STA[rip]
	call	RT2573_TSF_SYNC_MODE@PLT
	or	ebx, eax
	mov	edx, ebx
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	rum_enable_tsf_sync, .-rum_enable_tsf_sync
	.comm	RT2573_TXRX_CSR9,4,4
	.comm	RT2573_TXRX_CSR10,4,4
	.comm	RT2573_TSF_TIMER_EN,4,4
	.comm	RT2573_TSF_SYNC_MODE_STA,4,4
	.comm	RT2573_TSF_SYNC_MODE_IBSS,4,4
	.comm	RT2573_TSF_SYNC_MODE_HOSTAP,4,4
	.comm	RT2573_TBTT_TIMER_EN,4,4
	.comm	RT2573_BCN_TX_EN,4,4
	.comm	EIO,4,4
	.comm	EINVAL,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_if_rum.c_rum_enable_tsf_sync.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Enabling TSF failed. undefined opmode %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rum_enable_tsf_sync, %function
rum_enable_tsf_sync:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	add	r0, r0, #4
	bl	TAILQ_FIRST
	ldr	r3, [r0]
	mov	r5, r0
	cmp	r3, #128
	beq	.L2
	ldr	r3, .L20
	mov	r0, r4
	ldr	r2, .L20+4
	ldr	r1, [r3]
	bl	rum_write
	cmp	r0, #0
	bne	.L17
.L2:
	ldr	r6, .L20+8
	mov	r0, r4
	ldr	r1, [r6]
	bl	rum_read
	ldr	r3, .L20+12
	ldr	r1, .L20+16
	ldr	r2, [r5, #4]
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r7, [r2]
	ldr	r2, [r5]
	orr	r3, r3, r1
	and	r5, r0, #-16777216
	orr	r3, r3, r7, lsl #4
	cmp	r2, #129
	orr	r5, r3, r5
	beq	.L4
	cmp	r2, #130
	beq	.L5
	cmp	r2, #128
	beq	.L19
	ldr	r0, [r4]
	ldr	r1, .L20+20
	bl	device_printf
	ldr	r3, .L20+24
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	ldr	r3, .L20+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r3, .L20+32
.L16:
	ldr	r0, [r3]
	bl	RT2573_TSF_SYNC_MODE
	ldr	r3, .L20+36
	ldr	r2, [r3]
	orr	r5, r5, r2
	orr	r2, r0, r5
.L7:
	mov	r0, r4
	ldr	r1, [r6]
	bl	rum_write
	cmp	r0, #0
	bne	.L17
	mov	r1, r7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	rum_set_sleep_time
.L5:
	ldr	r3, .L20+40
	b	.L16
.L19:
	ldr	r3, .L20+44
	ldr	r0, [r3]
	bl	RT2573_TSF_SYNC_MODE
	orr	r2, r5, r0
	b	.L7
.L21:
	.align	2
.L20:
	.word	RT2573_TXRX_CSR10
	.word	4104
	.word	RT2573_TXRX_CSR9
	.word	RT2573_TSF_TIMER_EN
	.word	RT2573_TBTT_TIMER_EN
	.word	.LC0
	.word	EINVAL
	.word	EIO
	.word	RT2573_TSF_SYNC_MODE_IBSS
	.word	RT2573_BCN_TX_EN
	.word	RT2573_TSF_SYNC_MODE_HOSTAP
	.word	RT2573_TSF_SYNC_MODE_STA
	.size	rum_enable_tsf_sync, .-rum_enable_tsf_sync
	.comm	RT2573_TXRX_CSR9,4,4
	.comm	RT2573_TXRX_CSR10,4,4
	.comm	RT2573_TSF_TIMER_EN,4,4
	.comm	RT2573_TSF_SYNC_MODE_STA,4,4
	.comm	RT2573_TSF_SYNC_MODE_IBSS,4,4
	.comm	RT2573_TSF_SYNC_MODE_HOSTAP,4,4
	.comm	RT2573_TBTT_TIMER_EN,4,4
	.comm	RT2573_BCN_TX_EN,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
