	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogFileOpen                   ## -- Begin function XLogFileOpen
	.p2align	4, 0x90
_XLogFileOpen:                          ## @XLogFileOpen
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_ThisTimeLineID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_wal_segment_size@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_XLogFilePath
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_PG_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_sync_method@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_get_sync_bit
	orl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_BasicOpenFile
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	movl	%ebx, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_ThisTimeLineID,4,2             ## @ThisTimeLineID
	.comm	_wal_segment_size,4,2           ## @wal_segment_size
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_PG_BINARY,4,2                  ## @PG_BINARY
	.comm	_sync_method,4,2                ## @sync_method
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open file \"%s\": %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XLogFileOpen                   ; -- Begin function XLogFileOpen
	.p2align	2
_XLogFileOpen:                          ; @XLogFileOpen
	.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
	sub	sp, sp, #16
	mov	x2, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@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	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x8, _ThisTimeLineID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ThisTimeLineID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _wal_segment_size@GOTPAGE
Lloh12:
	ldr	x8, [x8, _wal_segment_size@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_XLogFilePath
Lloh14:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh16:
	adrp	x9, _PG_BINARY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PG_BINARY@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	ldr	w9, [x9]
	orr	w20, w9, w8
Lloh20:
	adrp	x8, _sync_method@GOTPAGE
Lloh21:
	ldr	x8, [x8, _sync_method@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_get_sync_bit
	orr	w1, w20, w0
	mov	x0, x19
	bl	_BasicOpenFile
	mov	x20, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh23:
	adrp	x8, _PANIC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	bl	_errcode_for_file_access
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	sub	sp, x29, #32
	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
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_ThisTimeLineID,4,2             ; @ThisTimeLineID
	.comm	_wal_segment_size,4,2           ; @wal_segment_size
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_PG_BINARY,4,2                  ; @PG_BINARY
	.comm	_sync_method,4,2                ; @sync_method
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open file \"%s\": %m"

.subsections_via_symbols
