	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_binlog_position         ## -- Begin function update_binlog_position
	.p2align	4, 0x90
_update_binlog_position:                ## @update_binlog_position
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_BINLOG_BUFFER_FD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-24(%rbp), %rsi
	callq	_fstat
	movq	_BINLOG_POSITION@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	movq	-24(%rbp), %rax
	movq	%rax, (%r14)
	movq	_MAX_BINLOG_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	callq	_assert
	movq	(%r14), %rdx
	cmpq	%rbx, %rdx
	jne	LBB0_2
## %bb.1:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_LOG_BINLOG_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_log_event
	movq	%rbx, %rdi
	callq	_update_crc64
	movq	%rbx, %rdi
	callq	_update_binlog_buffer
	xorl	%eax, %eax
	callq	_get_double_time_since_epoch
	movq	_STATS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_send_friends_binlog_position   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BINLOG_BUFFER_FD,4,2           ## @BINLOG_BUFFER_FD
	.comm	_BINLOG_POSITION,8,3            ## @BINLOG_POSITION
	.comm	_MAX_BINLOG_SIZE,8,3            ## @MAX_BINLOG_SIZE
	.comm	_LOG_BINLOG_UPDATED,4,2         ## @LOG_BINLOG_UPDATED
	.comm	_STATS,8,3                      ## @STATS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_update_binlog_position         ; -- Begin function update_binlog_position
	.p2align	2
_update_binlog_position:                ; @update_binlog_position
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _BINLOG_BUFFER_FD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BINLOG_BUFFER_FD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_fstat
Lloh3:
	adrp	x20, _BINLOG_POSITION@GOTPAGE
Lloh4:
	ldr	x20, [x20, _BINLOG_POSITION@GOTPAGEOFF]
	ldr	x19, [x20]
	ldr	x8, [sp, #8]
	str	x8, [x20]
Lloh5:
	adrp	x9, _MAX_BINLOG_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_BINLOG_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x2, [x20]
	cmp	x2, x19
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
Lloh8:
	adrp	x8, _LOG_BINLOG_UPDATED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_BINLOG_UPDATED@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_log_event
	mov	x0, x19
	bl	_update_crc64
	mov	x0, x19
	bl	_update_binlog_buffer
	bl	_get_double_time_since_epoch
Lloh11:
	adrp	x8, _STATS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STATS@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_send_friends_binlog_position
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BINLOG_BUFFER_FD,4,2           ; @BINLOG_BUFFER_FD
	.comm	_BINLOG_POSITION,8,3            ; @BINLOG_POSITION
	.comm	_MAX_BINLOG_SIZE,8,3            ; @MAX_BINLOG_SIZE
	.comm	_LOG_BINLOG_UPDATED,4,2         ; @LOG_BINLOG_UPDATED
	.comm	_STATS,8,3                      ; @STATS
.subsections_via_symbols
