	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_setup
_buffer_setup:                          ## @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
	movq	%rdx, %r8
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rsi), %edx
	movq	_MAX_SAA7146_CAPTURE_BUFFERS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	cmpl	%ecx, %edx
	jbe	LBB0_3
LBB0_2:
	movl	%ecx, (%rsi)
LBB0_3:
	movl	(%rax), %ecx
	movl	%ecx, (%r8)
	movl	(%rsi), %edx
	movl	%edx, %edi
	imull	%ecx, %edi
	movq	_max_memory@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$20, %eax
	cmpl	%eax, %edi
	jbe	LBB0_5
## %bb.4:
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edx
	movl	%eax, (%rsi)
	movl	(%r8), %ecx
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	callq	_DEB_CAP
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SAA7146_CAPTURE_BUFFERS,4,2 ## @MAX_SAA7146_CAPTURE_BUFFERS
	.comm	_max_memory,4,2                 ## @max_memory
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d buffers, %d bytes each\n"

	.no_dead_strip	_buffer_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_setup
_buffer_setup:                          ; @buffer_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
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w10, [x1]
Lloh0:
	adrp	x9, _MAX_SAA7146_CAPTURE_BUFFERS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_SAA7146_CAPTURE_BUFFERS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w10, #0
	ccmp	w10, w9, #2, ne
	b.ls	LBB0_2
; %bb.1:
	str	w9, [x1]
LBB0_2:
	ldr	w8, [x8]
	str	w8, [x2]
	ldr	w9, [x1]
	mul	w11, w9, w8
Lloh3:
	adrp	x10, _max_memory@GOTPAGE
Lloh4:
	ldr	x10, [x10, _max_memory@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	lsl	w10, w10, #20
	cmp	w11, w10
	b.ls	LBB0_4
; %bb.3:
	udiv	w9, w10, w8
	str	w9, [x1]
	ldr	w8, [x2]
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x9
	mov	x2, x8
	bl	_DEB_CAP
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SAA7146_CAPTURE_BUFFERS,4,2 ; @MAX_SAA7146_CAPTURE_BUFFERS
	.comm	_max_memory,4,2                 ; @max_memory
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d buffers, %d bytes each\n"

	.no_dead_strip	_buffer_setup
.subsections_via_symbols
