	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_ioctl_getdevcaps
_ieee80211_ioctl_getdevcaps:            ## @ieee80211_ioctl_getdevcaps
	.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
	movslq	(%rsi), %rcx
	movabsq	$17179869160, %rax              ## imm = 0x3FFFFFFE8
	addq	%rcx, %rax
	shrq	$2, %rax
	cmpl	$2147483647, %eax               ## imm = 0x7FFFFFFF
	jb	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpl	$2047, %eax                     ## imm = 0x7FF
	movl	$2047, %ebx                     ## imm = 0x7FF
	cmovll	%eax, %ebx
	incl	%ebx
	movl	%ebx, %edi
	callq	_IEEE80211_DEVCAPS_SIZE
	movq	_M_TEMP@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_IEEE80211_M_NOWAIT@GOTPCREL(%rip), %rcx
	movq	_IEEE80211_M_ZERO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%eax, %edi
	callq	_IEEE80211_MALLOC
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r12
	movups	8(%r15), %xmm0
	movups	%xmm0, 8(%rax)
	movl	4(%rax), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	*(%r15)
	xorl	%edi, %edi
	cmpl	%ebx, (%r12)
	setle	%dil
	movl	%ebx, %esi
	callq	_KASSERT
	movl	(%r12), %esi
	movl	4(%r12), %edi
	callq	_ieee80211_sort_channels
	movl	4(%r14), %ebx
	movq	%r12, %rdi
	callq	_IEEE80211_DEVCAPS_SPACE
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_copyout
	movl	%eax, %ebx
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_IEEE80211_FREE
	movl	%ebx, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_M_TEMP,4,2                     ## @M_TEMP
	.comm	_IEEE80211_M_NOWAIT,4,2         ## @IEEE80211_M_NOWAIT
	.comm	_IEEE80211_M_ZERO,4,2           ## @IEEE80211_M_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ieee80211_ioctl_getdevcaps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_ioctl_getdevcaps
_ieee80211_ioctl_getdevcaps:            ; @ieee80211_ioctl_getdevcaps
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldrsw	x8, [x1]
	mov	x9, #17179803648
	movk	x9, #65512
	add	x8, x8, x9
	lsr	x8, x8, #2
	mov	w9, #2147483647
	cmp	w8, w9
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x19, x1
	mov	x21, x0
	mov	w9, #2047
	cmp	w8, #2047
	csel	w8, w8, w9, lt
	add	w22, w8, #1
	mov	x0, x22
	bl	_IEEE80211_DEVCAPS_SIZE
Lloh2:
	adrp	x23, _M_TEMP@GOTPAGE
Lloh3:
	ldr	x23, [x23, _M_TEMP@GOTPAGEOFF]
Lloh4:
	adrp	x8, _IEEE80211_M_NOWAIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IEEE80211_M_NOWAIT@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _IEEE80211_M_ZERO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IEEE80211_M_ZERO@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_IEEE80211_MALLOC
	cbz	x0, LBB0_4
; %bb.3:
	mov	x20, x0
	ldur	q0, [x21, #8]
	stur	q0, [x0, #8]
	ldr	x8, [x21]
	ldr	w3, [x0, #4]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	blr	x8
	ldr	w8, [x20]
	cmp	w8, w22
	cset	w0, le
	mov	x1, x22
	bl	_KASSERT
	ldp	w1, w0, [x20]
	bl	_ieee80211_sort_channels
	ldr	w19, [x19, #4]
	mov	x0, x20
	bl	_IEEE80211_DEVCAPS_SPACE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_copyout
	mov	x19, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_IEEE80211_FREE
	mov	x0, x19
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_M_TEMP,4,2                     ; @M_TEMP
	.comm	_IEEE80211_M_NOWAIT,4,2         ; @IEEE80211_M_NOWAIT
	.comm	_IEEE80211_M_ZERO,4,2           ; @IEEE80211_M_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ieee80211_ioctl_getdevcaps
.subsections_via_symbols
