	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_bo_set_label
_vc4_bo_set_label:                      ## @vc4_bo_set_label
	.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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_to_vc4_bo
	movq	%rax, %r14
	movl	8(%rbx), %edi
	callq	_to_vc4_dev
	movq	%rax, %r15
	leaq	8(%rax), %rdi
	callq	_lockdep_assert_held
	movq	(%r15), %rax
	movslq	%r12d, %r13
	cmpl	$-1, %r12d
	je	LBB0_1
## %bb.2:
	leaq	(,%r13,2), %rdx
	addq	%r13, %rdx
	incq	(%rax,%rdx,8)
	movl	(%rbx), %ecx
	addl	%ecx, 16(%rax,%rdx,8)
	jmp	LBB0_3
LBB0_1:
	movl	(%rbx), %ecx
LBB0_3:
	movq	(%r14), %rdi
	leaq	(%rdi,%rdi,2), %rdx
	subl	%ecx, 16(%rax,%rdx,8)
	decq	(%rax,%rdx,8)
	jne	LBB0_6
## %bb.4:
	callq	_is_user_label
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movq	(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	8(%rax,%rcx,8), %rdi
	callq	_kfree
	movq	(%r15), %rax
	movq	(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	$0, 8(%rax,%rcx,8)
LBB0_6:
	movq	%r13, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_vc4_bo_set_label
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_bo_set_label
_vc4_bo_set_label:                      ; @vc4_bo_set_label
	.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, x1
	mov	x22, x0
	bl	_to_vc4_bo
	mov	x20, x0
	ldr	w0, [x22, #8]
	bl	_to_vc4_dev
	mov	x21, x0
	add	x0, x0, #8
	bl	_lockdep_assert_held
	ldr	x8, [x21]
	cmn	w19, #1
	b.eq	LBB0_2
; %bb.1:
	mov	w9, #24
	smaddl	x10, w19, w9, x8
	ldr	x9, [x10]
	add	x9, x9, #1
	str	x9, [x10]
	ldr	w9, [x22]
	ldr	w11, [x10, #16]
	add	w11, w11, w9
	str	w11, [x10, #16]
	b	LBB0_3
LBB0_2:
	ldr	w9, [x22]
LBB0_3:
	ldr	x0, [x20]
	mov	w10, #24
	madd	x8, x0, x10, x8
	ldr	x10, [x8]
	ldr	w11, [x8, #16]
	sub	w9, w11, w9
	str	w9, [x8, #16]
	sub	x9, x10, #1
	str	x9, [x8]
	cbnz	x9, LBB0_6
; %bb.4:
	bl	_is_user_label
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x21]
	ldr	x9, [x20]
	mov	w22, #24
	madd	x8, x9, x22, x8
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x8, [x21]
	ldr	x9, [x20]
	madd	x8, x9, x22, x8
	str	xzr, [x8, #8]
LBB0_6:
	sxtw	x8, w19
	str	x8, [x20]
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_vc4_bo_set_label
.subsections_via_symbols
