	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pbuf_realloc                   ## -- Begin function pbuf_realloc
	.p2align	4, 0x90
_pbuf_realloc:                          ## @pbuf_realloc
	.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, %r14
	movq	%rdi, %rbx
	xorl	%esi, %esi
	testq	%rdi, %rdi
	setne	%sil
	leaq	L_.str(%rip), %rdi
	callq	_LWIP_ASSERT
	movq	(%rbx), %rax
	movq	_PBUF_POOL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_PBUF_ROM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_PBUF_RAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_PBUF_REF@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	sete	%al
	orb	%cl, %al
	orb	%dl, %al
	movzbl	%al, %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_LWIP_ASSERT
	movq	8(%rbx), %rcx
	cmpq	%r14, %rcx
	jle	LBB0_10
## %bb.1:
	movq	16(%rbx), %rax
	cmpq	%r14, %rax
	jge	LBB0_4
## %bb.2:
	movq	%r14, %rdx
	subq	%rcx, %rdx
	xorl	%r15d, %r15d
	cmpl	$65535, %edx                    ## imm = 0xFFFF
	setl	%r15b
	movslq	%edx, %r12
	leaq	L_.str.3(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	subq	%rax, %r14
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_LWIP_ASSERT
	addq	%r12, 8(%rbx)
	movq	24(%rbx), %rbx
	xorl	%esi, %esi
	testq	%rbx, %rbx
	setne	%sil
	movq	%r13, %rdi
	callq	_LWIP_ASSERT
	movq	16(%rbx), %rax
	cmpq	%rax, %r14
	jg	LBB0_3
LBB0_4:
	movq	(%rbx), %rcx
	movq	_PBUF_RAM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.5:
	cmpq	%rax, %r14
	je	LBB0_7
## %bb.6:
	movq	32(%rbx), %rsi
	subq	%rbx, %rsi
	sarq	$2, %rsi
	addq	%r14, %rsi
	movq	%rbx, %rdi
	callq	_mem_trim
	movq	%rax, %rbx
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	leaq	L_.str.4(%rip), %rdi
	callq	_LWIP_ASSERT
LBB0_7:
	movq	%r14, 16(%rbx)
	movq	%r14, 8(%rbx)
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_pbuf_free
LBB0_9:
	movq	$0, 24(%rbx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pbuf_realloc: p != NULL"

L_.str.1:                               ## @.str.1
	.asciz	"pbuf_realloc: sane p->type"

	.comm	_PBUF_POOL,8,3                  ## @PBUF_POOL
	.comm	_PBUF_ROM,8,3                   ## @PBUF_ROM
	.comm	_PBUF_RAM,8,3                   ## @PBUF_RAM
	.comm	_PBUF_REF,8,3                   ## @PBUF_REF
L_.str.2:                               ## @.str.2
	.asciz	"grow < max_u16_t"

L_.str.3:                               ## @.str.3
	.asciz	"pbuf_realloc: q != NULL"

L_.str.4:                               ## @.str.4
	.asciz	"mem_trim returned q == NULL"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pbuf_realloc                   ; -- Begin function pbuf_realloc
	.p2align	2
_pbuf_realloc:                          ; @pbuf_realloc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w1, ne
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LWIP_ASSERT
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _PBUF_POOL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PBUF_POOL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _PBUF_ROM@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PBUF_ROM@GOTPAGEOFF]
	cmp	x8, x9
Lloh7:
	ldr	x9, [x10]
	ccmp	x8, x9, #4, ne
Lloh8:
	adrp	x24, _PBUF_RAM@GOTPAGE
Lloh9:
	ldr	x24, [x24, _PBUF_RAM@GOTPAGEOFF]
	ldr	x9, [x24]
	ccmp	x8, x9, #4, ne
Lloh10:
	adrp	x9, _PBUF_REF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PBUF_REF@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w1, eq
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LWIP_ASSERT
	ldr	x9, [x19, #8]
	cmp	x9, x20
	b.le	LBB0_9
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x8, x20
	b.ge	LBB0_4
; %bb.2:
	mov	w10, #65535
	sub	x9, x20, x9
	cmp	w9, w10
	cset	w21, lt
	sxtw	x25, w9
Lloh15:
	adrp	x22, l_.str.2@PAGE
Lloh16:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh17:
	adrp	x23, l_.str.3@PAGE
Lloh18:
	add	x23, x23, l_.str.3@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	x20, x20, x8
	mov	x0, x22
	mov	x1, x21
	bl	_LWIP_ASSERT
	ldr	x8, [x19, #8]
	add	x8, x8, x25
	str	x8, [x19, #8]
	ldr	x19, [x19, #24]
	cmp	x19, #0
	cset	w1, ne
	mov	x0, x23
	bl	_LWIP_ASSERT
	ldr	x8, [x19, #16]
	cmp	x20, x8
	b.gt	LBB0_3
LBB0_4:
	ldr	x9, [x19]
	ldr	x10, [x24]
	cmp	x9, x10
	ccmp	x20, x8, #4, eq
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19, #32]
	sub	x8, x8, x19
	add	x1, x20, x8, asr #2
	mov	x0, x19
	bl	_mem_trim
	mov	x19, x0
	cmp	x0, #0
	cset	w1, ne
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_LWIP_ASSERT
LBB0_6:
	stp	x20, x20, [x19, #8]
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_pbuf_free
LBB0_8:
	str	xzr, [x19, #24]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pbuf_realloc: p != NULL"

l_.str.1:                               ; @.str.1
	.asciz	"pbuf_realloc: sane p->type"

	.comm	_PBUF_POOL,8,3                  ; @PBUF_POOL
	.comm	_PBUF_ROM,8,3                   ; @PBUF_ROM
	.comm	_PBUF_RAM,8,3                   ; @PBUF_RAM
	.comm	_PBUF_REF,8,3                   ; @PBUF_REF
l_.str.2:                               ; @.str.2
	.asciz	"grow < max_u16_t"

l_.str.3:                               ; @.str.3
	.asciz	"pbuf_realloc: q != NULL"

l_.str.4:                               ; @.str.4
	.asciz	"mem_trim returned q == NULL"

.subsections_via_symbols
