	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_walfile
_open_walfile:                          ## @open_walfile
	.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	%esi, %r15d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_WalSegSz@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movl	%r15d, %edi
	callq	_XLByteToSeg
	movq	_current_walfile_name@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movl	16(%r13), %esi
	movq	(%r12), %rcx
	callq	_XLogFileName
	movq	(%r15), %rcx
	movq	(%r13), %rax
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %r8
	cmovneq	%rax, %r8
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_snprintf
	movq	8(%r13), %rax
	movq	%r14, %rdi
	callq	*40(%rax)
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%r12, %rbx
	movq	8(%r13), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movq	(%rbx), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_12
## %bb.7:
	movq	(%r13), %rsi
	movq	8(%r13), %rax
	movq	(%r15), %rdi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	*24(%rax)
	movq	8(%r13), %rcx
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	*8(%rcx)
	testq	%rax, %rax
	jne	LBB0_20
## %bb.11:
	movq	_walfile@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	jmp	LBB0_17
LBB0_1:
	movq	(%r12), %rdx
LBB0_2:
	movq	(%r13), %rsi
	movq	8(%r13), %rax
	movq	(%r15), %rdi
	callq	*24(%rax)
	testq	%rax, %rax
	je	LBB0_3
## %bb.16:
	movq	_walfile@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_17:
	movl	$1, %r15d
	jmp	LBB0_18
LBB0_5:
	movq	8(%r13), %rcx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	*16(%rcx)
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_12:
	testq	%r12, %r12
	je	LBB0_2
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_15
## %bb.14:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
LBB0_15:
	leaq	L_.str.5(%rip), %rdi
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdx
	callq	_ngettext
	movslq	%eax, %rdi
	movq	(%rbx), %rcx
	xorl	%r15d, %r15d
	movq	%r14, %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_18
LBB0_3:
	movq	8(%r13), %rcx
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	*16(%rcx)
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
	callq	*16(%rcx)
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.19:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
LBB0_20:
	movq	8(%r13), %rcx
	xorl	%eax, %eax
	callq	*16(%rcx)
	leaq	L_.str.4(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_pg_log_fatal
	movq	8(%r13), %rax
	movq	_CLOSE_UNLINK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	callq	*32(%rax)
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_WalSegSz,8,3                   ## @WalSegSz
	.comm	_current_walfile_name,8,3       ## @current_walfile_name
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"could not get size of write-ahead log file \"%s\": %s"

L_.str.3:                               ## @.str.3
	.asciz	"could not open existing write-ahead log file \"%s\": %s"

L_.str.4:                               ## @.str.4
	.asciz	"could not fsync existing write-ahead log file \"%s\": %s"

	.comm	_CLOSE_UNLINK,4,2               ## @CLOSE_UNLINK
	.comm	_walfile,8,3                    ## @walfile
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOSPC,8,3                     ## @ENOSPC
L_.str.5:                               ## @.str.5
	.asciz	"write-ahead log file \"%s\" has %d byte, should be 0 or %d"

L_.str.6:                               ## @.str.6
	.asciz	"write-ahead log file \"%s\" has %d bytes, should be 0 or %d"

L_.str.7:                               ## @.str.7
	.asciz	"could not open write-ahead log file \"%s\": %s"

	.no_dead_strip	_open_walfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_walfile
_open_walfile:                          ; @open_walfile
	.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	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh8:
	adrp	x22, _WalSegSz@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WalSegSz@GOTPAGEOFF]
	ldr	x2, [x22]
	mov	x0, x1
	bl	_XLByteToSeg
Lloh10:
	adrp	x23, _current_walfile_name@GOTPAGE
Lloh11:
	ldr	x23, [x23, _current_walfile_name@GOTPAGEOFF]
	ldr	x0, [x23]
	ldr	w1, [x20, #16]
	ldr	x3, [x22]
	bl	_XLogFileName
	ldr	x3, [x23]
	ldr	x8, [x20]
Lloh12:
	adrp	x9, l_.str.1@PAGE
Lloh13:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x4, x9, x8, eq
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_snprintf
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #40]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	tbnz	x0, #63, LBB0_10
; %bb.2:
	mov	x21, x0
	ldr	x2, [x22]
	cmp	x0, x2
	b.ne	LBB0_11
; %bb.3:
	ldp	x1, x8, [x20]
	ldr	x8, [x8, #24]
	ldr	x0, [x23]
	mov	x2, #0
	blr	x8
	ldr	x8, [x20, #8]
	cbz	x0, LBB0_16
; %bb.4:
	mov	x21, x0
	ldr	x8, [x8, #8]
	blr	x8
	cbnz	x0, LBB0_22
; %bb.5:
Lloh16:
	adrp	x8, _walfile@GOTPAGE
Lloh17:
	ldr	x8, [x8, _walfile@GOTPAGEOFF]
Lloh18:
	str	x21, [x8]
	b	LBB0_9
LBB0_6:
	ldr	x2, [x22]
LBB0_7:
	ldp	x1, x8, [x20]
	ldr	x8, [x8, #24]
	ldr	x0, [x23]
	blr	x8
	cbz	x0, LBB0_15
; %bb.8:
Lloh19:
	adrp	x8, _walfile@GOTPAGE
Lloh20:
	ldr	x8, [x8, _walfile@GOTPAGEOFF]
Lloh21:
	str	x0, [x8]
LBB0_9:
	mov	w0, #1
	b	LBB0_19
LBB0_10:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #16]
	blr	x8
	mov	x2, x0
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_11:
	cbz	x21, LBB0_7
; %bb.12:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	ldr	x9, [x8]
	cbnz	x9, LBB0_14
; %bb.13:
Lloh26:
	adrp	x9, _ENOSPC@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ENOSPC@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_14:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, x21
	bl	_ngettext
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	ldr	x8, [x22]
	str	x8, [sp, #-16]!
	mov	x1, x19
	mov	x2, x21
	bl	_pg_log_error
	add	sp, sp, #16
	b	LBB0_18
LBB0_15:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #16]
	blr	x8
	mov	x2, x0
Lloh33:
	adrp	x0, l_.str.7@PAGE
Lloh34:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_17
LBB0_16:
	ldr	x8, [x8, #16]
	blr	x8
	mov	x2, x0
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_17:
	mov	x1, x19
	bl	_pg_log_error
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldur	x8, [x29, #-56]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	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_21:
	bl	___stack_chk_fail
LBB0_22:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #16]
	blr	x8
	mov	x2, x0
Lloh40:
	adrp	x0, l_.str.4@PAGE
Lloh41:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_pg_log_fatal
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #32]
Lloh42:
	adrp	x9, _CLOSE_UNLINK@GOTPAGE
Lloh43:
	ldr	x9, [x9, _CLOSE_UNLINK@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x9]
	mov	x0, x21
	blr	x8
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_WalSegSz,8,3                   ; @WalSegSz
	.comm	_current_walfile_name,8,3       ; @current_walfile_name
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"could not get size of write-ahead log file \"%s\": %s"

l_.str.3:                               ; @.str.3
	.asciz	"could not open existing write-ahead log file \"%s\": %s"

l_.str.4:                               ; @.str.4
	.asciz	"could not fsync existing write-ahead log file \"%s\": %s"

	.comm	_CLOSE_UNLINK,4,2               ; @CLOSE_UNLINK
	.comm	_walfile,8,3                    ; @walfile
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOSPC,8,3                     ; @ENOSPC
l_.str.5:                               ; @.str.5
	.asciz	"write-ahead log file \"%s\" has %d byte, should be 0 or %d"

l_.str.6:                               ; @.str.6
	.asciz	"write-ahead log file \"%s\" has %d bytes, should be 0 or %d"

l_.str.7:                               ; @.str.7
	.asciz	"could not open write-ahead log file \"%s\": %s"

	.no_dead_strip	_open_walfile
.subsections_via_symbols
