	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max1363_monitor_mode_update
_max1363_monitor_mode_update:           ## @max1363_monitor_mode_update
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_MAX1363_SETUP_MONITOR_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%esi, %esi
	je	LBB0_32
## %bb.1:
	orl	%eax, (%r14)
	movq	_MAX1363_CHANNEL_SEL_MASK@GOTPCREL(%rip), %rcx
	movq	_MAX1363_SCAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_MAX1363_SE_DE_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	andl	4(%r14), %eax
	movq	_MAX1363_CONFIG_SCAN_MONITOR_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	16(%r14), %edx
	orl	12(%r14), %edx
	movq	_max1363_mode_table@GOTPCREL(%rip), %rcx
	testb	$15, %dl
	je	LBB0_3
## %bb.2:
	movq	(%rcx), %rcx
	movq	_s0to3@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_32:
	notl	%eax
	andl	%eax, (%r14)
	movq	_MAX1363_SCAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%r14)
	movl	$0, 8(%r14)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_max1363_write_basic_config     ## TAILCALL
LBB0_3:
	movq	(%rcx), %rcx
	testb	$48, %dl
	je	LBB0_5
## %bb.4:
	movq	_d0m1to2m3@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_5:
	movq	_d1m0to3m2@GOTPCREL(%rip), %rdx
LBB0_6:
	movq	(%rdx), %rdx
	shlq	$4, %rdx
	orl	(%rcx,%rdx), %eax
	movl	%eax, 4(%r14)
	leaq	(%rcx,%rdx), %rax
	addq	$8, %rax
	movq	(%rax), %r12
	movq	_MAX1363_MAX_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_bitmap_weight
	leal	(%rax,%rax,2), %ebx
	addl	$3, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kmalloc
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r14), %eax
	movl	%eax, (%r13)
	movl	(%r14), %eax
	movl	%eax, 4(%r13)
	movl	20(%r14), %eax
	addl	%eax, %eax
	movl	%eax, 8(%r13)
	movl	$3, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	32(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	shrl	$8, %esi
	andl	$15, %esi
	orl	%ecx, %esi
	movl	%esi, (%r13,%rdx,4)
	movzbl	(%rax,%rbx,4), %eax
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, 8(%r13,%r15,4)
	addl	$3, %r15d
LBB0_24:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	$8, %rbx
	je	LBB0_25
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	movl	12(%r14), %ecx
	btl	%ebx, %ecx
	movslq	%r15d, %r15
	jae	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	24(%r14), %rcx
	movl	(%rcx,%rbx,4), %edx
	shrl	$4, %edx
	movzbl	%dl, %edx
	movl	%edx, (%r13,%r15,4)
	movl	(%rcx,%rbx,4), %ecx
	shll	$4, %ecx
	movzbl	%cl, %ecx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$3, %rbx
	ja	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$0, (%r13,%r15,4)
	jmp	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	$128, (%r13,%r15,4)
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ecx, %ecx
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	leaq	1(%r15), %rdx
	movl	%ecx, 4(%r13,%r15,4)
	testl	%eax, 16(%r14)
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$3, %rbx
	ja	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=1
	orl	$15, %ecx
	jmp	LBB0_22
LBB0_21:                                ##   in Loop: Header=BB0_10 Depth=1
	orl	$7, %ecx
LBB0_22:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%ecx, (%r13,%rdx,4)
	movl	$255, %eax
	jmp	LBB0_23
LBB0_25:
	movl	48(%r14), %edi
	movq	%r13, %rsi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	callq	*40(%r14)
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_31
## %bb.26:
	cmpl	%r15d, %ebx
	jne	LBB0_27
## %bb.28:
	movl	(%r14), %eax
	movl	%eax, (%r13)
	movq	_MAX1363_MON_INT_ENABLE@GOTPCREL(%rip), %rax
	movl	20(%r14), %ecx
	addl	%ecx, %ecx
	orl	(%rax), %ecx
	orl	$240, %ecx
	movl	%ecx, 4(%r13)
	movl	48(%r14), %edi
	movq	%r13, %rsi
	movl	$2, %edx
	callq	*40(%r14)
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_31
## %bb.29:
	cmpl	$2, %ebx
	jne	LBB0_27
## %bb.30:
	movl	$1, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_31
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_27:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_31:
	movq	%r13, %rdi
	callq	_kfree
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX1363_SETUP_MONITOR_SETUP,4,2 ## @MAX1363_SETUP_MONITOR_SETUP
	.comm	_MAX1363_SCAN_MASK,4,2          ## @MAX1363_SCAN_MASK
	.comm	_MAX1363_CHANNEL_SEL_MASK,4,2   ## @MAX1363_CHANNEL_SEL_MASK
	.comm	_MAX1363_SE_DE_MASK,4,2         ## @MAX1363_SE_DE_MASK
	.comm	_MAX1363_CONFIG_SCAN_MONITOR_MODE,4,2 ## @MAX1363_CONFIG_SCAN_MONITOR_MODE
	.comm	_max1363_mode_table,8,3         ## @max1363_mode_table
	.comm	_s0to3,8,3                      ## @s0to3
	.comm	_d0m1to2m3,8,3                  ## @d0m1to2m3
	.comm	_d1m0to3m2,8,3                  ## @d1m0to3m2
	.comm	_MAX1363_MAX_CHANNELS,4,2       ## @MAX1363_MAX_CHANNELS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MAX1363_MON_INT_ENABLE,4,2     ## @MAX1363_MON_INT_ENABLE
	.no_dead_strip	_max1363_monitor_mode_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max1363_monitor_mode_update
_max1363_monitor_mode_update:           ; @max1363_monitor_mode_update
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX1363_SETUP_MONITOR_SETUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX1363_SETUP_MONITOR_SETUP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w1, LBB0_3
; %bb.1:
	ldp	w9, w10, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh3:
	adrp	x8, _MAX1363_CHANNEL_SEL_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX1363_CHANNEL_SEL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MAX1363_SCAN_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX1363_SCAN_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x11, _MAX1363_SE_DE_MASK@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MAX1363_SE_DE_MASK@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh11:
	ldr	w9, [x11]
	orr	w8, w8, w9
	bic	w8, w10, w8
Lloh12:
	adrp	x9, _MAX1363_CONFIG_SCAN_MONITOR_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAX1363_CONFIG_SCAN_MONITOR_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldp	w9, w10, [x19, #12]
	orr	w10, w10, w9
Lloh15:
	adrp	x9, _max1363_mode_table@GOTPAGE
Lloh16:
	ldr	x9, [x9, _max1363_mode_table@GOTPAGEOFF]
	tst	w10, #0xf
	b.eq	LBB0_4
; %bb.2:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _s0to3@GOTPAGE
Lloh18:
	ldr	x10, [x10, _s0to3@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldp	w9, w10, [x19]
	bic	w8, w9, w8
Lloh19:
	adrp	x9, _MAX1363_SCAN_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MAX1363_SCAN_MASK@GOTPAGEOFF]
	str	w8, [x19]
Lloh21:
	ldr	w8, [x9]
	bic	w8, w10, w8
	stp	w8, wzr, [x19, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_max1363_write_basic_config
LBB0_4:
	ldr	x9, [x9]
	tst	w10, #0x30
	b.eq	LBB0_6
; %bb.5:
Lloh22:
	adrp	x10, _d0m1to2m3@GOTPAGE
Lloh23:
	ldr	x10, [x10, _d0m1to2m3@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh24:
	adrp	x10, _d1m0to3m2@GOTPAGE
Lloh25:
	ldr	x10, [x10, _d1m0to3m2@GOTPAGEOFF]
LBB0_7:
	ldr	x10, [x10]
	add	x9, x9, x10, lsl #4
	ldr	w10, [x9], #8
	orr	w8, w10, w8
	str	w8, [x19, #4]
	ldr	x22, [x9]
Lloh26:
	adrp	x8, _MAX1363_MAX_CHANNELS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MAX1363_MAX_CHANNELS@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_bitmap_weight
	add	w8, w0, w0, lsl #1
	add	w21, w8, #3
Lloh29:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kmalloc
	mov	x20, x0
	cbz	x0, LBB0_28
; %bb.8:
	mov	x23, #0
	ldr	w8, [x19, #4]
	str	w8, [x20]
	ldr	w8, [x19]
	str	w8, [x20, #4]
	ldr	w8, [x19, #20]
	lsl	w8, w8, #1
	str	w8, [x20, #8]
	mov	w24, #3
	mov	w25, #1
	mov	w26, #128
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=1
	ldr	x9, [x19, #32]
	ldr	w13, [x9, x8]
	ubfx	w13, w13, #8, #4
	orr	w11, w13, w11
	str	w11, [x20, x12, lsl #2]
	ldrb	w8, [x9, x8]
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x9, x20, x10, lsl #2
	str	w8, [x9, #8]
	add	w24, w24, #3
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x23, x23, #1
	cmp	x23, #8
	b.eq	LBB0_23
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w10, [x19, #12]
	lsl	w9, w25, w23
	lsl	x8, x23, #2
	tst	w10, w9
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x10, [x19, #24]
	ldr	w11, [x10, x8]
	ubfx	w11, w11, #4, #8
	str	w11, [x20, w24, sxtw #2]
	ldr	w10, [x10, x8]
	ubfiz	w11, w10, #4, #4
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x10, x24
	sxtw	x10, w10
	cmp	x23, #3
	b.hi	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w11, #0
	str	wzr, [x20, x10, lsl #2]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w11, #0
	str	w26, [x20, x10, lsl #2]
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	sxtw	x10, w24
	add	x12, x10, #1
	str	w11, [x20, x12, lsl #2]
	ldr	w13, [x19, #16]
	tst	w13, w9
	b.ne	LBB0_9
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	x23, #3
	b.hi	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=1
	orr	w8, w11, #0xf
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=1
	orr	w8, w11, #0x7
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	str	w8, [x20, x12, lsl #2]
	mov	w8, #255
	b	LBB0_10
LBB0_23:
	ldr	x8, [x19, #40]
	ldr	w0, [x19, #48]
	mov	x1, x20
	mov	x2, x21
	blr	x8
	mov	x22, x0
	tbnz	w0, #31, LBB0_31
; %bb.24:
	cmp	w22, w21
	b.ne	LBB0_29
; %bb.25:
	ldr	w8, [x19]
	str	w8, [x20]
Lloh32:
	adrp	x8, _MAX1363_MON_INT_ENABLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MAX1363_MON_INT_ENABLE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x19, #20]
	orr	w8, w8, w9, lsl #1
	orr	w8, w8, #0xf0
	str	w8, [x20, #4]
	ldr	x8, [x19, #40]
	ldr	w0, [x19, #48]
	mov	x1, x20
	mov	w2, #2
	blr	x8
	mov	x22, x0
	tbnz	w0, #31, LBB0_31
; %bb.26:
	cmp	w22, #2
	b.ne	LBB0_29
; %bb.27:
	mov	w22, #0
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_31
LBB0_28:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_30
LBB0_29:
Lloh37:
	adrp	x8, _EIO@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_30:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_31:
	mov	x0, x20
	bl	_kfree
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX1363_SETUP_MONITOR_SETUP,4,2 ; @MAX1363_SETUP_MONITOR_SETUP
	.comm	_MAX1363_SCAN_MASK,4,2          ; @MAX1363_SCAN_MASK
	.comm	_MAX1363_CHANNEL_SEL_MASK,4,2   ; @MAX1363_CHANNEL_SEL_MASK
	.comm	_MAX1363_SE_DE_MASK,4,2         ; @MAX1363_SE_DE_MASK
	.comm	_MAX1363_CONFIG_SCAN_MONITOR_MODE,4,2 ; @MAX1363_CONFIG_SCAN_MONITOR_MODE
	.comm	_max1363_mode_table,8,3         ; @max1363_mode_table
	.comm	_s0to3,8,3                      ; @s0to3
	.comm	_d0m1to2m3,8,3                  ; @d0m1to2m3
	.comm	_d1m0to3m2,8,3                  ; @d1m0to3m2
	.comm	_MAX1363_MAX_CHANNELS,4,2       ; @MAX1363_MAX_CHANNELS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MAX1363_MON_INT_ENABLE,4,2     ; @MAX1363_MON_INT_ENABLE
	.no_dead_strip	_max1363_monitor_mode_update
.subsections_via_symbols
