	.file	"extr_ppc-bdm.c_bdm_ppc_fetch_registers.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bdm_ppc_fetch_registers, @function
bdm_ppc_fetch_registers:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edi
	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
	sub	rsp, 64
	.cfi_def_cfa_offset 112
	mov	esi, DWORD PTR FP0_REGNUM[rip]
	mov	edx, DWORD PTR FPLAST_REGNUM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	sub	edx, esi
	js	.L2
	movsx	rdx, edx
	lea	rax, 16[rsp]
	lea	rdx, 17[rsp+rdx]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	BYTE PTR [rax], -1
	add	rax, 1
	cmp	rdx, rax
	jne	.L3
.L2:
	mov	BYTE PTR 15[rsp], -1
	cmp	r13d, -1
	je	.L24
	mov	rdx, QWORD PTR bdm_regmap[rip]
	movsx	rax, r13d
	mov	ebp, DWORD PTR [rdx+rax*4]
	mov	r12d, ebp
	cmp	ebp, -1
	je	.L10
.L7:
	mov	edi, DWORD PTR current_gdbarch[rip]
	call	gdbarch_tdep@PLT
	cmp	DWORD PTR [rax], r13d
	je	.L10
	mov	edi, DWORD PTR current_gdbarch[rip]
	call	gdbarch_tdep@PLT
	cmp	DWORD PTR 4[rax], r13d
	je	.L10
	cmp	DWORD PTR FP0_REGNUM[rip], r13d
	jg	.L11
	cmp	DWORD PTR FPLAST_REGNUM[rip], r13d
	jge	.L10
.L11:
	mov	esi, r12d
	mov	rdx, rsp
	mov	edi, ebp
	mov	ebx, r13d
	call	ocd_read_bdm_registers@PLT
	mov	r12, rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	mov	ebx, DWORD PTR NUM_REGS[rip]
	mov	ebp, DWORD PTR BDM_NUM_REGS[rip]
	sub	ebx, 1
	je	.L25
	lea	rdx, 4[rsp]
	sub	esi, 1
	xor	edi, edi
	call	ocd_read_bdm_registers@PLT
	lea	rdx, 8[rsp]
	lea	esi, -2[rbp]
	mov	r12, rax
	mov	eax, DWORD PTR FPLAST_REGNUM[rip]
	lea	edi, 1[rax]
	call	ocd_read_bdm_registers@PLT
	lea	rdi, 16[rsp]
	mov	rsi, rax
	call	strcat@PLT
	mov	rdi, r12
	mov	rsi, rax
	call	strcat@PLT
	mov	rdi, r12
	lea	rsi, 15[rsp]
	call	strcat@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	eax, DWORD PTR 8[rsp]
	lea	eax, 33[rdx+rax]
	mov	DWORD PTR [rsp], eax
	test	ebx, ebx
	js	.L1
	xor	ebp, ebp
	xor	r13d, r13d
.L12:
	movsx	r14, r13d
	sal	r14, 2
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edx, DWORD PTR [rsp]
	sub	esi, ebp
	lea	eax, 3[rdx]
	test	edx, edx
	cmovns	eax, edx
	sar	eax, 2
	cmp	eax, esi
	jle	.L15
	sal	esi, 2
	mov	edi, r13d
	movsx	rsi, esi
	add	rsi, r12
	call	supply_register@PLT
.L15:
	add	r13d, 1
	add	r14, 4
	cmp	r13d, ebx
	jg	.L1
.L16:
	mov	rax, QWORD PTR bdm_regmap[rip]
	mov	esi, DWORD PTR [rax+r14]
	cmp	esi, -1
	jne	.L26
	mov	edi, r13d
	xor	esi, esi
	add	r13d, 1
	add	r14, 4
	call	supply_register@PLT
	cmp	r13d, ebx
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 64
	.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
.L10:
	.cfi_restore_state
	xor	esi, esi
	mov	edi, r13d
	call	supply_register@PLT
	jmp	.L1
.L25:
	lea	r12d, -1[rbp]
	xor	r13d, r13d
	xor	ebp, ebp
	jmp	.L7
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bdm_ppc_fetch_registers, .-bdm_ppc_fetch_registers
	.comm	current_gdbarch,4,4
	.comm	bdm_regmap,8,8
	.comm	NUM_REGS,4,4
	.comm	FPLAST_REGNUM,4,4
	.comm	FP0_REGNUM,4,4
	.comm	BDM_NUM_REGS,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_ppc-bdm.c_bdm_ppc_fetch_registers.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bdm_ppc_fetch_registers, %function
bdm_ppc_fetch_registers:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r9, .L28
	ldr	r7, .L28+4
	ldr	r1, [r9]
	ldr	r2, [r7]
	ldr	r3, .L28+8
	sub	sp, sp, #60
	subs	r2, r2, r1
	mov	r4, r0
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	bmi	.L2
	mvn	r0, #0
	add	r3, sp, #20
	add	r2, r2, r3
	add	r3, sp, #19
.L3:
	strb	r0, [r3, #1]!
	cmp	r2, r3
	bne	.L3
.L2:
	mvn	r3, #0
	cmp	r4, r3
	strb	r3, [sp, #16]
	beq	.L24
	ldr	r8, .L28+12
	ldr	r3, [r8]
	ldr	r6, [r3, r4, lsl #2]
	cmn	r6, #1
	movne	r5, r6
	beq	.L10
.L7:
	ldr	r8, .L28+16
	ldr	r0, [r8]
	bl	gdbarch_tdep
	ldr	r3, [r0]
	cmp	r3, r4
	beq	.L10
	ldr	r0, [r8]
	bl	gdbarch_tdep
	ldr	r3, [r0, #4]
	cmp	r3, r4
	beq	.L10
	ldr	r3, [r9]
	cmp	r3, r4
	bgt	.L11
	ldr	r3, [r7]
	cmp	r3, r4
	bge	.L10
.L11:
	mov	r1, r5
	mov	r0, r6
	add	r2, sp, #4
	bl	ocd_read_bdm_registers
	mov	r5, r4
	mov	r7, r0
	b	.L12
.L24:
	ldr	r2, .L28+20
	ldr	r3, .L28+24
	ldr	r5, [r2]
	ldr	r6, [r3]
	subs	r5, r5, #1
	beq	.L25
	sub	r1, r1, #1
	add	r2, sp, #8
	mov	r0, #0
	bl	ocd_read_bdm_registers
	mov	r4, r0
	ldr	r0, [r7]
	add	r2, sp, #12
	sub	r1, r6, #2
	add	r0, r0, #1
	bl	ocd_read_bdm_registers
	mov	r1, r0
	add	r0, sp, #20
	bl	strcat
	mov	r1, r0
	mov	r0, r4
	bl	strcat
	add	r1, sp, #16
	bl	strcat
	ldr	r3, [sp, #8]
	ldr	r2, [sp, #12]
	cmp	r5, #0
	add	r3, r3, r2
	add	r3, r3, #33
	mov	r7, r0
	str	r3, [sp, #4]
	blt	.L1
	mov	r4, #0
	mov	r6, r4
.L12:
	ldr	r8, .L28+12
	b	.L16
.L26:
	ldr	r3, [sp, #4]
	sub	r1, r1, r6
	cmp	r3, #0
	add	r2, r3, #3
	movlt	r3, r2
	cmp	r1, r3, asr #2
	bge	.L15
	mov	r0, r4
	add	r1, r7, r1, lsl #2
	bl	supply_register
.L15:
	add	r4, r4, #1
	cmp	r4, r5
	bgt	.L1
.L16:
	ldr	r3, [r8]
	ldr	r1, [r3, r4, lsl #2]
	cmn	r1, #1
	bne	.L26
	mov	r0, r4
	mov	r1, #0
	add	r4, r4, #1
	bl	supply_register
	cmp	r4, r5
	ble	.L16
.L1:
	ldr	r3, .L28+8
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	mov	r0, r4
	mov	r1, #0
	bl	supply_register
	b	.L1
.L25:
	mov	r4, r5
	sub	r5, r6, #1
	mov	r6, r4
	b	.L7
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	FP0_REGNUM
	.word	FPLAST_REGNUM
	.word	.LC0
	.word	bdm_regmap
	.word	current_gdbarch
	.word	NUM_REGS
	.word	BDM_NUM_REGS
	.size	bdm_ppc_fetch_registers, .-bdm_ppc_fetch_registers
	.comm	current_gdbarch,4,4
	.comm	bdm_regmap,4,4
	.comm	NUM_REGS,4,4
	.comm	FPLAST_REGNUM,4,4
	.comm	FP0_REGNUM,4,4
	.comm	BDM_NUM_REGS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
