	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cbs_jpeg_write_scan
_cbs_jpeg_write_scan:                   ## @cbs_jpeg_write_scan
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	(%rsi), %r12
	leaq	16(%r12), %rdx
	movq	%r15, %rsi
	callq	_cbs_jpeg_write_scan_header
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.3:
	movl	(%r12), %ebx
	shll	$3, %ebx
	movq	%r15, %rdi
	callq	_put_bits_left
	cmpl	%eax, %ebx
	jle	LBB0_4
## %bb.8:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_4:
	cmpl	$0, (%r12)
	jle	LBB0_7
## %bb.5:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_put_bits
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_cbs_jpeg_write_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cbs_jpeg_write_scan
_cbs_jpeg_write_scan:                   ; @cbs_jpeg_write_scan
	.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, x2
	ldr	x20, [x1]
	add	x2, x20, #16
	mov	x1, x19
	bl	_cbs_jpeg_write_scan_header
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	w21, [x20]
	mov	x0, x19
	bl	_put_bits_left
	cmp	w0, w21, lsl #3
	b.ge	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_4:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w2, [x8, x21, lsl #2]
	mov	x0, x19
	mov	w1, #8
	bl	_put_bits
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_6
LBB0_7:
	mov	w0, #0
LBB0_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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_cbs_jpeg_write_scan
.subsections_via_symbols
