	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_enltv_handle_key
_ir_enltv_handle_key:                   ## @ir_enltv_handle_key
	.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	8(%rdi), %r15
	callq	_bttv_gpio_read
	movl	%eax, %r12d
	movl	12(%r15), %esi
	movl	%eax, %edi
	callq	_ir_extract_bits
	movl	%eax, %r14d
	movl	(%r15), %r13d
	movl	4(%r15), %eax
	xorl	%ebx, %ebx
	testl	%r12d, %r13d
	setne	%bl
	shll	$31, %ebx
	movl	%eax, %ecx
	andl	$127, %ecx
	cmpl	%r14d, %ecx
	jne	LBB0_1
## %bb.3:
	andl	$-2147483648, %eax              ## imm = 0x80000000
	movslq	%ebx, %rcx
	cmpq	%rcx, %rax
	je	LBB0_8
## %bb.4:
	testl	%r12d, %r13d
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_dprintk
	movl	8(%r15), %edi
	testl	%r12d, %r13d
	je	LBB0_6
## %bb.5:
	callq	_rc_keyup
	jmp	LBB0_7
LBB0_1:
	testl	%r12d, %r13d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_dprintk
	movl	8(%r15), %edi
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_rc_keydown_notimeout
	testl	%r12d, %r13d
	je	LBB0_7
## %bb.2:
	movl	8(%r15), %edi
	callq	_rc_keyup
	jmp	LBB0_7
LBB0_6:
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_rc_keydown_notimeout
LBB0_7:
	orl	%r14d, %ebx
	movl	%ebx, 4(%r15)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio=0x%x code=%d | %s\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"up/down"

	.comm	_RC_PROTO_UNKNOWN,4,2           ## @RC_PROTO_UNKNOWN
L_.str.3:                               ## @.str.3
	.asciz	"(cnt) gpio=0x%x code=%d | %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"down"

	.no_dead_strip	_ir_enltv_handle_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_enltv_handle_key
_ir_enltv_handle_key:                   ; @ir_enltv_handle_key
	.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
	ldr	x21, [x0, #8]
	bl	_bttv_gpio_read
	mov	x20, x0
	ldr	w1, [x21, #12]
	bl	_ir_extract_bits
	mov	x19, x0
	ldp	w9, w8, [x21]
	ands	w23, w9, w20
	cset	w9, ne
	lsl	w22, w9, #31
	and	w9, w8, #0x7f
	cmp	w9, w0
	b.ne	LBB0_4
; %bb.1:
	and	x8, x8, #0x80000000
	cmp	x8, w22, sxtw
	b.eq	LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.4@PAGE
Lloh3:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	w23, #0
	csel	x3, x9, x8, eq
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_dprintk
	ldr	w0, [x21, #8]
	cbz	w23, LBB0_6
; %bb.3:
	bl	_rc_keyup
	b	LBB0_7
LBB0_4:
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
	cmp	w23, #0
	csel	x3, x9, x8, eq
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_dprintk
	ldr	w0, [x21, #8]
Lloh12:
	adrp	x8, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x2, x19
	mov	w3, #0
	bl	_rc_keydown_notimeout
	cbz	w23, LBB0_7
; %bb.5:
	ldr	w0, [x21, #8]
	bl	_rc_keyup
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x2, x19
	mov	w3, #0
	bl	_rc_keydown_notimeout
LBB0_7:
	orr	w8, w22, w19
	str	w8, [x21, #4]
LBB0_8:
	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	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio=0x%x code=%d | %s\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"up/down"

	.comm	_RC_PROTO_UNKNOWN,4,2           ; @RC_PROTO_UNKNOWN
l_.str.3:                               ; @.str.3
	.asciz	"(cnt) gpio=0x%x code=%d | %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"down"

	.no_dead_strip	_ir_enltv_handle_key
.subsections_via_symbols
