	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_buffer_setup
_vpif_buffer_setup:                     ## @vpif_buffer_setup
	.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	(%rdi), %rax
	movq	(%rax), %rbx
	movq	8(%rbx), %r12
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	$2, %edi
	callq	_vpif_dbg
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r12,%r13,8), %rax
	jne	LBB0_3
## %bb.1:
	movq	_config_params@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rbx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	movl	%ecx, (%r14)
	movl	8(%rax), %eax
	cmpl	%eax, (%r15)
	jae	LBB0_3
## %bb.2:
	movl	%eax, (%r15)
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpif_buffer_setup\n"

	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_config_params,16,3             ## @config_params
	.no_dead_strip	_vpif_buffer_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_buffer_setup
_vpif_buffer_setup:                     ; @vpif_buffer_setup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	x22, [x21, #8]
Lloh0:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _debug@GOTPAGE
Lloh4:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vpif_dbg
Lloh8:
	adrp	x8, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x9, [x22, x23, lsl #3]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh11:
	adrp	x8, _config_params@GOTPAGE
Lloh12:
	ldr	x8, [x8, _config_params@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	x10, [x21]
	ldr	w9, [x9, x10, lsl #2]
	str	w9, [x20]
	ldr	w9, [x19]
	ldr	w8, [x8, #8]
	cmp	w9, w8
	b.hs	LBB0_3
; %bb.2:
	str	w8, [x19]
LBB0_3:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpif_buffer_setup\n"

	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_config_params,16,3             ; @config_params
	.no_dead_strip	_vpif_buffer_setup
.subsections_via_symbols
