	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_fmt_vid_cap
_vidioc_s_fmt_vid_cap:                  ## @vidioc_s_fmt_vid_cap
	.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, %r12
	movq	%rsi, %r15
	leaq	20(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_2:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_try_fmt_vid_cap
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.5:
	movq	(%r12), %rcx
	cmpq	8(%r15), %rcx
	jle	LBB0_8
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	xorl	%ebx, %ebx
	cmpl	16(%r15), %eax
	je	LBB0_12
## %bb.9:
	cmpq	$0, 40(%r15)
	je	LBB0_11
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_3:
	movl	%eax, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	16(%r12), %ecx
	movl	%ecx, 32(%r15)
	movl	12(%r12), %ecx
	movl	%ecx, 28(%r15)
	movl	8(%r12), %ecx
	movl	%ecx, 24(%r15)
	movl	%eax, 16(%r15)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_vidioc_s_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_fmt_vid_cap
_vidioc_s_fmt_vid_cap:                  ; @vidioc_s_fmt_vid_cap
	.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	x22, x2
	mov	x21, x1
	add	x19, x1, #20
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_2:
	mov	x0, x21
	mov	x1, x22
	bl	_try_fmt_vid_cap
	mov	x20, x0
	tbnz	w0, #31, LBB0_12
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x22]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.le	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	w8, [x21, #16]
	cmp	w20, w8
	b.eq	LBB0_11
; %bb.7:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_10
; %bb.8:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_10:
	ldr	w8, [x22, #16]
	str	w8, [x21, #32]
	ldr	d0, [x22, #8]
	str	d0, [x21, #24]
	str	w20, [x21, #16]
LBB0_11:
	mov	w20, #0
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x20
	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	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_vidioc_s_fmt_vid_cap
.subsections_via_symbols
