	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_secpos_to_bufpos        ## -- Begin function DSOUND_secpos_to_bufpos
	.p2align	4, 0x90
_DSOUND_secpos_to_bufpos:               ## @DSOUND_secpos_to_bufpos
	.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
	movq	%rcx, %r14
	movq	%rdx, %rcx
	movq	%rdi, %r13
	movq	24(%rdi), %rax
	movq	(%rax), %rdi
	movq	%rsi, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rax
	cqto
	idivq	%rdi
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_1:
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r15d
LBB0_3:
	xorl	%eax, %eax
	cmpq	%rcx, %rsi
	setge	%al
	movq	_DSOUND_FREQSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r15d, %esi
	shll	%cl, %esi
	movl	(%r13), %ebx
	movl	4(%r13,%rax,4), %ecx
	movl	%ecx, %eax
	notl	%eax
	addl	%ebx, %eax
	addl	%esi, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r12d
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	imull	%r12d, %ebx
	addl	%ecx, %ebx
	xorl	%edi, %edi
	cmpl	%esi, %ebx
	setge	%dil
	callq	_assert
	movq	_DSOUND_FREQSHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	subl	%r15d, %ebx
	movslq	%ebx, %rax
	movq	%rax, (%r14)
	xorl	%edi, %edi
	cmpl	(%r13), %eax
	setl	%dil
	callq	_assert
LBB0_5:
	movslq	%r12d, %rax
	movq	16(%r13), %rcx
	movq	(%rcx), %rcx
	imulq	(%rcx), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSOUND_FREQSHIFT,4,2           ## @DSOUND_FREQSHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DSOUND_secpos_to_bufpos        ; -- Begin function DSOUND_secpos_to_bufpos
	.p2align	2
_DSOUND_secpos_to_bufpos:               ; @DSOUND_secpos_to_bufpos
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
	sdiv	x21, x1, x8
	ldr	w8, [x0]
	mov	w9, #8
	mov	w10, #4
	cmp	x1, x2
	csel	x9, x10, x9, lt
	ldr	w9, [x0, x9]
Lloh0:
	adrp	x23, _DSOUND_FREQSHIFT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DSOUND_FREQSHIFT@GOTPAGEOFF]
	ldr	w10, [x23]
	lsl	w10, w21, w10
	mvn	w11, w9
	add	w11, w8, w11
	add	w11, w11, w10
	sdiv	w22, w11, w8
	cbz	x3, LBB0_2
; %bb.1:
	mov	x20, x3
	madd	w24, w22, w8, w9
	cmp	w24, w10
	cset	w0, ge
	bl	_assert
	ldr	w8, [x23]
	lsl	w8, w21, w8
	ldr	w9, [x19]
	sub	w8, w24, w8
	cmp	w8, w9
	sxtw	x8, w8
	str	x8, [x20]
	cset	w0, lt
	bl	_assert
LBB0_2:
	sxtw	x8, w22
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	ldr	x9, [x9]
	mul	x0, x9, x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DSOUND_FREQSHIFT,4,2           ; @DSOUND_FREQSHIFT
.subsections_via_symbols
