	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_calc_output_dimensions    ## -- Begin function jpeg_calc_output_dimensions
	.p2align	4, 0x90
_jpeg_calc_output_dimensions:           ## @jpeg_calc_output_dimensions
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	_DSTATE_READY@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	72(%rbx), %rax
	movq	%rax, 80(%rbx)
	movq	56(%rbx), %rax
	movq	%rax, 64(%rbx)
	movl	32(%rbx), %ecx
	addl	$-128, %ecx
	cmpl	$4, %ecx
	ja	LBB0_7
## %bb.3:
	movl	$1, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_6:
	movl	$4, %eax
	jmp	LBB0_8
LBB0_7:
	movl	20(%rbx), %eax
	jmp	LBB0_8
LBB0_5:
	movl	$3, %eax
	jmp	LBB0_8
LBB0_4:
	movq	_RGB_PIXELSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movl	%eax, 36(%rbx)
	cmpq	$0, 48(%rbx)
	movl	$1, %r14d
	cmovnel	%r14d, %eax
	movl	%eax, 40(%rbx)
	movq	%rbx, %rdi
	callq	_use_merged_upsample
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	28(%rbx), %r14d
LBB0_10:
	movl	%r14d, 44(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_DSTATE_READY,8,3               ## @DSTATE_READY
	.comm	_JERR_BAD_STATE,4,2             ## @JERR_BAD_STATE
	.comm	_RGB_PIXELSIZE,4,2              ## @RGB_PIXELSIZE
	.comm	_DCTSIZE,4,2                    ## @DCTSIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_calc_output_dimensions    ; -- Begin function jpeg_calc_output_dimensions
	.p2align	2
_jpeg_calc_output_dimensions:           ; @jpeg_calc_output_dimensions
	.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
	mov	x19, x0
	ldr	x2, [x0]
Lloh0:
	adrp	x8, _DSTATE_READY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSTATE_READY@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:
	ldr	x8, [x19, #72]
	str	x8, [x19, #80]
	ldr	x8, [x19, #56]
	str	x8, [x19, #64]
	ldr	w8, [x19, #32]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hi	LBB0_5
; %bb.3:
	mov	w8, #1
Lloh6:
	adrp	x10, lJTI0_0@PAGE
Lloh7:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
	mov	w8, #4
	b	LBB0_8
LBB0_5:
	ldr	w8, [x19, #20]
	b	LBB0_8
LBB0_6:
	mov	w8, #3
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _RGB_PIXELSIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RGB_PIXELSIZE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
LBB0_8:
	ldr	x9, [x19, #48]
	cmp	x9, #0
	csinc	w9, w8, wzr, eq
	stp	w8, w9, [x19, #36]
	mov	x0, x19
	bl	_use_merged_upsample
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w8, [x19, #28]
	b	LBB0_11
LBB0_10:
	mov	w8, #1
LBB0_11:
	str	w8, [x19, #44]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
                                        ; -- End function
	.comm	_DSTATE_READY,8,3               ; @DSTATE_READY
	.comm	_JERR_BAD_STATE,4,2             ; @JERR_BAD_STATE
	.comm	_RGB_PIXELSIZE,4,2              ; @RGB_PIXELSIZE
	.comm	_DCTSIZE,4,2                    ; @DCTSIZE
.subsections_via_symbols
