	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_key
_build_key:                             ## @build_key
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	cmpl	$129, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	_SAA7134_GPIO_GPSTATUS1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	$128, %esi
	callq	_saa_setb
	movl	(%rbx), %edi
	movl	$128, %esi
	callq	_saa_clearb
LBB0_2:
	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
	movl	%eax, %ebx
	cmpq	$0, 24(%r12)
	je	LBB0_5
## %bb.3:
	cmpl	%ebx, (%r12)
	je	LBB0_19
## %bb.4:
	movl	%ebx, (%r12)
LBB0_5:
	movl	4(%r12), %esi
	movl	%ebx, %edi
	callq	_ir_extract_bits
	movl	%eax, %r14d
	movl	4(%r12), %edx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_dprintk
	cmpl	$128, (%r15)
	jne	LBB0_8
## %bb.6:
	movl	16(%r12), %edi
	cmpl	4(%r12), %r14d
	jne	LBB0_7
	jmp	LBB0_18
LBB0_8:
	movl	8(%r12), %eax
	testl	%eax, %eax
	sete	%cl
	testl	%ebx, %eax
	sete	%al
	orb	%cl, %al
	cmpq	$0, 24(%r12)
	je	LBB0_13
## %bb.9:
	testb	%al, %al
	je	LBB0_12
## %bb.10:
	movl	12(%r12), %eax
	testl	%eax, %eax
	je	LBB0_17
## %bb.11:
	andl	%ebx, %eax
	jne	LBB0_17
LBB0_12:
	movl	16(%r12), %edi
LBB0_7:
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_rc_keydown_notimeout
	jmp	LBB0_19
LBB0_13:
	testb	%al, %al
	je	LBB0_16
## %bb.14:
	movl	12(%r12), %eax
	testl	%eax, %eax
	je	LBB0_19
## %bb.15:
	andl	%ebx, %eax
	jne	LBB0_19
LBB0_16:
	movl	16(%r12), %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_rc_keydown_notimeout
LBB0_17:
	movl	16(%r12), %edi
LBB0_18:
	callq	_rc_keyup
LBB0_19:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7134_GPIO_GPSTATUS1,4,2     ## @SAA7134_GPIO_GPSTATUS1
	.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	"build_key gpio=0x%x mask=0x%x data=%d\n"

	.no_dead_strip	_build_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_key
_build_key:                             ; @build_key
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w8, [x0]
	cmp	w8, #129
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x20, _SAA7134_GPIO_GPSTATUS1@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SAA7134_GPIO_GPSTATUS1@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #128
	bl	_saa_setb
	ldr	w0, [x20]
	mov	w1, #128
	bl	_saa_clearb
LBB0_2:
Lloh2:
	adrp	x20, _SAA7134_GPIO_GPMODE3@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SAA7134_GPIO_GPMODE3@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x21, _SAA7134_GPIO_GPRESCAN@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SAA7134_GPIO_GPRESCAN@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_saa_clearb
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_saa_setb
Lloh6:
	adrp	x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	asr	w0, w8, #2
	bl	_saa_readl
	mov	x21, x0
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w8, [x22]
	cmp	w8, w21
	b.eq	LBB0_19
; %bb.4:
	str	w21, [x22]
LBB0_5:
	ldr	w1, [x22, #4]
	mov	x0, x21
	bl	_ir_extract_bits
	mov	x20, x0
	ldr	w2, [x22, #4]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x3, x20
	bl	_dprintk
	ldr	w8, [x19]
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x22, #4]
	ldr	w0, [x22, #16]
	cmp	w20, w8
	b.ne	LBB0_12
	b	LBB0_18
LBB0_7:
	ldr	x9, [x22, #24]
	ldr	w8, [x22, #8]
	tst	w8, w21
	ccmp	w8, #0, #4, ne
	cset	w8, eq
	cbz	x9, LBB0_13
; %bb.8:
	cbz	w8, LBB0_11
; %bb.9:
	ldr	w8, [x22, #12]
	cbz	w8, LBB0_17
; %bb.10:
	and	w8, w8, w21
	cbnz	w8, LBB0_17
LBB0_11:
	ldr	w0, [x22, #16]
LBB0_12:
	mov	x1, x20
	mov	w2, #0
	bl	_rc_keydown_notimeout
	b	LBB0_19
LBB0_13:
	cbz	w8, LBB0_16
; %bb.14:
	ldr	w8, [x22, #12]
	cbz	w8, LBB0_19
; %bb.15:
	and	w8, w8, w21
	cbnz	w8, LBB0_19
LBB0_16:
	ldr	w0, [x22, #16]
	mov	x1, x20
	mov	w2, #0
	bl	_rc_keydown_notimeout
LBB0_17:
	ldr	w0, [x22, #16]
LBB0_18:
	bl	_rc_keyup
LBB0_19:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7134_GPIO_GPSTATUS1,4,2     ; @SAA7134_GPIO_GPSTATUS1
	.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	"build_key gpio=0x%x mask=0x%x data=%d\n"

	.no_dead_strip	_build_key
.subsections_via_symbols
