	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_write_raw_data            ## -- Begin function jpeg_write_raw_data
	.p2align	4, 0x90
_jpeg_write_raw_data:                   ## @jpeg_write_raw_data
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	_CSTATE_RAW_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_2
## %bb.1:
	movq	_JERR_BAD_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ERREXIT1
LBB0_2:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_11
## %bb.3:
	movq	48(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	%rax, (%rdx)
	movq	%rcx, 8(%rdx)
	movl	%ebx, %edi
	callq	*16(%rdx)
LBB0_5:
	movq	40(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	*(%rax)
LBB0_7:
	movslq	24(%rbx), %rax
	movq	_DCTSIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r12
	imulq	%rax, %r12
	cmpl	%r15d, %r12d
	jle	LBB0_9
## %bb.8:
	movq	_JERR_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ERREXIT
LBB0_9:
	movq	32(%rbx), %rax
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	addq	%r12, 8(%rbx)
	jmp	LBB0_13
LBB0_11:
	movq	_JWRN_TOO_MUCH_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WARNMS
LBB0_12:
	xorl	%r12d, %r12d
LBB0_13:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSTATE_RAW_OK,8,3              ## @CSTATE_RAW_OK
	.comm	_JERR_BAD_STATE,4,2             ## @JERR_BAD_STATE
	.comm	_JWRN_TOO_MUCH_DATA,4,2         ## @JWRN_TOO_MUCH_DATA
	.comm	_DCTSIZE,4,2                    ## @DCTSIZE
	.comm	_JERR_BUFFER_SIZE,4,2           ## @JERR_BUFFER_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_write_raw_data            ; -- Begin function jpeg_write_raw_data
	.p2align	2
_jpeg_write_raw_data:                   ; @jpeg_write_raw_data
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x2, [x0]
Lloh0:
	adrp	x8, _CSTATE_RAW_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSTATE_RAW_OK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, x8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _JERR_BAD_STATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JERR_BAD_STATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ERREXIT1
LBB0_2:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.ge	LBB0_11
; %bb.3:
	ldr	x10, [x19, #48]
	cbz	x10, LBB0_5
; %bb.4:
	stp	x8, x9, [x10]
	ldr	x8, [x10, #16]
	mov	x0, x19
	blr	x8
LBB0_5:
	ldr	x8, [x19, #40]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_7
; %bb.6:
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
LBB0_7:
	ldrsw	x8, [x19, #24]
Lloh6:
	adrp	x9, _DCTSIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DCTSIZE@GOTPAGEOFF]
Lloh8:
	ldrsw	x9, [x9]
	mul	x22, x9, x8
	cmp	w22, w21
	b.le	LBB0_9
; %bb.8:
Lloh9:
	adrp	x8, _JERR_BUFFER_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JERR_BUFFER_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ERREXIT
LBB0_9:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	cbz	w0, LBB0_12
; %bb.10:
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	str	x8, [x19, #8]
	b	LBB0_13
LBB0_11:
Lloh12:
	adrp	x8, _JWRN_TOO_MUCH_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _JWRN_TOO_MUCH_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WARNMS
LBB0_12:
	mov	w22, #0
LBB0_13:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CSTATE_RAW_OK,8,3              ; @CSTATE_RAW_OK
	.comm	_JERR_BAD_STATE,4,2             ; @JERR_BAD_STATE
	.comm	_JWRN_TOO_MUCH_DATA,4,2         ; @JWRN_TOO_MUCH_DATA
	.comm	_DCTSIZE,4,2                    ; @DCTSIZE
	.comm	_JERR_BUFFER_SIZE,4,2           ; @JERR_BUFFER_SIZE
.subsections_via_symbols
