	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_memory_device_strncat     ## -- Begin function mbfl_memory_device_strncat
	.p2align	4, 0x90
_mbfl_memory_device_strncat:            ## @mbfl_memory_device_strncat
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %rdi
	movq	%rax, %rcx
	subq	%rdi, %rcx
	cmpq	%rdx, %rcx
	jae	LBB0_1
## %bb.2:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_MBFL_MEMORY_DEVICE_ALLOC_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r13
	movq	%rcx, %rdx
	subq	%r13, %rdx
	movl	$-1, %r12d
	cmpq	%r14, %rdx
	jb	LBB0_7
## %bb.3:
	addq	%r14, %r13
	subq	%r13, %rcx
	cmpq	%rcx, %rax
	ja	LBB0_7
## %bb.4:
	addq	%rax, %r13
	movq	16(%rbx), %rdi
	movq	%r13, %rsi
	callq	_mbfl_realloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%r13, (%rbx)
	movq	%rax, 16(%rbx)
	movq	8(%rbx), %rdi
	jmp	LBB0_6
LBB0_1:
	movq	16(%rbx), %rax
LBB0_6:
	addq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	addq	%r14, 8(%rbx)
	xorl	%r12d, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.comm	_MBFL_MEMORY_DEVICE_ALLOC_SIZE,8,3 ## @MBFL_MEMORY_DEVICE_ALLOC_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_memory_device_strncat     ; -- Begin function mbfl_memory_device_strncat
	.p2align	2
_mbfl_memory_device_strncat:            ; @mbfl_memory_device_strncat
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldp	x8, x9, [x0]
	sub	x10, x8, x9
	cmp	x10, x2
	b.hs	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _MBFL_MEMORY_DEVICE_ALLOC_SIZE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MBFL_MEMORY_DEVICE_ALLOC_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	sub	x11, x9, x10
	cmp	x11, x19
	b.lo	LBB0_7
; %bb.2:
	add	x10, x10, x19
	sub	x9, x9, x10
	cmp	x8, x9
	b.hi	LBB0_7
; %bb.3:
	add	x22, x10, x8
	ldr	x0, [x20, #16]
	mov	x1, x22
	bl	_mbfl_realloc
	cbz	x0, LBB0_7
; %bb.4:
	str	x22, [x20]
	str	x0, [x20, #16]
	ldr	x9, [x20, #8]
	b	LBB0_6
LBB0_5:
	ldr	x0, [x20, #16]
LBB0_6:
	add	x0, x0, x9
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	mov	w0, #0
	ldr	x8, [x20, #8]
	add	x8, x8, x19
	str	x8, [x20, #8]
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.comm	_MBFL_MEMORY_DEVICE_ALLOC_SIZE,8,3 ; @MBFL_MEMORY_DEVICE_ALLOC_SIZE
.subsections_via_symbols
