	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gru_free_gru_context
_gru_free_gru_context:                  ## @gru_free_gru_context
	.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	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	_grudev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_gru_dbg
	movq	%r14, %rdi
	callq	_spin_lock
	movq	8(%r14), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_free_gru_resources
	movq	(%rbx), %rdi
	leaq	4(%r14), %r15
	movq	%r15, %rsi
	callq	_test_bit
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_BUG_ON
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	callq	___clear_bit
	movq	_NULLCTX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	$0, 16(%rbx)
	movl	$-1, 8(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_gts_drop
	movq	_free_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STAT                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_grudev,4,2                     ## @grudev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gts %p, gid %d\n"

	.comm	_NULLCTX,8,3                    ## @NULLCTX
	.comm	_free_context,4,2               ## @free_context
	.no_dead_strip	_gru_free_gru_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gru_free_gru_context
_gru_free_gru_context:                  ; @gru_free_gru_context
	.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, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _grudev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _grudev@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w3, [x20, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_gru_dbg
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [x20, #8]
	ldr	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
	mov	x0, x20
	mov	x1, x19
	bl	_free_gru_resources
	ldr	x0, [x19]
	add	x21, x20, #4
	mov	x1, x21
	bl	_test_bit
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x0, [x19]
	mov	x1, x21
	bl	___clear_bit
Lloh5:
	adrp	x8, _NULLCTX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NULLCTX@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19]
	str	xzr, [x19, #16]
	mov	w8, #-1
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_gts_drop
Lloh8:
	adrp	x8, _free_context@GOTPAGE
Lloh9:
	ldr	x8, [x8, _free_context@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	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
	b	_STAT
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_grudev,4,2                     ; @grudev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gts %p, gid %d\n"

	.comm	_NULLCTX,8,3                    ; @NULLCTX
	.comm	_free_context,4,2               ; @free_context
	.no_dead_strip	_gru_free_gru_context
.subsections_via_symbols
