	.file	"extr_reg.c_reg_rules_intersect.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	reg_rules_intersect, @function
reg_rules_intersect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rsi, QWORD PTR 56[rcx]
	mov	rdi, QWORD PTR 56[rdx]
	call	max@PLT
	mov	rsi, QWORD PTR 64[r13]
	mov	rdi, QWORD PTR 64[r12]
	mov	QWORD PTR 56[rbp], rax
	call	min@PLT
	mov	rbx, QWORD PTR 72[r13]
	mov	QWORD PTR 64[rbp], rax
	mov	eax, DWORD PTR NL80211_RRF_AUTO_BW[rip]
	test	DWORD PTR [r12], eax
	jne	.L2
	mov	r15, QWORD PTR 72[r12]
.L3:
	test	DWORD PTR 0[r13], eax
	jne	.L31
.L4:
	mov	rsi, rbx
	mov	rdi, r15
	call	min@PLT
	mov	edx, DWORD PTR [r12]
	or	edx, DWORD PTR 0[r13]
	mov	QWORD PTR 72[rbp], rax
	mov	ecx, DWORD PTR NL80211_RRF_AUTO_BW[rip]
	mov	DWORD PTR 0[rbp], edx
	test	DWORD PTR [r12], ecx
	je	.L5
	test	DWORD PTR 0[r13], ecx
	jne	.L32
.L5:
	not	ecx
	and	edx, ecx
.L6:
	mov	DWORD PTR 0[rbp], edx
	mov	rdx, QWORD PTR 64[rbp]
	sub	rdx, QWORD PTR 56[rbp]
	cmp	rax, rdx
	jle	.L7
	mov	QWORD PTR 72[rbp], rdx
.L7:
	mov	rsi, QWORD PTR 40[r13]
	mov	rdi, QWORD PTR 40[r12]
	call	min@PLT
	mov	rsi, QWORD PTR 48[r13]
	mov	rdi, QWORD PTR 48[r12]
	mov	QWORD PTR 40[rbp], rax
	call	min@PLT
	mov	rsi, QWORD PTR 8[r13]
	mov	rdi, QWORD PTR 8[r12]
	mov	QWORD PTR 48[rbp], rax
	call	max@PLT
	mov	ecx, DWORD PTR 16[r12]
	mov	QWORD PTR 8[rbp], rax
	test	ecx, ecx
	jne	.L33
	mov	eax, DWORD PTR 16[r13]
	test	eax, eax
	je	.L13
	movdqu	xmm1, XMMWORD PTR 24[r13]
	mov	DWORD PTR 16[rbp], 1
	movups	XMMWORD PTR 24[rbp], xmm1
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edx, DWORD PTR 16[r13]
	test	edx, edx
	jne	.L34
	movdqu	xmm0, XMMWORD PTR 24[r12]
	movups	XMMWORD PTR 24[rbp], xmm0
.L29:
	mov	DWORD PTR 16[rbp], 1
.L11:
	mov	rdi, rbp
	call	is_valid_reg_rule@PLT
	mov	r8d, eax
	xor	eax, eax
	test	r8d, r8d
	jne	.L1
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L34:
	.cfi_restore_state
	xor	r14d, r14d
	cmp	QWORD PTR IEEE80211_NUM_ACS[rip], 0
	je	.L29
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, QWORD PTR 32[rbp]
	mov	rsi, QWORD PTR 32[r13]
	lea	rbx, 0[0+r14*4]
	add	r14, 1
	mov	rdi, QWORD PTR 32[r12]
	add	rdx, rbx
	add	rsi, rbx
	add	rdi, rbx
	call	reg_wmm_rules_intersect@PLT
	mov	rdx, QWORD PTR 24[rbp]
	mov	rsi, QWORD PTR 24[r13]
	add	rdx, rbx
	add	rsi, rbx
	add	rbx, QWORD PTR 24[r12]
	mov	rdi, rbx
	call	reg_wmm_rules_intersect@PLT
	cmp	QWORD PTR IEEE80211_NUM_ACS[rip], r14
	ja	.L10
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L32:
	or	edx, ecx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rsi, r13
	mov	rdi, r14
	call	reg_get_max_bandwidth@PLT
	mov	rbx, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rdi, r15
	mov	rsi, r12
	call	reg_get_max_bandwidth@PLT
	mov	r15, rax
	mov	eax, DWORD PTR NL80211_RRF_AUTO_BW[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	DWORD PTR 16[rbp], 0
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	reg_rules_intersect, .-reg_rules_intersect
	.comm	NL80211_RRF_AUTO_BW,4,4
	.comm	IEEE80211_NUM_ACS,8,8
	.comm	EINVAL,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_reg.c_reg_rules_intersect.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reg_rules_intersect, %function
reg_rules_intersect:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r0
	mov	r9, r1
	ldr	r0, [r2, #28]
	ldr	r1, [r3, #28]
	mov	r6, r3
	mov	r5, r2
	ldr	r4, [sp, #32]
	bl	max
	ldr	r1, [r6, #32]
	str	r0, [r4, #28]
	ldr	r0, [r5, #32]
	bl	min
	ldr	r7, .L31
	ldr	r2, [r5]
	ldr	r3, [r7]
	ldr	r10, [r6, #36]
	tst	r3, r2
	str	r0, [r4, #32]
	bne	.L2
	ldr	r8, [r5, #36]
.L3:
	ldr	r2, [r6]
	tst	r3, r2
	bne	.L29
.L4:
	mov	r1, r10
	mov	r0, r8
	bl	min
	ldr	r1, [r6]
	ldr	r3, [r5]
	ldr	r2, [r7]
	orr	r3, r3, r1
	str	r3, [r4]
	ldr	r1, [r5]
	str	r0, [r4, #36]
	tst	r2, r1
	beq	.L5
	ldr	r1, [r6]
	tst	r2, r1
	orrne	r3, r3, r2
	beq	.L5
.L6:
	ldr	r2, [r4, #32]
	ldr	r1, [r4, #28]
	str	r3, [r4]
	sub	r3, r2, r1
	cmp	r0, r3
	strgt	r3, [r4, #36]
	ldr	r1, [r6, #20]
	ldr	r0, [r5, #20]
	bl	min
	ldr	r1, [r6, #24]
	str	r0, [r4, #20]
	ldr	r0, [r5, #24]
	bl	min
	ldr	r1, [r6, #4]
	str	r0, [r4, #24]
	ldr	r0, [r5, #4]
	bl	max
	ldr	r3, [r5, #8]
	str	r0, [r4, #4]
	cmp	r3, #0
	ldr	r3, [r6, #8]
	bne	.L30
	cmp	r3, #0
	movne	r2, #1
	ldrne	r1, [r6, #16]
	ldrne	r0, [r6, #12]
	addne	r3, r4, #12
	stmne	r3, {r0, r1}
	streq	r3, [r4, #8]
	strne	r2, [r4, #8]
.L11:
	mov	r0, r4
	bl	is_valid_reg_rule
	cmp	r0, #0
	ldreq	r3, .L31+4
	ldreq	r0, [r3]
	rsbeq	r0, r0, #0
	movne	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	bic	r3, r3, r2
	b	.L6
.L30:
	cmp	r3, #0
	beq	.L9
	ldr	r8, .L31+8
	ldr	r3, [r8]
	cmp	r3, #0
	movne	r7, #0
	beq	.L12
.L10:
	ldr	r2, [r4, #16]
	ldr	r1, [r6, #16]
	ldr	r0, [r5, #16]
	add	r2, r2, r7, lsl #2
	add	r1, r1, r7, lsl #2
	add	r0, r0, r7, lsl #2
	bl	reg_wmm_rules_intersect
	ldr	r2, [r4, #12]
	ldr	r1, [r6, #12]
	ldr	r0, [r5, #12]
	lsl	r3, r7, #2
	add	r2, r2, r3
	add	r1, r1, r3
	add	r0, r0, r3
	bl	reg_wmm_rules_intersect
	ldr	r3, [r8]
	add	r7, r7, #1
	cmp	r3, r7
	bhi	.L10
.L12:
	mov	r3, #1
	str	r3, [r4, #8]
	b	.L11
.L9:
	mov	r2, #1
	ldr	r1, [r5, #16]
	ldr	r0, [r5, #12]
	add	r3, r4, #12
	stm	r3, {r0, r1}
	str	r2, [r4, #8]
	b	.L11
.L29:
	mov	r0, r9
	mov	r1, r6
	bl	reg_get_max_bandwidth
	mov	r10, r0
	b	.L4
.L2:
	mov	r0, r8
	mov	r1, r5
	bl	reg_get_max_bandwidth
	ldr	r3, [r7]
	mov	r8, r0
	b	.L3
.L32:
	.align	2
.L31:
	.word	NL80211_RRF_AUTO_BW
	.word	EINVAL
	.word	IEEE80211_NUM_ACS
	.size	reg_rules_intersect, .-reg_rules_intersect
	.comm	NL80211_RRF_AUTO_BW,4,4
	.comm	IEEE80211_NUM_ACS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
