	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getchaninfo
_getchaninfo:                           ## @getchaninfo
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_chaninfo@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_1
## %bb.6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%edi, %r14d
	movq	_MAXCHAN@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_IEEE80211_CHANINFO_SIZE
	movl	%eax, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	movq	(%r15), %rbx
LBB0_3:
	movq	_IEEE80211_IOC_CHANINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%r12), %edi
	callq	_IEEE80211_CHANINFO_SIZE
	movl	%r14d, %edi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_get80211
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	movl	%r14d, %edi
	callq	_ifmedia_getstate
	movq	_ifmr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%r14d, %edi
	callq	_gethtconf
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_getvhtconf                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_chaninfo,8,3                   ## @chaninfo
	.comm	_MAXCHAN,4,2                    ## @MAXCHAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no space for channel list"

	.comm	_IEEE80211_IOC_CHANINFO,4,2     ## @IEEE80211_IOC_CHANINFO
L_.str.1:                               ## @.str.1
	.asciz	"unable to get channel information"

	.comm	_ifmr,4,2                       ## @ifmr
	.no_dead_strip	_getchaninfo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getchaninfo
_getchaninfo:                           ; @getchaninfo
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x21, _chaninfo@GOTPAGE
Lloh1:
	ldr	x21, [x21, _chaninfo@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
Lloh2:
	adrp	x22, _MAXCHAN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MAXCHAN@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_IEEE80211_CHANINFO_SIZE
	bl	_malloc
	mov	x20, x0
	str	x0, [x21]
	cbnz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	x20, [x21]
LBB0_4:
Lloh6:
	adrp	x8, _IEEE80211_IOC_CHANINFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_IOC_CHANINFO@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	ldr	w0, [x22]
	bl	_IEEE80211_CHANINFO_SIZE
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_get80211
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	mov	x0, x19
	bl	_ifmedia_getstate
Lloh11:
	adrp	x8, _ifmr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ifmr@GOTPAGEOFF]
Lloh13:
	str	w0, [x8]
	mov	x0, x19
	bl	_gethtconf
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_getvhtconf
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_chaninfo,8,3                   ; @chaninfo
	.comm	_MAXCHAN,4,2                    ; @MAXCHAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no space for channel list"

	.comm	_IEEE80211_IOC_CHANINFO,4,2     ; @IEEE80211_IOC_CHANINFO
l_.str.1:                               ; @.str.1
	.asciz	"unable to get channel information"

	.comm	_ifmr,4,2                       ; @ifmr
	.no_dead_strip	_getchaninfo
.subsections_via_symbols
