	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getchannel
_getchannel:                            ## @getchannel
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%rbx, %rdi
	callq	_isanyarg
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	_IEEE80211_CHAN_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r15d, %edi
	callq	_getchaninfo
	movq	_errno@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	movl	%eax, %r15d
	cmpb	$0, (%rbx)
	je	LBB0_6
## %bb.2:
	movq	-40(%rbp), %rax
	cmpq	%rbx, %rax
	je	LBB0_6
## %bb.3:
	movq	(%r12), %rcx
	movq	_ERANGE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
LBB0_6:
	movq	(%r12), %rax
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_getchannelflags
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	addq	$16, %rsp
	cmpl	$256, %r15d                     ## imm = 0x100
	jl	LBB0_8
## %bb.10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mapfreq                        ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mapchan                        ## TAILCALL
LBB0_4:
	movzbl	(%rax), %eax
	cmpq	$58, %rax
	ja	LBB0_6
## %bb.5:
	movabsq	$288371113640067073, %rcx       ## imm = 0x400800000000001
	btq	%rax, %rcx
	jb	LBB0_7
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CHAN_ANY,4,2         ## @IEEE80211_CHAN_ANY
	.comm	_errno,8,3                      ## @errno
	.comm	_ERANGE,8,3                     ## @ERANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid channel specification%s"

L_.str.1:                               ## @.str.1
	.asciz	" (out of range)"

L_.str.2:                               ## @.str.2
	.space	1

	.no_dead_strip	_getchannel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getchannel
_getchannel:                            ; @getchannel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x20
	bl	_isanyarg
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IEEE80211_CHAN_ANY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CHAN_ANY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	mov	x0, x21
	bl	_getchaninfo
Lloh3:
	adrp	x22, _errno@GOTPAGE
Lloh4:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	str	xzr, [x22]
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #10
	bl	_strtol
	mov	x21, x0
	ldrb	w9, [x20]
Lloh5:
	adrp	x8, _ERANGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	cbz	w9, LBB0_6
; %bb.3:
	ldr	x9, [sp, #8]
	cmp	x9, x20
	b.eq	LBB0_6
; %bb.4:
	ldr	x10, [x22]
	ldr	x11, [x8]
	cmp	x10, x11
	b.eq	LBB0_6
; %bb.5:
	ldrb	w9, [x9]
	cmp	w9, #58
	mov	w10, #1
	lsl	x9, x10, x9
	mov	x10, #-140737488355327
	movk	x10, #1024, lsl #48
	and	x9, x9, x10
	ccmp	x9, #0, #4, ls
	b.ne	LBB0_7
LBB0_6:
	ldr	x9, [x22]
	ldr	x8, [x8]
Lloh7:
	adrp	x10, l_.str.2@PAGE
Lloh8:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh9:
	adrp	x11, l_.str.1@PAGE
Lloh10:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	x9, x8
	csel	x2, x11, x10, eq
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	bl	_getchannelflags
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	cmp	w21, #256
	b.lt	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_mapfreq
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_mapchan
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CHAN_ANY,4,2         ; @IEEE80211_CHAN_ANY
	.comm	_errno,8,3                      ; @errno
	.comm	_ERANGE,8,3                     ; @ERANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid channel specification%s"

l_.str.1:                               ; @.str.1
	.asciz	" (out of range)"

l_.str.2:                               ; @.str.2
	.space	1

	.no_dead_strip	_getchannel
.subsections_via_symbols
