	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_denoise_work
_hb_denoise_work:                       ## @hb_denoise_work
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	(%rsi), %r12
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	%r12, (%r14)
	movq	$0, (%rsi)
	movq	_HB_FILTER_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	(%rdi), %rbx
	movl	40(%rbx), %edi
	movl	32(%r12), %edx
	movl	36(%r12), %esi
	callq	_hb_frame_buffer_init
	movq	%rax, %r15
	movups	24(%rbx), %xmm0
	movups	%xmm0, 16(%rax)
	movq	16(%rbx), %rdx
	testq	%rdx, %rdx
	jne	LBB0_4
## %bb.3:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	addl	%edi, %edi
	callq	_malloc
	movq	%rax, %rdx
	movq	%rax, 16(%rbx)
LBB0_4:
	movq	8(%r12), %rax
	movl	8(%rax), %edi
	movq	8(%r15), %rcx
	movl	8(%rcx), %esi
	movq	(%rbx), %r10
	movq	8(%rbx), %rcx
	movl	(%rax), %r8d
	movl	4(%rax), %r9d
	movl	(%r10), %r11d
	movl	4(%r10), %eax
	pushq	%rax
	pushq	%r11
	callq	_hqdn3d_denoise
	addq	$16, %rsp
	movq	8(%r12), %rax
	movl	20(%rax), %edi
	movq	8(%r15), %rcx
	movl	20(%rcx), %esi
	movq	16(%rbx), %rdx
	movq	(%rbx), %r10
	movq	8(%rbx), %rcx
	addq	$4, %rcx
	movl	12(%rax), %r8d
	movl	16(%rax), %r9d
	movl	8(%r10), %r11d
	movl	12(%r10), %eax
	pushq	%rax
	pushq	%r11
	callq	_hqdn3d_denoise
	addq	$16, %rsp
	movq	8(%r12), %rax
	movl	32(%rax), %edi
	movq	8(%r15), %rcx
	movl	32(%rcx), %esi
	movq	16(%rbx), %rdx
	movq	(%rbx), %r10
	movq	8(%rbx), %rcx
	addq	$8, %rcx
	movl	24(%rax), %r8d
	movl	28(%rax), %r9d
	movl	16(%r10), %eax
	movl	20(%r10), %ebx
	pushq	%rbx
	pushq	%rax
	callq	_hqdn3d_denoise
	addq	$16, %rsp
	movl	(%r12), %eax
	movl	%eax, (%r15)
	movq	%r15, (%r14)
	movq	_HB_FILTER_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_HB_FILTER_DONE,4,2             ## @HB_FILTER_DONE
	.comm	_HB_FILTER_OK,4,2               ## @HB_FILTER_OK
	.no_dead_strip	_hb_denoise_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_denoise_work
_hb_denoise_work:                       ; @hb_denoise_work
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	ldr	x21, [x1]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	str	x21, [x19]
	str	xzr, [x1]
Lloh3:
	adrp	x8, _HB_FILTER_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HB_FILTER_DONE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x22, [x0]
	ldr	w0, [x22, #40]
	ldp	w2, w1, [x21, #32]
	bl	_hb_frame_buffer_init
	mov	x20, x0
	ldur	q0, [x22, #24]
	str	q0, [x0, #16]
	ldr	x2, [x22, #16]
	cbnz	x2, LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	lsl	w0, w8, #1
	bl	_malloc
	mov	x2, x0
	str	x0, [x22, #16]
LBB0_4:
	ldr	x8, [x21, #8]
	ldp	w5, w0, [x8, #4]
	ldr	x9, [x20, #8]
	ldr	w1, [x9, #8]
	ldr	w4, [x8]
	ldp	x8, x3, [x22]
	ldp	w6, w7, [x8]
	bl	_hqdn3d_denoise
	ldr	x8, [x21, #8]
	ldp	w5, w0, [x8, #16]
	ldr	x9, [x20, #8]
	ldr	w1, [x9, #20]
	ldp	x9, x2, [x22, #8]
	ldr	x10, [x22]
	add	x3, x9, #4
	ldr	w4, [x8, #12]
	ldp	w6, w7, [x10, #8]
	bl	_hqdn3d_denoise
	ldr	x8, [x21, #8]
	ldp	w5, w0, [x8, #28]
	ldr	x9, [x20, #8]
	ldr	w1, [x9, #32]
	ldp	x9, x2, [x22, #8]
	ldr	x10, [x22]
	add	x3, x9, #8
	ldr	w4, [x8, #24]
	ldp	w6, w7, [x10, #16]
	bl	_hqdn3d_denoise
	ldr	w8, [x21]
	str	w8, [x20]
	str	x20, [x19]
Lloh5:
	adrp	x8, _HB_FILTER_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HB_FILTER_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_HB_FILTER_DONE,4,2             ; @HB_FILTER_DONE
	.comm	_HB_FILTER_OK,4,2               ; @HB_FILTER_OK
	.no_dead_strip	_hb_denoise_work
.subsections_via_symbols
