	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cxd2880_ts_read
_cxd2880_ts_read:                       ## @cxd2880_ts_read
	.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
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_cxd2880_spi_clear_ts_buffer
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
LBB0_18:
	callq	_pr_err
	jmp	LBB0_19
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_19
LBB0_4:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testl	%eax, %eax
	je	LBB0_5
LBB0_19:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	4(%r12), %r14
	movq	_MAX_TRANS_PKT@GOTPCREL(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testl	%eax, %eax
	jne	LBB0_19
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	8(%r12), %edi
	leaq	-48(%rbp), %rsi
	callq	_cxd2880_spi_read_ts_buffer_info
	testl	%eax, %eax
	jne	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	-48(%rbp), %eax
	movl	(%r15), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cltd
	idivl	%ecx
	testl	%eax, %eax
	jle	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %esi
	movl	8(%r12), %edi
	movl	%ecx, %edx
	callq	_cxd2880_spi_read_ts
	movl	(%r12), %esi
	imull	$188, (%r15), %edx
	movq	%r14, %rdi
	callq	_dvb_dmx_swfilter
	incl	%ebx
	movl	-48(%rbp), %eax
	movl	(%r15), %ecx
	cltd
	idivl	%ecx
	cmpl	%eax, %ebx
	jl	LBB0_12
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%eax, %eax
	jle	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ms
	cmpl	$500, %eax                      ## imm = 0x1F4
	jl	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %esi
	movl	8(%r12), %edi
	movl	-48(%rbp), %edx
	callq	_cxd2880_spi_read_ts
	movl	(%r12), %esi
	imull	$188, -48(%rbp), %edx
	movq	%r14, %rdi
	callq	_dvb_dmx_swfilter
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %ebx
	jmp	LBB0_7
LBB0_17:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid arg\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"set_clear_ts_buffer failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"spi_read_ts_buffer_info error\n"

	.comm	_MAX_TRANS_PKT,4,2              ## @MAX_TRANS_PKT
	.no_dead_strip	_cxd2880_ts_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cxd2880_ts_read
_cxd2880_ts_read:                       ; @cxd2880_ts_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_cxd2880_spi_clear_ts_buffer
	cbz	w0, LBB0_5
; %bb.2:
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_3:
	bl	_pr_err
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_5:
	bl	_ktime_get
	mov	x21, x0
	bl	_kthread_should_stop
	cbz	w0, LBB0_8
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	add	x20, x19, #4
Lloh7:
	adrp	x23, _MAX_TRANS_PKT@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MAX_TRANS_PKT@GOTPAGEOFF]
	mov	w24, #188
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	bl	_kthread_should_stop
	cbnz	w0, LBB0_6
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_cxd2880_spi_read_ts_buffer_info
	cbnz	w0, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [sp, #8]
	ldr	w2, [x23]
	cmp	w8, w2
	b.le	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	sdiv	w8, w8, w2
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w21, #0
LBB0_14:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x19, #8]
	ldr	w1, [x19]
	bl	_cxd2880_spi_read_ts
	ldr	w1, [x19]
	ldr	w8, [x23]
	mul	w2, w8, w24
	mov	x0, x20
	bl	_dvb_dmx_swfilter
	add	w21, w21, #1
	ldr	w8, [sp, #8]
	ldr	w2, [x23]
	sdiv	w8, w8, w2
	cmp	w21, w8
	b.lt	LBB0_14
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_ktime_get
	mov	x1, x21
	bl	_ktime_sub
	bl	_ktime_to_ms
	cmp	w0, #500
	b.lt	LBB0_9
; %bb.17:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x19, #8]
	ldr	w1, [x19]
	ldr	w2, [sp, #8]
	bl	_cxd2880_spi_read_ts
	ldr	w1, [x19]
	ldr	w8, [sp, #8]
	mul	w2, w8, w24
	mov	x0, x20
	bl	_dvb_dmx_swfilter
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	bl	_ktime_get
	mov	x21, x0
	bl	_kthread_should_stop
	cbz	w0, LBB0_10
	b	LBB0_6
LBB0_19:
	mov	x22, x0
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid arg\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"set_clear_ts_buffer failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"spi_read_ts_buffer_info error\n"

	.comm	_MAX_TRANS_PKT,4,2              ; @MAX_TRANS_PKT
	.no_dead_strip	_cxd2880_ts_read
.subsections_via_symbols
