	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmc_disable_etf_sink
_tmc_disable_etf_sink:                  ## @tmc_disable_etf_sink
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	leaq	12(%rax), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 16(%rbx)
	jne	LBB0_1
## %bb.2:
	movl	4(%r14), %edi
	callq	_atomic_dec_return
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%rbx), %rax
	movq	_CS_MODE_DISABLED@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_WARN_ON_ONCE
	movq	%rbx, %rdi
	callq	_tmc_etb_disable_hw
	movl	$-1, 8(%rbx)
	movq	(%r12), %rax
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CS_MODE_DISABLED,8,3           ## @CS_MODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TMC-ETB/ETF disabled\n"

	.no_dead_strip	_tmc_disable_etf_sink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmc_disable_etf_sink
_tmc_disable_etf_sink:                  ; @tmc_disable_etf_sink
	.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	w0, [x0]
	bl	_dev_get_drvdata
	mov	x21, x0
	add	x20, x0, #12
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_atomic_dec_return
	cbz	x0, LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	ldr	x8, [x21]
Lloh3:
	adrp	x22, _CS_MODE_DISABLED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _CS_MODE_DISABLED@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_WARN_ON_ONCE
	mov	x0, x21
	bl	_tmc_etb_disable_hw
	mov	w8, #-1
	str	w8, [x21, #8]
	ldr	x8, [x22]
	str	x8, [x21]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CS_MODE_DISABLED,8,3           ; @CS_MODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TMC-ETB/ETF disabled\n"

	.no_dead_strip	_tmc_disable_etf_sink
.subsections_via_symbols
