	.file	"extr_btm_pm.c_btm_pm_compare_modes.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	btm_pm_compare_modes, @function
btm_pm_compare_modes:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L14
	mov	r8d, DWORD PTR [rsi]
	mov	eax, DWORD PTR BTM_PM_MD_ACTIVE[rip]
	cmp	r8d, eax
	je	.L12
	mov	ecx, DWORD PTR [rdi]
	cmp	eax, ecx
	je	.L12
	mov	eax, DWORD PTR BTM_PM_MD_FORCE[rip]
	test	ecx, eax
	jne	.L15
	test	r8d, eax
	jne	.L16
	lea	eax, -1[rcx]
	imul	eax, DWORD PTR BTM_PM_NUM_SET_MODES[rip]
	lea	eax, -1[r8+rax]
	mov	r8, QWORD PTR btm_pm_md_comp_matrix[rip]
	cdqe
	mov	rax, QWORD PTR [r8+rax*8]
	cmp	rax, 129
	je	.L8
	cmp	rax, 130
	je	.L9
	cmp	rax, 128
	je	.L10
.L12:
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	movdqu	xmm0, XMMWORD PTR [rdi]
	not	eax
	and	eax, ecx
	movups	XMMWORD PTR [rdx], xmm0
	mov	esi, DWORD PTR 16[rdi]
	mov	DWORD PTR [rdx], eax
	mov	rax, rdx
	mov	DWORD PTR 16[rdx], esi
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	xmm4, XMMWORD PTR [rsi]
	movups	XMMWORD PTR [rdx], xmm4
	mov	eax, DWORD PTR 16[rsi]
	mov	DWORD PTR 16[rdx], eax
	mov	rax, rsi
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r8d, DWORD PTR 16[rdi]
	mov	eax, DWORD PTR 12[rdi]
	mov	DWORD PTR [rdx], ecx
	cmp	DWORD PTR 16[rsi], r8d
	cmovle	r8d, DWORD PTR 16[rsi]
	cmp	DWORD PTR 12[rsi], eax
	cmovge	eax, DWORD PTR 12[rsi]
	mov	DWORD PTR 16[rdx], r8d
	mov	DWORD PTR 12[rdx], eax
	cmp	r8d, eax
	jl	.L12
	cmp	ecx, DWORD PTR BTM_PM_MD_SNIFF[rip]
	mov	rax, rdx
	je	.L17
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	movdqu	xmm1, XMMWORD PTR [rsi]
	movups	XMMWORD PTR [rdx], xmm1
	mov	eax, DWORD PTR 16[rsi]
	mov	DWORD PTR 16[rdx], eax
	mov	eax, DWORD PTR BTM_PM_MD_FORCE[rip]
	not	eax
	and	DWORD PTR [rdx], eax
	mov	rax, rsi
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	movdqu	xmm2, XMMWORD PTR [rsi]
	not	eax
	and	eax, r8d
	movups	XMMWORD PTR [rdx], xmm2
	mov	ecx, DWORD PTR 16[rsi]
	mov	DWORD PTR [rdx], eax
	mov	rax, rdx
	mov	DWORD PTR 16[rdx], ecx
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	movdqu	xmm3, XMMWORD PTR [rdi]
	movups	XMMWORD PTR [rdx], xmm3
	mov	eax, DWORD PTR 16[rdi]
	mov	DWORD PTR 16[rdx], eax
	mov	rax, rdi
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, DWORD PTR 8[rdi]
	cmp	DWORD PTR 8[rsi], edx
	cmovge	edx, DWORD PTR 8[rsi]
	mov	DWORD PTR 8[rax], edx
	mov	edx, DWORD PTR 4[rdi]
	cmp	DWORD PTR 4[rsi], edx
	cmovge	edx, DWORD PTR 4[rsi]
	mov	DWORD PTR 4[rax], edx
	ret
	.cfi_endproc
.LFE0:
	.size	btm_pm_compare_modes, .-btm_pm_compare_modes
	.comm	btm_pm_md_comp_matrix,8,8
	.comm	BTM_PM_NUM_SET_MODES,4,4
	.comm	BTM_PM_MD_SNIFF,4,4
	.comm	BTM_PM_MD_FORCE,4,4
	.comm	BTM_PM_MD_ACTIVE,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_btm_pm.c_btm_pm_compare_modes.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	btm_pm_compare_modes, %function
btm_pm_compare_modes:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r6, r0, #0
	mov	lr, r1
	mov	ip, r2
	beq	.L15
	ldr	r3, .L19
	ldr	r4, [r1]
	ldr	r3, [r3]
	cmp	r4, r3
	beq	.L5
	ldr	r7, [r6]
	cmp	r3, r7
	beq	.L5
	ldr	r3, .L19+4
	ldr	r5, [r3]
	tst	r7, r5
	bne	.L16
	ands	r0, r4, r5
	bne	.L17
	ldr	r3, .L19+8
	sub	r4, r4, #1
	ldr	r2, [r3]
	sub	r3, r7, #1
	mla	r4, r2, r3, r4
	ldr	r3, .L19+12
	ldr	r3, [r3]
	ldr	r3, [r3, r4, lsl #2]
	cmp	r3, #129
	beq	.L8
	cmp	r3, #130
	beq	.L9
	cmp	r3, #128
	popne	{r4, r5, r6, r7, r8, pc}
	mov	r4, r1
	ldmia	r4!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [r4]
	mov	r0, lr
	str	r3, [ip]
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r8, r2
	ldmia	r6!, {r0, r1, r2, r3}
	stmia	r8!, {r0, r1, r2, r3}
	ldr	r3, [r6]
	bic	r5, r7, r5
	str	r3, [r8]
	mov	r0, ip
	str	r5, [ip]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r2, [r1, #16]
	ldr	r0, [r6, #16]
	ldr	r3, [r1, #12]
	ldr	r1, [r6, #12]
	cmp	r2, r0
	movge	r2, r0
	cmp	r3, r1
	movlt	r3, r1
	cmp	r2, r3
	str	r7, [ip]
	str	r2, [ip, #16]
	str	r3, [ip, #12]
	blt	.L5
	ldr	r3, .L19+16
	ldr	r3, [r3]
	cmp	r7, r3
	beq	.L18
	mov	r0, ip
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	mov	r4, r2
	mov	r5, r1
	ldmia	r5!, {r0, r1, r2, r3}
	stmia	r4!, {r0, r1, r2, r3}
	ldr	r2, .L19+4
	ldr	r1, [r2]
	ldr	r2, [r5]
	bic	r3, r0, r1
	str	r2, [r4]
	mov	r0, lr
	str	r3, [ip]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	mov	r6, r2
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	r6!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	bic	r4, r4, r5
	str	r3, [r6]
	mov	r0, ip
	str	r4, [ip]
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	lr, r6
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	mov	r0, r6
	str	r3, [ip]
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r0, [r6, #8]
	ldr	r2, [lr, #8]
	ldr	r3, [lr, #4]
	ldr	r1, [r6, #4]
	cmp	r2, r0
	movlt	r2, r0
	cmp	r3, r1
	movlt	r3, r1
	mov	r0, ip
	str	r2, [ip, #8]
	str	r3, [ip, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	.align	2
.L19:
	.word	BTM_PM_MD_ACTIVE
	.word	BTM_PM_MD_FORCE
	.word	BTM_PM_NUM_SET_MODES
	.word	btm_pm_md_comp_matrix
	.word	BTM_PM_MD_SNIFF
	.size	btm_pm_compare_modes, .-btm_pm_compare_modes
	.comm	btm_pm_md_comp_matrix,4,4
	.comm	BTM_PM_NUM_SET_MODES,4,4
	.comm	BTM_PM_MD_SNIFF,4,4
	.comm	BTM_PM_MD_FORCE,4,4
	.comm	BTM_PM_MD_ACTIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
