	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_memory_tags_get           ## -- Begin function nvkm_memory_tags_get
	.p2align	4, 0x90
_nvkm_memory_tags_get:                  ## @nvkm_memory_tags_get
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r12
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	jne	LBB0_3
LBB0_5:
	movq	%rbx, %rdi
	callq	_refcount_inc
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%rbx, (%r13)
	jmp	LBB0_13
LBB0_6:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r13
	leaq	4(%r14), %rdi
	movq	%rax, %rbx
	addq	$8, %rbx
	movq	%rbx, (%rsp)
	xorl	%esi, %esi
	movl	$1, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %r8
	movl	$1, %r9d
	callq	_nvkm_mm_head
	testl	%eax, %eax
	je	LBB0_9
## %bb.11:
	movq	$0, (%rbx)
	jmp	LBB0_12
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_9:
	testq	%r12, %r12
	je	LBB0_12
## %bb.10:
	movq	(%rbx), %rax
	movq	(%rax), %rdx
	movq	8(%rax), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	*%r12
LBB0_12:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_refcount_set
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_memory_tags_get           ; -- Begin function nvkm_memory_tags_get
	.p2align	2
_nvkm_memory_tags_get:                  ; @nvkm_memory_tags_get
	.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	x19, x4
	mov	x21, x3
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x20, [x1]
	mov	x0, x20
	bl	_mutex_lock
	ldr	x23, [x23]
	cbz	x23, LBB0_4
; %bb.1:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x8]
	cmp	x8, x24
	b.ne	LBB0_7
LBB0_3:
	mov	x0, x23
	bl	_refcount_inc
	b	LBB0_13
LBB0_4:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x23, x0
	add	x0, x20, #4
	add	x25, x23, #8
	mov	w1, #0
	mov	w2, #1
	mov	x3, x24
	mov	x4, x24
	mov	w5, #1
	mov	x6, x25
	bl	_nvkm_mm_head
	cbz	w0, LBB0_10
; %bb.6:
	str	xzr, [x25]
	b	LBB0_12
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	bl	_mutex_unlock
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_10:
	cbz	x21, LBB0_12
; %bb.11:
	ldr	x8, [x25]
	ldp	x2, x1, [x8]
	mov	x0, x22
	blr	x21
LBB0_12:
	mov	x0, x23
	mov	w1, #1
	bl	_refcount_set
LBB0_13:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	str	x23, [x19]
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
