	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_process_handshake_ok_packet    ## -- Begin function process_handshake_ok_packet
	.p2align	4, 0x90
_process_handshake_ok_packet:           ## @process_handshake_ok_packet
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	40(%rsi), %edi
	xorl	%esi, %esi
	callq	_get_client_by_handshake
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_show_remote_ip
	movl	(%r14), %ecx
	movl	40(%rbx), %r8d
	movq	32(%rbx), %r9
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	callq	_vkprintf
	testq	%r15, %r15
	je	LBB0_1
## %bb.3:
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.4:
	movl	40(%rbx), %esi
	movq	32(%rbx), %rdx
	movq	_R_ERROR_EBADFD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %r8
	jmp	LBB0_2
LBB0_1:
	movl	40(%rbx), %esi
	movq	32(%rbx), %rdx
	movq	_R_ERROR_EBADFD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %r8
	jmp	LBB0_2
LBB0_5:
	movq	16(%r15), %r12
	movq	32(%rbx), %rax
	movq	%rax, 8(%r15)
	movq	(%rbx), %rdx
	movq	8(%rbx), %rax
	cmpq	%rax, %rdx
	jg	LBB0_13
## %bb.6:
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rcx
	cmpq	%rcx, %rsi
	jg	LBB0_13
## %bb.7:
	cmpq	%rax, %rcx
	jl	LBB0_13
## %bb.8:
	cmpq	%rdx, %rsi
	jl	LBB0_13
## %bb.9:
	testq	%rdx, %rdx
	js	LBB0_13
## %bb.10:
	testq	%rax, %rax
	js	LBB0_13
## %bb.11:
	cmpq	%rdx, %rsi
	jle	LBB0_14
## %bb.12:
	cmpq	%rax, %rsi
	jge	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_destroy_client
	movl	40(%rbx), %esi
	movq	32(%rbx), %rdx
	movq	_R_ERROR_EBADSLICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %r8
LBB0_2:
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_error                     ## TAILCALL
LBB0_14:
	cmpq	$0, 16(%r12)
	je	LBB0_20
## %bb.15:
	cmpq	%rdx, (%r12)
	jne	LBB0_17
## %bb.16:
	movq	8(%r12), %rdx
	cmpq	%rax, %rdx
	jg	LBB0_17
## %bb.18:
	cmpq	%rdx, %rcx
	jne	LBB0_21
## %bb.19:
	movq	_RC_UPTODATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	jmp	LBB0_21
LBB0_20:
	testq	%rdx, %rdx
	je	LBB0_21
LBB0_17:
	movq	%r15, %rdi
	callq	_destroy_client
	movl	40(%rbx), %esi
	movq	32(%rbx), %rdx
	movq	_R_ERROR_EBADSLICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	(%r12), %r9
	movq	8(%r12), %rax
	movups	(%rbx), %xmm0
	movups	%xmm0, 8(%rsp)
	movq	%rax, (%rsp)
	leaq	L_.str.4(%rip), %r8
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_send_error
	jmp	LBB0_22
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"received handshake acknowledgement packet from %s:%d, session %d:%d, current slice %lld..%lld, last slice %lld..%lld\n"

	.comm	_R_ERROR_EBADFD,4,2             ## @R_ERROR_EBADFD
L_.str.1:                               ## @.str.1
	.asciz	"unknown handshake id"

L_.str.2:                               ## @.str.2
	.asciz	"handshake already complete for this id"

	.comm	_R_ERROR_EBADSLICE,4,2          ## @R_ERROR_EBADSLICE
L_.str.3:                               ## @.str.3
	.asciz	"invalid binlog start/end positions"

L_.str.4:                               ## @.str.4
	.asciz	"binlog start/end positions mismatch: client %lld..%lld, server %lld..%lld"

	.comm	_RC_UPTODATE,4,2                ## @RC_UPTODATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_process_handshake_ok_packet    ; -- Begin function process_handshake_ok_packet
	.p2align	2
_process_handshake_ok_packet:           ; @process_handshake_ok_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #40]
	mov	w1, #0
	bl	_get_client_by_handshake
	mov	x21, x0
	mov	x0, x19
	bl	_show_remote_ip
	mov	x2, x0
	ldr	w3, [x19]
	ldr	w4, [x20, #40]
	ldp	x9, x5, [x20, #24]
	ldp	x6, x7, [x20]
	ldr	x8, [x20, #16]
	stp	x8, x9, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vkprintf
	cbz	x21, LBB0_3
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w1, [x20, #40]
	ldr	x2, [x20, #32]
Lloh2:
	adrp	x8, _R_ERROR_EBADFD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R_ERROR_EBADFD@GOTPAGEOFF]
Lloh4:
	adrp	x4, l_.str.2@PAGE
Lloh5:
	add	x4, x4, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_3:
	ldr	w1, [x20, #40]
	ldr	x2, [x20, #32]
Lloh6:
	adrp	x8, _R_ERROR_EBADFD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R_ERROR_EBADFD@GOTPAGEOFF]
Lloh8:
	adrp	x4, l_.str.1@PAGE
Lloh9:
	add	x4, x4, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_4:
	ldr	x22, [x21, #16]
	ldr	x8, [x20, #32]
	str	x8, [x21, #8]
	ldp	x10, x8, [x20]
	cmp	x10, x8
	b.gt	LBB0_12
; %bb.5:
	ldp	x11, x9, [x20, #16]
	cmp	x11, x9
	b.gt	LBB0_12
; %bb.6:
	cmp	x9, x8
	b.lt	LBB0_12
; %bb.7:
	cmp	x11, x10
	b.lt	LBB0_12
; %bb.8:
	tbnz	x10, #63, LBB0_12
; %bb.9:
	tbnz	x8, #63, LBB0_12
; %bb.10:
	cmp	x11, x10
	b.le	LBB0_14
; %bb.11:
	cmp	x11, x8
	b.ge	LBB0_14
LBB0_12:
	mov	x0, x21
	bl	_destroy_client
	ldr	w1, [x20, #40]
	ldr	x2, [x20, #32]
Lloh10:
	adrp	x8, _R_ERROR_EBADSLICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _R_ERROR_EBADSLICE@GOTPAGEOFF]
Lloh12:
	adrp	x4, l_.str.3@PAGE
Lloh13:
	add	x4, x4, l_.str.3@PAGEOFF
LBB0_13:
	ldr	w3, [x8]
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_send_error
LBB0_14:
	ldr	x11, [x22, #16]
	cbz	x11, LBB0_19
; %bb.15:
	ldr	x11, [x22]
	cmp	x11, x10
	b.ne	LBB0_20
; %bb.16:
	ldr	x10, [x22, #8]
	cmp	x10, x8
	b.gt	LBB0_20
; %bb.17:
	cmp	x9, x10
	b.ne	LBB0_21
; %bb.18:
Lloh14:
	adrp	x8, _RC_UPTODATE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RC_UPTODATE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
	b	LBB0_21
LBB0_19:
	cbz	x10, LBB0_21
LBB0_20:
	mov	x0, x21
	bl	_destroy_client
	ldr	w1, [x20, #40]
Lloh17:
	adrp	x8, _R_ERROR_EBADSLICE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _R_ERROR_EBADSLICE@GOTPAGEOFF]
	ldr	x2, [x20, #32]
Lloh19:
	ldr	w3, [x8]
	ldp	x8, x9, [x22]
	ldp	x10, x11, [x20]
	stp	x10, x11, [sp, #16]
Lloh20:
	adrp	x4, l_.str.4@PAGE
Lloh21:
	add	x4, x4, l_.str.4@PAGEOFF
	stp	x8, x9, [sp]
	mov	x0, x19
	bl	_send_error
	b	LBB0_22
LBB0_21:
	mov	w0, #0
LBB0_22:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"received handshake acknowledgement packet from %s:%d, session %d:%d, current slice %lld..%lld, last slice %lld..%lld\n"

	.comm	_R_ERROR_EBADFD,4,2             ; @R_ERROR_EBADFD
l_.str.1:                               ; @.str.1
	.asciz	"unknown handshake id"

l_.str.2:                               ; @.str.2
	.asciz	"handshake already complete for this id"

	.comm	_R_ERROR_EBADSLICE,4,2          ; @R_ERROR_EBADSLICE
l_.str.3:                               ; @.str.3
	.asciz	"invalid binlog start/end positions"

l_.str.4:                               ; @.str.4
	.asciz	"binlog start/end positions mismatch: client %lld..%lld, server %lld..%lld"

	.comm	_RC_UPTODATE,4,2                ; @RC_UPTODATE
.subsections_via_symbols
