	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_key_knc1
_get_key_knc1:                          ## @get_key_knc1
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_master_recv
	movq	(%rbx), %rdi
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.3:
	movzbl	-41(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_dev_dbg
	movb	-41(%rbp), %al
	cmpb	$-1, %al
	je	LBB0_7
## %bb.4:
	cmpb	$-2, %al
	je	LBB0_6
## %bb.5:
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r12)
	movb	%al, (%r15)
	movq	$0, (%r14)
LBB0_6:
	movl	$1, %r13d
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
	testl	%r13d, %r13d
	js	LBB0_7
## %bb.2:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %r13d
LBB0_7:
	movl	%r13d, %eax
	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	"read error\n"

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

	.comm	_RC_PROTO_UNKNOWN,4,2           ## @RC_PROTO_UNKNOWN
	.no_dead_strip	_get_key_knc1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_key_knc1
_get_key_knc1:                          ; @get_key_knc1
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	ldr	w0, [x0, #8]
	add	x1, sp, #15
	mov	w2, #1
	bl	_i2c_master_recv
	mov	x22, x0
	ldr	x0, [x23]
	cmp	w22, #1
	b.ne	LBB0_5
; %bb.1:
	ldrb	w8, [sp, #15]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldrb	w8, [sp, #15]
	cmp	w8, #255
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #254
	b.eq	LBB0_4
; %bb.3:
Lloh2:
	adrp	x9, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	w9, [x21]
	strb	w8, [x20]
	str	xzr, [x19]
LBB0_4:
	mov	w22, #1
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	tbnz	w22, #31, LBB0_8
; %bb.6:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_8
LBB0_7:
	mov	w22, #0
LBB0_8:
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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	"key %02x\n"

	.comm	_RC_PROTO_UNKNOWN,4,2           ; @RC_PROTO_UNKNOWN
	.no_dead_strip	_get_key_knc1
.subsections_via_symbols
