	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnxhd_write_header
_dnxhd_write_header:                    ## @dnxhd_write_header
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movl	(%r15), %edx
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_memset
	leaq	8(%rbx), %rdi
	movl	(%r15), %esi
	callq	_AV_WB16
	movl	$-1270, %eax                    ## imm = 0xFB0A
	addl	4(%r15), %eax
	xorl	%ecx, %ecx
	cmpl	$5, %eax
	setb	%cl
	leal	(%rcx,%rcx), %eax
	incl	%eax
	movl	%eax, 16(%rbx)
	cmpl	$0, 8(%r15)
	je	LBB0_1
## %bb.2:
	movl	12(%r15), %eax
	addl	$2, %eax
	jmp	LBB0_3
LBB0_1:
	movl	$1, %eax
LBB0_3:
	movl	%eax, 20(%rbx)
	movabsq	$687194767488, %rax             ## imm = 0xA000000080
	movq	%rax, 24(%rbx)
	leaq	96(%rbx), %rdi
	movl	(%r14), %esi
	movb	8(%r15), %cl
	sarl	%cl, %esi
	callq	_AV_WB16
	leaq	104(%rbx), %rdi
	movl	4(%r14), %esi
	callq	_AV_WB16
	leaq	116(%rbx), %rdi
	movl	(%r14), %esi
	movb	8(%r15), %cl
	sarl	%cl, %esi
	callq	_AV_WB16
	xorl	%eax, %eax
	cmpl	$10, 16(%r15)
	sete	%al
	shll	$5, %eax
	addl	$56, %eax
	movl	%eax, 132(%rbx)
	movl	8(%r15), %eax
	leal	136(,%rax,4), %eax
	movl	%eax, 136(%rbx)
	leaq	160(%rbx), %rdi
	movl	4(%r15), %esi
	callq	_AV_WB32
	xorl	%eax, %eax
	cmpl	$0, 8(%r15)
	sete	%al
	shll	$7, %eax
	movl	20(%r15), %ecx
	shll	$6, %ecx
	orl	%eax, %ecx
	movq	8(%r14), %rax
	movq	_AV_PIX_FMT_YUV444P10@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpq	(%rdx), %rax
	sete	%sil
	orl	%ecx, %esi
	movl	%esi, 176(%rbx)
	movl	$1, 380(%rbx)
	movl	$2, 1436(%rbx)
	leaq	1448(%rbx), %rdi
	movl	32(%r15), %eax
	leal	4(,%rax,4), %esi
	callq	_AV_WB16
	leaq	1456(%rbx), %rdi
	movl	32(%r15), %esi
	callq	_AV_WB16
	movl	$16, 1468(%rbx)
	addq	$1472, %rbx                     ## imm = 0x5C0
	movq	%rbx, 24(%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_YUV444P10,8,3       ## @AV_PIX_FMT_YUV444P10
	.no_dead_strip	_dnxhd_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dnxhd_write_header
lCPI0_0:
	.long	128                             ; 0x80
	.long	160                             ; 0xa0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dnxhd_write_header:                    ; @dnxhd_write_header
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #16]
	ldr	w2, [x21]
	mov	x0, x1
	mov	w1, #0
	bl	_memset
	add	x0, x19, #8
	ldr	w1, [x21]
	bl	_AV_WB16
	ldr	w8, [x21, #4]
	sub	w8, w8, #1270
	cmp	w8, #5
	mov	w8, #3
	csinc	w8, w8, wzr, lo
	str	w8, [x19, #16]
	ldr	w8, [x21, #8]
	mov	w22, #1
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x21, #12]
	add	w8, w8, #2
	b	LBB0_3
LBB0_2:
	mov	w8, #1
LBB0_3:
	str	w8, [x19, #20]
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #24]
	add	x0, x19, #96
	ldr	w8, [x20]
	ldr	w9, [x21, #8]
	asr	w1, w8, w9
	bl	_AV_WB16
	add	x0, x19, #104
	ldr	w1, [x20, #4]
	bl	_AV_WB16
	add	x0, x19, #116
	ldr	w8, [x20]
	ldr	w9, [x21, #8]
	asr	w1, w8, w9
	bl	_AV_WB16
	ldr	w8, [x21, #16]
	mov	w9, #56
	mov	w10, #88
	cmp	w8, #10
	csel	w8, w10, w9, eq
	str	w8, [x19, #132]
	ldr	w8, [x21, #8]
	lsl	w8, w8, #2
	add	w8, w8, #136
	str	w8, [x19, #136]
	add	x0, x19, #160
	ldr	w1, [x21, #4]
	bl	_AV_WB32
	ldr	w8, [x21, #8]
	cmp	w8, #0
	cset	w8, eq
	lsl	w8, w8, #7
	ldr	w9, [x21, #20]
	orr	w8, w8, w9, lsl #6
	ldr	x9, [x20, #8]
Lloh2:
	adrp	x10, _AV_PIX_FMT_YUV444P10@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_PIX_FMT_YUV444P10@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w9, eq
	orr	w8, w8, w9
	str	w8, [x19, #176]
	str	w22, [x19, #380]
	mov	w8, #2
	str	w8, [x19, #1436]
	add	x0, x19, #1448
	ldr	w8, [x21, #32]
	lsl	w8, w8, #2
	add	w1, w8, #4
	bl	_AV_WB16
	add	x0, x19, #1456
	ldr	w1, [x21, #32]
	bl	_AV_WB16
	mov	w8, #16
	str	w8, [x19, #1468]
	add	x8, x19, #1472
	str	x8, [x21, #24]
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_YUV444P10,8,3       ; @AV_PIX_FMT_YUV444P10
	.no_dead_strip	_dnxhd_write_header
.subsections_via_symbols
