	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_header
_write_header:                          ## @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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CONTEXT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	88(%r12), %rax
	movq	(%rax), %r14
	addq	$112, %r14
	leal	(,%rbx,4), %edx
	movq	%r15, %rdi
	movl	$128, %esi
	callq	_memset
	movl	(%r12), %edx
	cmpl	$1, %edx
	jg	LBB0_7
## %bb.1:
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	4(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	4(%r12), %eax
	movq	_AC_RANGE_CUSTOM_TAB@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.2:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	(%r14), %rax
	subl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	_put_symbol
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_3
LBB0_4:
	movl	16(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.5:
	movl	20(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
LBB0_6:
	movl	104(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_put_rac
	movl	24(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	28(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	100(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_put_rac
	movl	96(%r12), %esi
	movq	%r14, %rdi
	callq	_write_quant_tables
	jmp	LBB0_14
LBB0_7:
	cmpl	$2, %edx
	jne	LBB0_14
## %bb.8:
	movl	32(%r12), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	cmpl	$0, 32(%r12)
	jle	LBB0_14
## %bb.9:
	xorl	%ecx, %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movslq	32(%r12), %rax
	cmpq	%rax, %rcx
	jge	LBB0_14
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	88(%r12), %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %r13
	movl	36(%r13), %eax
	incl	%eax
	imull	40(%r12), %eax
	cltd
	idivl	44(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	48(%r13), %eax
	incl	%eax
	imull	52(%r12), %eax
	cltd
	idivl	56(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	60(%r13), %eax
	incl	%eax
	imull	40(%r12), %eax
	cltd
	idivl	44(%r12)
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	movl	64(%r13), %eax
	incl	%eax
	imull	52(%r12), %eax
	cltd
	idivl	56(%r12)
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	cmpl	$0, 68(%r12)
	jle	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	80(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_put_symbol
	movq	80(%r12), %rax
	movl	(%rax,%rbx,4), %eax
	xorl	%edi, %edi
	cmpl	72(%r12), %eax
	sete	%dil
	callq	_av_assert0
	incq	%rbx
	movslq	68(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
	jmp	LBB0_13
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTEXT_SIZE,4,2               ## @CONTEXT_SIZE
	.comm	_AC_RANGE_CUSTOM_TAB,4,2        ## @AC_RANGE_CUSTOM_TAB
	.no_dead_strip	_write_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_header
_write_header:                          ; @write_header
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _CONTEXT_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONTEXT_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x0, #88]
	ldr	x8, [x8]
	add	x21, x8, #112
	lsl	w2, w12, #2
	mov	x0, x20
	mov	w1, #128
	bl	_memset
	ldr	w2, [x19]
	cmp	w2, #1
	b.gt	LBB0_7
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w2, [x19, #4]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x19, #4]
Lloh8:
	adrp	x9, _AC_RANGE_CUSTOM_TAB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AC_RANGE_CUSTOM_TAB@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
	mov	w22, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x22]
	ldr	x9, [x21]
	ldr	w9, [x9, x22]
	sub	w2, w8, w9
	mov	x0, x21
	mov	x1, x20
	mov	w3, #1
	bl	_put_symbol
	add	x22, x22, #4
	cmp	x22, #1024
	b.ne	LBB0_3
LBB0_4:
	ldr	w2, [x19, #16]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.5:
	ldr	w2, [x19, #20]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
LBB0_6:
	ldr	w2, [x19, #104]
	mov	x0, x21
	mov	x1, x20
	bl	_put_rac
	ldr	w2, [x19, #24]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w2, [x19, #28]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w2, [x19, #100]
	mov	x0, x21
	mov	x1, x20
	bl	_put_rac
	ldr	w1, [x19, #96]
	mov	x0, x21
	bl	_write_quant_tables
	b	LBB0_14
LBB0_7:
	cmp	w2, #2
	b.ne	LBB0_14
; %bb.8:
	ldr	w2, [x19, #32]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x19, #32]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.9:
	mov	x22, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19, #32]
	cmp	x22, x8
	b.ge	LBB0_14
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x8, [x19, #88]
	ldr	x23, [x8, x22, lsl #3]
	ldr	w8, [x23, #36]
	ldp	w9, w10, [x19, #40]
	madd	w8, w9, w8, w9
	sdiv	w2, w8, w10
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x23, #48]
	ldp	w9, w10, [x19, #52]
	madd	w8, w9, w8, w9
	sdiv	w2, w8, w10
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x23, #60]
	ldp	w9, w10, [x19, #40]
	madd	w8, w9, w8, w9
	sdiv	w8, w8, w10
	sub	w2, w8, #1
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x23, #64]
	ldp	w9, w10, [x19, #52]
	madd	w8, w9, w8, w9
	sdiv	w8, w8, w10
	sub	w2, w8, #1
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	w8, [x19, #68]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x23, #0
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #80]
	lsl	x24, x23, #2
	ldr	w2, [x8, x24]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_put_symbol
	ldr	x8, [x19, #80]
	ldr	w8, [x8, x24]
	ldr	w9, [x19, #72]
	cmp	w8, w9
	cset	w0, eq
	bl	_av_assert0
	add	x23, x23, #1
	ldrsw	x8, [x19, #68]
	cmp	x23, x8
	b.lt	LBB0_13
	b	LBB0_10
LBB0_14:
	ldur	x8, [x29, #-56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #48
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTEXT_SIZE,4,2               ; @CONTEXT_SIZE
	.comm	_AC_RANGE_CUSTOM_TAB,4,2        ; @AC_RANGE_CUSTOM_TAB
	.no_dead_strip	_write_header
.subsections_via_symbols
