	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dc1394_read_packet
_dc1394_read_packet:                    ## @dc1394_read_packet
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	24(%rbx), %edi
	movq	16(%rbx), %rsi
	callq	_dc1394_capture_enqueue
	movq	_DC1394_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_3:
	movl	24(%rbx), %edi
	movq	_DC1394_CAPTURE_POLICY_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%rbx), %rdx
	callq	_dc1394_capture_dequeue
	movq	_DC1394_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movq	16(%rbx), %rax
	movq	8(%rax), %rcx
	movq	%rcx, 16(%r15)
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	imull	$1000000, (%rbx), %eax          ## imm = 0xF4240
	cltd
	idivl	4(%rbx)
	movl	%eax, 4(%r15)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r15)
	movl	8(%rbx), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_6
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DC1394_SUCCESS,4,2             ## @DC1394_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to release %d frame\n"

	.comm	_DC1394_CAPTURE_POLICY_WAIT,4,2 ## @DC1394_CAPTURE_POLICY_WAIT
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
L_.str.1:                               ## @.str.1
	.asciz	"DMA capture failed\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_dc1394_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dc1394_read_packet
_dc1394_read_packet:                    ; @dc1394_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	ldr	x21, [x0]
	ldr	w8, [x21]
	add	w9, w8, #1
	str	w9, [x21]
Lloh0:
	adrp	x22, _DC1394_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DC1394_SUCCESS@GOTPAGEOFF]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w0, [x21, #24]
	ldr	x1, [x21, #16]
	bl	_dc1394_capture_enqueue
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w8, [x21]
	str	x8, [sp]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_3:
	ldr	w0, [x21, #24]
Lloh7:
	adrp	x8, _DC1394_CAPTURE_POLICY_WAIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DC1394_CAPTURE_POLICY_WAIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, x21, #16
	bl	_dc1394_capture_dequeue
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x21, #16]
	ldr	x9, [x8, #8]
	str	x9, [x19, #16]
	mov	w9, #16960
	movk	w9, #15, lsl #16
	ldp	w10, w11, [x21]
	mul	w9, w10, w9
	ldr	w0, [x8]
	sdiv	w8, w9, w11
	stp	w0, w8, [x19]
Lloh10:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	ldr	w10, [x21, #8]
	orr	w8, w9, w8
	stp	w10, w8, [x19, #8]
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DC1394_SUCCESS,4,2             ; @DC1394_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to release %d frame\n"

	.comm	_DC1394_CAPTURE_POLICY_WAIT,4,2 ; @DC1394_CAPTURE_POLICY_WAIT
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
l_.str.1:                               ; @.str.1
	.asciz	"DMA capture failed\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_dc1394_read_packet
.subsections_via_symbols
