	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coda_set_jpeg_compression_quality ## -- Begin function coda_set_jpeg_compression_quality
	.p2align	4, 0x90
_coda_set_jpeg_compression_quality:     ## @coda_set_jpeg_compression_quality
	.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
	movl	%esi, (%rdi)
	cmpl	$100, %esi
	movl	$100, %eax
	cmovll	%esi, %eax
	cmpl	$6, %eax
	movl	$5, %ecx
	cmovgel	%eax, %ecx
	cmpl	$49, %ecx
	ja	LBB0_2
## %bb.1:
	movw	$5000, %ax                      ## imm = 0x1388
	xorl	%edx, %edx
	divw	%cx
	movzwl	%ax, %r14d
	jmp	LBB0_3
LBB0_2:
	addl	%ecx, %ecx
	movl	$200, %r14d
	subl	%ecx, %r14d
LBB0_3:
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	movq	_luma_q@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	movl	%r14d, %esi
	callq	_coda_scale_quant_table
	movq	8(%rbx), %rax
LBB0_5:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.7:
	movq	_chroma_q@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movq	8(%rax), %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_coda_scale_quant_table         ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_luma_q,4,2                     ## @luma_q
	.comm	_chroma_q,4,2                   ## @chroma_q
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coda_set_jpeg_compression_quality ; -- Begin function coda_set_jpeg_compression_quality
	.p2align	2
_coda_set_jpeg_compression_quality:     ; @coda_set_jpeg_compression_quality
	.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
	str	w1, [x0]
	mov	w8, #100
	cmp	w1, #100
	csel	w8, w1, w8, lt
	mov	w9, #5
	cmp	w8, #5
	csel	w8, w8, w9, gt
	mov	w9, #200
	sub	w9, w9, w8, lsl #1
	and	w10, w8, #0xffff
	mov	w11, #5000
	udiv	w10, w11, w10
	cmp	w8, #49
	csel	w20, w9, w10, hi
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _luma_q@GOTPAGE
Lloh1:
	ldr	x8, [x8, _luma_q@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #64
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	mov	x1, x20
	bl	_coda_scale_quant_table
	ldr	x8, [x19, #8]
LBB0_2:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _chroma_q@GOTPAGE
Lloh4:
	ldr	x8, [x8, _chroma_q@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #64
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_coda_scale_quant_table
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_luma_q,4,2                     ; @luma_q
	.comm	_chroma_q,4,2                   ; @chroma_q
.subsections_via_symbols
