	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chroma_smooth_init_thread
_chroma_smooth_init_thread:             ## @chroma_smooth_init_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_chroma_smooth_thread_close
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, 8(%rbx)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, (%rbx)
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movslq	%r14d, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_hb_error
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_chroma_smooth_close
	testb	$1, -41(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	cmpq	$3, %rbx
	je	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %r14
	leaq	(%rbx,%rbx,2), %r15
	movl	4(%r14,%r15,4), %esi
	movl	8(%r14,%r15,4), %edi
	movl	%ebx, %edx
	callq	_hb_image_width
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r14,%r15,4), %r15
	movb	$1, %al
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=2
	incq	%r14
	cmpq	-88(%rbp), %r14                 ## 8-byte Folded Reload
	setl	%al
	cmpq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	je	LBB0_11
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	(%r15), %edi
	testl	%edi, %edi
	jle	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%r14,8), %r12
	addl	%edi, %edi
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	addl	-52(%rbp), %edi                 ## 4-byte Folded Reload
	shll	$2, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	(%r12,%rbx,8), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	(%r12,%rbx,8), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=3
	incq	%r13
	movslq	(%r15), %rdi
	addq	%rdi, %rdi
	cmpq	%rdi, %r13
	jl	LBB0_7
	jmp	LBB0_10
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_9:
	movl	$-1, %eax
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Chroma Smooth calloc failed"

	.no_dead_strip	_chroma_smooth_init_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chroma_smooth_init_thread
_chroma_smooth_init_thread:             ; @chroma_smooth_init_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x20, [x0]
	mov	x0, x20
	bl	_chroma_smooth_thread_close
	mov	x0, x21
	mov	w1, #4
	bl	_calloc
	str	x0, [x20, #8]
	str	w21, [x20]
	sxtw	x23, w21
	ldr	x8, [x20, #16]
	ldp	w1, w0, [x8, #4]
	mov	w2, #0
	bl	_hb_image_width
	ldr	x25, [x20, #16]
	ldp	w1, w0, [x25, #16]
	mov	w2, #1
	bl	_hb_image_width
	mov	w24, w21
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x22, x0
	mov	x27, #0
	mov	w26, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	cmp	x27, x23
	cset	w26, lt
	cmp	x27, x24
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w8, [x25, #12]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x28, #0
	ldr	x9, [x20, #8]
	ldr	x19, [x9, x27, lsl #3]
	lsl	w8, w8, #1
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w8, w8, w22
	lsl	w0, w8, #2
	bl	_malloc
	ldr	x8, [x19, #8]
	lsl	x9, x28, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x28, x28, #1
	ldrsw	x8, [x25, #12]
	lsl	x8, x8, #1
	cmp	x28, x8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_7:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_chroma_smooth_close
	tbnz	w26, #0, LBB0_16
LBB0_8:
	ldr	x25, [x20, #16]
	ldp	w1, w0, [x25, #28]
	mov	w2, #2
	bl	_hb_image_width
	cmp	w21, #1
	b.lt	LBB0_17
; %bb.9:
	mov	x22, x0
	mov	x26, #0
	mov	w21, #1
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x26, x26, #1
	cmp	x26, x23
	cset	w21, lt
	cmp	x26, x24
	b.eq	LBB0_17
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	w8, [x25, #24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x27, #0
	ldr	x9, [x20, #8]
	ldr	x19, [x9, x26, lsl #3]
	lsl	w8, w8, #1
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w8, w8, w22
	lsl	w0, w8, #2
	bl	_malloc
	ldr	x8, [x19, #16]
	lsl	x9, x27, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	add	x27, x27, #1
	ldrsw	x8, [x25, #24]
	lsl	x8, x8, #1
	cmp	x27, x8
	b.lt	LBB0_13
	b	LBB0_10
LBB0_15:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_chroma_smooth_close
	tbz	w21, #0, LBB0_17
LBB0_16:
	mov	w0, #-1
	b	LBB0_18
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Chroma Smooth calloc failed"

	.no_dead_strip	_chroma_smooth_init_thread
.subsections_via_symbols
