	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_key_pinnacle
_get_key_pinnacle:                      ## @get_key_pinnacle
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	leaq	-44(%rbp), %rsi
	movl	$4, %edx
	callq	_i2c_master_recv
	cmpl	$4, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	leaq	-44(%rbp), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	incl	%r14d
	cmpq	%rax, %r13
	jae	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	-44(%rbp,%r13), %eax
	cmpl	%ebx, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r14), %eax
	andl	$3, %eax
	movzbl	-44(%rbp,%rax), %r12d
	movl	%r14d, %eax
	andl	$3, %eax
	movzbl	-44(%rbp,%rax), %r15d
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_i2cdprintk
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_8:
	xorl	%r14d, %r14d
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	%r15d, (%rax)
	je	LBB0_13
## %bb.10:
	movl	%r15d, (%rax)
	cmpl	$254, %ebx
	jne	LBB0_12
## %bb.11:
	movl	%r12d, %ecx
	andl	$64, %ecx
	jne	LBB0_13
LBB0_12:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	-48(%rbp)                       ## 4-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%edx, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%edx, (%rax)
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	xorl	%eax, %eax
	callq	_i2cdprintk
	movl	$1, %r14d
	jmp	LBB0_13
LBB0_2:
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$40, %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	"read error\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Pinnacle PCTV key %02x\n"

	.no_dead_strip	_get_key_pinnacle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_key_pinnacle
_get_key_pinnacle:                      ; @get_key_pinnacle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x22, x4
	mov	x24, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	ldr	w0, [x0, #4]
	add	x1, sp, #12
	mov	w2, #4
	bl	_i2c_master_recv
	cmp	w0, #4
	b.ne	LBB0_6
; %bb.1:
	add	x26, sp, #12
	add	x0, sp, #12
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_12
; %bb.2:
	mov	x27, #0
	mov	w25, #0
	mov	w28, #0
	mov	w24, w24
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	add	x0, sp, #12
	bl	_ARRAY_SIZE
	cmp	x27, w0, uxtw
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x26, x27]
	cmp	w8, w22
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x24, x27
	add	w9, w8, #1
	and	x9, x9, #0x3
	ldrb	w25, [x26, x9]
	and	x8, x8, #0x3
	ldrb	w28, [x26, x8]
	b	LBB0_3
LBB0_6:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_i2cdprintk
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_7:
	cbz	w28, LBB0_11
; %bb.8:
	ldr	w8, [x23]
	cmp	w8, w28
	b.eq	LBB0_11
; %bb.9:
	str	w28, [x23]
	cmp	w22, #254
	b.ne	LBB0_13
; %bb.10:
	tbz	w25, #6, LBB0_13
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	udiv	w8, w25, w19
	msub	w8, w8, w19, w25
	str	w8, [x21]
	str	w8, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_i2cdprintk
	mov	w0, #1
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read error\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Pinnacle PCTV key %02x\n"

	.no_dead_strip	_get_key_pinnacle
.subsections_via_symbols
