	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_ttls_process_phase2_chap
_eap_ttls_process_phase2_chap:          ## @eap_ttls_process_phase2_chap
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r12
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CHAP_MD5_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	testq	%r13, %r13
	je	LBB0_4
## %bb.1:
	testq	%r12, %r12
	je	LBB0_4
## %bb.2:
	movq	_EAP_TTLS_CHAP_CHALLENGE_LEN@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_EAP_TTLS_CHAP_PASSWORD_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	incq	%rax
	cmpq	%r15, %rax
	jne	LBB0_4
## %bb.7:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	cmpl	$0, 8(%rax)
	je	LBB0_11
## %bb.9:
	cmpq	$0, 16(%rax)
	je	LBB0_10
LBB0_11:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_12:
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_5
LBB0_4:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_5:
	movq	_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_eap_ttls_state                 ## TAILCALL
LBB0_10:
	movq	_EAP_TTLS_AUTH_CHAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_11
## %bb.13:
	movq	%r14, %rdi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	leaq	1(%rbx), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_eap_ttls_implicit_challenge
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%rax, %r15
	movq	_EAP_TTLS_CHAP_CHALLENGE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_os_memcmp_const
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	movq	(%r12), %rax
	movq	_EAP_TTLS_CHAP_CHALLENGE_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%r15,%rcx,8), %rax
	jne	LBB0_17
## %bb.19:
	movq	%r15, %rdi
	callq	_os_free
	movq	(%r12), %rdi
	movq	(%r14), %rax
	movl	4(%rax), %edx
	movl	8(%rax), %esi
	movq	%r13, %rcx
	movq	%rbx, %r8
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r9
	callq	_chap_md5
	addq	$8, %r12
	movq	_EAP_TTLS_CHAP_PASSWORD_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_os_memcmp_const
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_eap_ttls_state
	jmp	LBB0_22
LBB0_17:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r15, %rdi
	callq	_os_free
	jmp	LBB0_5
LBB0_14:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_12
LBB0_20:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_eap_ttls_state
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_eap_ttls_valid_session
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CHAP_MD5_LEN,4,2               ## @CHAP_MD5_LEN
	.comm	_EAP_TTLS_CHAP_CHALLENGE_LEN,8,3 ## @EAP_TTLS_CHAP_CHALLENGE_LEN
	.comm	_EAP_TTLS_CHAP_PASSWORD_LEN,4,2 ## @EAP_TTLS_CHAP_PASSWORD_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-TTLS/CHAP: Invalid CHAP attributes (challenge len %lu password len %lu)"

	.comm	_FAILURE,4,2                    ## @FAILURE
	.comm	_EAP_TTLS_AUTH_CHAP,4,2         ## @EAP_TTLS_AUTH_CHAP
L_.str.1:                               ## @.str.1
	.asciz	"EAP-TTLS/CHAP: No plaintext user password configured"

L_.str.2:                               ## @.str.2
	.asciz	"EAP-TTLS/CHAP: Failed to generate challenge from TLS data"

L_.str.3:                               ## @.str.3
	.asciz	"EAP-TTLS/CHAP: Challenge mismatch"

L_.str.4:                               ## @.str.4
	.asciz	"EAP-TTLS/CHAP: Correct user password"

	.comm	_SUCCESS,4,2                    ## @SUCCESS
L_.str.5:                               ## @.str.5
	.asciz	"EAP-TTLS/CHAP: Invalid user password"

	.no_dead_strip	_eap_ttls_process_phase2_chap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_ttls_process_phase2_chap
_eap_ttls_process_phase2_chap:          ; @eap_ttls_process_phase2_chap
	.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	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, 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, _CHAP_MD5_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHAP_MD5_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	x24, x9, x8
	mov	sp, x24
	cbz	x2, LBB0_8
; %bb.1:
	cbz	x21, LBB0_8
; %bb.2:
Lloh8:
	adrp	x27, _EAP_TTLS_CHAP_CHALLENGE_LEN@GOTPAGE
Lloh9:
	ldr	x27, [x27, _EAP_TTLS_CHAP_CHALLENGE_LEN@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x8, x22
	b.ne	LBB0_8
; %bb.3:
Lloh10:
	adrp	x26, _EAP_TTLS_CHAP_PASSWORD_LEN@GOTPAGE
Lloh11:
	ldr	x26, [x26, _EAP_TTLS_CHAP_PASSWORD_LEN@GOTPAGEOFF]
	ldrsw	x8, [x26]
	add	x8, x8, #1
	cmp	x8, x5
	b.ne	LBB0_8
; %bb.4:
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_7
; %bb.6:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_11
LBB0_7:
Lloh12:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	b	LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	stp	x22, x5, [sp, #-16]!
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	add	sp, sp, #16
LBB0_9:
Lloh22:
	adrp	x8, _FAILURE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FAILURE@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldur	x8, [x29, #-88]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.10:
	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
	b	_eap_ttls_state
LBB0_11:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _EAP_TTLS_AUTH_CHAP@GOTPAGE
Lloh29:
	ldr	x9, [x9, _EAP_TTLS_AUTH_CHAP@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.12:
	add	x2, x22, #1
	mov	x0, x20
	mov	x1, x19
	bl	_eap_ttls_implicit_challenge
	cbz	x0, LBB0_18
; %bb.13:
	mov	x25, x0
	ldr	w2, [x27]
	mov	x0, x23
	mov	x1, x25
	bl	_os_memcmp_const
	cbnz	x0, LBB0_17
; %bb.14:
	ldr	x8, [x21]
	ldr	x9, [x27]
	ldr	x9, [x25, x9, lsl #3]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.15:
	mov	x0, x25
	bl	_os_free
	ldr	x0, [x21], #8
	ldr	x8, [x20]
	ldp	w2, w1, [x8, #4]
	mov	x3, x23
	mov	x4, x22
	mov	x5, x24
	bl	_chap_md5
	ldr	w2, [x26]
	mov	x0, x24
	mov	x1, x21
	bl	_os_memcmp_const
	mov	x8, x0
Lloh31:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x9]
	cbz	x8, LBB0_19
; %bb.16:
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_printf
Lloh36:
	adrp	x8, _FAILURE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _FAILURE@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_eap_ttls_state
	b	LBB0_20
LBB0_17:
Lloh39:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
	mov	x0, x25
	bl	_os_free
	b	LBB0_9
LBB0_18:
Lloh44:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh45:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
Lloh47:
	adrp	x1, l_.str.2@PAGE
Lloh48:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	b	LBB0_9
LBB0_19:
Lloh49:
	adrp	x1, l_.str.4@PAGE
Lloh50:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
Lloh51:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh52:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_eap_ttls_state
	mov	x0, x20
	mov	x1, x19
	bl	_eap_ttls_valid_session
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh54:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh55:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh56:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	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_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_CHAP_MD5_LEN,4,2               ; @CHAP_MD5_LEN
	.comm	_EAP_TTLS_CHAP_CHALLENGE_LEN,8,3 ; @EAP_TTLS_CHAP_CHALLENGE_LEN
	.comm	_EAP_TTLS_CHAP_PASSWORD_LEN,4,2 ; @EAP_TTLS_CHAP_PASSWORD_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-TTLS/CHAP: Invalid CHAP attributes (challenge len %lu password len %lu)"

	.comm	_FAILURE,4,2                    ; @FAILURE
	.comm	_EAP_TTLS_AUTH_CHAP,4,2         ; @EAP_TTLS_AUTH_CHAP
l_.str.1:                               ; @.str.1
	.asciz	"EAP-TTLS/CHAP: No plaintext user password configured"

l_.str.2:                               ; @.str.2
	.asciz	"EAP-TTLS/CHAP: Failed to generate challenge from TLS data"

l_.str.3:                               ; @.str.3
	.asciz	"EAP-TTLS/CHAP: Challenge mismatch"

l_.str.4:                               ; @.str.4
	.asciz	"EAP-TTLS/CHAP: Correct user password"

	.comm	_SUCCESS,4,2                    ; @SUCCESS
l_.str.5:                               ; @.str.5
	.asciz	"EAP-TTLS/CHAP: Invalid user password"

	.no_dead_strip	_eap_ttls_process_phase2_chap
.subsections_via_symbols
