	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DSOUND_bufpos_to_secpos
_DSOUND_bufpos_to_secpos:               ## @DSOUND_bufpos_to_secpos
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	32(%rdi), %rax
	movq	(%rax), %rcx
	movq	24(%rdi), %rax
	movl	(%rax), %r9d
	movl	%esi, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, %ebx
	imull	16(%rdi), %ebx
	addl	8(%rdi), %ebx
	movq	_DSOUND_FREQSHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	imull	%r9d, %ebx
	movl	(%rdi), %r8d
	movl	4(%rdi), %edx
	movl	%r8d, %eax
	subl	%r9d, %eax
	cmpl	%r8d, %ebx
	cmovgel	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %ecx
	callq	_TRACE
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSOUND_FREQSHIFT,4,2           ## @DSOUND_FREQSHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Converted %d/%d to %d/%d\n"

	.no_dead_strip	_DSOUND_bufpos_to_secpos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DSOUND_bufpos_to_secpos
_DSOUND_bufpos_to_secpos:               ; @DSOUND_bufpos_to_secpos
	.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
	ldp	x9, x8, [x0, #24]
	ldr	x8, [x8]
	ldr	w8, [x8]
	ldr	w9, [x9]
	sdiv	w8, w1, w8
	ldr	w10, [x0, #16]
	ldp	w2, w11, [x0, #4]
	madd	w8, w8, w10, w11
Lloh0:
	adrp	x10, _DSOUND_FREQSHIFT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DSOUND_FREQSHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	asr	w8, w8, w10
	mul	w8, w8, w9
	ldr	w4, [x0]
	sub	w9, w4, w9
	cmp	w8, w4
	csel	w19, w8, w9, lt
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x19
	bl	_TRACE
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DSOUND_FREQSHIFT,4,2           ; @DSOUND_FREQSHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Converted %d/%d to %d/%d\n"

	.no_dead_strip	_DSOUND_bufpos_to_secpos
.subsections_via_symbols
