	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cudbg_get_mem_relative
_cudbg_get_mem_relative:                ## @cudbg_get_mem_relative
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rsi, %rbx
	leaq	-32(%rbp), %rcx
	callq	_cudbg_meminfo_get_mem_index
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	(%r15), %rsi
	movq	(%rbx), %rcx
	movq	-32(%rbp), %rdx
	shlq	$4, %rdx
	xorl	%edi, %edi
	subq	(%rcx,%rdx), %rsi
	cmovgeq	%rsi, %rdi
	movq	%rdi, (%r15)
	movq	(%r14), %rsi
	movq	8(%rcx,%rdx), %rdi
	cmpq	%rdi, %rsi
	jg	LBB0_3
## %bb.2:
	addq	%rdx, %rcx
	subq	(%rcx), %rsi
	movq	%rsi, %rdi
LBB0_3:
	movq	%rdi, (%r14)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_cudbg_get_mem_relative
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cudbg_get_mem_relative
_cudbg_get_mem_relative:                ; @cudbg_get_mem_relative
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
	add	x3, sp, #8
	bl	_cudbg_meminfo_get_mem_index
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x9, [x20]
	ldr	x8, [x21]
	ldr	x10, [sp, #8]
	add	x8, x8, x10, lsl #4
	ldr	x10, [x8]
	subs	x9, x9, x10
	csel	x9, xzr, x9, lt
	str	x9, [x20]
	ldr	x10, [x19]
	ldr	x9, [x8, #8]
	cmp	x10, x9
	b.gt	LBB0_3
; %bb.2:
	ldr	x8, [x8]
	sub	x9, x10, x8
LBB0_3:
	str	x9, [x19]
LBB0_4:
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_cudbg_get_mem_relative
.subsections_via_symbols
