	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_cod
_put_cod:                               ## @put_cod
	.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
	movl	(%rdi), %eax
	subl	4(%rdi), %eax
	movl	$-1, %r15d
	cmpl	$14, %eax
	jl	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	leaq	4(%rdi), %rbx
	movq	_JPEG2000_COD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_be16
	movq	%rbx, %rdi
	movl	$12, %esi
	callq	_bytestream_put_be16
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bytestream_put_be16
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	movl	16(%r14), %esi
	decl	%esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movl	20(%r14), %esi
	addl	$-2, %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movl	24(%r14), %esi
	addl	$-2, %esi
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	movq	32(%r14), %rax
	movq	_FF_DWT53@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
	movq	%rbx, %rdi
	callq	_bytestream_put_byte
LBB0_2:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JPEG2000_COD,4,2               ## @JPEG2000_COD
	.comm	_AV_PIX_FMT_YUV444P,8,3         ## @AV_PIX_FMT_YUV444P
	.comm	_FF_DWT53,8,3                   ## @FF_DWT53
	.no_dead_strip	_put_cod
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_cod
_put_cod:                               ; @put_cod
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	mov	x19, x0
	ldr	w9, [x19, #4]!
	sub	w8, w8, w9
	cmp	w8, #14
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_3
LBB0_2:
	mov	x20, x0
Lloh0:
	adrp	x8, _JPEG2000_COD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JPEG2000_COD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bytestream_put_be16
	mov	x0, x19
	mov	w1, #12
	bl	_bytestream_put_be16
	mov	x0, x19
	mov	w1, #0
	bl	_bytestream_put_byte
	mov	x0, x19
	mov	w1, #0
	bl	_bytestream_put_byte
	mov	x0, x19
	mov	w1, #1
	bl	_bytestream_put_be16
	mov	x0, x19
	mov	w1, #0
	bl	_bytestream_put_byte
	ldr	w8, [x20, #16]
	sub	w1, w8, #1
	mov	x0, x19
	bl	_bytestream_put_byte
	ldr	w8, [x20, #20]
	sub	w1, w8, #2
	mov	x0, x19
	bl	_bytestream_put_byte
	ldr	w8, [x20, #24]
	sub	w1, w8, #2
	mov	x0, x19
	bl	_bytestream_put_byte
	mov	x0, x19
	mov	w1, #0
	bl	_bytestream_put_byte
	ldr	x8, [x20, #32]
Lloh3:
	adrp	x9, _FF_DWT53@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FF_DWT53@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, eq
	mov	x0, x19
	bl	_bytestream_put_byte
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_JPEG2000_COD,4,2               ; @JPEG2000_COD
	.comm	_AV_PIX_FMT_YUV444P,8,3         ; @AV_PIX_FMT_YUV444P
	.comm	_FF_DWT53,8,3                   ; @FF_DWT53
	.no_dead_strip	_put_cod
.subsections_via_symbols
