	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx25840_ir_rx_s_parameters
_cx25840_ir_rx_s_parameters:            ## @cx25840_ir_rx_s_parameters
	.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	%rsi, %rbx
	movq	%rdi, %r15
	callq	_to_ir_state
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpq	$0, 72(%rbx)
	je	LBB0_4
## %bb.15:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cx25840_ir_rx_shutdown         ## TAILCALL
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_V4L2_SUBDEV_IR_MODE_PULSE_WIDTH@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_5
## %bb.6:
	movq	104(%r14), %r12
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	72(%rbx), %rax
	movq	%rax, 96(%r14)
	movq	(%r13), %rax
	movq	%rax, (%rbx)
	movq	%rax, 24(%r14)
	movl	$4, 8(%rbx)
	movl	$4, 32(%r14)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_irqenable_rx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_control_rx_enable
	movl	68(%rbx), %esi
	movq	%r12, %rdi
	callq	_control_rx_demodulation_enable
	movl	68(%rbx), %eax
	movl	%eax, 92(%r14)
	cmpl	$0, 68(%rbx)
	je	LBB0_8
## %bb.7:
	movl	64(%rbx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_rxclk_rx_s_carrier
	movl	%eax, 64(%rbx)
	movl	%eax, 88(%r14)
	movl	$50, 12(%rbx)
	movl	$50, 36(%r14)
	movl	64(%rbx), %esi
	leaq	60(%rbx), %rdx
	leaq	56(%rbx), %rcx
	movq	%r12, %rdi
	callq	_control_rx_s_carrier_window
	movl	60(%rbx), %eax
	movl	%eax, 84(%r14)
	movl	56(%rbx), %eax
	movl	%eax, 80(%r14)
	movq	_FIFO_RXTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_pulse_width_count_to_ns
	jmp	LBB0_9
LBB0_5:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	48(%rbx), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_rxclk_rx_s_max_pulse_width
LBB0_9:
	movq	%rax, 48(%rbx)
	movq	%rax, 72(%r14)
	leaq	16(%r14), %rdi
	movl	-44(%rbp), %esi
	callq	_atomic_set
	movl	40(%rbx), %esi
	movq	%r12, %rdi
	callq	_filter_rx_s_min_width
	movl	%eax, 40(%rbx)
	movl	%eax, 64(%r14)
	movl	-44(%rbp), %edi
	callq	_clock_divider_to_resolution
	movl	%eax, 36(%rbx)
	movl	%eax, 60(%r14)
	movq	_RX_FIFO_HALF_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_control_rx_irq_watermark
	movq	_CNTRL_EDG_BOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_control_rx_s_edge_detection
	movl	32(%rbx), %eax
	movl	%eax, 56(%r14)
	leaq	12(%r14), %rdi
	movl	32(%rbx), %esi
	callq	_atomic_set
	movq	24(%rbx), %rax
	movq	%rax, 48(%r14)
	movl	16(%rbx), %eax
	movl	%eax, 40(%r14)
	cmpl	$0, 16(%rbx)
	je	LBB0_13
## %bb.10:
	leaq	4(%r14), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	addq	$8, %rdi
	callq	_kfifo_reset
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	cmpq	$0, 24(%rbx)
	je	LBB0_12
## %bb.11:
	movq	_IRQEN_RSE@GOTPCREL(%rip), %rax
	movq	_IRQEN_RTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_IRQEN_ROE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_irqenable_rx
LBB0_12:
	movl	16(%rbx), %esi
	movq	%r12, %rdi
	callq	_control_rx_enable
LBB0_13:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_V4L2_SUBDEV_IR_MODE_PULSE_WIDTH,8,3 ## @V4L2_SUBDEV_IR_MODE_PULSE_WIDTH
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_FIFO_RXTX,4,2                  ## @FIFO_RXTX
	.comm	_RX_FIFO_HALF_FULL,4,2          ## @RX_FIFO_HALF_FULL
	.comm	_CNTRL_EDG_BOTH,4,2             ## @CNTRL_EDG_BOTH
	.comm	_IRQEN_RSE,4,2                  ## @IRQEN_RSE
	.comm	_IRQEN_RTE,4,2                  ## @IRQEN_RTE
	.comm	_IRQEN_ROE,4,2                  ## @IRQEN_ROE
	.no_dead_strip	_cx25840_ir_rx_s_parameters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx25840_ir_rx_s_parameters
_cx25840_ir_rx_s_parameters:            ; @cx25840_ir_rx_s_parameters
	.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
	mov	x20, x1
	mov	x21, x0
	bl	_to_ir_state
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x20, #72]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x21
	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
	b	_cx25840_ir_rx_shutdown
LBB0_3:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	x8, [x20]
Lloh2:
	adrp	x23, _V4L2_SUBDEV_IR_MODE_PULSE_WIDTH@GOTPAGE
Lloh3:
	ldr	x23, [x23, _V4L2_SUBDEV_IR_MODE_PULSE_WIDTH@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	x19, x0
	ldr	x22, [x0, #104]
	bl	_mutex_lock
	ldr	x8, [x20, #72]
	str	x8, [x19, #96]
	ldr	x8, [x23]
	str	x8, [x20]
	str	x8, [x19, #24]
	mov	w8, #4
	str	w8, [x20, #8]
	str	w8, [x19, #32]
	mov	x0, x21
	mov	w1, #0
	bl	_irqenable_rx
	mov	x0, x22
	mov	w1, #0
	bl	_control_rx_enable
	ldr	w1, [x20, #68]
	mov	x0, x22
	bl	_control_rx_demodulation_enable
	ldr	w8, [x20, #68]
	str	w8, [x19, #92]
	ldr	w8, [x20, #68]
	cbz	w8, LBB0_10
; %bb.6:
	ldr	w1, [x20, #64]
	add	x2, sp, #12
	mov	x0, x22
	bl	_rxclk_rx_s_carrier
	str	w0, [x20, #64]
	str	w0, [x19, #88]
	mov	w8, #50
	str	w8, [x20, #12]
	str	w8, [x19, #36]
	ldr	w1, [x20, #64]
	add	x2, x20, #60
	add	x3, x20, #56
	mov	x0, x22
	bl	_control_rx_s_carrier_window
	ldr	d0, [x20, #56]
	str	d0, [x19, #80]
Lloh4:
	adrp	x8, _FIFO_RXTX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FIFO_RXTX@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [sp, #12]
	bl	_pulse_width_count_to_ns
	b	LBB0_11
LBB0_7:
Lloh7:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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_10:
	ldr	x1, [x20, #48]
	add	x2, sp, #12
	mov	x0, x22
	bl	_rxclk_rx_s_max_pulse_width
LBB0_11:
	str	x0, [x20, #48]
	str	x0, [x19, #72]
	add	x0, x19, #16
	ldr	w1, [sp, #12]
	bl	_atomic_set
	ldr	w1, [x20, #40]
	mov	x0, x22
	bl	_filter_rx_s_min_width
	str	w0, [x20, #40]
	str	w0, [x19, #64]
	ldr	w0, [sp, #12]
	bl	_clock_divider_to_resolution
	str	w0, [x20, #36]
	str	w0, [x19, #60]
Lloh9:
	adrp	x8, _RX_FIFO_HALF_FULL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RX_FIFO_HALF_FULL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_control_rx_irq_watermark
Lloh12:
	adrp	x8, _CNTRL_EDG_BOTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CNTRL_EDG_BOTH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_control_rx_s_edge_detection
	ldr	w8, [x20, #32]
	str	w8, [x19, #56]
	add	x0, x19, #12
	ldr	w1, [x20, #32]
	bl	_atomic_set
	ldr	x8, [x20, #24]
	str	x8, [x19, #48]
	ldr	w8, [x20, #16]
	str	w8, [x19, #40]
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_15
; %bb.12:
	add	x23, x19, #4
	mov	x0, x23
	bl	_spin_lock_irqsave
	add	x0, x19, #8
	bl	_kfifo_reset
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_14
; %bb.13:
Lloh15:
	adrp	x8, _IRQEN_RSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQEN_RSE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _IRQEN_RTE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IRQEN_RTE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _IRQEN_ROE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IRQEN_ROE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x21
	bl	_irqenable_rx
LBB0_14:
	ldr	w1, [x20, #16]
	mov	x0, x22
	bl	_control_rx_enable
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_V4L2_SUBDEV_IR_MODE_PULSE_WIDTH,8,3 ; @V4L2_SUBDEV_IR_MODE_PULSE_WIDTH
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_FIFO_RXTX,4,2                  ; @FIFO_RXTX
	.comm	_RX_FIFO_HALF_FULL,4,2          ; @RX_FIFO_HALF_FULL
	.comm	_CNTRL_EDG_BOTH,4,2             ; @CNTRL_EDG_BOTH
	.comm	_IRQEN_RSE,4,2                  ; @IRQEN_RSE
	.comm	_IRQEN_RTE,4,2                  ; @IRQEN_RTE
	.comm	_IRQEN_ROE,4,2                  ; @IRQEN_ROE
	.no_dead_strip	_cx25840_ir_rx_s_parameters
.subsections_via_symbols
