	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tsrp_server_authenticate       ## -- Begin function tsrp_server_authenticate
	.p2align	4, 0x90
_tsrp_server_authenticate:              ## @tsrp_server_authenticate
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXUSERLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_MAXPARAMLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	1(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	%r13d, %edi
	movq	%r12, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_14
## %bb.1:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movzbl	(%r12), %r15d
	movq	_MSG_WAITALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_14
## %bb.2:
	movb	$0, (%r14,%r15)
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_t_serveropen
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %r15
	movb	(%rax), %al
	movb	%al, (%r12)
	movl	8(%r15), %ebx
	movb	%bl, 1(%r12)
	leaq	2(%r12), %rdi
	movq	16(%r15), %rsi
	movl	%ebx, %edx
	callq	_memcpy
	addl	$2, %ebx
	movl	%r13d, %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	callq	_send
	testq	%rax, %rax
	js	LBB0_14
## %bb.4:
	movq	%r15, %rdi
	callq	_t_servergenexp
	movq	%rax, %r14
	xorl	%ebx, %ebx
	movl	%r13d, %edi
	movq	%r12, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_14
## %bb.5:
	movb	(%r12), %al
	incb	%al
	movb	%al, -88(%rbp)
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, -80(%rbp)
	movzbl	%al, %edx
	movq	_MSG_WAITALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_14
## %bb.6:
	movq	%r12, %rdi
	incq	%rdi
	movb	(%r14), %al
	decb	%al
	movb	%al, (%r12)
	movq	8(%r14), %rsi
	movzbl	(%r14), %edx
	callq	_memcpy
	movzbl	(%r14), %edx
	incl	%edx
	xorl	%ebx, %ebx
	movl	%r13d, %edi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_send
	testq	%rax, %rax
	js	LBB0_14
## %bb.7:
	leaq	-88(%rbp), %rsi
	movq	%r15, %rdi
	callq	_t_servergetkey
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_RESPONSE_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	_MSG_WAITALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	movq	%r12, %rsi
	callq	_recv
	testl	%eax, %eax
	jle	LBB0_14
## %bb.9:
	movq	%r15, %rbx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_t_serververify
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	callq	_t_serverresponse
	movl	(%r14), %edx
	xorl	%ebx, %ebx
	movl	%r13d, %edi
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	callq	_send
	testq	%rax, %rax
	js	LBB0_14
## %bb.11:
	movq	%r15, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.12:
	movq	(%rbx), %r13
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_memcpy
	movq	8(%rbx), %rdi
	movq	_SESSION_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movq	%r15, %rdi
LBB0_13:
	callq	_t_serverclose
	movl	$1, %ebx
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXUSERLEN,4,2                 ## @MAXUSERLEN
	.comm	_MAXPARAMLEN,4,2                ## @MAXPARAMLEN
	.comm	_MSG_WAITALL,4,2                ## @MSG_WAITALL
	.comm	_RESPONSE_LEN,4,2               ## @RESPONSE_LEN
	.comm	_SESSION_KEY_LEN,4,2            ## @SESSION_KEY_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tsrp_server_authenticate       ; -- Begin function tsrp_server_authenticate
	.p2align	2
_tsrp_server_authenticate:              ; @tsrp_server_authenticate
	.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, #32
	mov	x19, x1
	mov	x21, 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, _MAXUSERLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXUSERLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	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, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x8, _MAXPARAMLEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAXPARAMLEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	add	w12, w8, #1
	mov	x9, x12
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x12, #15
	and	x10, x10, #0x1fffffff0
	sub	x23, x9, x10
	mov	sp, x23
	mov	x9, x8
Lloh13:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh14:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	mov	x1, x23
	mov	w2, #1
	mov	w3, #0
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.1:
	ldrb	w22, [x23]
Lloh15:
	adrp	x27, _MSG_WAITALL@GOTPAGE
Lloh16:
	ldr	x27, [x27, _MSG_WAITALL@GOTPAGEOFF]
	ldr	w3, [x27]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.2:
	strb	wzr, [x20, x22]
	mov	x0, x20
	bl	_t_serveropen
	cbz	x0, LBB0_11
; %bb.3:
	mov	x22, x0
	ldrb	w8, [x0]
	mov	x0, x23
	strb	w8, [x0], #2
	ldr	w26, [x22, #8]
	mov	x25, x23
	strb	w26, [x25, #1]!
	ldr	x1, [x22, #16]
	mov	x2, x26
	bl	_memcpy
	add	w2, w26, #2
	mov	x0, x21
	mov	x1, x23
	mov	w3, #0
	bl	_send
	tbnz	x0, #63, LBB0_10
; %bb.4:
	mov	x0, x22
	bl	_t_servergenexp
	mov	x26, x0
	mov	x0, x21
	mov	x1, x23
	mov	w2, #1
	mov	w3, #0
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.5:
	ldrb	w8, [x23]
	add	w8, w8, #1
	sturb	w8, [x29, #-104]
	stur	x24, [x29, #-96]
	and	w2, w8, #0xff
	ldr	w3, [x27]
	mov	x0, x21
	mov	x1, x24
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.6:
	ldrb	w8, [x26]
	sub	w8, w8, #1
	strb	w8, [x23]
	ldr	x1, [x26, #8]
	ldrb	w2, [x26]
	mov	x0, x25
	bl	_memcpy
	ldrb	w8, [x26]
	add	w2, w8, #1
	mov	x0, x21
	mov	x1, x23
	mov	w3, #0
	bl	_send
	tbnz	x0, #63, LBB0_10
; %bb.7:
	sub	x1, x29, #104
	mov	x0, x22
	bl	_t_servergetkey
	cbz	x0, LBB0_11
; %bb.8:
	mov	x24, x0
Lloh17:
	adrp	x25, _RESPONSE_LEN@GOTPAGE
Lloh18:
	ldr	x25, [x25, _RESPONSE_LEN@GOTPAGEOFF]
	ldr	w2, [x25]
	ldr	w3, [x27]
	mov	x0, x21
	mov	x1, x23
	bl	_recv
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.9:
	mov	x0, x22
	mov	x1, x23
	bl	_t_serververify
	cbz	x0, LBB0_13
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.12:
	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_13:
	mov	x0, x22
	bl	_t_serverresponse
	mov	x1, x0
	ldr	w2, [x25]
	mov	x0, x21
	mov	w3, #0
	bl	_send
	tbnz	x0, #63, LBB0_10
; %bb.14:
	cbz	x19, LBB0_16
; %bb.15:
	ldr	x21, [x19]
	mov	x0, x20
	bl	_strlen
	add	w2, w0, #1
	mov	x0, x21
	mov	x1, x20
	bl	_memcpy
	ldr	x0, [x19, #8]
Lloh22:
	adrp	x8, _SESSION_KEY_LEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SESSION_KEY_LEN@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x1, x24
	bl	_memcpy
LBB0_16:
	mov	x0, x22
	bl	_t_serverclose
	mov	w0, #1
	b	LBB0_11
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXUSERLEN,4,2                 ; @MAXUSERLEN
	.comm	_MAXPARAMLEN,4,2                ; @MAXPARAMLEN
	.comm	_MSG_WAITALL,4,2                ; @MSG_WAITALL
	.comm	_RESPONSE_LEN,4,2               ; @RESPONSE_LEN
	.comm	_SESSION_KEY_LEN,4,2            ; @SESSION_KEY_LEN
.subsections_via_symbols
