	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xdr_shrink_bufhead
_xdr_shrink_bufhead:                    ## @xdr_shrink_bufhead
	.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, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %r15d
	movq	48(%rdi), %r13
	movq	40(%rdi), %r12
	xorl	%edi, %edi
	cmpq	%rsi, (%r12)
	setb	%dil
	callq	_BUG_ON
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rdx
	subq	%rbx, %rdx
	jbe	LBB0_3
## %bb.2:
	movq	8(%r13), %rsi
	leaq	(%rsi,%rbx), %rdi
	callq	_memmove
	movq	(%r13), %rax
LBB0_3:
	movq	%r15, %rdx
	subq	%rbx, %rdx
	movq	%rbx, %rsi
	cmovbq	%r15, %rsi
	movq	%rbx, %rdi
	subq	%rsi, %rdi
	movq	%rax, %rcx
	subq	%rdi, %rcx
	cmpq	%rcx, %rsi
	cmovbq	%rsi, %rcx
	cmpq	%rdi, %rax
	jbe	LBB0_6
## %bb.4:
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	addq	%rdi, %rdx
	addq	8(%r13), %rdi
	movl	32(%r14), %esi
	addq	24(%r14), %rdx
	callq	__copy_from_pages
LBB0_6:
	cmpq	%rbx, %r15
	jae	LBB0_8
## %bb.7:
	movq	%rbx, %rax
	subq	%r15, %rax
	movq	(%r13), %rdx
	movq	8(%r13), %rdi
	cmpq	%rdx, %rax
	cmovbq	%rax, %rdx
	movq	8(%r12), %rsi
	addq	(%r12), %rsi
	subq	%rax, %rsi
	callq	_memcpy
LBB0_8:
	testq	%r15, %r15
	je	LBB0_12
## %bb.9:
	movq	%rbx, %r13
	negq	%r13
	cmpq	%rbx, %r15
	jbe	LBB0_11
## %bb.10:
	movl	32(%r14), %edi
	movq	24(%r14), %rdx
	leaq	(%rdx,%rbx), %rsi
	movl	%r15d, %ecx
	subl	%ebx, %ecx
	callq	__shift_data_right_pages
LBB0_11:
	cmpq	%rbx, %r15
	cmovaeq	%rbx, %r15
	movl	32(%r14), %edi
	movq	24(%r14), %rsi
	movq	8(%r12), %rdx
	addq	(%r12), %rdx
	addq	%r13, %rdx
	movq	%r15, %rcx
	callq	__copy_to_pages
LBB0_12:
	subq	%rbx, (%r12)
	movq	8(%r14), %rax
	movq	16(%r14), %rcx
	subq	%rbx, %rax
	movq	%rax, 8(%r14)
	cmpq	%rax, %rcx
	jle	LBB0_14
## %bb.13:
	movq	%rax, 16(%r14)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xdr_shrink_bufhead
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xdr_shrink_bufhead
_xdr_shrink_bufhead:                    ; @xdr_shrink_bufhead
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldr	w22, [x0]
	ldp	x21, x23, [x0, #40]
	ldr	x8, [x21]
	cmp	x8, x1
	cset	w0, lo
	bl	_BUG_ON
	ldr	x8, [x23]
	cbz	x8, LBB0_7
; %bb.1:
	subs	x2, x8, x20
	b.ls	LBB0_3
; %bb.2:
	ldr	x1, [x23, #8]
	add	x0, x1, x20
	bl	_memmove
	ldr	x8, [x23]
LBB0_3:
	subs	x9, x22, x20
	csel	x11, x22, x20, lo
	sub	x10, x20, x11
	subs	x12, x8, x10
	cmp	x11, x12
	csel	x3, x11, x12, lo
	cmp	x8, x10
	ccmp	x3, #0, #4, hi
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x23, #8]
	add	x0, x8, x10
	ldr	w1, [x19, #32]
	ldr	x8, [x19, #24]
	add	x9, x9, x10
	add	x2, x9, x8
	bl	__copy_from_pages
LBB0_5:
	cmp	x22, x20
	b.hs	LBB0_7
; %bb.6:
	ldp	x8, x0, [x23]
	sub	x9, x20, x22
	cmp	x9, x8
	csel	x2, x9, x8, lo
	ldp	x10, x8, [x21]
	add	x8, x8, x10
	sub	x1, x8, x9
	bl	_memcpy
LBB0_7:
	cbz	w22, LBB0_11
; %bb.8:
	neg	x23, x20
	cmp	x22, x20
	b.ls	LBB0_10
; %bb.9:
	ldr	w0, [x19, #32]
	ldr	x2, [x19, #24]
	add	x1, x2, x20
	sub	w3, w22, w20
	bl	__shift_data_right_pages
LBB0_10:
	cmp	x22, x20
	csel	x3, x22, x20, lo
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #24]
	ldp	x9, x8, [x21]
	add	x8, x8, x9
	add	x2, x8, x23
	bl	__copy_to_pages
LBB0_11:
	ldr	x8, [x21]
	sub	x8, x8, x20
	str	x8, [x21]
	ldp	x8, x9, [x19, #8]
	sub	x8, x8, x20
	cmp	x9, x8
	str	x8, [x19, #8]
	b.le	LBB0_13
; %bb.12:
	str	x8, [x19, #16]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xdr_shrink_bufhead
.subsections_via_symbols
