	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function FCEUD_Update
LCPI0_0:
	.quad	0x3feccccccccccccd              ## double 0.90000000000000002
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_FCEUD_Update
	.p2align	4, 0x90
_FCEUD_Update:                          ## @FCEUD_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	%edx, %r15d
	movq	%rdi, %rbx
	movl	%edx, %eax
	shll	$8, %eax
	movq	_fps_scale@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	movl	%eax, %r13d
	movq	%rsi, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rcx, %rbx
	callq	_GetWriteSound
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_GetMaxSound
	cmpl	%eax, %r14d
	setge	%al
	cmpl	$257, (%rbx)                    ## imm = 0x101
	setl	%cl
	cmpl	%r13d, %r14d
	movl	%r13d, %ebx
	cmovll	%r14d, %ebx
	testb	%cl, %al
	jne	LBB0_3
## %bb.2:
	cmpl	%r13d, %r14d
	jg	LBB0_4
LBB0_3:
	cmpl	%r13d, %r14d
	setg	_FCEUD_Update.uflow(%rip)
LBB0_4:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_WriteSound
	xorl	%eax, %eax
	callq	_GetWriteSound
	movq	_fps_scale@GOTPCREL(%rip), %rcx
	cmpl	$256, (%rcx)                    ## imm = 0x100
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jg	LBB0_7
## %bb.5:
	cvtsi2sd	%eax, %xmm0
	cvtsi2sd	%r13d, %xmm1
	mulsd	LCPI0_0(%rip), %xmm1
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_23
## %bb.6:
	testb	$1, _FCEUD_Update.uflow(%rip)
	jne	LBB0_23
LBB0_7:
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.8:
	movq	_inited@GOTPCREL(%rip), %rax
	testb	$4, (%rax)
	je	LBB0_11
## %bb.9:
	movq	_NoWaiting@GOTPCREL(%rip), %rax
	testb	$2, (%rax)
	jne	LBB0_11
## %bb.10:
	callq	_BlitScreen
LBB0_11:
	subl	%ebx, %r13d
	je	LBB0_23
## %bb.12:
	movslq	%ebx, %rax
	leaq	(%r12,%rax,4), %r14
	movq	_NoWaiting@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_13
## %bb.24:
	xorl	%eax, %eax
	callq	_GetWriteSound
	cmpl	%eax, %r13d
	cmovgel	%eax, %r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_WriteSound
	jmp	LBB0_23
LBB0_16:
	movq	_NoWaiting@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_20
## %bb.17:
	movq	_eoptions@GOTPCREL(%rip), %rax
	movq	_EO_NOTHROTTLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	callq	_FCEUI_EmulationPaused
	testq	%rax, %rax
	je	LBB0_20
LBB0_19:
	xorl	%eax, %eax
	callq	_SpeedThrottle
LBB0_20:
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.21:
	movq	_inited@GOTPCREL(%rip), %rax
	testb	$4, (%rax)
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	callq	_BlitScreen
	jmp	LBB0_23
LBB0_13:
	testl	%r13d, %r13d
	jle	LBB0_23
## %bb.14:
	movl	%r13d, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	subl	%r15d, %ebx
	cmovgel	%r15d, %r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_WriteSound
	movl	%ebx, %r13d
	testl	%ebx, %ebx
	jg	LBB0_15
LBB0_23:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FCEUD_UpdateInput              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fps_scale,4,2                  ## @fps_scale
.zerofill __DATA,__bss,_FCEUD_Update.uflow,1,2 ## @FCEUD_Update.uflow
	.comm	_inited,4,2                     ## @inited
	.comm	_NoWaiting,4,2                  ## @NoWaiting
	.comm	_eoptions,4,2                   ## @eoptions
	.comm	_EO_NOTHROTTLE,4,2              ## @EO_NOTHROTTLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FCEUD_Update                   ; -- Begin function FCEUD_Update
	.p2align	2
_FCEUD_Update:                          ; @FCEUD_Update
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	lsl	w8, w2, #8
Lloh0:
	adrp	x25, _fps_scale@GOTPAGE
Lloh1:
	ldr	x25, [x25, _fps_scale@GOTPAGEOFF]
	ldr	w9, [x25]
	sdiv	w24, w8, w9
	cbz	w24, LBB0_13
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	bl	_GetWriteSound
	mov	x23, x0
	bl	_GetMaxSound
	ldr	w8, [x25]
	cmp	w23, w24
	csel	w22, w23, w24, lt
	cmp	w8, #257
	ccmp	w23, w0, #8, lt
	ccmp	w23, w24, #4, lt
	adrp	x26, _FCEUD_Update.uflow@PAGE
	b.gt	LBB0_3
; %bb.2:
	cmp	w23, w24
	cset	w8, gt
	strb	w8, [x26, _FCEUD_Update.uflow@PAGEOFF]
LBB0_3:
	mov	x0, x21
	mov	x1, x22
	bl	_WriteSound
	bl	_GetWriteSound
	ldr	w8, [x25]
	cmp	w8, #256
	b.gt	LBB0_6
; %bb.4:
	scvtf	d0, w0
	scvtf	d1, w24
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	movk	x8, #16364, lsl #48
	fmov	d2, x8
	fmul	d1, d1, d2
	fcmp	d1, d0
	b.le	LBB0_22
; %bb.5:
	ldrb	w8, [x26, _FCEUD_Update.uflow@PAGEOFF]
	tbnz	w8, #0, LBB0_22
LBB0_6:
	cbz	x20, LBB0_10
; %bb.7:
Lloh2:
	adrp	x8, _inited@GOTPAGE
Lloh3:
	ldr	x8, [x8, _inited@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbz	w8, #2, LBB0_10
; %bb.8:
Lloh4:
	adrp	x8, _NoWaiting@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NoWaiting@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbnz	w8, #1, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_BlitScreen
LBB0_10:
	subs	w23, w24, w22
	b.eq	LBB0_22
; %bb.11:
	add	x20, x21, w22, sxtw #2
Lloh6:
	adrp	x8, _NoWaiting@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NoWaiting@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cbz	w8, LBB0_20
; %bb.12:
	bl	_GetWriteSound
	cmp	w23, w0
	csel	w1, w23, w0, lt
	mov	x0, x20
	bl	_WriteSound
	b	LBB0_22
LBB0_13:
Lloh9:
	adrp	x8, _NoWaiting@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NoWaiting@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbnz	w8, LBB0_17
; %bb.14:
Lloh12:
	adrp	x8, _eoptions@GOTPAGE
Lloh13:
	ldr	x8, [x8, _eoptions@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _EO_NOTHROTTLE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EO_NOTHROTTLE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	bl	_FCEUI_EmulationPaused
	cbz	x0, LBB0_17
LBB0_16:
	bl	_SpeedThrottle
LBB0_17:
	cbz	x20, LBB0_22
; %bb.18:
Lloh18:
	adrp	x8, _inited@GOTPAGE
Lloh19:
	ldr	x8, [x8, _inited@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbz	w8, #2, LBB0_22
; %bb.19:
	mov	x0, x20
	bl	_BlitScreen
	b	LBB0_22
LBB0_20:
	cmp	w23, #1
	b.lt	LBB0_22
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	subs	w21, w23, w19
	csel	w1, w23, w19, lt
	mov	x0, x20
	bl	_WriteSound
	mov	x23, x21
	cmp	w21, #0
	b.gt	LBB0_21
LBB0_22:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_FCEUD_UpdateInput
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_fps_scale,4,2                  ; @fps_scale
.zerofill __DATA,__bss,_FCEUD_Update.uflow,1,2 ; @FCEUD_Update.uflow
	.comm	_inited,4,2                     ; @inited
	.comm	_NoWaiting,4,2                  ; @NoWaiting
	.comm	_eoptions,4,2                   ; @eoptions
	.comm	_EO_NOTHROTTLE,4,2              ; @EO_NOTHROTTLE
.subsections_via_symbols
