	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_fbuf
_vidioc_s_fbuf:                         ## @vidioc_s_fbuf
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	(%rsi), %rbx
	movq	(%rbx), %r13
	leaq	L_.str(%rip), %rdi
	callq	_DEB_EE
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_CAP_SYS_RAWIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_11
LBB0_2:
	movl	8(%r14), %esi
	movq	%rbx, %rdi
	callq	_saa7146_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r12
	movq	_FORMAT_IS_PLANAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.4:
	movq	%r12, %rsi
	addq	$8, %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_DEB_S
LBB0_5:
	movq	%r15, %rdi
	callq	_IS_OVERLAY_ACTIVE
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	cmpq	%r15, (%r13)
	je	LBB0_9
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DEB_D
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	(%r14), %rcx
	movq	%rcx, 8(%r13)
	movl	8(%r14), %eax
	movl	%eax, 16(%r13)
	movq	%r12, 24(%r13)
	movl	12(%r13), %eax
	xorl	%ebx, %ebx
	cmpl	%eax, %ecx
	jge	LBB0_14
## %bb.10:
	addq	$8, %r13
	imull	4(%r12), %eax
	leal	7(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$3, %esi
	movl	%esi, (%r13)
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DEB_D
	jmp	LBB0_14
LBB0_11:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_S_FBUF\n"

	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_CAP_SYS_RAWIO,4,2              ## @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FORMAT_IS_PLANAR,4,2           ## @FORMAT_IS_PLANAR
L_.str.1:                               ## @.str.1
	.asciz	"planar pixelformat '%4.4s' not allowed for overlay\n"

L_.str.2:                               ## @.str.2
	.asciz	"refusing to change framebuffer information while overlay is active in another open\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.3:                               ## @.str.3
	.asciz	"setting bytesperline to %d\n"

	.no_dead_strip	_vidioc_s_fbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_fbuf
_vidioc_s_fbuf:                         ; @vidioc_s_fbuf
	.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, x2
	mov	x20, x1
	ldr	x21, [x1]
	ldr	x22, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DEB_EE
Lloh2:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_capable
	cbnz	w0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _CAP_SYS_RAWIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CAP_SYS_RAWIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_12
LBB0_2:
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_saa7146_format_by_fourcc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
	ldr	w8, [x0]
Lloh8:
	adrp	x9, _FORMAT_IS_PLANAR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FORMAT_IS_PLANAR@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	add	x1, x21, #8
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DEB_S
LBB0_5:
	mov	x0, x20
	bl	_IS_OVERLAY_ACTIVE
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x8, [x22]
	cmp	x8, x20
	b.eq	LBB0_9
; %bb.7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DEB_D
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
	ldr	w8, [x19, #8]
	ldr	x9, [x19]
	str	x9, [x22, #8]!
	str	w8, [x22, #8]
	str	x21, [x22, #16]
	ldr	w8, [x22, #4]
	cmp	w9, w8
	b.ge	LBB0_11
; %bb.10:
	ldr	w9, [x21, #4]
	mul	w8, w9, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x22]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DEB_D
LBB0_11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
Lloh21:
	adrp	x8, _EPERM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_S_FBUF\n"

	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_CAP_SYS_RAWIO,4,2              ; @CAP_SYS_RAWIO
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FORMAT_IS_PLANAR,4,2           ; @FORMAT_IS_PLANAR
l_.str.1:                               ; @.str.1
	.asciz	"planar pixelformat '%4.4s' not allowed for overlay\n"

l_.str.2:                               ; @.str.2
	.asciz	"refusing to change framebuffer information while overlay is active in another open\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.3:                               ; @.str.3
	.asciz	"setting bytesperline to %d\n"

	.no_dead_strip	_vidioc_s_fbuf
.subsections_via_symbols
