	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_ttls_process_handshake
_eap_ttls_process_handshake:            ## @eap_ttls_process_handshake
	.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	%r9, %r13
	movq	%r8, %r9
	movl	%ecx, %r8d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	cmpq	$0, 8(%rdi)
	je	LBB0_7
## %bb.1:
	cmpq	$0, 32(%r15)
	je	LBB0_7
## %bb.2:
	movq	%r12, %rdi
	callq	_eap_get_config
	movq	(%rax), %rax
	movq	_EXT_CERT_CHECK_GOOD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	32(%r15), %rax
	movq	%rax, (%r13)
	movq	$0, 32(%r15)
	movq	$0, 8(%r12)
	jmp	LBB0_22
LBB0_7:
	leaq	24(%r15), %r14
	movq	_EAP_TYPE_TTLS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	40(%r15), %ecx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, (%rsp)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	callq	_eap_peer_tls_process_helper
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	cmpq	$0, 8(%r12)
	je	LBB0_11
## %bb.10:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_printf
	movq	32(%r15), %rdi
	callq	_wpabuf_clear_free
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	%rax, 32(%r15)
	movq	$0, (%rcx)
	jmp	LBB0_22
LBB0_8:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
	movq	_METHOD_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_DECISION_FAIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movl	$-1, %r13d
	jmp	LBB0_23
LBB0_5:
	movq	_EXT_CERT_CHECK_BAD@GOTPCREL(%rip), %rcx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	_METHOD_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_DECISION_FAIL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	$0, 8(%r12)
	jmp	LBB0_22
LBB0_11:
	movl	%eax, %r13d
	movl	(%r12), %edi
	movl	(%r14), %esi
	callq	_tls_connection_established
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_wpa_printf
	cmpq	$0, 16(%r15)
	je	LBB0_14
## %bb.13:
	movl	(%r14), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_wpa_printf
	movq	_DECISION_COND_SUCC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, %rcx
	movq	%rax, 8(%rbx)
	movq	_METHOD_MAY_CONT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_14:
	movl	$1, (%r15)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_eap_ttls_v0_derive_key
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_wpabuf_len
	testq	%rax, %rax
	jne	LBB0_18
LBB0_16:
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	callq	_eap_ttls_decrypt
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_wpa_printf
LBB0_18:
	movq	$0, 16(%r15)
LBB0_19:
	cmpl	$2, %r13d
	jne	LBB0_23
## %bb.20:
	movq	8(%r15), %rdi
	callq	_wpabuf_clear_free
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	(%r9), %rax
	movq	%rax, 8(%r15)
	movq	$0, (%r9)
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_eap_ttls_decrypt               ## TAILCALL
LBB0_21:
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
LBB0_22:
	xorl	%r13d, %r13d
LBB0_23:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXT_CERT_CHECK_GOOD,8,3        ## @EXT_CERT_CHECK_GOOD
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-TTLS: External certificate check succeeded - continue handshake"

	.comm	_EXT_CERT_CHECK_BAD,8,3         ## @EXT_CERT_CHECK_BAD
L_.str.1:                               ## @.str.1
	.asciz	"EAP-TTLS: External certificate check failed - force authentication failure"

	.comm	_METHOD_DONE,8,3                ## @METHOD_DONE
	.comm	_DECISION_FAIL,8,3              ## @DECISION_FAIL
L_.str.2:                               ## @.str.2
	.asciz	"EAP-TTLS: Continuing to wait external server certificate validation"

	.comm	_EAP_TYPE_TTLS,4,2              ## @EAP_TYPE_TTLS
L_.str.3:                               ## @.str.3
	.asciz	"EAP-TTLS: TLS processing failed"

L_.str.4:                               ## @.str.4
	.asciz	"EAP-TTLS: Waiting external server certificate validation"

L_.str.5:                               ## @.str.5
	.asciz	"EAP-TTLS: TLS done, proceed to Phase 2"

L_.str.6:                               ## @.str.6
	.asciz	"EAP-TTLS: fast reauth - may skip Phase 2"

	.comm	_DECISION_COND_SUCC,8,3         ## @DECISION_COND_SUCC
	.comm	_METHOD_MAY_CONT,8,3            ## @METHOD_MAY_CONT
	.comm	_MSG_WARNING,4,2                ## @MSG_WARNING
L_.str.7:                               ## @.str.7
	.asciz	"EAP-TTLS: failed to process early start for Phase 2"

	.no_dead_strip	_eap_ttls_process_handshake
.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_handshake
_eap_ttls_process_handshake:            ; @eap_ttls_process_handshake
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x5
	mov	x23, x4
	mov	x24, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_eap_get_config
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _EXT_CERT_CHECK_GOOD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EXT_CERT_CHECK_GOOD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w25, #0
	ldr	x8, [x22, #32]
	str	x8, [x20]
	str	xzr, [x22, #32]
	str	xzr, [x21, #8]
	b	LBB0_22
LBB0_4:
	add	x26, x22, #24
Lloh8:
	adrp	x8, _EAP_TYPE_TTLS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAP_TYPE_TTLS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	w3, [x22, #40]
	mov	x0, x21
	mov	x1, x26
	mov	x4, x24
	mov	x5, x23
	mov	x6, x20
	bl	_eap_peer_tls_process_helper
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_10
; %bb.6:
Lloh11:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [x22, #32]
	bl	_wpabuf_clear_free
	mov	w25, #0
	ldr	x8, [x20]
	str	x8, [x22, #32]
	str	xzr, [x20]
	b	LBB0_22
LBB0_7:
Lloh16:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
Lloh21:
	adrp	x8, _METHOD_DONE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _METHOD_DONE@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh24:
	adrp	x8, _DECISION_FAIL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DECISION_FAIL@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	w25, #-1
	b	LBB0_22
LBB0_8:
Lloh27:
	adrp	x9, _EXT_CERT_CHECK_BAD@GOTPAGE
Lloh28:
	ldr	x9, [x9, _EXT_CERT_CHECK_BAD@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
Lloh30:
	adrp	x10, _MSG_DEBUG@GOTPAGE
Lloh31:
	ldr	x10, [x10, _MSG_DEBUG@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x10]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.9:
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w25, #0
Lloh35:
	adrp	x8, _METHOD_DONE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _METHOD_DONE@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh38:
	adrp	x8, _DECISION_FAIL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DECISION_FAIL@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	str	xzr, [x21, #8]
	b	LBB0_22
LBB0_10:
	mov	x25, x0
	ldr	w0, [x21]
	ldr	w1, [x26]
	bl	_tls_connection_established
	cbz	x0, LBB0_19
; %bb.11:
Lloh41:
	adrp	x26, _MSG_DEBUG@GOTPAGE
Lloh42:
	ldr	x26, [x26, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x26]
Lloh43:
	adrp	x1, l_.str.5@PAGE
Lloh44:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_printf
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	w0, [x26]
Lloh45:
	adrp	x1, l_.str.6@PAGE
Lloh46:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_wpa_printf
Lloh47:
	adrp	x8, _DECISION_COND_SUCC@GOTPAGE
Lloh48:
	ldr	x8, [x8, _DECISION_COND_SUCC@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
Lloh50:
	adrp	x9, _METHOD_MAY_CONT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _METHOD_MAY_CONT@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	stp	x9, x8, [x19]
LBB0_13:
	mov	w8, #1
	str	w8, [x22]
	mov	x0, x21
	mov	x1, x22
	bl	_eap_ttls_v0_derive_key
	ldr	x0, [x20]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_wpabuf_len
	cbnz	x0, LBB0_18
LBB0_15:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x24
	mov	x4, #0
	mov	x5, x20
	bl	_eap_ttls_decrypt
	cbz	w0, LBB0_17
; %bb.16:
Lloh53:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh54:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
Lloh56:
	adrp	x1, l_.str.7@PAGE
Lloh57:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_wpa_printf
LBB0_17:
	mov	w25, #0
LBB0_18:
	str	xzr, [x22, #16]
LBB0_19:
	cmp	w25, #2
	b.ne	LBB0_22
; %bb.20:
	ldr	x0, [x22, #8]
	bl	_wpabuf_clear_free
	ldr	x8, [x20]
	str	x8, [x22, #8]
	str	xzr, [x20]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x24
	mov	x4, x23
	mov	x5, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_eap_ttls_decrypt
LBB0_21:
Lloh58:
	adrp	x1, l_.str.2@PAGE
Lloh59:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	mov	w25, #0
LBB0_22:
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_EXT_CERT_CHECK_GOOD,8,3        ; @EXT_CERT_CHECK_GOOD
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-TTLS: External certificate check succeeded - continue handshake"

	.comm	_EXT_CERT_CHECK_BAD,8,3         ; @EXT_CERT_CHECK_BAD
l_.str.1:                               ; @.str.1
	.asciz	"EAP-TTLS: External certificate check failed - force authentication failure"

	.comm	_METHOD_DONE,8,3                ; @METHOD_DONE
	.comm	_DECISION_FAIL,8,3              ; @DECISION_FAIL
l_.str.2:                               ; @.str.2
	.asciz	"EAP-TTLS: Continuing to wait external server certificate validation"

	.comm	_EAP_TYPE_TTLS,4,2              ; @EAP_TYPE_TTLS
l_.str.3:                               ; @.str.3
	.asciz	"EAP-TTLS: TLS processing failed"

l_.str.4:                               ; @.str.4
	.asciz	"EAP-TTLS: Waiting external server certificate validation"

l_.str.5:                               ; @.str.5
	.asciz	"EAP-TTLS: TLS done, proceed to Phase 2"

l_.str.6:                               ; @.str.6
	.asciz	"EAP-TTLS: fast reauth - may skip Phase 2"

	.comm	_DECISION_COND_SUCC,8,3         ; @DECISION_COND_SUCC
	.comm	_METHOD_MAY_CONT,8,3            ; @METHOD_MAY_CONT
	.comm	_MSG_WARNING,4,2                ; @MSG_WARNING
l_.str.7:                               ; @.str.7
	.asciz	"EAP-TTLS: failed to process early start for Phase 2"

	.no_dead_strip	_eap_ttls_process_handshake
.subsections_via_symbols
