	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tmc_read_unprepare_etb         ## -- Begin function tmc_read_unprepare_etb
	.p2align	4, 0x90
_tmc_read_unprepare_etb:                ## @tmc_read_unprepare_etb
	.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	(%rdi), %rax
	movq	_TMC_CONFIG_TYPE_ETB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movq	_TMC_CONFIG_TYPE_ETF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	leaq	28(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_TMC_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	callq	_readl_relaxed
	movq	_TMC_MODE_CIRCULAR_BUFFER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.4:
	movq	_CS_MODE_SYSFS@GOTPCREL(%rip), %rax
	movq	8(%rbx), %rcx
	movq	16(%rbx), %r15
	cmpq	(%rax), %rcx
	jne	LBB0_6
## %bb.5:
	movl	32(%rbx), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	%rbx, %rdi
	callq	___tmc_etb_enable_hw
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	$0, 16(%rbx)
LBB0_7:
	movl	$0, 24(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_TMC_CONFIG_TYPE_ETB,8,3        ## @TMC_CONFIG_TYPE_ETB
	.comm	_TMC_CONFIG_TYPE_ETF,8,3        ## @TMC_CONFIG_TYPE_ETF
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TMC_MODE,8,3                   ## @TMC_MODE
	.comm	_TMC_MODE_CIRCULAR_BUFFER,4,2   ## @TMC_MODE_CIRCULAR_BUFFER
	.comm	_CS_MODE_SYSFS,8,3              ## @CS_MODE_SYSFS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tmc_read_unprepare_etb         ; -- Begin function tmc_read_unprepare_etb
	.p2align	2
_tmc_read_unprepare_etb:                ; @tmc_read_unprepare_etb
	.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	x8, [x0]
Lloh0:
	adrp	x9, _TMC_CONFIG_TYPE_ETB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TMC_CONFIG_TYPE_ETB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _TMC_CONFIG_TYPE_ETF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TMC_CONFIG_TYPE_ETF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_5
; %bb.1:
	add	x20, x19, #28
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #40]
Lloh6:
	adrp	x9, _TMC_MODE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TMC_MODE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh9:
	adrp	x8, _TMC_MODE_CIRCULAR_BUFFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TMC_MODE_CIRCULAR_BUFFER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
Lloh12:
	adrp	x8, _CS_MODE_SYSFS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CS_MODE_SYSFS@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldp	x9, x21, [x19, #8]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.3:
	ldr	w2, [x19, #32]
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	mov	x0, x19
	bl	___tmc_etb_enable_hw
	mov	x21, #0
	b	LBB0_8
LBB0_4:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_5:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
	str	xzr, [x19, #16]
LBB0_8:
	str	wzr, [x19, #24]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x21
	bl	_kfree
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TMC_CONFIG_TYPE_ETB,8,3        ; @TMC_CONFIG_TYPE_ETB
	.comm	_TMC_CONFIG_TYPE_ETF,8,3        ; @TMC_CONFIG_TYPE_ETF
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TMC_MODE,8,3                   ; @TMC_MODE
	.comm	_TMC_MODE_CIRCULAR_BUFFER,4,2   ; @TMC_MODE_CIRCULAR_BUFFER
	.comm	_CS_MODE_SYSFS,8,3              ; @CS_MODE_SYSFS
.subsections_via_symbols
