	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ngene_get_buffers
_ngene_get_buffers:                     ## @ngene_get_buffers
	.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, %r14
	callq	_AllocCommonBuffers
	testq	%rax, %rax
	je	LBB0_1
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	24(%r14), %rax
	movq	(%rax), %rax
	movq	_NGENE_IO_TSOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%rax)
	je	LBB0_4
## %bb.2:
	movq	_TSOUT_BUF_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_vmalloc
	movq	%rax, 64(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	leaq	72(%r14), %rdi
	movl	(%rbx), %edx
	movq	%rax, %rsi
	callq	_dvb_ringbuffer_init
	movq	24(%r14), %rax
	movq	(%rax), %rax
LBB0_4:
	movl	8(%rax), %ecx
	movq	_NGENE_IO_TSIN@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_7
## %bb.5:
	movq	_TSIN_BUF_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_vmalloc
	movq	%rax, 48(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	leaq	56(%r14), %rdi
	movl	(%rbx), %edx
	movq	%rax, %rsi
	callq	_dvb_ringbuffer_init
	movq	24(%r14), %rax
	movq	(%rax), %rax
	movl	8(%rax), %ecx
LBB0_7:
	movq	_NGENE_IO_AIN@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.8:
	movq	_AIN_BUF_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_vmalloc
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	leaq	40(%r14), %rdi
	movl	(%rbx), %edx
	movq	%rax, %rsi
	callq	_dvb_ringbuffer_init
	movq	24(%r14), %rax
	movq	(%rax), %rax
LBB0_10:
	movq	_NGENE_IO_HDTV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_13
## %bb.11:
	movq	_VIN_BUF_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_vmalloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	leaq	16(%r14), %rdi
	movl	(%rbx), %edx
	movq	%rax, %rsi
	callq	_dvb_ringbuffer_init
LBB0_13:
	movl	4(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %r15d
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ioremap
	movl	%eax, (%r14)
	testl	%eax, %eax
	jne	LBB0_15
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NGENE_IO_TSOUT,4,2             ## @NGENE_IO_TSOUT
	.comm	_TSOUT_BUF_SIZE,4,2             ## @TSOUT_BUF_SIZE
	.comm	_NGENE_IO_TSIN,4,2              ## @NGENE_IO_TSIN
	.comm	_TSIN_BUF_SIZE,4,2              ## @TSIN_BUF_SIZE
	.comm	_NGENE_IO_AIN,4,2               ## @NGENE_IO_AIN
	.comm	_AIN_BUF_SIZE,4,2               ## @AIN_BUF_SIZE
	.comm	_NGENE_IO_HDTV,4,2              ## @NGENE_IO_HDTV
	.comm	_VIN_BUF_SIZE,4,2               ## @VIN_BUF_SIZE
	.no_dead_strip	_ngene_get_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ngene_get_buffers
_ngene_get_buffers:                     ; @ngene_get_buffers
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_AllocCommonBuffers
	cbz	x0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w9, [x8, #16]
Lloh3:
	adrp	x10, _NGENE_IO_TSOUT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NGENE_IO_TSOUT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.4:
Lloh6:
	adrp	x20, _TSOUT_BUF_SIZE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _TSOUT_BUF_SIZE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_vmalloc
	str	x0, [x19, #64]
	cbz	x0, LBB0_1
; %bb.5:
	mov	x1, x0
	add	x0, x19, #72
	ldr	w2, [x20]
	bl	_dvb_ringbuffer_init
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
LBB0_6:
	ldr	w9, [x8, #8]
Lloh8:
	adrp	x10, _NGENE_IO_TSIN@GOTPAGE
Lloh9:
	ldr	x10, [x10, _NGENE_IO_TSIN@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.7:
Lloh11:
	adrp	x20, _TSIN_BUF_SIZE@GOTPAGE
Lloh12:
	ldr	x20, [x20, _TSIN_BUF_SIZE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_vmalloc
	str	x0, [x19, #48]
	cbz	x0, LBB0_1
; %bb.8:
	mov	x1, x0
	add	x0, x19, #56
	ldr	w2, [x20]
	bl	_dvb_ringbuffer_init
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w9, [x8, #8]
LBB0_9:
Lloh13:
	adrp	x10, _NGENE_IO_AIN@GOTPAGE
Lloh14:
	ldr	x10, [x10, _NGENE_IO_AIN@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.10:
Lloh16:
	adrp	x20, _AIN_BUF_SIZE@GOTPAGE
Lloh17:
	ldr	x20, [x20, _AIN_BUF_SIZE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_vmalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_1
; %bb.11:
	mov	x1, x0
	add	x0, x19, #40
	ldr	w2, [x20]
	bl	_dvb_ringbuffer_init
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
LBB0_12:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _NGENE_IO_HDTV@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NGENE_IO_HDTV@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
Lloh21:
	adrp	x20, _VIN_BUF_SIZE@GOTPAGE
Lloh22:
	ldr	x20, [x20, _VIN_BUF_SIZE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_vmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_1
; %bb.14:
	mov	x1, x0
	add	x0, x19, #16
	ldr	w2, [x20]
	bl	_dvb_ringbuffer_init
LBB0_15:
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_pci_resource_start
	mov	x20, x0
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x20
	bl	_ioremap
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	cbnz	w8, LBB0_2
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NGENE_IO_TSOUT,4,2             ; @NGENE_IO_TSOUT
	.comm	_TSOUT_BUF_SIZE,4,2             ; @TSOUT_BUF_SIZE
	.comm	_NGENE_IO_TSIN,4,2              ; @NGENE_IO_TSIN
	.comm	_TSIN_BUF_SIZE,4,2              ; @TSIN_BUF_SIZE
	.comm	_NGENE_IO_AIN,4,2               ; @NGENE_IO_AIN
	.comm	_AIN_BUF_SIZE,4,2               ; @AIN_BUF_SIZE
	.comm	_NGENE_IO_HDTV,4,2              ; @NGENE_IO_HDTV
	.comm	_VIN_BUF_SIZE,4,2               ; @VIN_BUF_SIZE
	.no_dead_strip	_ngene_get_buffers
.subsections_via_symbols
