	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tuplestore_puttuple_common
_tuplestore_puttuple_common:            ## @tuplestore_puttuple_common
	.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, %r15
	incl	72(%rdi)
	movq	%rsi, %r14
	movl	(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_22
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_29
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_47
## %bb.3:
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.4:
	movq	32(%r15), %rax
	xorl	%edx, %edx
	cmpl	$1, %ecx
	jne	LBB0_5
LBB0_13:
	testb	$1, %cl
	je	LBB0_17
## %bb.14:
	cmpl	$0, (%rax)
	je	LBB0_17
## %bb.15:
	cmpl	8(%r15), %edx
	je	LBB0_17
## %bb.16:
	movl	$0, (%rax)
	movl	56(%r15), %ecx
	movl	%ecx, 12(%rax)
LBB0_17:
	movl	52(%r15), %eax
	movl	56(%r15), %ecx
	leal	-1(%rax), %edx
	cmpl	%edx, %ecx
	jl	LBB0_19
## %bb.18:
	movq	%r15, %rdi
	callq	_grow_memtuples
	movl	56(%r15), %eax
	xorl	%edi, %edi
	cmpl	52(%r15), %eax
	setl	%dil
	callq	_Assert
	movl	52(%r15), %eax
	movl	56(%r15), %ecx
LBB0_19:
	movq	64(%r15), %rdx
	leal	1(%rcx), %esi
	movl	%esi, 56(%r15)
	movslq	%ecx, %rcx
	movq	%r14, (%rdx,%rcx,8)
	cmpl	%eax, %esi
	jge	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	callq	_LACKMEM
	testl	%eax, %eax
	je	LBB0_48
LBB0_21:
	xorl	%eax, %eax
	callq	_PrepareTempTablespaces
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movl	48(%r15), %eax
	movl	%eax, (%r14)
	movl	44(%r15), %edi
	callq	_BufFileCreateTemp
	movl	%eax, 40(%r15)
	movl	%ebx, (%r14)
	movq	_EXEC_FLAG_BACKWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	16(%r15), %eax
	setne	%cl
	movl	%ecx, 12(%r15)
	movl	$128, (%r15)
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dumptuples                     ## TAILCALL
LBB0_22:
	movl	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_28
## %bb.23:
	movq	32(%r15), %rbx
	addq	$4, %rbx
	xorl	%r12d, %r12d
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_24 Depth=1
	incl	%r12d
	addq	$16, %rbx
	cmpl	%eax, %r12d
	jge	LBB0_28
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -4(%rbx)
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	cmpl	8(%r15), %r12d
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	movl	$0, -4(%rbx)
	movl	40(%r15), %edi
	leaq	4(%rbx), %rsi
	movq	%rbx, %rdx
	callq	_BufFileTell
	movl	4(%r15), %eax
	jmp	LBB0_27
LBB0_29:
	movq	32(%r15), %rax
	movslq	8(%r15), %rcx
	shlq	$4, %rcx
	cmpl	$0, (%rax,%rcx)
	jne	LBB0_31
## %bb.30:
	movl	40(%r15), %edi
	leaq	(%rax,%rcx), %rsi
	addq	$8, %rsi
	leaq	(%rax,%rcx), %rdx
	addq	$4, %rdx
	callq	_BufFileTell
LBB0_31:
	movl	40(%r15), %edi
	movl	20(%r15), %edx
	movl	24(%r15), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_BufFileSeek
	testl	%eax, %eax
	je	LBB0_33
## %bb.32:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_33:
	movl	$128, (%r15)
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_28
## %bb.34:
	movq	32(%r15), %rax
	xorl	%edx, %edx
	cmpl	$1, %ecx
	jne	LBB0_35
LBB0_43:
	testb	$1, %cl
	je	LBB0_28
## %bb.44:
	cmpl	$0, (%rax)
	je	LBB0_28
## %bb.45:
	cmpl	8(%r15), %edx
	je	LBB0_28
## %bb.46:
	movl	$0, (%rax)
	movl	24(%r15), %ecx
	movl	%ecx, 8(%rax)
	movl	20(%r15), %ecx
	movl	%ecx, 4(%rax)
LBB0_28:
	movq	%r15, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WRITETUP                       ## TAILCALL
LBB0_47:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elog                           ## TAILCALL
LBB0_5:
	movl	%ecx, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$32, %rax
	addl	$2, %edx
	cmpl	%edx, %esi
	je	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	8(%r15), %edx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, (%rax)
	movl	56(%r15), %edi
	movl	%edi, 12(%rax)
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, 16(%rax)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	leal	1(%rdx), %edi
	cmpl	8(%r15), %edi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$0, 16(%rax)
	movl	56(%r15), %edi
	movl	%edi, 28(%rax)
	jmp	LBB0_12
LBB0_35:
	movl	%ecx, %esi
	andl	$-2, %esi
	xorl	%edx, %edx
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_36 Depth=1
	addq	$32, %rax
	addl	$2, %edx
	cmpl	%edx, %esi
	je	LBB0_43
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rax)
	je	LBB0_39
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	cmpl	8(%r15), %edx
	je	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=1
	movl	$0, (%rax)
	movl	24(%r15), %edi
	movl	%edi, 8(%rax)
	movl	20(%r15), %edi
	movl	%edi, 4(%rax)
LBB0_39:                                ##   in Loop: Header=BB0_36 Depth=1
	cmpl	$0, 16(%rax)
	je	LBB0_42
## %bb.40:                              ##   in Loop: Header=BB0_36 Depth=1
	leal	1(%rdx), %edi
	cmpl	8(%r15), %edi
	je	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_36 Depth=1
	movl	$0, 16(%rax)
	movl	24(%r15), %edi
	movl	%edi, 24(%rax)
	movl	20(%r15), %edi
	movl	%edi, 20(%rax)
	jmp	LBB0_42
LBB0_48:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CurrentResourceOwner,4,2       ## @CurrentResourceOwner
	.comm	_EXEC_FLAG_BACKWARD,4,2         ## @EXEC_FLAG_BACKWARD
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not seek in tuplestore temporary file: %m"

L_.str.1:                               ## @.str.1
	.asciz	"invalid tuplestore state"

	.no_dead_strip	_tuplestore_puttuple_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tuplestore_puttuple_common
_tuplestore_puttuple_common:            ; @tuplestore_puttuple_common
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0, #72]
	add	w8, w8, #1
	str	w8, [x0, #72]
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_15
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_26
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.4:
	mov	w9, #0
	ldr	x10, [x19, #32]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x10, x10, #16
	add	w9, w9, #1
	cmp	w8, w9
	b.eq	LBB0_27
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cbz	w11, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w11, [x19, #8]
	cmp	w9, w11
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [x10]
	ldr	w11, [x19, #56]
	str	w11, [x10, #12]
	b	LBB0_5
LBB0_9:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.10:
	mov	w22, #0
	ldr	x9, [x19, #32]
	add	x21, x9, #4
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w22, w22, #1
	add	x21, x21, #16
	cmp	w22, w8
	b.ge	LBB0_25
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x21, #-4]
	cbz	w9, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x19, #8]
	cmp	w22, w9
	b.eq	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	stur	wzr, [x21, #-4]
	ldr	w0, [x19, #40]
	add	x1, x21, #4
	mov	x2, x21
	bl	_BufFileTell
	ldr	w8, [x19, #4]
	b	LBB0_11
LBB0_15:
	ldr	x8, [x19, #32]
	ldrsw	x9, [x19, #8]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
	cbnz	w10, LBB0_17
; %bb.16:
	ldr	w0, [x19, #40]
	add	x8, x8, x9, lsl #4
	add	x1, x8, #8
	add	x2, x8, #4
	bl	_BufFileTell
LBB0_17:
	ldr	w0, [x19, #40]
	ldp	w2, w1, [x19, #20]
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_BufFileSeek
	cbz	w0, LBB0_19
; %bb.18:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	bl	_errcode_for_file_access
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_19:
	mov	w8, #128
	str	w8, [x19]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.20:
	mov	w9, #0
	ldr	x10, [x19, #32]
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x10, x10, #16
	add	w9, w9, #1
	cmp	w8, w9
	b.eq	LBB0_25
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cbz	w11, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	w11, [x19, #8]
	cmp	w9, w11
	b.eq	LBB0_21
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	str	wzr, [x10]
	ldur	d0, [x19, #20]
	stur	d0, [x10, #4]
	b	LBB0_21
LBB0_25:
	mov	x0, x19
	mov	x1, x20
	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
	b	_WRITETUP
LBB0_26:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	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
	b	_elog
LBB0_27:
	ldp	w9, w8, [x19, #52]
	sub	w10, w9, #1
	cmp	w8, w10
	b.lt	LBB0_29
; %bb.28:
	mov	x0, x19
	bl	_grow_memtuples
	ldp	w9, w8, [x19, #52]
	cmp	w8, w9
	cset	w0, lt
	bl	_Assert
	ldp	w9, w8, [x19, #52]
LBB0_29:
	ldr	x10, [x19, #64]
	add	w11, w8, #1
	str	w11, [x19, #56]
	str	x20, [x10, w8, sxtw #3]
	cmp	w11, w9
	b.ge	LBB0_31
; %bb.30:
	mov	x0, x19
	bl	_LACKMEM
	cbz	w0, LBB0_32
LBB0_31:
	bl	_PrepareTempTablespaces
Lloh13:
	adrp	x20, _CurrentResourceOwner@GOTPAGE
Lloh14:
	ldr	x20, [x20, _CurrentResourceOwner@GOTPAGEOFF]
	ldr	w21, [x20]
	ldp	w0, w8, [x19, #44]
	str	w8, [x20]
	bl	_BufFileCreateTemp
	str	w0, [x19, #40]
	str	w21, [x20]
	ldr	w8, [x19, #16]
Lloh15:
	adrp	x9, _EXEC_FLAG_BACKWARD@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EXEC_FLAG_BACKWARD@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x19, #12]
	mov	w8, #128
	str	w8, [x19]
	mov	x0, x19
	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
	b	_dumptuples
LBB0_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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CurrentResourceOwner,4,2       ; @CurrentResourceOwner
	.comm	_EXEC_FLAG_BACKWARD,4,2         ; @EXEC_FLAG_BACKWARD
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not seek in tuplestore temporary file: %m"

l_.str.1:                               ; @.str.1
	.asciz	"invalid tuplestore state"

	.no_dead_strip	_tuplestore_puttuple_common
.subsections_via_symbols
