	.file	"extr_imx_epit.c_epit_attach.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"could not allocate registers\n"
	.text
	.p2align 4
	.type	epit_attach, @function
epit_attach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	device_get_softc@PLT
	mov	ecx, DWORD PTR RF_ACTIVE[rip]
	lea	rdx, 4[rsp]
	mov	edi, r12d
	mov	DWORD PTR 8[rax], r12d
	mov	esi, DWORD PTR SYS_RES_MEMORY[rip]
	mov	rbp, rax
	mov	DWORD PTR 4[rsp], 0
	call	bus_alloc_resource_any@PLT
	mov	QWORD PTR 16[rbp], rax
	test	rax, rax
	je	.L10
	xor	eax, eax
	call	imx_ccm_ipg_hz@PLT
	mov	esi, DWORD PTR EPIT_CR[rip]
	xor	edx, edx
	mov	rdi, rbp
	mov	DWORD PTR 0[rbp], eax
	call	WR4@PLT
	mov	ecx, DWORD PTR EPIT_CR_CLKSRC_SHIFT[rip]
	mov	eax, 129
	mov	edx, DWORD PTR EPIT_CR_ENMOD[rip]
	or	edx, DWORD PTR EPIT_CR_RLD[rip]
	or	edx, DWORD PTR EPIT_CR_STOPEN[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR EPIT_CR_WAITEN[rip]
	sal	eax, cl
	or	edx, DWORD PTR EPIT_CR_DBGEN[rip]
	or	edx, eax
	mov	esi, DWORD PTR EPIT_CR[rip]
	mov	DWORD PTR 4[rbp], edx
	or	edx, DWORD PTR EPIT_CR_SWR[rip]
	call	WR4B@PLT
.L4:
	mov	esi, DWORD PTR EPIT_CR[rip]
	mov	rdi, rbp
	call	RD4@PLT
	test	DWORD PTR EPIT_CR_SWR[rip], eax
	jne	.L4
	mov	edi, DWORD PTR 8[rbp]
	call	device_get_unit@PLT
	mov	rdi, rbp
	test	rax, rax
	je	.L11
	call	epit_et_attach@PLT
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L12
	add	rsp, 24
	.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
.L11:
	.cfi_restore_state
	call	epit_tc_attach@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR 8[rbp]
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	epit_attach, .-epit_attach
	.comm	SYS_RES_MEMORY,4,4
	.comm	RF_ACTIVE,4,4
	.comm	EPIT_CR_WAITEN,4,4
	.comm	EPIT_CR_SWR,4,4
	.comm	EPIT_CR_STOPEN,4,4
	.comm	EPIT_CR_RLD,4,4
	.comm	EPIT_CR_ENMOD,4,4
	.comm	EPIT_CR_DBGEN,4,4
	.comm	EPIT_CR_CLKSRC_SHIFT,4,4
	.comm	EPIT_CR,4,4
	.comm	ENXIO,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_imx_epit.c_epit_attach.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"could not allocate registers\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	epit_attach, %function
epit_attach:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L13
	sub	sp, sp, #8
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	device_get_softc
	mov	r6, #0
	ldr	r2, .L13+4
	ldr	r3, .L13+8
	mov	r4, r0
	ldr	r1, [r2]
	str	r5, [r0, #8]
	mov	r2, sp
	mov	r0, r5
	ldr	r3, [r3]
	str	r6, [sp]
	bl	bus_alloc_resource_any
	cmp	r0, r6
	str	r0, [r4, #12]
	beq	.L10
	bl	imx_ccm_ipg_hz
	ldr	r5, .L13+12
	mov	r2, r6
	ldr	r1, [r5]
	str	r0, [r4]
	mov	r0, r4
	bl	WR4
	mov	r0, #129
	ldr	r3, .L13+16
	ldr	r2, .L13+20
	ldr	r1, .L13+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	ip, .L13+28
	orr	r3, r3, r2
	ldr	r2, .L13+32
	orr	r3, r3, r1
	ldr	ip, [ip]
	ldr	r1, .L13+36
	ldr	r2, [r2]
	ldr	r6, .L13+40
	ldr	r1, [r1]
	orr	r3, r3, ip
	orr	r3, r3, r2
	ldr	r2, [r6]
	orr	r3, r3, r0, lsl r1
	str	r3, [r4, #4]
	mov	r0, r4
	ldr	r1, [r5]
	orr	r2, r3, r2
	bl	WR4B
.L4:
	mov	r0, r4
	ldr	r1, [r5]
	bl	RD4
	ldr	r3, [r6]
	tst	r0, r3
	bne	.L4
	ldr	r0, [r4, #8]
	bl	device_get_unit
	cmp	r0, #0
	mov	r0, r4
	beq	.L11
	bl	epit_et_attach
.L1:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L11:
	bl	epit_tc_attach
	b	.L1
.L10:
	ldr	r0, [r4, #8]
	ldr	r1, .L13+44
	bl	device_printf
	ldr	r3, .L13+48
	ldr	r0, [r3]
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC1
	.word	SYS_RES_MEMORY
	.word	RF_ACTIVE
	.word	EPIT_CR
	.word	EPIT_CR_ENMOD
	.word	EPIT_CR_RLD
	.word	EPIT_CR_STOPEN
	.word	EPIT_CR_WAITEN
	.word	EPIT_CR_DBGEN
	.word	EPIT_CR_CLKSRC_SHIFT
	.word	EPIT_CR_SWR
	.word	.LC0
	.word	ENXIO
	.size	epit_attach, .-epit_attach
	.comm	SYS_RES_MEMORY,4,4
	.comm	RF_ACTIVE,4,4
	.comm	EPIT_CR_WAITEN,4,4
	.comm	EPIT_CR_SWR,4,4
	.comm	EPIT_CR_STOPEN,4,4
	.comm	EPIT_CR_RLD,4,4
	.comm	EPIT_CR_ENMOD,4,4
	.comm	EPIT_CR_DBGEN,4,4
	.comm	EPIT_CR_CLKSRC_SHIFT,4,4
	.comm	EPIT_CR,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
