	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_mask_to_strength_mask
_convert_mask_to_strength_mask:         ## @convert_mask_to_strength_mask
	.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	%r9, -80(%rbp)                  ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx def $rcx
                                        ## kill: def $edx killed $edx def $rdx
	testl	%ecx, %ecx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.23:
	movslq	%esi, %rbx
	movl	%ecx, %r9d
	movl	%edx, %esi
	movl	%esi, %r13d
	andl	$-8, %r13d
	leaq	-8(%r13), %r10
	movq	%r10, %r12
	shrq	$3, %r12
	incq	%r12
	movd	%r8d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movq	%r12, %r11
	andq	$-2, %r11
	leaq	48(%rdi), %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%rbx,4), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%r14
	addq	%r15, %rax
	addq	%r15, %rdi
	cmpq	%r9, %r14
	je	LBB0_36
LBB0_24:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_30 Depth 2
                                        ##     Child Loop BB0_34 Depth 2
	testl	%edx, %edx
	jle	LBB0_35
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	cmpl	$8, %edx
	jae	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_34
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_24 Depth=1
	testq	%r10, %r10
	je	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_24 Depth=1
	movq	%r11, %rbx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_24 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-48(%rax,%rcx,4), %xmm1
	movdqu	-32(%rax,%rcx,4), %xmm2
	movdqu	-16(%rax,%rcx,4), %xmm3
	movdqu	(%rax,%rcx,4), %xmm4
	pcmpgtd	%xmm0, %xmm1
	psrld	$31, %xmm1
	pcmpgtd	%xmm0, %xmm2
	psrld	$31, %xmm2
	movdqu	%xmm1, -48(%rax,%rcx,4)
	movdqu	%xmm2, -32(%rax,%rcx,4)
	pcmpgtd	%xmm0, %xmm3
	psrld	$31, %xmm3
	pcmpgtd	%xmm0, %xmm4
	psrld	$31, %xmm4
	movdqu	%xmm3, -16(%rax,%rcx,4)
	movdqu	%xmm4, (%rax,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rbx
	jne	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_24 Depth=1
	testb	$1, %r12b
	je	LBB0_33
LBB0_32:                                ##   in Loop: Header=BB0_24 Depth=1
	movq	%r14, %rbx
	imulq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	addq	%rbx, %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movdqu	(%rbx,%rcx,4), %xmm1
	movdqu	16(%rbx,%rcx,4), %xmm2
	pcmpgtd	%xmm0, %xmm1
	psrld	$31, %xmm1
	pcmpgtd	%xmm0, %xmm2
	psrld	$31, %xmm2
	movdqu	%xmm1, (%rbx,%rcx,4)
	movdqu	%xmm2, 16(%rbx,%rcx,4)
LBB0_33:                                ##   in Loop: Header=BB0_24 Depth=1
	movq	%r13, %rcx
	cmpq	%rsi, %r13
	je	LBB0_35
	.p2align	4, 0x90
LBB0_34:                                ##   Parent Loop BB0_24 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%ebx, %ebx
	cmpl	%r8d, (%rdi,%rcx,4)
	setg	%bl
	movl	%ebx, (%rdi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rsi
	jne	LBB0_34
	jmp	LBB0_35
LBB0_28:                                ##   in Loop: Header=BB0_24 Depth=1
	xorl	%ecx, %ecx
	testb	$1, %r12b
	jne	LBB0_32
	jmp	LBB0_33
LBB0_36:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_1:
	movslq	%esi, %rax
LBB0_2:
	leal	-1(%rcx), %r13d
	leal	-1(%rdx), %esi
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	leaq	(%rdi,%rax,4), %rsi
	addq	$8, %rsi
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	leaq	(,%rax,4), %r12
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rdi,%rax,8), %rax
	addq	$4, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leal	-2(%rdx), %r11d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%r9d, %r9d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	movl	%r14d, %ebx
	cmpl	$3, %ecx
	jl	LBB0_22
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rbx), %r14d
	movl	$1, %r15d
	xorl	%r9d, %r9d
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-104(%rbp), %r10                ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=2
	incl	%r15d
	addq	%r12, %r10
	addq	%r12, %rax
	addq	%r12, %rdi
	cmpl	%r13d, %r15d
	je	LBB0_15
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$3, %edx
	jl	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	xorl	%ecx, %ecx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=3
	incq	%rcx
	cmpl	%ecx, %r11d
	je	LBB0_14
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	-4(%r10,%rcx,4), %r8d
	cmpl	%ebx, %r8d
	jle	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=3
	cmpl	%ebx, (%r10,%rcx,4)
	jle	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=3
	cmpl	%ebx, -8(%r10,%rcx,4)
	jle	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=3
	cmpl	%ebx, (%rax,%rcx,4)
	jle	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=3
	cmpl	%ebx, 4(%rdi,%rcx,4)
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=3
	incl	%r8d
	movl	%r8d, -4(%r10,%rcx,4)
	movl	$1, %r9d
	jmp	LBB0_13
LBB0_16:
	cmpl	$3, %ecx
	jl	LBB0_22
## %bb.17:
	movl	%r13d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rdi,%rax,4), %r14
	movl	$1, %eax
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	addq	%r12, %r14
	cmpq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	je	LBB0_22
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$3, %edx
	jl	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14,%r15,4), %edi
	callq	_apply_mask_fudge_factor
	movl	%eax, (%r14,%r15,4)
	incq	%r15
	cmpq	%r15, %r13
	jne	LBB0_20
	jmp	LBB0_21
LBB0_22:
	addl	$2, %ebx
	movl	%ebx, %edi
	callq	_apply_mask_fudge_factor
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_convert_mask_to_strength_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_mask_to_strength_mask
_convert_mask_to_strength_mask:         ; @convert_mask_to_strength_mask
	.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	x19, x5
	mov	x20, x2
                                        ; kill: def $w1 killed $w1 def $x1
	cmp	w3, #0
	b.le	LBB0_11
; %bb.1:
	mov	x8, #0
	mov	x10, #0
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	sxtw	x9, w1
	mov	w11, w3
	mov	w12, w20
	and	x13, x12, #0xfffffff0
	dup.4s	v0, w4
	add	x14, x0, #32
	sbfiz	x15, x1, #2, #32
	movi.4s	v1, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	add	x14, x14, x15
	add	x8, x8, x9
	cmp	x10, x11
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w20, #16
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, #0
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x16, x13
	mov	x17, x14
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q2, q3, [x17, #-32]
	ldp	q4, q5, [x17]
	cmgt.4s	v2, v2, v0
	and.16b	v2, v2, v1
	cmgt.4s	v3, v3, v0
	and.16b	v3, v3, v1
	cmgt.4s	v4, v4, v0
	and.16b	v4, v4, v1
	cmgt.4s	v5, v5, v0
	and.16b	v5, v5, v1
	stp	q2, q3, [x17, #-32]
	stp	q4, q5, [x17], #64
	subs	x16, x16, #16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, x13
	cmp	x13, x12
	b.eq	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x16, x17, x8
	add	x16, x0, x16, lsl #2
	sub	x17, x12, x17
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x16]
	cmp	w1, w4
	cset	w1, gt
	str	w1, [x16], #4
	subs	x17, x17, #1
	b.ne	LBB0_10
	b	LBB0_2
LBB0_11:
	sxtw	x9, w1
LBB0_12:
	mov	w11, #0
	add	x10, x0, #4
	sub	w21, w3, #1
	sub	w8, w20, #1
	sub	w12, w20, #2
	lsl	x22, x9, #2
	lsl	x9, x9, #3
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	cbz	w13, LBB0_26
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
                                        ;       Child Loop BB0_20 Depth 3
	mov	x23, x11
	cmp	w3, #3
	b.lt	LBB0_32
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	w13, #0
	add	w11, w23, #1
	mov	w14, #1
	mov	x15, x10
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=2
	add	w14, w14, #1
	mov	x15, x16
	cmp	w14, w21
	b.eq	LBB0_13
LBB0_17:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_20 Depth 3
	add	x16, x15, x22
	cmp	w20, #3
	b.lt	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=2
	mov	x17, #0
	add	x1, x15, x9
	mov	x2, x16
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=3
	add	x2, x2, #4
	add	x17, x17, #1
	cmp	w12, w17
	b.eq	LBB0_16
LBB0_20:                                ;   Parent Loop BB0_14 Depth=1
                                        ;     Parent Loop BB0_17 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w4, [x2]
	cmp	w4, w23
	b.le	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=3
	ldr	w5, [x2, #4]
	cmp	w5, w23
	b.le	LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=3
	ldur	w5, [x2, #-4]
	cmp	w5, w23
	b.le	LBB0_19
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=3
	ldr	w5, [x1, x17, lsl #2]
	cmp	w5, w23
	b.le	LBB0_19
; %bb.24:                               ;   in Loop: Header=BB0_20 Depth=3
	ldr	w5, [x15, x17, lsl #2]
	cmp	w5, w23
	b.le	LBB0_19
; %bb.25:                               ;   in Loop: Header=BB0_20 Depth=3
	add	w13, w4, #1
	str	w13, [x2]
	mov	w13, #1
	b	LBB0_19
LBB0_26:
	cmp	w3, #3
	b.lt	LBB0_32
; %bb.27:
	add	x9, x22, x0
	add	x24, x9, #4
	sub	x25, x8, #1
	mov	w26, #1
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x26, x26, #1
	add	x24, x24, x22
	cmp	x26, x21
	b.eq	LBB0_32
LBB0_29:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_31 Depth 2
	cmp	w20, #3
	b.lt	LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x27, x25
	mov	x28, x24
LBB0_31:                                ;   Parent Loop BB0_29 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	bl	_apply_mask_fudge_factor
	str	w0, [x28], #4
	subs	x27, x27, #1
	b.ne	LBB0_31
	b	LBB0_28
LBB0_32:
	add	w0, w23, #2
	bl	_apply_mask_fudge_factor
	str	w0, [x19]
	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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_convert_mask_to_strength_mask
.subsections_via_symbols
