	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_eke_derive_ke_ki           ## -- Begin function eap_eke_derive_ke_ki
	.p2align	4, 0x90
_eap_eke_derive_ke_ki:                  ## @eap_eke_derive_ke_ki
	.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	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_EAP_EKE_MAX_KE_LEN@GOTPCREL(%rip), %rcx
	movq	_EAP_EKE_MAX_KI_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	(%rcx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	movq	(%r15), %rax
	movq	_EAP_EKE_ENCR_AES128_CBC@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	movq	8(%r15), %rax
	movq	_EAP_EKE_PRF_HMAC_SHA1@GOTPCREL(%rip), %rcx
	movl	$20, %esi
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_EAP_EKE_PRF_HMAC_SHA2_256@GOTPCREL(%rip), %rcx
	movl	$32, %esi
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_3:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_os_strlen
	movq	%rax, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, %rbx
	addq	%rax, %r12
	addq	%r13, %r12
	movq	%r12, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r13, %rdx
	callq	_os_memcpy
	movq	%rbx, %rax
	movq	%r14, %rbx
	addq	%r13, %rbx
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %r13
	movq	%rax, %rdx
	callq	_os_memcpy
	addq	%r13, %rbx
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_os_memcpy
	movl	40(%r15), %edi
	movl	32(%r15), %edx
	movl	36(%r15), %esi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	leaq	16(%r13), %rax
	subq	$8, %rsp
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rcx
	movq	%r12, %r8
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r9
	pushq	%rax
	callq	_eap_eke_prfplus
	addq	$16, %rsp
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	16(%r15), %rdi
	movl	$16, %edx
	movq	%rbx, %rsi
	callq	_os_memcpy
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	16(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	$16, %ecx
	callq	_wpa_hexdump_key
	movq	24(%r15), %rdi
	addq	$16, %rbx
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_os_memcpy
	movl	(%r14), %edi
	movq	24(%r15), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rcx
	callq	_wpa_hexdump_key
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_5:
	movl	$-1, %r14d
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_os_free
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EAP_EKE_MAX_KE_LEN,4,2         ## @EAP_EKE_MAX_KE_LEN
	.comm	_EAP_EKE_MAX_KI_LEN,4,2         ## @EAP_EKE_MAX_KI_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-EKE Keys"

	.comm	_EAP_EKE_ENCR_AES128_CBC,8,3    ## @EAP_EKE_ENCR_AES128_CBC
	.comm	_EAP_EKE_PRF_HMAC_SHA1,8,3      ## @EAP_EKE_PRF_HMAC_SHA1
	.comm	_EAP_EKE_PRF_HMAC_SHA2_256,8,3  ## @EAP_EKE_PRF_HMAC_SHA2_256
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"EAP-EKE: Ke"

L_.str.2:                               ## @.str.2
	.asciz	"EAP-EKE: Ki"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_eke_derive_ke_ki           ; -- Begin function eap_eke_derive_ke_ki
	.p2align	2
_eap_eke_derive_ke_ki:                  ; @eap_eke_derive_ke_ki
	.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	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, 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	x8, _EAP_EKE_MAX_KE_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAP_EKE_MAX_KE_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EAP_EKE_MAX_KI_LEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EAP_EKE_MAX_KI_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w9, w9, w8
	add	x8, x9, #15
	and	x8, x8, #0x1fffffff0
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x0]
Lloh11:
	adrp	x9, _EAP_EKE_ENCR_AES128_CBC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EAP_EKE_ENCR_AES128_CBC@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _EAP_EKE_PRF_HMAC_SHA1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EAP_EKE_PRF_HMAC_SHA1@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	w21, #20
	b	LBB0_5
LBB0_3:
Lloh17:
	adrp	x9, _EAP_EKE_PRF_HMAC_SHA2_256@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EAP_EKE_PRF_HMAC_SHA2_256@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	mov	w21, #32
LBB0_5:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_os_strlen
	mov	x28, x0
	add	x8, x23, x25
	add	x27, x8, x0
	mov	x0, x27
	bl	_os_malloc
	cbz	x0, LBB0_8
; %bb.6:
	mov	x22, x0
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x28
	bl	_os_memcpy
	add	x28, x22, x28
	mov	x0, x28
	mov	x1, x26
	mov	x2, x25
	bl	_os_memcpy
	add	x0, x28, x25
	mov	x1, x24
	mov	x2, x23
	bl	_os_memcpy
	ldp	w1, w0, [x19, #36]
	add	x6, x21, #16
	ldr	w2, [x19, #32]
	mov	x3, x22
	mov	x4, x27
	mov	x5, x20
	bl	_eap_eke_prfplus
	tbnz	x0, #63, LBB0_9
; %bb.7:
	ldr	x0, [x19, #16]
	mov	x1, x20
	mov	w2, #16
	bl	_os_memcpy
Lloh24:
	adrp	x23, _MSG_DEBUG@GOTPAGE
Lloh25:
	ldr	x23, [x23, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	x2, [x19, #16]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w3, #16
	bl	_wpa_hexdump_key
	ldr	x0, [x19, #24]
	add	x1, x20, #16
	mov	x2, x21
	bl	_os_memcpy
	ldr	w0, [x23]
	ldr	x2, [x19, #24]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x3, x21
	bl	_wpa_hexdump_key
	mov	w19, #0
	b	LBB0_10
LBB0_8:
	mov	w19, #-1
	b	LBB0_11
LBB0_9:
	mov	w19, #-1
LBB0_10:
	mov	x0, x22
	bl	_os_free
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	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_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EAP_EKE_MAX_KE_LEN,4,2         ; @EAP_EKE_MAX_KE_LEN
	.comm	_EAP_EKE_MAX_KI_LEN,4,2         ; @EAP_EKE_MAX_KI_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-EKE Keys"

	.comm	_EAP_EKE_ENCR_AES128_CBC,8,3    ; @EAP_EKE_ENCR_AES128_CBC
	.comm	_EAP_EKE_PRF_HMAC_SHA1,8,3      ; @EAP_EKE_PRF_HMAC_SHA1
	.comm	_EAP_EKE_PRF_HMAC_SHA2_256,8,3  ; @EAP_EKE_PRF_HMAC_SHA2_256
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"EAP-EKE: Ke"

l_.str.2:                               ; @.str.2
	.asciz	"EAP-EKE: Ki"

.subsections_via_symbols
