	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rjpeg_build_fast_ac
_rjpeg_build_fast_ac:                   ## @rjpeg_build_fast_ac
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_FAST_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	$31, %r8d
	jne	LBB0_1
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$1, %r14d
	movl	%r8d, %ecx
	shll	%cl, %r14d
	movl	$-1, %r9d
	shll	%cl, %r9d
	movl	$1, %eax
	movq	(%rsi), %r10
	notl	%r9d
	cmpl	$2, %r14d
	cmovll	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r10,%rbx,4), %rax
	movq	$0, (%rdi,%rbx,8)
	cmpq	$254, %rax
	jg	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rsi), %rcx
	movl	(%rcx,%rax,4), %r12d
	movl	%r12d, %edx
	andl	$15, %edx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rsi), %rcx
	movl	(%rcx,%rax,4), %ecx
	leal	(%rcx,%rdx), %r15d
	cmpl	%r8d, %r15d
	jg	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r13d
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %r13d
	andl	%r9d, %r13d
	movl	%r8d, %ecx
	subl	%edx, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r13d
	leal	-1(%rdx), %ecx
	movl	$1, %r11d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r11d
	movl	$-1, %eax
	movl	%edx, %ecx
	shll	%cl, %eax
	orl	$1, %eax
	cmpl	%r11d, %r13d
	movl	$0, %ecx
	cmovgel	%ecx, %eax
	addl	%r13d, %eax
	movsbl	%al, %ecx
	cmpl	%eax, %ecx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	andl	$240, %r12d
	shll	$8, %eax
	addl	%r12d, %r15d
	addl	%eax, %r15d
	movslq	%r15d, %rax
	movq	%rax, (%rdi,%rbx,8)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_FAST_BITS,4,2                  ## @FAST_BITS
	.no_dead_strip	_rjpeg_build_fast_ac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rjpeg_build_fast_ac
_rjpeg_build_fast_ac:                   ; @rjpeg_build_fast_ac
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _FAST_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FAST_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #31
	b.ne	LBB0_2
LBB0_1:
	ret
LBB0_2:
	mov	x9, #0
	mov	w10, #1
	lsl	w14, w10, w8
	ldr	x11, [x1]
	mov	w12, #-1
	lsl	w13, w12, w8
	mvn	w13, w13
	cmp	w14, #1
	csinc	w14, w14, wzr, gt
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	cmp	x14, x9
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x15, [x11, x9, lsl #2]
	str	xzr, [x0, x9, lsl #3]
	cmp	w15, #254
	b.gt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	x16, x15, #2
	ldp	x15, x2, [x1, #8]
	ldr	w15, [x15, x16]
	and	w17, w15, #0xf
	ldr	w2, [x2, x16]
	cmp	w17, #0
	add	w16, w2, w17
	ccmp	w16, w8, #0, ne
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	w2, w9, w2
	and	w2, w2, w13
	sub	w3, w8, w17
	asr	w2, w2, w3
	sub	w3, w17, #1
	lsl	w3, w10, w3
	lsl	w17, w12, w17
	orr	w17, w17, #0x1
	cmp	w2, w3
	csel	w17, w17, wzr, lt
	add	w17, w17, w2
	cmp	w17, w17, sxtb
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w15, w15, #0xf0
	add	w15, w16, w15
	add	w15, w15, w17, lsl #8
	sxtw	x15, w15
	str	x15, [x0, x9, lsl #3]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FAST_BITS,4,2                  ; @FAST_BITS
	.no_dead_strip	_rjpeg_build_fast_ac
.subsections_via_symbols
