	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fork_write_index               ## -- Begin function fork_write_index
	.p2align	4, 0x90
_fork_write_index:                      ## @fork_write_index
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_child_pid@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_vkprintf                       ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	callq	_flush_binlog_ts
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	je	LBB0_7
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_vkprintf
	movl	%ebx, (%r14)
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_kprintf
LBB0_5:
	movq	_force_write_index@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movq	_binlogname@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_sfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_close
	movq	_binlog_disabled@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_write_index
	movl	%eax, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_child_pid,4,2                  ## @child_pid
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"process with pid %d already generates index, skipping\n"

L_.str.1:                               ## @.str.1
	.asciz	"fork: %m\n"

	.comm	_binlogname,8,3                 ## @binlogname
	.comm	_sfd,4,2                        ## @sfd
	.comm	_binlog_disabled,4,2            ## @binlog_disabled
L_.str.2:                               ## @.str.2
	.asciz	"created child process pid = %d\n"

	.comm	_force_write_index,8,3          ## @force_write_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fork_write_index               ; -- Begin function fork_write_index
	.p2align	2
_fork_write_index:                      ; @fork_write_index
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _child_pid@GOTPAGE
Lloh1:
	ldr	x20, [x20, _child_pid@GOTPAGEOFF]
	ldr	w2, [x20]
	cbz	w2, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_vkprintf
LBB0_2:
	bl	_flush_binlog_ts
	bl	_fork
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x19, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_vkprintf
	str	w19, [x20]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_kprintf
LBB0_6:
Lloh8:
	adrp	x8, _force_write_index@GOTPAGE
Lloh9:
	ldr	x8, [x8, _force_write_index@GOTPAGEOFF]
Lloh10:
	str	xzr, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh11:
	adrp	x8, _binlogname@GOTPAGE
Lloh12:
	ldr	x8, [x8, _binlogname@GOTPAGEOFF]
Lloh13:
	str	xzr, [x8]
Lloh14:
	adrp	x8, _sfd@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sfd@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_close
Lloh17:
	adrp	x8, _binlog_disabled@GOTPAGE
Lloh18:
	ldr	x8, [x8, _binlog_disabled@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_write_index
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_child_pid,4,2                  ; @child_pid
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"process with pid %d already generates index, skipping\n"

l_.str.1:                               ; @.str.1
	.asciz	"fork: %m\n"

	.comm	_binlogname,8,3                 ; @binlogname
	.comm	_sfd,4,2                        ; @sfd
	.comm	_binlog_disabled,4,2            ; @binlog_disabled
l_.str.2:                               ; @.str.2
	.asciz	"created child process pid = %d\n"

	.comm	_force_write_index,8,3          ; @force_write_index
.subsections_via_symbols
