	.file	"extr_ecore_dbg_fw_funcs.c_ecore_dbg_bus_dump.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"dbg_bus_dump: dump_buf = 0x%p, buf_size_in_dwords = %d\n"
	.text
	.p2align 4
	.globl	ecore_dbg_bus_dump
	.type	ecore_dbg_bus_dump, @function
ecore_dbg_bus_dump:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, r8
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [r8], 0
	mov	rdx, rsp
	call	ecore_dbg_bus_get_dump_buf_size@PLT
	cmp	eax, DWORD PTR DBG_STATUS_OK[rip]
	je	.L27
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L28
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	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
.L27:
	.cfi_restore_state
	mov	esi, DWORD PTR ECORE_MSG_DEBUG[rip]
	mov	r8, r12
	mov	rcx, rbp
	mov	rdi, r13
	lea	rdx, .LC0[rip]
	call	DP_VERBOSE@PLT
	mov	rdx, QWORD PTR 0[r13]
	cmp	rdx, QWORD PTR DBG_BUS_STATE_RECORDING[rip]
	je	.L4
	cmp	rdx, QWORD PTR DBG_BUS_STATE_STOPPED[rip]
	mov	eax, DWORD PTR DBG_STATUS_RECORDING_NOT_STARTED[rip]
	jne	.L1
.L8:
	mov	eax, DWORD PTR DBG_STATUS_DUMP_BUF_TOO_SMALL[rip]
	cmp	QWORD PTR [rsp], r12
	jg	.L1
	mov	rax, QWORD PTR DBG_BUS_TARGET_ID_PCI[rip]
	cmp	QWORD PTR 8[r13], rax
	jne	.L9
	mov	eax, DWORD PTR 64[r13]
	test	eax, eax
	je	.L29
.L9:
	mov	ecx, 1
	mov	rdx, rbp
	mov	rsi, r14
	mov	rdi, r13
	call	ecore_bus_dump_hdr@PLT
	mov	r12, rax
	mov	rax, QWORD PTR DBG_BUS_TARGET_ID_NIG[rip]
	cmp	QWORD PTR 8[r13], rax
	je	.L10
	mov	ecx, 1
	lea	rdx, 0[rbp+r12*8]
	mov	rsi, r14
	mov	rdi, r13
	call	ecore_bus_dump_data@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR DBG_STATUS_NO_DATA_RECORDED[rip]
	test	rcx, rcx
	je	.L1
	mov	rax, rcx
	add	r12, rcx
	cqo
	idiv	QWORD PTR CHUNK_SIZE_IN_DWORDS[rip]
	mov	eax, DWORD PTR DBG_STATUS_DUMP_NOT_CHUNK_ALIGNED[rip]
	test	rdx, rdx
	jne	.L1
.L10:
	mov	rsi, r12
	mov	edx, 1
	mov	rdi, rbp
	call	ecore_dump_last_section@PLT
	mov	rdi, r13
	add	r12, rax
	call	ecore_bus_free_pci_buf@PLT
	mov	rax, QWORD PTR DBG_BUS_STATE_IDLE[rip]
	cmp	QWORD PTR MAX_BLOCK_ID[rip], 0
	mov	QWORD PTR 56[r13], 0
	mov	QWORD PTR 48[r13], 0
	mov	QWORD PTR 0[r13], rax
	mov	QWORD PTR 32[r13], 0
	mov	QWORD PTR 40[r13], 0
	jle	.L13
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdx, QWORD PTR BLOCK_PCIE[rip]
	mov	rax, QWORD PTR 24[r13]
	add	rbp, 1
	mov	esi, DWORD PTR DBG_BUS_BLOCK_DATA_ENABLE_MASK[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	xor	edx, edx
	call	SET_FIELD@PLT
	cmp	QWORD PTR MAX_BLOCK_ID[rip], rbp
	jg	.L14
.L13:
	mov	rdx, QWORD PTR MAX_DBG_STORMS[rip]
	test	rdx, rdx
	je	.L15
	mov	rax, QWORD PTR 16[r13]
	lea	rdx, [rdx+rdx*2]
	lea	rdx, [rax+rdx*8]
	.p2align 4,,10
	.p2align 3
.L16:
	mov	DWORD PTR [rax], 0
	add	rax, 24
	mov	QWORD PTR -16[rax], 0
	mov	QWORD PTR -8[rax], 0
	cmp	rax, rdx
	jne	.L16
.L15:
	mov	QWORD PTR [rbx], r12
	mov	eax, DWORD PTR DBG_STATUS_OK[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	mov	eax, DWORD PTR DBG_STATUS_PCI_BUF_NOT_ALLOCATED[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rsi, r14
	mov	rdi, r13
	call	ecore_dbg_bus_stop@PLT
	cmp	eax, DWORD PTR DBG_STATUS_OK[rip]
	je	.L8
	jmp	.L1
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ecore_dbg_bus_dump, .-ecore_dbg_bus_dump
	.comm	MAX_DBG_STORMS,8,8
	.comm	MAX_BLOCK_ID,8,8
	.comm	ECORE_MSG_DEBUG,4,4
	.comm	DBG_STATUS_RECORDING_NOT_STARTED,4,4
	.comm	DBG_STATUS_PCI_BUF_NOT_ALLOCATED,4,4
	.comm	DBG_STATUS_OK,4,4
	.comm	DBG_STATUS_NO_DATA_RECORDED,4,4
	.comm	DBG_STATUS_DUMP_NOT_CHUNK_ALIGNED,4,4
	.comm	DBG_STATUS_DUMP_BUF_TOO_SMALL,4,4
	.comm	DBG_BUS_TARGET_ID_PCI,8,8
	.comm	DBG_BUS_TARGET_ID_NIG,8,8
	.comm	DBG_BUS_STATE_STOPPED,8,8
	.comm	DBG_BUS_STATE_RECORDING,8,8
	.comm	DBG_BUS_STATE_IDLE,8,8
	.comm	DBG_BUS_BLOCK_DATA_ENABLE_MASK,4,4
	.comm	CHUNK_SIZE_IN_DWORDS,8,8
	.comm	BLOCK_PCIE,8,8
	.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_ecore_dbg_fw_funcs.c_ecore_dbg_bus_dump.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"dbg_bus_dump: dump_buf = 0x%p, buf_size_in_dwords ="
	.ascii	" %d\012\000"
	.global	__aeabi_idivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ecore_dbg_bus_dump
	.syntax unified
	.arm
	.fpu softvfp
	.type	ecore_dbg_bus_dump, %function
ecore_dbg_bus_dump:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	ldr	r7, [sp, #56]
	mov	r5, r2
	ldr	r2, .L31
	mov	r6, r3
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	ip, [r7]
	add	r2, sp, #8
	mov	r4, r0
	mov	r8, r1
	bl	ecore_dbg_bus_get_dump_buf_size
	ldr	r9, .L31+4
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L26
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	ldr	r3, .L31+8
	str	r6, [sp]
	ldr	r1, [r3]
	ldr	r2, .L31+12
	mov	r3, r5
	mov	r0, r4
	bl	DP_VERBOSE
	ldr	r2, .L31+16
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L31+20
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L5
.L8:
	ldr	r3, [sp, #8]
	cmp	r3, r6
	bgt	.L28
	ldr	r3, .L31+24
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L9
	ldr	r3, [r4, #32]
	cmp	r3, #0
	beq	.L29
.L9:
	mov	r3, #1
	mov	r2, r5
	mov	r1, r8
	mov	r0, r4
	bl	ecore_bus_dump_hdr
	ldr	r3, .L31+28
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	mov	r6, r0
	cmp	r2, r3
	beq	.L10
	mov	r1, r8
	add	r2, r5, r0, lsl #2
	mov	r3, #1
	mov	r0, r4
	bl	ecore_bus_dump_data
	subs	r8, r0, #0
	beq	.L30
	ldr	r3, .L31+32
	ldr	r1, [r3]
	bl	__aeabi_idivmod
	cmp	r1, #0
	addeq	r6, r6, r8
	beq	.L10
	ldr	r3, .L31+36
	ldr	r0, [r3]
	b	.L1
.L5:
	ldr	r3, .L31+40
	ldr	r0, [r3]
	b	.L1
.L10:
	mov	r2, #1
	mov	r1, r6
	mov	r0, r5
	bl	ecore_dump_last_section
	mov	r3, r0
	mov	r5, #0
	mov	r0, r4
	ldr	r8, .L31+44
	add	r6, r6, r3
	bl	ecore_bus_free_pci_buf
	ldr	r3, .L31+48
	ldr	r2, [r8]
	ldr	r3, [r3]
	cmp	r2, r5
	str	r3, [r4]
	str	r5, [r4, #28]
	str	r5, [r4, #24]
	str	r5, [r4, #16]
	str	r5, [r4, #20]
	ble	.L13
	ldr	r10, .L31+52
	ldr	fp, .L31+56
.L14:
	ldr	r1, [fp]
	ldr	r3, [r4, #12]
	mov	r2, #0
	ldr	r0, [r3, r1, lsl #2]
	ldr	r1, [r10]
	bl	SET_FIELD
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L14
.L13:
	ldr	r3, .L31+60
	ldr	r1, [r3]
	cmp	r1, #0
	beq	.L15
	mov	r2, #0
	ldr	r3, [r4, #8]
	add	r1, r1, r1, lsl #1
	add	r1, r3, r1, lsl #2
.L16:
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	add	r3, r3, #12
	cmp	r3, r1
	bne	.L16
.L15:
	ldr	r0, [r9]
	str	r6, [r7]
	b	.L1
.L28:
	ldr	r3, .L31+64
	ldr	r0, [r3]
	b	.L1
.L30:
	ldr	r3, .L31+68
	ldr	r0, [r3]
	b	.L1
.L29:
	ldr	r3, .L31+72
	ldr	r0, [r3]
	b	.L1
.L4:
	mov	r1, r8
	mov	r0, r4
	bl	ecore_dbg_bus_stop
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L1
	b	.L8
.L27:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC1
	.word	DBG_STATUS_OK
	.word	ECORE_MSG_DEBUG
	.word	.LC0
	.word	DBG_BUS_STATE_RECORDING
	.word	DBG_BUS_STATE_STOPPED
	.word	DBG_BUS_TARGET_ID_PCI
	.word	DBG_BUS_TARGET_ID_NIG
	.word	CHUNK_SIZE_IN_DWORDS
	.word	DBG_STATUS_DUMP_NOT_CHUNK_ALIGNED
	.word	DBG_STATUS_RECORDING_NOT_STARTED
	.word	MAX_BLOCK_ID
	.word	DBG_BUS_STATE_IDLE
	.word	DBG_BUS_BLOCK_DATA_ENABLE_MASK
	.word	BLOCK_PCIE
	.word	MAX_DBG_STORMS
	.word	DBG_STATUS_DUMP_BUF_TOO_SMALL
	.word	DBG_STATUS_NO_DATA_RECORDED
	.word	DBG_STATUS_PCI_BUF_NOT_ALLOCATED
	.size	ecore_dbg_bus_dump, .-ecore_dbg_bus_dump
	.comm	MAX_DBG_STORMS,4,4
	.comm	MAX_BLOCK_ID,4,4
	.comm	ECORE_MSG_DEBUG,4,4
	.comm	DBG_STATUS_RECORDING_NOT_STARTED,4,4
	.comm	DBG_STATUS_PCI_BUF_NOT_ALLOCATED,4,4
	.comm	DBG_STATUS_OK,4,4
	.comm	DBG_STATUS_NO_DATA_RECORDED,4,4
	.comm	DBG_STATUS_DUMP_NOT_CHUNK_ALIGNED,4,4
	.comm	DBG_STATUS_DUMP_BUF_TOO_SMALL,4,4
	.comm	DBG_BUS_TARGET_ID_PCI,4,4
	.comm	DBG_BUS_TARGET_ID_NIG,4,4
	.comm	DBG_BUS_STATE_STOPPED,4,4
	.comm	DBG_BUS_STATE_RECORDING,4,4
	.comm	DBG_BUS_STATE_IDLE,4,4
	.comm	DBG_BUS_BLOCK_DATA_ENABLE_MASK,4,4
	.comm	CHUNK_SIZE_IN_DWORDS,4,4
	.comm	BLOCK_PCIE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
