	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SaveJPG                        ## -- Begin function SaveJPG
	.p2align	4, 0x90
_SaveJPG:                               ## @SaveJPG
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movl	%esi, -84(%rbp)                 ## 4-byte Spill
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-112(%rbp), %rdi
	callq	_jpeg_std_error
	movl	%eax, -60(%rbp)
	leaq	-80(%rbp), %rdi
	callq	_jpeg_create_compress
	movq	_ri@GOTPCREL(%rip), %rax
	leal	(,%r12,4), %ebx
	movl	%ebx, %r13d
	imull	%r14d, %r13d
	movl	%r13d, %edi
	callq	*(%rax)
	leaq	-80(%rbp), %rdi
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movl	%r13d, %edx
	callq	_jpegDest
	movl	%r12d, -80(%rbp)
	movl	%r14d, -76(%rbp)
	movl	$4, -72(%rbp)
	movq	_JCS_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	callq	_jpeg_set_defaults
	movq	_TRUE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%r12, %rdi
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_jpeg_set_quality
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_jpeg_start_compress
	movl	-76(%rbp), %ecx
	movl	-68(%rbp), %eax
	cmpl	%ecx, %eax
	jge	LBB0_3
## %bb.1:
	leaq	-80(%rbp), %r14
	leaq	-56(%rbp), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	notl	%eax
	addl	%ecx, %eax
	imull	%ebx, %eax
	cltq
	addq	%r15, %rax
	movq	%rax, -56(%rbp)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_jpeg_write_scanlines
	movl	-76(%rbp), %ecx
	movl	-68(%rbp), %eax
	cmpl	%ecx, %eax
	jl	LBB0_2
LBB0_3:
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	callq	_jpeg_finish_compress
	movq	_hackSize@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	_ri@GOTPCREL(%rip), %r15
	callq	*16(%r15)
	movq	%rbx, %rdi
	callq	*8(%r15)
	movq	%r14, %rdi
	callq	_jpeg_destroy_compress
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,24,3                        ## @ri
	.comm	_JCS_RGB,4,2                    ## @JCS_RGB
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_hackSize,4,2                   ## @hackSize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SaveJPG                        ; -- Begin function SaveJPG
	.p2align	2
_SaveJPG:                               ; @SaveJPG
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, sp
	bl	_jpeg_std_error
	str	w0, [sp, #28]
	add	x0, sp, #8
	bl	_jpeg_create_compress
Lloh3:
	adrp	x26, _ri@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ri@GOTPAGEOFF]
	ldr	x8, [x26]
	lsl	w27, w23, #2
	mul	w25, w27, w22
	mov	x0, x25
	blr	x8
	mov	x21, x0
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x25
	bl	_jpegDest
	stp	w23, w22, [sp, #8]
	mov	w8, #4
Lloh5:
	adrp	x9, _JCS_RGB@GOTPAGE
Lloh6:
	ldr	x9, [x9, _JCS_RGB@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w8, [sp, #16]
	str	w9, [sp, #24]
	add	x0, sp, #8
	bl	_jpeg_set_defaults
Lloh8:
	adrp	x22, _TRUE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _TRUE@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x0, sp, #8
	mov	x1, x24
	bl	_jpeg_set_quality
	ldr	w1, [x22]
	add	x0, sp, #8
	bl	_jpeg_start_compress
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #20]
	ldr	w9, [sp, #12]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mvn	w8, w8
	add	w8, w9, w8
	mul	w8, w27, w8
	add	x8, x20, w8, sxtw
	str	x8, [sp, #32]
	add	x0, sp, #8
	add	x1, sp, #32
	mov	w2, #1
	bl	_jpeg_write_scanlines
	b	LBB0_1
LBB0_3:
	add	x0, sp, #8
	bl	_jpeg_finish_compress
	ldr	x8, [x26, #16]
Lloh10:
	adrp	x9, _hackSize@GOTPAGE
Lloh11:
	ldr	x9, [x9, _hackSize@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x9]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	ldr	x8, [x26, #8]
	mov	x0, x21
	blr	x8
	add	x0, sp, #8
	bl	_jpeg_destroy_compress
	ldr	x8, [sp, #40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,24,3                        ; @ri
	.comm	_JCS_RGB,4,2                    ; @JCS_RGB
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_hackSize,4,2                   ; @hackSize
.subsections_via_symbols
