	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_key_msi_tvanywhere_plus
_get_key_msi_tvanywhere_plus:           ## @get_key_msi_tvanywhere_plus
	.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	%rdi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.3:
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_SAA7134_GPIO_GPMODE3@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_SAA7134_GPIO_GPRESCAN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_saa_clearb
	movl	(%r14), %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
	testb	$64, %al
	jne	LBB0_9
## %bb.4:
	movq	(%r13), %rdi
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_master_recv
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.7:
	movb	-41(%rbp), %al
	cmpb	$-1, %al
	je	LBB0_9
## %bb.8:
	movzbl	%al, %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_input_dbg
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movb	-41(%rbp), %al
	movb	%al, (%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movl	$1, %ebx
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_ir_dbg
	jmp	LBB0_2
LBB0_5:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_ir_dbg
	testl	%r14d, %r14d
	js	LBB0_6
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r14d, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get_key_msi_tvanywhere_plus: ir->c->adapter->algo_data is NULL!\n"

	.comm	_EIO,4,2                        ## @EIO
	.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
L_.str.1:                               ## @.str.1
	.asciz	"read error\n"

L_.str.2:                               ## @.str.2
	.asciz	"get_key_msi_tvanywhere_plus: Key = 0x%02X\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_key_msi_tvanywhere_plus
_get_key_msi_tvanywhere_plus:           ; @get_key_msi_tvanywhere_plus
	.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	x22, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x23, _SAA7134_GPIO_GPMODE3@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SAA7134_GPIO_GPMODE3@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x24, _SAA7134_GPIO_GPRESCAN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SAA7134_GPIO_GPRESCAN@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_saa_clearb
	ldr	w0, [x23]
	ldr	w1, [x24]
	bl	_saa_setb
Lloh4:
	adrp	x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	asr	w0, w8, #2
	bl	_saa_readl
	tbnz	w0, #6, LBB0_6
; %bb.2:
	ldr	x0, [x22]
	add	x1, sp, #15
	mov	w2, #1
	bl	_i2c_master_recv
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.3:
	ldrb	w1, [sp, #15]
	cmp	w1, #255
	b.eq	LBB0_6
; %bb.4:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_input_dbg
Lloh9:
	adrp	x8, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x21]
	ldrb	w8, [sp, #15]
	strb	w8, [x20]
	str	xzr, [x19]
	mov	w23, #1
	b	LBB0_9
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_ir_dbg
	b	LBB0_8
LBB0_6:
	mov	w23, #0
	b	LBB0_9
LBB0_7:
	mov	x23, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_ir_dbg
	tbnz	w23, #31, LBB0_9
LBB0_8:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get_key_msi_tvanywhere_plus: ir->c->adapter->algo_data is NULL!\n"

	.comm	_EIO,4,2                        ; @EIO
	.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
l_.str.1:                               ; @.str.1
	.asciz	"read error\n"

l_.str.2:                               ; @.str.2
	.asciz	"get_key_msi_tvanywhere_plus: Key = 0x%02X\n"

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