	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_stop
_do_stop:                               ## @do_stop
	.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
	xorl	%edi, %edi
	callq	_get_pgpid
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rax, %rbx
	js	LBB0_19
## %bb.2:
	movq	_sig@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kill
	testq	%rax, %rax
	jne	LBB0_20
## %bb.3:
	movq	_do_wait@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_21
## %bb.4:
	movq	_shutdown_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SMART_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movq	_backup_file@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	xorl	%eax, %eax
	callq	_get_control_dbstate
	movq	_DB_IN_ARCHIVE_RECOVERY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.5(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	callq	_print_msg
LBB0_8:
	leaq	L_.str.6(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	callq	_print_msg
	movq	_wait_seconds@GOTPCREL(%rip), %r13
	movq	_WAITS_PER_SEC@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	imull	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.9:
	xorl	%ebx, %ebx
	leaq	L_.str.7(%rip), %r14
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %r12
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r12), %eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	callq	_pg_usleep
	incl	%ebx
	movl	(%r15), %eax
	imull	(%r13), %eax
	cmpl	%eax, %ebx
	jge	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_get_pgpid
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%r15), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r14, %rdi
	callq	_print_msg
	movl	(%r15), %ecx
	jmp	LBB0_13
LBB0_17:
	leaq	L_.str.11(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	callq	_print_msg
	leaq	L_.str.12(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	callq	_print_msg
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	leaq	L_.str.4(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_print_msg                      ## TAILCALL
LBB0_14:
	leaq	L_.str.8(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	callq	_print_msg
	leaq	L_.str.9(%rip), %rdi
	callq	__
	movq	_progname@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_write_stderr
	movq	_shutdown_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SMART_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.10(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_write_stderr
LBB0_16:
	movl	$1, %edi
	callq	_exit
LBB0_18:
	leaq	L_.str(%rip), %rdi
	callq	__
	movq	_progname@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_pid_file@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_write_stderr
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_write_stderr
	movl	$1, %edi
	callq	_exit
LBB0_19:
	negq	%rbx
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movq	_progname@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_write_stderr
	movl	$1, %edi
	callq	_exit
LBB0_20:
	leaq	L_.str.3(%rip), %rdi
	callq	__
	movq	%rax, %r14
	movq	_progname@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_write_stderr
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: PID file \"%s\" does not exist\n"

	.comm	_progname,4,2                   ## @progname
	.comm	_pid_file,4,2                   ## @pid_file
L_.str.1:                               ## @.str.1
	.asciz	"Is server running?\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: cannot stop server; single-user server is running (PID: %ld)\n"

	.comm	_sig,4,2                        ## @sig
L_.str.3:                               ## @.str.3
	.asciz	"%s: could not send stop signal (PID: %ld): %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_do_wait,4,2                    ## @do_wait
L_.str.4:                               ## @.str.4
	.asciz	"server shutting down\n"

	.comm	_shutdown_mode,8,3              ## @shutdown_mode
	.comm	_SMART_MODE,8,3                 ## @SMART_MODE
	.comm	_backup_file,4,2                ## @backup_file
	.comm	_DB_IN_ARCHIVE_RECOVERY,8,3     ## @DB_IN_ARCHIVE_RECOVERY
L_.str.5:                               ## @.str.5
	.asciz	"WARNING: online backup mode is active\nShutdown will not complete until pg_stop_backup() is called.\n\n"

L_.str.6:                               ## @.str.6
	.asciz	"waiting for server to shut down..."

	.comm	_wait_seconds,4,2               ## @wait_seconds
	.comm	_WAITS_PER_SEC,4,2              ## @WAITS_PER_SEC
L_.str.7:                               ## @.str.7
	.asciz	"."

	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
L_.str.8:                               ## @.str.8
	.asciz	" failed\n"

L_.str.9:                               ## @.str.9
	.asciz	"%s: server does not shut down\n"

L_.str.10:                              ## @.str.10
	.asciz	"HINT: The \"-m fast\" option immediately disconnects sessions rather than\nwaiting for session-initiated disconnection.\n"

L_.str.11:                              ## @.str.11
	.asciz	" done\n"

L_.str.12:                              ## @.str.12
	.asciz	"server stopped\n"

	.no_dead_strip	_do_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_stop
_do_stop:                               ; @do_stop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	w0, #0
	bl	_get_pgpid
	cbz	x0, LBB0_19
; %bb.1:
	mov	x19, x0
	tbnz	x0, #63, LBB0_20
; %bb.2:
Lloh0:
	adrp	x8, _sig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sig@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kill
	cbnz	x0, LBB0_21
; %bb.3:
Lloh3:
	adrp	x8, _do_wait@GOTPAGE
Lloh4:
	ldr	x8, [x8, _do_wait@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_15
; %bb.4:
Lloh6:
	adrp	x20, _shutdown_mode@GOTPAGE
Lloh7:
	ldr	x20, [x20, _shutdown_mode@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh8:
	adrp	x21, _SMART_MODE@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SMART_MODE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
Lloh10:
	adrp	x8, _backup_file@GOTPAGE
Lloh11:
	ldr	x8, [x8, _backup_file@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x1, sp, #24
	bl	_stat
	cbnz	x0, LBB0_8
; %bb.6:
	bl	_get_control_dbstate
Lloh13:
	adrp	x8, _DB_IN_ARCHIVE_RECOVERY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DB_IN_ARCHIVE_RECOVERY@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	__
	bl	_print_msg
LBB0_8:
Lloh18:
	adrp	x0, l_.str.6@PAGE
Lloh19:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	__
	bl	_print_msg
Lloh20:
	adrp	x22, _wait_seconds@GOTPAGE
Lloh21:
	ldr	x22, [x22, _wait_seconds@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh22:
	adrp	x23, _WAITS_PER_SEC@GOTPAGE
Lloh23:
	ldr	x23, [x23, _WAITS_PER_SEC@GOTPAGEOFF]
	ldr	w9, [x23]
	mul	w8, w9, w8
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.9:
	mov	w24, #0
Lloh24:
	adrp	x19, l_.str.7@PAGE
Lloh25:
	add	x19, x19, l_.str.7@PAGEOFF
Lloh26:
	adrp	x25, _USEC_PER_SEC@GOTPAGE
Lloh27:
	ldr	x25, [x25, _USEC_PER_SEC@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x25]
	sdiv	w0, w9, w8
	bl	_pg_usleep
	add	w24, w24, #1
	ldr	w8, [x22]
	ldr	w9, [x23]
	mul	w8, w9, w8
	cmp	w24, w8
	b.ge	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_get_pgpid
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x23]
	sdiv	w9, w24, w8
	msub	w9, w9, w8, w24
	cbnz	w9, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	bl	_print_msg
	ldr	w8, [x23]
	b	LBB0_10
LBB0_14:
Lloh28:
	adrp	x0, l_.str.11@PAGE
Lloh29:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	__
	bl	_print_msg
Lloh30:
	adrp	x0, l_.str.12@PAGE
Lloh31:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	__
	bl	_print_msg
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
Lloh32:
	adrp	x0, l_.str.4@PAGE
Lloh33:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	__
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_print_msg
LBB0_16:
Lloh34:
	adrp	x0, l_.str.8@PAGE
Lloh35:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	__
	bl	_print_msg
Lloh36:
	adrp	x0, l_.str.9@PAGE
Lloh37:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	__
Lloh38:
	adrp	x8, _progname@GOTPAGE
Lloh39:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	str	x8, [sp]
	bl	_write_stderr
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.17:
Lloh41:
	adrp	x0, l_.str.10@PAGE
Lloh42:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	__
	bl	_write_stderr
LBB0_18:
	mov	w0, #1
	bl	_exit
LBB0_19:
Lloh43:
	adrp	x0, l_.str@PAGE
Lloh44:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
Lloh45:
	adrp	x8, _progname@GOTPAGE
Lloh46:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh47:
	adrp	x9, _pid_file@GOTPAGE
Lloh48:
	ldr	x9, [x9, _pid_file@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	ldr	w9, [x9]
	stp	x8, x9, [sp]
	bl	_write_stderr
Lloh51:
	adrp	x0, l_.str.1@PAGE
Lloh52:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__
	b	LBB0_22
LBB0_20:
	neg	x19, x19
Lloh53:
	adrp	x0, l_.str.2@PAGE
Lloh54:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
Lloh55:
	adrp	x8, _progname@GOTPAGE
Lloh56:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	stp	x8, x19, [sp]
	b	LBB0_22
LBB0_21:
Lloh58:
	adrp	x0, l_.str.3@PAGE
Lloh59:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__
	mov	x20, x0
Lloh60:
	adrp	x8, _progname@GOTPAGE
Lloh61:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh62:
	adrp	x9, _errno@GOTPAGE
Lloh63:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh64:
	ldr	w0, [x9]
Lloh65:
	ldr	w21, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp, #8]
	str	x21, [sp]
	mov	x0, x20
LBB0_22:
	bl	_write_stderr
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh49
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh65
	.loh AdrpAdd	Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: PID file \"%s\" does not exist\n"

	.comm	_progname,4,2                   ; @progname
	.comm	_pid_file,4,2                   ; @pid_file
l_.str.1:                               ; @.str.1
	.asciz	"Is server running?\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: cannot stop server; single-user server is running (PID: %ld)\n"

	.comm	_sig,4,2                        ; @sig
l_.str.3:                               ; @.str.3
	.asciz	"%s: could not send stop signal (PID: %ld): %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_do_wait,4,2                    ; @do_wait
l_.str.4:                               ; @.str.4
	.asciz	"server shutting down\n"

	.comm	_shutdown_mode,8,3              ; @shutdown_mode
	.comm	_SMART_MODE,8,3                 ; @SMART_MODE
	.comm	_backup_file,4,2                ; @backup_file
	.comm	_DB_IN_ARCHIVE_RECOVERY,8,3     ; @DB_IN_ARCHIVE_RECOVERY
l_.str.5:                               ; @.str.5
	.asciz	"WARNING: online backup mode is active\nShutdown will not complete until pg_stop_backup() is called.\n\n"

l_.str.6:                               ; @.str.6
	.asciz	"waiting for server to shut down..."

	.comm	_wait_seconds,4,2               ; @wait_seconds
	.comm	_WAITS_PER_SEC,4,2              ; @WAITS_PER_SEC
l_.str.7:                               ; @.str.7
	.asciz	"."

	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
l_.str.8:                               ; @.str.8
	.asciz	" failed\n"

l_.str.9:                               ; @.str.9
	.asciz	"%s: server does not shut down\n"

l_.str.10:                              ; @.str.10
	.asciz	"HINT: The \"-m fast\" option immediately disconnects sessions rather than\nwaiting for session-initiated disconnection.\n"

l_.str.11:                              ; @.str.11
	.asciz	" done\n"

l_.str.12:                              ; @.str.12
	.asciz	"server stopped\n"

	.no_dead_strip	_do_stop
.subsections_via_symbols
