	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_tmu_set_next
_sh_tmu_set_next:                       ## @sh_tmu_set_next
	.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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_sh_tmu_start_stop_ch
	movq	_TCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_sh_tmu_read
	movl	(%r12), %esi
	movl	$32, %edx
	movq	%rbx, %rdi
	callq	_sh_tmu_write
	testl	%r15d, %r15d
	movq	_TCOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4294967295, %edx               ## imm = 0xFFFFFFFF
	cmovneq	%r14, %rdx
	movq	%rbx, %rdi
	callq	_sh_tmu_write
	movq	_TCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_sh_tmu_write
	movq	%rbx, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sh_tmu_start_stop_ch           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TCR,4,2                        ## @TCR
	.comm	_TCOR,4,2                       ## @TCOR
	.comm	_TCNT,4,2                       ## @TCNT
	.no_dead_strip	_sh_tmu_set_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_tmu_set_next
_sh_tmu_set_next:                       ; @sh_tmu_set_next
	.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, x2
	mov	x20, x1
	mov	x21, x0
	mov	w1, #0
	bl	_sh_tmu_start_stop_ch
Lloh0:
	adrp	x22, _TCR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TCR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_sh_tmu_read
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #32
	bl	_sh_tmu_write
Lloh2:
	adrp	x8, _TCOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TCOR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	cmp	w19, #0
	mov	w8, #-1
	csel	x2, x8, x20, eq
	mov	x0, x21
	bl	_sh_tmu_write
Lloh5:
	adrp	x8, _TCNT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TCNT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_sh_tmu_write
	mov	x0, x21
	mov	w1, #1
	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	_sh_tmu_start_stop_ch
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TCR,4,2                        ; @TCR
	.comm	_TCOR,4,2                       ; @TCOR
	.comm	_TCNT,4,2                       ; @TCNT
	.no_dead_strip	_sh_tmu_set_next
.subsections_via_symbols
