	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_decrypt_encr_settings      ## -- Begin function wps_decrypt_encr_settings
	.p2align	4, 0x90
_wps_decrypt_encr_settings:             ## @wps_decrypt_encr_settings
	.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
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%rdx, %rbx
	cmpq	$32, %rdx
	jb	LBB0_7
## %bb.2:
	movl	%ebx, %eax
	andl	$15, %eax
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movq	%rsi, %r12
	movq	%rdi, %r15
	leaq	-16(%rbx), %r13
	movq	%r13, %rdi
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	movq	%rax, %r14
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_wpa_hexdump
	leaq	128(%r12), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_wpabuf_put_data
	movl	(%r15), %r15d
	movq	%r14, %rdi
	callq	_wpabuf_mhead
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_wpabuf_len
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movq	%rax, %rcx
	callq	_aes_128_cbc_decrypt
	testq	%rax, %rax
	jne	LBB0_16
## %bb.5:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	callq	_wpa_hexdump_buf_key
	movq	%r14, %rdi
	callq	_wpabuf_head_u8
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_wpabuf_len
	movq	%rax, %r12
	movq	-8(%r15,%rax,8), %rbx
	movq	%r14, %rdi
	callq	_wpabuf_len
	cmpq	%rax, %rbx
	jbe	LBB0_9
## %bb.6:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_15
LBB0_7:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_17
LBB0_9:
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.10:
	leaq	(%r15,%r12,8), %rax
	addq	$-8, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rax,%rcx,8)
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	decq	%rcx
	movq	%rbx, %rdx
	addq	%rcx, %rdx
	jne	LBB0_11
LBB0_13:
	subq	%rbx, (%r14)
	jmp	LBB0_18
LBB0_14:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
LBB0_15:
	callq	_wpa_printf
LBB0_16:
	movq	%r14, %rdi
	callq	_wpabuf_clear_free
LBB0_17:
	xorl	%r14d, %r14d
LBB0_18:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS: No Encrypted Settings received"

	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.1:                               ## @.str.1
	.asciz	"WPS: Encrypted Settings"

L_.str.2:                               ## @.str.2
	.asciz	"WPS: Decrypted Encrypted Settings"

L_.str.3:                               ## @.str.3
	.asciz	"WPS: Invalid PKCS#5 v2.0 pad value"

L_.str.4:                               ## @.str.4
	.asciz	"WPS: Invalid PKCS#5 v2.0 pad string"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_decrypt_encr_settings      ; -- Begin function wps_decrypt_encr_settings
	.p2align	2
_wps_decrypt_encr_settings:             ; @wps_decrypt_encr_settings
	.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
	cbz	x1, LBB0_7
; %bb.1:
	mov	x22, x2
	cmp	x2, #32
	b.lo	LBB0_7
; %bb.2:
	and	x8, x22, #0xf
	cbnz	x8, LBB0_7
; %bb.3:
	mov	x20, x1
	mov	x21, x0
	sub	x23, x22, #16
	mov	x0, x23
	bl	_wpabuf_alloc
	mov	x19, x0
	cbz	x0, LBB0_17
; %bb.4:
Lloh0:
	adrp	x24, _MSG_MSGDUMP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MSG_MSGDUMP@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	bl	_wpa_hexdump
	add	x1, x20, #128
	mov	x0, x19
	mov	x2, x23
	bl	_wpabuf_put_data
	ldr	w21, [x21]
	mov	x0, x19
	bl	_wpabuf_mhead
	mov	x22, x0
	mov	x0, x19
	bl	_wpabuf_len
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_aes_128_cbc_decrypt
	cbnz	x0, LBB0_15
; %bb.5:
	ldr	w0, [x24]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_wpa_hexdump_buf_key
	mov	x0, x19
	bl	_wpabuf_head_u8
	mov	x20, x0
	mov	x0, x19
	bl	_wpabuf_len
	add	x21, x20, x0, lsl #3
	ldr	x20, [x21, #-8]!
	mov	x0, x19
	bl	_wpabuf_len
	cmp	x20, x0
	b.ls	LBB0_8
; %bb.6:
Lloh6:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_7:
Lloh11:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_16
LBB0_8:
	cbz	x20, LBB0_12
; %bb.9:
	mov	x8, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, x8, lsl #3]
	cmp	x9, x20
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	x8, x8, #1
	cmn	x20, x8
	b.ne	LBB0_10
LBB0_12:
	ldr	x8, [x19]
	sub	x8, x8, x20
	str	x8, [x19]
	b	LBB0_17
LBB0_13:
Lloh16:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_14:
	bl	_wpa_printf
LBB0_15:
	mov	x0, x19
	bl	_wpabuf_clear_free
LBB0_16:
	mov	x19, #0
LBB0_17:
	mov	x0, x19
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS: No Encrypted Settings received"

	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.1:                               ; @.str.1
	.asciz	"WPS: Encrypted Settings"

l_.str.2:                               ; @.str.2
	.asciz	"WPS: Decrypted Encrypted Settings"

l_.str.3:                               ; @.str.3
	.asciz	"WPS: Invalid PKCS#5 v2.0 pad value"

l_.str.4:                               ; @.str.4
	.asciz	"WPS: Invalid PKCS#5 v2.0 pad string"

.subsections_via_symbols
