	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_derive_keys            ## -- Begin function eap_sim_derive_keys
	.p2align	4, 0x90
_eap_sim_derive_keys:                   ## @eap_sim_derive_keys
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_EAP_SIM_K_ENCR_LEN@GOTPCREL(%rip), %r9
	movq	_EAP_SIM_K_AUT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	(%r9), %ebx
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movq	_EAP_EMSK_LEN@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	shll	$2, %ebx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_eap_sim_prf
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_EAP_SIM_K_ENCR_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_os_memcpy
	movslq	(%r14), %rax
	leaq	(%r15,%rax,4), %r12
	movq	_EAP_SIM_K_AUT_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_os_memcpy
	movslq	(%r14), %rax
	leaq	(%r12,%rax,4), %r12
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_os_memcpy
	movslq	(%r14), %rax
	leaq	(%r12,%rax,4), %rsi
	movq	_EAP_EMSK_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_os_memcpy
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_EAP_SIM_K_ENCR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	callq	_wpa_hexdump_key
	movl	(%r14), %edi
	movq	_EAP_SIM_K_AUT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_wpa_hexdump_key
	movl	(%r14), %edi
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_wpa_hexdump_key
	movl	(%r14), %edi
	movq	_EAP_EMSK_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdx
	callq	_wpa_hexdump_key
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_os_memset
	jmp	LBB0_3
LBB0_1:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r14d
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r14d, %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	_EAP_SIM_K_ENCR_LEN,4,2         ## @EAP_SIM_K_ENCR_LEN
	.comm	_EAP_SIM_K_AUT_LEN,4,2          ## @EAP_SIM_K_AUT_LEN
	.comm	_EAP_SIM_KEYING_DATA_LEN,4,2    ## @EAP_SIM_KEYING_DATA_LEN
	.comm	_EAP_EMSK_LEN,4,2               ## @EAP_EMSK_LEN
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-SIM: Failed to derive keys"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"EAP-SIM: K_encr"

L_.str.2:                               ## @.str.2
	.asciz	"EAP-SIM: K_aut"

L_.str.3:                               ## @.str.3
	.asciz	"EAP-SIM: keying material (MSK)"

L_.str.4:                               ## @.str.4
	.asciz	"EAP-SIM: EMSK"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_derive_keys            ; -- Begin function eap_sim_derive_keys
	.p2align	2
_eap_sim_derive_keys:                   ; @eap_sim_derive_keys
	.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	x27, x4
	mov	x20, x3
	mov	x23, x2
	mov	x24, x1
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	x26, _EAP_SIM_K_ENCR_LEN@GOTPAGE
Lloh4:
	ldr	x26, [x26, _EAP_SIM_K_ENCR_LEN@GOTPAGEOFF]
	ldr	w8, [x26]
Lloh5:
	adrp	x28, _EAP_SIM_K_AUT_LEN@GOTPAGE
Lloh6:
	ldr	x28, [x28, _EAP_SIM_K_AUT_LEN@GOTPAGEOFF]
	ldr	w9, [x28]
Lloh7:
	adrp	x19, _EAP_SIM_KEYING_DATA_LEN@GOTPAGE
Lloh8:
	ldr	x19, [x19, _EAP_SIM_KEYING_DATA_LEN@GOTPAGEOFF]
	ldr	w10, [x19]
Lloh9:
	adrp	x25, _EAP_EMSK_LEN@GOTPAGE
Lloh10:
	ldr	x25, [x25, _EAP_EMSK_LEN@GOTPAGEOFF]
	add	w8, w9, w8
	add	w8, w8, w10
	ldr	w9, [x25]
	add	w8, w8, w9
	lsl	x9, x8, #2
	add	x10, x9, #15
	and	x12, x10, #0x7fffffff0
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x12
	mov	sp, x21
	lsl	w22, w8, #2
	mov	x1, x21
	mov	x2, x22
	bl	_eap_sim_prf
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	w2, [x26]
	mov	x0, x24
	mov	x1, x21
	bl	_os_memcpy
	ldrsw	x8, [x26]
	mov	x26, x28
	mov	x28, x25
	add	x25, x21, x8, lsl #2
	ldr	w2, [x26]
	mov	x0, x23
	mov	x1, x25
	bl	_os_memcpy
	ldrsw	x8, [x26]
	add	x25, x25, x8, lsl #2
	ldr	w2, [x19]
	mov	x0, x20
	mov	x1, x25
	bl	_os_memcpy
	ldrsw	x8, [x19]
	add	x1, x25, x8, lsl #2
	ldr	w2, [x28]
	mov	x0, x27
	bl	_os_memcpy
Lloh13:
	adrp	x25, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x25, [x25, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh15:
	adrp	x8, _EAP_SIM_K_ENCR_LEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EAP_SIM_K_ENCR_LEN@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_wpa_hexdump_key
	ldr	w0, [x25]
	ldr	w3, [x26]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_wpa_hexdump_key
	ldr	w0, [x25]
	ldr	w3, [x19]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump_key
	ldr	w0, [x25]
	ldr	w3, [x28]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x27
	bl	_wpa_hexdump_key
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_os_memset
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh26:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
LBB0_3:
	ldur	x8, [x29, #-88]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	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 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 AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EAP_SIM_K_ENCR_LEN,4,2         ; @EAP_SIM_K_ENCR_LEN
	.comm	_EAP_SIM_K_AUT_LEN,4,2          ; @EAP_SIM_K_AUT_LEN
	.comm	_EAP_SIM_KEYING_DATA_LEN,4,2    ; @EAP_SIM_KEYING_DATA_LEN
	.comm	_EAP_EMSK_LEN,4,2               ; @EAP_EMSK_LEN
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-SIM: Failed to derive keys"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"EAP-SIM: K_encr"

l_.str.2:                               ; @.str.2
	.asciz	"EAP-SIM: K_aut"

l_.str.3:                               ; @.str.3
	.asciz	"EAP-SIM: keying material (MSK)"

l_.str.4:                               ; @.str.4
	.asciz	"EAP-SIM: EMSK"

.subsections_via_symbols
