	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_major_server_version       ## -- Begin function get_major_server_version
	.p2align	4, 0x90
_get_major_server_version:              ## @get_major_server_version
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%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, %r12
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_snprintf
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_fopen
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	callq	_pg_fatal
LBB0_2:
	movl	8(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_fscanf
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_sscanf
	testl	%eax, %eax
	jg	LBB0_5
LBB0_4:
	movq	(%r14), %rsi
	leaq	L_.str.5(%rip), %rdi
	callq	_pg_fatal
LBB0_5:
	movq	%r15, %rdi
	callq	_fclose
	movl	-48(%rbp), %eax
	imull	$100, -44(%rbp), %edx
	xorl	%ecx, %ecx
	cmpl	$10, %eax
	cmovll	%edx, %ecx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	-40(%rbp), %rdx
	jne	LBB0_7
## %bb.6:
	imull	$10000, %eax, %eax              ## imm = 0x2710
	addl	%ecx, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/PG_VERSION"

L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"could not open version file: %s\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"%d.%d"

L_.str.5:                               ## @.str.5
	.asciz	"could not parse PG_VERSION file from %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_major_server_version       ; -- Begin function get_major_server_version
	.p2align	2
_get_major_server_version:              ; @get_major_server_version
	.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, 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	x8, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	stur	xzr, [x29, #-48]
	ldr	x3, [x0]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_snprintf
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_fopen
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_pg_fatal
LBB0_2:
	ldr	w2, [x19, #8]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_fscanf
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	sub	x2, x29, #44
	sub	x3, x29, #48
	bl	_sscanf
	cmp	w0, #0
	b.gt	LBB0_5
LBB0_4:
	ldr	x1, [x19]
Lloh18:
	adrp	x0, l_.str.5@PAGE
Lloh19:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pg_fatal
LBB0_5:
	mov	x0, x20
	bl	_fclose
	ldp	w9, w8, [x29, #-48]
	mov	w10, #100
	mul	w9, w9, w10
	cmp	w8, #10
	csel	w9, w9, wzr, lt
	ldur	x10, [x29, #-40]
Lloh20:
	adrp	x11, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x11, [x11, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x11, [x11]
	cmp	x11, x10
	b.ne	LBB0_7
; %bb.6:
	mov	w10, #10000
	madd	w0, w8, w10, w9
	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_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/PG_VERSION"

l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"could not open version file: %s\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"%d.%d"

l_.str.5:                               ; @.str.5
	.asciz	"could not parse PG_VERSION file from %s\n"

.subsections_via_symbols
