	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_derive_keys_reauth     ## -- Begin function eap_sim_derive_keys_reauth
	.p2align	4, 0x90
_eap_sim_derive_keys_reauth:            ## @eap_sim_derive_keys_reauth
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -144(%rbp)                 ## 8-byte Spill
	movq	%r8, -168(%rbp)                 ## 8-byte Spill
	movq	%rcx, -160(%rbp)                ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r15
	movl	%edi, -132(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SHA1_MAC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EAP_EMSK_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	addl	$32, %eax
	movq	%rax, -184(%rbp)                ## 8-byte Spill
	leaq	(,%rax,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -176(%rbp)                ## 8-byte Spill
	testq	%r13, %r13
	movq	%r12, -152(%rbp)                ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	leaq	L_.str(%rip), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -8(%r15,%r13,8)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	decq	%r13
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_wpa_printf
	testq	%r13, %r13
	jne	LBB0_2
LBB0_4:
	xorl	%r13d, %r13d
LBB0_5:
	movq	%r15, -96(%rbp)
	movq	%r13, -128(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	%rax, %rdi
	movq	$2, -120(%rbp)
	movq	-160(%rbp), %r14                ## 8-byte Reload
	movq	%r14, -80(%rbp)
	movq	_EAP_SIM_NONCE_S_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -112(%rbp)
	movq	-168(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, -72(%rbp)
	movq	_EAP_SIM_MK_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)
	movl	-132(%rbp), %esi                ## 4-byte Reload
	callq	_WPA_PUT_BE16
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	_wpa_hexdump_ascii
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	-64(%rbp), %rdx
	movl	$2, %ecx
	callq	_wpa_hexdump
	movl	(%r12), %edi
	movq	_EAP_SIM_NONCE_S_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdx
	callq	_wpa_hexdump
	movl	(%r12), %edi
	movq	_EAP_SIM_MK_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wpa_hexdump_key
	leaq	-96(%rbp), %rsi
	leaq	-128(%rbp), %rdx
	movl	$4, %edi
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_sha1_vector
	movq	%r12, %r14
	movl	(%r12), %edi
	movq	_SHA1_MAC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wpa_hexdump
	movq	-184(%rbp), %r12                ## 8-byte Reload
	shll	$3, %r12d
	movq	%rbx, %rdi
	movq	-176(%rbp), %r13                ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_eap_sim_prf
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movq	16(%rbp), %rbx
	movq	-144(%rbp), %r15                ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_9
## %bb.8:
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_os_memcpy
	movl	(%r14), %edi
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdx
	callq	_wpa_hexdump
LBB0_9:
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	movq	_EAP_SIM_KEYING_DATA_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(,%rax,8), %rsi
	addq	%r13, %rsi
	movq	_EAP_EMSK_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_os_memcpy
	movl	(%r14), %edi
	movl	(%r15), %ecx
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wpa_hexdump
LBB0_11:
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_os_memset
	jmp	LBB0_12
LBB0_6:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r14d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SHA1_MAC_LEN,4,2               ## @SHA1_MAC_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_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-SIM: Workaround - drop null character from the end of identity"

	.comm	_EAP_SIM_NONCE_S_LEN,4,2        ## @EAP_SIM_NONCE_S_LEN
	.comm	_EAP_SIM_MK_LEN,8,3             ## @EAP_SIM_MK_LEN
L_.str.1:                               ## @.str.1
	.asciz	"EAP-SIM: Deriving keying data from reauth"

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

L_.str.3:                               ## @.str.3
	.asciz	"EAP-SIM: counter"

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

L_.str.5:                               ## @.str.5
	.asciz	"EAP-SIM: MK"

L_.str.6:                               ## @.str.6
	.asciz	"EAP-SIM: XKEY'"

	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.7:                               ## @.str.7
	.asciz	"EAP-SIM: Failed to derive keys"

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

L_.str.9:                               ## @.str.9
	.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_reauth     ; -- Begin function eap_sim_derive_keys_reauth
	.p2align	2
_eap_sim_derive_keys_reauth:            ; @eap_sim_derive_keys_reauth
	.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, #112
	stp	x5, x6, [x29, #-192]            ; 16-byte Folded Spill
	mov	x23, x4
	mov	x24, x3
	mov	x26, x2
	mov	x25, x1
	stur	w0, [x29, #-172]                ; 4-byte Folded Spill
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, _SHA1_MAC_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SHA1_MAC_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh8:
	adrp	x8, _EAP_SIM_KEYING_DATA_LEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAP_SIM_KEYING_DATA_LEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _EAP_EMSK_LEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EAP_EMSK_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	add	w8, w8, w9
	add	w20, w8, #32
	lsl	x9, x20, #3
	add	x8, x9, #15
	and	x8, x8, #0xffffffff0
Lloh14:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh15:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
Lloh16:
	adrp	x19, _MSG_DEBUG@GOTPAGE
Lloh17:
	ldr	x19, [x19, _MSG_DEBUG@GOTPAGEOFF]
	cbz	x2, LBB0_4
; %bb.1:
	sub	x27, x25, #8
Lloh18:
	adrp	x28, l_.str@PAGE
Lloh19:
	add	x28, x28, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27, x26, lsl #3]
	cbnz	x8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x26, x26, #1
	ldr	w0, [x19]
	mov	x1, x28
	bl	_wpa_printf
	cbnz	x26, LBB0_2
LBB0_4:
	sub	x8, x29, #104
	stp	x25, x8, [x29, #-136]
	mov	w8, #2
	stp	x26, x8, [x29, #-168]
Lloh20:
	adrp	x27, _EAP_SIM_NONCE_S_LEN@GOTPAGE
Lloh21:
	ldr	x27, [x27, _EAP_SIM_NONCE_S_LEN@GOTPAGEOFF]
	ldrsw	x8, [x27]
	stp	x24, x23, [x29, #-120]
Lloh22:
	adrp	x28, _EAP_SIM_MK_LEN@GOTPAGE
Lloh23:
	ldr	x28, [x28, _EAP_SIM_MK_LEN@GOTPAGEOFF]
	ldr	x9, [x28]
	stp	x8, x9, [x29, #-152]
	sub	x0, x29, #104
	ldur	w1, [x29, #-172]                ; 4-byte Folded Reload
	bl	_WPA_PUT_BE16
	ldr	w0, [x19]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	ldr	w0, [x19]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x25
	mov	x3, x26
	bl	_wpa_hexdump_ascii
	ldr	w0, [x19]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	sub	x2, x29, #104
	mov	w3, #2
	bl	_wpa_hexdump
	ldr	w0, [x19]
	ldr	w3, [x27]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x24
	bl	_wpa_hexdump
	ldr	w0, [x19]
	ldr	x3, [x28]
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x23
	bl	_wpa_hexdump_key
	sub	x1, x29, #136
	sub	x2, x29, #168
	mov	w0, #4
	mov	x3, x22
	bl	_sha1_vector
	ldr	w0, [x19]
Lloh34:
	adrp	x8, _SHA1_MAC_LEN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SHA1_MAC_LEN@GOTPAGEOFF]
Lloh36:
	ldr	w3, [x8]
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, x22
	bl	_wpa_hexdump
	lsl	w23, w20, #3
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_eap_sim_prf
	tbnz	x0, #63, LBB0_10
; %bb.5:
	ldur	x20, [x29, #-192]               ; 8-byte Folded Reload
Lloh39:
	adrp	x22, _EAP_SIM_KEYING_DATA_LEN@GOTPAGE
Lloh40:
	ldr	x22, [x22, _EAP_SIM_KEYING_DATA_LEN@GOTPAGEOFF]
	cbz	x20, LBB0_7
; %bb.6:
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_os_memcpy
	ldr	w0, [x19]
	ldr	w3, [x22]
Lloh41:
	adrp	x1, l_.str.8@PAGE
Lloh42:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump
LBB0_7:
	ldur	x20, [x29, #-184]               ; 8-byte Folded Reload
	cbz	x20, LBB0_9
; %bb.8:
	ldrsw	x8, [x22]
	add	x1, x21, x8, lsl #3
Lloh43:
	adrp	x22, _EAP_EMSK_LEN@GOTPAGE
Lloh44:
	ldr	x22, [x22, _EAP_EMSK_LEN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_os_memcpy
	ldr	w0, [x19]
	ldr	w3, [x22]
Lloh45:
	adrp	x1, l_.str.9@PAGE
Lloh46:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump
LBB0_9:
	mov	x0, x21
	mov	w1, #0
	mov	x2, x23
	bl	_os_memset
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh47:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
Lloh50:
	adrp	x1, l_.str.7@PAGE
Lloh51:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh52:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh53:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	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 AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_SHA1_MAC_LEN,4,2               ; @SHA1_MAC_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_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-SIM: Workaround - drop null character from the end of identity"

	.comm	_EAP_SIM_NONCE_S_LEN,4,2        ; @EAP_SIM_NONCE_S_LEN
	.comm	_EAP_SIM_MK_LEN,8,3             ; @EAP_SIM_MK_LEN
l_.str.1:                               ; @.str.1
	.asciz	"EAP-SIM: Deriving keying data from reauth"

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

l_.str.3:                               ; @.str.3
	.asciz	"EAP-SIM: counter"

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

l_.str.5:                               ; @.str.5
	.asciz	"EAP-SIM: MK"

l_.str.6:                               ; @.str.6
	.asciz	"EAP-SIM: XKEY'"

	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.7:                               ; @.str.7
	.asciz	"EAP-SIM: Failed to derive keys"

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

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

.subsections_via_symbols
