	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_gen_wpa_ie_wpa
_wpa_gen_wpa_ie_wpa:                    ## @wpa_gen_wpa_ie_wpa
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_WPA_SELECTOR_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%rax,2), %rax
	addq	$28, %rax
	movl	$-1, %r15d
	cmpq	%rsi, %rax
	ja	LBB0_16
## %bb.1:
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	%rdi, %rbx
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	_WLAN_EID_VENDOR_SPECIFIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	8(%rdi), %rdi
	movq	_WPA_OUI_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_RSN_SELECTOR_PUT
	movl	4(%rbx), %edi
	movq	_WPA_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WPA_PUT_LE16
	movq	_WPA_PROTO_WPA@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_wpa_cipher_to_suite
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	24(%rbx), %rdi
	movq	%rax, %rsi
	callq	_RSN_SELECTOR_PUT
	movq	_WPA_SELECTOR_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	$1, 24(%rbx,%rax,4)
	movl	(%r14), %edi
	movl	%r13d, %esi
	callq	_wpa_cipher_to_suite
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r12
	movl	%r13d, %edi
	callq	_wpa_cipher_valid_pairwise
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_WPA_CIPHER_NONE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	je	LBB0_7
LBB0_6:
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	callq	_wpa_printf
	jmp	LBB0_16
LBB0_2:
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_wpa_printf
	jmp	LBB0_16
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %r13
	addq	$32, %r13
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_RSN_SELECTOR_PUT
	movq	_WPA_SELECTOR_LEN@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	movq	$1, (%r13,%rax,4)
	movq	_WPA_KEY_MGMT_IEEE8021X@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	jne	LBB0_9
## %bb.8:
	movq	_WPA_AUTH_KEY_MGMT_UNSPEC_802_1X@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_9:
	movq	_WPA_KEY_MGMT_PSK@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	jne	LBB0_11
## %bb.10:
	movq	_WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_11:
	movq	_WPA_KEY_MGMT_WPA_NONE@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	jne	LBB0_13
## %bb.12:
	movq	_WPA_AUTH_KEY_MGMT_NONE@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_13:
	movq	_WPA_KEY_MGMT_CCKM@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	jne	LBB0_17
## %bb.14:
	movq	_WPA_AUTH_KEY_MGMT_CCKM@GOTPCREL(%rip), %rcx
LBB0_15:
	leaq	8(,%rax,4), %r15
	addq	%r13, %r15
	movq	(%rcx), %rsi
	movq	%r15, %rdi
	callq	_RSN_SELECTOR_PUT
	movslq	(%r14), %rax
	leaq	(%r15,%rax,4), %r15
	subq	%rbx, %r15
	sarq	$2, %r15
	leal	-2(%r15), %eax
	movl	%eax, (%rbx)
	xorl	%edi, %edi
	cmpq	-64(%rbp), %r15                 ## 8-byte Folded Reload
	setbe	%dil
	callq	_WPA_ASSERT
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_WPA_SELECTOR_LEN,4,2           ## @WPA_SELECTOR_LEN
	.comm	_WLAN_EID_VENDOR_SPECIFIC,4,2   ## @WLAN_EID_VENDOR_SPECIFIC
	.comm	_WPA_OUI_TYPE,8,3               ## @WPA_OUI_TYPE
	.comm	_WPA_VERSION,4,2                ## @WPA_VERSION
	.comm	_WPA_PROTO_WPA,4,2              ## @WPA_PROTO_WPA
	.comm	_MSG_WARNING,4,2                ## @MSG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid group cipher (%d)."

	.comm	_WPA_CIPHER_NONE,4,2            ## @WPA_CIPHER_NONE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid pairwise cipher (%d)."

	.comm	_WPA_KEY_MGMT_IEEE8021X,4,2     ## @WPA_KEY_MGMT_IEEE8021X
	.comm	_WPA_AUTH_KEY_MGMT_UNSPEC_802_1X,8,3 ## @WPA_AUTH_KEY_MGMT_UNSPEC_802_1X
	.comm	_WPA_KEY_MGMT_PSK,4,2           ## @WPA_KEY_MGMT_PSK
	.comm	_WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X,8,3 ## @WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X
	.comm	_WPA_KEY_MGMT_WPA_NONE,4,2      ## @WPA_KEY_MGMT_WPA_NONE
	.comm	_WPA_AUTH_KEY_MGMT_NONE,8,3     ## @WPA_AUTH_KEY_MGMT_NONE
	.comm	_WPA_KEY_MGMT_CCKM,4,2          ## @WPA_KEY_MGMT_CCKM
	.comm	_WPA_AUTH_KEY_MGMT_CCKM,8,3     ## @WPA_AUTH_KEY_MGMT_CCKM
L_.str.2:                               ## @.str.2
	.asciz	"Invalid key management type (%d)."

	.no_dead_strip	_wpa_gen_wpa_ie_wpa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wpa_gen_wpa_ie_wpa
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_wpa_gen_wpa_ie_wpa:                    ; @wpa_gen_wpa_ie_wpa
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-96]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
Lloh0:
	adrp	x25, _WPA_SELECTOR_LEN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WPA_SELECTOR_LEN@GOTPAGEOFF]
	ldrsw	x8, [x25]
	add	x8, x8, x8, lsl #1
	add	x8, x8, #28
	cmp	x8, x1
	b.hi	LBB0_8
; %bb.1:
	mov	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh2:
	adrp	x8, _WLAN_EID_VENDOR_SPECIFIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WLAN_EID_VENDOR_SPECIFIC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	ldr	x0, [x0, #8]
Lloh5:
	adrp	x8, _WPA_OUI_TYPE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WPA_OUI_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
	bl	_RSN_SELECTOR_PUT
	ldr	w0, [x20, #4]
Lloh8:
	adrp	x8, _WPA_VERSION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WPA_VERSION@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_WPA_PUT_LE16
Lloh11:
	adrp	x24, _WPA_PROTO_WPA@GOTPAGE
Lloh12:
	ldr	x24, [x24, _WPA_PROTO_WPA@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	x1, x23
	bl	_wpa_cipher_to_suite
	cbz	x0, LBB0_6
; %bb.2:
	mov	x1, x0
	add	x23, x20, #24
	mov	x0, x23
	bl	_RSN_SELECTOR_PUT
	ldrsw	x8, [x25]
	add	x23, x23, x8, lsl #2
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	str	d8, [x23], #8
	ldr	w0, [x24]
	mov	x1, x22
	bl	_wpa_cipher_to_suite
	cbz	x0, LBB0_5
; %bb.3:
	mov	x24, x0
	mov	x0, x22
	bl	_wpa_cipher_valid_pairwise
	cbnz	w0, LBB0_10
; %bb.4:
Lloh15:
	adrp	x8, _WPA_CIPHER_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WPA_CIPHER_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_10
LBB0_5:
Lloh18:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	b	LBB0_7
LBB0_6:
Lloh23:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
LBB0_7:
	bl	_wpa_printf
LBB0_8:
	mov	w21, #-1
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x23
	mov	x1, x24
	bl	_RSN_SELECTOR_PUT
	ldrsw	x8, [x25]
	add	x22, x23, x8, lsl #2
	str	d8, [x22], #8
Lloh28:
	adrp	x8, _WPA_KEY_MGMT_IEEE8021X@GOTPAGE
Lloh29:
	ldr	x8, [x8, _WPA_KEY_MGMT_IEEE8021X@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_12
; %bb.11:
Lloh31:
	adrp	x8, _WPA_AUTH_KEY_MGMT_UNSPEC_802_1X@GOTPAGE
Lloh32:
	ldr	x8, [x8, _WPA_AUTH_KEY_MGMT_UNSPEC_802_1X@GOTPAGEOFF]
	b	LBB0_18
LBB0_12:
Lloh33:
	adrp	x8, _WPA_KEY_MGMT_PSK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _WPA_KEY_MGMT_PSK@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_14
; %bb.13:
Lloh36:
	adrp	x8, _WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X@GOTPAGE
Lloh37:
	ldr	x8, [x8, _WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X@GOTPAGEOFF]
	b	LBB0_18
LBB0_14:
Lloh38:
	adrp	x8, _WPA_KEY_MGMT_WPA_NONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _WPA_KEY_MGMT_WPA_NONE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_16
; %bb.15:
Lloh41:
	adrp	x8, _WPA_AUTH_KEY_MGMT_NONE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _WPA_AUTH_KEY_MGMT_NONE@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
Lloh43:
	adrp	x8, _WPA_KEY_MGMT_CCKM@GOTPAGE
Lloh44:
	ldr	x8, [x8, _WPA_KEY_MGMT_CCKM@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_19
; %bb.17:
Lloh46:
	adrp	x8, _WPA_AUTH_KEY_MGMT_CCKM@GOTPAGE
Lloh47:
	ldr	x8, [x8, _WPA_AUTH_KEY_MGMT_CCKM@GOTPAGEOFF]
LBB0_18:
	ldr	x1, [x8]
	mov	x0, x22
	bl	_RSN_SELECTOR_PUT
	ldrsw	x8, [x25]
	add	x8, x22, x8, lsl #2
	sub	x8, x8, x20
	asr	x21, x8, #2
	sub	w8, w21, #2
	str	w8, [x20]
	cmp	x21, x19
	cset	w0, ls
	bl	_WPA_ASSERT
	b	LBB0_9
LBB0_19:
Lloh48:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
Lloh51:
	adrp	x1, l_.str.2@PAGE
Lloh52:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_SELECTOR_LEN,4,2           ; @WPA_SELECTOR_LEN
	.comm	_WLAN_EID_VENDOR_SPECIFIC,4,2   ; @WLAN_EID_VENDOR_SPECIFIC
	.comm	_WPA_OUI_TYPE,8,3               ; @WPA_OUI_TYPE
	.comm	_WPA_VERSION,4,2                ; @WPA_VERSION
	.comm	_WPA_PROTO_WPA,4,2              ; @WPA_PROTO_WPA
	.comm	_MSG_WARNING,4,2                ; @MSG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid group cipher (%d)."

	.comm	_WPA_CIPHER_NONE,4,2            ; @WPA_CIPHER_NONE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid pairwise cipher (%d)."

	.comm	_WPA_KEY_MGMT_IEEE8021X,4,2     ; @WPA_KEY_MGMT_IEEE8021X
	.comm	_WPA_AUTH_KEY_MGMT_UNSPEC_802_1X,8,3 ; @WPA_AUTH_KEY_MGMT_UNSPEC_802_1X
	.comm	_WPA_KEY_MGMT_PSK,4,2           ; @WPA_KEY_MGMT_PSK
	.comm	_WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X,8,3 ; @WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X
	.comm	_WPA_KEY_MGMT_WPA_NONE,4,2      ; @WPA_KEY_MGMT_WPA_NONE
	.comm	_WPA_AUTH_KEY_MGMT_NONE,8,3     ; @WPA_AUTH_KEY_MGMT_NONE
	.comm	_WPA_KEY_MGMT_CCKM,4,2          ; @WPA_KEY_MGMT_CCKM
	.comm	_WPA_AUTH_KEY_MGMT_CCKM,8,3     ; @WPA_AUTH_KEY_MGMT_CCKM
l_.str.2:                               ; @.str.2
	.asciz	"Invalid key management type (%d)."

	.no_dead_strip	_wpa_gen_wpa_ie_wpa
.subsections_via_symbols
