	.file	"extr_saa7134-input.c_build_key.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"build_key gpio=0x%x mask=0x%x data=%d\n"
	.text
	.p2align 4
	.type	build_key, @function
build_key:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	DWORD PTR [rdi], 129
	mov	rbx, QWORD PTR 8[rdi]
	je	.L33
.L2:
	mov	esi, DWORD PTR SAA7134_GPIO_GPRESCAN[rip]
	mov	edi, DWORD PTR SAA7134_GPIO_GPMODE3[rip]
	call	saa_clearb@PLT
	mov	esi, DWORD PTR SAA7134_GPIO_GPRESCAN[rip]
	mov	edi, DWORD PTR SAA7134_GPIO_GPMODE3[rip]
	call	saa_setb@PLT
	mov	edi, DWORD PTR SAA7134_GPIO_GPSTATUS0[rip]
	sar	edi, 2
	call	saa_readl@PLT
	cmp	QWORD PTR 24[rbx], 0
	mov	ebp, eax
	je	.L3
	cmp	DWORD PTR [rbx], eax
	je	.L5
	mov	DWORD PTR [rbx], eax
.L3:
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, ebp
	call	ir_extract_bits@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, ebp
	lea	rdi, .LC0[rip]
	mov	ecx, eax
	mov	r13d, eax
	call	input_dbg@PLT
	cmp	DWORD PTR [r12], 128
	je	.L34
	cmp	QWORD PTR 24[rbx], 0
	mov	eax, DWORD PTR 8[rbx]
	je	.L8
	test	eax, eax
	je	.L9
	test	ebp, eax
	jne	.L10
.L9:
	mov	eax, DWORD PTR 12[rbx]
	test	eax, eax
	je	.L29
	test	eax, ebp
	jne	.L29
.L10:
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RC_PROTO_UNKNOWN[rip]
	xor	ecx, ecx
	mov	edx, r13d
	call	rc_keydown_notimeout@PLT
.L5:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	test	eax, eax
	je	.L12
	test	ebp, eax
	je	.L12
.L13:
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR RC_PROTO_UNKNOWN[rip]
	xor	ecx, ecx
	mov	edx, r13d
	call	rc_keydown_notimeout@PLT
.L29:
	mov	edi, DWORD PTR 16[rbx]
.L28:
	call	rc_keyup@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	eax, DWORD PTR 12[rbx]
	test	eax, eax
	je	.L5
	test	eax, ebp
	jne	.L5
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L34:
	mov	edi, DWORD PTR 16[rbx]
	cmp	DWORD PTR 4[rbx], r13d
	je	.L28
	mov	esi, DWORD PTR RC_PROTO_UNKNOWN[rip]
	xor	ecx, ecx
	mov	edx, r13d
	call	rc_keydown_notimeout@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edi, DWORD PTR SAA7134_GPIO_GPSTATUS1[rip]
	mov	esi, 128
	call	saa_setb@PLT
	mov	edi, DWORD PTR SAA7134_GPIO_GPSTATUS1[rip]
	mov	esi, 128
	call	saa_clearb@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	build_key, .-build_key
	.comm	SAA7134_GPIO_GPSTATUS1,4,4
	.comm	SAA7134_GPIO_GPSTATUS0,4,4
	.comm	SAA7134_GPIO_GPRESCAN,4,4
	.comm	SAA7134_GPIO_GPMODE3,4,4
	.comm	RC_PROTO_UNKNOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_saa7134-input.c_build_key.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"build_key gpio=0x%x mask=0x%x data=%d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_key, %function
build_key:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldm	r0, {r3, r4}
	cmp	r3, #129
	mov	r7, r0
	beq	.L34
.L2:
	ldr	r5, .L36
	ldr	r6, .L36+4
	ldr	r0, [r5]
	ldr	r1, [r6]
	bl	saa_clearb
	ldr	r1, [r6]
	ldr	r0, [r5]
	bl	saa_setb
	ldr	r3, .L36+8
	ldr	r0, [r3]
	asr	r0, r0, #2
	bl	saa_readl
	ldr	r3, [r4, #20]
	mov	r5, r0
	cmp	r3, #0
	beq	.L3
	ldr	r3, [r4]
	cmp	r3, r0
	beq	.L5
	str	r0, [r4]
.L3:
	ldr	r1, [r4, #4]
	mov	r0, r5
	bl	ir_extract_bits
	mov	r1, r5
	mov	r3, r0
	mov	r6, r0
	ldr	r2, [r4, #4]
	ldr	r0, .L36+12
	bl	input_dbg
	ldr	r3, [r7]
	cmp	r3, #128
	beq	.L35
	ldr	r2, [r4, #20]
	ldr	r3, [r4, #8]
	cmp	r2, #0
	beq	.L8
	cmp	r3, #0
	beq	.L9
	tst	r5, r3
	bne	.L10
.L9:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L32
	tst	r3, r5
	bne	.L32
.L10:
	ldr	r3, .L36+16
	mov	r2, r6
	ldr	r1, [r3]
	ldr	r0, [r4, #16]
	mov	r3, #0
	bl	rc_keydown_notimeout
.L5:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	cmp	r3, #0
	beq	.L12
	tst	r5, r3
	beq	.L12
.L13:
	ldr	r3, .L36+16
	mov	r2, r6
	ldr	r1, [r3]
	ldr	r0, [r4, #16]
	mov	r3, #0
	bl	rc_keydown_notimeout
.L32:
	ldr	r0, [r4, #16]
.L31:
	bl	rc_keyup
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L5
	tst	r3, r5
	bne	.L5
	b	.L13
.L35:
	ldr	r3, [r4, #4]
	ldr	r0, [r4, #16]
	cmp	r3, r6
	beq	.L31
	ldr	r3, .L36+16
	mov	r2, r6
	ldr	r1, [r3]
	mov	r3, #0
	bl	rc_keydown_notimeout
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L34:
	ldr	r5, .L36+20
	mov	r1, #128
	ldr	r0, [r5]
	bl	saa_setb
	mov	r1, #128
	ldr	r0, [r5]
	bl	saa_clearb
	b	.L2
.L37:
	.align	2
.L36:
	.word	SAA7134_GPIO_GPMODE3
	.word	SAA7134_GPIO_GPRESCAN
	.word	SAA7134_GPIO_GPSTATUS0
	.word	.LC0
	.word	RC_PROTO_UNKNOWN
	.word	SAA7134_GPIO_GPSTATUS1
	.size	build_key, .-build_key
	.comm	SAA7134_GPIO_GPSTATUS1,4,4
	.comm	SAA7134_GPIO_GPSTATUS0,4,4
	.comm	SAA7134_GPIO_GPRESCAN,4,4
	.comm	SAA7134_GPIO_GPMODE3,4,4
	.comm	RC_PROTO_UNKNOWN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
