	.file	"extr_bcm2835_clkman.c_bcm2835_clkman_set_frequency.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Unsupported unit 0x%x"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Frequency too high for unit 0x%x (max: 125 MHz)"
	.align 8
.LC2:
	.string	"Frequency too low for unit 0x%x (min: 123 kHz)"
	.align 8
.LC3:
	.string	"Failed to start clock for unit 0x%x"
	.align 8
.LC4:
	.string	"Failed to stop clock for unit 0x%x"
	.text
	.p2align 4
	.globl	bcm2835_clkman_set_frequency
	.type	bcm2835_clkman_set_frequency, @function
bcm2835_clkman_set_frequency:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	device_get_softc@PLT
	cmp	DWORD PTR BCM_PWM_CLKSRC[rip], r13d
	mov	rbp, rax
	je	.L2
	mov	edi, DWORD PTR [rax]
	mov	edx, r13d
	lea	rsi, .LC0[rip]
	xor	r12d, r12d
	call	device_printf@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, 6
	mov	esi, r13d
	mov	rdi, rax
	mov	ebx, 10
	call	W_CMCLK@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, r13d
	mov	rdi, rbp
	call	R_CMCLK@PLT
	and	eax, 128
	mov	r12d, eax
	je	.L4
	mov	edi, 1000
	call	DELAY@PLT
	sub	ebx, 1
	jne	.L5
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r13d
	xor	r12d, r12d
	lea	rsi, .LC4[rip]
	call	device_printf@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	test	r14d, r14d
	je	.L1
	mov	eax, 500000000
	cdq
	idiv	r14d
	mov	ebx, eax
	cmp	eax, 3
	jle	.L23
	cmp	eax, 4095
	jg	.L24
	mov	edx, eax
	mov	esi, r13d
	mov	rdi, rbp
	mov	r14d, 10
	sal	edx, 12
	call	W_CMDIV@PLT
	mov	edx, 22
	mov	esi, r13d
	mov	rdi, rbp
	call	W_CMCLK@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, r13d
	mov	rdi, rbp
	call	R_CMCLK@PLT
	and	eax, 128
	mov	r12d, eax
	jne	.L9
	mov	edi, 1000
	call	DELAY@PLT
	sub	r14d, 1
	jne	.L10
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r13d
	lea	rsi, .LC3[rip]
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r13d
	lea	rsi, .LC2[rip]
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r13d
	lea	rsi, .LC1[rip]
	call	device_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, 500000000
	cdq
	idiv	ebx
	mov	r12d, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	bcm2835_clkman_set_frequency, .-bcm2835_clkman_set_frequency
	.comm	BCM_PWM_CLKSRC,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_bcm2835_clkman.c_bcm2835_clkman_set_frequency.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unsupported unit 0x%x\000"
	.global	__aeabi_idiv
	.align	2
.LC1:
	.ascii	"Frequency too high for unit 0x%x (max: 125 MHz)\000"
	.align	2
.LC2:
	.ascii	"Frequency too low for unit 0x%x (min: 123 kHz)\000"
	.align	2
.LC3:
	.ascii	"Failed to start clock for unit 0x%x\000"
	.align	2
.LC4:
	.ascii	"Failed to stop clock for unit 0x%x\000"
	.text
	.align	2
	.global	bcm2835_clkman_set_frequency
	.syntax unified
	.arm
	.fpu softvfp
	.type	bcm2835_clkman_set_frequency, %function
bcm2835_clkman_set_frequency:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r8, r2
	bl	device_get_softc
	ldr	r3, .L25
	mov	r7, r0
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	mov	r2, r6
	ldr	r0, [r0]
	ldr	r1, .L25+4
	bl	device_printf
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r2, #6
	mov	r1, r6
	bl	W_CMCLK
	mov	r5, #10
.L5:
	mov	r1, r6
	mov	r0, r7
	bl	R_CMCLK
	ands	r4, r0, #128
	beq	.L4
	mov	r0, #1000
	bl	DELAY
	subs	r5, r5, #1
	bne	.L5
	mov	r4, r5
	mov	r2, r6
	ldr	r0, [r7]
	ldr	r1, .L25+8
	bl	device_printf
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	cmp	r8, #0
	beq	.L1
	mov	r1, r8
	ldr	r0, .L25+12
	bl	__aeabi_idiv
	cmp	r0, #3
	mov	r8, r0
	ble	.L23
	cmp	r0, #4096
	bge	.L24
	lsl	r2, r0, #12
	mov	r1, r6
	mov	r0, r7
	bl	W_CMDIV
	mov	r2, #22
	mov	r1, r6
	mov	r0, r7
	bl	W_CMCLK
	mov	r5, #10
.L10:
	mov	r1, r6
	mov	r0, r7
	bl	R_CMCLK
	ands	r4, r0, #128
	bne	.L9
	mov	r0, #1000
	bl	DELAY
	subs	r5, r5, #1
	bne	.L10
	mov	r2, r6
	ldr	r0, [r7]
	ldr	r1, .L25+16
	bl	device_printf
	b	.L1
.L24:
	mov	r2, r6
	ldr	r0, [r7]
	ldr	r1, .L25+20
	bl	device_printf
	b	.L1
.L23:
	mov	r2, r6
	ldr	r0, [r7]
	ldr	r1, .L25+24
	bl	device_printf
	b	.L1
.L9:
	mov	r1, r8
	ldr	r0, .L25+12
	bl	__aeabi_idiv
	mov	r4, r0
	b	.L1
.L26:
	.align	2
.L25:
	.word	BCM_PWM_CLKSRC
	.word	.LC0
	.word	.LC4
	.word	500000000
	.word	.LC3
	.word	.LC2
	.word	.LC1
	.size	bcm2835_clkman_set_frequency, .-bcm2835_clkman_set_frequency
	.comm	BCM_PWM_CLKSRC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
