	.file	"extr_power5+-pmu.c_find_alternative_bdecode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	find_alternative_bdecode, @function
find_alternative_bdecode:
.LFB0:
	.cfi_startproc
	endbr64
	mov	ecx, DWORD PTR PM_PMC_SH[rip]
	mov	r8d, edi
	sar	r8d, cl
	and	r8d, DWORD PTR PM_PMC_MSK[rip]
	je	.L9
	cmp	r8d, 4
	jg	.L9
	mov	esi, DWORD PTR PM_PMCSEL_MSK[rip]
	mov	r11, QWORD PTR bytedecode_alternatives[rip]
	movsx	rax, r8d
	xor	edx, edx
	mov	r10d, 5
	mov	r9d, esi
	mov	rax, QWORD PTR -8[r11+rax*8]
	sub	r10d, r8d
	and	r9d, edi
.L4:
	cmp	DWORD PTR [rax+rdx], r9d
	je	.L13
	add	rdx, 4
	cmp	rdx, 16
	jne	.L4
	cmp	r8d, 1
	je	.L14
	cmp	r8d, 3
	je	.L15
.L6:
	cmp	r9d, 16
	je	.L10
	cmp	r9d, 40
	jne	.L9
.L10:
	mov	eax, DWORD PTR PM_PMC_MSKS[rip]
	mov	esi, edi
	sal	r10d, cl
	xor	esi, 56
	not	eax
	and	eax, esi
	or	eax, r10d
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	lea	eax, -46[r9]
	cmp	eax, 1
	ja	.L6
	mov	eax, 2
	sal	eax, cl
	sub	edi, eax
	mov	eax, edi
	sub	eax, 33
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	lea	eax, -13[r9]
	cmp	eax, 1
	ja	.L6
	mov	eax, 2
	sal	eax, cl
	lea	eax, 33[rdi+rax]
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	or	esi, DWORD PTR PM_PMC_MSKS[rip]
	mov	eax, r10d
	movsx	r10, r10d
	not	esi
	sal	eax, cl
	and	esi, edi
	or	esi, eax
	mov	rax, QWORD PTR -8[r11+r10*8]
	or	esi, DWORD PTR [rax+rdx]
	mov	eax, esi
	ret
.L9:
	mov	eax, -1
	ret
	.cfi_endproc
.LFE0:
	.size	find_alternative_bdecode, .-find_alternative_bdecode
	.comm	bytedecode_alternatives,8,8
	.comm	PM_PMC_SH,4,4
	.comm	PM_PMC_MSKS,4,4
	.comm	PM_PMC_MSK,4,4
	.comm	PM_PMCSEL_MSK,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_power5+-pmu.c_find_alternative_bdecode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_alternative_bdecode, %function
find_alternative_bdecode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L15
	ldr	r2, .L15+4
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r5, [r2]
	ldr	r2, [r3]
	ands	r2, r2, r0, asr r5
	moveq	r3, #1
	movne	r3, #0
	cmp	r2, #4
	orrgt	r3, r3, #1
	cmp	r3, #0
	bne	.L8
	ldr	r1, .L15+8
	ldr	r3, .L15+12
	ldr	r9, [r1]
	sub	r1, r2, #-1073741823
	ldr	r1, [r9, r1, lsl #2]
	ldr	r7, [r3]
	add	r4, r1, #12
	sub	r3, r1, #4
	and	lr, r7, r0
	rsb	r1, r1, #4
	rsb	r8, r2, #5
.L4:
	add	r6, r1, r3
	ldr	ip, [r3, #4]!
	cmp	ip, lr
	beq	.L12
	cmp	r3, r4
	bne	.L4
	cmp	r2, #1
	beq	.L13
	cmp	r2, #3
	beq	.L14
.L6:
	cmp	lr, #40
	cmpne	lr, #16
	bne	.L8
	ldr	r3, .L15+16
	eor	r0, r0, #56
	ldr	r3, [r3]
	bic	r0, r0, r3
	orr	r0, r0, r8, lsl r5
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L14:
	sub	r3, lr, #46
	cmp	r3, #1
	bhi	.L6
	mov	r3, #2
	sub	r0, r0, r3, lsl r5
	sub	r0, r0, #33
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	sub	r3, lr, #13
	cmp	r3, #1
	bhi	.L6
	mov	r3, #2
	add	r0, r0, r3, lsl r5
	add	r0, r0, #33
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	ldr	r2, .L15+16
	sub	r3, r8, #-1073741823
	ldr	r2, [r2]
	ldr	r3, [r9, r3, lsl #2]
	orr	r7, r7, r2
	ldr	r3, [r3, r6]
	bic	r0, r0, r7
	orr	r0, r0, r8, lsl r5
	orr	r0, r0, r3
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L8:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L16:
	.align	2
.L15:
	.word	PM_PMC_MSK
	.word	PM_PMC_SH
	.word	bytedecode_alternatives
	.word	PM_PMCSEL_MSK
	.word	PM_PMC_MSKS
	.size	find_alternative_bdecode, .-find_alternative_bdecode
	.comm	bytedecode_alternatives,4,4
	.comm	PM_PMC_SH,4,4
	.comm	PM_PMC_MSKS,4,4
	.comm	PM_PMC_MSK,4,4
	.comm	PM_PMCSEL_MSK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
