	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mx1_videobuf_setup
_mx1_videobuf_setup:                    ## @mx1_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
	movq	(%rdi), %r8
	movl	4(%r8), %eax
	imull	(%r8), %eax
	movq	16(%r8), %rcx
	movl	(%rcx), %ecx
	addl	$7, %ecx
	sarl	$3, %ecx
	imull	%eax, %ecx
	movl	%ecx, (%rdx)
	movl	(%rsi), %r11d
	testl	%r11d, %r11d
	jne	LBB0_2
## %bb.1:
	movl	$32, (%rsi)
	movl	(%rdx), %ecx
	movl	$32, %r11d
LBB0_2:
	movl	%r11d, %r9d
	imull	%ecx, %r9d
	movq	_MAX_VIDEO_MEM@GOTPCREL(%rip), %r10
	movl	(%r10), %edi
	shll	$20, %edi
	cmpl	%edi, %r9d
	jbe	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	decl	%r11d
	movl	%r11d, (%rsi)
	movl	(%rdx), %ecx
	movl	%r11d, %edi
	imull	%ecx, %edi
	movl	(%r10), %eax
	shll	$20, %eax
	cmpl	%eax, %edi
	ja	LBB0_3
LBB0_4:
	movl	8(%r8), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r11d, %edx
	callq	_dev_dbg
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_VIDEO_MEM,4,2              ## @MAX_VIDEO_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"count=%d, size=%d\n"

	.no_dead_strip	_mx1_videobuf_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mx1_videobuf_setup
_mx1_videobuf_setup:                    ; @mx1_videobuf_setup
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x2
	ldr	x9, [x0]
	ldp	w10, w11, [x9]
	mul	w10, w11, w10
	ldr	x11, [x9, #16]
	ldr	w11, [x11]
	add	w11, w11, #7
	asr	w11, w11, #3
	mul	w3, w10, w11
	str	w3, [x2]
	ldr	w2, [x1]
	cbnz	w2, LBB0_2
; %bb.1:
	mov	w2, #32
	str	w2, [x1]
	ldr	w3, [x8]
LBB0_2:
	mul	w11, w2, w3
Lloh0:
	adrp	x10, _MAX_VIDEO_MEM@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MAX_VIDEO_MEM@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10]
	cmp	w11, w12, lsl #20
	b.ls	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w2, w2, #1
	str	w2, [x1]
	ldr	w3, [x8]
	mul	w11, w2, w3
	b	LBB0_3
LBB0_5:
	ldr	w0, [x9, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_VIDEO_MEM,4,2              ; @MAX_VIDEO_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"count=%d, size=%d\n"

	.no_dead_strip	_mx1_videobuf_setup
.subsections_via_symbols
