	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_build_encr_settings        ## -- Begin function wps_build_encr_settings
	.p2align	4, 0x90
_wps_build_encr_settings:               ## @wps_build_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
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	%r15, %rdi
	callq	_wpabuf_len
	andl	$15, %eax
	movl	$16, %ebx
	subq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_wpabuf_put
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	callq	_os_memset
	movq	_ATTR_ENCR_SETTINGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_wpabuf_put_be16
	movq	%r15, %rdi
	callq	_wpabuf_len
	leaq	16(%rax), %rsi
	movq	%r12, %rdi
	callq	_wpabuf_put_be16
	movl	$16, %esi
	movq	%r12, %rdi
	callq	_wpabuf_put
	movq	%rax, %r13
	movl	$16, %esi
	movq	%rax, %rdi
	callq	_random_get_bytes
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_wpabuf_put
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_wpabuf_put_buf
	movl	(%r14), %r12d
	movq	%r15, %rdi
	callq	_wpabuf_len
	movl	%r12d, %edi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_aes_128_cbc_encrypt
	negq	%rax
	sbbl	%ebx, %ebx
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	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:  * Encrypted Settings"

	.comm	_ATTR_ENCR_SETTINGS,8,3         ## @ATTR_ENCR_SETTINGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_build_encr_settings        ; -- Begin function wps_build_encr_settings
	.p2align	2
_wps_build_encr_settings:               ; @wps_build_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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	bl	_wpabuf_len
	and	x8, x0, #0xf
	mov	w9, #16
	sub	x22, x9, x8
	mov	x0, x19
	mov	x1, x22
	bl	_wpabuf_put
	mov	x1, x22
	mov	x2, x22
	bl	_os_memset
Lloh5:
	adrp	x8, _ATTR_ENCR_SETTINGS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATTR_ENCR_SETTINGS@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
	mov	x0, x21
	bl	_wpabuf_put_be16
	mov	x0, x19
	bl	_wpabuf_len
	add	x1, x0, #16
	mov	x0, x21
	bl	_wpabuf_put_be16
	mov	x0, x21
	mov	w1, #16
	bl	_wpabuf_put
	mov	x22, x0
	mov	w1, #16
	bl	_random_get_bytes
	tbnz	x0, #63, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, #0
	bl	_wpabuf_put
	mov	x23, x0
	mov	x0, x21
	mov	x1, x19
	bl	_wpabuf_put_buf
	ldr	w20, [x20]
	mov	x0, x19
	bl	_wpabuf_len
	mov	x3, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_aes_128_cbc_encrypt
	cmp	x0, #0
	csetm	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS:  * Encrypted Settings"

	.comm	_ATTR_ENCR_SETTINGS,8,3         ; @ATTR_ENCR_SETTINGS
.subsections_via_symbols
