	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libpqGetFile                   ## -- Begin function libpqGetFile
	.p2align	4, 0x90
_libpqGetFile:                          ## @libpqGetFile
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -56(%rbp)
	movq	_conn@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %r8
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	pushq	$1
	pushq	$0
	callq	_PQexecParams
	addq	$16, %rsp
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_PQresultStatus
	movq	_PGRES_TUPLES_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_PQresultErrorMessage
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_2:
	movq	%r12, %rdi
	callq	_PQntuples
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetisnull
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_5:
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetlength
	movl	%eax, %ebx
	leal	1(%rbx), %edi
	callq	_pg_malloc
	movq	%rax, %r13
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_PQgetvalue
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rbx
	movb	$0, (%r13,%rbx)
	movq	%r12, %rdi
	callq	_PQclear
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_pg_log_debug
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movq	%rbx, (%r14)
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_conn,4,2                       ## @conn
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SELECT pg_read_binary_file($1)"

	.comm	_PGRES_TUPLES_OK,8,3            ## @PGRES_TUPLES_OK
L_.str.1:                               ## @.str.1
	.asciz	"could not fetch remote file \"%s\": %s"

L_.str.2:                               ## @.str.2
	.asciz	"unexpected result set while fetching remote file \"%s\""

L_.str.3:                               ## @.str.3
	.asciz	"fetched file \"%s\", length %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libpqGetFile                   ; -- Begin function libpqGetFile
	.p2align	2
_libpqGetFile:                          ; @libpqGetFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	str	x0, [sp, #16]
Lloh3:
	adrp	x8, _conn@GOTPAGE
Lloh4:
	ldr	x8, [x8, _conn@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x4, sp, #16
	mov	w2, #1
	mov	x3, #0
	mov	x5, #0
	mov	x6, #0
	mov	w7, #1
	bl	_PQexecParams
	mov	x21, x0
	bl	_PQresultStatus
Lloh8:
	adrp	x8, _PGRES_TUPLES_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PGRES_TUPLES_OK@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_PQresultErrorMessage
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pg_fatal
LBB0_2:
	mov	x0, x21
	bl	_PQntuples
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetisnull
	cbz	x0, LBB0_5
LBB0_4:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pg_fatal
LBB0_5:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetlength
	mov	x23, x0
	add	w0, w0, #1
	bl	_pg_malloc
	mov	x22, x0
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	bl	_PQgetvalue
	mov	x1, x0
	mov	x0, x22
	mov	x2, x23
	bl	_memcpy
	sxtw	x24, w23
	strb	wzr, [x22, x24]
	mov	x0, x21
	bl	_PQclear
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x23
	bl	_pg_log_debug
	cbz	x19, LBB0_7
; %bb.6:
	str	x24, [x19]
LBB0_7:
	ldr	x8, [sp, #24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_conn,4,2                       ; @conn
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SELECT pg_read_binary_file($1)"

	.comm	_PGRES_TUPLES_OK,8,3            ; @PGRES_TUPLES_OK
l_.str.1:                               ; @.str.1
	.asciz	"could not fetch remote file \"%s\": %s"

l_.str.2:                               ; @.str.2
	.asciz	"unexpected result set while fetching remote file \"%s\""

l_.str.3:                               ; @.str.3
	.asciz	"fetched file \"%s\", length %d"

.subsections_via_symbols
