	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function login_send_chap_success
_login_send_chap_success:               ## @login_send_chap_success
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_login_new_response
	movq	%rax, %r14
	movq	_BHSLR_STAGE_OPERATIONAL_NEGOTIATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_login_set_nsg
	xorl	%eax, %eax
	callq	_keys_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_keys_load
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_keys_find
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_keys_find
	movq	%rax, %r15
	movq	%r12, %rax
	orq	%r15, %rax
	je	LBB0_10
## %bb.1:
	testq	%r12, %r12
	jne	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	movl	$2, %esi
	movl	$7, %edx
	callq	_login_send_error
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
LBB0_3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	jne	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	movl	$2, %esi
	movl	$7, %edx
	callq	_login_send_error
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
LBB0_5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	_AG_TYPE_CHAP_MUTUAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movl	$2, %esi
	movl	$1, %edx
	callq	_login_send_error
	movl	12(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
LBB0_7:
	movq	(%rbx), %rsi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_debugx
	movl	8(%rbx), %edi
	callq	_rchap_new
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_rchap_receive
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	movl	$2, %esi
	movl	$7, %edx
	callq	_login_send_error
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_log_errx
LBB0_9:
	movq	%r14, %rdi
	callq	_rchap_get_response
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_rchap_delete
	xorl	%eax, %eax
	callq	_keys_new
	movq	%rax, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	callq	_keys_add
	leaq	L_.str.8(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_keys_add
	movq	%r15, %rdi
	callq	_free
	movq	%rbx, %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_keys_save
	movq	%rbx, %rdi
	callq	_keys_delete
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_debugx
LBB0_11:
	movq	%rbx, %rdi
	callq	_keys_delete
	movq	%r14, %rdi
	callq	_pdu_send
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pdu_delete                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BHSLR_STAGE_OPERATIONAL_NEGOTIATION,4,2 ## @BHSLR_STAGE_OPERATIONAL_NEGOTIATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CHAP_I"

L_.str.1:                               ## @.str.1
	.asciz	"CHAP_C"

L_.str.2:                               ## @.str.2
	.asciz	"initiator requested target authentication, but didn't send CHAP_I"

L_.str.3:                               ## @.str.3
	.asciz	"initiator requested target authentication, but didn't send CHAP_C"

	.comm	_AG_TYPE_CHAP_MUTUAL,8,3        ## @AG_TYPE_CHAP_MUTUAL
L_.str.4:                               ## @.str.4
	.asciz	"initiator requests target authentication for user \"%s\", but mutual user/secret is not set"

L_.str.5:                               ## @.str.5
	.asciz	"performing mutual authentication as user \"%s\""

L_.str.6:                               ## @.str.6
	.asciz	"received CHAP Login PDU with malformed CHAP_I or CHAP_C"

L_.str.7:                               ## @.str.7
	.asciz	"CHAP_N"

L_.str.8:                               ## @.str.8
	.asciz	"CHAP_R"

L_.str.9:                               ## @.str.9
	.asciz	"initiator did not request target authentication"

	.no_dead_strip	_login_send_chap_success
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function login_send_chap_success
_login_send_chap_success:               ; @login_send_chap_success
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x1
	mov	x22, x0
	bl	_login_new_response
	mov	x19, x0
Lloh0:
	adrp	x8, _BHSLR_STAGE_OPERATIONAL_NEGOTIATION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BHSLR_STAGE_OPERATIONAL_NEGOTIATION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_login_set_nsg
	bl	_keys_new
	mov	x20, x0
	mov	x1, x22
	bl	_keys_load
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_keys_find
	mov	x23, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_keys_find
	orr	x8, x23, x0
	cbz	x8, LBB0_8
; %bb.1:
	mov	x24, x0
	cbz	x23, LBB0_10
; %bb.2:
	cbz	x24, LBB0_11
LBB0_3:
	ldr	x8, [x21, #16]
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _AG_TYPE_CHAP_MUTUAL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AG_TYPE_CHAP_MUTUAL@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x22
	mov	w1, #2
	mov	w2, #1
	bl	_login_send_error
	ldr	w8, [x21, #12]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_5:
	ldr	x8, [x21]
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.5@PAGE
Lloh13:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_log_debugx
	ldr	w0, [x21, #8]
	bl	_rchap_new
	mov	x25, x0
	mov	x1, x23
	mov	x2, x24
	bl	_rchap_receive
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x22
	mov	w1, #2
	mov	w2, #7
	bl	_login_send_error
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_log_errx
LBB0_7:
	mov	x0, x25
	bl	_rchap_get_response
	mov	x22, x0
	mov	x0, x25
	bl	_rchap_delete
	bl	_keys_new
	mov	x23, x0
	ldr	x2, [x21]
Lloh16:
	adrp	x1, l_.str.7@PAGE
Lloh17:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_keys_add
Lloh18:
	adrp	x1, l_.str.8@PAGE
Lloh19:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x23
	mov	x2, x22
	bl	_keys_add
	mov	x0, x22
	bl	_free
	mov	x0, x23
	mov	x1, x19
	bl	_keys_save
	mov	x0, x23
	bl	_keys_delete
	b	LBB0_9
LBB0_8:
Lloh20:
	adrp	x0, l_.str.9@PAGE
Lloh21:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_log_debugx
LBB0_9:
	mov	x0, x20
	bl	_keys_delete
	mov	x0, x19
	bl	_pdu_send
	mov	x0, x19
	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
	add	sp, sp, #96
	b	_pdu_delete
LBB0_10:
	mov	x0, x22
	mov	w1, #2
	mov	w2, #7
	bl	_login_send_error
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_log_errx
	cbnz	x24, LBB0_3
LBB0_11:
	mov	x0, x22
	mov	w1, #2
	mov	w2, #7
	bl	_login_send_error
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_log_errx
	b	LBB0_3
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_BHSLR_STAGE_OPERATIONAL_NEGOTIATION,4,2 ; @BHSLR_STAGE_OPERATIONAL_NEGOTIATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CHAP_I"

l_.str.1:                               ; @.str.1
	.asciz	"CHAP_C"

l_.str.2:                               ; @.str.2
	.asciz	"initiator requested target authentication, but didn't send CHAP_I"

l_.str.3:                               ; @.str.3
	.asciz	"initiator requested target authentication, but didn't send CHAP_C"

	.comm	_AG_TYPE_CHAP_MUTUAL,8,3        ; @AG_TYPE_CHAP_MUTUAL
l_.str.4:                               ; @.str.4
	.asciz	"initiator requests target authentication for user \"%s\", but mutual user/secret is not set"

l_.str.5:                               ; @.str.5
	.asciz	"performing mutual authentication as user \"%s\""

l_.str.6:                               ; @.str.6
	.asciz	"received CHAP Login PDU with malformed CHAP_I or CHAP_C"

l_.str.7:                               ; @.str.7
	.asciz	"CHAP_N"

l_.str.8:                               ; @.str.8
	.asciz	"CHAP_R"

l_.str.9:                               ; @.str.9
	.asciz	"initiator did not request target authentication"

	.no_dead_strip	_login_send_chap_success
.subsections_via_symbols
