	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsync_fname_ext
_fsync_fname_ext:                       ## @fsync_fname_ext
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_PG_BINARY@GOTPCREL(%rip), %rax
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_OpenTransientFile
	movl	%eax, %ebx
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.4:
	testl	%ebx, %ebx
	jns	LBB0_7
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_EISDIR@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	je	LBB0_20
## %bb.6:
	movq	_EACCES@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_20
LBB0_7:
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.8:
	testl	%ebx, %ebx
	jns	LBB0_10
## %bb.9:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_EACCES@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	je	LBB0_20
LBB0_10:
	testl	%ebx, %ebx
	js	LBB0_11
## %bb.12:
	movl	%ebx, %edi
	callq	_pg_fsync
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.14:
	movq	_EBADF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_17
## %bb.15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_17
LBB0_16:
	movl	%ebx, %edi
	movq	%rcx, %rbx
	callq	_CloseTransientFile
	movl	%r13d, (%rbx)
	leaq	L_.str.1(%rip), %rbx
	jmp	LBB0_19
LBB0_11:
	leaq	L_.str(%rip), %rbx
	jmp	LBB0_19
LBB0_17:
	movl	%ebx, %edi
	callq	_CloseTransientFile
	testq	%rax, %rax
	je	LBB0_21
## %bb.18:
	leaq	L_.str.2(%rip), %rbx
LBB0_19:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
	movl	$-1, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_BINARY,4,2                  ## @PG_BINARY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_errno,4,2                      ## @errno
	.comm	_EISDIR,4,2                     ## @EISDIR
	.comm	_EACCES,4,2                     ## @EACCES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open file \"%s\": %m"

	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"could not fsync file \"%s\": %m"

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

	.no_dead_strip	_fsync_fname_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsync_fname_ext
_fsync_fname_ext:                       ; @fsync_fname_ext
	.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
	mov	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PG_BINARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PG_BINARY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_RDONLY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_RDONLY@GOTPAGEOFF]
Lloh5:
	adrp	x10, _O_RDWR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _O_RDWR@GOTPAGEOFF]
	cmp	w1, #0
	csel	x9, x9, x10, ne
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_OpenTransientFile
	mov	x21, x0
	cbz	w22, LBB0_3
; %bb.1:
	tbz	w21, #31, LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _EISDIR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EISDIR@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _EACCES@GOTPAGE
Lloh14:
	ldr	x10, [x10, _EACCES@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.eq	LBB0_6
LBB0_3:
	cbz	w23, LBB0_7
; %bb.4:
	tbz	w21, #31, LBB0_7
; %bb.5:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _EACCES@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EACCES@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_16
LBB0_7:
	tbnz	w21, #31, LBB0_13
; %bb.8:
	mov	x0, x21
	bl	_pg_fsync
	cbz	w0, LBB0_11
; %bb.9:
Lloh22:
	adrp	x23, _errno@GOTPAGE
Lloh23:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	ldr	w24, [x23]
	cbz	w22, LBB0_14
; %bb.10:
Lloh24:
	adrp	x8, _EBADF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _EINVAL@GOTPAGE
Lloh28:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	cmp	w24, w8
	ccmp	w24, w9, #4, ne
	b.ne	LBB0_14
LBB0_11:
	mov	x0, x21
	bl	_CloseTransientFile
	cbz	x0, LBB0_16
; %bb.12:
Lloh30:
	adrp	x21, l_.str.2@PAGE
Lloh31:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh32:
	adrp	x21, l_.str@PAGE
Lloh33:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_15
LBB0_14:
	mov	x0, x21
	bl	_CloseTransientFile
	str	w24, [x23]
Lloh34:
	adrp	x21, l_.str.1@PAGE
Lloh35:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_15:
	bl	_errcode_for_file_access
	mov	x0, x21
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	mov	w0, #-1
LBB0_16:
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_BINARY,4,2                  ; @PG_BINARY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_errno,4,2                      ; @errno
	.comm	_EISDIR,4,2                     ; @EISDIR
	.comm	_EACCES,4,2                     ; @EACCES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open file \"%s\": %m"

	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"could not fsync file \"%s\": %m"

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

	.no_dead_strip	_fsync_fname_ext
.subsections_via_symbols
