	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_build_ext_capab           ## -- Begin function wpas_build_ext_capab
	.p2align	4, 0x90
_wpas_build_ext_capab:                  ## @wpas_build_ext_capab
	.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), %rax
	cmpq	$11, %rax
	movl	$10, %r12d
	cmovaeq	%rax, %r12
	leaq	2(%r12), %rax
	cmpq	%rdx, %rax
	jbe	LBB0_2
## %bb.1:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r12d
	jmp	LBB0_11
LBB0_2:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_WLAN_EID_EXT_CAPAB@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, (%rsi)
	leaq	16(%rsi), %r13
	movq	%r12, 8(%rsi)
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	addq	$8, %r13
	cmpq	%rbx, %r12
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_wpas_ext_capab_byte
	cmpq	(%r15), %rbx
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	notq	%rax
	andq	(%r13), %rax
	movq	%rax, (%r13)
	movq	16(%r15), %rcx
	orq	(%rcx,%rbx,8), %rax
	movq	%rax, (%r13)
	jmp	LBB0_5
LBB0_6:
	decq	%r12
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%r14,%r12,8)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, 8(%r14)
	addq	$-1, %r12
	jb	LBB0_7
## %bb.9:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_10:
	addl	$3, %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough room for building extended capabilities element"

	.comm	_WLAN_EID_EXT_CAPAB,4,2         ## @WLAN_EID_EXT_CAPAB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_build_ext_capab           ; -- Begin function wpas_build_ext_capab
	.p2align	2
_wpas_build_ext_capab:                  ; @wpas_build_ext_capab
	.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
	ldr	x8, [x0]
	mov	w9, #10
	cmp	x8, #10
	csel	x22, x8, x9, hi
	add	x8, x22, #2
	cmp	x8, x2
	b.ls	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_10
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	mov	x21, #0
Lloh5:
	adrp	x8, _WLAN_EID_EXT_CAPAB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WLAN_EID_EXT_CAPAB@GOTPAGEOFF]
Lloh7:
	ldrsw	x8, [x8]
	mov	x23, x1
	str	x22, [x23, #8]!
	str	x8, [x19], #16
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	add	x19, x19, #8
	cmp	x22, x21
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_wpas_ext_capab_byte
	ldr	x8, [x20]
	cmp	x21, x8
	b.hs	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	x8, x21, #3
	ldp	x9, x10, [x20, #8]
	ldr	x9, [x9, x8]
	ldr	x11, [x19]
	bic	x9, x11, x9
	str	x9, [x19]
	ldr	x8, [x10, x8]
	orr	x8, x8, x9
	str	x8, [x19]
	b	LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	subs	x22, x22, #1
	str	x22, [x23]
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, x22, lsl #3]
	cbz	x8, LBB0_6
; %bb.8:
	add	w0, w22, #2
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough room for building extended capabilities element"

	.comm	_WLAN_EID_EXT_CAPAB,4,2         ; @WLAN_EID_EXT_CAPAB
.subsections_via_symbols
