	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_firmware_copy
_ivtv_firmware_copy:                    ## @ivtv_firmware_copy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_INFO
	movq	_CX2341X_FIRM_ENC_FILENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	movq	_IVTV_FW_ENC_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	%rbx, %rdx
	callq	_load_fw_direct
	cmpq	(%r14), %rax
	jne	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpl	$0, 4(%rbx)
	je	LBB0_6
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_IVTV_DEBUG_INFO
	movq	_CX2341X_FIRM_DEC_FILENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	movq	_IVTV_FW_DEC_SIZE@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%rbx, %rdx
	callq	_load_fw_direct
	cmpq	(%r15), %rax
	je	LBB0_6
## %bb.4:
	movl	$-1, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_5
LBB0_1:
	movl	$-3, %r14d
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_IVTV_DEBUG_WARN
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Loading encoder image\n"

	.comm	_CX2341X_FIRM_ENC_FILENAME,4,2  ## @CX2341X_FIRM_ENC_FILENAME
	.comm	_IVTV_FW_ENC_SIZE,8,3           ## @IVTV_FW_ENC_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"failed loading encoder firmware\n"

L_.str.2:                               ## @.str.2
	.asciz	"Loading decoder image\n"

	.comm	_CX2341X_FIRM_DEC_FILENAME,4,2  ## @CX2341X_FIRM_DEC_FILENAME
	.comm	_IVTV_FW_DEC_SIZE,8,3           ## @IVTV_FW_DEC_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"failed loading decoder firmware\n"

	.no_dead_strip	_ivtv_firmware_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_firmware_copy
_ivtv_firmware_copy:                    ; @ivtv_firmware_copy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_INFO
Lloh2:
	adrp	x8, _CX2341X_FIRM_ENC_FILENAME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CX2341X_FIRM_ENC_FILENAME@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
Lloh5:
	adrp	x20, _IVTV_FW_ENC_SIZE@GOTPAGE
Lloh6:
	ldr	x20, [x20, _IVTV_FW_ENC_SIZE@GOTPAGEOFF]
	ldr	x3, [x20]
	mov	x2, x19
	bl	_load_fw_direct
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IVTV_DEBUG_INFO
Lloh9:
	adrp	x8, _CX2341X_FIRM_DEC_FILENAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX2341X_FIRM_DEC_FILENAME@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x19]
Lloh12:
	adrp	x20, _IVTV_FW_DEC_SIZE@GOTPAGE
Lloh13:
	ldr	x20, [x20, _IVTV_FW_DEC_SIZE@GOTPAGEOFF]
	ldr	x3, [x20]
	mov	x2, x19
	bl	_load_fw_direct
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_3:
	mov	w19, #0
	b	LBB0_7
LBB0_4:
	mov	w19, #-3
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
	mov	w19, #-1
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_6:
	bl	_IVTV_DEBUG_WARN
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Loading encoder image\n"

	.comm	_CX2341X_FIRM_ENC_FILENAME,4,2  ; @CX2341X_FIRM_ENC_FILENAME
	.comm	_IVTV_FW_ENC_SIZE,8,3           ; @IVTV_FW_ENC_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"failed loading encoder firmware\n"

l_.str.2:                               ; @.str.2
	.asciz	"Loading decoder image\n"

	.comm	_CX2341X_FIRM_DEC_FILENAME,4,2  ; @CX2341X_FIRM_DEC_FILENAME
	.comm	_IVTV_FW_DEC_SIZE,8,3           ; @IVTV_FW_DEC_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"failed loading decoder firmware\n"

	.no_dead_strip	_ivtv_firmware_copy
.subsections_via_symbols
