	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReceiveAndUnpackTarFile
_ReceiveAndUnpackTarFile:               ## @ReceiveAndUnpackTarFile
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	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, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	$0, -56(%rbp)
	movq	%r15, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_PQgetisnull
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_basedir@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_PQgetvalue
	movq	%rax, %rdi
	callq	_get_tablespace_mapping
	movq	%rax, %rsi
LBB0_3:
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strlcpy
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_PQgetResult
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_COPY_OUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.11:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_PQerrorMessage
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_44:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_fclose
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	callq	_PQfreemem
	movq	$0, -56(%rbp)
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=3
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	-56(%rbp), %rsi
	xorl	%edx, %edx
	callq	_PQgetCopyData
	cmpl	$-1, %eax
	je	LBB0_45
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=3
	movl	%eax, %ebx
	cmpl	$-2, %eax
	je	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=3
	testq	%r12, %r12
	je	LBB0_15
## %bb.38:                              ##   in Loop: Header=BB0_6 Depth=3
	testl	%r13d, %r13d
	jne	LBB0_41
## %bb.39:                              ##   in Loop: Header=BB0_6 Depth=3
	cmpl	%r15d, %ebx
	je	LBB0_40
LBB0_41:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	-56(%rbp), %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_fwrite
	cmpl	$1, %eax
	jne	LBB0_42
## %bb.43:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	_totaldone@GOTPCREL(%rip), %rax
	addl	%ebx, (%rax)
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_progress_report
	subl	%ebx, %r13d
	movl	%r13d, %eax
	orl	%r15d, %eax
	jne	LBB0_6
	jmp	LBB0_44
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=3
	cmpl	$512, %ebx                      ## imm = 0x200
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	_totaldone@GOTPCREL(%rip), %rax
	addl	$512, (%rax)                    ## imm = 0x200
	movq	-56(%rbp), %rdi
	addq	$124, %rdi
	movl	$12, %esi
	callq	_read_tar_number
	movl	%eax, %r13d
	movq	-56(%rbp), %rdi
	addq	$100, %rdi
	movl	$8, %esi
	callq	_read_tar_number
	movl	%eax, %ebx
	leal	511(%r13), %r15d
	andl	$-512, %r15d                    ## imm = 0xFE00
	subl	%r13d, %r15d
	movq	-56(%rbp), %r8
	movq	%r14, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	leaq	L_.str.3(%rip), %rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	callq	_snprintf
	movq	%r14, %rdi
	callq	_strlen
	cltq
	cmpb	$47, -1(%rax,%r14)
	jne	LBB0_32
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	-56(%rbp), %rax
	movsbl	156(%rax), %esi
	cmpl	$50, %esi
	je	LBB0_29
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=3
	cmpb	$53, %sil
	jne	LBB0_31
## %bb.20:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	callq	_strlen
	cltq
	movb	$0, -1(%rax,%r14)
	movq	_pg_dir_create_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mkdir
	testq	%rax, %rax
	je	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_pg_str_endswith
	testq	%rax, %rax
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_pg_str_endswith
	testq	%rax, %rax
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_pg_str_endswith
	testq	%rax, %rax
	je	LBB0_25
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
LBB0_27:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_chmod
	movl	$0, %r12d
	testq	%rax, %rax
	je	LBB0_6
## %bb.28:                              ##   in Loop: Header=BB0_6 Depth=3
	leaq	L_.str.8(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pg_log_error
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_32:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	leaq	L_.str.11(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_33
## %bb.34:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%rax, %r12
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_chmod
	testq	%rax, %rax
	je	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_6 Depth=3
	leaq	L_.str.13(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_36:                                ##   in Loop: Header=BB0_6 Depth=3
	testl	%r13d, %r13d
	jne	LBB0_6
	jmp	LBB0_37
LBB0_29:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	callq	_strlen
	cltq
	movb	$0, -1(%rax,%r14)
	movq	-56(%rbp), %rdi
	movl	$157, %eax
	addq	%rax, %rdi
	callq	_get_tablespace_mapping
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_symlink
	movl	$0, %r12d
	testq	%rax, %rax
	je	LBB0_6
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_40:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%r12, %rdi
	callq	_fclose
	movq	_totaldone@GOTPCREL(%rip), %rax
	addl	%r15d, (%rax)
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_6
LBB0_37:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%r12, %rdi
	callq	_fclose
	jmp	LBB0_5
LBB0_45:
	testq	%r12, %r12
	jne	LBB0_53
## %bb.46:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_progress_report
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_48
## %bb.47:
	callq	_PQfreemem
LBB0_48:
	cmpl	$0, -76(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_51
## %bb.49:
	movq	_writerecoveryconf@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_51
## %bb.50:
	movq	_basedir@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_recoveryconfcontents@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_WriteRecoveryConfig
LBB0_51:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_54
## %bb.52:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_PQerrorMessage
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	movl	%eax, %esi
	jmp	LBB0_13
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	jmp	LBB0_13
LBB0_42:
	leaq	L_.str.14(%rip), %rdi
	jmp	LBB0_26
LBB0_33:
	leaq	L_.str.12(%rip), %rdi
	jmp	LBB0_26
LBB0_31:
	leaq	L_.str.10(%rip), %rdi
LBB0_13:
	xorl	%eax, %eax
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
LBB0_30:
	leaq	L_.str.9(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
LBB0_25:
	leaq	L_.str.7(%rip), %rdi
LBB0_26:
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
LBB0_53:
	movq	%r12, %rdi
	callq	_fclose
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_progress_report
	leaq	L_.str.15(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
LBB0_54:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_basedir,8,3                    ## @basedir
	.comm	_PGRES_COPY_OUT,8,3             ## @PGRES_COPY_OUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get COPY data stream: %s"

L_.str.1:                               ## @.str.1
	.asciz	"could not read COPY data: %s"

L_.str.2:                               ## @.str.2
	.asciz	"invalid tar block header size: %d"

	.comm	_totaldone,4,2                  ## @totaldone
L_.str.3:                               ## @.str.3
	.asciz	"%s/%s"

	.comm	_pg_dir_create_mode,4,2         ## @pg_dir_create_mode
L_.str.4:                               ## @.str.4
	.asciz	"/pg_wal"

L_.str.5:                               ## @.str.5
	.asciz	"/pg_xlog"

L_.str.6:                               ## @.str.6
	.asciz	"/archive_status"

	.comm	_errno,8,3                      ## @errno
	.comm	_EEXIST,8,3                     ## @EEXIST
L_.str.7:                               ## @.str.7
	.asciz	"could not create directory \"%s\": %m"

L_.str.8:                               ## @.str.8
	.asciz	"could not set permissions on directory \"%s\": %m"

L_.str.9:                               ## @.str.9
	.asciz	"could not create symbolic link from \"%s\" to \"%s\": %m"

L_.str.10:                              ## @.str.10
	.asciz	"unrecognized link indicator \"%c\""

L_.str.11:                              ## @.str.11
	.asciz	"wb"

L_.str.12:                              ## @.str.12
	.asciz	"could not create file \"%s\": %m"

L_.str.13:                              ## @.str.13
	.asciz	"could not set permissions on file \"%s\": %m"

L_.str.14:                              ## @.str.14
	.asciz	"could not write to file \"%s\": %m"

L_.str.15:                              ## @.str.15
	.asciz	"COPY stream ended before last file was finished"

	.comm	_writerecoveryconf,8,3          ## @writerecoveryconf
	.comm	_recoveryconfcontents,4,2       ## @recoveryconfcontents
	.no_dead_strip	_ReceiveAndUnpackTarFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReceiveAndUnpackTarFile
_ReceiveAndUnpackTarFile:               ; @ReceiveAndUnpackTarFile
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x12, x9, #0x1fffffff0
	sub	x24, x8, x12
	mov	sp, x24
	mov	x9, x22
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
	stur	xzr, [x29, #-96]
	mov	x0, x1
	mov	x1, x2
	mov	w2, #0
	bl	_PQgetisnull
Lloh10:
	adrp	x8, _basedir@GOTPAGE
Lloh11:
	ldr	x8, [x8, _basedir@GOTPAGEOFF]
	stur	w0, [x29, #-100]                ; 4-byte Folded Spill
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x1, [x8]
	b	LBB0_3
LBB0_2:
	mov	x0, x23
	mov	x1, x20
	mov	w2, #1
	bl	_PQgetvalue
	bl	_get_tablespace_mapping
	mov	x1, x0
LBB0_3:
	mov	x0, x24
	mov	x2, x22
	bl	_strlcpy
	mov	x0, x19
	bl	_PQgetResult
	bl	_PQresultStatus
Lloh12:
	adrp	x8, _PGRES_COPY_OUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PGRES_COPY_OUT@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_48
; %bb.4:
	mov	w25, #0
	mov	x26, #0
	mov	w27, #0
Lloh15:
	adrp	x28, _totaldone@GOTPAGE
Lloh16:
	ldr	x28, [x28, _totaldone@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x26
	bl	_fclose
	mov	x26, #0
	mov	w27, #0
	ldr	w8, [x28]
	add	w8, w8, w25
	str	w8, [x28]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x0, [x29, #-96]
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_PQfreemem
	stur	xzr, [x29, #-96]
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	sub	x1, x29, #96
	mov	x0, x19
	mov	w2, #0
	bl	_PQgetCopyData
	cmn	w0, #1
	b.eq	LBB0_34
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	cmn	w0, #2
	b.eq	LBB0_42
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x26, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w27, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w23, w25
	b.eq	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldur	x0, [x29, #-96]
	mov	x1, x23
	mov	w2, #1
	mov	x3, x26
	bl	_fwrite
	cmp	w0, #1
	b.ne	LBB0_44
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x28]
	add	w8, w8, w23
	str	w8, [x28]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_progress_report
	sub	w27, w27, w23
	orr	w8, w27, w25
	cbnz	w8, LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x26
	bl	_fclose
	mov	w25, #0
	mov	x26, #0
	mov	w27, #0
	b	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w23, #512
	b.ne	LBB0_43
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x28]
	add	w8, w8, #512
	str	w8, [x28]
	ldur	x8, [x29, #-96]
	add	x0, x8, #124
	mov	w1, #12
	bl	_read_tar_number
	mov	x27, x0
	ldur	x8, [x29, #-96]
	add	x0, x8, #100
	mov	w1, #8
	bl	_read_tar_number
	mov	x23, x0
	add	w8, w27, #511
	and	w8, w8, #0xfffffe00
	sub	w25, w8, w27
	ldur	x4, [x29, #-96]
	mov	x0, x21
	mov	x1, x22
Lloh17:
	adrp	x2, l_.str.3@PAGE
Lloh18:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x3, x24
	bl	_snprintf
	mov	x0, x21
	bl	_strlen
	add	x8, x21, w0, sxtw
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.ne	LBB0_27
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	ldur	x8, [x29, #-96]
	ldrb	w8, [x8, #156]
	cmp	w8, #50
	b.eq	LBB0_32
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #53
	b.ne	LBB0_46
; %bb.20:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_strlen
	add	x8, x21, w0, sxtw
	sturb	wzr, [x8, #-1]
Lloh19:
	adrp	x8, _pg_dir_create_mode@GOTPAGE
Lloh20:
	ldr	x8, [x8, _pg_dir_create_mode@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mkdir
	cbz	x0, LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_pg_str_endswith
	cbnz	x0, LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_pg_str_endswith
	cbnz	x0, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_pg_str_endswith
	cbz	x0, LBB0_47
LBB0_24:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
Lloh31:
	adrp	x9, _EEXIST@GOTPAGE
Lloh32:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_47
LBB0_25:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_chmod
	mov	x26, #0
	cbz	x0, LBB0_6
; %bb.26:                               ;   in Loop: Header=BB0_6 Depth=1
	str	x21, [sp, #-16]!
Lloh34:
	adrp	x0, l_.str.8@PAGE
Lloh35:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pg_log_error
	add	sp, sp, #16
	mov	x26, #0
	b	LBB0_6
LBB0_27:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
Lloh36:
	adrp	x1, l_.str.11@PAGE
Lloh37:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_45
; %bb.28:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, x0
	mov	x0, x21
	mov	x1, x23
	bl	_chmod
	cbz	x0, LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_6 Depth=1
	str	x21, [sp, #-16]!
Lloh38:
	adrp	x0, l_.str.13@PAGE
Lloh39:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_pg_log_error
	add	sp, sp, #16
LBB0_30:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w27, LBB0_6
; %bb.31:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x26
	bl	_fclose
	mov	x26, #0
	b	LBB0_6
LBB0_32:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_strlen
	add	x8, x21, w0, sxtw
	sturb	wzr, [x8, #-1]
	ldur	x8, [x29, #-96]
	add	x0, x8, #157
	bl	_get_tablespace_mapping
	mov	x23, x0
	mov	x1, x21
	bl	_symlink
	mov	x26, #0
	cbz	x0, LBB0_6
; %bb.33:
	stp	x21, x23, [sp, #-16]!
Lloh40:
	adrp	x0, l_.str.9@PAGE
Lloh41:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_49
LBB0_34:
	cbnz	x26, LBB0_50
; %bb.35:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_progress_report
	ldur	x0, [x29, #-96]
	cbz	x0, LBB0_37
; %bb.36:
	bl	_PQfreemem
LBB0_37:
	ldur	w8, [x29, #-100]                ; 4-byte Folded Reload
	cbz	w8, LBB0_40
; %bb.38:
Lloh42:
	adrp	x8, _writerecoveryconf@GOTPAGE
Lloh43:
	ldr	x8, [x8, _writerecoveryconf@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	cbz	x8, LBB0_40
; %bb.39:
Lloh45:
	adrp	x8, _basedir@GOTPAGE
Lloh46:
	ldr	x8, [x8, _basedir@GOTPAGEOFF]
Lloh47:
	ldr	x1, [x8]
Lloh48:
	adrp	x8, _recoveryconfcontents@GOTPAGE
Lloh49:
	ldr	x8, [x8, _recoveryconfcontents@GOTPAGEOFF]
Lloh50:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_WriteRecoveryConfig
LBB0_40:
	ldur	x8, [x29, #-88]
Lloh51:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh52:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_51
; %bb.41:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_42:
	mov	x0, x19
	bl	_PQerrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh54:
	adrp	x0, l_.str.1@PAGE
Lloh55:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_49
LBB0_43:
	str	x23, [sp, #-16]!
Lloh56:
	adrp	x0, l_.str.2@PAGE
Lloh57:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_49
LBB0_44:
	str	x21, [sp, #-16]!
Lloh58:
	adrp	x0, l_.str.14@PAGE
Lloh59:
	add	x0, x0, l_.str.14@PAGEOFF
	b	LBB0_49
LBB0_45:
	str	x21, [sp, #-16]!
Lloh60:
	adrp	x0, l_.str.12@PAGE
Lloh61:
	add	x0, x0, l_.str.12@PAGEOFF
	b	LBB0_49
LBB0_46:
	sxtb	w8, w8
	str	x8, [sp, #-16]!
Lloh62:
	adrp	x0, l_.str.10@PAGE
Lloh63:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_49
LBB0_47:
	str	x21, [sp, #-16]!
Lloh64:
	adrp	x0, l_.str.7@PAGE
Lloh65:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_49
LBB0_48:
	mov	x0, x19
	bl	_PQerrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh66:
	adrp	x0, l_.str@PAGE
Lloh67:
	add	x0, x0, l_.str@PAGEOFF
LBB0_49:
	bl	_pg_log_error
	add	sp, sp, #16
	mov	w0, #1
	bl	_exit
LBB0_50:
	mov	x0, x26
	bl	_fclose
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_progress_report
Lloh68:
	adrp	x0, l_.str.15@PAGE
Lloh69:
	add	x0, x0, l_.str.15@PAGEOFF
	bl	_pg_log_error
	mov	w0, #1
	bl	_exit
LBB0_51:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpAdd	Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_basedir,8,3                    ; @basedir
	.comm	_PGRES_COPY_OUT,8,3             ; @PGRES_COPY_OUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get COPY data stream: %s"

l_.str.1:                               ; @.str.1
	.asciz	"could not read COPY data: %s"

l_.str.2:                               ; @.str.2
	.asciz	"invalid tar block header size: %d"

	.comm	_totaldone,4,2                  ; @totaldone
l_.str.3:                               ; @.str.3
	.asciz	"%s/%s"

	.comm	_pg_dir_create_mode,4,2         ; @pg_dir_create_mode
l_.str.4:                               ; @.str.4
	.asciz	"/pg_wal"

l_.str.5:                               ; @.str.5
	.asciz	"/pg_xlog"

l_.str.6:                               ; @.str.6
	.asciz	"/archive_status"

	.comm	_errno,8,3                      ; @errno
	.comm	_EEXIST,8,3                     ; @EEXIST
l_.str.7:                               ; @.str.7
	.asciz	"could not create directory \"%s\": %m"

l_.str.8:                               ; @.str.8
	.asciz	"could not set permissions on directory \"%s\": %m"

l_.str.9:                               ; @.str.9
	.asciz	"could not create symbolic link from \"%s\" to \"%s\": %m"

l_.str.10:                              ; @.str.10
	.asciz	"unrecognized link indicator \"%c\""

l_.str.11:                              ; @.str.11
	.asciz	"wb"

l_.str.12:                              ; @.str.12
	.asciz	"could not create file \"%s\": %m"

l_.str.13:                              ; @.str.13
	.asciz	"could not set permissions on file \"%s\": %m"

l_.str.14:                              ; @.str.14
	.asciz	"could not write to file \"%s\": %m"

l_.str.15:                              ; @.str.15
	.asciz	"COPY stream ended before last file was finished"

	.comm	_writerecoveryconf,8,3          ; @writerecoveryconf
	.comm	_recoveryconfcontents,4,2       ; @recoveryconfcontents
	.no_dead_strip	_ReceiveAndUnpackTarFile
.subsections_via_symbols
