	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chap_Challenge
_chap_Challenge:                        ## @chap_Challenge
	.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, %rbx
	callq	_auth2chap
	movq	%rax, %r14
	movq	_LogDEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_log_Printf
	movq	8(%rbx), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_strlen
	movl	%eax, %r15d
	movq	(%r14), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_chap_ChallengeInit
LBB0_2:
	movq	8(%rbx), %rdi
	movslq	%r15d, %rax
	incq	%rax
	cmpl	$129, (%rdi)
	movq	_CHAP_CHALLENGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rbx), %edx
	movl	$1, %r8d
	cmovneq	%rax, %r8
	movq	(%r14), %rcx
	addq	(%rcx), %r8
	xorl	%r9d, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ChapOutput                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LogDEBUG,4,2                   ## @LogDEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CHAP%02X: Challenge\n"

	.comm	_CHAP_CHALLENGE,4,2             ## @CHAP_CHALLENGE
	.no_dead_strip	_chap_Challenge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chap_Challenge
_chap_Challenge:                        ; @chap_Challenge
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_auth2chap
	mov	x20, x0
Lloh0:
	adrp	x8, _LogDEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LogDEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_Printf
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_strlen
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_chap_ChallengeInit
LBB0_2:
	ldr	x0, [x19, #8]
	ldr	w8, [x0]
Lloh5:
	adrp	x9, _CHAP_CHALLENGE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHAP_CHALLENGE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	ldr	w2, [x19]
	ldr	x3, [x20]
	ldr	x9, [x3]
	sxtw	x10, w21
	cmp	w8, #129
	mov	w8, #1
	csinc	x8, x8, x10, eq
	add	x4, x9, x8
	mov	x5, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ChapOutput
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LogDEBUG,4,2                   ; @LogDEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CHAP%02X: Challenge\n"

	.comm	_CHAP_CHALLENGE,4,2             ; @CHAP_CHALLENGE
	.no_dead_strip	_chap_Challenge
.subsections_via_symbols
