	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grayscale_filter_thread        ## -- Begin function grayscale_filter_thread
	.p2align	4, 0x90
_grayscale_filter_thread:               ## @grayscale_filter_thread
	.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	8(%rdi), %r14
	movl	(%rdi), %r15d
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movl	%r15d, %edx
	callq	_hb_deep_log
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_taskset_thread_wait4start
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_taskset_thread_stop
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_taskset_thread_complete        ## TAILCALL
LBB0_1:
	movslq	%r15d, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leal	1(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_hb_error
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_hb_snooze
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_taskset_thread_complete
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_taskset_thread_wait4start
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_taskset_thread_stop
	testq	%rax, %rax
	jne	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %r13
	testq	%r13, %r13
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rsi
	movl	16(%rsi), %ebx
	movl	20(%rsi), %ecx
	movl	(%r14), %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, %edx
	imull	%r15d, %edx
	decl	%edi
	imull	%r12d, %eax
	cmpl	%edi, %r15d
	cmovnel	%eax, %ecx
	subl	%edx, %ecx
	imull	%ebx, %edx
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	24(%rsi), %rdi
	imull	%ebx, %ecx
	movl	$128, %esi
	movl	%ecx, %edx
	callq	_memset
	movq	(%r13), %rsi
	movl	32(%rsi), %ebx
	movl	36(%rsi), %ecx
	movl	(%r14), %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	movl	%eax, %edx
	imull	%r15d, %edx
	decl	%edi
	imull	%r12d, %eax
	cmpl	%edi, %r15d
	cmovnel	%eax, %ecx
	subl	%edx, %ecx
	imull	%ebx, %edx
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	40(%rsi), %rdi
	imull	%ebx, %ecx
	movl	$128, %esi
	movl	%ecx, %edx
	callq	_memset
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Grayscale thread started for segment %d"

L_.str.1:                               ## @.str.1
	.asciz	"Thread started when no work available"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grayscale_filter_thread        ; -- Begin function grayscale_filter_thread
	.p2align	2
_grayscale_filter_thread:               ; @grayscale_filter_thread
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x0, #8]
	ldr	w21, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	mov	x2, x21
	bl	_hb_deep_log
	add	x19, x22, #4
	sxtw	x20, w21
	mov	x0, x19
	mov	x1, x21
	bl	_taskset_thread_wait4start
	mov	x0, x19
	mov	x1, x21
	bl	_taskset_thread_stop
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_taskset_thread_complete
LBB0_2:
	add	w23, w21, #1
Lloh2:
	adrp	x21, l_.str.1@PAGE
Lloh3:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_hb_error
	mov	w0, #500
	bl	_hb_snooze
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_taskset_thread_complete
	mov	x0, x19
	mov	x1, x20
	bl	_taskset_thread_wait4start
	mov	x0, x19
	mov	x1, x20
	bl	_taskset_thread_stop
	cbnz	x0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x24, [x8, x20, lsl #3]
	cbz	x24, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x24]
	ldp	w9, w10, [x8, #16]
	ldr	w11, [x22]
	sdiv	w12, w10, w11
	mul	w13, w12, w20
	sub	w11, w11, #1
	mul	w12, w12, w23
	cmp	w20, w11
	csel	w10, w10, w12, eq
	ldr	x8, [x8, #24]
	mul	w11, w13, w9
	add	x0, x8, w11, sxtw #2
	sub	w8, w10, w13
	mul	w2, w8, w9
	mov	w1, #128
	bl	_memset
	ldr	x8, [x24]
	ldp	w9, w10, [x8, #32]
	ldr	w11, [x22]
	sdiv	w12, w10, w11
	mul	w13, w12, w20
	sub	w11, w11, #1
	mul	w12, w12, w23
	cmp	w20, w11
	csel	w10, w10, w12, eq
	ldr	x8, [x8, #40]
	mul	w11, w13, w9
	add	x0, x8, w11, sxtw #2
	sub	w8, w10, w13
	mul	w2, w8, w9
	mov	w1, #128
	bl	_memset
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Grayscale thread started for segment %d"

l_.str.1:                               ; @.str.1
	.asciz	"Thread started when no work available"

.subsections_via_symbols
