	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function login_chap
_login_chap:                            ## @login_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_log_debugx
	movq	%r15, %rdi
	callq	_login_send_chap_a
	leaq	L_.str.1(%rip), %rdi
	callq	_log_debugx
	movq	%r15, %rdi
	callq	_login_receive
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rdi
	callq	_log_debugx
	movq	%rbx, %rdi
	callq	_login_send_chap_r
	movq	%rbx, %rdi
	callq	_pdu_delete
	leaq	L_.str.3(%rip), %rdi
	callq	_log_debugx
	movq	%r15, %rdi
	callq	_login_receive
	movq	%rax, %r14
	movq	(%r15), %rax
	cmpb	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_login_verify_mutual
LBB0_2:
	movq	%r14, %rdi
	callq	_pdu_delete
	leaq	L_.str.4(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_log_debugx                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"beginning CHAP authentication; sending CHAP_A"

L_.str.1:                               ## @.str.1
	.asciz	"waiting for CHAP_A/CHAP_C/CHAP_I"

L_.str.2:                               ## @.str.2
	.asciz	"sending CHAP_N/CHAP_R"

L_.str.3:                               ## @.str.3
	.asciz	"waiting for CHAP result"

L_.str.4:                               ## @.str.4
	.asciz	"CHAP authentication done"

	.no_dead_strip	_login_chap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function login_chap
_login_chap:                            ; @login_chap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_debugx
	mov	x0, x20
	bl	_login_send_chap_a
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_debugx
	mov	x0, x20
	bl	_login_receive
	mov	x19, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_log_debugx
	mov	x0, x19
	bl	_login_send_chap_r
	mov	x0, x19
	bl	_pdu_delete
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_log_debugx
	mov	x0, x20
	bl	_login_receive
	mov	x19, x0
	ldr	x8, [x20]
	ldrb	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_login_verify_mutual
LBB0_2:
	mov	x0, x19
	bl	_pdu_delete
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_log_debugx
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"beginning CHAP authentication; sending CHAP_A"

l_.str.1:                               ; @.str.1
	.asciz	"waiting for CHAP_A/CHAP_C/CHAP_I"

l_.str.2:                               ; @.str.2
	.asciz	"sending CHAP_N/CHAP_R"

l_.str.3:                               ; @.str.3
	.asciz	"waiting for CHAP result"

l_.str.4:                               ; @.str.4
	.asciz	"CHAP authentication done"

	.no_dead_strip	_login_chap
.subsections_via_symbols
