	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function update_volume
LCPI0_0:
	.quad	0xc08f400000000000              ## double -1000
LCPI0_1:
	.quad	0x4034000000000000              ## double 20
LCPI0_2:
	.quad	0x4024000000000000              ## double 10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_update_volume:                         ## @update_volume
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cvtsi2sd	%eax, %xmm2
	movq	_SDL_MIX_MAXVOLUME@GOTPCREL(%rip), %rax
	cvtsi2sdl	(%rax), %xmm1
	divsd	%xmm1, %xmm2
	cvttsd2si	%xmm2, %edi
	movsd	%xmm0, -40(%rbp)                ## 8-byte Spill
	callq	_log
                                        ## kill: def $eax killed $eax def $rax
	shll	$2, %eax
	leal	(%rax,%rax,4), %r15d
	movl	$10, %edi
	callq	_log
	movsd	-40(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%eax, %xmm2
	jmp	LBB0_3
LBB0_1:
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
LBB0_3:
	movq	_SDL_MIX_MAXVOLUME@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r12d, %xmm1
	mulsd	%xmm0, %xmm1
	addsd	%xmm2, %xmm1
	divsd	LCPI0_1(%rip), %xmm1
	movsd	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_pow
	imull	%eax, %ebx
	movl	%ebx, %edi
	callq	_lrint
	movl	(%r14), %ecx
	addl	%ecx, %r12d
	cmpl	%eax, %ecx
	cmovnel	%eax, %r12d
	movl	(%r15), %edx
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_av_clip
	cvttsd2si	%xmm0, %eax
	movl	%eax, (%r14)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_MIX_MAXVOLUME,4,2          ## @SDL_MIX_MAXVOLUME
	.no_dead_strip	_update_volume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_volume
_update_volume:                         ; @update_volume
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -56
	.cfi_offset b9, -64
	fmov	d8, d0
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _SDL_MIX_MAXVOLUME@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SDL_MIX_MAXVOLUME@GOTPAGEOFF]
	cbz	w8, LBB0_2
; %bb.1:
	scvtf	d0, w8
	ldr	s1, [x21]
	sshll.2d	v1, v1, #0
	scvtf	d1, d1
	fdiv	d0, d0, d1
	fcvtzs	w0, d0
	bl	_log
	add	w8, w0, w0, lsl #2
	lsl	w22, w8, #2
	mov	w0, #10
	bl	_log
	sdiv	w8, w22, w0
	scvtf	d0, w8
	b	LBB0_3
LBB0_2:
	mov	x8, #70368744177664
	movk	x8, #49295, lsl #48
	fmov	d0, x8
LBB0_3:
	ldr	w22, [x21]
	scvtf	d1, w20
	fmadd	d0, d1, d8, d0
	fmov	d1, #20.00000000
	fdiv	d1, d0, d1
	fmov	d0, #10.00000000
	bl	_pow
	mul	w0, w0, w22
	bl	_lrint
	ldr	w8, [x19]
	add	w9, w8, w20
	cmp	w8, w0
	csel	w0, w9, w0, eq
	ldr	w2, [x21]
	mov	w1, #0
	bl	_av_clip
	fcvtzs	w8, d0
	str	w8, [x19]
	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	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_MIX_MAXVOLUME,4,2          ; @SDL_MIX_MAXVOLUME
	.no_dead_strip	_update_volume
.subsections_via_symbols
