	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DSOUND_RecalcPrimary
_DSOUND_RecalcPrimary:                  ## @DSOUND_RecalcPrimary
	.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
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	movl	4(%rax), %esi
	callq	_DSOUND_fraglen
	movl	%eax, %esi
	movl	%eax, (%rbx)
	movl	8(%rbx), %eax
	cltd
	idivl	%esi
	movl	%eax, 4(%rbx)
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_TRACE
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_DSDDESC_DONTNEEDWRITELEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%rbx)
	jne	LBB0_3
LBB0_2:
	movq	16(%rbx), %rax
	movslq	(%rax), %rcx
	imulq	$1374389535, %rcx, %r14         ## imm = 0x51EB851F
	movq	%r14, %rcx
	shrq	$63, %rcx
	sarq	$37, %r14
	addl	%ecx, %r14d
	imull	4(%rax), %r14d
LBB0_3:
	movl	%r14d, 12(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%p)\n"

L_.str.1:                               ## @.str.1
	.asciz	"fraglen=%d helfrags=%d\n"

	.comm	_DSDDESC_DONTNEEDWRITELEAD,4,2  ## @DSDDESC_DONTNEEDWRITELEAD
	.no_dead_strip	_DSOUND_RecalcPrimary
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DSOUND_RecalcPrimary
_DSOUND_RecalcPrimary:                  ; @DSOUND_RecalcPrimary
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	x8, [x19, #16]
	ldp	w0, w1, [x8]
	bl	_DSOUND_fraglen
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #8]
	sdiv	w8, w8, w0
	stp	w0, w8, [x19]
	stp	x0, x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x19, #24]
Lloh4:
	adrp	x9, _DSDDESC_DONTNEEDWRITELEAD@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DSDDESC_DONTNEEDWRITELEAD@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w8, #0
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19, #16]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	ldp	w10, w8, [x8]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	mul	x9, x10, x9
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	mul	w8, w9, w8
LBB0_4:
	str	w8, [x19, #12]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p)\n"

l_.str.1:                               ; @.str.1
	.asciz	"fraglen=%d helfrags=%d\n"

	.comm	_DSDDESC_DONTNEEDWRITELEAD,4,2  ; @DSDDESC_DONTNEEDWRITELEAD
	.no_dead_strip	_DSOUND_RecalcPrimary
.subsections_via_symbols
