	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdread                         ## -- Begin function mdread
	.p2align	4, 0x90
_mdread:                                ## @mdread
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	12(%rdi), %edx
	movl	8(%rdi), %ecx
	movl	(%rdi), %r9d
	movl	4(%rdi), %r8d
	movl	%esi, %edi
	movl	%r13d, %esi
	callq	_TRACE_POSTGRESQL_SMGR_MD_READ_START
	movq	_EXTENSION_FAIL@GOTPCREL(%rip), %rax
	movq	_EXTENSION_CREATE_RECOVERY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	callq	__mdfd_getseg
	movq	%rax, %r12
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_RELSEG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %eax
	cltd
	idivl	%esi
	movl	%edx, %ebx
	imull	%ecx, %ebx
	imull	%ecx, %esi
	xorl	%edi, %edi
	cmpl	%esi, %ebx
	setl	%dil
	callq	_Assert
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edi
	movq	_BLCKSZ@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_WAIT_EVENT_DATA_FILE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %ecx
	callq	_FileRead
	movl	%eax, %ebx
	movl	12(%r14), %edx
	movl	8(%r14), %ecx
	movl	(%r14), %r9d
	movl	4(%r14), %r8d
	movl	(%r12), %eax
	movl	%r15d, %edi
	movl	%r13d, %esi
	pushq	%rax
	pushq	%rbx
	callq	_TRACE_POSTGRESQL_SMGR_MD_READ_DONE
	addq	$16, %rsp
	cmpl	(%r12), %ebx
	jne	LBB0_1
## %bb.5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	testl	%ebx, %ebx
	jns	LBB0_3
## %bb.2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_FilePathName
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_3:
	movq	_zero_damaged_pages@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_InRecovery@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_4
## %bb.6:
	movl	(%r12), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MemSet                         ## TAILCALL
LBB0_4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_DATA_CORRUPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_FilePathName
	movl	(%r12), %r8d
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ereport                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTENSION_FAIL,4,2             ## @EXTENSION_FAIL
	.comm	_EXTENSION_CREATE_RECOVERY,4,2  ## @EXTENSION_CREATE_RECOVERY
	.comm	_BLCKSZ,4,2                     ## @BLCKSZ
	.comm	_RELSEG_SIZE,4,2                ## @RELSEG_SIZE
	.comm	_WAIT_EVENT_DATA_FILE_READ,4,2  ## @WAIT_EVENT_DATA_FILE_READ
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not read block %u in file \"%s\": %m"

	.comm	_zero_damaged_pages,8,3         ## @zero_damaged_pages
	.comm	_InRecovery,8,3                 ## @InRecovery
	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ## @ERRCODE_DATA_CORRUPTED
L_.str.1:                               ## @.str.1
	.asciz	"could not read block %u in file \"%s\": read only %d of %d bytes"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdread                         ; -- Begin function mdread
	.p2align	2
_mdread:                                ; @mdread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x23, x1
	mov	x24, x0
	ldp	w3, w2, [x0, #8]
	ldp	w5, w4, [x0]
	mov	x0, x1
	mov	x1, x19
	bl	_TRACE_POSTGRESQL_SMGR_MD_READ_START
Lloh0:
	adrp	x8, _EXTENSION_FAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTENSION_FAIL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EXTENSION_CREATE_RECOVERY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXTENSION_CREATE_RECOVERY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x24
	mov	x1, x23
	mov	x2, x19
	mov	w3, #0
	bl	__mdfd_getseg
	mov	x21, x0
Lloh6:
	adrp	x25, _BLCKSZ@GOTPAGE
Lloh7:
	ldr	x25, [x25, _BLCKSZ@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh8:
	adrp	x9, _RELSEG_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RELSEG_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	sdiv	w10, w19, w9
	msub	w10, w10, w9, w19
	mul	w22, w10, w8
	mul	w8, w9, w8
	cmp	w22, w8
	cset	w0, lt
	bl	_Assert
	ldr	w0, [x21]
	ldr	w2, [x25]
Lloh11:
	adrp	x8, _WAIT_EVENT_DATA_FILE_READ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WAIT_EVENT_DATA_FILE_READ@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	mov	x1, x20
	mov	x3, x22
	bl	_FileRead
	mov	x22, x0
	ldp	w3, w2, [x24, #8]
	ldp	w5, w4, [x24]
	ldr	w7, [x25]
	mov	x0, x23
	mov	x1, x19
	mov	x6, x22
	bl	_TRACE_POSTGRESQL_SMGR_MD_READ_DONE
	ldr	w8, [x25]
	cmp	w22, w8
	b.ne	LBB0_2
; %bb.1:
	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
	add	sp, sp, #96
	ret
LBB0_2:
	tbz	w22, #31, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w23, [x8]
	bl	_errcode_for_file_access
	ldr	w0, [x21]
	bl	_FilePathName
	mov	x2, x0
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_4:
Lloh19:
	adrp	x8, _zero_damaged_pages@GOTPAGE
Lloh20:
	ldr	x8, [x8, _zero_damaged_pages@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
Lloh22:
	adrp	x9, _InRecovery@GOTPAGE
Lloh23:
	ldr	x9, [x9, _InRecovery@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w2, [x25]
	mov	x0, x20
	mov	w1, #0
	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
	add	sp, sp, #96
	b	_MemSet
LBB0_6:
Lloh25:
	adrp	x8, _ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w20, [x8]
Lloh28:
	adrp	x8, _ERRCODE_DATA_CORRUPTED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERRCODE_DATA_CORRUPTED@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_errcode
	ldr	w0, [x21]
	bl	_FilePathName
	mov	x2, x0
	ldr	w8, [x25]
	stp	x22, x8, [sp]
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	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
	add	sp, sp, #96
	b	_ereport
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTENSION_FAIL,4,2             ; @EXTENSION_FAIL
	.comm	_EXTENSION_CREATE_RECOVERY,4,2  ; @EXTENSION_CREATE_RECOVERY
	.comm	_BLCKSZ,4,2                     ; @BLCKSZ
	.comm	_RELSEG_SIZE,4,2                ; @RELSEG_SIZE
	.comm	_WAIT_EVENT_DATA_FILE_READ,4,2  ; @WAIT_EVENT_DATA_FILE_READ
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not read block %u in file \"%s\": %m"

	.comm	_zero_damaged_pages,8,3         ; @zero_damaged_pages
	.comm	_InRecovery,8,3                 ; @InRecovery
	.comm	_ERRCODE_DATA_CORRUPTED,4,2     ; @ERRCODE_DATA_CORRUPTED
l_.str.1:                               ; @.str.1
	.asciz	"could not read block %u in file \"%s\": read only %d of %d bytes"

.subsections_via_symbols
