	.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
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	8(%r15), %rbx
	movl	4(%rbx), %eax
	imull	(%rbx), %eax
	movq	16(%rbx), %rcx
	imull	(%rcx), %eax
	addl	$7, %eax
	sarl	$3, %eax
	movl	%eax, (%rdx)
	movl	(%rsi), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_EM28XX_DEF_BUF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
LBB0_2:
	movq	_EM28XX_MIN_BUF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jae	LBB0_4
## %bb.3:
	movl	%ecx, (%rsi)
LBB0_4:
	leaq	-32(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	12(%rbx), %eax
	movl	%eax, -28(%rbp)
	cmpq	$0, (%r15)
	jne	LBB0_5
## %bb.6:
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	addq	$8, %rbx
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r14, %r8
	callq	_v4l2_device_call_all
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EM28XX_DEF_BUF,4,2             ## @EM28XX_DEF_BUF
	.comm	_EM28XX_MIN_BUF,4,2             ## @EM28XX_MIN_BUF
	.comm	_V4L2_TUNER_RADIO,4,2           ## @V4L2_TUNER_RADIO
	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ## @V4L2_TUNER_ANALOG_TV
	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_frequency,4,2                ## @s_frequency
	.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:
	sub	sp, sp, #48
	.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
	ldr	x20, [x0]
	ldr	x19, [x20, #8]
	ldp	w8, w9, [x19]
	mul	w8, w9, w8
	ldr	x9, [x19, #16]
	ldr	w9, [x9]
	orr	w10, wzr, #0x7
	madd	w8, w8, w9, w10
	asr	w8, w8, #3
	str	w8, [x2]
	ldr	w8, [x1]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EM28XX_DEF_BUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EM28XX_DEF_BUF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x1]
LBB0_2:
Lloh3:
	adrp	x9, _EM28XX_MIN_BUF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EM28XX_MIN_BUF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hs	LBB0_4
; %bb.3:
	str	w9, [x1]
LBB0_4:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x19, #12]
	str	w8, [sp, #12]
Lloh6:
	adrp	x8, _V4L2_TUNER_RADIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh8:
	adrp	x9, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
	ldr	x10, [x20]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x0, x19, #8
Lloh10:
	adrp	x8, _tuner@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _s_frequency@GOTPAGE
Lloh14:
	ldr	x8, [x8, _s_frequency@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	w1, #0
	bl	_v4l2_device_call_all
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EM28XX_DEF_BUF,4,2             ; @EM28XX_DEF_BUF
	.comm	_EM28XX_MIN_BUF,4,2             ; @EM28XX_MIN_BUF
	.comm	_V4L2_TUNER_RADIO,4,2           ; @V4L2_TUNER_RADIO
	.comm	_V4L2_TUNER_ANALOG_TV,4,2       ; @V4L2_TUNER_ANALOG_TV
	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_frequency,4,2                ; @s_frequency
	.no_dead_strip	_buffer_setup
.subsections_via_symbols
