	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_rc5_irq
_bttv_rc5_irq:                          ## @bttv_rc5_irq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	callq	_bttv_gpio_read
	movl	%eax, %r13d
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %esi
	movl	%eax, %edi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_us
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	$200000, %r14d                  ## imm = 0x30D40
	cmovlel	%eax, %r14d
	testb	$32, %r13b
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_dprintk
	xorl	%eax, %eax
	testb	$32, %r13b
	je	LBB0_6
## %bb.1:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpl	$0, (%rsi)
	je	LBB0_4
## %bb.2:
	cmpl	$27, 4(%rsi)
	jg	LBB0_5
## %bb.3:
	movq	_ir_rc5_remote_gap@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	subl	%eax, %r14d
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%eax, 4(%rsi)
	orl	%edx, 8(%rsi)
	jmp	LBB0_5
LBB0_4:
	movq	$1, (%rsi)
	movl	$0, 8(%rsi)
	movl	%r15d, 16(%rsi)
	addq	$12, %rsi
	movq	%rsi, %r14
	movl	$30, %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rsi
	addq	%rax, %rsi
	movq	%r14, %rdi
	callq	_mod_timer
LBB0_5:
	movl	%r13d, %esi
	andl	$-17, %esi
	movq	%r12, %rdi
	callq	_bttv_gpio_write
	orl	$16, %r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_bttv_gpio_write
	movl	$1, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RC5 IRQ: gap %d us for %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"mark"

L_.str.2:                               ## @.str.2
	.asciz	"space"

	.comm	_ir_rc5_remote_gap,4,2          ## @ir_rc5_remote_gap
	.no_dead_strip	_bttv_rc5_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function bttv_rc5_irq
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bttv_rc5_irq:                          ; @bttv_rc5_irq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x23, [x0, #8]
	bl	_bttv_gpio_read
	mov	x20, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	bl	_ktime_get
	mov	x21, x0
	ldr	w1, [x23, #16]
	bl	_ktime_sub
	bl	_ktime_to_us
Lloh3:
	adrp	x8, _USEC_PER_SEC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USEC_PER_SEC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #3392
	movk	w9, #3, lsl #16
	cmp	w0, w8
	csel	w22, w9, w0, gt
Lloh6:
	adrp	x8, l_.str.1@PAGE
Lloh7:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	tst	w20, #0x20
	csel	x2, x9, x8, eq
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_dprintk
	tbnz	w20, #5, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	ldr	w8, [x23]
	cbz	w8, LBB0_5
; %bb.3:
	ldr	w8, [x23, #4]
	cmp	w8, #27
	b.gt	LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _ir_rc5_remote_gap@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ir_rc5_remote_gap@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w9, w8, lt
	sub	w9, w22, w9, asr #1
	sdiv	w8, w9, w8
	mov	w9, #1
	lsl	w9, w9, w8
	ldr	w10, [x23, #8]
	orr	w9, w10, w9
	stp	w8, w9, [x23, #4]
	b	LBB0_6
LBB0_5:
	str	wzr, [x23, #8]
	str	w21, [x23, #16]
Lloh15:
	adrp	x8, lCPI0_0@PAGE
Lloh16:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x23]
	add	x21, x23, #12
	mov	w0, #30
	bl	_msecs_to_jiffies
	add	x1, x0, x24
	mov	x0, x21
	bl	_mod_timer
LBB0_6:
	and	w1, w20, #0xffffffef
	mov	x0, x19
	bl	_bttv_gpio_write
	orr	w1, w20, #0x10
	mov	x0, x19
	bl	_bttv_gpio_write
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdr	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RC5 IRQ: gap %d us for %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"mark"

l_.str.2:                               ; @.str.2
	.asciz	"space"

	.comm	_ir_rc5_remote_gap,4,2          ; @ir_rc5_remote_gap
	.no_dead_strip	_bttv_rc5_irq
.subsections_via_symbols
