	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_workaround_cred_key
_wps_workaround_cred_key:               ## @wps_workaround_cred_key
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_WPS_AUTH_WPAPSK@GOTPCREL(%rip), %r15
	movq	_WPS_AUTH_WPA2PSK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	orl	(%r15), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movl	4(%rdi), %eax
	leal	-9(%rax), %ecx
	cmpl	$54, %ecx
	ja	LBB0_4
## %bb.2:
	movq	8(%rbx), %rcx
	decl	%eax
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_4
## %bb.3:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	decl	4(%rbx)
	movl	(%r12), %eax
	orl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
LBB0_4:
	movl	4(%rbx), %esi
	cmpl	$8, %esi
	jl	LBB0_6
## %bb.5:
	movq	8(%rbx), %rdi
	callq	_has_ctrl_char
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_MSG_INFO@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movl	(%r14), %edi
	movq	8(%rbx), %rdx
	movl	4(%rbx), %ecx
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_hexdump_ascii_key
	movl	$-1, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WPS_AUTH_WPAPSK,4,2            ## @WPS_AUTH_WPAPSK
	.comm	_WPS_AUTH_WPA2PSK,4,2           ## @WPS_AUTH_WPA2PSK
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS: Workaround - remove NULL termination from ASCII passphrase"

	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"WPS: Reject credential with invalid WPA/WPA2-Personal passphrase"

L_.str.2:                               ## @.str.2
	.asciz	"WPS: Network Key"

	.no_dead_strip	_wps_workaround_cred_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_workaround_cred_key
_wps_workaround_cred_key:               ; @wps_workaround_cred_key
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x20, _WPS_AUTH_WPAPSK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WPS_AUTH_WPAPSK@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh2:
	adrp	x21, _WPS_AUTH_WPA2PSK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _WPS_AUTH_WPA2PSK@GOTPAGEOFF]
	ldr	w10, [x21]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #4]
	sub	w9, w8, #9
	cmp	w9, #54
	b.hi	LBB0_4
; %bb.2:
	ldr	x9, [x19, #8]
	sub	w8, w8, #1
	ldr	x8, [x9, w8, uxtw #3]
	cbnz	x8, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldp	w9, w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	ldr	w8, [x20]
	ldr	w10, [x21]
	orr	w8, w10, w8
	tst	w8, w9
	b.eq	LBB0_7
LBB0_4:
	ldr	w1, [x19, #4]
	cmp	w1, #8
	b.lt	LBB0_6
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_has_ctrl_char
	cbz	x0, LBB0_8
LBB0_6:
Lloh9:
	adrp	x20, _MSG_INFO@GOTPAGE
Lloh10:
	ldr	x20, [x20, _MSG_INFO@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	ldr	w0, [x20]
	ldr	x2, [x19, #8]
	ldr	w3, [x19, #4]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_hexdump_ascii_key
	mov	w0, #-1
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WPS_AUTH_WPAPSK,4,2            ; @WPS_AUTH_WPAPSK
	.comm	_WPS_AUTH_WPA2PSK,4,2           ; @WPS_AUTH_WPA2PSK
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS: Workaround - remove NULL termination from ASCII passphrase"

	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"WPS: Reject credential with invalid WPA/WPA2-Personal passphrase"

l_.str.2:                               ; @.str.2
	.asciz	"WPS: Network Key"

	.no_dead_strip	_wps_workaround_cred_key
.subsections_via_symbols
