	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_mcapture
_ioctl_mcapture:                        ## @ioctl_mcapture
	.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	(%rdi), %rax
	cmpq	(%rsi), %rax
	jae	LBB0_1
## %bb.3:
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	8(%rdi), %esi
	movl	12(%rdi), %edi
	callq	_cpia2_match_video_size
	cmpl	$0, 8(%r14)
	js	LBB0_1
## %bb.4:
	movl	%eax, %r15d
	leaq	32(%r14), %rdi
	movq	_V4L2_PRIORITY_RECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rsi
	callq	_v4l2_prio_change
	testl	%eax, %eax
	jne	LBB0_2
## %bb.5:
	cmpl	8(%r14), %r15d
	je	LBB0_7
## %bb.6:
	movl	%r15d, 8(%r14)
	movl	12(%rbx), %eax
	movl	%eax, 20(%r14)
	movl	8(%rbx), %eax
	movl	%eax, 16(%r14)
	movq	%r14, %rdi
	callq	_cpia2_set_format
LBB0_7:
	movq	24(%r14), %rax
	movq	(%rbx), %rsi
	movq	(%rax,%rsi,8), %rcx
	movq	_FRAME_READING@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_sync
	testl	%eax, %eax
	js	LBB0_2
## %bb.9:
	movq	24(%r14), %rax
	movq	(%rbx), %rsi
LBB0_10:
	movq	_FRAME_EMPTY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax,%rsi,8)
	movl	12(%r14), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cpia2_usb_stream_start         ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_PRIORITY_RECORD,4,2       ## @V4L2_PRIORITY_RECORD
	.comm	_FRAME_READING,8,3              ## @FRAME_READING
	.comm	_FRAME_EMPTY,8,3                ## @FRAME_EMPTY
	.no_dead_strip	_ioctl_mcapture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_mcapture
_ioctl_mcapture:                        ; @ioctl_mcapture
	.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
	ldr	x8, [x0]
	ldr	x9, [x1]
	cmp	x8, x9
	b.hs	LBB0_9
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #12]
	ldr	w1, [x20, #8]
	bl	_cpia2_match_video_size
	ldr	w8, [x19, #8]
	tbnz	w8, #31, LBB0_9
; %bb.2:
	mov	x22, x0
	add	x0, x19, #32
Lloh0:
	adrp	x8, _V4L2_PRIORITY_RECORD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_PRIORITY_RECORD@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_v4l2_prio_change
	cbnz	w0, LBB0_10
; %bb.3:
	ldr	w8, [x19, #8]
	cmp	w22, w8
	b.eq	LBB0_5
; %bb.4:
	str	w22, [x19, #8]
	ldr	d0, [x20, #8]
	str	d0, [x19, #16]
	mov	x0, x19
	bl	_cpia2_set_format
LBB0_5:
	ldr	x8, [x19, #24]
	ldr	x1, [x20]
	ldr	x9, [x8, x1, lsl #3]
Lloh3:
	adrp	x10, _FRAME_READING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FRAME_READING@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_sync
	tbnz	w0, #31, LBB0_10
; %bb.7:
	ldr	x8, [x19, #24]
	ldr	x1, [x20]
LBB0_8:
Lloh6:
	adrp	x9, _FRAME_EMPTY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FRAME_EMPTY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	x9, [x8, x1, lsl #3]
	ldr	w1, [x19, #12]
	mov	x0, x19
	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
	b	_cpia2_usb_stream_start
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_PRIORITY_RECORD,4,2       ; @V4L2_PRIORITY_RECORD
	.comm	_FRAME_READING,8,3              ; @FRAME_READING
	.comm	_FRAME_EMPTY,8,3                ; @FRAME_EMPTY
	.no_dead_strip	_ioctl_mcapture
.subsections_via_symbols
