	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_key_beholdm6xx
_get_key_beholdm6xx:                    ## @get_key_beholdm6xx
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SAA7134_GPIO_GPMODE3@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_SAA7134_GPIO_GPRESCAN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_saa_clearb
	movl	(%r13), %edi
	movl	(%rbx), %esi
	callq	_saa_setb
	movq	_SAA7134_GPIO_GPSTATUS0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	sarl	$2, %edi
	callq	_saa_readl
	xorl	%ebx, %ebx
	testl	$4194304, %eax                  ## imm = 0x400000
	je	LBB0_5
## %bb.1:
	movq	(%r12), %rdi
	movl	$45, (%rdi)
	leaq	-60(%rbp), %rsi
	movl	$12, %edx
	callq	_i2c_master_recv
	cmpl	$12, %eax
	jne	LBB0_2
## %bb.3:
	movzbl	-51(%rbp), %eax
	movb	-52(%rbp), %cl
	notb	%cl
	cmpb	%cl, %al
	jne	LBB0_5
## %bb.4:
	movzbl	-50(%rbp), %ecx
	shll	$16, %ecx
	movzbl	-49(%rbp), %edx
	shll	$8, %edx
	orl	%eax, %ecx
	orl	%edx, %ecx
	movl	%ecx, (%r14)
	movl	%ecx, (%r15)
	movl	$1, %ebx
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_i2cdprintk
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7134_GPIO_GPMODE3,4,2       ## @SAA7134_GPIO_GPMODE3
	.comm	_SAA7134_GPIO_GPRESCAN,4,2      ## @SAA7134_GPIO_GPRESCAN
	.comm	_SAA7134_GPIO_GPSTATUS0,4,2     ## @SAA7134_GPIO_GPSTATUS0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read error\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_get_key_beholdm6xx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_key_beholdm6xx
_get_key_beholdm6xx:                    ; @get_key_beholdm6xx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x22, _SAA7134_GPIO_GPMODE3@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SAA7134_GPIO_GPMODE3@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh5:
	adrp	x23, _SAA7134_GPIO_GPRESCAN@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SAA7134_GPIO_GPRESCAN@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_saa_clearb
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_saa_setb
Lloh7:
	adrp	x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	asr	w0, w8, #2
	bl	_saa_readl
	tbz	w0, #22, LBB0_4
; %bb.1:
	ldr	x0, [x21]
	mov	w8, #45
	str	w8, [x0]
	add	x1, sp, #12
	mov	w2, #12
	bl	_i2c_master_recv
	cmp	w0, #12
	b.ne	LBB0_5
; %bb.2:
	ldrb	w8, [sp, #21]
	ldrb	w9, [sp, #20]
	eor	w9, w9, #0xff
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	ldrb	w9, [sp, #22]
	ldrb	w10, [sp, #23]
	bfi	w8, w9, #16, #8
	bfi	w8, w10, #8, #8
	str	w8, [x20]
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_i2cdprintk
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7134_GPIO_GPMODE3,4,2       ; @SAA7134_GPIO_GPMODE3
	.comm	_SAA7134_GPIO_GPRESCAN,4,2      ; @SAA7134_GPIO_GPRESCAN
	.comm	_SAA7134_GPIO_GPSTATUS0,4,2     ; @SAA7134_GPIO_GPSTATUS0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read error\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_get_key_beholdm6xx
.subsections_via_symbols
