	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function timer_ext_event
_timer_ext_event:                       ## @timer_ext_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $esi killed $esi def $rsi
	cmpl	$0, 4(%rdi)
	je	LBB0_14
## %bb.1:
	addl	$-128, %esi
	cmpl	$4, %esi
	ja	LBB0_14
## %bb.2:
	movl	(%rdi), %r14d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movq	_timer_mode@GOTPCREL(%rip), %rax
	movq	_TMR_EXTERNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_14
## %bb.8:
	movq	_tmr_running@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	%r14d, %edi
	callq	_stop_metronome
	xorl	%eax, %eax
	callq	_SEQ_STOP_TIMER
	jmp	LBB0_13
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movq	_tmr_running@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_14
## %bb.5:
	movq	_timer_mode@GOTPCREL(%rip), %rcx
	movq	_TMR_EXTERNAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_14
## %bb.6:
	movl	$1, (%rax)
	movl	%r14d, %edi
	callq	_setup_metronome
	movq	_next_event_time@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%eax, %eax
	callq	_SEQ_START_TIMER
	jmp	LBB0_13
LBB0_11:
	movl	%edx, %ebx
	leaq	L_.str.4(%rip), %rdi
	movl	%edx, %esi
	xorl	%eax, %eax
	callq	_printk
	movq	_timer_mode@GOTPCREL(%rip), %rax
	movq	_TMR_EXTERNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_14
## %bb.12:
	movl	%ebx, %edi
	callq	_SEQ_SONGPOS
	jmp	LBB0_13
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	movq	_timer_mode@GOTPCREL(%rip), %rax
	movq	_TMR_EXTERNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_14
## %bb.10:
	movq	_tmr_running@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movl	%r14d, %edi
	callq	_setup_metronome
	xorl	%eax, %eax
	callq	_SEQ_CONTINUE_TIMER
LBB0_13:
	movl	%eax, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_STORE                          ## TAILCALL
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_printk                         ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_11
	.long	L0_0_set_9
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"<MIDI clk>"

L_.str.1:                               ## @.str.1
	.asciz	"Ext MIDI start\n"

	.comm	_tmr_running,4,2                ## @tmr_running
	.comm	_timer_mode,4,2                 ## @timer_mode
	.comm	_TMR_EXTERNAL,4,2               ## @TMR_EXTERNAL
	.comm	_next_event_time,4,2            ## @next_event_time
L_.str.2:                               ## @.str.2
	.asciz	"Ext MIDI stop\n"

L_.str.3:                               ## @.str.3
	.asciz	"Ext MIDI continue\n"

L_.str.4:                               ## @.str.4
	.asciz	"Songpos: %d\n"

	.no_dead_strip	_timer_ext_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function timer_ext_event
_timer_ext_event:                       ; @timer_ext_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_13
; %bb.1:
	sub	w8, w1, #128
	cmp	w8, #4
	b.hi	LBB0_13
; %bb.2:
	ldr	w19, [x0]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
Lloh4:
	adrp	x8, _timer_mode@GOTPAGE
Lloh5:
	ldr	x8, [x8, _timer_mode@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _TMR_EXTERNAL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TMR_EXTERNAL@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.4:
Lloh10:
	adrp	x8, _tmr_running@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tmr_running@GOTPAGEOFF]
Lloh12:
	str	wzr, [x8]
	mov	x0, x19
	bl	_stop_metronome
	bl	_SEQ_STOP_TIMER
	b	LBB0_12
LBB0_5:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
Lloh15:
	adrp	x8, _tmr_running@GOTPAGE
Lloh16:
	ldr	x8, [x8, _tmr_running@GOTPAGEOFF]
	ldr	w9, [x8]
	cbnz	w9, LBB0_13
; %bb.6:
Lloh17:
	adrp	x9, _timer_mode@GOTPAGE
Lloh18:
	ldr	x9, [x9, _timer_mode@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _TMR_EXTERNAL@GOTPAGE
Lloh21:
	ldr	x10, [x10, _TMR_EXTERNAL@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.7:
	mov	w9, #1
	str	w9, [x8]
	mov	x0, x19
	bl	_setup_metronome
Lloh23:
	adrp	x8, _next_event_time@GOTPAGE
Lloh24:
	ldr	x8, [x8, _next_event_time@GOTPAGEOFF]
Lloh25:
	str	wzr, [x8]
	bl	_SEQ_START_TIMER
	b	LBB0_12
LBB0_8:
	mov	x20, x2
	str	x20, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printk
Lloh28:
	adrp	x8, _timer_mode@GOTPAGE
Lloh29:
	ldr	x8, [x8, _timer_mode@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _TMR_EXTERNAL@GOTPAGE
Lloh32:
	ldr	x9, [x9, _TMR_EXTERNAL@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.9:
	mov	x0, x20
	bl	_SEQ_SONGPOS
	b	LBB0_12
LBB0_10:
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
Lloh36:
	adrp	x8, _timer_mode@GOTPAGE
Lloh37:
	ldr	x8, [x8, _timer_mode@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _TMR_EXTERNAL@GOTPAGE
Lloh40:
	ldr	x9, [x9, _TMR_EXTERNAL@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.11:
Lloh42:
	adrp	x8, _tmr_running@GOTPAGE
Lloh43:
	ldr	x8, [x8, _tmr_running@GOTPAGEOFF]
	mov	w9, #1
Lloh44:
	str	w9, [x8]
	mov	x0, x19
	bl	_setup_metronome
	bl	_SEQ_CONTINUE_TIMER
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_STORE
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_14:
Lloh45:
	adrp	x0, l_.str@PAGE
Lloh46:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_printk
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
	.byte	(LBB0_14-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"<MIDI clk>"

l_.str.1:                               ; @.str.1
	.asciz	"Ext MIDI start\n"

	.comm	_tmr_running,4,2                ; @tmr_running
	.comm	_timer_mode,4,2                 ; @timer_mode
	.comm	_TMR_EXTERNAL,4,2               ; @TMR_EXTERNAL
	.comm	_next_event_time,4,2            ; @next_event_time
l_.str.2:                               ; @.str.2
	.asciz	"Ext MIDI stop\n"

l_.str.3:                               ; @.str.3
	.asciz	"Ext MIDI continue\n"

l_.str.4:                               ; @.str.4
	.asciz	"Songpos: %d\n"

	.no_dead_strip	_timer_ext_event
.subsections_via_symbols
