	.file	"extr_esp_scsi.c_esp_set_clock_params.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	esp_set_clock_params, @function
esp_set_clock_params:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movsx	rax, DWORD PTR [rdi]
	mov	rbx, rdi
	mov	r12, rax
	imul	rax, rax, 1125899907
	mov	edx, r12d
	sar	edx, 31
	sar	rax, 50
	sub	eax, edx
	add	eax, 4
	movsx	rbp, eax
	sar	eax, 31
	imul	rbp, rbp, 1717986919
	sar	rbp, 33
	sub	ebp, eax
	cmp	ebp, 1
	je	.L9
	lea	eax, -1[rbp]
	cmp	eax, 7
	ja	.L5
	cmp	r12d, 5000000
	jg	.L10
.L5:
	mov	ebp, 4
	mov	r12d, 20000000
	mov	eax, 4
.L3:
	mov	DWORD PTR [rbx], r12d
	mov	edi, r12d
	mov	DWORD PTR 4[rbx], eax
	call	ESP_HZ_TO_CYCLE@PLT
	mov	edi, ebp
	mov	DWORD PTR 16[rbx], eax
	mov	esi, eax
	call	ESP_TICK@PLT
	mov	esi, ebp
	mov	edi, r12d
	mov	DWORD PTR 20[rbx], eax
	call	ESP_NEG_DEFP@PLT
	mov	DWORD PTR 12[rbx], eax
	mov	eax, DWORD PTR SYNC_DEFP_SLOW[rip]
	mov	DWORD PTR 8[rbx], eax
	pop	rbx
	.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
.L9:
	.cfi_restore_state
	cmp	r12d, 5000000
	jle	.L5
	mov	ebp, 2
	mov	eax, 2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	cmp	ebp, 8
	mov	eax, 0
	cmovne	eax, ebp
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	esp_set_clock_params, .-esp_set_clock_params
	.comm	SYNC_DEFP_SLOW,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_esp_scsi.c_esp_set_clock_params.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	esp_set_clock_params, %function
esp_set_clock_params:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L11
	ldr	r6, [r0]
	ldr	r4, .L11+4
	smull	r1, r2, r3, r6
	asr	r3, r6, #31
	rsb	r3, r3, r2, asr #18
	add	r3, r3, #4
	smull	r2, r4, r3, r4
	asr	r3, r3, #31
	rsb	r4, r3, r4, asr #1
	cmp	r4, #1
	mov	r5, r0
	beq	.L9
	ldr	r2, .L11+8
	sub	r3, r4, #1
	cmp	r6, r2
	movgt	r2, #0
	movle	r2, #1
	cmp	r3, #7
	movls	r3, r2
	orrhi	r3, r2, #1
	cmp	r3, #0
	beq	.L10
	mov	r4, #4
	mov	r3, r4
	ldr	r6, .L11+12
.L3:
	str	r3, [r5, #4]
	mov	r0, r6
	str	r6, [r5]
	bl	ESP_HZ_TO_CYCLE
	mov	r1, r0
	mov	r0, r4
	str	r1, [r5, #16]
	bl	ESP_TICK
	mov	r1, r4
	str	r0, [r5, #20]
	mov	r0, r6
	bl	ESP_NEG_DEFP
	ldr	r3, .L11+16
	str	r0, [r5, #12]
	ldr	r3, [r3]
	str	r3, [r5, #8]
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r3, .L11+8
	cmp	r6, r3
	movgt	r4, #2
	movgt	r3, r4
	movle	r4, #4
	ldrle	r6, .L11+12
	movle	r3, r4
	b	.L3
.L10:
	cmp	r4, #8
	movne	r3, r4
	moveq	r3, #0
	b	.L3
.L12:
	.align	2
.L11:
	.word	1125899907
	.word	1717986919
	.word	5000000
	.word	20000000
	.word	SYNC_DEFP_SLOW
	.size	esp_set_clock_params, .-esp_set_clock_params
	.comm	SYNC_DEFP_SLOW,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
