	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_get_key_em_haup
_em28xx_get_key_em_haup:                ## @em28xx_get_key_em_haup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	leaq	-18(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_master_recv
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.2:
	movb	-17(%rbp), %al
	cmpb	$-1, %al
	je	LBB0_3
## %bb.4:
	movq	_RC_PROTO_RC5@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
	movzbl	%al, %edi
	callq	_bitrev8
	movl	%eax, %ebx
	andl	$31, %ebx
	shll	$8, %ebx
	movzbl	-18(%rbp), %edi
	callq	_bitrev8
	sarl	$2, %eax
	orl	%ebx, %eax
	movl	%eax, (%r14)
	movl	$1, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_RC_PROTO_RC5,4,2               ## @RC_PROTO_RC5
	.no_dead_strip	_em28xx_get_key_em_haup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_get_key_em_haup
_em28xx_get_key_em_haup:                ; @em28xx_get_key_em_haup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	add	x1, sp, #14
	mov	w2, #2
	bl	_i2c_master_recv
	cmp	w0, #2
	b.ne	LBB0_3
; %bb.1:
	ldrb	w0, [sp, #15]
	cmp	w0, #255
	b.eq	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _RC_PROTO_RC5@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_PROTO_RC5@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20]
	bl	_bitrev8
	ubfiz	w20, w0, #8, #5
	ldrb	w0, [sp, #14]
	bl	_bitrev8
	orr	w8, w20, w0, asr #2
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_RC_PROTO_RC5,4,2               ; @RC_PROTO_RC5
	.no_dead_strip	_em28xx_get_key_em_haup
.subsections_via_symbols
