	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa_videobuf_setup
_pxa_videobuf_setup:                    ## @pxa_videobuf_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movl	16(%rbx), %edi
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	callq	_soc_mbus_bytes_per_line
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	4(%rbx), %edi
	movl	(%r14), %edx
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	(%rbx), %ecx
	imull	%r12d, %ecx
	movl	%ecx, (%r15)
	movl	(%r14), %edx
	testl	%edx, %edx
	jne	LBB0_3
## %bb.2:
	movl	$32, (%r14)
	movl	(%r15), %ecx
	movl	$32, %edx
LBB0_3:
	imull	%ecx, %edx
	movq	_vid_limit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$20, %eax
	xorl	%r12d, %r12d
	cmpl	%eax, %edx
	jbe	LBB0_5
## %bb.4:
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, (%r14)
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"count=%d, size=%d\n"

	.comm	_vid_limit,4,2                  ## @vid_limit
	.no_dead_strip	_pxa_videobuf_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa_videobuf_setup
_pxa_videobuf_setup:                    ; @pxa_videobuf_setup
	.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	x20, x2
	mov	x19, x1
	ldr	x22, [x0]
	ldr	w0, [x22, #16]
	ldr	x8, [x22, #8]
	ldr	w1, [x8]
	bl	_soc_mbus_bytes_per_line
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	w0, [x22, #4]
	ldr	w2, [x19]
	ldr	w3, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x22]
	mul	w8, w8, w21
	str	w8, [x20]
	ldr	w9, [x19]
	cbnz	w9, LBB0_3
; %bb.2:
	mov	w9, #32
	str	w9, [x19]
	ldr	w8, [x20]
LBB0_3:
	mul	w10, w9, w8
Lloh2:
	adrp	x9, _vid_limit@GOTPAGE
Lloh3:
	ldr	x9, [x9, _vid_limit@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	lsl	w9, w9, #20
	cmp	w10, w9
	b.ls	LBB0_5
; %bb.4:
	mov	w21, #0
	udiv	w8, w9, w8
	str	w8, [x19]
	b	LBB0_6
LBB0_5:
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"count=%d, size=%d\n"

	.comm	_vid_limit,4,2                  ; @vid_limit
	.no_dead_strip	_pxa_videobuf_setup
.subsections_via_symbols
