	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function identify_target_directory
_identify_target_directory:             ## @identify_target_directory
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_search_directory
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
## %bb.3:
	movq	%rbx, %rdi
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_search_directory
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_4:
	movl	(%r12), %esi
	movq	_XLOGDIR@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rcx
LBB0_5:
	callq	_snprintf
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_search_directory
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movq	%r14, %rdi
	callq	_pg_strdup
	movq	%rax, %rbx
	jmp	LBB0_18
LBB0_10:
	movq	_XLOGDIR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	callq	_search_directory
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	(%rbx), %rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
LBB0_12:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pg_strdup                      ## TAILCALL
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	(%r12), %esi
	movq	(%rbx), %r8
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rcx
	jmp	LBB0_5
LBB0_15:
	testq	%r15, %r15
	je	LBB0_17
## %bb.16:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_fatal_error
	jmp	LBB0_18
LBB0_17:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fatal_error
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movq	%rbx, %rax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s"

	.comm	_XLOGDIR,8,3                    ## @XLOGDIR
L_.str.1:                               ## @.str.1
	.asciz	"."

L_.str.2:                               ## @.str.2
	.asciz	"PGDATA"

L_.str.3:                               ## @.str.3
	.asciz	"could not locate WAL file \"%s\""

L_.str.4:                               ## @.str.4
	.asciz	"could not find any WAL file"

	.no_dead_strip	_identify_target_directory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function identify_target_directory
_identify_target_directory:             ; @identify_target_directory
	.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	x19, x1
	mov	x21, 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	x22, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAXPGPATH@GOTPAGEOFF]
	ldr	w8, [x22]
	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	x20, x9, x8
	mov	sp, x20
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_search_directory
	cbz	x0, LBB0_7
; %bb.2:
	ldur	x8, [x29, #-40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.3:
	mov	x0, x21
	b	LBB0_12
LBB0_4:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_search_directory
	cbz	x0, LBB0_10
; %bb.5:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.6:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_7:
	ldr	w1, [x22]
Lloh17:
	adrp	x8, _XLOGDIR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _XLOGDIR@GOTPAGEOFF]
Lloh19:
	ldr	x4, [x8]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x21
LBB0_8:
	bl	_snprintf
	mov	x0, x20
	mov	x1, x19
	bl	_search_directory
	cbz	x0, LBB0_15
; %bb.9:
	mov	x0, x20
	bl	_pg_strdup
	b	LBB0_19
LBB0_10:
Lloh22:
	adrp	x21, _XLOGDIR@GOTPAGE
Lloh23:
	ldr	x21, [x21, _XLOGDIR@GOTPAGEOFF]
	ldr	x0, [x21]
	mov	x1, x19
	bl	_search_directory
	cbz	x0, LBB0_13
; %bb.11:
	ldr	x0, [x21]
	ldur	x8, [x29, #-40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
LBB0_12:
	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
	b	_pg_strdup
LBB0_13:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_15
; %bb.14:
	mov	x3, x0
	ldr	w1, [x22]
	ldr	x4, [x21]
Lloh29:
	adrp	x2, l_.str@PAGE
Lloh30:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	b	LBB0_8
LBB0_15:
	cbz	x19, LBB0_17
; %bb.16:
	str	x19, [sp, #-16]!
Lloh31:
	adrp	x0, l_.str.3@PAGE
Lloh32:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fatal_error
	add	sp, sp, #16
	b	LBB0_18
LBB0_17:
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_fatal_error
LBB0_18:
	mov	x0, #0
LBB0_19:
	ldur	x8, [x29, #-40]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	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_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s"

	.comm	_XLOGDIR,8,3                    ; @XLOGDIR
l_.str.1:                               ; @.str.1
	.asciz	"."

l_.str.2:                               ; @.str.2
	.asciz	"PGDATA"

l_.str.3:                               ; @.str.3
	.asciz	"could not locate WAL file \"%s\""

l_.str.4:                               ; @.str.4
	.asciz	"could not find any WAL file"

	.no_dead_strip	_identify_target_directory
.subsections_via_symbols
