	.file	"extr_reg.c_handle_channel_custom.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Disabling freq %d MHz as custom regd has no rule that fits it\n"
	.text
	.p2align 4
	.type	handle_channel_custom, @function
handle_channel_custom:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	mov	edi, 20
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	MHZ_TO_KHZ@PLT
	mov	ebx, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR [r12]
	call	MHZ_TO_KHZ@PLT
	mov	edx, ebx
	mov	rsi, r13
	mov	edi, eax
	call	freq_reg_info_regd@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L3
	mov	eax, ebx
	shr	eax, 31
	add	ebx, eax
	sar	ebx
.L2:
	mov	edi, 5
	call	MHZ_TO_KHZ@PLT
	cmp	eax, ebx
	jle	.L4
.L3:
	mov	rdi, rbp
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L20
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r13
	call	reg_rule_to_chan_bw_flags@PLT
	mov	DWORD PTR 12[r12], 0
	mov	ebx, eax
	mov	eax, DWORD PTR jiffies[rip]
	mov	DWORD PTR 44[r12], eax
	mov	eax, DWORD PTR NL80211_DFS_USABLE[rip]
	mov	DWORD PTR 40[r12], eax
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR REGULATORY_WIPHY_SELF_MANAGED[rip], eax
	jne	.L21
	mov	edi, DWORD PTR 8[rbp]
	call	map_regdom_flags@PLT
	or	ebx, DWORD PTR 4[r12]
	or	ebx, eax
	mov	DWORD PTR 4[r12], ebx
.L9:
	mov	edi, DWORD PTR 16[rbp]
	call	MBI_TO_DBI@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	DWORD PTR 16[r12], eax
	call	MBM_TO_DBM@PLT
	mov	DWORD PTR 24[r12], eax
	mov	DWORD PTR 20[r12], eax
	mov	eax, DWORD PTR 4[r12]
	test	DWORD PTR IEEE80211_CHAN_RADAR[rip], eax
	je	.L1
	mov	rax, QWORD PTR 0[rbp]
	test	rax, rax
	je	.L10
.L18:
	mov	QWORD PTR 32[r12], rax
.L1:
	pop	rbx
	.cfi_remember_state
	.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
.L21:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbp]
	or	ebx, DWORD PTR 8[r12]
	call	map_regdom_flags@PLT
	or	ebx, eax
	mov	DWORD PTR 4[r12], ebx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L20:
	mov	esi, DWORD PTR [r12]
	lea	rdi, .LC0[rip]
	call	pr_debug@PLT
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR REGULATORY_WIPHY_SELF_MANAGED[rip], eax
	je	.L6
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, DWORD PTR IEEE80211_CHAN_DISABLED[rip]
	pop	rbp
	.cfi_def_cfa_offset 32
	or	DWORD PTR 4[r12], eax
	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
.L6:
	.cfi_restore_state
	mov	eax, DWORD PTR 8[r12]
	or	eax, DWORD PTR IEEE80211_CHAN_DISABLED[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	DWORD PTR 8[r12], eax
	mov	DWORD PTR 4[r12], eax
	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
	mov	rax, QWORD PTR IEEE80211_DFS_MIN_CAC_TIME_MS[rip]
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	handle_channel_custom, .-handle_channel_custom
	.comm	jiffies,4,4
	.comm	REGULATORY_WIPHY_SELF_MANAGED,4,4
	.comm	NL80211_DFS_USABLE,4,4
	.comm	IEEE80211_DFS_MIN_CAC_TIME_MS,8,8
	.comm	IEEE80211_CHAN_RADAR,4,4
	.comm	IEEE80211_CHAN_DISABLED,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_handle_channel_custom.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Disabling freq %d MHz as custom regd has no rule th"
	.ascii	"at fits it\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_channel_custom, %function
handle_channel_custom:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r0
	mov	r0, #20
	mov	r6, r1
	mov	r7, r2
	bl	MHZ_TO_KHZ
	mov	r5, #0
	mov	r4, r0
	b	.L2
.L4:
	ldr	r0, [r6]
	bl	MHZ_TO_KHZ
	mov	r2, r4
	mov	r1, r7
	bl	freq_reg_info_regd
	mov	r5, r0
	bl	IS_ERR
	cmp	r0, #0
	beq	.L3
	add	r4, r4, r4, lsr #31
	asr	r4, r4, #1
.L2:
	mov	r0, #5
	bl	MHZ_TO_KHZ
	cmp	r0, r4
	ble	.L4
.L3:
	mov	r0, r5
	bl	IS_ERR
	subs	r9, r0, #0
	bne	.L20
	mov	r2, r6
	mov	r1, r5
	mov	r0, r7
	bl	reg_rule_to_chan_bw_flags
	ldr	r1, .L22
	ldr	r2, .L22+4
	ldr	r3, .L22+8
	ldr	ip, [r8]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	ip, r1
	mov	r4, r0
	str	r9, [r6, #12]
	str	r2, [r6, #36]
	str	r3, [r6, #32]
	bne	.L21
	ldr	r0, [r5, #4]
	bl	map_regdom_flags
	ldr	r3, [r6, #4]
	orr	r4, r4, r3
	orr	r4, r4, r0
	str	r4, [r6, #4]
.L9:
	ldr	r0, [r5, #12]
	bl	MBI_TO_DBI
	mov	r3, r0
	ldr	r0, [r5, #8]
	str	r3, [r6, #16]
	bl	MBM_TO_DBM
	ldr	r3, .L22+12
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	str	r0, [r6, #24]
	tst	r2, r3
	str	r0, [r6, #20]
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, [r5]
	cmp	r3, #0
	ldreq	r3, .L22+16
	ldreq	r3, [r3]
	str	r3, [r6, #28]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	r3, [r6, #8]
	ldr	r0, [r5, #4]
	orr	r4, r4, r3
	bl	map_regdom_flags
	orr	r4, r4, r0
	str	r4, [r6, #4]
	b	.L9
.L20:
	ldr	r1, [r6]
	ldr	r0, .L22+20
	bl	pr_debug
	ldr	r3, .L22
	ldr	r2, [r8]
	ldr	r3, [r3]
	tst	r2, r3
	ldr	r2, .L22+24
	ldreq	r3, [r6, #8]
	ldrne	r3, [r6, #4]
	ldrne	r2, [r2]
	ldreq	r2, [r2]
	orrne	r3, r3, r2
	orreq	r3, r3, r2
	streq	r3, [r6, #8]
	str	r3, [r6, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	.align	2
.L22:
	.word	REGULATORY_WIPHY_SELF_MANAGED
	.word	jiffies
	.word	NL80211_DFS_USABLE
	.word	IEEE80211_CHAN_RADAR
	.word	IEEE80211_DFS_MIN_CAC_TIME_MS
	.word	.LC0
	.word	IEEE80211_CHAN_DISABLED
	.size	handle_channel_custom, .-handle_channel_custom
	.comm	jiffies,4,4
	.comm	REGULATORY_WIPHY_SELF_MANAGED,4,4
	.comm	NL80211_DFS_USABLE,4,4
	.comm	IEEE80211_DFS_MIN_CAC_TIME_MS,4,4
	.comm	IEEE80211_CHAN_RADAR,4,4
	.comm	IEEE80211_CHAN_DISABLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
