	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_detoast_external_attr          ## -- Begin function detoast_external_attr
	.p2align	4, 0x90
_detoast_external_attr:                 ## @detoast_external_attr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_VARATT_IS_EXTERNAL_ONDISK
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_VARATT_IS_EXTERNAL_INDIRECT
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rsi
	callq	_VARATT_EXTERNAL_GET_POINTER
	callq	_VARATT_IS_EXTERNAL_INDIRECT
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_Assert
	callq	_VARATT_IS_EXTERNAL
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	callq	_VARSIZE_ANY
	movl	%eax, %edi
	callq	_palloc
	movq	%rax, %rbx
	callq	_VARSIZE_ANY
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_memcpy
	jmp	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_toast_fetch_datum              ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	callq	_VARATT_IS_EXTERNAL_EXPANDED
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_PointerGetDatum
	movl	%eax, %edi
	callq	_DatumGetEOHP
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_EOH_get_flat_size
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_palloc
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	callq	_EOH_flatten_into
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_detoast_external_attr          ; -- Begin function detoast_external_attr
	.p2align	2
_detoast_external_attr:                 ; @detoast_external_attr
	.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
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_VARATT_IS_EXTERNAL_ONDISK
	cbnz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_VARATT_IS_EXTERNAL_INDIRECT
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x1, x19
	bl	_VARATT_EXTERNAL_GET_POINTER
	bl	_VARATT_IS_EXTERNAL_INDIRECT
	cmp	x0, #0
	cset	w0, eq
	bl	_Assert
	bl	_VARATT_IS_EXTERNAL
	cbnz	x0, LBB0_1
; %bb.4:
	bl	_VARSIZE_ANY
	bl	_palloc
	mov	x19, x0
	bl	_VARSIZE_ANY
	mov	x2, x0
	mov	x0, x19
	bl	_memcpy
	b	LBB0_8
LBB0_5:
	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	_toast_fetch_datum
LBB0_6:
	mov	x0, x19
	bl	_VARATT_IS_EXTERNAL_EXPANDED
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_PointerGetDatum
	bl	_DatumGetEOHP
	mov	x20, x0
	bl	_EOH_get_flat_size
	mov	x21, x0
	bl	_palloc
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_EOH_flatten_into
LBB0_8:
	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
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
