	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1848_tmr_start
_ad1848_tmr_start:                      ## @ad1848_tmr_start
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r12
	leaq	12(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rax
	movq	_MD_1845@GOTPCREL(%rip), %rcx
	movl	$10050, %r13d                   ## imm = 0x2742
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	_MD_1845_SSCAPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_ad_read
	testb	$1, %al
	movl	$9969, %eax                     ## imm = 0x26F1
	movl	$9920, %r13d                    ## imm = 0x26C0
	cmoveq	%rax, %r13
LBB0_3:
	imull	$1000, %r15d, %ecx              ## imm = 0x3E8
	movq	%r13, %rax
	shrq	%rax
	addq	%rcx, %rax
	btq	$32, %rax
	jae	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%r13
	jmp	LBB0_6
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	cmpq	$101, %rax
	movl	$100, %ecx
	cmovaeq	%rax, %rcx
	cmpq	$65535, %rcx                    ## imm = 0xFFFF
	movl	$65535, %ebx                    ## imm = 0xFFFF
	cmovbq	%rcx, %rbx
	movq	%rbx, %rdx
	shrq	$8, %rdx
	movq	%r12, %rdi
	movl	$21, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ad_write
	movzbl	%bl, %edx
	movq	%r12, %rdi
	movl	$20, %esi
	callq	_ad_write
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_ad_read
	orl	$64, %eax
	movq	%r12, %rdi
	movl	$16, %esi
	movl	%eax, %edx
	callq	_ad_write
	movl	$1, 8(%r12)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	imull	%ebx, %r13d
	addl	$500, %r13d                     ## imm = 0x1F4
	imulq	$274877907, %r13, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	movq	_current_interval@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_MD_1845,8,3                    ## @MD_1845
	.comm	_MD_1845_SSCAPE,8,3             ## @MD_1845_SSCAPE
	.comm	_current_interval,4,2           ## @current_interval
	.no_dead_strip	_ad1848_tmr_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1848_tmr_start
_ad1848_tmr_start:                      ; @ad1848_tmr_start
	.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	x21, x1
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	x19, [x8]
	add	x20, x19, #12
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _MD_1845@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MD_1845@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _MD_1845_SSCAPE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MD_1845_SSCAPE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	w22, #10050
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w1, #8
	bl	_ad_read
	tst	w0, #0x1
	mov	w8, #9920
	mov	w9, #9969
	csel	x22, x9, x8, eq
LBB0_3:
	mov	w8, #1000
	mul	w8, w21, w8
	add	x8, x8, x22, lsr #1
	udiv	x8, x8, x22
	mov	w9, #100
	cmp	x8, #100
	csel	x8, x8, x9, hi
	mov	w9, #65535
	cmp	x8, x9
	csel	x21, x8, x9, lo
	lsr	x2, x21, #8
	mov	x0, x19
	mov	w1, #21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_ad_write
	and	w2, w21, #0xff
	mov	x0, x19
	mov	w1, #20
	bl	_ad_write
	mov	x0, x19
	mov	w1, #16
	bl	_ad_read
	orr	w2, w0, #0x40
	mov	x0, x19
	mov	w1, #16
	bl	_ad_write
	mov	w8, #1
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mul	w8, w21, w22
	add	w8, w8, #500
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #38
Lloh9:
	adrp	x8, _current_interval@GOTPAGE
Lloh10:
	ldr	x8, [x8, _current_interval@GOTPAGEOFF]
Lloh11:
	str	w0, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_MD_1845,8,3                    ; @MD_1845
	.comm	_MD_1845_SSCAPE,8,3             ; @MD_1845_SSCAPE
	.comm	_current_interval,4,2           ; @current_interval
	.no_dead_strip	_ad1848_tmr_start
.subsections_via_symbols
