	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_get_driver_caps           ## -- Begin function wlan_get_driver_caps
	.p2align	4, 0x90
_wlan_get_driver_caps:                  ## @wlan_get_driver_caps
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$0, -36(%rbp)
	leaq	-56(%rbp), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movq	$20, -32(%rbp)
	movl	28(%rbx), %edi
	movq	_IEEE80211_IOC_DEVCAPS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %r8
	movq	%r15, %rcx
	xorl	%r9d, %r9d
	callq	_wlan_ioctl
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-40(%rbp), %edi
	callq	_wlan_drivercaps_to_snmp
	movl	%eax, 24(%rbx)
	movl	-44(%rbp), %edi
	callq	_wlan_cryptocaps_to_snmp
	movl	%eax, 20(%rbx)
	movl	-48(%rbp), %edi
	callq	_wlan_htcaps_to_snmp
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_WLAN_SET_TDMA_OPMODE
	movslq	-56(%rbp), %rdi
	shlq	$2, %rdi
	movq	%rdi, -32(%rbp)
	callq	_malloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	-52(%rbp), %esi
	movq	-32(%rbp), %rdx
	movq	%rax, %rdi
	callq	_memcpy
	movl	-56(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_4
LBB0_1:
	movl	$-1, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_IOC_DEVCAPS,4,2      ## @IEEE80211_IOC_DEVCAPS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_get_driver_caps           ; -- Begin function wlan_get_driver_caps
	.p2align	2
_wlan_get_driver_caps:                  ; @wlan_get_driver_caps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	stur	wzr, [x29, #-20]
	mov	w20, #20
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	str	x20, [sp, #32]
	ldr	w0, [x19, #28]
Lloh0:
	adrp	x8, _IEEE80211_IOC_DEVCAPS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_IOC_DEVCAPS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	x2, x29, #20
	add	x3, sp, #8
	add	x4, sp, #32
	mov	w5, #0
	bl	_wlan_ioctl
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w0, [sp, #24]
	bl	_wlan_drivercaps_to_snmp
	str	w0, [x19, #24]
	ldr	w0, [sp, #20]
	bl	_wlan_cryptocaps_to_snmp
	str	w0, [x19, #20]
	ldr	w0, [sp, #16]
	bl	_wlan_htcaps_to_snmp
	str	w0, [x19, #16]
	mov	x0, x19
	bl	_WLAN_SET_TDMA_OPMODE
	ldrsw	x8, [sp, #8]
	lsl	x0, x8, #2
	str	x0, [sp, #32]
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w1, [sp, #12]
	ldr	x2, [sp, #32]
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [sp, #8]
	str	w8, [x19]
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_IOC_DEVCAPS,4,2      ; @IEEE80211_IOC_DEVCAPS
.subsections_via_symbols
