	.file	"extr_cvmx-flash.c___cvmx_flash_queury_cfi.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__cvmx_flash_queury_cfi, @function
__cvmx_flash_queury_cfi:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movsx	rax, edi
	mov	edx, 240
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	edi, eax
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	r12, [rax+rax*2]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sal	r12, 4
	mov	rbp, rax
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r12
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	add	rbx, QWORD PTR flash_info[rip]
	mov	QWORD PTR 40[rbx], rsi
	xor	esi, esi
	mov	DWORD PTR [rbx], 1
	mov	QWORD PTR 8[rsp], r12
	call	__cvmx_flash_write_cmd@PLT
	mov	esi, 85
	mov	edi, ebp
	mov	edx, 152
	call	__cvmx_flash_write_cmd@PLT
	mov	esi, 16
	mov	edi, ebp
	call	__cvmx_flash_read_cmd@PLT
	cmp	eax, 81
	jne	.L4
	mov	esi, 17
	mov	edi, ebp
	call	__cvmx_flash_read_cmd@PLT
	cmp	eax, 82
	jne	.L4
	mov	esi, 18
	mov	edi, ebp
	call	__cvmx_flash_read_cmd@PLT
	cmp	eax, 89
	jne	.L4
	mov	esi, 19
	mov	edi, ebp
	mov	r14d, 1
	xor	r12d, r12d
	call	__cvmx_flash_read_cmd16@PLT
	mov	esi, 31
	mov	edi, ebp
	mov	r15d, 45
	mov	DWORD PTR 4[rbx], eax
	call	__cvmx_flash_read_cmd@PLT
	mov	esi, 35
	mov	edi, ebp
	mov	r13d, eax
	call	__cvmx_flash_read_cmd@PLT
	mov	esi, 33
	mov	edi, ebp
	lea	ecx, 0[r13+rax]
	mov	rax, r14
	sal	rax, cl
	mov	QWORD PTR 8[rbx], rax
	call	__cvmx_flash_read_cmd@PLT
	mov	esi, 37
	mov	edi, ebp
	mov	r13d, eax
	call	__cvmx_flash_read_cmd@PLT
	mov	esi, 39
	mov	edi, ebp
	lea	ecx, 0[r13+rax]
	xor	r13d, r13d
	sal	r14, cl
	mov	QWORD PTR 16[rbx], r14
	call	__cvmx_flash_read_cmd@PLT
	mov	edx, 1
	mov	esi, 44
	mov	edi, ebp
	mov	ecx, eax
	sal	edx, cl
	mov	DWORD PTR 24[rbx], edx
	call	__cvmx_flash_read_cmd@PLT
	mov	DWORD PTR 28[rbx], eax
	test	eax, eax
	jg	.L5
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L18:
	sal	eax, 8
	mov	ecx, eax
.L10:
	imul	eax, DWORD PTR 4[r14]
	mov	DWORD PTR 8[r14], ecx
	add	r13, 1
	add	r15d, 4
	add	r12d, eax
	cmp	DWORD PTR 28[rbx], r13d
	jle	.L11
.L5:
	mov	rcx, QWORD PTR 32[rbx]
	lea	rax, 0[r13+r13*2]
	mov	esi, r15d
	mov	edi, ebp
	lea	r14, [rcx+rax*4]
	mov	DWORD PTR [r14], r12d
	call	__cvmx_flash_read_cmd16@PLT
	lea	esi, 2[r15]
	mov	edi, ebp
	add	eax, 1
	mov	DWORD PTR 4[r14], eax
	call	__cvmx_flash_read_cmd16@PLT
	test	eax, eax
	jne	.L18
	mov	eax, 128
	mov	ecx, 128
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR flash_info[rip]
	mov	rdx, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR 4[rax+rdx]
	cmp	eax, 129
	jle	.L19
	cmp	eax, 130
	jne	.L8
	mov	edx, 240
	xor	esi, esi
	mov	edi, ebp
	call	__cvmx_flash_write_cmd@PLT
.L7:
	mov	edx, 255
	xor	esi, esi
	mov	edi, ebp
	call	__cvmx_flash_write_cmd@PLT
.L8:
	mov	edi, DWORD PTR CVMX_CLOCK_CORE[rip]
	call	cvmx_clock_get_rate@PLT
	mov	edi, DWORD PTR CVMX_CLOCK_CORE[rip]
	mov	edx, eax
	cdqe
	imul	rax, rax, 1125899907
	sar	edx, 31
	sar	rax, 50
	sub	eax, edx
	cdqe
	imul	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR 8[rbx], rax
	call	cvmx_clock_get_rate@PLT
	mov	edx, eax
	cdqe
	imul	rax, rax, 274877907
	sar	edx, 31
	sar	rax, 38
	sub	eax, edx
	cdqe
	imul	rax, QWORD PTR 16[rbx]
	mov	QWORD PTR 16[rbx], rax
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	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
.L19:
	.cfi_restore_state
	cmp	eax, 127
	jle	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	QWORD PTR 40[rbx], 0
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	__cvmx_flash_queury_cfi, .-__cvmx_flash_queury_cfi
	.comm	flash_info,8,8
	.comm	CVMX_CLOCK_CORE,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_cvmx-flash.c___cvmx_flash_queury_cfi.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__cvmx_flash_queury_cfi, %function
__cvmx_flash_queury_cfi:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #1
	mov	r6, r0
	ldr	r8, .L19
	add	r9, r0, r0, lsl #2
	ldr	r3, [r8]
	lsl	r7, r9, #3
	add	r9, r3, r9, lsl #3
	str	r1, [r9, #36]
	mov	r2, #240
	str	r4, [r3, r7]
	mov	r1, #0
	bl	__cvmx_flash_write_cmd
	mov	r2, #152
	mov	r1, #85
	mov	r0, r6
	bl	__cvmx_flash_write_cmd
	mov	r0, r6
	mov	r1, #16
	bl	__cvmx_flash_read_cmd
	cmp	r0, #81
	bne	.L4
	mov	r1, #17
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	cmp	r0, #82
	bne	.L4
	mov	r1, #18
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	cmp	r0, #89
	bne	.L4
	mov	r1, #19
	mov	r0, r6
	bl	__cvmx_flash_read_cmd16
	mov	r1, #31
	str	r0, [r9, #4]
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	mov	r1, #35
	mov	r5, r0
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	add	r0, r5, r0
	sub	r3, r0, #32
	rsb	r2, r0, #32
	lsl	r3, r4, r3
	orr	r3, r3, r4, lsr r2
	lsl	r0, r4, r0
	str	r3, [r9, #12]
	mov	r1, #33
	str	r0, [r9, #8]
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	mov	r1, #37
	mov	r5, r0
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	add	r0, r5, r0
	sub	r3, r0, #32
	rsb	r2, r0, #32
	lsl	r3, r4, r3
	orr	r3, r3, r4, lsr r2
	lsl	r0, r4, r0
	mov	r1, #39
	str	r3, [r9, #20]
	str	r0, [r9, #16]
	mov	r0, r6
	bl	__cvmx_flash_read_cmd
	lsl	r4, r4, r0
	mov	r1, #44
	mov	r0, r6
	str	r4, [r9, #24]
	bl	__cvmx_flash_read_cmd
	cmp	r0, #0
	movgt	r10, #0
	str	r0, [r9, #28]
	movgt	r5, r10
	ble	.L11
.L5:
	ldr	r3, [r9, #32]
	add	r4, r5, r5, lsl #1
	lsl	fp, r5, #2
	str	r10, [r3, r4, lsl #2]
	add	r1, fp, #45
	mov	r0, r6
	add	r4, r3, r4, lsl #2
	bl	__cvmx_flash_read_cmd16
	add	r0, r0, #1
	str	r0, [r4, #4]
	add	r1, fp, #47
	mov	r0, r6
	bl	__cvmx_flash_read_cmd16
	subs	r3, r0, #0
	lsl	r3, r3, #8
	moveq	r3, #128
	ldr	r0, [r9, #28]
	ldr	r2, [r4, #4]
	add	r5, r5, #1
	cmp	r0, r5
	mla	r10, r2, r3, r10
	str	r3, [r4, #8]
	bgt	.L5
.L11:
	ldr	r3, [r8]
	add	r7, r3, r7
	ldr	r3, [r7, #4]
	cmp	r3, #129
	ble	.L18
	cmp	r3, #130
	bne	.L8
	mov	r2, #240
	mov	r1, #0
	mov	r0, r6
	bl	__cvmx_flash_write_cmd
.L7:
	mov	r0, r6
	mov	r2, #255
	mov	r1, #0
	bl	__cvmx_flash_write_cmd
.L8:
	ldr	r4, .L19+4
	ldr	r0, [r4]
	bl	cvmx_clock_get_rate
	ldr	r2, .L19+8
	asr	r3, r0, #31
	smull	r1, r0, r2, r0
	ldr	r1, [r9, #8]
	rsb	r3, r3, r0, asr #18
	asr	r7, r3, #31
	mul	ip, r7, r1
	ldr	r2, [r9, #12]
	mov	r6, r3
	ldr	r0, [r4]
	umull	r4, r5, r1, r3
	mla	r3, r2, r3, ip
	add	r5, r3, r5
	str	r4, [r9, #8]
	str	r5, [r9, #12]
	bl	cvmx_clock_get_rate
	ldr	r2, .L19+12
	asr	r3, r0, #31
	smull	r1, r0, r2, r0
	ldr	r1, [r9, #16]
	rsb	r3, r3, r0, asr #6
	asr	r5, r3, #31
	mul	ip, r5, r1
	ldr	r2, [r9, #20]
	umull	r4, r5, r1, r3
	mla	r2, r3, r2, ip
	add	r5, r2, r5
	mov	r0, #0
	str	r4, [r9, #16]
	str	r5, [r9, #20]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	cmp	r3, #127
	ble	.L8
	b	.L7
.L4:
	mov	r3, #0
	mvn	r0, #0
	str	r3, [r9, #36]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	.align	2
.L19:
	.word	flash_info
	.word	CVMX_CLOCK_CORE
	.word	1125899907
	.word	274877907
	.size	__cvmx_flash_queury_cfi, .-__cvmx_flash_queury_cfi
	.comm	flash_info,4,4
	.comm	CVMX_CLOCK_CORE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
