	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_LoadJPG                      ## -- Begin function R_LoadJPG
	.p2align	4, 0x90
_R_LoadJPG:                             ## @R_LoadJPG
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	$0, -80(%rbp)
	movq	_ri@GOTPCREL(%rip), %r13
	leaq	-64(%rbp), %rsi
	callq	*(%r13)
	cmpq	$0, -64(%rbp)
	je	LBB0_17
## %bb.1:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.2:
	leaq	-132(%rbp), %rdi
	callq	_jpeg_std_error
	movq	%rax, -88(%rbp)
	movq	_R_JPGErrorExit@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_R_JPGOutputMessage@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movl	-136(%rbp), %edi
	callq	_setjmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	-112(%rbp), %rdi
	callq	_jpeg_destroy_decompress
	movq	-64(%rbp), %rdi
	callq	*16(%r13)
	movq	_PRINT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	*32(%r13)
	jmp	LBB0_17
LBB0_4:
	leaq	-112(%rbp), %r13
	movq	%r13, %rdi
	callq	_jpeg_create_decompress
	movq	-64(%rbp), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_jpeg_mem_src
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_jpeg_read_header
	movq	_JCS_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%r13, %rdi
	callq	_jpeg_start_decompress
	movl	-112(%rbp), %ecx
	movl	-108(%rbp), %esi
	movl	%esi, %eax
	imull	%ecx, %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
                                        ## kill: def $eax killed $eax def $rax
	leal	(,%rax,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.5:
	testl	%esi, %esi
	je	LBB0_9
## %bb.6:
	xorl	%edx, %edx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	divl	%ecx
	shrl	$2, %eax
	cmpl	%esi, %eax
	jne	LBB0_9
## %bb.7:
	cmpl	$536870911, -68(%rbp)           ## 4-byte Folded Reload
                                        ## imm = 0x1FFFFFFF
	ja	LBB0_9
## %bb.8:
	movl	$3, %r13d
	cmpl	$3, -104(%rbp)
	je	LBB0_10
LBB0_9:
	movq	-64(%rbp), %rdi
	movq	_ri@GOTPCREL(%rip), %rbx
	callq	*16(%rbx)
	leaq	-112(%rbp), %rdi
	callq	_jpeg_destroy_decompress
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-112(%rbp), %ecx
	movl	-108(%rbp), %r8d
	movl	-104(%rbp), %eax
	movq	%rsp, %rdx
	movl	%eax, (%rdx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	*24(%rbx)
	movl	-112(%rbp), %ecx
	movl	-104(%rbp), %r13d
LBB0_10:
	movl	%ecx, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	_ri@GOTPCREL(%rip), %rax
	callq	*8(%rax)
	movq	%rax, %rbx
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movl	-112(%rbp), %eax
	movl	%eax, (%r12)
	movl	-108(%rbp), %ecx
	movl	%ecx, (%r15)
	movl	-100(%rbp), %eax
	cmpl	%ecx, %eax
	jae	LBB0_13
## %bb.11:
	imull	%r14d, %r13d
	leaq	-112(%rbp), %r14
	leaq	-56(%rbp), %r15
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	imull	%r13d, %eax
                                        ## kill: def $rax killed $eax
	addq	%rbx, %rax
	movq	%rax, -56(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_jpeg_read_scanlines
	movl	-100(%rbp), %ecx
	movl	%ecx, %eax
	cmpl	-108(%rbp), %ecx
	jb	LBB0_12
LBB0_13:
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%rdi, -56(%rbp)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	imull	-104(%rbp), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	$-4, %ecx
	addl	$-3, %eax
	movq	%rdi, %rdx
	movq	_ri@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %esi
	addl	$3, %esi
                                        ## kill: def $rsi killed $esi
	movb	$-1, (%rdx,%rsi)
	movq	-56(%rbp), %rdx
	movl	%eax, %esi
	leal	2(%rsi), %esi
                                        ## kill: def $rsi killed $esi
	movzbl	(%rdx,%rsi), %ebx
	movl	%ecx, %esi
	leal	2(%rsi), %esi
                                        ## kill: def $rsi killed $esi
	movb	%bl, (%rdx,%rsi)
	movq	-56(%rbp), %rdx
	movl	%eax, %esi
	leal	1(%rsi), %esi
                                        ## kill: def $rsi killed $esi
	movzbl	(%rdx,%rsi), %ebx
	movl	%ecx, %esi
	leal	1(%rsi), %esi
                                        ## kill: def $rsi killed $esi
	movb	%bl, (%rdx,%rsi)
	movq	-56(%rbp), %rdx
	movl	%eax, %esi
                                        ## kill: def $rsi killed $esi
	movzbl	(%rdx,%rsi), %ebx
	movl	%ecx, %esi
                                        ## kill: def $rsi killed $esi
	movb	%bl, (%rdx,%rsi)
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-56(%rbp), %rdx
	addl	$-4, %ecx
	addl	$-3, %eax
	jmp	LBB0_14
LBB0_16:
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	%rdi, (%rax)
	leaq	-112(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_jpeg_finish_decompress
	movq	%rbx, %rdi
	callq	_jpeg_destroy_decompress
	movq	-64(%rbp), %rdi
	callq	*16(%r14)
LBB0_17:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,40,3                        ## @ri
	.comm	_R_JPGErrorExit,4,2             ## @R_JPGErrorExit
	.comm	_R_JPGOutputMessage,4,2         ## @R_JPGOutputMessage
	.comm	_PRINT_ALL,4,2                  ## @PRINT_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	", loading file %s\n"

	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_JCS_RGB,4,2                    ## @JCS_RGB
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
L_.str.1:                               ## @.str.1
	.asciz	"LoadJPG: %s has an invalid image format: %dx%d*4=%d, components: %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_R_LoadJPG                      ; -- Begin function R_LoadJPG
	.p2align	2
_R_LoadJPG:                             ; @R_LoadJPG
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	str	xzr, [sp, #64]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
Lloh0:
	adrp	x25, _ri@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ri@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x1, sp, #16
	blr	x8
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_16
; %bb.1:
	tbnz	w0, #31, LBB0_16
; %bb.2:
	mov	x23, x0
	add	x8, sp, #24
	orr	x0, x8, #0x4
	bl	_jpeg_std_error
	str	x0, [sp, #56]
Lloh2:
	adrp	x8, _R_JPGErrorExit@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R_JPGErrorExit@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _R_JPGOutputMessage@GOTPAGE
Lloh6:
	ldr	x9, [x9, _R_JPGOutputMessage@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x0]
	ldr	w0, [sp, #24]
	bl	_setjmp
	cbz	x0, LBB0_4
; %bb.3:
	add	x0, sp, #32
	bl	_jpeg_destroy_decompress
	ldr	x8, [x25, #16]
	ldr	x0, [sp, #16]
	blr	x8
	ldr	x8, [x25, #32]
Lloh8:
	adrp	x9, _PRINT_ALL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PRINT_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x9]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	blr	x8
	b	LBB0_16
LBB0_4:
	add	x24, sp, #32
	mov	x0, x24
	bl	_jpeg_create_decompress
	ldr	x1, [sp, #16]
	mov	x0, x24
	mov	x2, x23
	bl	_jpeg_mem_src
Lloh13:
	adrp	x8, _TRUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_jpeg_read_header
Lloh16:
	adrp	x8, _JCS_RGB@GOTPAGE
Lloh17:
	ldr	x8, [x8, _JCS_RGB@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [sp, #48]
	mov	x0, x24
	bl	_jpeg_start_decompress
	ldp	w8, w9, [sp, #32]
	mul	w24, w9, w8
	lsl	w26, w24, #2
	mov	x23, x26
	str	x19, [sp]                       ; 8-byte Folded Spill
	cbz	w8, LBB0_7
; %bb.5:
	mov	x10, x9
	cbz	w9, LBB0_7
; %bb.6:
	udiv	w10, w26, w8
	ldr	w11, [sp, #40]
	cmp	w9, w10, lsr #2
	lsr	w9, w24, #29
	ccmp	w9, #0, #0, eq
	ccmp	w11, #3, #0, eq
	b.eq	LBB0_8
LBB0_7:
	ldr	x8, [x25, #16]
	ldr	x0, [sp, #16]
	blr	x8
	add	x0, sp, #32
	bl	_jpeg_destroy_decompress
	ldr	x8, [x25, #24]
Lloh19:
	adrp	x9, _ERR_DROP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ERR_DROP@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x9]
	ldp	w3, w4, [sp, #32]
	ldr	w6, [sp, #40]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	mov	x5, x23
	blr	x8
	ldr	w28, [sp, #32]
	ldr	w19, [sp, #40]
	b	LBB0_9
LBB0_8:
	mov	w19, #3
	mov	x28, x8
LBB0_9:
	ldr	x8, [x25, #8]
	mov	x0, x23
	blr	x8
	mov	x27, x0
	ldp	w8, w9, [sp, #32]
	str	w8, [x21]
	str	w9, [x20]
	ldr	w8, [sp, #44]
	cmp	w8, w9
	b.hs	LBB0_12
; %bb.10:
	mov	x22, x0
	mul	w28, w19, w28
	add	x20, sp, #32
	add	x21, sp, #8
	mov	w23, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mul	w8, w28, w8
                                        ; kill: def $x8 killed $w8
	add	x8, x22, x8
	str	x8, [sp, #8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_jpeg_read_scanlines
	ldr	w9, [sp, #44]
	ldr	w10, [sp, #36]
	mov	x8, x9
	cmp	w9, w10
	b.lo	LBB0_11
LBB0_12:
	str	x27, [sp, #8]
	ldr	w8, [sp, #40]
	mul	w8, w8, w24
	sub	w10, w26, #4
	sub	w9, w8, #3
	mov	w8, #255
	mov	x11, x27
	ldr	x14, [sp]                       ; 8-byte Folded Reload
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	w12, w10, #3
	strb	w8, [x11, w12, uxtw]
	ldr	x11, [sp, #8]
	add	w12, w9, #2
	ldrb	w12, [x11, w12, uxtw]
	add	w13, w10, #2
	strb	w12, [x11, w13, uxtw]
	ldr	x11, [sp, #8]
	add	w12, w9, #1
	ldrb	w12, [x11, w12, uxtw]
	add	w13, w10, #1
	strb	w12, [x11, w13, uxtw]
	ldr	x11, [sp, #8]
	ldrb	w12, [x11, w9, uxtw]
	strb	w12, [x11, w10, uxtw]
	cbz	w9, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x11, [sp, #8]
	sub	w10, w10, #4
	sub	w9, w9, #3
	b	LBB0_13
LBB0_15:
	str	x27, [x14]
	add	x19, sp, #32
	mov	x0, x19
	bl	_jpeg_finish_decompress
	mov	x0, x19
	bl	_jpeg_destroy_decompress
	ldr	x8, [x25, #16]
	ldr	x0, [sp, #16]
	blr	x8
LBB0_16:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,40,3                        ; @ri
	.comm	_R_JPGErrorExit,4,2             ; @R_JPGErrorExit
	.comm	_R_JPGOutputMessage,4,2         ; @R_JPGOutputMessage
	.comm	_PRINT_ALL,4,2                  ; @PRINT_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	", loading file %s\n"

	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_JCS_RGB,4,2                    ; @JCS_RGB
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
l_.str.1:                               ; @.str.1
	.asciz	"LoadJPG: %s has an invalid image format: %dx%d*4=%d, components: %d"

.subsections_via_symbols
