	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_apply_crop                 ## -- Begin function ghb_apply_crop
	.p2align	4, 0x90
_ghb_apply_crop:                        ## @ghb_apply_crop
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	callq	_ghb_dict_get_bool
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_ghb_dict_get_bool
	movq	%rax, %r12
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	(%r13), %rax
	movl	(%rax), %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rax), %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rax), %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	12(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_ghb_dict_get_int
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_ghb_dict_get_int
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_ghb_dict_get_int
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_ghb_dict_get_int
	movl	%eax, %r14d
LBB0_3:
	testq	%r12, %r12
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	callq	_ghb_settings_combo_int
	testl	%eax, %eax
	movl	$16, %r15d
	cmovgl	%eax, %r15d
	movq	%r14, %rax
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	addl	%r14d, %eax
	movl	8(%r13), %r12d
	subl	%eax, %r12d
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %r13d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%ebx, %eax
	subl	%eax, %r13d
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_MOD_DOWN
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	movl	%r15d, %esi
	movq	%rbx, %r15
	callq	_MOD_DOWN
	subl	%eax, %r13d
	movl	%r13d, %edi
	shrl	$31, %edi
	addl	%r13d, %edi
	sarl	%edi
	callq	_EVEN
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	subl	%eax, %r15d
	addl	%r13d, %r15d
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	subl	-68(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r12d, %edi
	shrl	$31, %edi
	addl	%r12d, %edi
	sarl	%edi
	callq	_EVEN
	addl	%eax, %r14d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addl	-96(%rbp), %r12d                ## 4-byte Folded Reload
	subl	%eax, %r12d
	movl	%r12d, %r14d
	jmp	LBB0_6
LBB0_4:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_6:
	movl	12(%r13), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%r15d, %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	cmpl	$15, %edx
	jg	LBB0_8
## %bb.7:
	movl	%eax, %ecx
	subl	%r15d, %ecx
	leal	-16(%rcx), %edx
	addl	$-16, %eax
	xorl	%esi, %esi
	cmpl	$16, %ecx
	cmovgel	%r15d, %eax
	cmovgel	%edx, %esi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, %r15d
LBB0_8:
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movl	8(%r13), %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, %edx
	subl	%ebx, %edx
	subl	%r14d, %edx
	cmpl	$15, %edx
	jg	LBB0_10
## %bb.9:
	movl	%eax, %ecx
	subl	%r14d, %ecx
	leal	-16(%rcx), %edx
	addl	$-16, %eax
	xorl	%ebx, %ebx
	cmpl	$16, %ecx
	cmovgel	%r14d, %eax
	cmovgel	%edx, %ebx
	movl	%eax, %r14d
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ghb_dict_set_int
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_ghb_dict_set_int
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ghb_dict_set_int
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ghb_dict_set_int               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PictureAutoCrop"

L_.str.1:                               ## @.str.1
	.asciz	"PictureLooseCrop"

L_.str.2:                               ## @.str.2
	.asciz	"PictureTopCrop"

L_.str.3:                               ## @.str.3
	.asciz	"PictureBottomCrop"

L_.str.4:                               ## @.str.4
	.asciz	"PictureLeftCrop"

L_.str.5:                               ## @.str.5
	.asciz	"PictureRightCrop"

L_.str.6:                               ## @.str.6
	.asciz	"PictureModulus"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ghb_apply_crop                 ; -- Begin function ghb_apply_crop
	.p2align	2
_ghb_apply_crop:                        ; @ghb_apply_crop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ghb_dict_get_bool
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ghb_dict_get_bool
	mov	x25, x0
	cbz	x21, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	ldp	w21, w22, [x8]
	ldp	w23, w24, [x8, #8]
	cbz	x25, LBB0_3
LBB0_2:
Lloh4:
	adrp	x1, l_.str.6@PAGE
Lloh5:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_ghb_settings_combo_int
	mov	w8, #16
	cmp	w0, #1
	csel	w25, w8, w0, lt
	ldp	w8, w9, [x20, #8]
	add	w10, w23, w24
	sub	w26, w8, w10
	add	w8, w21, w22
	sub	w27, w9, w8
	mov	x0, x26
	mov	x1, x25
	bl	_MOD_DOWN
	mov	x28, x0
	mov	x0, x27
	mov	x1, x25
	bl	_MOD_DOWN
	sub	w25, w27, w0
	cmp	w25, #0
	cinc	w8, w25, lt
	asr	w0, w8, #1
	bl	_EVEN
	add	w21, w0, w21
	sub	w8, w22, w0
	add	w22, w8, w25
	sub	w25, w26, w28
	cmp	w25, #0
	cinc	w8, w25, lt
	asr	w0, w8, #1
	bl	_EVEN
	add	w23, w0, w23
	add	w8, w25, w24
	sub	w24, w8, w0
LBB0_3:
	ldp	w9, w8, [x20, #8]
	add	w10, w21, w22
	sub	w10, w8, w10
	sub	w11, w8, w22
	sub	w8, w8, #16
	subs	w11, w11, #16
	csel	w8, w8, w22, lt
	csel	w11, wzr, w11, lt
	cmp	w10, #15
	csel	w20, w22, w8, gt
	csel	w2, w21, w11, gt
	add	w8, w23, w24
	sub	w8, w9, w8
	sub	w10, w9, w24
	sub	w9, w9, #16
	subs	w10, w10, #16
	csel	w9, w9, w24, lt
	csel	w10, wzr, w10, lt
	cmp	w8, #15
	csel	w21, w24, w9, gt
	csel	w22, w23, w10, gt
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ghb_dict_set_int
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_ghb_dict_set_int
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_ghb_dict_set_int
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ghb_dict_set_int
LBB0_4:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ghb_dict_get_int
	mov	x21, x0
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ghb_dict_get_int
	mov	x22, x0
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_ghb_dict_get_int
	mov	x23, x0
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_ghb_dict_get_int
	mov	x24, x0
	cbnz	x25, LBB0_2
	b	LBB0_3
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PictureAutoCrop"

l_.str.1:                               ; @.str.1
	.asciz	"PictureLooseCrop"

l_.str.2:                               ; @.str.2
	.asciz	"PictureTopCrop"

l_.str.3:                               ; @.str.3
	.asciz	"PictureBottomCrop"

l_.str.4:                               ; @.str.4
	.asciz	"PictureLeftCrop"

l_.str.5:                               ; @.str.5
	.asciz	"PictureRightCrop"

l_.str.6:                               ; @.str.6
	.asciz	"PictureModulus"

.subsections_via_symbols
