	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function input_write_dvb
_input_write_dvb:                       ## @input_write_dvb
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rsi), %rcx
	movq	24(%rdi), %rdx
	movq	8(%rdi), %rax
	movq	16(%rdi), %r12
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rax), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_3
LBB0_1:
	movl	$1, %r15d
	movq	%r12, %r13
LBB0_3:
	movl	(%rsi), %eax
	movq	8(%rcx), %rsi
	movq	(%rdx), %r14
	movl	(%r12), %ecx
	movl	4(%r12), %ebx
	shrl	$11, %ebx
	andl	$31, %ebx
	movl	8(%r12), %edi
	andl	$4, %edi
	sete	%dl
	cmpl	%ebx, %ecx
	jne	LBB0_5
## %bb.4:
	testl	%edi, %edi
	je	LBB0_12
LBB0_5:
	andl	$1, %eax
	leaq	(%rsi,%rax,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testb	$1, %dl
	movl	$1, %eax
	cmovel	%eax, %r15d
	movq	_alt_dma@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %edi
	movq	32(%r13), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	12(%r13), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_sync_single_for_cpu
	movl	(%r12), %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%r13), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %esi
	movslq	12(%r13), %rax
	imulq	$-1370734243, %rax, %rdx        ## imm = 0xAE4C415D
	shrq	$32, %rdx
	addl	%eax, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	sarl	$7, %edx
	addl	%eax, %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dvb_dmx_swfilter_packets
	movl	(%r12), %eax
	incl	%eax
	cltd
	idivl	16(%r13)
	movl	%edx, (%r12)
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%edx, %ebx
	shll	$11, %ebx
	movq	%r12, %rdi
	callq	_DMA_BUFFER_ACK
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ddbwritel
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_DMA_BUFFER_CURRENT
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_safe_ddbreadl
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_DMA_BUFFER_CONTROL
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_safe_ddbreadl
	movl	%eax, 8(%r12)
	movl	(%r12), %ecx
	movl	4(%r12), %esi
	shrl	$11, %esi
	andl	$31, %esi
	andl	$4, %eax
	sete	%dl
	cmpl	%esi, %ecx
	jne	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%eax, %eax
	jne	LBB0_6
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_alt_dma,8,3                    ## @alt_dma
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_input_write_dvb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function input_write_dvb
_input_write_dvb:                       ; @input_write_dvb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldp	x8, x19, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w23, #0
	ldr	x24, [x8]
	b	LBB0_3
LBB0_2:
	mov	w23, #1
	mov	x24, x19
LBB0_3:
	ldp	w8, w9, [x19]
	ubfx	w10, w9, #11, #5
	ldr	w9, [x19, #8]
	ands	w11, w9, #0x4
	cset	w9, eq
	cmp	w8, w10
	ccmp	w11, #0, #0, eq
	b.eq	LBB0_11
; %bb.4:
	ldr	w10, [x1]
	ldr	x11, [x1, #24]
	ldr	x12, [x0, #24]
	ldr	x11, [x11, #8]
	and	x10, x10, #0x1
	ldr	x20, [x12]
	add	x21, x11, x10, lsl #2
Lloh0:
	adrp	x25, _alt_dma@GOTPAGE
Lloh1:
	ldr	x25, [x25, _alt_dma@GOTPAGEOFF]
	mov	x26, #-48803
	movk	x26, #44620, lsl #16
Lloh2:
	adrp	x27, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _DMA_FROM_DEVICE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	tst	w9, #0x1
	csinc	w23, w23, wzr, ne
	ldr	x9, [x25]
	cbz	x9, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20]
	ldr	x9, [x24, #32]
	ldr	w1, [x9, w8, sxtw #2]
	ldr	w2, [x24, #12]
	ldr	w3, [x27]
	bl	_dma_sync_single_for_cpu
	ldr	w8, [x19]
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x24, #24]
	ldr	w1, [x9, w8, sxtw #2]
	ldrsw	x8, [x24, #12]
	mul	x9, x8, x26
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #7
	add	w2, w9, w8, lsr #31
	mov	x0, x21
	bl	_dvb_dmx_swfilter_packets
	ldr	w8, [x19]
	add	w8, w8, #1
	ldr	w9, [x24, #16]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19]
	cbz	w23, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	w22, w8, #11
	mov	x0, x19
	bl	_DMA_BUFFER_ACK
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_ddbwritel
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_DMA_BUFFER_CURRENT
	mov	x1, x0
	mov	x0, x20
	bl	_safe_ddbreadl
	str	w0, [x19, #4]
	mov	x0, x19
	bl	_DMA_BUFFER_CONTROL
	mov	x1, x0
	mov	x0, x20
	bl	_safe_ddbreadl
	str	w0, [x19, #8]
	ldp	w8, w9, [x19]
	ubfx	w11, w9, #11, #5
	ands	w10, w0, #0x4
	cset	w9, eq
	cmp	w8, w11
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cbnz	w10, LBB0_5
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_alt_dma,8,3                    ; @alt_dma
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_input_write_dvb
.subsections_via_symbols
