	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7134_s_fbuf
_saa7134_s_fbuf:                        ## @saa7134_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_CAP_SYS_RAWIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movl	8(%rbx), %edi
	callq	_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rcx
	movl	8(%rbx), %eax
	movl	%eax, 8(%r14)
	movq	(%rbx), %rdx
	movq	%rdx, (%r14)
	movq	%rcx, 16(%r14)
	xorl	%eax, %eax
	testl	%edx, %edx
	jne	LBB0_8
## %bb.7:
	movl	(%rcx), %ecx
	imull	4(%r14), %ecx
	leal	7(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$3, %edx
	movl	%edx, (%r14)
	jmp	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EPERM@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.no_dead_strip	_saa7134_s_fbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7134_s_fbuf
_saa7134_s_fbuf:                        ; @saa7134_s_fbuf
	.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
	mov	x20, x2
	bl	_video_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CAP_SYS_RAWIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_SYS_RAWIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_6
LBB0_2:
	ldr	w0, [x20, #8]
	bl	_format_by_fourcc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x8, x0
	ldr	x9, [x20]
	ldr	w10, [x20, #8]
	str	w10, [x19, #8]
	str	x9, [x19]
	str	x0, [x19, #16]
	mov	w0, #0
	cbnz	w9, LBB0_8
; %bb.4:
	ldr	w9, [x19, #4]
	ldr	w8, [x8]
	mul	w8, w8, w9
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x19]
	b	LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.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
	.no_dead_strip	_saa7134_s_fbuf
.subsections_via_symbols
