	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rpc_send_binlog_data           ## -- Begin function rpc_send_binlog_data
	.p2align	4, 0x90
_rpc_send_binlog_data:                  ## @rpc_send_binlog_data
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_vkprintf
	xorl	%eax, %eax
	testq	%r15, %r15
	je	LBB0_4
## %bb.1:
	movq	_BINLOG_POSITION@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	%r12, (%rbx)
	setg	%dil
	callq	_assert
	movq	(%rbx), %rbx
	subq	%r12, %rbx
	movq	_MAX_SEND_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	cmovgeq	%rax, %rbx
	movq	_Q@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	leal	4(%rbx), %ecx
	andl	$-4, %ecx
	testb	$3, %bl
	cmoveq	%rbx, %rcx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movslq	%ecx, %r13
	xorl	%edi, %edi
	cmpq	%rax, %r13
	setle	%dil
	callq	_assert
	addl	$32, %r13d
	movq	_RPC_TYPE_BINLOG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_rpc_create_query
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	_NODE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movq	%r15, (%r14)
	movq	%r12, 8(%r14)
	movl	%ebx, 16(%r14)
	movl	24(%r14), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_get_binlog_data
	testq	%rax, %rax
	movl	$0, %eax
	js	LBB0_4
## %bb.5:
	movq	%r12, %rdi
	callq	_get_crc64
	movl	%eax, 20(%r14)
	movq	%r15, %rdi
	callq	_get_relative_by_id
	movslq	(%rax), %r15
	xorl	%edi, %edi
	cmpq	$3, %r15
	setb	%dil
	callq	_assert
	movq	_STATS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rcx
	incl	(%rcx,%r15,4)
	movq	(%rax), %rcx
	addl	%ebx, (%rcx,%r15,4)
	incl	8(%rax)
	movq	%r14, %rdi
	movq	%r13, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rpc_send_query                 ## TAILCALL
LBB0_2:
	movl	$-1, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rpc_send_binlog_data: remote_id = %lld, pos = %lld\n"

	.comm	_BINLOG_POSITION,8,3            ## @BINLOG_POSITION
	.comm	_MAX_SEND_LEN,8,3               ## @MAX_SEND_LEN
	.comm	_Q,8,3                          ## @Q
	.comm	_RPC_TYPE_BINLOG_DATA,4,2       ## @RPC_TYPE_BINLOG_DATA
	.comm	_NODE_ID,4,2                    ## @NODE_ID
	.comm	_STATS,8,3                      ## @STATS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rpc_send_binlog_data           ; -- Begin function rpc_send_binlog_data
	.p2align	2
_rpc_send_binlog_data:                  ; @rpc_send_binlog_data
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x20
	mov	x3, x22
	bl	_vkprintf
	cbz	x20, LBB0_4
; %bb.1:
Lloh2:
	adrp	x21, _BINLOG_POSITION@GOTPAGE
Lloh3:
	ldr	x21, [x21, _BINLOG_POSITION@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, x22
	cset	w0, gt
	bl	_assert
	ldr	x8, [x21]
Lloh4:
	adrp	x9, _MAX_SEND_LEN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MAX_SEND_LEN@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	sub	x8, x8, x22
	cmp	x8, x9
	csel	x23, x8, x9, lt
Lloh7:
	adrp	x8, _Q@GOTPAGE
Lloh8:
	ldr	x8, [x8, _Q@GOTPAGEOFF]
Lloh9:
	ldr	x21, [x8]
	add	w8, w23, #4
	and	x8, x8, #0xfffffffc
	tst	w23, #0x3
	csel	x24, x23, x8, eq
	cmp	x9, w24, sxtw
	cset	w0, ge
	bl	_assert
	add	w1, w24, #32
Lloh10:
	adrp	x8, _RPC_TYPE_BINLOG_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RPC_TYPE_BINLOG_DATA@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, x19
	bl	_rpc_create_query
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh13:
	adrp	x8, _NODE_ID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NODE_ID@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x21, #28]
	stp	x20, x22, [x21]
	str	w23, [x21, #16]
	ldr	w0, [x21, #24]
	mov	x1, x22
	mov	x2, x23
	bl	_get_binlog_data
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	x0, x22
	bl	_get_crc64
	str	w0, [x21, #20]
	mov	x0, x20
	bl	_get_relative_by_id
	ldrsw	x20, [x0]
	cmp	x20, #3
	cset	w0, lo
	bl	_assert
Lloh16:
	adrp	x8, _STATS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STATS@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	x9, [x8, #16]
	lsl	x10, x20, #2
	ldr	w11, [x9, x10]
	add	w11, w11, #1
	str	w11, [x9, x10]
	ldr	x9, [x8]
	ldr	w11, [x9, x10]
	add	w11, w11, w23
	str	w11, [x9, x10]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	mov	x0, x21
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_rpc_send_query
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rpc_send_binlog_data: remote_id = %lld, pos = %lld\n"

	.comm	_BINLOG_POSITION,8,3            ; @BINLOG_POSITION
	.comm	_MAX_SEND_LEN,8,3               ; @MAX_SEND_LEN
	.comm	_Q,8,3                          ; @Q
	.comm	_RPC_TYPE_BINLOG_DATA,4,2       ; @RPC_TYPE_BINLOG_DATA
	.comm	_NODE_ID,4,2                    ; @NODE_ID
	.comm	_STATS,8,3                      ; @STATS
.subsections_via_symbols
