	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_key_haup_common
_get_key_haup_common:                   ## @get_key_haup_common
	.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
	movl	%r8d, %r12d
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	(%rdi), %edi
	leaq	-46(%rbp), %rsi
	movl	%ecx, %edx
	callq	_i2c_master_recv
	cmpl	%ebx, %eax
	jne	LBB0_1
## %bb.2:
	movslq	%r12d, %rax
	movzbl	-46(%rbp,%rax), %ecx
	xorl	%ebx, %ebx
	testb	%cl, %cl
	jns	LBB0_6
## %bb.3:
	movl	%ecx, %edx
	shrl	$7, %edx
	movl	%ecx, %r8d
	shrl	$5, %r8d
	andl	$1, %r8d
	movl	%ecx, %r9d
	andl	$31, %r9d
	movzbl	-45(%rbp,%rax), %eax
	shrl	$2, %eax
	movl	%edx, %esi
	shll	$12, %esi
	movl	%r8d, %edi
	shll	$11, %edi
	orl	%esi, %edi
	movl	%r9d, %r12d
	shll	$6, %r12d
	orl	%edi, %r12d
	orl	%eax, %r12d
	cmpl	$8191, %r12d                    ## imm = 0x1FFF
	je	LBB0_6
## %bb.4:
	movl	%ecx, %esi
	andl	$30, %esi
	cmpl	$30, %esi
	jne	LBB0_6
## %bb.5:
	shrl	$6, %ecx
	andl	$1, %ecx
	movl	%ecx, %r13d
	shll	$6, %r13d
	orl	%eax, %r13d
	xorl	$64, %r13d
	movl	%r13d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	$1, %ebx
	movl	$1, %edi
	callq	_dprintk
	movl	%r13d, (%r15)
	movl	%r12d, (%r14)
	jmp	LBB0_6
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ir hauppauge (rc5): s%d r%d t%d dev=%d code=%d\n"

	.no_dead_strip	_get_key_haup_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_key_haup_common
_get_key_haup_common:                   ; @get_key_haup_common
	.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	x21, x4
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	ldr	w0, [x0]
	add	x23, sp, #10
	add	x1, sp, #10
	mov	x2, x3
	bl	_i2c_master_recv
	cmp	w0, w22
	b.ne	LBB0_4
; %bb.1:
	add	x8, x23, w21, sxtw
	ldrsb	w10, [x8]
	tbz	w10, #31, LBB0_3
; %bb.2:
	and	w9, w10, #0xff
	ubfx	w2, w10, #7, #1
	ubfx	w4, w9, #5, #1
	and	w5, w10, #0x1f
	ldrb	w8, [x8, #1]
	lsr	w8, w8, #2
	lsl	w10, w2, #12
	bfi	w10, w4, #11, #1
	bfi	w10, w5, #6, #5
	orr	w23, w10, w8
	and	w10, w9, #0x1e
	mov	w11, #8191
	cmp	w23, w11
	ccmp	w10, #30, #0, ne
	b.eq	LBB0_6
LBB0_3:
	mov	w21, #0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	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
	ret
LBB0_6:
	ubfx	w3, w9, #6, #1
	bfi	w8, w3, #6, #1
	eor	w22, w8, #0x40
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w21, #1
	mov	w0, #1
	mov	x6, x22
	bl	_dprintk
	str	w22, [x20]
	str	w23, [x19]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ir hauppauge (rc5): s%d r%d t%d dev=%d code=%d\n"

	.no_dead_strip	_get_key_haup_common
.subsections_via_symbols
