	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_parse_wps_ie
_p2p_parse_wps_ie:                      ## @p2p_parse_wps_ie
	.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	$128, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	leaq	-152(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_wps_parse_msg
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_17
## %bb.1:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.2:
	movl	-152(%rbp), %edx
	cmpl	$7, %edx
	ja	LBB0_5
## %bb.3:
	movq	104(%r14), %rdi
	cmpl	$0, (%rdi)
	jne	LBB0_5
## %bb.4:
	callq	_os_memcpy
LBB0_5:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_WPA_GET_BE16
	movq	%rax, 96(%r14)
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_7:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_WPA_GET_BE16
	movq	%rax, 88(%r14)
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$1, (%r14)
LBB0_9:
	cmpq	$0, -72(%rbp)
	je	LBB0_11
## %bb.10:
	movq	%rsp, %r12
	movq	_WPS_DEV_TYPE_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	movq	-72(%rbp), %rdi
	movq	%rdi, 80(%r14)
	movl	(%r15), %r15d
	movl	%ebx, %edx
	callq	_wps_dev_type_bin2str
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r12, %rsp
LBB0_11:
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, 72(%r14)
	movl	-88(%rbp), %eax
	movl	%eax, 64(%r14)
LBB0_13:
	movq	_P2P_MAX_WPS_VENDOR_EXT@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_16
## %bb.14:
	movq	-104(%rbp), %rcx
	movq	-96(%rbp), %rdx
	movq	48(%r14), %rsi
	movq	56(%r14), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rbx,4), %eax
	movl	%eax, (%rdi,%rbx,4)
	movl	(%rcx,%rbx,4), %eax
	movl	%eax, (%rsi,%rbx,4)
	incq	%rbx
	movslq	(%r8), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	movl	-112(%rbp), %eax
	movl	%eax, 40(%r14)
	movl	-116(%rbp), %eax
	movl	%eax, 36(%r14)
	movups	-132(%rbp), %xmm0
	movups	%xmm0, 20(%r14)
	movups	-148(%rbp), %xmm0
	movups	%xmm0, 4(%r14)
	xorl	%eax, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P: Parsing WPS IE"

L_.str.1:                               ## @.str.1
	.asciz	"P2P: Config Methods (WPS): 0x%x"

L_.str.2:                               ## @.str.2
	.asciz	"P2P: Device Password ID: %d"

	.comm	_WPS_DEV_TYPE_BUFSIZE,4,2       ## @WPS_DEV_TYPE_BUFSIZE
L_.str.3:                               ## @.str.3
	.asciz	"P2P: Primary Device Type (WPS): %s"

	.comm	_P2P_MAX_WPS_VENDOR_EXT,4,2     ## @P2P_MAX_WPS_VENDOR_EXT
	.no_dead_strip	_p2p_parse_wps_ie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p2p_parse_wps_ie
_p2p_parse_wps_ie:                      ; @p2p_parse_wps_ie
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #128
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	sub	x1, x29, #152
	mov	x0, x20
	bl	_wps_parse_msg
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_17
LBB0_2:
	ldur	x1, [x29, #-48]
	ldur	w2, [x29, #-152]
	cmp	x1, #0
	ccmp	w2, #7, #2, ne
	b.hi	LBB0_5
; %bb.3:
	ldr	x0, [x19, #104]
	ldr	w8, [x0]
	cbnz	w8, LBB0_5
; %bb.4:
	bl	_os_memcpy
LBB0_5:
	ldur	x0, [x29, #-56]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_WPA_GET_BE16
	str	x0, [x19, #96]
	ldr	w8, [x21]
	str	x0, [sp, #-16]!
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_wpa_printf
	add	sp, sp, #16
LBB0_7:
	ldur	x0, [x29, #-64]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_WPA_GET_BE16
	str	x0, [x19, #88]
	ldr	w8, [x21]
	str	x0, [sp, #-16]!
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_wpa_printf
	add	sp, sp, #16
	mov	w8, #1
	str	w8, [x19]
LBB0_9:
	ldur	x8, [x29, #-72]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x22, sp
Lloh11:
	adrp	x8, _WPS_DEV_TYPE_BUFSIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WPS_DEV_TYPE_BUFSIZE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x9, x2
Lloh14:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh15:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x1, x8, x9
	mov	sp, x1
	ldur	x0, [x29, #-72]
	str	x0, [x19, #80]
	ldr	w20, [x21]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_wps_dev_type_bin2str
	str	x0, [sp, #-16]!
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_wpa_printf
	add	sp, sp, #16
	mov	sp, x22
LBB0_11:
	ldur	x8, [x29, #-80]
	cbz	x8, LBB0_13
; %bb.12:
	str	x8, [x19, #72]
	ldur	w8, [x29, #-88]
	str	w8, [x19, #64]
LBB0_13:
Lloh18:
	adrp	x8, _P2P_MAX_WPS_VENDOR_EXT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _P2P_MAX_WPS_VENDOR_EXT@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x9, #0
	ldp	x11, x10, [x29, #-104]
	ldp	x13, x12, [x19, #48]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	lsl	x14, x9, #2
	ldr	w15, [x10, x14]
	str	w15, [x12, x14]
	ldr	w15, [x11, x14]
	str	w15, [x13, x14]
	add	x9, x9, #1
	ldrsw	x14, [x8]
	cmp	x9, x14
	b.lt	LBB0_15
LBB0_16:
	mov	w0, #0
	ldur	d0, [x29, #-116]
	stur	d0, [x19, #36]
	ldur	q0, [x29, #-132]
	stur	q0, [x19, #20]
	ldur	q0, [x29, #-148]
	stur	q0, [x19, #4]
LBB0_17:
	ldur	x8, [x29, #-40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P: Parsing WPS IE"

l_.str.1:                               ; @.str.1
	.asciz	"P2P: Config Methods (WPS): 0x%x"

l_.str.2:                               ; @.str.2
	.asciz	"P2P: Device Password ID: %d"

	.comm	_WPS_DEV_TYPE_BUFSIZE,4,2       ; @WPS_DEV_TYPE_BUFSIZE
l_.str.3:                               ; @.str.3
	.asciz	"P2P: Primary Device Type (WPS): %s"

	.comm	_P2P_MAX_WPS_VENDOR_EXT,4,2     ; @P2P_MAX_WPS_VENDOR_EXT
	.no_dead_strip	_p2p_parse_wps_ie
.subsections_via_symbols
