	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RetrieveWalSegSize             ## -- Begin function RetrieveWalSegSize
	.p2align	4, 0x90
_RetrieveWalSegSize:                    ## @RetrieveWalSegSize
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_Assert
	movq	%rbx, %rdi
	callq	_PQserverVersion
	movq	_MINIMUM_VERSION_FOR_SHOW_CMD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.1:
	movq	_DEFAULT_XLOG_SEG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_WalSegSz@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_16:
	movl	$1, %ebx
	jmp	LBB0_17
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_PQexec
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	%r14, %rdi
	callq	_PQntuples
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_PQnfields
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetvalue
	leaq	L_.str.3(%rip), %rsi
	leaq	-32(%rbp), %rdx
	leaq	-27(%rbp), %rcx
	movl	%eax, %edi
	callq	_sscanf
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.10:
	leaq	L_.str.5(%rip), %rsi
	leaq	-27(%rbp), %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	leaq	L_.str.6(%rip), %rsi
	leaq	-27(%rbp), %rdi
	callq	_strcmp
	testq	%rax, %rax
	movl	$1073741824, %eax               ## imm = 0x40000000
	movl	$1, %edi
	cmovel	%eax, %edi
	jmp	LBB0_13
LBB0_3:
	movq	%rbx, %rdi
	callq	_PQerrorMessage
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_4
LBB0_7:
	movq	%r14, %rdi
	callq	_PQntuples
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_PQnfields
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	movl	$1, %r8d
	xorl	%eax, %eax
	callq	_pg_log_error
LBB0_4:
	movq	%r14, %rdi
	callq	_PQclear
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_17
LBB0_11:
	movl	$1048576, %edi                  ## imm = 0x100000
LBB0_13:
	imull	-32(%rbp), %edi
	movq	_WalSegSz@GOTPCREL(%rip), %rbx
	movl	%edi, (%rbx)
	callq	_IsValidWalSegSize
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movq	%r14, %rdi
	callq	_PQclear
	jmp	LBB0_16
LBB0_14:
	movl	(%rbx), %edx
	leaq	L_.str.7(%rip), %rdi
	leaq	L_.str.8(%rip), %rsi
	callq	_ngettext
	movslq	%eax, %rdi
	movl	(%rbx), %esi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pg_log_error
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_MINIMUM_VERSION_FOR_SHOW_CMD,8,3 ## @MINIMUM_VERSION_FOR_SHOW_CMD
	.comm	_DEFAULT_XLOG_SEG_SIZE,4,2      ## @DEFAULT_XLOG_SEG_SIZE
	.comm	_WalSegSz,4,2                   ## @WalSegSz
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SHOW wal_segment_size"

	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
L_.str.1:                               ## @.str.1
	.asciz	"could not send replication command \"%s\": %s"

L_.str.2:                               ## @.str.2
	.asciz	"could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"

L_.str.3:                               ## @.str.3
	.asciz	"%d%s"

L_.str.4:                               ## @.str.4
	.asciz	"WAL segment size could not be parsed"

L_.str.5:                               ## @.str.5
	.asciz	"MB"

L_.str.6:                               ## @.str.6
	.asciz	"GB"

L_.str.7:                               ## @.str.7
	.asciz	"WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"

L_.str.8:                               ## @.str.8
	.asciz	"WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RetrieveWalSegSize             ; -- Begin function RetrieveWalSegSize
	.p2align	2
_RetrieveWalSegSize:                    ; @RetrieveWalSegSize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_Assert
	mov	x0, x20
	bl	_PQserverVersion
Lloh0:
	adrp	x8, _MINIMUM_VERSION_FOR_SHOW_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MINIMUM_VERSION_FOR_SHOW_CMD@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _DEFAULT_XLOG_SEG_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEFAULT_XLOG_SEG_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _WalSegSz@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WalSegSz@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
LBB0_2:
	mov	w0, #1
	b	LBB0_13
LBB0_3:
Lloh9:
	adrp	x21, l_.str@PAGE
Lloh10:
	add	x21, x21, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_PQexec
	mov	x19, x0
	bl	_PQresultStatus
Lloh11:
	adrp	x8, _PGRES_TUPLES_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PGRES_TUPLES_OK@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_PQntuples
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_PQnfields
	cmp	w0, #0
	b.le	LBB0_10
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetvalue
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #40
	sub	x3, x29, #35
	bl	_sscanf
	cmp	w0, #2
	b.ne	LBB0_14
; %bb.7:
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	sub	x0, x29, #35
	bl	_strcmp
	cbz	x0, LBB0_15
; %bb.8:
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	sub	x0, x29, #35
	bl	_strcmp
	cmp	x0, #0
	mov	w8, #1073741824
	csinc	w8, w8, wzr, eq
	b	LBB0_16
LBB0_9:
	mov	x0, x20
	bl	_PQerrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_PQntuples
	mov	x20, x0
	mov	x0, x19
	bl	_PQnfields
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #1
	stp	x8, x8, [sp, #16]
	stp	x20, x0, [sp]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_pg_log_error
	mov	x0, x19
	bl	_PQclear
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	add	sp, sp, #96
	ret
LBB0_14:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_19
LBB0_15:
	mov	w8, #1048576
LBB0_16:
	ldr	w9, [sp, #40]
	mul	w0, w9, w8
Lloh26:
	adrp	x20, _WalSegSz@GOTPAGE
Lloh27:
	ldr	x20, [x20, _WalSegSz@GOTPAGEOFF]
	str	w0, [x20]
	bl	_IsValidWalSegSize
	cbz	w0, LBB0_18
; %bb.17:
	mov	x0, x19
	bl	_PQclear
	b	LBB0_2
LBB0_18:
	ldr	w2, [x20]
Lloh28:
	adrp	x0, l_.str.7@PAGE
Lloh29:
	add	x0, x0, l_.str.7@PAGEOFF
Lloh30:
	adrp	x1, l_.str.8@PAGE
Lloh31:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_ngettext
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	ldr	w8, [x20]
	str	x8, [sp]
LBB0_19:
	bl	_pg_log_error
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MINIMUM_VERSION_FOR_SHOW_CMD,8,3 ; @MINIMUM_VERSION_FOR_SHOW_CMD
	.comm	_DEFAULT_XLOG_SEG_SIZE,4,2      ; @DEFAULT_XLOG_SEG_SIZE
	.comm	_WalSegSz,4,2                   ; @WalSegSz
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SHOW wal_segment_size"

	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
l_.str.1:                               ; @.str.1
	.asciz	"could not send replication command \"%s\": %s"

l_.str.2:                               ; @.str.2
	.asciz	"could not fetch WAL segment size: got %d rows and %d fields, expected %d rows and %d or more fields"

l_.str.3:                               ; @.str.3
	.asciz	"%d%s"

l_.str.4:                               ; @.str.4
	.asciz	"WAL segment size could not be parsed"

l_.str.5:                               ; @.str.5
	.asciz	"MB"

l_.str.6:                               ; @.str.6
	.asciz	"GB"

l_.str.7:                               ; @.str.7
	.asciz	"WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d byte"

l_.str.8:                               ; @.str.8
	.asciz	"WAL segment size must be a power of two between 1 MB and 1 GB, but the remote server reported a value of %d bytes"

.subsections_via_symbols
