	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspChangeVideoFormat          ## -- Begin function ScspChangeVideoFormat
	.p2align	4, 0x90
_ScspChangeVideoFormat:                 ## @ScspChangeVideoFormat
	.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
	movl	%edi, %ebx
	testl	%edi, %edi
	movl	$735, %eax                      ## imm = 0x2DF
	movl	$882, %ecx                      ## imm = 0x372
	cmovel	%eax, %ecx
	movl	$263, %eax                      ## imm = 0x107
	movl	$313, %edx                      ## imm = 0x139
	cmovel	%eax, %edx
	movq	_scspsoundlen@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_scsplines@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	movq	_scspsoundbufs@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	movq	_scspsoundbufsize@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_scsp_alloc_bufs
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	movl	$60, %eax
	movl	$50, %edi
	cmovel	%eax, %edi
	movq	_SNDCore@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	callq	*(%rax)
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scspsoundlen,4,2               ## @scspsoundlen
	.comm	_scsplines,4,2                  ## @scsplines
	.comm	_scspsoundbufs,4,2              ## @scspsoundbufs
	.comm	_scspsoundbufsize,4,2           ## @scspsoundbufsize
	.comm	_SNDCore,8,3                    ## @SNDCore
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspChangeVideoFormat          ; -- Begin function ScspChangeVideoFormat
	.p2align	2
_ScspChangeVideoFormat:                 ; @ScspChangeVideoFormat
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w8, #882
	mov	w9, #735
	cmp	w0, #0
	csel	w8, w9, w8, eq
	mov	w9, #313
	mov	w10, #263
Lloh0:
	adrp	x11, _scsplines@GOTPAGE
Lloh1:
	ldr	x11, [x11, _scsplines@GOTPAGEOFF]
	csel	w9, w10, w9, eq
Lloh2:
	str	w9, [x11]
Lloh3:
	adrp	x9, _scspsoundlen@GOTPAGE
Lloh4:
	ldr	x9, [x9, _scspsoundlen@GOTPAGEOFF]
Lloh5:
	adrp	x10, _scspsoundbufs@GOTPAGE
Lloh6:
	ldr	x10, [x10, _scspsoundbufs@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
Lloh8:
	ldr	w9, [x10]
	mul	w8, w9, w8
Lloh9:
	adrp	x9, _scspsoundbufsize@GOTPAGE
Lloh10:
	ldr	x9, [x9, _scspsoundbufsize@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
	bl	_scsp_alloc_bufs
	tbnz	x0, #63, LBB0_2
; %bb.1:
	mov	w8, #50
	mov	w9, #60
	cmp	w19, #0
	csel	w0, w9, w8, eq
Lloh12:
	adrp	x8, _SNDCore@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SNDCore@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x8, [x8]
	blr	x8
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_scspsoundlen,4,2               ; @scspsoundlen
	.comm	_scsplines,4,2                  ; @scsplines
	.comm	_scspsoundbufs,4,2              ; @scspsoundbufs
	.comm	_scspsoundbufsize,4,2           ; @scspsoundbufsize
	.comm	_SNDCore,8,3                    ; @SNDCore
.subsections_via_symbols
