	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_qscale
_update_qscale:                         ## @update_qscale
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	imull	$139, 4(%rdi), %eax
	movq	_FF_LAMBDA_SCALE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	shll	$6, %edi
	addl	%eax, %edi
	movq	_FF_LAMBDA_SHIFT@GOTPCREL(%rip), %r14
	movb	(%r14), %cl
	addb	$7, %cl
	sarl	%cl, %edi
	movl	%edi, 8(%rbx)
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	$31, %edx
	cmpq	$0, 24(%rbx)
	jne	LBB0_2
## %bb.1:
	movl	4(%rax), %edx
LBB0_2:
	callq	_av_clip
	movl	%eax, 8(%rbx)
	movl	4(%rbx), %eax
	imull	%eax, %eax
	movl	(%r15), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	addl	%eax, %edx
	movb	(%r14), %cl
	sarl	%cl, %edx
	movl	%edx, 12(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_ff_mpeg2_non_linear_qscale,8,3 ## @ff_mpeg2_non_linear_qscale
	.comm	_FF_LAMBDA_SHIFT,4,2            ## @FF_LAMBDA_SHIFT
	.comm	_FF_LAMBDA_SCALE,4,2            ## @FF_LAMBDA_SCALE
	.no_dead_strip	_update_qscale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_qscale
_update_qscale:                         ; @update_qscale
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w8, [x0, #4]
	mov	w9, #139
Lloh0:
	adrp	x21, _FF_LAMBDA_SCALE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FF_LAMBDA_SCALE@GOTPAGEOFF]
	mul	w8, w8, w9
	ldr	w9, [x21]
	add	w8, w8, w9, lsl #6
Lloh2:
	adrp	x20, _FF_LAMBDA_SHIFT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _FF_LAMBDA_SHIFT@GOTPAGEOFF]
	ldr	w9, [x20]
	add	w9, w9, #7
	asr	w0, w8, w9
	str	w0, [x19, #8]
	ldp	x8, x9, [x19, #16]
	ldr	w1, [x8]
	cbz	x9, LBB0_2
; %bb.1:
	mov	w2, #31
	b	LBB0_3
LBB0_2:
	ldr	w2, [x8, #4]
LBB0_3:
	bl	_av_clip
	ldr	w8, [x19, #4]
	mul	w8, w8, w8
	ldr	w9, [x21]
	cmp	w9, #0
	cinc	w9, w9, lt
	add	w8, w8, w9, asr #1
	ldr	w9, [x20]
	asr	w8, w8, w9
	stp	w0, w8, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_ff_mpeg2_non_linear_qscale,8,3 ; @ff_mpeg2_non_linear_qscale
	.comm	_FF_LAMBDA_SHIFT,4,2            ; @FF_LAMBDA_SHIFT
	.comm	_FF_LAMBDA_SCALE,4,2            ; @FF_LAMBDA_SCALE
	.no_dead_strip	_update_qscale
.subsections_via_symbols
