	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_binlog_start_pos           ## -- Begin function get_binlog_start_pos
	.p2align	4, 0x90
_get_binlog_start_pos:                  ## @get_binlog_start_pos
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$-1, %r15
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	testl	%esi, %esi
	js	LBB0_12
## %bb.2:
	movq	%rdi, %rbx
	cmpl	%esi, (%rdi)
	jle	LBB0_12
## %bb.3:
	movq	%rdx, %r14
	movq	8(%rbx), %rax
	movl	%esi, %r12d
	movq	(%rax,%r12,8), %rdi
	callq	_preload_file_info
	cmpl	$-2, %eax
	je	LBB0_12
## %bb.4:
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movl	%eax, %edi
	callq	_close
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
LBB0_6:
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rbx
	movq	(%rbx), %rax
	movq	_kfs_binlog@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.7:
	cmpq	$0, 8(%rbx)
	js	LBB0_9
## %bb.8:
	movq	16(%rbx), %rdi
	shrq	$63, %rdi
	xorl	$1, %edi
LBB0_9:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_assert
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movq	8(%rbx), %r15
	movq	%rbx, %rdi
	callq	_kfs_get_binlog_file_size
	addq	%r15, %rax
	movq	%rax, (%r14)
LBB0_11:
	movq	8(%rbx), %r15
LBB0_12:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kfs_binlog,8,3                 ## @kfs_binlog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_binlog_start_pos           ; -- Begin function get_binlog_start_pos
	.p2align	2
_get_binlog_start_pos:                  ; @get_binlog_start_pos
	.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	x20, x0
	mov	x0, #-1
	cbz	x20, LBB0_13
; %bb.1:
	mov	x21, x1
	tbnz	w1, #31, LBB0_13
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, w21
	b.le	LBB0_4
; %bb.3:
	mov	x19, x2
	ldr	x8, [x20, #8]
	ldr	x0, [x8, w21, uxtw #3]
	bl	_preload_file_info
	cmn	w0, #2
	b.ne	LBB0_5
LBB0_4:
	mov	x0, #-1
	b	LBB0_13
LBB0_5:
	mov	w21, w21
	tbnz	w0, #31, LBB0_7
; %bb.6:
	bl	_close
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
LBB0_7:
	ldr	x8, [x20, #8]
	ldr	x20, [x8, x21, lsl #3]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _kfs_binlog@GOTPAGE
Lloh1:
	ldr	x9, [x9, _kfs_binlog@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	ldr	x8, [x20, #8]
	tbnz	x8, #63, LBB0_10
; %bb.9:
	ldr	x8, [x20, #16]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	bl	_assert
	cbnz	x19, LBB0_11
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	bl	_assert
	cbz	x19, LBB0_12
LBB0_11:
	ldr	x21, [x20, #8]
	mov	x0, x20
	bl	_kfs_get_binlog_file_size
	add	x8, x0, x21
	str	x8, [x19]
LBB0_12:
	ldr	x0, [x20, #8]
LBB0_13:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_kfs_binlog,8,3                 ; @kfs_binlog
.subsections_via_symbols
