	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsync_fname                    ## -- Begin function fsync_fname
	.p2align	4, 0x90
_fsync_fname:                           ## @fsync_fname
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_PG_BINARY@GOTPCREL(%rip), %rax
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_O_RDONLY@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_open
	testl	%eax, %eax
	js	LBB0_4
## %bb.8:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_fsync
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBADF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_pg_log_error
	movl	%ebx, %edi
	callq	_close
	movl	$-1, %r12d
	jmp	LBB0_14
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EACCES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.5:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	_EISDIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_pg_log_error
	movl	$-1, %r12d
	jmp	LBB0_14
LBB0_13:
	movl	%ebx, %edi
	callq	_close
	xorl	%r12d, %r12d
LBB0_14:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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,8,3                      ## @errno
	.comm	_EACCES,8,3                     ## @EACCES
	.comm	_EISDIR,8,3                     ## @EISDIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open file \"%s\": %m"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fsync_fname                    ; -- Begin function fsync_fname
	.p2align	2
_fsync_fname:                           ; @fsync_fname
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PG_BINARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PG_BINARY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh5:
	adrp	x10, _O_RDONLY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _O_RDONLY@GOTPAGEOFF]
	cmp	w1, #0
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w2, #0
	bl	_open
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x21, x0
	bl	_fsync
	cbz	w0, LBB0_4
; %bb.2:
	cbz	w20, LBB0_9
; %bb.3:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EBADF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EBADF@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x10, _EINVAL@GOTPAGE
Lloh14:
	ldr	x10, [x10, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
LBB0_4:
	mov	x0, x21
	bl	_close
	b	LBB0_8
LBB0_5:
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _EACCES@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EACCES@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.6:
	cbz	w20, LBB0_10
; %bb.7:
Lloh22:
	adrp	x9, _EISDIR@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EISDIR@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_8:
	mov	w0, #0
	b	LBB0_12
LBB0_9:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pg_log_error
	mov	x0, x21
	bl	_close
	b	LBB0_11
LBB0_10:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pg_log_error
LBB0_11:
	mov	w0, #-1
LBB0_12:
	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 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 AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.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,8,3                      ; @errno
	.comm	_EACCES,8,3                     ; @EACCES
	.comm	_EISDIR,8,3                     ; @EISDIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open file \"%s\": %m"

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

.subsections_via_symbols
