	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	_PBUF_FLAG_POOL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_PBUF_FLAG_ROM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_PBUF_FLAG_RAM@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	sete	%cl
	movq	_PBUF_FLAG_REF@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	sete	%al
	orb	%cl, %al
	orb	%dl, %al
	movzbl	%al, %esi
	leaq	L_.str(%rip), %rdi
	callq	_LWIP_ASSERT
	movq	8(%r12), %rcx
	cmpq	%r14, %rcx
	jle	LBB0_12
## %bb.1:
	movq	16(%r12), %rax
	cmpq	%r14, %rax
	jge	LBB0_2
## %bb.3:
	movq	%r14, %rbx
	subq	%rax, %rbx
	movq	%r14, 8(%r12)
	movq	24(%r12), %r12
	movq	16(%r12), %rax
	cmpq	%rax, %rbx
	jle	LBB0_6
## %bb.4:
	subq	%rcx, %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	addq	%r14, 8(%r12)
	subq	%rax, %rbx
	movq	24(%r12), %r12
	movq	16(%r12), %rax
	cmpq	%rax, %rbx
	jg	LBB0_5
	jmp	LBB0_6
LBB0_2:
	movq	%r14, %rbx
LBB0_6:
	movq	(%r12), %rcx
	cmpq	(%r15), %rcx
	jne	LBB0_9
## %bb.7:
	cmpq	%rax, %rbx
	je	LBB0_9
## %bb.8:
	movq	32(%r12), %rsi
	subq	%r12, %rsi
	sarq	$2, %rsi
	addq	%rbx, %rsi
	movq	%r12, %rdi
	callq	_mem_realloc
LBB0_9:
	movq	%rbx, 16(%r12)
	movq	%rbx, 8(%r12)
	movq	24(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_pbuf_free
LBB0_11:
	movq	$0, 24(%r12)
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pbuf_realloc: sane p->flags"

	.comm	_PBUF_FLAG_POOL,8,3             ## @PBUF_FLAG_POOL
	.comm	_PBUF_FLAG_ROM,8,3              ## @PBUF_FLAG_ROM
	.comm	_PBUF_FLAG_RAM,8,3              ## @PBUF_FLAG_RAM
	.comm	_PBUF_FLAG_REF,8,3              ## @PBUF_FLAG_REF
.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	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	x8, [x0]
Lloh0:
	adrp	x9, _PBUF_FLAG_POOL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PBUF_FLAG_POOL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _PBUF_FLAG_ROM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PBUF_FLAG_ROM@GOTPAGEOFF]
	cmp	x8, x9
Lloh5:
	ldr	x9, [x10]
	ccmp	x8, x9, #4, ne
Lloh6:
	adrp	x21, _PBUF_FLAG_RAM@GOTPAGE
Lloh7:
	ldr	x21, [x21, _PBUF_FLAG_RAM@GOTPAGEOFF]
	ldr	x9, [x21]
	ccmp	x8, x9, #4, ne
Lloh8:
	adrp	x9, _PBUF_FLAG_REF@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PBUF_FLAG_REF@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w1, eq
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LWIP_ASSERT
	ldr	x9, [x19, #8]
	cmp	x9, x20
	b.le	LBB0_11
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x8, x20
	b.ge	LBB0_5
; %bb.2:
	str	x20, [x19, #8]
	ldr	x19, [x19, #24]
	sub	x22, x20, x8
	ldr	x8, [x19, #16]
	cmp	x22, x8
	b.le	LBB0_6
; %bb.3:
	sub	x9, x20, x9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #8]
	add	x10, x9, x10
	str	x10, [x19, #8]
	ldr	x19, [x19, #24]
	sub	x22, x22, x8
	ldr	x8, [x19, #16]
	cmp	x22, x8
	b.gt	LBB0_4
	b	LBB0_6
LBB0_5:
	mov	x22, x20
LBB0_6:
	ldr	x9, [x19]
	ldr	x10, [x21]
	cmp	x9, x10
	ccmp	x22, x8, #4, eq
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x19, #32]
	sub	x8, x8, x19
	add	x1, x22, x8, asr #2
	mov	x0, x19
	bl	_mem_realloc
LBB0_8:
	stp	x22, x22, [x19, #8]
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_pbuf_free
LBB0_10:
	str	xzr, [x19, #24]
LBB0_11:
	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 AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pbuf_realloc: sane p->flags"

	.comm	_PBUF_FLAG_POOL,8,3             ; @PBUF_FLAG_POOL
	.comm	_PBUF_FLAG_ROM,8,3              ; @PBUF_FLAG_ROM
	.comm	_PBUF_FLAG_RAM,8,3              ; @PBUF_FLAG_RAM
	.comm	_PBUF_FLAG_REF,8,3              ; @PBUF_FLAG_REF
.subsections_via_symbols
