	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_add_quant_table           ## -- Begin function jpeg_add_quant_table
	.p2align	4, 0x90
_jpeg_add_quant_table:                  ## @jpeg_add_quant_table
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r13
	movq	%rdi, %r12
	movq	(%rdi), %rdx
	movq	8(%rdi), %rbx
	movslq	%esi, %r15
	movq	_CSTATE_START@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_2
## %bb.1:
	movq	_JERR_BAD_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ERREXIT1
LBB0_2:
	movq	(%rbx,%r15,8), %r8
	testq	%r8, %r8
	jne	LBB0_4
## %bb.3:
	movl	%r12d, %edi
	callq	_jpeg_alloc_quant_table
	movq	%rax, %r8
	movq	%rax, (%rbx,%r15,8)
LBB0_4:
	movq	_DCTSIZE2@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_13
## %bb.5:
	movslq	-44(%rbp), %rdi                 ## 4-byte Folded Reload
	movq	8(%r8), %rcx
	xorl	%ebx, %ebx
	movabsq	$-6640827866535438581, %r9      ## imm = 0xA3D70A3D70A3D70B
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%r14, %r14
	cmovneq	%rdx, %rax
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r10
	je	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %esi
	imulq	%rdi, %rsi
	leaq	50(%rsi), %rax
	imulq	%r9
	leaq	(%rdx,%rsi), %rax
	addq	$50, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$6, %rax
	addq	%rdx, %rax
	cmpq	$2, %rax
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$32767, %rax                    ## imm = 0x7FFF
	jb	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$32767, %eax                    ## imm = 0x7FFF
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	$255, %edx
	cmpq	$256, %rax                      ## imm = 0x100
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdx
	jmp	LBB0_12
LBB0_13:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSTATE_START,8,3               ## @CSTATE_START
	.comm	_JERR_BAD_STATE,4,2             ## @JERR_BAD_STATE
	.comm	_DCTSIZE2,4,2                   ## @DCTSIZE2
	.comm	_FALSE,4,2                      ## @FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_add_quant_table           ; -- Begin function jpeg_add_quant_table
	.p2align	2
_jpeg_add_quant_table:                  ; @jpeg_add_quant_table
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x22, x0
	sxtw	x23, w1
	ldp	x2, x24, [x0]
Lloh0:
	adrp	x8, _CSTATE_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSTATE_START@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, x22
	bl	_ERREXIT1
LBB0_2:
	ldr	x0, [x24, x23, lsl #3]
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x22
	bl	_jpeg_alloc_quant_table
	str	x0, [x24, x23, lsl #3]
LBB0_4:
Lloh6:
	adrp	x8, _DCTSIZE2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DCTSIZE2@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	sxtw	x9, w21
	ldr	x10, [x0, #8]
	mov	x11, #55051
	movk	x11, #28835, lsl #16
	movk	x11, #2621, lsl #32
	movk	x11, #41943, lsl #48
	mov	w12, #32767
	mov	w13, #255
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x20], #4
	mul	x14, x14, x9
	add	x14, x14, #50
	smulh	x15, x14, x11
	add	x14, x15, x14
	asr	x15, x14, #6
	add	x14, x15, x14, lsr #63
	cmp	x14, #1
	csinc	x14, x14, xzr, gt
	cmp	x14, x12
	csel	x14, x14, x12, lo
	cmp	x14, #255
	ccmp	x19, #0, #4, hi
	csel	x14, x13, x14, ne
	str	x14, [x10], #8
	subs	x8, x8, #1
	b.ne	LBB0_6
LBB0_7:
Lloh9:
	adrp	x8, _FALSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x0]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CSTATE_START,8,3               ; @CSTATE_START
	.comm	_JERR_BAD_STATE,4,2             ; @JERR_BAD_STATE
	.comm	_DCTSIZE2,4,2                   ; @DCTSIZE2
	.comm	_FALSE,4,2                      ; @FALSE
.subsections_via_symbols
