	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_mschapv2_getKey
_eap_mschapv2_getKey:                   ## @eap_mschapv2_getKey
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 8(%rsi)
	je	LBB0_10
## %bb.1:
	movq	%rsi, %rbx
	cmpl	$0, 4(%rsi)
	je	LBB0_10
## %bb.2:
	movq	%rdx, %r14
	movq	_MSCHAPV2_KEY_LEN@GOTPCREL(%rip), %r13
	movslq	(%r13), %r15
	addq	%r15, %r15
	movl	%r15d, %edi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r12
	movl	(%rbx), %edi
	movl	(%r13), %edx
	movq	%rax, %rsi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_get_asymetric_start_key
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movl	(%rbx), %edi
	movslq	(%r13), %rdx
	leaq	(%r12,%rdx,4), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_get_asymetric_start_key
	testq	%rax, %rax
	js	LBB0_9
## %bb.5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_wpa_hexdump_key
	movq	%r15, (%r14)
	jmp	LBB0_11
LBB0_9:
	movq	%r12, %rdi
	callq	_os_free
LBB0_10:
	xorl	%r12d, %r12d
LBB0_11:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSCHAPV2_KEY_LEN,4,2           ## @MSCHAPV2_KEY_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-MSCHAPV2: Derived key"

	.no_dead_strip	_eap_mschapv2_getKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_mschapv2_getKey
_eap_mschapv2_getKey:                   ; @eap_mschapv2_getKey
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x1, #8]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x22, x1
	ldr	w8, [x1, #4]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x19, x2
Lloh0:
	adrp	x23, _MSCHAPV2_KEY_LEN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MSCHAPV2_KEY_LEN@GOTPAGEOFF]
	ldrsw	x8, [x23]
	lsl	x21, x8, #1
	mov	x0, x21
	bl	_os_malloc
	mov	x20, x0
	cbz	x0, LBB0_8
; %bb.3:
	ldr	w0, [x22]
	ldr	w2, [x23]
	mov	x1, x20
	mov	w3, #1
	mov	w4, #0
	bl	_get_asymetric_start_key
	tbnz	x0, #63, LBB0_6
; %bb.4:
	ldr	w0, [x22]
	ldrsw	x2, [x23]
	add	x1, x20, x2, lsl #2
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #0
	mov	w4, #0
	bl	_get_asymetric_start_key
	tbnz	x0, #63, LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	bl	_wpa_hexdump_key
	str	x21, [x19]
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	bl	_os_free
LBB0_7:
	mov	x20, #0
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MSCHAPV2_KEY_LEN,4,2           ; @MSCHAPV2_KEY_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-MSCHAPV2: Derived key"

	.no_dead_strip	_eap_mschapv2_getKey
.subsections_via_symbols
