	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_tdls_generate_tpk
_wpa_tdls_generate_tpk:                 ## @wpa_tdls_generate_tpk
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SHA256_MAC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,2), %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leaq	(,%rax,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_WPA_NONCE_LEN@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rdx
	movq	%rdx, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movq	32(%r15), %rdi
	movq	40(%r15), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcmp
	movq	%rax, %rcx
	notq	%rcx
	shrq	$63, %rcx
	shrq	$63, %rax
	movq	32(%r15,%rax,8), %r12
	movq	32(%r15,%rcx,8), %rdx
	movq	%rdx, -64(%rbp)
	movq	%r12, -56(%rbp)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_wpa_hexdump
	movl	(%r14), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	callq	_wpa_hexdump
	leaq	-64(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movl	$2, %edi
	movq	%r12, %rcx
	callq	_sha256_vector
	movl	(%r14), %edi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	_SHA256_MAC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ETH_ALEN@GOTPCREL(%rip), %r14
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	callq	_wpa_hexdump_key
	movq	24(%r15), %rsi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_os_memcmp
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	24(%r15), %rsi
	movl	(%r14), %edx
	movq	%r13, %rdi
	callq	_os_memcpy
	movslq	(%r14), %rdx
	leaq	(,%rdx,4), %rdi
	addq	%r13, %rdi
	movq	%rbx, %rsi
	jmp	LBB0_3
LBB0_1:
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_os_memcpy
	movslq	(%r14), %rdx
	leaq	(,%rdx,4), %rdi
	addq	%r13, %rdi
	movq	24(%r15), %rsi
LBB0_3:
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcpy
	movslq	(%r14), %rdx
	leaq	(,%rdx,8), %rdi
	addq	%r13, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcpy
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	shll	$2, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	callq	_wpa_hexdump
	movq	_SHA256_MAC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%r15), %r9
	subq	$8, %rsp
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rcx
	movl	%ebx, %r8d
	pushq	$16
	callq	_sha256_prf
	addq	$16, %rsp
	movl	(%r14), %edi
	movq	16(%r15), %rdx
	leaq	L_.str.5(%rip), %rsi
	movl	$8, %ecx
	callq	_wpa_hexdump_key
	movl	(%r14), %edi
	movq	8(%r15), %rdx
	leaq	L_.str.6(%rip), %rsi
	movl	$8, %ecx
	callq	_wpa_hexdump_key
	movl	$1, (%r15)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SHA256_MAC_LEN,4,2             ## @SHA256_MAC_LEN
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WPA_NONCE_LEN,4,2              ## @WPA_NONCE_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TDLS: min(Nonce)"

L_.str.1:                               ## @.str.1
	.asciz	"TDLS: max(Nonce)"

L_.str.2:                               ## @.str.2
	.asciz	"TDLS: TPK-Key-Input"

L_.str.3:                               ## @.str.3
	.asciz	"TDLS: KDF Context"

L_.str.4:                               ## @.str.4
	.asciz	"TDLS PMK"

L_.str.5:                               ## @.str.5
	.asciz	"TDLS: TPK-KCK"

L_.str.6:                               ## @.str.6
	.asciz	"TDLS: TPK-TK"

	.no_dead_strip	_wpa_tdls_generate_tpk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpa_tdls_generate_tpk
_wpa_tdls_generate_tpk:                 ; @wpa_tdls_generate_tpk
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	stur	x2, [x29, #-128]                ; 8-byte Folded Spill
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x21, _SHA256_MAC_LEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SHA256_MAC_LEN@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh7:
	adrp	x28, _ETH_ALEN@GOTPAGE
Lloh8:
	ldr	x28, [x28, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x28]
	add	w26, w8, w8, lsl #1
	lsl	x8, x26, #2
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh11:
	adrp	x25, _WPA_NONCE_LEN@GOTPAGE
Lloh12:
	ldr	x25, [x25, _WPA_NONCE_LEN@GOTPAGEOFF]
	ldrsw	x2, [x25]
	stp	x2, x2, [x29, #-120]
	ldr	x0, [x0, #32]
	ldr	x1, [x19, #40]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcmp
	mov	w8, #40
	mov	w9, #32
	cmp	x0, #0
	csel	x10, x9, x8, lt
	csel	x8, x8, x9, lt
	ldr	x24, [x19, x8]
	ldr	x2, [x19, x10]
	stp	x2, x24, [x29, #-104]
Lloh13:
	adrp	x27, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x27, [x27, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x27]
	ldr	w3, [x25]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_hexdump
	ldr	w0, [x27]
	ldr	w3, [x25]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	mov	x24, x21
	bl	_wpa_hexdump
	sub	x1, x29, #104
	sub	x2, x29, #120
	mov	w0, #2
	mov	x3, x20
	bl	_sha256_vector
	ldr	w0, [x27]
	ldr	w3, [x21]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump_key
	ldr	x1, [x19, #24]
	ldr	w2, [x28]
	mov	x0, x23
	bl	_os_memcmp
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	x1, [x19, #24]
	ldr	w2, [x28]
	mov	x0, x22
	bl	_os_memcpy
	ldrsw	x2, [x28]
	add	x0, x22, x2, lsl #2
	mov	x1, x23
	b	LBB0_3
LBB0_2:
	ldr	w2, [x28]
	mov	x0, x22
	mov	x1, x23
	bl	_os_memcpy
	ldrsw	x2, [x28]
	add	x0, x22, x2, lsl #2
	ldr	x1, [x19, #24]
LBB0_3:
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcpy
	ldrsw	x2, [x28]
	add	x0, x22, x2, lsl #3
	ldur	x1, [x29, #-128]                ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcpy
	ldr	w0, [x27]
	lsl	w21, w26, #2
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x22
	mov	x3, x21
	bl	_wpa_hexdump
	ldr	w1, [x24]
	add	x5, x19, #8
Lloh23:
	adrp	x2, l_.str.4@PAGE
Lloh24:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x3, x22
	mov	x4, x21
	mov	w6, #16
	bl	_sha256_prf
	ldr	w0, [x27]
	ldr	x2, [x19, #16]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w3, #8
	bl	_wpa_hexdump_key
	ldr	w0, [x27]
	ldr	x2, [x19, #8]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w3, #8
	bl	_wpa_hexdump_key
	mov	w8, #1
	str	w8, [x19]
	ldur	x8, [x29, #-88]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SHA256_MAC_LEN,4,2             ; @SHA256_MAC_LEN
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WPA_NONCE_LEN,4,2              ; @WPA_NONCE_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TDLS: min(Nonce)"

l_.str.1:                               ; @.str.1
	.asciz	"TDLS: max(Nonce)"

l_.str.2:                               ; @.str.2
	.asciz	"TDLS: TPK-Key-Input"

l_.str.3:                               ; @.str.3
	.asciz	"TDLS: KDF Context"

l_.str.4:                               ; @.str.4
	.asciz	"TDLS PMK"

l_.str.5:                               ; @.str.5
	.asciz	"TDLS: TPK-KCK"

l_.str.6:                               ; @.str.6
	.asciz	"TDLS: TPK-TK"

	.no_dead_strip	_wpa_tdls_generate_tpk
.subsections_via_symbols
