	.file	"extr_bhnd.c_bhnd_generic_enable_clocks.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no active PMU allocation"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"%s requested unknown clocks: %#x\n"
	.text
	.p2align 4
	.globl	bhnd_generic_enable_clocks
	.type	bhnd_generic_enable_clocks, @function
bhnd_generic_enable_clocks:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	call	device_get_softc@PLT
	mov	rdi, rbp
	call	device_get_parent@PLT
	cmp	rax, r13
	je	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	bhnd_get_pmu_info@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L21
.L4:
	mov	rdi, rbp
	call	BHND_ASSERT_CLKCTL_AVAIL@PLT
	mov	rdi, r13
	call	device_get_softc@PLT
	mov	edx, DWORD PTR BHND_CLOCK_DYN[rip]
	mov	eax, edx
	not	eax
	and	eax, r12d
	test	edx, r12d
	mov	edx, DWORD PTR BHND_CLOCK_ILP[rip]
	cmovne	r12d, eax
	mov	eax, edx
	not	eax
	and	eax, r12d
	test	edx, r12d
	cmovne	r12d, eax
	mov	eax, DWORD PTR BHND_CLOCK_ALP[rip]
	xor	r14d, r14d
	mov	r15d, eax
	and	r15d, r12d
	je	.L7
	not	eax
	mov	r15d, DWORD PTR BHND_CCS_ALPAREQ[rip]
	mov	r14d, DWORD PTR BHND_CCS_ALPAVAIL[rip]
	and	r12d, eax
.L7:
	mov	eax, DWORD PTR BHND_CLOCK_HT[rip]
	test	eax, r12d
	jne	.L22
	test	r12d, r12d
	jne	.L23
.L9:
	mov	rdi, rbp
	call	BHND_CLKCTL_LOCK@PLT
	mov	edx, DWORD PTR BHND_CCS_AREQ_MASK[rip]
	mov	esi, r15d
	mov	rdi, rbp
	call	BHND_CLKCTL_SET_4@PLT
	mov	edx, r14d
	mov	esi, r14d
	mov	rdi, rbp
	call	bhnd_core_clkctl_wait@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	BHND_CLKCTL_UNLOCK@PLT
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	not	eax
	or	r15d, DWORD PTR BHND_CCS_HTAREQ[rip]
	or	r14d, DWORD PTR BHND_CCS_HTAVAIL[rip]
	and	r12d, eax
	test	r12d, r12d
	je	.L9
.L23:
	mov	edi, DWORD PTR 0[rbp]
	call	device_get_nameunit@PLT
	mov	ecx, r12d
	mov	rdi, r13
	lea	rsi, .LC1[rip]
	mov	edx, eax
	call	device_printf@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	bhnd_generic_enable_clocks, .-bhnd_generic_enable_clocks
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	BHND_CLOCK_ILP,4,4
	.comm	BHND_CLOCK_HT,4,4
	.comm	BHND_CLOCK_DYN,4,4
	.comm	BHND_CLOCK_ALP,4,4
	.comm	BHND_CCS_HTAVAIL,4,4
	.comm	BHND_CCS_HTAREQ,4,4
	.comm	BHND_CCS_AREQ_MASK,4,4
	.comm	BHND_CCS_ALPAVAIL,4,4
	.comm	BHND_CCS_ALPAREQ,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_bhnd.c_bhnd_generic_enable_clocks.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no active PMU allocation\000"
	.align	2
.LC1:
	.ascii	"%s requested unknown clocks: %#x\012\000"
	.text
	.align	2
	.global	bhnd_generic_enable_clocks
	.syntax unified
	.arm
	.fpu softvfp
	.type	bhnd_generic_enable_clocks, %function
bhnd_generic_enable_clocks:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r2
	mov	r6, r0
	bl	device_get_softc
	mov	r0, r5
	bl	device_get_parent
	cmp	r0, r6
	beq	.L2
	ldr	r3, .L25
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r5
	bl	bhnd_get_pmu_info
	subs	r5, r0, #0
	beq	.L22
.L4:
	mov	r0, r5
	bl	BHND_ASSERT_CLKCTL_AVAIL
	mov	r0, r6
	bl	device_get_softc
	ldr	r3, .L25+4
	ldr	r3, [r3]
	tst	r3, r4
	bicne	r4, r4, r3
	ldr	r3, .L25+8
	ldr	r3, [r3]
	tst	r3, r4
	bicne	r4, r4, r3
	ldr	r3, .L25+12
	ldr	r3, [r3]
	ands	r7, r3, r4
	bicne	r4, r4, r3
	ldr	r3, .L25+16
	ldrne	r1, .L25+20
	ldrne	r2, .L25+24
	ldr	r3, [r3]
	moveq	r8, r7
	ldrne	r7, [r1]
	ldrne	r8, [r2]
	tst	r3, r4
	bne	.L23
	cmp	r4, #0
	bne	.L24
.L9:
	mov	r0, r5
	bl	BHND_CLKCTL_LOCK
	ldr	r3, .L25+28
	mov	r1, r7
	ldr	r2, [r3]
	mov	r0, r5
	bl	BHND_CLKCTL_SET_4
	mov	r2, r8
	mov	r1, r8
	mov	r0, r5
	bl	bhnd_core_clkctl_wait
	mov	r4, r0
	mov	r0, r5
	bl	BHND_CLKCTL_UNLOCK
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	ldr	r1, .L25+32
	ldr	r2, .L25+36
	ldr	r1, [r1]
	ldr	r2, [r2]
	bic	r4, r4, r3
	cmp	r4, #0
	orr	r7, r7, r1
	orr	r8, r8, r2
	beq	.L9
.L24:
	ldr	r0, [r5]
	bl	device_get_nameunit
	mov	r3, r4
	mov	r2, r0
	ldr	r1, .L25+40
	mov	r0, r6
	bl	device_printf
	ldr	r3, .L25+44
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	ldr	r0, .L25+48
	bl	panic
	b	.L4
.L26:
	.align	2
.L25:
	.word	EINVAL
	.word	BHND_CLOCK_DYN
	.word	BHND_CLOCK_ILP
	.word	BHND_CLOCK_ALP
	.word	BHND_CLOCK_HT
	.word	BHND_CCS_ALPAREQ
	.word	BHND_CCS_ALPAVAIL
	.word	BHND_CCS_AREQ_MASK
	.word	BHND_CCS_HTAREQ
	.word	BHND_CCS_HTAVAIL
	.word	.LC1
	.word	ENODEV
	.word	.LC0
	.size	bhnd_generic_enable_clocks, .-bhnd_generic_enable_clocks
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	BHND_CLOCK_ILP,4,4
	.comm	BHND_CLOCK_HT,4,4
	.comm	BHND_CLOCK_DYN,4,4
	.comm	BHND_CLOCK_ALP,4,4
	.comm	BHND_CCS_HTAVAIL,4,4
	.comm	BHND_CCS_HTAREQ,4,4
	.comm	BHND_CCS_AREQ_MASK,4,4
	.comm	BHND_CCS_ALPAVAIL,4,4
	.comm	BHND_CCS_ALPAREQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
