	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_derive_psk
_hostapd_derive_psk:                    ## @hostapd_derive_psk
	.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	%rdi, %rbx
	movl	$4, %edi
	callq	_os_zalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	16(%rbx), %rdx
	movl	8(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_hexdump_ascii
	movl	(%r12), %r14d
	movq	24(%rbx), %r15
	movq	%r15, %rdi
	callq	_os_strlen
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_wpa_hexdump_ascii_key
	movq	24(%rbx), %rdi
	movq	16(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	(%rbx), %rax
	movl	(%rax), %r8d
	movq	_PMK_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %r9d
	movl	$4096, %ecx                     ## imm = 0x1000
	callq	_pbkdf2_sha1
	movl	(%r12), %edi
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_hexdump_key
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to alloc space for PSK"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"SSID"

L_.str.2:                               ## @.str.2
	.asciz	"PSK (ASCII passphrase)"

	.comm	_PMK_LEN,4,2                    ## @PMK_LEN
L_.str.3:                               ## @.str.3
	.asciz	"PSK (from passphrase)"

	.no_dead_strip	_hostapd_derive_psk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_derive_psk
_hostapd_derive_psk:                    ; @hostapd_derive_psk
	.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
	mov	x19, x0
	mov	w0, #4
	bl	_os_zalloc
	str	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x22, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x2, [x19, #16]
	ldr	w3, [x19, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_hexdump_ascii
	ldr	w20, [x22]
	ldr	x21, [x19, #24]
	mov	x0, x21
	bl	_os_strlen
	mov	x3, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_wpa_hexdump_ascii_key
	ldp	x1, x0, [x19, #16]
	ldr	w2, [x19, #8]
	ldr	x8, [x19]
	ldr	w4, [x8]
Lloh6:
	adrp	x20, _PMK_LEN@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PMK_LEN@GOTPAGEOFF]
	ldr	w5, [x20]
	mov	w3, #4096
	bl	_pbkdf2_sha1
	ldr	w0, [x22]
	ldr	x8, [x19]
	ldr	w2, [x8]
	ldr	w3, [x20]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_hexdump_key
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
LBB0_3:
	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 AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to alloc space for PSK"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"SSID"

l_.str.2:                               ; @.str.2
	.asciz	"PSK (ASCII passphrase)"

	.comm	_PMK_LEN,4,2                    ; @PMK_LEN
l_.str.3:                               ; @.str.3
	.asciz	"PSK (from passphrase)"

	.no_dead_strip	_hostapd_derive_psk
.subsections_via_symbols
