	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_update_hdr_metadata         ## -- Begin function ff_update_hdr_metadata
	.p2align	4, 0x90
_ff_update_hdr_metadata:                ## @ff_update_hdr_metadata
	.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
	movsd	%xmm0, -16(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	_AV_FRAME_DATA_CONTENT_LIGHT_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_av_frame_get_side_data
	movsd	-16(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rax
	movq	_REFERENCE_WHITE@GOTPCREL(%rip), %rcx
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %rcx
	movl	%ecx, (%rax)
LBB0_2:
	movq	_AV_FRAME_DATA_MASTERING_DISPLAY_METADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_av_frame_get_side_data
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rax), %rbx
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.4:
	movq	_REFERENCE_WHITE@GOTPCREL(%rip), %rax
	movsd	-16(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	mulsd	(%rax), %xmm0
	movl	$10000, %edi                    ## imm = 0x2710
	callq	_av_d2q
	movl	%eax, (%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_FRAME_DATA_CONTENT_LIGHT_LEVEL,4,2 ## @AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
	.comm	_REFERENCE_WHITE,8,3            ## @REFERENCE_WHITE
	.comm	_AV_FRAME_DATA_MASTERING_DISPLAY_METADATA,4,2 ## @AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_update_hdr_metadata         ; -- Begin function ff_update_hdr_metadata
	.p2align	2
_ff_update_hdr_metadata:                ; @ff_update_hdr_metadata
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	fmov	d8, d0
	mov	x19, x0
Lloh0:
	adrp	x8, _AV_FRAME_DATA_CONTENT_LIGHT_LEVEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_FRAME_DATA_CONTENT_LIGHT_LEVEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_av_frame_get_side_data
Lloh3:
	adrp	x20, _REFERENCE_WHITE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _REFERENCE_WHITE@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x0]
	ldr	d0, [x20]
	fmul	d0, d0, d8
	fcvtzu	w9, d0
	str	w9, [x8]
LBB0_2:
Lloh5:
	adrp	x8, _AV_FRAME_DATA_MASTERING_DISPLAY_METADATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_FRAME_DATA_MASTERING_DISPLAY_METADATA@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_av_frame_get_side_data
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x19, [x0]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	d0, [x20]
	fmul	d0, d0, d8
	mov	w0, #10000
	bl	_av_d2q
	str	w0, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_FRAME_DATA_CONTENT_LIGHT_LEVEL,4,2 ; @AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
	.comm	_REFERENCE_WHITE,8,3            ; @REFERENCE_WHITE
	.comm	_AV_FRAME_DATA_MASTERING_DISPLAY_METADATA,4,2 ; @AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
.subsections_via_symbols
