	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mesh_rsn_derive_mtk            ## -- Begin function mesh_rsn_derive_mtk
	.p2align	4, 0x90
_mesh_rsn_derive_mtk:                   ## @mesh_rsn_derive_mtk
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	40(%rsi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_WPA_NONCE_LEN@GOTPCREL(%rip), %r13
	movslq	(%r13), %r14
	movq	%r14, %rax
	addq	%r14, %rax
	movq	_RSN_SELECTOR_LEN@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	_ETH_ALEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,2), %rdx
	leaq	(%rax,%rcx,2), %rax
	addq	$4, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	16(,%rdx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	24(%r15), %rdi
	movq	32(%r15), %rsi
	movl	%r14d, %edx
	callq	_os_memcmp
	movq	%rax, %rcx
	shrq	$63, %rcx
	notq	%rax
	shrq	$63, %rax
	movq	24(%r15,%rax,8), %rsi
	movq	24(%r15,%rcx,8), %r14
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_os_memcpy
	movslq	(%r13), %rdx
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rdx,4), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcpy
	movslq	(%r13), %rax
	leaq	(%r12,%rax,4), %r14
	movl	16(%r15), %esi
	movl	20(%r15), %eax
	movq	%r14, %rdi
	cmpl	%eax, %esi
	jge	LBB0_2
## %bb.1:
	callq	_WPA_PUT_LE16
	leaq	8(%r14), %rdi
	movl	20(%r15), %esi
	jmp	LBB0_3
LBB0_2:
	movl	%eax, %esi
	callq	_WPA_PUT_LE16
	leaq	8(%r14), %rdi
	movl	16(%r15), %esi
LBB0_3:
	callq	_WPA_PUT_LE16
	leaq	16(%r14), %rdi
	movq	_RSN_AUTH_KEY_MGMT_SAE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RSN_SELECTOR_PUT
	movq	_RSN_SELECTOR_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_os_memcmp
	testq	%rax, %rax
	movq	%rbx, %r13
	cmovsq	%r12, %r13
	cmovsq	%rbx, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r14,%rax,4), %r14
	addq	$16, %r14
	movq	_ETH_ALEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_os_memcpy
	movslq	(%rbx), %rdx
	leaq	(%r14,%rdx,4), %rdi
	movq	%r13, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcpy
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_wpa_cipher_key_len
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%r15)
	movq	8(%r15), %rcx
	movl	(%rcx), %edi
	movq	_SAE_PMK_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	shll	$2, %r8d
	movl	4(%r15), %r9d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	pushq	%rax
	callq	_sha256_prf
	addq	$16, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	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	_WPA_NONCE_LEN,4,2              ## @WPA_NONCE_LEN
	.comm	_RSN_SELECTOR_LEN,8,3           ## @RSN_SELECTOR_LEN
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_RSN_AUTH_KEY_MGMT_SAE,4,2      ## @RSN_AUTH_KEY_MGMT_SAE
	.comm	_SAE_PMK_LEN,4,2                ## @SAE_PMK_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Temporal Key Derivation"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mesh_rsn_derive_mtk            ; -- Begin function mesh_rsn_derive_mtk
	.p2align	2
_mesh_rsn_derive_mtk:                   ; @mesh_rsn_derive_mtk
	.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, #16
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x22, [x0, #8]
	ldr	x23, [x1, #40]
Lloh3:
	adrp	x28, _WPA_NONCE_LEN@GOTPAGE
Lloh4:
	ldr	x28, [x28, _WPA_NONCE_LEN@GOTPAGEOFF]
	ldrsw	x2, [x28]
Lloh5:
	adrp	x8, _RSN_SELECTOR_LEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RSN_SELECTOR_LEN@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x8, x8, x2, lsl #1
Lloh8:
	adrp	x27, _ETH_ALEN@GOTPAGE
Lloh9:
	ldr	x27, [x27, _ETH_ALEN@GOTPAGEOFF]
	ldrsw	x9, [x27]
	add	x8, x8, x9, lsl #1
	add	x26, x8, #4
	lsl	x9, x26, #2
	add	x8, x9, #15
	and	x8, x8, #0xfffffffffffffff0
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	ldp	x0, x1, [x1, #24]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcmp
	mov	w8, #24
	mov	w9, #32
	cmp	x0, #0
	csel	x10, x9, x8, lt
	csel	x8, x8, x9, lt
	ldr	x1, [x19, x8]
	ldr	x24, [x19, x10]
	ldr	w2, [x28]
	mov	x0, x21
	bl	_os_memcpy
	ldrsw	x2, [x28]
	add	x25, x21, x2, lsl #2
	mov	x0, x25
	mov	x1, x24
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcpy
	ldrsw	x8, [x28]
	add	x24, x25, x8, lsl #2
	ldp	w1, w8, [x19, #16]
	mov	x0, x24
	cmp	w1, w8
	b.ge	LBB0_2
; %bb.1:
	bl	_WPA_PUT_LE16
	add	x0, x24, #8
	ldr	w1, [x19, #20]
	b	LBB0_3
LBB0_2:
	mov	x1, x8
	bl	_WPA_PUT_LE16
	add	x0, x24, #8
	ldr	w1, [x19, #16]
LBB0_3:
	bl	_WPA_PUT_LE16
	add	x24, x24, #16
Lloh12:
	adrp	x8, _RSN_AUTH_KEY_MGMT_SAE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RSN_AUTH_KEY_MGMT_SAE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_RSN_SELECTOR_PUT
Lloh15:
	adrp	x8, _RSN_SELECTOR_LEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RSN_SELECTOR_LEN@GOTPAGEOFF]
Lloh17:
	ldr	x28, [x8]
	ldr	w2, [x27]
	mov	x0, x22
	mov	x1, x23
	bl	_os_memcmp
	cmp	x0, #0
	csel	x25, x23, x22, lt
	csel	x1, x22, x23, lt
	add	x22, x24, x28, lsl #2
	ldr	w2, [x27]
	mov	x0, x22
	bl	_os_memcpy
	ldrsw	x2, [x27]
	add	x0, x22, x2, lsl #2
	mov	x1, x25
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcpy
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_wpa_cipher_key_len
	mov	x6, x0
	str	w0, [x19]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _SAE_PMK_LEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SAE_PMK_LEN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	lsl	w4, w26, #2
	ldr	w5, [x19, #4]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x21
	bl	_sha256_prf
	ldur	x8, [x29, #-88]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	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 AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_NONCE_LEN,4,2              ; @WPA_NONCE_LEN
	.comm	_RSN_SELECTOR_LEN,8,3           ; @RSN_SELECTOR_LEN
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_RSN_AUTH_KEY_MGMT_SAE,4,2      ; @RSN_AUTH_KEY_MGMT_SAE
	.comm	_SAE_PMK_LEN,4,2                ; @SAE_PMK_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Temporal Key Derivation"

.subsections_via_symbols
