	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function writeTimeLineHistoryFile
_writeTimeLineHistoryFile:              ## @writeTimeLineHistoryFile
	.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
	subq	$24, %rsp
	.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, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdx, %rdi
	callq	_strlen
	movl	%eax, %r15d
	movq	_MAXFNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_TLHistoryFileName
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%r13), %rsi
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rdx
	callq	_pg_log_error
LBB0_12:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_2:
	movl	%r15d, %ebx
	movq	16(%r13), %rax
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	*24(%rax)
	movq	16(%r13), %rcx
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	*16(%rcx)
	movq	16(%r13), %rcx
	cmpl	%eax, %ebx
	jne	LBB0_8
## %bb.4:
	movq	_CLOSE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	*8(%rcx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	16(%r13), %rcx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	*(%rcx)
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	callq	*(%rcx)
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_pg_log_error
	jmp	LBB0_13
LBB0_8:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	*(%rcx)
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_pg_log_error
	movq	16(%r13), %rax
	movq	_CLOSE_UNLINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	*8(%rax)
	jmp	LBB0_13
LBB0_9:
	cmpq	$0, 8(%r13)
	je	LBB0_11
## %bb.10:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mark_file_as_archived
	testl	%eax, %eax
	je	LBB0_12
LBB0_11:
	movl	$1, %r15d
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXFNAMELEN,4,2                ## @MAXFNAMELEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"server reported unexpected history file name for timeline %u: %s"

L_.str.1:                               ## @.str.1
	.asciz	".tmp"

L_.str.2:                               ## @.str.2
	.asciz	"could not create timeline history file \"%s\": %s"

L_.str.3:                               ## @.str.3
	.asciz	"could not write timeline history file \"%s\": %s"

	.comm	_CLOSE_UNLINK,4,2               ## @CLOSE_UNLINK
	.comm	_CLOSE_NORMAL,4,2               ## @CLOSE_NORMAL
L_.str.4:                               ## @.str.4
	.asciz	"could not close file \"%s\": %s"

	.no_dead_strip	_writeTimeLineHistoryFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function writeTimeLineHistoryFile
_writeTimeLineHistoryFile:              ; @writeTimeLineHistoryFile
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	x0, x2
	bl	_strlen
	mov	x22, x0
Lloh3:
	adrp	x8, _MAXFNAMELEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXFNAMELEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x1, [x19]
	mov	x0, x20
	bl	_TLHistoryFileName
	mov	x0, x20
	mov	x1, x23
	bl	_strcmp
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x1, [x19]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x23
	b	LBB0_8
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #24]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	blr	x8
	cbz	x0, LBB0_6
; %bb.3:
	mov	x23, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
	mov	x1, x21
	mov	x2, x22
	blr	x8
	cmp	w22, w0
	b.ne	LBB0_12
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
Lloh12:
	adrp	x9, _CLOSE_NORMAL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CLOSE_NORMAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	mov	x0, x23
	blr	x8
	cbz	x0, LBB0_13
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	blr	x8
	mov	x2, x0
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	blr	x8
	mov	x2, x0
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	mov	x1, x20
LBB0_8:
	bl	_pg_log_error
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.11:
	sub	sp, x29, #48
	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
LBB0_12:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	blr	x8
	mov	x2, x0
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_pg_log_error
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
Lloh24:
	adrp	x9, _CLOSE_UNLINK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _CLOSE_UNLINK@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x9]
	mov	x0, x23
	blr	x8
	b	LBB0_9
LBB0_13:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	x1, x20
	bl	_mark_file_as_archived
	cbz	w0, LBB0_10
LBB0_15:
	mov	w0, #1
	b	LBB0_10
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXFNAMELEN,4,2                ; @MAXFNAMELEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"server reported unexpected history file name for timeline %u: %s"

l_.str.1:                               ; @.str.1
	.asciz	".tmp"

l_.str.2:                               ; @.str.2
	.asciz	"could not create timeline history file \"%s\": %s"

l_.str.3:                               ; @.str.3
	.asciz	"could not write timeline history file \"%s\": %s"

	.comm	_CLOSE_UNLINK,4,2               ; @CLOSE_UNLINK
	.comm	_CLOSE_NORMAL,4,2               ; @CLOSE_NORMAL
l_.str.4:                               ; @.str.4
	.asciz	"could not close file \"%s\": %s"

	.no_dead_strip	_writeTimeLineHistoryFile
.subsections_via_symbols
