	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exec_command_cd
_exec_command_cd:                       ## @exec_command_cd
	.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
	testl	%esi, %esi
	je	LBB0_10
## %bb.1:
	movq	%rdx, %r14
	movq	_OT_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_psql_scan_slash_option
	movq	%rax, %r12
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_geteuid
	movq	%rax, %r15
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	%rax, %rdi
	callq	_getpwuid
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movq	(%rax), %r15
LBB0_4:
	movq	%r15, %rdi
	callq	_chdir
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_6:
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_free
LBB0_8:
	cmpl	$-1, %ebx
	jne	LBB0_11
## %bb.9:
	movq	_PSQL_CMD_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	callq	_ignore_slash_options
LBB0_11:
	movq	_PSQL_CMD_SKIP_LINE@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
	callq	__
	jmp	LBB0_16
LBB0_15:
	callq	_strerror
LBB0_16:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_OT_NORMAL,4,2                  ## @OT_NORMAL
	.comm	_errno,8,3                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get home directory for user ID %ld: %s"

L_.str.1:                               ## @.str.1
	.asciz	"user does not exist"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.2:                               ## @.str.2
	.asciz	"\\%s: could not change directory to \"%s\": %m"

	.comm	_PSQL_CMD_SKIP_LINE,4,2         ## @PSQL_CMD_SKIP_LINE
	.comm	_PSQL_CMD_ERROR,4,2             ## @PSQL_CMD_ERROR
	.no_dead_strip	_exec_command_cd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exec_command_cd
_exec_command_cd:                       ; @exec_command_cd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	w1, LBB0_9
; %bb.1:
	mov	x19, x2
Lloh0:
	adrp	x8, _OT_NORMAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OT_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	mov	w3, #1
	bl	_psql_scan_slash_option
	mov	x20, x0
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.2:
	bl	_geteuid
	mov	x21, x0
Lloh3:
	adrp	x22, _errno@GOTPAGE
Lloh4:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	str	xzr, [x22]
	bl	_getpwuid
	cbz	x0, LBB0_11
; %bb.3:
	ldr	x22, [x0]
LBB0_4:
	mov	x0, x22
	bl	_chdir
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
	stp	x19, x22, [sp]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pg_log_error
LBB0_6:
	cbz	x20, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_free
LBB0_8:
Lloh7:
	adrp	x8, _PSQL_CMD_SKIP_LINE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PSQL_CMD_SKIP_LINE@GOTPAGEOFF]
Lloh9:
	adrp	x9, _PSQL_CMD_ERROR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PSQL_CMD_ERROR@GOTPAGEOFF]
	cmn	w21, #1
	csel	x8, x9, x8, eq
	b	LBB0_10
LBB0_9:
	bl	_ignore_slash_options
Lloh11:
	adrp	x8, _PSQL_CMD_SKIP_LINE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PSQL_CMD_SKIP_LINE@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
LBB0_11:
	ldr	x0, [x22]
	cbnz	x0, LBB0_13
; %bb.12:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	b	LBB0_14
LBB0_13:
	bl	_strerror
LBB0_14:
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_log_error
Lloh17:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_OT_NORMAL,4,2                  ; @OT_NORMAL
	.comm	_errno,8,3                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get home directory for user ID %ld: %s"

l_.str.1:                               ; @.str.1
	.asciz	"user does not exist"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.2:                               ; @.str.2
	.asciz	"\\%s: could not change directory to \"%s\": %m"

	.comm	_PSQL_CMD_SKIP_LINE,4,2         ; @PSQL_CMD_SKIP_LINE
	.comm	_PSQL_CMD_ERROR,4,2             ; @PSQL_CMD_ERROR
	.no_dead_strip	_exec_command_cd
.subsections_via_symbols
