	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memr_malloc                    ## -- Begin function memr_malloc
	.p2align	4, 0x90
_memr_malloc:                           ## @memr_malloc
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	_MEM_ALIGNMENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rdi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.2:
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	LBB0_5
	jmp	LBB0_9
LBB0_4:
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	je	LBB0_9
LBB0_5:
	movq	_SIZEOF_STRUCT_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	(%rsi,%rdi), %rax
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.6:
	cqto
	idivq	%rsi
	jmp	LBB0_8
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_8:
	addq	%rdi, %rcx
	subq	%rdx, %rcx
	movq	%rcx, %rdi
LBB0_9:
	movq	_UIP_MEM_SIZE@GOTPCREL(%rip), %r10
	movq	(%r10), %r12
	cmpq	%r12, %rdi
	jg	LBB0_25
## %bb.11:
	movq	_ram_free@GOTPCREL(%rip), %r9
	movq	(%r9), %r11
	movq	_ram_block@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r11, %rdx
	subq	%r13, %rdx
	cmpq	%r12, %rdx
	jge	LBB0_25
## %bb.12:
	movq	_SIZEOF_STRUCT_MEM@GOTPCREL(%rip), %r8
	movq	(%r8), %r14
	leaq	(%r14,%rdi), %r15
	xorl	%eax, %eax
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%rsi, %rdx
	cmpq	%r12, %rsi
	jge	LBB0_26
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 8(%r13,%rdx)
	movq	(%r13,%rdx), %rsi
	jne	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	leaq	(%r14,%rdx), %rbx
	movq	%rsi, %rcx
	subq	%rbx, %rcx
	cmpq	%r15, %rcx
	jl	LBB0_13
## %bb.16:
	leaq	(%rdx,%r13), %rax
	addq	%rdi, %rbx
	movq	%rdx, 16(%r13,%rbx)
	movq	%rsi, (%r13,%rbx)
	movq	%rbx, (%r13,%rdx)
	cmpq	(%r10), %rbx
	je	LBB0_18
## %bb.17:
	movq	(%r13,%rbx), %rcx
	movq	%rbx, 16(%r13,%rcx)
LBB0_18:
	movl	$0, 8(%r13,%rbx)
	movl	$1, 8(%rax)
	cmpq	%rax, %r11
	jne	LBB0_24
## %bb.19:
	cmpl	$0, 8(%r11)
	je	LBB0_24
## %bb.20:
	movq	_ram_end@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%r11, %rcx
	je	LBB0_24
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r11), %rdx
	leaq	(%rdx,%r13), %r11
	cmpl	$0, 8(%r13,%rdx)
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	cmpq	%r11, %rcx
	jne	LBB0_21
LBB0_23:
	movq	%r11, (%r9)
LBB0_24:
	addq	(%r8), %rax
	jmp	LBB0_26
LBB0_25:
	xorl	%eax, %eax
LBB0_26:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEM_ALIGNMENT,8,3              ## @MEM_ALIGNMENT
	.comm	_SIZEOF_STRUCT_MEM,8,3          ## @SIZEOF_STRUCT_MEM
	.comm	_UIP_MEM_SIZE,8,3               ## @UIP_MEM_SIZE
	.comm	_ram_free,8,3                   ## @ram_free
	.comm	_ram_block,8,3                  ## @ram_block
	.comm	_ram_end,8,3                    ## @ram_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memr_malloc                    ; -- Begin function memr_malloc
	.p2align	2
_memr_malloc:                           ; @memr_malloc
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_18
; %bb.1:
Lloh0:
	adrp	x8, _MEM_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEM_ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sdiv	x9, x0, x8
	msub	x9, x9, x8, x0
	cbz	x9, LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _SIZEOF_STRUCT_MEM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SIZEOF_STRUCT_MEM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x10, x9, x0
	neg	x11, x10
	sdiv	x10, x10, x9
	madd	x9, x10, x9, x11
	add	x8, x8, x0
	add	x0, x8, x9
LBB0_3:
Lloh6:
	adrp	x13, _UIP_MEM_SIZE@GOTPAGE
Lloh7:
	ldr	x13, [x13, _UIP_MEM_SIZE@GOTPAGEOFF]
	ldr	x14, [x13]
	cmp	x0, x14
	b.gt	LBB0_17
; %bb.4:
Lloh8:
	adrp	x8, _ram_free@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ram_free@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh10:
	adrp	x10, _ram_block@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ram_block@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	sub	x15, x9, x10
	cmp	x15, x14
	b.ge	LBB0_17
; %bb.5:
Lloh13:
	adrp	x11, _SIZEOF_STRUCT_MEM@GOTPAGE
Lloh14:
	ldr	x11, [x11, _SIZEOF_STRUCT_MEM@GOTPAGEOFF]
	ldr	x16, [x11]
	add	x17, x16, x0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x15, x1
	cmp	x1, x14
	b.ge	LBB0_17
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x12, x10, x15
	ldr	w2, [x12, #8]
	ldr	x1, [x12]
	cbnz	w2, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x2, x16, x15
	sub	x3, x1, x2
	cmp	x3, x17
	b.lt	LBB0_6
; %bb.9:
	add	x16, x2, x0
	add	x14, x10, x16
	str	x15, [x14, #16]
	str	x1, [x14]
	str	x16, [x10, x15]
	ldr	x13, [x13]
	cmp	x16, x13
	b.eq	LBB0_11
; %bb.10:
	ldr	x13, [x10, x16]
	add	x13, x10, x13
	str	x16, [x13, #16]
LBB0_11:
	str	wzr, [x14, #8]
	mov	w13, #1
	str	w13, [x12, #8]
	cmp	x9, x12
	b.ne	LBB0_16
; %bb.12:
	ldr	w13, [x9, #8]
	cbz	w13, LBB0_16
; %bb.13:
Lloh15:
	adrp	x13, _ram_end@GOTPAGE
Lloh16:
	ldr	x13, [x13, _ram_end@GOTPAGEOFF]
Lloh17:
	ldr	x13, [x13]
	cmp	x13, x9
	b.eq	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x9]
	add	x9, x10, x9
	ldr	w14, [x9, #8]
	cmp	w14, #0
	ccmp	x13, x9, #4, ne
	b.ne	LBB0_14
; %bb.15:
	str	x9, [x8]
LBB0_16:
	ldr	x8, [x11]
	add	x0, x12, x8
	ret
LBB0_17:
	mov	x0, #0
LBB0_18:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MEM_ALIGNMENT,8,3              ; @MEM_ALIGNMENT
	.comm	_SIZEOF_STRUCT_MEM,8,3          ; @SIZEOF_STRUCT_MEM
	.comm	_UIP_MEM_SIZE,8,3               ; @UIP_MEM_SIZE
	.comm	_ram_free,8,3                   ; @ram_free
	.comm	_ram_block,8,3                  ; @ram_block
	.comm	_ram_end,8,3                    ; @ram_end
.subsections_via_symbols
