	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generate_thumbs_matte_resize_rotate
_generate_thumbs_matte_resize_rotate:   ## @generate_thumbs_matte_resize_rotate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rdi, %r13
	movq	32(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movl	$0, (%rdx)
LBB0_2:
	movq	(%rsi), %rbx
	movl	(%rbx), %eax
	movl	%eax, (%r12)
	movl	4(%rbx), %eax
	movl	%eax, (%r15)
	testb	$1, %r14b
	je	LBB0_4
## %bb.3:
	movl	(%r12), %ecx
	movl	%eax, (%r12)
	movl	%ecx, (%r15)
	movl	%ecx, %eax
LBB0_4:
	movl	16(%rbp), %ecx
	cmpl	%r9d, (%r12)
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jg	LBB0_6
## %bb.5:
	cmpl	%ecx, %eax
	jle	LBB0_9
LBB0_6:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %eax
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.7:
	orb	$1, (%rdx)
LBB0_8:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r9d, %edx
	movl	$1, %r8d
	movl	%eax, %r9d
	callq	_gm_resize_image
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_DestroyImage
	movq	%r15, %rbx
	testq	%r15, %r15
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_21
LBB0_9:
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_vkprintf
	leal	3(%r14), %eax
	testl	%r14d, %r14d
	cmovnsl	%r14d, %eax
	andl	$-4, %eax
	movl	%r14d, %ecx
	subl	%eax, %ecx
	negl	%eax
	testl	%ecx, %ecx
	leal	4(%r14,%rax), %eax
	cmovnsl	%ecx, %eax
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movq	32(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	orb	$2, (%rcx)
LBB0_12:
	imull	$90, %eax, %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_gm_rotate_image
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_DestroyImage
	movq	%r14, %rbx
	testq	%r14, %r14
	je	LBB0_21
LBB0_13:
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	callq	_vkprintf
	cmpq	$0, 16(%rbx)
	jne	LBB0_15
## %bb.14:
	movq	8(%rbx), %rax
	movq	_RGBColorspace@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
LBB0_15:
	movq	32(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	orb	$4, (%rax)
LBB0_17:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_gm_replace_transparent_color_by_white
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_DestroyImage
	movq	%r14, %rbx
	testq	%r14, %r14
	je	LBB0_21
LBB0_18:
	movl	(%rbx), %eax
	movl	%eax, (%r12)
	movl	4(%rbx), %eax
	movl	%eax, (%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	_FORTH_PASS@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	_FORTH_FAIL@GOTPCREL(%rip), %rax
LBB0_22:
	movq	(%rax), %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FORTH_FAIL,8,3                 ## @FORTH_FAIL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%d] after gm_resize_image\n"

L_.str.1:                               ## @.str.1
	.asciz	"[%d] after gm_rotate_image\n"

	.comm	_RGBColorspace,8,3              ## @RGBColorspace
	.comm	_FORTH_PASS,8,3                 ## @FORTH_PASS
	.no_dead_strip	_generate_thumbs_matte_resize_rotate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generate_thumbs_matte_resize_rotate
_generate_thumbs_matte_resize_rotate:   ; @generate_thumbs_matte_resize_rotate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x24, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x26, [x29, #16]
	cbz	x26, LBB0_2
; %bb.1:
	str	wzr, [x26]
LBB0_2:
	ldr	x22, [x20]
	ldr	w8, [x22]
	str	w8, [x21]
	ldr	w8, [x22, #4]
	str	w8, [x19]
	tbz	w24, #0, LBB0_4
; %bb.3:
	ldr	w9, [x21]
	str	w8, [x21]
	str	w9, [x19]
	mov	x8, x9
LBB0_4:
	ldr	w9, [x21]
	cmp	w9, w5
	ccmp	w8, w6, #0, le
	b.le	LBB0_8
; %bb.5:
	cbz	x26, LBB0_7
; %bb.6:
	ldr	w8, [x26]
	orr	w8, w8, #0x1
	str	w8, [x26]
LBB0_7:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x5
	mov	x3, x6
	mov	w4, #1
	mov	x5, x7
	bl	_gm_resize_image
	mov	x25, x0
	mov	x0, x22
	bl	_DestroyImage
	mov	x22, x25
	cbz	x25, LBB0_18
LBB0_8:
	ldr	w2, [x23]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
	negs	w8, w24
	and	w8, w8, #0x3
	and	w9, w24, #0x3
	csneg	w8, w9, w8, mi
	add	w9, w8, #4
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cbz	w8, LBB0_12
; %bb.9:
	cbz	x26, LBB0_11
; %bb.10:
	ldr	w9, [x26]
	orr	w9, w9, #0x2
	str	w9, [x26]
LBB0_11:
	mov	w9, #90
	mul	w2, w8, w9
	mov	x0, x23
	mov	x1, x22
	bl	_gm_rotate_image
	mov	x24, x0
	mov	x0, x22
	bl	_DestroyImage
	mov	x22, x24
	cbz	x24, LBB0_18
LBB0_12:
	ldr	w2, [x23]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_vkprintf
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_14
; %bb.13:
	ldr	x8, [x22, #8]
Lloh4:
	adrp	x9, _RGBColorspace@GOTPAGE
Lloh5:
	ldr	x9, [x9, _RGBColorspace@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
LBB0_14:
	cbz	x26, LBB0_16
; %bb.15:
	ldr	w8, [x26]
	orr	w8, w8, #0x4
	str	w8, [x26]
LBB0_16:
	mov	x0, x23
	mov	x1, x22
	bl	_gm_replace_transparent_color_by_white
	mov	x23, x0
	mov	x0, x22
	bl	_DestroyImage
	mov	x22, x23
	cbz	x23, LBB0_18
LBB0_17:
	ldr	w8, [x22]
	str	w8, [x21]
	ldr	w8, [x22, #4]
	str	w8, [x19]
	str	x22, [x20]
Lloh7:
	adrp	x8, _FORTH_PASS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FORTH_PASS@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh9:
	adrp	x8, _FORTH_FAIL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FORTH_FAIL@GOTPAGEOFF]
LBB0_19:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FORTH_FAIL,8,3                 ; @FORTH_FAIL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%d] after gm_resize_image\n"

l_.str.1:                               ; @.str.1
	.asciz	"[%d] after gm_rotate_image\n"

	.comm	_RGBColorspace,8,3              ; @RGBColorspace
	.comm	_FORTH_PASS,8,3                 ; @FORTH_PASS
	.no_dead_strip	_generate_thumbs_matte_resize_rotate
.subsections_via_symbols
