	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_fwht_decode               ## -- Begin function v4l2_fwht_decode
	.p2align	4, 0x90
_v4l2_fwht_decode:                      ## @v4l2_fwht_decode
	.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	128(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_18
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ecx
	movl	4(%rdi), %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	8(%rdi), %r13d
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	imull	%ecx, %r13d
	movl	88(%rdi), %edi
	callq	_ntohl
	movq	%rax, %r15
	movq	_FWHT_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	cmpl	%r15d, %edx
	jb	LBB0_3
## %bb.4:
	movq	40(%rbx), %rax
	movq	_FWHT_MAGIC1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.5:
	movq	48(%rbx), %rax
	movq	_FWHT_MAGIC2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.6:
	movl	84(%rbx), %edi
	callq	_ntohl
	cmpq	16(%rbx), %rax
	jne	LBB0_18
## %bb.7:
	movl	80(%rbx), %edi
	callq	_ntohl
	cmpq	24(%rbx), %rax
	jne	LBB0_18
## %bb.8:
	movl	76(%rbx), %edi
	callq	_ntohl
	movl	$3, %edx
	cmpl	$2, %r15d
	jb	LBB0_11
## %bb.9:
	movq	_FWHT_FL_PIXENC_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	cmpl	(%r14), %ecx
	jne	LBB0_18
## %bb.10:
	movq	_FWHT_FL_COMPONENTS_NUM_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movq	_FWHT_FL_COMPONENTS_NUM_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	incl	%edx
LBB0_11:
	cmpl	4(%r14), %edx
	jne	LBB0_18
## %bb.12:
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	72(%rbx), %edi
	movq	%rax, %r15
	callq	_ntohl
	movq	%rax, 120(%rbx)
	movl	68(%rbx), %edi
	callq	_ntohl
	movq	%rax, 112(%rbx)
	movl	64(%rbx), %edi
	callq	_ntohl
	movq	%rax, 104(%rbx)
	movl	60(%rbx), %edi
	callq	_ntohl
	movq	%rax, 96(%rbx)
	movq	%r12, -104(%rbp)
	movl	56(%rbx), %edi
	callq	_ntohl
	movq	%r15, %rdx
	movq	%rax, -112(%rbp)
	movq	_FWHT_FL_CHROMA_FULL_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%edx, %ecx
	xorl	%eax, %eax
	cmpl	$1, %ecx
	movl	$0, %ecx
	adcl	$1, %ecx
	cmpl	8(%r14), %ecx
	jne	LBB0_14
## %bb.13:
	movq	_FWHT_FL_CHROMA_FULL_HEIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	cmpl	$1, %ecx
	movl	$0, %ecx
	adcl	$1, %ecx
	cmpl	12(%r14), %ecx
	jne	LBB0_14
## %bb.15:
	leaq	-96(%rbp), %rdi
	movq	%r14, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_prepare_raw_frame
	testq	%rax, %rax
	jne	LBB0_18
## %bb.16:
	movl	16(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	24(%r14), %r13
	movq	_V4L2_PIX_FMT_NV24@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_V4L2_PIX_FMT_NV42@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %ecx
	imull	4(%rbx), %ecx
	leaq	32(%rbx), %r12
	movq	32(%rbx), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_prepare_raw_frame
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	cmpq	-72(%rbp), %r13                 ## 8-byte Folded Reload
	sete	%cl
	cmpq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	sete	%dl
	orb	%cl, %dl
	cmpl	$3, -48(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	movl	%eax, %ecx
	movq	-88(%rbp), %r10                 ## 8-byte Reload
	shrl	%cl, %r10d
	movl	%edx, %ecx
	shll	%cl, %r10d
	movl	%eax, %ecx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	shrl	%cl, %eax
	movl	%edx, %ecx
	shll	%cl, %eax
	movq	16(%rbx), %rcx
	movq	24(%rbx), %r8
	movl	(%rbx), %r11d
	movl	4(%rbx), %ebx
	subq	$8, %rsp
	leaq	-112(%rbp), %rdi
	movl	%r15d, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	%r12, %r9
	pushq	%rax
	pushq	%r11
	leaq	-96(%rbp), %rax
	pushq	%rax
	pushq	%r10
	pushq	%rbx
	callq	_fwht_decode_frame
	addq	$48, %rsp
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_20
	jmp	LBB0_18
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_pr_err
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
LBB0_19:
	subl	(%rcx), %eax
LBB0_20:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FWHT_VERSION,4,2               ## @FWHT_VERSION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"version %d is not supported, current version is %d\n"

	.comm	_FWHT_MAGIC1,8,3                ## @FWHT_MAGIC1
	.comm	_FWHT_MAGIC2,8,3                ## @FWHT_MAGIC2
	.comm	_FWHT_FL_PIXENC_MSK,4,2         ## @FWHT_FL_PIXENC_MSK
	.comm	_FWHT_FL_COMPONENTS_NUM_MSK,4,2 ## @FWHT_FL_COMPONENTS_NUM_MSK
	.comm	_FWHT_FL_COMPONENTS_NUM_OFFSET,4,2 ## @FWHT_FL_COMPONENTS_NUM_OFFSET
	.comm	_FWHT_FL_CHROMA_FULL_WIDTH,4,2  ## @FWHT_FL_CHROMA_FULL_WIDTH
	.comm	_FWHT_FL_CHROMA_FULL_HEIGHT,4,2 ## @FWHT_FL_CHROMA_FULL_HEIGHT
	.comm	_V4L2_PIX_FMT_NV24,8,3          ## @V4L2_PIX_FMT_NV24
	.comm	_V4L2_PIX_FMT_NV42,8,3          ## @V4L2_PIX_FMT_NV42
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_fwht_decode               ; -- Begin function v4l2_fwht_decode
	.p2align	2
_v4l2_fwht_decode:                      ; @v4l2_fwht_decode
	.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
	ldr	x20, [x0, #128]
	cbz	x20, LBB0_7
; %bb.1:
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldp	w25, w26, [x0]
	ldr	w27, [x0, #8]
	ldr	w0, [x0, #88]
	bl	_ntohl
	mov	x24, x0
Lloh0:
	adrp	x8, _FWHT_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FWHT_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	cmp	w24, #0
	ccmp	w2, w24, #0, ne
	b.hs	LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	bl	_pr_err
	b	LBB0_7
LBB0_3:
	ldr	x8, [x19, #40]
Lloh5:
	adrp	x9, _FWHT_MAGIC1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FWHT_MAGIC1@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x19, #48]
Lloh8:
	adrp	x9, _FWHT_MAGIC2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FWHT_MAGIC2@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	ldr	w0, [x19, #84]
	bl	_ntohl
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x19, #80]
	bl	_ntohl
	ldr	x8, [x19, #24]
	cmp	x0, x8
	b.eq	LBB0_9
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	ret
LBB0_9:
	ldr	w0, [x19, #76]
	bl	_ntohl
	mov	x22, x0
	cmp	w24, #2
	b.lo	LBB0_12
; %bb.10:
Lloh14:
	adrp	x8, _FWHT_FL_PIXENC_MSK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FWHT_FL_PIXENC_MSK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w8, w22
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.11:
Lloh17:
	adrp	x8, _FWHT_FL_COMPONENTS_NUM_MSK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FWHT_FL_COMPONENTS_NUM_MSK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w8, w8, w22
Lloh20:
	adrp	x9, _FWHT_FL_COMPONENTS_NUM_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _FWHT_FL_COMPONENTS_NUM_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	asr	w8, w8, w9
	add	w24, w8, #1
	b	LBB0_13
LBB0_12:
	mov	w24, #3
LBB0_13:
	ldr	w8, [x20, #4]
	cmp	w24, w8
	b.ne	LBB0_7
; %bb.14:
	ldr	w0, [x19, #72]
	bl	_ntohl
	str	x0, [x19, #120]
	ldr	w0, [x19, #68]
	bl	_ntohl
	str	x0, [x19, #112]
	ldr	w0, [x19, #64]
	bl	_ntohl
	str	x0, [x19, #104]
	ldr	w0, [x19, #60]
	bl	_ntohl
	str	x0, [x19, #96]
	str	x23, [sp, #40]
	ldr	w0, [x19, #56]
	bl	_ntohl
	str	x0, [sp, #32]
Lloh23:
	adrp	x8, _FWHT_FL_CHROMA_FULL_WIDTH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FWHT_FL_CHROMA_FULL_WIDTH@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w22
	mov	w8, #1
	cinc	w9, w8, eq
	ldr	w10, [x20, #8]
	cmp	w9, w10
	b.ne	LBB0_7
; %bb.15:
Lloh26:
	adrp	x9, _FWHT_FL_CHROMA_FULL_HEIGHT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _FWHT_FL_CHROMA_FULL_HEIGHT@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w22
	cinc	w8, w8, eq
	ldr	w9, [x20, #12]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.16:
	mul	w3, w27, w25
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, x21
	bl	_prepare_raw_frame
	cbnz	x0, LBB0_7
; %bb.17:
	ldr	w8, [x20, #16]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	ldr	x27, [x20, #24]
Lloh29:
	adrp	x8, _V4L2_PIX_FMT_NV24@GOTPAGE
Lloh30:
	ldr	x8, [x8, _V4L2_PIX_FMT_NV24@GOTPAGEOFF]
Lloh31:
	ldr	x28, [x8]
Lloh32:
	adrp	x8, _V4L2_PIX_FMT_NV42@GOTPAGE
Lloh33:
	ldr	x8, [x8, _V4L2_PIX_FMT_NV42@GOTPAGEOFF]
Lloh34:
	ldr	x23, [x8]
	mov	x21, x19
	ldr	x2, [x21, #32]!
	ldp	w8, w9, [x21, #-28]
	mul	w3, w9, w8
	mov	x0, x21
	mov	x1, x20
	bl	_prepare_raw_frame
	cbnz	x0, LBB0_7
; %bb.18:
	cmp	x27, x28
	ccmp	x27, x23, #4, ne
	cset	w8, eq
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w9, #3
	cset	w9, eq
	lsr	w10, w26, w9
	lsl	w7, w10, w8
	lsr	w9, w25, w9
	lsl	w8, w9, w8
	ldp	x3, x4, [x19, #16]
	ldp	w9, w6, [x19]
	add	x10, sp, #24
	str	x10, [sp]
	stp	w9, w8, [sp, #8]
	add	x0, sp, #32
	mov	x1, x22
	mov	x2, x24
	mov	x5, x21
	bl	_fwht_decode_frame
	cbz	w0, LBB0_7
; %bb.19:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FWHT_VERSION,4,2               ; @FWHT_VERSION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"version %d is not supported, current version is %d\n"

	.comm	_FWHT_MAGIC1,8,3                ; @FWHT_MAGIC1
	.comm	_FWHT_MAGIC2,8,3                ; @FWHT_MAGIC2
	.comm	_FWHT_FL_PIXENC_MSK,4,2         ; @FWHT_FL_PIXENC_MSK
	.comm	_FWHT_FL_COMPONENTS_NUM_MSK,4,2 ; @FWHT_FL_COMPONENTS_NUM_MSK
	.comm	_FWHT_FL_COMPONENTS_NUM_OFFSET,4,2 ; @FWHT_FL_COMPONENTS_NUM_OFFSET
	.comm	_FWHT_FL_CHROMA_FULL_WIDTH,4,2  ; @FWHT_FL_CHROMA_FULL_WIDTH
	.comm	_FWHT_FL_CHROMA_FULL_HEIGHT,4,2 ; @FWHT_FL_CHROMA_FULL_HEIGHT
	.comm	_V4L2_PIX_FMT_NV24,8,3          ; @V4L2_PIX_FMT_NV24
	.comm	_V4L2_PIX_FMT_NV42,8,3          ; @V4L2_PIX_FMT_NV42
.subsections_via_symbols
