	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_whole_file
_read_whole_file:                       ## @read_whole_file
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	-48(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movl	-48(%rbp), %eax
	movq	_MaxAllocSize@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movl	-48(%rbp), %eax
LBB0_4:
	movslq	%eax, %r13
	movq	_PG_BINARY_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_AllocateFile
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_6:
	leaq	1(%r13), %rdi
	callq	_palloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_fread
	movl	%eax, (%r14)
	movq	%r12, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_8:
	movq	%r12, %rdi
	callq	_FreeFile
	movslq	(%r14), %rax
	movb	$0, (%rbx,%rax)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not stat file \"%s\": %m"

	.comm	_MaxAllocSize,4,2               ## @MaxAllocSize
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ## @ERRCODE_PROGRAM_LIMIT_EXCEEDED
L_.str.1:                               ## @.str.1
	.asciz	"file \"%s\" is too large"

	.comm	_PG_BINARY_R,4,2                ## @PG_BINARY_R
L_.str.2:                               ## @.str.2
	.asciz	"could not open file \"%s\" for reading: %m"

L_.str.3:                               ## @.str.3
	.asciz	"could not read file \"%s\": %m"

	.no_dead_strip	_read_whole_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_whole_file
_read_whole_file:                       ; @read_whole_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	add	x1, sp, #8
	bl	_stat
Lloh0:
	adrp	x24, _ERROR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ERROR@GOTPAGEOFF]
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	w21, [x24]
	bl	_errcode_for_file_access
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_2:
	ldr	w8, [sp, #8]
Lloh4:
	adrp	x9, _MaxAllocSize@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MaxAllocSize@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.3:
	ldr	w21, [x24]
Lloh7:
	adrp	x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERRCODE_PROGRAM_LIMIT_EXCEEDED@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_errcode
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
	ldr	w8, [sp, #8]
LBB0_4:
	sxtw	x23, w8
Lloh12:
	adrp	x8, _PG_BINARY_R@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PG_BINARY_R@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_AllocateFile
	mov	x21, x0
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w22, [x24]
	bl	_errcode_for_file_access
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_6:
	add	x0, x23, #1
	bl	_palloc
	mov	x22, x0
	mov	w1, #1
	mov	x2, x23
	mov	x3, x21
	bl	_fread
	str	w0, [x19]
	mov	x0, x21
	bl	_ferror
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w23, [x24]
	bl	_errcode_for_file_access
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_8:
	mov	x0, x21
	bl	_FreeFile
	ldrsw	x8, [x19]
	strb	wzr, [x22, x8]
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not stat file \"%s\": %m"

	.comm	_MaxAllocSize,4,2               ; @MaxAllocSize
	.comm	_ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,2 ; @ERRCODE_PROGRAM_LIMIT_EXCEEDED
l_.str.1:                               ; @.str.1
	.asciz	"file \"%s\" is too large"

	.comm	_PG_BINARY_R,4,2                ; @PG_BINARY_R
l_.str.2:                               ; @.str.2
	.asciz	"could not open file \"%s\" for reading: %m"

l_.str.3:                               ; @.str.3
	.asciz	"could not read file \"%s\": %m"

	.no_dead_strip	_read_whole_file
.subsections_via_symbols
