	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sound_update                   ## -- Begin function sound_update
	.p2align	4, 0x90
_sound_update:                          ## @sound_update
	.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	%edi, %ebx
	callq	_SN76489_Update
	movl	%ebx, %r15d
	movl	%ebx, %edi
	callq	_fm_update
	movq	_config@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_fm_cycles_start@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_fm_last@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	(%rdx), %eax
	movl	4(%rdx), %r14d
	movq	_fm_buffer@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r12
	cmpq	$0, 8(%rcx)
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	je	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	imulq	$1374389535, %rcx, %r15         ## imm = 0x51EB851F
	movq	%r15, %rcx
	shrq	$63, %rcx
	sarq	$37, %r15
	addl	%ecx, %r15d
	movl	%r15d, %edx
	subl	%eax, %edx
	movq	_snd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_blip_add_delta
	movl	4(%r12), %eax
	imull	-44(%rbp), %eax                 ## 4-byte Folded Reload
	cltq
	imulq	$1374389535, %rax, %r13         ## imm = 0x51EB851F
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$37, %r13
	addl	%eax, %r13d
	movl	%r13d, %edx
	subl	%r14d, %edx
	movq	_snd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	movl	%ebx, %esi
	callq	_blip_add_delta
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_fm_cycles_ratio@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	addq	$8, %r12
	movl	%r15d, %eax
	movl	%r13d, %r14d
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	jb	LBB0_1
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	imull	%esi, %ecx
	movslq	%ecx, %rcx
	imulq	$1374389535, %rcx, %r15         ## imm = 0x51EB851F
	movq	%r15, %rcx
	shrq	$63, %rcx
	sarq	$37, %r15
	addl	%ecx, %r15d
	movl	%r15d, %edx
	subl	%eax, %edx
	movq	_snd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_blip_add_delta_fast
	movl	4(%r12), %eax
	imull	-44(%rbp), %eax                 ## 4-byte Folded Reload
	cltq
	imulq	$1374389535, %rax, %r13         ## imm = 0x51EB851F
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$37, %r13
	addl	%eax, %r13d
	movl	%r13d, %edx
	subl	%r14d, %edx
	movq	_snd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	movl	%ebx, %esi
	callq	_blip_add_delta_fast
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	_fm_cycles_ratio@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	addq	$8, %r12
	movl	%r15d, %eax
	movl	%r13d, %r14d
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	jb	LBB0_2
LBB0_3:
	movq	_fm_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_fm_ptr@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_fm_last@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, (%rax)
	movl	%r13d, 4(%rax)
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	subl	%r14d, %ebx
	movq	_fm_cycles_start@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_fm_cycles_count@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_snd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_blip_end_frame
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	movl	%r14d, %esi
	callq	_blip_end_frame
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_blip_samples_avail             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_config,16,3                    ## @config
	.comm	_fm_cycles_start,4,2            ## @fm_cycles_start
	.comm	_fm_last,8,3                    ## @fm_last
	.comm	_fm_buffer,8,3                  ## @fm_buffer
	.comm	_snd,8,3                        ## @snd
	.comm	_fm_cycles_ratio,8,3            ## @fm_cycles_ratio
	.comm	_fm_ptr,8,3                     ## @fm_ptr
	.comm	_fm_cycles_count,4,2            ## @fm_cycles_count
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sound_update                   ; -- Begin function sound_update
	.p2align	2
_sound_update:                          ; @sound_update
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_SN76489_Update
	mov	x0, x19
	bl	_fm_update
Lloh0:
	adrp	x9, _config@GOTPAGE
Lloh1:
	ldr	x9, [x9, _config@GOTPAGEOFF]
	ldr	w23, [x9]
Lloh2:
	adrp	x8, _fm_cycles_start@GOTPAGE
Lloh3:
	ldr	x8, [x8, _fm_cycles_start@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
Lloh5:
	adrp	x8, _fm_last@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fm_last@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x8]
	ldp	w8, w24, [x10]
Lloh8:
	adrp	x10, _fm_buffer@GOTPAGE
Lloh9:
	ldr	x10, [x10, _fm_buffer@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x10]
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_3
; %bb.1:
	mov	w28, #34079
	movk	w28, #20971, lsl #16
Lloh11:
	adrp	x21, _snd@GOTPAGE
Lloh12:
	ldr	x21, [x21, _snd@GOTPAGEOFF]
Lloh13:
	adrp	x22, _fm_cycles_ratio@GOTPAGE
Lloh14:
	ldr	x22, [x22, _fm_cycles_ratio@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x25]
	mul	w9, w9, w23
	smull	x9, w9, w28
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w27, w9, w10
	sub	w2, w27, w8
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_blip_add_delta
	ldr	w8, [x25, #4]
	mul	w8, w8, w23
	smull	x8, w8, w28
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w26, w8, w9
	sub	w2, w26, w24
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x20
	bl	_blip_add_delta
	ldr	w8, [x22]
	add	x25, x25, #8
	add	w20, w20, w8
	cmp	w20, w19
	mov	x8, x27
	mov	x24, x26
	b.lo	LBB0_2
	b	LBB0_5
LBB0_3:
	mov	w28, #34079
	movk	w28, #20971, lsl #16
Lloh15:
	adrp	x21, _snd@GOTPAGE
Lloh16:
	ldr	x21, [x21, _snd@GOTPAGEOFF]
Lloh17:
	adrp	x22, _fm_cycles_ratio@GOTPAGE
Lloh18:
	ldr	x22, [x22, _fm_cycles_ratio@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x25]
	mul	w9, w9, w23
	smull	x9, w9, w28
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w27, w9, w10
	sub	w2, w27, w8
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_blip_add_delta_fast
	ldr	w8, [x25, #4]
	mul	w8, w8, w23
	smull	x8, w8, w28
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w26, w8, w9
	sub	w2, w26, w24
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x20
	bl	_blip_add_delta_fast
	ldr	w8, [x22]
	add	x25, x25, #8
	add	w20, w20, w8
	cmp	w20, w19
	mov	x8, x27
	mov	x24, x26
	b.lo	LBB0_4
LBB0_5:
Lloh19:
	adrp	x8, _fm_buffer@GOTPAGE
Lloh20:
	ldr	x8, [x8, _fm_buffer@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
Lloh22:
	adrp	x9, _fm_ptr@GOTPAGE
Lloh23:
	ldr	x9, [x9, _fm_ptr@GOTPAGEOFF]
Lloh24:
	str	x8, [x9]
Lloh25:
	adrp	x8, _fm_last@GOTPAGE
Lloh26:
	ldr	x8, [x8, _fm_last@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	stp	w27, w26, [x8]
	sub	w8, w20, w19
Lloh28:
	adrp	x9, _fm_cycles_start@GOTPAGE
Lloh29:
	ldr	x9, [x9, _fm_cycles_start@GOTPAGEOFF]
Lloh30:
	str	w8, [x9]
Lloh31:
	adrp	x9, _fm_cycles_count@GOTPAGE
Lloh32:
	ldr	x9, [x9, _fm_cycles_count@GOTPAGEOFF]
Lloh33:
	str	w8, [x9]
Lloh34:
	adrp	x20, _snd@GOTPAGE
Lloh35:
	ldr	x20, [x20, _snd@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_blip_end_frame
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x19
	bl	_blip_end_frame
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_blip_samples_avail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_config,16,3                    ; @config
	.comm	_fm_cycles_start,4,2            ; @fm_cycles_start
	.comm	_fm_last,8,3                    ; @fm_last
	.comm	_fm_buffer,8,3                  ; @fm_buffer
	.comm	_snd,8,3                        ; @snd
	.comm	_fm_cycles_ratio,8,3            ; @fm_cycles_ratio
	.comm	_fm_ptr,8,3                     ; @fm_ptr
	.comm	_fm_cycles_count,4,2            ; @fm_cycles_count
.subsections_via_symbols
