	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_ttls_get_emsk
_eap_ttls_get_emsk:                     ## @eap_ttls_get_emsk
	.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
	movq	(%rsi), %rax
	movq	_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	addq	$8, %rsi
	movq	_EAP_TLS_KEY_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %r9d
	movq	_EAP_EMSK_LEN@GOTPCREL(%rip), %r12
	addl	(%r12), %r9d
	leaq	L_.str(%rip), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_eap_server_tls_derive_key
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r15
	movq	(%r12), %rdi
	callq	_os_malloc
	movslq	(%r13), %rsi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	leaq	(%r15,%rsi,4), %rsi
	movq	(%r12), %rdx
	movq	%rax, %rdi
	callq	_os_memcpy
	movl	(%r13), %esi
	addl	(%r12), %esi
	movq	%r15, %rdi
	callq	_bin_clear_free
	movq	(%r12), %rax
	movq	%rax, (%r14)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wpa_hexdump
	jmp	LBB0_7
LBB0_4:
	addl	(%r12), %esi
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_bin_clear_free
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUCCESS,8,3                    ## @SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ttls keying material"

	.comm	_EAP_TLS_KEY_LEN,4,2            ## @EAP_TLS_KEY_LEN
	.comm	_EAP_EMSK_LEN,8,3               ## @EAP_EMSK_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"EAP-TTLS: Derived EMSK"

L_.str.2:                               ## @.str.2
	.asciz	"EAP-TTLS: Failed to derive EMSK"

	.no_dead_strip	_eap_ttls_get_emsk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_ttls_get_emsk
_eap_ttls_get_emsk:                     ; @eap_ttls_get_emsk
	.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	x8, [x1]
Lloh0:
	adrp	x9, _SUCCESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x2
Lloh3:
	adrp	x23, _EAP_TLS_KEY_LEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _EAP_TLS_KEY_LEN@GOTPAGEOFF]
	add	x1, x1, #8
	ldr	w8, [x23]
Lloh5:
	adrp	x22, _EAP_EMSK_LEN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EAP_EMSK_LEN@GOTPAGEOFF]
	ldr	w9, [x22]
	add	w5, w8, w9
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, #0
	mov	w4, #0
	bl	_eap_server_tls_derive_key
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	x0, [x22]
	bl	_os_malloc
	ldrsw	x8, [x23]
	cbz	x0, LBB0_4
; %bb.3:
	mov	x20, x0
	add	x1, x21, x8, lsl #2
	ldr	x2, [x22]
	bl	_os_memcpy
	ldr	w8, [x23]
	ldr	w9, [x22]
	add	w1, w8, w9
	mov	x0, x21
	bl	_bin_clear_free
	ldr	x8, [x22]
	str	x8, [x19]
Lloh9:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x3, [x22]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump
	b	LBB0_7
LBB0_4:
	ldr	w9, [x22]
	add	w1, w8, w9
	mov	x0, x21
	bl	_bin_clear_free
LBB0_5:
Lloh14:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
LBB0_6:
	mov	x20, #0
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SUCCESS,8,3                    ; @SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ttls keying material"

	.comm	_EAP_TLS_KEY_LEN,4,2            ; @EAP_TLS_KEY_LEN
	.comm	_EAP_EMSK_LEN,8,3               ; @EAP_EMSK_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"EAP-TTLS: Derived EMSK"

l_.str.2:                               ; @.str.2
	.asciz	"EAP-TTLS: Failed to derive EMSK"

	.no_dead_strip	_eap_ttls_get_emsk
.subsections_via_symbols
