	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sts_flush_chunk
_sts_flush_chunk:                       ## @sts_flush_chunk
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_STS_CHUNK_PAGES@GOTPCREL(%rip), %r12
	movq	_BLCKSZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	imulq	(%r12), %r14
	movl	32(%rdi), %edi
	movq	16(%rbx), %rsi
	movq	%r14, %rdx
	callq	_BufFileWrite
	cmpq	%r14, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	16(%rbx), %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_memset
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	(%r12), %rax
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdx
	movq	(%rdx), %rdx
	addq	%rax, (%rdx,%rcx,8)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STS_CHUNK_PAGES,8,3            ## @STS_CHUNK_PAGES
	.comm	_BLCKSZ,8,3                     ## @BLCKSZ
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not write to temporary file: %m"

	.no_dead_strip	_sts_flush_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sts_flush_chunk
_sts_flush_chunk:                       ; @sts_flush_chunk
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _STS_CHUNK_PAGES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STS_CHUNK_PAGES@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _BLCKSZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BLCKSZ@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	mul	x20, x9, x8
	ldr	w0, [x0, #32]
	ldr	x1, [x19, #16]
	mov	x2, x20
	bl	_BufFileWrite
	cmp	x0, x20
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	bl	_errcode_for_file_access
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_2:
	ldr	x0, [x19, #16]
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldp	x9, x8, [x19, #8]
	ldr	x8, [x8]
	str	x8, [x19, #24]
	ldr	x8, [x22]
	ldr	x10, [x19]
	ldr	x9, [x9]
	lsl	x10, x10, #3
	ldr	x11, [x9, x10]
	add	x8, x11, x8
	str	x8, [x9, x10]
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STS_CHUNK_PAGES,8,3            ; @STS_CHUNK_PAGES
	.comm	_BLCKSZ,8,3                     ; @BLCKSZ
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not write to temporary file: %m"

	.no_dead_strip	_sts_flush_chunk
.subsections_via_symbols
