	.file	"extr_am335x_dmtimer.c_am335x_dmtimer_tc_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"already have a timecounter"
	.text
	.p2align 4
	.type	am335x_dmtimer_tc_init, @function
am335x_dmtimer_tc_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	xor	edi, edi
	cmp	QWORD PTR am335x_dmtimer_tc_sc[rip], 0
	sete	dil
	lea	rsi, .LC0[rip]
	call	KASSERT@PLT
	mov	edx, DWORD PTR DMT_TSICR_RESET[rip]
	mov	esi, DWORD PTR DMT_TSICR[rip]
	mov	rdi, rbp
	call	DMTIMER_WRITE4@PLT
.L2:
	mov	esi, DWORD PTR DMT_TIOCP_CFG[rip]
	mov	rdi, rbp
	call	DMTIMER_READ4@PLT
	test	DWORD PTR DMT_TIOCP_RESET[rip], eax
	jne	.L2
	mov	eax, DWORD PTR DMT_TCLR_START[rip]
	or	eax, DWORD PTR DMT_TCLR_AUTOLOAD[rip]
	mov	rdi, rbp
	xor	edx, edx
	or	DWORD PTR 0[rbp], eax
	mov	esi, DWORD PTR DMT_TLDR[rip]
	call	DMTIMER_WRITE4@PLT
	mov	esi, DWORD PTR DMT_TCRR[rip]
	mov	rdi, rbp
	xor	edx, edx
	call	DMTIMER_WRITE4@PLT
	mov	edx, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR DMT_TCLR[rip]
	mov	rdi, rbp
	call	DMTIMER_WRITE4@PLT
	mov	eax, DWORD PTR 44[rbp]
	mov	QWORD PTR 16[rbp], rbp
	lea	rdi, 8[rbp]
	mov	QWORD PTR am335x_dmtimer_tc_sc[rip], rbp
	mov	DWORD PTR 32[rbp], eax
	mov	eax, DWORD PTR am335x_dmtimer_tc_get_timecount[rip]
	mov	DWORD PTR 28[rbp], eax
	mov	eax, DWORD PTR 40[rbp]
	mov	DWORD PTR 24[rbp], eax
	movabs	rax, 2151778615295
	mov	QWORD PTR 8[rbp], rax
	call	tc_init@PLT
	mov	edi, DWORD PTR am335x_dmtimer_delay[rip]
	mov	rsi, rbp
	call	arm_set_delay@PLT
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	am335x_dmtimer_tc_init, .-am335x_dmtimer_tc_init
	.comm	am335x_dmtimer_tc_sc,8,8
	.comm	am335x_dmtimer_tc_get_timecount,4,4
	.comm	am335x_dmtimer_delay,4,4
	.comm	DMT_TSICR_RESET,4,4
	.comm	DMT_TSICR,4,4
	.comm	DMT_TLDR,4,4
	.comm	DMT_TIOCP_RESET,4,4
	.comm	DMT_TIOCP_CFG,4,4
	.comm	DMT_TCRR,4,4
	.comm	DMT_TCLR_START,4,4
	.comm	DMT_TCLR_AUTOLOAD,4,4
	.comm	DMT_TCLR,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_am335x_dmtimer.c_am335x_dmtimer_tc_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"already have a timecounter\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	am335x_dmtimer_tc_init, %function
am335x_dmtimer_tc_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L6
	mov	r4, r0
	ldr	r0, [r6]
	ldr	r1, .L6+4
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r3, .L6+8
	ldr	r2, .L6+12
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	DMTIMER_WRITE4
	ldr	r8, .L6+16
	ldr	r7, .L6+20
.L2:
	mov	r0, r4
	ldr	r1, [r8]
	bl	DMTIMER_READ4
	ldr	r3, [r7]
	ands	r5, r0, r3
	bne	.L2
	ldr	r3, .L6+24
	ldr	r2, .L6+28
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r4]
	orr	r2, r2, r1
	ldr	r1, .L6+32
	orr	r3, r3, r2
	str	r3, [r4]
	mov	r2, r5
	mov	r0, r4
	ldr	r1, [r1]
	bl	DMTIMER_WRITE4
	ldr	r3, .L6+36
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, r4
	bl	DMTIMER_WRITE4
	ldr	r3, .L6+40
	ldr	r2, [r4]
	ldr	r1, [r3]
	mov	r0, r4
	bl	DMTIMER_WRITE4
	mov	r1, #500
	mvn	r0, #0
	ldr	r3, .L6+44
	ldr	r2, [r4, #32]
	ldr	r3, [r3]
	stmib	r4, {r0, r1}
	str	r3, [r4, #20]
	ldr	r3, [r4, #28]
	str	r2, [r4, #24]
	str	r3, [r4, #16]
	str	r4, [r4, #12]
	add	r0, r4, #4
	str	r4, [r6]
	bl	tc_init
	ldr	r3, .L6+48
	mov	r1, r4
	ldr	r0, [r3]
	bl	arm_set_delay
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	.align	2
.L6:
	.word	am335x_dmtimer_tc_sc
	.word	.LC0
	.word	DMT_TSICR
	.word	DMT_TSICR_RESET
	.word	DMT_TIOCP_CFG
	.word	DMT_TIOCP_RESET
	.word	DMT_TCLR_AUTOLOAD
	.word	DMT_TCLR_START
	.word	DMT_TLDR
	.word	DMT_TCRR
	.word	DMT_TCLR
	.word	am335x_dmtimer_tc_get_timecount
	.word	am335x_dmtimer_delay
	.size	am335x_dmtimer_tc_init, .-am335x_dmtimer_tc_init
	.comm	am335x_dmtimer_tc_sc,4,4
	.comm	am335x_dmtimer_tc_get_timecount,4,4
	.comm	am335x_dmtimer_delay,4,4
	.comm	DMT_TSICR_RESET,4,4
	.comm	DMT_TSICR,4,4
	.comm	DMT_TLDR,4,4
	.comm	DMT_TIOCP_RESET,4,4
	.comm	DMT_TIOCP_CFG,4,4
	.comm	DMT_TCRR,4,4
	.comm	DMT_TCLR_START,4,4
	.comm	DMT_TCLR_AUTOLOAD,4,4
	.comm	DMT_TCLR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
