	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pgstat_write_db_statsfile
_pgstat_write_db_statsfile:             ## @pgstat_write_db_statsfile
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movl	8(%rdi), %r13d
	movq	_MAXPGPATH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%rbx), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	%r12d, %edi
	movl	$1, %esi
	movl	%r13d, %edx
	movq	%r14, %rcx
	movl	%ebx, %r8d
	callq	_get_dbstat_filename
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rbx
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r13d, -72(%rbp)                ## 4-byte Spill
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_get_dbstat_filename
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdx
	callq	_elog
	movq	_PG_BINARY_W@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_AllocateFile
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movq	_PGSTAT_FILE_FORMAT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	leaq	-76(%rbp), %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_fwrite
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movl	4(%rbx), %esi
	leaq	-84(%rbp), %r14
	movq	%r14, %rdi
	callq	_hash_seq_init
	movq	%r14, %rdi
	callq	_hash_seq_search
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %r12
	leaq	-84(%rbp), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$84, %edi
	movq	%r13, %rsi
	callq	_fputc
	movq	%r12, %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_fwrite
	movq	%r15, %rdi
	callq	_hash_seq_search
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movl	(%rbx), %esi
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_hash_seq_init
	movq	%rbx, %rdi
	callq	_hash_seq_search
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %rbx
	leaq	-80(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$70, %edi
	movq	%r13, %rsi
	callq	_fputc
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_fwrite
	movq	%r14, %rdi
	callq	_hash_seq_search
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_8:
	movl	$69, %edi
	movq	%r13, %rsi
	callq	_fputc
	movq	%r13, %rdi
	callq	_ferror
	testq	%rax, %rax
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_10
## %bb.9:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	%r13, %rdi
	callq	_FreeFile
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_1:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_18
LBB0_10:
	movq	%r13, %rdi
	callq	_FreeFile
	testq	%rax, %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	js	LBB0_11
## %bb.12:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_rename
	testq	%rax, %rax
	jns	LBB0_16
## %bb.13:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.4(%rip), %rdi
	movq	%r15, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_errmsg
	jmp	LBB0_14
LBB0_11:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_errmsg
LBB0_14:
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_15:
	movq	%r15, %rdi
	callq	_unlink
LBB0_16:
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.17:
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_get_dbstat_filename
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdx
	callq	_elog
	movq	%rbx, %rdi
	callq	_unlink
LBB0_18:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_DEBUG2,4,2                     ## @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"writing stats file \"%s\""

	.comm	_PG_BINARY_W,4,2                ## @PG_BINARY_W
	.comm	_LOG,4,2                        ## @LOG
L_.str.1:                               ## @.str.1
	.asciz	"could not open temporary statistics file \"%s\": %m"

	.comm	_PGSTAT_FILE_FORMAT_ID,4,2      ## @PGSTAT_FILE_FORMAT_ID
L_.str.2:                               ## @.str.2
	.asciz	"could not write temporary statistics file \"%s\": %m"

L_.str.3:                               ## @.str.3
	.asciz	"could not close temporary statistics file \"%s\": %m"

L_.str.4:                               ## @.str.4
	.asciz	"could not rename temporary statistics file \"%s\" to \"%s\": %m"

L_.str.5:                               ## @.str.5
	.asciz	"removing temporary stats file \"%s\""

	.no_dead_strip	_pgstat_write_db_statsfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pgstat_write_db_statsfile
_pgstat_write_db_statsfile:             ; @pgstat_write_db_statsfile
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x20, x1
	mov	x24, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	w19, [x0, #8]
Lloh3:
	adrp	x27, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x27, [x27, _MAXPGPATH@GOTPAGEOFF]
	ldr	w8, [x27]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w4, [x27]
	mov	x9, x4
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x4, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	mov	x0, x1
	mov	w1, #1
	mov	x2, x19
	mov	x3, x22
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_get_dbstat_filename
	ldr	w4, [x27]
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	mov	x3, x21
	bl	_get_dbstat_filename
Lloh9:
	adrp	x28, _DEBUG2@GOTPAGE
Lloh10:
	ldr	x28, [x28, _DEBUG2@GOTPAGEOFF]
	ldr	w0, [x28]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_elog
Lloh13:
	adrp	x8, _PG_BINARY_W@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PG_BINARY_W@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_AllocateFile
	cbz	x0, LBB0_9
; %bb.1:
	mov	x23, x0
Lloh16:
	adrp	x8, _PGSTAT_FILE_FORMAT_ID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PGSTAT_FILE_FORMAT_ID@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	stur	w8, [x29, #-100]
	sub	x0, x29, #100
	mov	w1, #4
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	ldr	w1, [x24, #4]
	sub	x0, x29, #92
	bl	_hash_seq_init
	sub	x0, x29, #92
	bl	_hash_seq_search
	cbz	x0, LBB0_4
; %bb.2:
	mov	x25, x0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #84
	mov	x1, x23
	bl	_fputc
	mov	x0, x25
	mov	w1, #4
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	sub	x0, x29, #92
	bl	_hash_seq_search
	mov	x25, x0
	cbnz	x0, LBB0_3
LBB0_4:
	ldr	w1, [x24]
	sub	x0, x29, #96
	bl	_hash_seq_init
	sub	x0, x29, #96
	bl	_hash_seq_search
	cbz	x0, LBB0_7
; %bb.5:
	mov	x24, x0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #70
	mov	x1, x23
	bl	_fputc
	mov	x0, x24
	mov	w1, #4
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	sub	x0, x29, #96
	bl	_hash_seq_search
	mov	x24, x0
	cbnz	x0, LBB0_6
LBB0_7:
	mov	w0, #69
	mov	x1, x23
	bl	_fputc
	mov	x0, x23
	bl	_ferror
	cbz	x0, LBB0_10
; %bb.8:
Lloh19:
	adrp	x8, _LOG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh21:
	ldr	w24, [x8]
	bl	_errcode_for_file_access
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_errmsg
	mov	x1, x0
	mov	x0, x24
	bl	_ereport
	mov	x0, x23
	bl	_FreeFile
	b	LBB0_15
LBB0_9:
Lloh24:
	adrp	x8, _LOG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh26:
	ldr	w19, [x8]
	bl	_errcode_for_file_access
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	b	LBB0_18
LBB0_10:
	mov	x0, x23
	bl	_FreeFile
	tbnz	x0, #63, LBB0_13
; %bb.11:
	mov	x0, x22
	mov	x1, x21
	bl	_rename
	tbz	x0, #63, LBB0_16
; %bb.12:
Lloh29:
	adrp	x8, _LOG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh31:
	ldr	w23, [x8]
	bl	_errcode_for_file_access
	str	x21, [sp, #-16]!
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_errmsg
	add	sp, sp, #16
	b	LBB0_14
LBB0_13:
Lloh34:
	adrp	x8, _LOG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh36:
	ldr	w23, [x8]
	bl	_errcode_for_file_access
Lloh37:
	adrp	x0, l_.str.3@PAGE
Lloh38:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_errmsg
LBB0_14:
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_15:
	mov	x0, x22
	bl	_unlink
LBB0_16:
	cbz	w20, LBB0_18
; %bb.17:
	ldr	w4, [x27]
	mov	w0, #0
	mov	w1, #0
	mov	x2, x19
	mov	x3, x21
	bl	_get_dbstat_filename
	ldr	w0, [x28]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x21
	bl	_elog
	mov	x0, x21
	bl	_unlink
LBB0_18:
	mov	sp, x26
	ldur	x8, [x29, #-88]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_DEBUG2,4,2                     ; @DEBUG2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"writing stats file \"%s\""

	.comm	_PG_BINARY_W,4,2                ; @PG_BINARY_W
	.comm	_LOG,4,2                        ; @LOG
l_.str.1:                               ; @.str.1
	.asciz	"could not open temporary statistics file \"%s\": %m"

	.comm	_PGSTAT_FILE_FORMAT_ID,4,2      ; @PGSTAT_FILE_FORMAT_ID
l_.str.2:                               ; @.str.2
	.asciz	"could not write temporary statistics file \"%s\": %m"

l_.str.3:                               ; @.str.3
	.asciz	"could not close temporary statistics file \"%s\": %m"

l_.str.4:                               ; @.str.4
	.asciz	"could not rename temporary statistics file \"%s\" to \"%s\": %m"

l_.str.5:                               ; @.str.5
	.asciz	"removing temporary stats file \"%s\""

	.no_dead_strip	_pgstat_write_db_statsfile
.subsections_via_symbols
