	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_vidioc_try_fmt
_pwc_vidioc_try_fmt:                    ## @pwc_vidioc_try_fmt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rsi), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.4:
	cmpl	$129, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$130, %eax
	jne	LBB0_10
## %bb.6:
	movl	32(%r14), %edi
	callq	_DEVICE_USE_CODEC23
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	movl	32(%r14), %edi
	callq	_DEVICE_USE_CODEC1
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_11:
	movq	16(%rbx), %rcx
	movq	16(%r14), %rax
	cmpq	%rax, %rcx
	jg	LBB0_13
## %bb.12:
	movq	(%r14), %rax
	cmpq	%rax, %rcx
	jge	LBB0_14
LBB0_13:
	movq	%rax, 16(%rbx)
LBB0_14:
	movq	24(%rbx), %rcx
	movq	24(%r14), %rax
	cmpq	%rax, %rcx
	jle	LBB0_16
## %bb.15:
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	callq	_PWC_DEBUG_IOCTL
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_16:
	movq	8(%r14), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %rcx
	jge	LBB0_18
## %bb.17:
	movq	%rdx, 24(%rbx)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad video type must be V4L2_BUF_TYPE_VIDEO_CAPTURE\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"codec1 is only supported for old pwc webcam\n"

L_.str.2:                               ## @.str.2
	.asciz	"codec23 is only supported for new pwc webcam\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unsupported pixel format\n"

	.no_dead_strip	_pwc_vidioc_try_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_vidioc_try_fmt
_pwc_vidioc_try_fmt:                    ; @pwc_vidioc_try_fmt
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x1, #8]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.4:
	ldr	w0, [x20, #32]
	bl	_DEVICE_USE_CODEC23
	cbz	w0, LBB0_9
; %bb.5:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_16
LBB0_7:
	ldr	w0, [x20, #32]
	bl	_DEVICE_USE_CODEC1
	cbz	w0, LBB0_9
; %bb.8:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_9:
	ldr	x9, [x19, #16]
	ldr	x8, [x20, #16]
	cmp	x9, x8
	b.gt	LBB0_11
; %bb.10:
	ldr	x8, [x20]
	cmp	x9, x8
	b.ge	LBB0_12
LBB0_11:
	str	x8, [x19, #16]
LBB0_12:
	ldr	x8, [x19, #24]
	ldr	x9, [x20, #24]
	cmp	x8, x9
	b.gt	LBB0_14
; %bb.13:
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ge	LBB0_18
LBB0_14:
	mov	w0, #0
	str	x9, [x19, #24]
	b	LBB0_17
LBB0_15:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_16:
	bl	_PWC_DEBUG_IOCTL
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	w0, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad video type must be V4L2_BUF_TYPE_VIDEO_CAPTURE\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"codec1 is only supported for old pwc webcam\n"

l_.str.2:                               ; @.str.2
	.asciz	"codec23 is only supported for new pwc webcam\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unsupported pixel format\n"

	.no_dead_strip	_pwc_vidioc_try_fmt
.subsections_via_symbols
