	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function generate_half_size_image
_generate_half_size_image:              ## @generate_half_size_image
	.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
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%r9d, %eax
	shrl	$31, %eax
	addl	%r9d, %eax
	sarl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %eax
	shrl	$31, %eax
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	addl	%r8d, %eax
	sarl	%eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$2, %r9d
	jl	LBB0_10
## %bb.1:
	movq	%rdi, %r14
	movslq	%esi, %rax
	movslq	-52(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	shlq	$2, %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rdi,%rax,4), %r15
	addq	$4, %r15
	shlq	$3, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	addq	$4, %r14
	xorl	%ecx, %ecx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	incq	%rcx
	addq	-88(%rbp), %r12                 ## 8-byte Folded Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %r15
	addq	%rax, %r14
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	je	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	cmpl	$2, -56(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	movzbl	%al, %esi
	movl	%esi, (%r12,%r13,4)
	movl	$1, %edi
	callq	_FFMIN
	movl	%eax, (%r12,%r13,4)
	incq	%r13
	cmpq	%r13, %rbx
	je	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	$1, %al
	cmpl	$0, -4(%r14,%r13,8)
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$0, (%r14,%r13,8)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$0, -4(%r15,%r13,8)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$0, (%r15,%r13,8)
	setne	%al
	jmp	LBB0_8
LBB0_10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_convert_mask_to_strength_mask  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_generate_half_size_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function generate_half_size_image
_generate_half_size_image:              ; @generate_half_size_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	stp	x6, x2, [sp, #8]                ; 16-byte Folded Spill
                                        ; kill: def $w1 killed $w1 def $x1
	cmp	w5, #0
	cinc	w8, w5, lt
	asr	w8, w8, #1
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	cmp	w4, #0
	cinc	w8, w4, lt
	asr	w8, w8, #1
	stp	x3, x8, [sp, #24]               ; 16-byte Folded Spill
	cmp	w5, #2
	b.lt	LBB0_11
; %bb.1:
	mov	x22, x4
	mov	x19, x0
	mov	x26, #0
	ldp	x23, x8, [sp, #16]              ; 16-byte Folded Reload
	sbfiz	x27, x8, #2, #32
	sbfiz	x28, x1, #2, #32
	sbfiz	x20, x1, #3, #32
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	add	x23, x23, x27
	add	x19, x19, x20
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cmp	x26, x8
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w22, #2
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x19
	ldr	x25, [sp, #32]                  ; 8-byte Folded Reload
	mov	x21, x23
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x24]
	cbnz	w8, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x24, #4]
	cbnz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x24, x28]
	cbz	w8, LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	w1, #1
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	w1, [x21]
	mov	w0, #1
	bl	_FFMIN
	str	w0, [x21], #4
	add	x24, x24, #8
	subs	x25, x25, #1
	b.ne	LBB0_5
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x8, x24, x28
	ldr	w8, [x8, #4]
	cmp	w8, #0
	cset	w1, ne
	b	LBB0_9
LBB0_11:
	ldp	x0, x1, [sp, #16]               ; 16-byte Folded Reload
                                        ; kill: def $w1 killed $w1 killed $x1
	ldp	x2, x3, [sp, #32]               ; 16-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #0
	ldr	x5, [sp, #8]                    ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_convert_mask_to_strength_mask
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_generate_half_size_image
.subsections_via_symbols
