	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpu_timer_init
_mpu_timer_init:                        ## @mpu_timer_init
	.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	_timer_initialized@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	cmpl	$0, (%rcx)
	jne	LBB0_9
## %bb.1:
	movq	_dev_conf@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	%edi, %rax
	movl	$1, (%rcx)
	movq	_mpu_timer@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	leaq	(%rax,%rax,2), %rbx
	movl	$1, (%r14,%rbx,4)
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_sound_alloc_timerdev
	cmpl	$-1, %eax
	cmovel	%r12d, %eax
	movq	_sound_timer_devs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rdx
	movq	%r15, (%rcx,%rdx,8)
	cmpl	$31, 4(%r14,%rbx,4)
	jg	LBB0_3
## %bb.2:
	movq	_TMR_INTERNAL@GOTPCREL(%rip), %rcx
	movq	_TMR_EXTERNAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_TMR_MODE_FSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_TMR_MODE_MIDI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_timer_caps@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx)
	jmp	LBB0_8
LBB0_3:
	cmpl	$0, 8(%r14,%rbx,4)
	je	LBB0_8
## %bb.4:
	movq	_TMR_EXTERNAL@GOTPCREL(%rip), %rdx
	movq	_TMR_MODE_MIDI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_timer_caps@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	leaq	(%r14,%rbx,4), %rsi
	addq	$8, %rsi
	movl	%ecx, (%rdx)
	movl	(%rsi), %edi
	testb	$2, %dil
	je	LBB0_6
## %bb.5:
	movq	_TMR_MODE_CLS@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	movl	%ecx, (%rdx)
	movl	(%rsi), %edi
LBB0_6:
	testb	$64, %dil
	je	LBB0_8
## %bb.7:
	movq	_max_timebase@GOTPCREL(%rip), %rcx
	movl	$10, (%rcx)
LBB0_8:
	movq	_TMR_INTERNAL@GOTPCREL(%rip), %rcx
	movq	_TMR_MODE_MIDI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_timer_caps@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	movq	_timer_mode@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx)
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_conf,8,3                   ## @dev_conf
	.comm	_timer_initialized,4,2          ## @timer_initialized
	.comm	_mpu_timer,4,2                  ## @mpu_timer
	.comm	_sound_timer_devs,8,3           ## @sound_timer_devs
	.comm	_TMR_INTERNAL,4,2               ## @TMR_INTERNAL
	.comm	_TMR_EXTERNAL,4,2               ## @TMR_EXTERNAL
	.comm	_TMR_MODE_FSK,4,2               ## @TMR_MODE_FSK
	.comm	_TMR_MODE_MIDI,4,2              ## @TMR_MODE_MIDI
	.comm	_timer_caps,4,2                 ## @timer_caps
	.comm	_TMR_MODE_CLS,4,2               ## @TMR_MODE_CLS
	.comm	_max_timebase,4,2               ## @max_timebase
	.comm	_timer_mode,4,2                 ## @timer_mode
	.no_dead_strip	_mpu_timer_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpu_timer_init
_mpu_timer_init:                        ; @mpu_timer_init
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _timer_initialized@GOTPAGE
Lloh1:
	ldr	x8, [x8, _timer_initialized@GOTPAGEOFF]
	ldr	w9, [x8]
	cbz	w9, LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_10
LBB0_2:
Lloh2:
	adrp	x9, _dev_conf@GOTPAGE
Lloh3:
	ldr	x9, [x9, _dev_conf@GOTPAGEOFF]
Lloh4:
	ldr	x19, [x9]
	sxtw	x20, w0
	mov	w9, #1
	str	w9, [x8]
Lloh5:
	adrp	x21, _mpu_timer@GOTPAGE
Lloh6:
	ldr	x21, [x21, _mpu_timer@GOTPAGEOFF]
	str	w0, [x21]
	mov	w8, #12
	madd	x22, x20, x8, x19
	str	w9, [x22]
	bl	_sound_alloc_timerdev
	cmn	w0, #1
Lloh7:
	adrp	x8, _sound_timer_devs@GOTPAGE
Lloh8:
	ldr	x8, [x8, _sound_timer_devs@GOTPAGEOFF]
	csel	w0, wzr, w0, eq
Lloh9:
	ldr	x8, [x8]
	str	x21, [x8, w0, sxtw #3]
Lloh10:
	adrp	x9, _TMR_MODE_MIDI@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TMR_MODE_MIDI@GOTPAGEOFF]
	ldr	w11, [x22, #4]
Lloh12:
	adrp	x8, _timer_caps@GOTPAGE
Lloh13:
	ldr	x8, [x8, _timer_caps@GOTPAGEOFF]
Lloh14:
	adrp	x10, _TMR_INTERNAL@GOTPAGE
Lloh15:
	ldr	x10, [x10, _TMR_INTERNAL@GOTPAGEOFF]
	cmp	w11, #31
	b.gt	LBB0_4
; %bb.3:
	ldr	w11, [x10]
Lloh16:
	adrp	x12, _TMR_EXTERNAL@GOTPAGE
Lloh17:
	ldr	x12, [x12, _TMR_EXTERNAL@GOTPAGEOFF]
Lloh18:
	ldr	w12, [x12]
Lloh19:
	adrp	x13, _TMR_MODE_FSK@GOTPAGE
Lloh20:
	ldr	x13, [x13, _TMR_MODE_FSK@GOTPAGEOFF]
	orr	w11, w12, w11
Lloh21:
	ldr	w12, [x13]
	orr	w11, w11, w12
	ldr	w12, [x9]
	orr	w11, w11, w12
	str	w11, [x8]
	b	LBB0_9
LBB0_4:
	mov	w11, #12
	madd	x11, x20, x11, x19
	ldr	w12, [x11, #8]!
	cbz	w12, LBB0_9
; %bb.5:
Lloh22:
	adrp	x12, _TMR_EXTERNAL@GOTPAGE
Lloh23:
	ldr	x12, [x12, _TMR_EXTERNAL@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
	ldr	w13, [x9]
	orr	w12, w13, w12
	ldr	w13, [x8]
	orr	w12, w12, w13
	str	w12, [x8]
	ldr	w13, [x11]
	tbz	w13, #1, LBB0_7
; %bb.6:
Lloh25:
	adrp	x13, _TMR_MODE_CLS@GOTPAGE
Lloh26:
	ldr	x13, [x13, _TMR_MODE_CLS@GOTPAGEOFF]
Lloh27:
	ldr	w13, [x13]
	orr	w12, w12, w13
	str	w12, [x8]
	ldr	w13, [x11]
LBB0_7:
	tbz	w13, #6, LBB0_9
; %bb.8:
Lloh28:
	adrp	x11, _max_timebase@GOTPAGE
Lloh29:
	ldr	x11, [x11, _max_timebase@GOTPAGEOFF]
	mov	w12, #10
Lloh30:
	str	w12, [x11]
LBB0_9:
	ldr	w10, [x10]
	ldr	w9, [x9]
	orr	w9, w9, w10
	ldr	w8, [x8]
	and	w8, w9, w8
Lloh31:
	adrp	x9, _timer_mode@GOTPAGE
Lloh32:
	ldr	x9, [x9, _timer_mode@GOTPAGEOFF]
Lloh33:
	str	w8, [x9]
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_conf,8,3                   ; @dev_conf
	.comm	_timer_initialized,4,2          ; @timer_initialized
	.comm	_mpu_timer,4,2                  ; @mpu_timer
	.comm	_sound_timer_devs,8,3           ; @sound_timer_devs
	.comm	_TMR_INTERNAL,4,2               ; @TMR_INTERNAL
	.comm	_TMR_EXTERNAL,4,2               ; @TMR_EXTERNAL
	.comm	_TMR_MODE_FSK,4,2               ; @TMR_MODE_FSK
	.comm	_TMR_MODE_MIDI,4,2              ; @TMR_MODE_MIDI
	.comm	_timer_caps,4,2                 ; @timer_caps
	.comm	_TMR_MODE_CLS,4,2               ; @TMR_MODE_CLS
	.comm	_max_timebase,4,2               ; @max_timebase
	.comm	_timer_mode,4,2                 ; @timer_mode
	.no_dead_strip	_mpu_timer_init
.subsections_via_symbols
