	.file	"903504.c"
	.intel_syntax noprefix
	.text
	.globl	MAGIC
	.section	.rodata
	.type	MAGIC, @object
	.size	MAGIC, 7
MAGIC:
	.string	"REVENT"
	.globl	FORMAT_VERSION
	.data
	.align 2
	.type	FORMAT_VERSION, @object
	.size	FORMAT_VERSION, 2
FORMAT_VERSION:
	.value	2
	.globl	verbose
	.bss
	.align 4
	.type	verbose, @object
	.size	verbose, 4
verbose:
	.zero	4
	.globl	wait_for_stdin
	.data
	.align 4
	.type	wait_for_stdin, @object
	.size	wait_for_stdin, 4
wait_for_stdin:
	.long	1
	.text
	.globl	is_numeric
	.type	is_numeric, @function
is_numeric:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L3
	mov	eax, 0
	jmp	.L4
.L3:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L5
	mov	eax, 1
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	is_numeric, .-is_numeric
	.globl	test_bit
	.type	test_bit, @function
test_bit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	esi, al
	mov	eax, DWORD PTR -12[rbp]
	cdq
	shr	edx, 29
	add	eax, edx
	and	eax, 7
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	and	eax, esi
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	test_bit, .-test_bit
	.globl	count_bits
	.type	count_bits, @function
count_bits:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -9[rbp], al
	movsx	eax, BYTE PTR -9[rbp]
	and	eax, 15
	cdqe
	lea	rdx, nybble_lookup.0[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	ecx, al
	movzx	eax, BYTE PTR -9[rbp]
	sar	al, 4
	movsx	eax, al
	cdqe
	lea	rdx, nybble_lookup.0[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	add	eax, ecx
	add	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 1
.L9:
	cmp	DWORD PTR -4[rbp], 95
	jle	.L10
	mov	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	count_bits, .-count_bits
	.globl	is_gamepad
	.type	is_gamepad, @function
is_gamepad:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 267
	mov	esi, 0
	mov	rdi, rax
	call	test_bit
	test	eax, eax
	jne	.L13
	mov	eax, 0
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 267
	mov	esi, 1
	mov	rdi, rax
	call	test_bit
	test	eax, eax
	jne	.L15
	mov	eax, 0
	jmp	.L14
.L15:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 459
	mov	esi, 304
	mov	rdi, rax
	call	test_bit
	test	eax, eax
	jne	.L16
	mov	eax, 0
	jmp	.L14
.L16:
	mov	eax, 1
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	is_gamepad, .-is_gamepad
	.section	.rodata
.LC0:
	.string	"ERROR: "
	.align 8
.LC1:
	.string	"Cannot determine size of %s: %s"
	.text
	.globl	get_file_size
	.type	get_file_size, @function
get_file_size:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	QWORD PTR -168[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jne	.L18
	mov	rax, QWORD PTR -112[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	jmp	.L21
.L18:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -168[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_file_size, .-get_file_size
	.globl	get_device_info
	.type	get_device_info, @function
get_device_info:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 2352
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 2148025602
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 2164212998
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L24
.L25:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 263[rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 2147763488
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L26
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L24
.L26:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L27
.L34:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 263[rax]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	test_bit
	test	eax, eax
	je	.L28
	cmp	DWORD PTR -16[rbp], 3
	jne	.L29
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 267[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 32
	or	eax, -2141174528
	mov	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L30
.L32:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 267[rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	test_bit
	test	eax, eax
	je	.L31
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 556[rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	DWORD PTR 556[rdx], ecx
	mov	edx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	lea	rdx, 560[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 64
	or	eax, -2145893120
	mov	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
.L31:
	add	DWORD PTR -12[rbp], 1
.L30:
	cmp	DWORD PTR -12[rbp], 766
	jle	.L32
	jmp	.L28
.L29:
	cmp	DWORD PTR -16[rbp], 2
	jne	.L33
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 363[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 32
	or	eax, -2141174528
	mov	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	jmp	.L28
.L33:
	cmp	DWORD PTR -16[rbp], 1
	jne	.L28
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 459[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 32
	or	eax, -2141174528
	mov	ecx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
.L28:
	add	DWORD PTR -16[rbp], 1
.L27:
	cmp	DWORD PTR -16[rbp], 30
	jle	.L34
	mov	eax, 0
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	get_device_info, .-get_device_info
	.section	.rodata
	.align 8
.LC2:
	.string	"Could not destroy replay device"
	.text
	.globl	destroy_replay_device
	.type	destroy_replay_device, @function
destroy_replay_device:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 21762
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L37
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L37:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	destroy_replay_device, .-destroy_replay_device
	.section	.rodata
.LC3:
	.string	"Could not set EVBIT %i"
	.text
	.type	set_evbit, @function
set_evbit:
.LFB13:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 1074025828
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L40
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L40:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	set_evbit, .-set_evbit
	.section	.rodata
.LC4:
	.string	"Could not set KEYBIT %i"
	.text
	.type	set_keybit, @function
set_keybit:
.LFB14:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 1074025829
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L43
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L43:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	set_keybit, .-set_keybit
	.section	.rodata
.LC5:
	.string	"Could not set ABSBIT %i"
	.text
	.type	set_absbit, @function
set_absbit:
.LFB15:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 1074025831
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L46
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -8[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L46:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	set_absbit, .-set_absbit
	.section	.rodata
.LC6:
	.string	"Could not set RELBIT %i"
	.text
	.type	set_relbit, @function
set_relbit:
.LFB16:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 1074025830
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L49
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -8[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L49:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	set_relbit, .-set_relbit
	.type	block_sigterm, @function
block_sigterm:
.LFB17:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	sigemptyset@PLT
	lea	rax, -144[rbp]
	mov	esi, 15
	mov	rdi, rax
	call	sigaddset@PLT
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	sigprocmask@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	block_sigterm, .-block_sigterm
	.globl	adjust_event_times
	.type	adjust_event_times, @function
adjust_event_times:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR 48[rax]
	test	rax, rax
	je	.L59
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR 56[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR 56[rax]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -40[rbp], rax
	mov	QWORD PTR -56[rbp], 0
	jmp	.L55
.L57:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR -56[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR -56[rbp]
	sal	rax, 5
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -40[rbp]
	sub	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	jns	.L56
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, 1
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1000000
	mov	QWORD PTR -24[rbp], rax
.L56:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR -56[rbp]
	sal	rax, 5
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR -56[rbp]
	sal	rax, 5
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rdx], rax
	add	QWORD PTR -56[rbp], 1
.L55:
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR 48[rax]
	cmp	QWORD PTR -56[rbp], rax
	jb	.L57
	jmp	.L52
.L59:
	nop
.L52:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	adjust_event_times, .-adjust_event_times
	.globl	write_record_header
	.type	write_record_header, @function
write_record_header:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 6
	lea	rsi, MAGIC[rip]
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 5
	jg	.L61
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L66
.L61:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, 1
	ja	.L63
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L66
.L63:
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 4[rax]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, 1
	ja	.L64
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L66
.L64:
	lea	rax, -14[rbp]
	mov	edx, 6
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -14[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 6
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 5
	jg	.L65
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L66
.L65:
	mov	eax, 0
.L66:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	write_record_header, .-write_record_header
	.globl	read_record_header
	.type	read_record_header, @function
read_record_header:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -15[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 6
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 5
	jg	.L69
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L76
.L69:
	mov	BYTE PTR -9[rbp], 0
	lea	rax, -15[rbp]
	lea	rsi, MAGIC[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L71
	mov	eax, 22
	jmp	.L76
.L71:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, 1
	ja	.L72
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L76
.L72:
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 1
	jbe	.L73
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 4[rax]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, 1
	ja	.L74
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L76
.L74:
	lea	rcx, -21[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 6
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 5
	jg	.L75
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L76
.L73:
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR 4[rax], 0
.L75:
	mov	eax, 0
.L76:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L77
	call	__stack_chk_fail@PLT
.L77:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	read_record_header, .-read_record_header
	.globl	write_general_input_devices
	.type	write_general_input_devices, @function
write_general_input_devices:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L79
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L85
.L79:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L81
.L84:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	rdx, QWORD PTR -48[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L82
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L85
.L82:
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	mov	eax, eax
	cmp	QWORD PTR -16[rbp], rax
	jnb	.L83
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L85
.L83:
	add	DWORD PTR -20[rbp], 1
.L81:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L84
	mov	eax, 0
.L85:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L86
	call	__stack_chk_fail@PLT
.L86:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	write_general_input_devices, .-write_general_input_devices
	.globl	read_general_input_devices
	.type	read_general_input_devices, @function
read_general_input_devices:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -64[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L88
	mov	eax, 5
	jmp	.L96
.L88:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L90
	mov	eax, 12
	jmp	.L96
.L90:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L91
.L95:
	mov	rdx, QWORD PTR -64[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L92
	mov	eax, 5
	jmp	.L96
.L92:
	mov	eax, DWORD PTR -40[rbp]
	mov	eax, eax
	add	rax, 1
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 8[rdx]
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L93
	mov	eax, 12
	jmp	.L96
.L93:
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -64[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -40[rbp]
	mov	eax, eax
	cmp	QWORD PTR -32[rbp], rax
	jnb	.L94
	mov	eax, 5
	jmp	.L96
.L94:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -40[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	add	DWORD PTR -36[rbp], 1
.L91:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jl	.L95
	mov	eax, 0
.L96:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L97
	call	__stack_chk_fail@PLT
.L97:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	read_general_input_devices, .-read_general_input_devices
	.globl	write_input_id
	.type	write_input_id, @function
write_input_id:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 6[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 3
	jg	.L99
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L100
.L99:
	mov	eax, 0
.L100:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	write_input_id, .-write_input_id
	.globl	read_input_id
	.type	read_input_id, @function
read_input_id:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 6[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 3
	jg	.L102
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L103
.L102:
	mov	eax, 0
.L103:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	read_input_id, .-read_input_id
	.globl	write_absinfo
	.type	write_absinfo, @function
write_absinfo:
.LFB25:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 6
	jg	.L105
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L106
.L105:
	mov	eax, 0
.L106:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	write_absinfo, .-write_absinfo
	.globl	read_absinfo
	.type	read_absinfo, @function
read_absinfo:
.LFB26:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 6
	jg	.L108
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L109
.L108:
	mov	eax, 0
.L109:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	read_absinfo, .-read_absinfo
	.section	.rodata
.LC7:
	.string	"EV_BITS_SIZE: %d\n"
.LC8:
	.string	"KEY_BITS_SIZE: %d\n"
	.text
	.globl	write_device_info
	.type	write_device_info, @function
write_device_info:
.LFB27:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_input_id
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L111
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L119
.L111:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	esi, 1
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -12[rbp]
	cmp	edx, eax
	jbe	.L113
	mov	eax, 5
	jmp	.L119
.L113:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 263[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 4
	mov	esi, 1
	call	fwrite@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 267[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 363[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 459[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	call	fwrite@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 291
	jg	.L114
	mov	eax, 5
	jmp	.L119
.L114:
	mov	esi, 4
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 96
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 556[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L115
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L119
.L115:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L116
.L118:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	lea	rdx, 560[rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_absinfo
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L117
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L119
.L117:
	add	DWORD PTR -16[rbp], 1
.L116:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 556[rax]
	mov	eax, DWORD PTR -16[rbp]
	cmp	edx, eax
	ja	.L118
	mov	eax, 0
.L119:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L120
	call	__stack_chk_fail@PLT
.L120:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	write_device_info, .-write_device_info
	.globl	read_device_info
	.type	read_device_info, @function
read_device_info:
.LFB28:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_input_id
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L122
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L131
.L122:
	mov	DWORD PTR -20[rbp], 0
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -20[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jne	.L124
	mov	eax, 5
	jmp	.L131
.L124:
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	esi, 1
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	jnb	.L125
	mov	eax, 5
	jmp	.L131
.L125:
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, edx
	mov	BYTE PTR 8[rax+rdx], 0
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 263[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 4
	mov	esi, 1
	call	fread@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 267[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 363[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 459[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 96
	mov	esi, 1
	call	fread@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 291
	jg	.L126
	mov	eax, 5
	jmp	.L131
.L126:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 556[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L127
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L131
.L127:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L128
.L130:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	lea	rdx, 560[rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_absinfo
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L129
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L131
.L129:
	add	DWORD PTR -16[rbp], 1
.L128:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 556[rax]
	mov	eax, DWORD PTR -16[rbp]
	cmp	edx, eax
	ja	.L130
	mov	eax, 0
.L131:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L132
	call	__stack_chk_fail@PLT
.L132:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	read_device_info, .-read_device_info
	.section	.rodata
.LC9:
	.string	"device name: %s\n"
	.align 8
.LC10:
	.string	"bustype: 0x%x vendor: 0x%x product: 0x%x version: 0x%x\n"
.LC11:
	.string	"abs_bits: %d\n"
.LC12:
	.string	"rel_bits: %d\n"
.LC13:
	.string	"key_bits: %d\n"
.LC14:
	.string	"num_absinfo: %ld\n"
.LC15:
	.string	"KEY: "
.LC16:
	.string	"%04x "
.LC17:
	.string	"ABS:"
	.align 8
.LC18:
	.string	"%04x  : min %i, max %i, fuzz %0i, flat %i, res %i\n"
	.text
	.globl	print_device_info
	.type	print_device_info, @function
print_device_info:
.LFB29:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, WORD PTR 6[rax]
	movzx	esi, ax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, WORD PTR 4[rax]
	movzx	ecx, ax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, WORD PTR 2[rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 267
	mov	rdi, rax
	call	count_bits
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 363
	mov	rdi, rax
	call	count_bits
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 459
	mov	rdi, rax
	call	count_bits
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 556[rax]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L134
.L136:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 459[rax]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	test_bit
	test	eax, eax
	je	.L135
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L135:
	add	DWORD PTR -16[rbp], 1
.L134:
	cmp	DWORD PTR -16[rbp], 766
	jle	.L136
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L137
.L138:
	mov	rcx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 584
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	lea	rdx, 560[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	edi, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	rsp, 8
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	add	DWORD PTR -16[rbp], 1
.L137:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 556[rax]
	mov	eax, DWORD PTR -16[rbp]
	cmp	edx, eax
	ja	.L138
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	print_device_info, .-print_device_info
	.globl	write_replay_event
	.type	write_replay_event, @function
write_replay_event:
.LFB30:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L140
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L147
.L140:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L142
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L147
.L142:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L143
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L147
.L143:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L144
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L147
.L144:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 26[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L145
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L147
.L145:
	mov	rax, QWORD PTR -48[rbp]
	lea	rdi, 28[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L146
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L147
.L146:
	mov	eax, 0
.L147:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L148
	call	__stack_chk_fail@PLT
.L148:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	write_replay_event, .-write_replay_event
	.globl	read_replay_event
	.type	read_replay_event, @function
read_replay_event:
.LFB31:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L150
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L151
.L150:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 8
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L152
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L151
.L152:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 8
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L153
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L151
.L153:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L154
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L151
.L154:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 26[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 2
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L155
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L151
.L155:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdi, 28[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L156
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L151
.L156:
	mov	eax, 0
.L151:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	read_replay_event, .-read_replay_event
	.globl	read_legacy_replay_event
	.type	read_legacy_replay_event, @function
read_legacy_replay_event:
.LFB32:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rcx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 3
	ja	.L158
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L159
	mov	eax, -1
	jmp	.L167
.L159:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L158:
	lea	rcx, -12[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 3
	ja	.L161
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L161:
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 7
	ja	.L162
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L162:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -32[rbp], rax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 7
	ja	.L163
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L163:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rcx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rcx], rax
	mov	QWORD PTR 16[rcx], rdx
	mov	rax, QWORD PTR -64[rbp]
	lea	rcx, 24[rax]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 1
	ja	.L164
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L164:
	mov	rax, QWORD PTR -64[rbp]
	lea	rcx, 26[rax]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 1
	ja	.L165
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L165:
	mov	rax, QWORD PTR -64[rbp]
	lea	rcx, 28[rax]
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 3
	ja	.L166
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L167
.L166:
	mov	eax, 0
.L167:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L168
	call	__stack_chk_fail@PLT
.L168:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	read_legacy_replay_event, .-read_legacy_replay_event
	.section	.rodata
.LC19:
	.string	"r"
	.text
	.globl	open_revent_recording
	.type	open_revent_recording, @function
open_revent_recording:
.LFB33:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L170
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L171
.L170:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	fileno@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	read_record_header
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L172
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L171
.L172:
	mov	rax, QWORD PTR -32[rbp]
	movzx	edx, WORD PTR [rax]
	movzx	eax, WORD PTR FORMAT_VERSION[rip]
	cmp	dx, ax
	jbe	.L173
	mov	eax, 71
	jmp	.L171
.L173:
	mov	eax, 0
.L171:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE33:
	.size	open_revent_recording, .-open_revent_recording
	.section	.rodata
.LC20:
	.string	"w"
	.text
	.globl	init_recording
	.type	init_recording, @function
init_recording:
.LFB34:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movzx	eax, WORD PTR FORMAT_VERSION[rip]
	mov	WORD PTR -16[rbp], ax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L175
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L177
.L175:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	edx, eax
	lea	rax, -16[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	write_record_header
	mov	rax, QWORD PTR -24[rbp]
.L177:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L178
	call	__stack_chk_fail@PLT
.L178:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE34:
	.size	init_recording, .-init_recording
	.globl	init_input_devices
	.type	init_input_devices, @function
init_input_devices:
.LFB35:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 24[rax], -1
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE35:
	.size	init_input_devices, .-init_input_devices
	.section	.rodata
.LC21:
	.string	"/dev/input/event%d"
.LC22:
	.string	"opened %s\n"
.LC23:
	.string	"could not open %s\n"
	.text
	.globl	init_general_input_devices
	.type	init_general_input_devices, @function
init_general_input_devices:
.LFB36:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 600
	.cfi_offset 3, -24
	mov	QWORD PTR -600[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -584[rbp], 0
	mov	DWORD PTR -592[rbp], 0
	mov	DWORD PTR -588[rbp], 0
	jmp	.L181
.L186:
	lea	rcx, -512[rbp]
	mov	edx, DWORD PTR -592[rbp]
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	add	rcx, rax
	mov	eax, DWORD PTR -588[rbp]
	mov	edx, eax
	lea	rsi, .LC21[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	lea	rcx, -512[rbp]
	mov	edx, DWORD PTR -592[rbp]
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	add	rax, rcx
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	edx, DWORD PTR -592[rbp]
	mov	DWORD PTR -576[rbp+rdx*4], eax
	mov	eax, DWORD PTR -592[rbp]
	mov	eax, DWORD PTR -576[rbp+rax*4]
	test	eax, eax
	jle	.L182
	mov	eax, DWORD PTR -592[rbp]
	mov	eax, DWORD PTR -576[rbp+rax*4]
	cmp	DWORD PTR -584[rbp], eax
	jge	.L183
	mov	eax, DWORD PTR -592[rbp]
	mov	eax, DWORD PTR -576[rbp+rax*4]
	mov	DWORD PTR -584[rbp], eax
.L183:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L184
	lea	rcx, -512[rbp]
	mov	edx, DWORD PTR -592[rbp]
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
.L184:
	add	DWORD PTR -592[rbp], 1
	jmp	.L185
.L182:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L185
	lea	rcx, -512[rbp]
	mov	edx, DWORD PTR -592[rbp]
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
.L185:
	add	DWORD PTR -588[rbp], 1
.L181:
	cmp	DWORD PTR -588[rbp], 15
	jbe	.L186
	cmp	DWORD PTR -592[rbp], 0
	jne	.L187
	mov	eax, 13
	jmp	.L196
.L187:
	mov	edx, DWORD PTR -592[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -600[rbp]
	mov	edx, DWORD PTR -584[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	eax, DWORD PTR -592[rbp]
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -600[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -600[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L189
	mov	eax, 12
	jmp	.L196
.L189:
	mov	DWORD PTR -588[rbp], 0
	jmp	.L190
.L192:
	lea	rcx, -512[rbp]
	mov	edx, DWORD PTR -588[rbp]
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	add	rax, rcx
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -580[rbp], eax
	mov	eax, DWORD PTR -580[rbp]
	add	eax, 1
	mov	edx, eax
	mov	rax, QWORD PTR -600[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -588[rbp]
	sal	rax, 3
	lea	rbx, [rcx+rax]
	mov	rdi, rdx
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR -600[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -588[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L191
	mov	eax, 12
	jmp	.L196
.L191:
	mov	eax, DWORD PTR -580[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rcx, -512[rbp]
	mov	edx, DWORD PTR -588[rbp]
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rax
	add	rcx, rax
	mov	rax, QWORD PTR -600[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -588[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	add	DWORD PTR -588[rbp], 1
.L190:
	mov	eax, DWORD PTR -588[rbp]
	cmp	eax, DWORD PTR -592[rbp]
	jb	.L192
	mov	eax, DWORD PTR -592[rbp]
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -600[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -600[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L193
	mov	eax, 12
	jmp	.L196
.L193:
	mov	DWORD PTR -588[rbp], 0
	jmp	.L194
.L195:
	mov	rax, QWORD PTR -600[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -588[rbp]
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -588[rbp]
	mov	eax, DWORD PTR -576[rbp+rax*4]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -588[rbp], 1
.L194:
	mov	eax, DWORD PTR -588[rbp]
	cmp	eax, DWORD PTR -592[rbp]
	jb	.L195
	mov	eax, 0
.L196:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L197
	call	__stack_chk_fail@PLT
.L197:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE36:
	.size	init_general_input_devices, .-init_general_input_devices
	.globl	fini_general_input_devices
	.type	fini_general_input_devices, @function
fini_general_input_devices:
.LFB37:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L199
.L202:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L200
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	close@PLT
.L200:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L201
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
.L201:
	add	DWORD PTR -4[rbp], 1
.L199:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L202
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE37:
	.size	fini_general_input_devices, .-fini_general_input_devices
	.section	.rodata
	.align 8
.LC24:
	.string	"Could not get info for %s: %s\n"
.LC25:
	.string	"not a gamepad: %s\n"
	.align 8
.LC26:
	.string	"More than one device identified as a gamepad (run \"reven info\" to see which)"
	.align 8
.LC27:
	.string	"Could not create replay device: %s"
.LC28:
	.string	"Found gamepad: %s\n"
	.text
	.globl	init_gamepad_input_devices
	.type	init_gamepad_input_devices, @function
init_gamepad_input_devices:
.LFB38:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 2440
	.cfi_offset 3, -24
	mov	QWORD PTR -2440[rbp], rdi
	mov	QWORD PTR -2448[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -2424[rbp], 0
	lea	rax, -2416[rbp]
	mov	rdi, rax
	call	init_general_input_devices
	mov	DWORD PTR -2428[rbp], eax
	cmp	DWORD PTR -2428[rbp], 0
	je	.L204
	mov	eax, DWORD PTR -2428[rbp]
	jmp	.L219
.L204:
	mov	DWORD PTR -2432[rbp], 0
	jmp	.L206
.L214:
	mov	rdx, QWORD PTR -2400[rbp]
	mov	eax, DWORD PTR -2432[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, -2384[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	get_device_info
	mov	DWORD PTR -2428[rbp], eax
	cmp	DWORD PTR -2428[rbp], 0
	je	.L207
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L221
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -2408[rbp]
	mov	eax, DWORD PTR -2432[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L221
.L207:
	lea	rax, -2384[rbp]
	mov	rdi, rax
	call	is_gamepad
	test	eax, eax
	jne	.L210
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L222
	mov	rdx, QWORD PTR -2408[rbp]
	mov	eax, DWORD PTR -2432[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L222
.L210:
	cmp	QWORD PTR -2424[rbp], 0
	je	.L212
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 76
	mov	esi, 1
	lea	rdi, .LC26[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L212:
	mov	edi, 30
	call	malloc@PLT
	mov	QWORD PTR -2424[rbp], rax
	cmp	QWORD PTR -2424[rbp], 0
	jne	.L213
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 12
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L213:
	mov	rdx, QWORD PTR -2408[rbp]
	mov	eax, DWORD PTR -2432[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -2424[rbp]
	mov	edx, 30
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rcx, -2384[rbp]
	mov	rax, QWORD PTR -2448[rbp]
	mov	edx, 2352
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L209
.L221:
	nop
	jmp	.L209
.L222:
	nop
.L209:
	add	DWORD PTR -2432[rbp], 1
.L206:
	mov	eax, DWORD PTR -2416[rbp]
	cmp	DWORD PTR -2432[rbp], eax
	jl	.L214
	lea	rax, -2416[rbp]
	mov	rdi, rax
	call	fini_general_input_devices
	cmp	QWORD PTR -2424[rbp], 0
	jne	.L215
	mov	eax, 123
	jmp	.L219
.L215:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L216
	mov	rax, QWORD PTR -2424[rbp]
	mov	rsi, rax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
.L216:
	mov	rax, QWORD PTR -2440[rbp]
	mov	DWORD PTR [rax], 1
	mov	edi, 8
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -2440[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -2440[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -2424[rbp]
	mov	QWORD PTR [rax], rdx
	mov	edi, 8
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -2440[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -2440[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L217
	mov	eax, 12
	jmp	.L219
.L217:
	mov	rax, QWORD PTR -2440[rbp]
	mov	rbx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -2424[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR -2440[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L218
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	jmp	.L219
.L218:
	mov	rax, QWORD PTR -2440[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -2440[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	eax, 0
.L219:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L220
	call	__stack_chk_fail@PLT
.L220:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE38:
	.size	init_gamepad_input_devices, .-init_gamepad_input_devices
	.globl	fini_gamepad_input_devices
	.type	fini_gamepad_input_devices, @function
fini_gamepad_input_devices:
.LFB39:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fini_general_input_devices
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE39:
	.size	fini_gamepad_input_devices, .-fini_gamepad_input_devices
	.globl	init_revent_recording
	.type	init_revent_recording, @function
init_revent_recording:
.LFB40:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 48[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	WORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 2
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 56[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 40[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	init_input_devices
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE40:
	.size	init_revent_recording, .-init_revent_recording
	.globl	fini_revent_recording
	.type	fini_revent_recording, @function
fini_revent_recording:
.LFB41:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L226
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	fini_general_input_devices
	jmp	.L227
.L226:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	jne	.L227
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	fini_gamepad_input_devices
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	free@PLT
.L227:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 56[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 48[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	WORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 2
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE41:
	.size	fini_revent_recording, .-fini_revent_recording
	.section	.rodata
	.align 8
.LC29:
	.string	"Could not allocate file descriptor array: %s"
	.align 8
.LC30:
	.string	"Could not open \"%s\" for writing: %s"
.LC31:
	.string	"Opened %s\n"
	.text
	.globl	open_general_input_devices_for_playback_or_die
	.type	open_general_input_devices_for_playback_or_die, @function
open_general_input_devices_for_playback_or_die:
.LFB42:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L229
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 12
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L229:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L230
.L234:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	esi, 2049
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L231
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L231:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 24[rax]
	cmp	edx, eax
	jle	.L232
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 24[rax], edx
.L232:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L233
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
.L233:
	add	DWORD PTR -8[rbp], 1
.L230:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L234
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE42:
	.size	open_general_input_devices_for_playback_or_die, .-open_general_input_devices_for_playback_or_die
	.section	.rodata
.LC32:
	.string	"/dev/uinput"
	.align 8
.LC33:
	.string	"uinput not supported by the kernel (is the module installed?)"
	.align 8
.LC34:
	.string	"Cannot access \"/dev/uinput\" (try re-running as root)"
	.align 8
.LC35:
	.string	"Could not open \"/dev/uinput\" for writing: %s"
.LC36:
	.string	"revent-replay %s"
.LC37:
	.string	"Could not write absinfo:"
	.align 8
.LC38:
	.string	"Could not create replay device:"
	.text
	.globl	create_replay_device_or_die
	.type	create_replay_device_or_die, @function
create_replay_device_or_die:
.LFB43:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1168
	mov	QWORD PTR -1160[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 2049
	lea	rdi, .LC32[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1144[rbp], eax
	cmp	DWORD PTR -1144[rbp], 0
	jns	.L236
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jne	.L237
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 61
	mov	esi, 1
	lea	rdi, .LC33[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L237:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 13
	jne	.L238
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 52
	mov	esi, 1
	lea	rdi, .LC34[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L238:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L236:
	lea	rax, -1136[rbp]
	mov	edx, 1116
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -1160[rbp]
	lea	rdx, 8[rax]
	lea	rax, -1136[rbp]
	mov	rcx, rdx
	lea	rdx, .LC36[rip]
	mov	esi, 80
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	WORD PTR -1056[rbp], 3
	mov	rax, QWORD PTR -1160[rbp]
	movzx	eax, WORD PTR 2[rax]
	mov	WORD PTR -1054[rbp], ax
	mov	rax, QWORD PTR -1160[rbp]
	movzx	eax, WORD PTR 4[rax]
	mov	WORD PTR -1052[rbp], ax
	mov	rax, QWORD PTR -1160[rbp]
	movzx	eax, WORD PTR 6[rax]
	mov	WORD PTR -1050[rbp], ax
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, 0
	mov	edi, eax
	call	set_evbit
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, 1
	mov	edi, eax
	call	set_evbit
	mov	DWORD PTR -1148[rbp], 0
	jmp	.L239
.L241:
	mov	rax, QWORD PTR -1160[rbp]
	lea	rdx, 459[rax]
	mov	eax, DWORD PTR -1148[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	test_bit
	test	eax, eax
	je	.L240
	mov	edx, DWORD PTR -1148[rbp]
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, edx
	mov	edi, eax
	call	set_keybit
.L240:
	add	DWORD PTR -1148[rbp], 1
.L239:
	cmp	DWORD PTR -1148[rbp], 766
	jle	.L241
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, 2
	mov	edi, eax
	call	set_evbit
	mov	DWORD PTR -1148[rbp], 0
	jmp	.L242
.L244:
	mov	rax, QWORD PTR -1160[rbp]
	lea	rdx, 363[rax]
	mov	eax, DWORD PTR -1148[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	test_bit
	test	eax, eax
	je	.L243
	mov	edx, DWORD PTR -1148[rbp]
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, edx
	mov	edi, eax
	call	set_relbit
.L243:
	add	DWORD PTR -1148[rbp], 1
.L242:
	cmp	DWORD PTR -1148[rbp], 14
	jle	.L244
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, 3
	mov	edi, eax
	call	set_evbit
	mov	DWORD PTR -1148[rbp], 0
	jmp	.L245
.L246:
	mov	rcx, QWORD PTR -1160[rbp]
	mov	eax, DWORD PTR -1148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 584
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -1140[rbp], eax
	mov	edx, DWORD PTR -1140[rbp]
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, edx
	mov	edi, eax
	call	set_absbit
	mov	rcx, QWORD PTR -1160[rbp]
	mov	eax, DWORD PTR -1148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 564
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -1140[rbp]
	movsx	rdx, edx
	add	rdx, 84
	mov	DWORD PTR -1124[rbp+rdx*4], eax
	mov	rcx, QWORD PTR -1160[rbp]
	mov	eax, DWORD PTR -1148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 568
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -1140[rbp]
	movsx	rdx, edx
	add	rdx, 20
	mov	DWORD PTR -1124[rbp+rdx*4], eax
	mov	rcx, QWORD PTR -1160[rbp]
	mov	eax, DWORD PTR -1148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 572
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -1140[rbp]
	movsx	rdx, edx
	add	rdx, 148
	mov	DWORD PTR -1124[rbp+rdx*4], eax
	mov	rcx, QWORD PTR -1160[rbp]
	mov	eax, DWORD PTR -1148[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	sal	rax, 2
	add	rax, rcx
	add	rax, 576
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -1140[rbp]
	movsx	rdx, edx
	add	rdx, 212
	mov	DWORD PTR -1124[rbp+rdx*4], eax
	add	DWORD PTR -1148[rbp], 1
.L245:
	mov	rax, QWORD PTR -1160[rbp]
	mov	edx, DWORD PTR 556[rax]
	mov	eax, DWORD PTR -1148[rbp]
	cmp	edx, eax
	ja	.L246
	lea	rcx, -1136[rbp]
	mov	eax, DWORD PTR -1144[rbp]
	mov	edx, 1116
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, 1115
	ja	.L247
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC37[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L247:
	mov	eax, DWORD PTR -1144[rbp]
	mov	esi, 21761
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L248
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L248:
	mov	edi, 3
	call	sleep@PLT
	mov	eax, DWORD PTR -1144[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L250
	call	__stack_chk_fail@PLT
.L250:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE43:
	.size	create_replay_device_or_die, .-create_replay_device_or_die
	.section	.rodata
	.align 8
.LC39:
	.string	"%s does not appear to be an revent recording"
	.align 8
.LC40:
	.string	"%s contains recording for unsupported version \"%u\"; max supported version is \"%u\""
	.align 8
.LC41:
	.string	"%s revent recording appears to be corrupted"
.LC42:
	.string	"Could not read devices: %s"
	.align 8
.LC43:
	.string	"Could not allocate gamepad info buffer: %s"
	.align 8
.LC44:
	.string	"Could not read gamepad info: %s"
.LC45:
	.string	"Unexpected recording mode: %d"
	.align 8
.LC46:
	.string	"Could not read the number of recorded events"
	.align 8
.LC47:
	.string	"Not enough memory to allocate replay buffer"
.LC48:
	.string	"error reading events: %s"
	.text
	.type	read_revent_recording_or_die, @function
read_revent_recording_or_die:
.LFB44:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rcx, QWORD PTR -80[rbp]
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	open_revent_recording
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L252
	cmp	DWORD PTR -52[rbp], 22
	jne	.L253
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rsi, .LC39[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L253:
	cmp	DWORD PTR -52[rbp], 71
	jne	.L254
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	movzx	eax, WORD PTR FORMAT_VERSION[rip]
	movzx	esi, ax
	mov	rax, QWORD PTR -80[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	ecx, ax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	mov	r8d, esi
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L254:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rsi, .LC41[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L252:
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L255
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -80[rbp]
	add	rdx, 8
	mov	rsi, rax
	mov	rdi, rdx
	call	read_general_input_devices
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L256
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC42[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L256:
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR 40[rax], 0
	jmp	.L257
.L255:
	mov	rax, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	jne	.L258
	mov	edi, 2352
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	jne	.L259
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 12
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC43[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L259:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR 40[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_device_info
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L257
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC44[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L258:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC45[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L257:
	mov	rax, QWORD PTR -80[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 1
	jbe	.L260
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -80[rbp]
	lea	rdi, 48[rdx]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 8
	call	fread@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jg	.L261
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 44
	mov	esi, 1
	lea	rdi, .LC46[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L261:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 48[rax]
	sal	rax, 5
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR 56[rax], rdx
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 56[rax]
	test	rax, rax
	jne	.L262
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 43
	mov	esi, 1
	lea	rdi, .LC47[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L262:
	mov	QWORD PTR -40[rbp], 0
	jmp	.L263
.L264:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 5
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_replay_event
	add	QWORD PTR -40[rbp], 1
.L263:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 48[rax]
	cmp	QWORD PTR -40[rbp], rax
	jb	.L264
	jmp	.L265
.L260:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	get_file_size
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR 56[rax], rdx
	mov	QWORD PTR -40[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fflush@PLT
.L269:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 5
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	rsi, rbx
	mov	edi, eax
	call	read_legacy_replay_event
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], -1
	je	.L272
	cmp	DWORD PTR -52[rbp], 0
	je	.L268
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC48[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L268:
	add	QWORD PTR -40[rbp], 1
	jmp	.L269
.L272:
	nop
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 48[rax], rdx
.L265:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L270
	call	__stack_chk_fail@PLT
.L270:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE44:
	.size	read_revent_recording_or_die, .-read_revent_recording_or_die
	.section	.rodata
	.align 8
.LC49:
	.string	"Could not create replay devices: %s"
	.text
	.globl	open_gamepad_input_devices_for_playback_or_die
	.type	open_gamepad_input_devices_for_playback_or_die, @function
open_gamepad_input_devices_for_playback_or_die:
.LFB45:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	create_replay_device_or_die
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 1
	mov	edi, 4
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L274
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 12
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC49[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L274:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR 24[rax], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE45:
	.size	open_gamepad_input_devices_for_playback_or_die, .-open_gamepad_input_devices_for_playback_or_die
	.local	EXIT
	.comm	EXIT,4,4
	.globl	exitHandler
	.type	exitHandler, @function
exitHandler:
.LFB46:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR EXIT[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE46:
	.size	exitHandler, .-exitHandler
	.section	.rodata
	.align 8
.LC50:
	.string	"Could not create recording \"%s\": %s"
	.align 8
.LC51:
	.string	"Could not initialize input devices: %s"
	.align 8
.LC52:
	.string	"Could not record input devices: %s"
	.align 8
.LC53:
	.string	"There does not appear to be a gamepad connected"
	.align 8
.LC54:
	.string	"Problem initializing gamepad device: %s"
	.align 8
.LC55:
	.string	"Problem writing gamepad info: %s"
	.align 8
.LC56:
	.string	"Invalid recording mode specified"
	.align 8
.LC57:
	.string	"Could not initialise event count: %s"
.LC58:
	.string	"recording..."
.LC59:
	.string	"added fake return exiting..."
.LC60:
	.string	"got event from %s\n"
	.align 8
.LC61:
	.string	"%d event: type %d code %d value %d\n"
.LC62:
	.string	"Writing event count..."
	.align 8
.LC63:
	.string	"Could not write event count: %s"
.LC64:
	.string	"Unexpected mode on finish"
	.text
	.globl	record
	.type	record, @function
record:
.LFB47:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2640
	mov	QWORD PTR -2632[rbp], rdi
	mov	DWORD PTR -2636[rbp], esi
	mov	DWORD PTR -2640[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -2640[rbp]
	mov	rax, QWORD PTR -2632[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	init_recording
	mov	QWORD PTR -2592[rbp], rax
	cmp	QWORD PTR -2592[rbp], 0
	jne	.L277
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -2632[rbp]
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L277:
	lea	rax, -2560[rbp]
	mov	rdi, rax
	call	init_input_devices
	cmp	DWORD PTR -2640[rbp], 0
	jne	.L278
	lea	rax, -2560[rbp]
	mov	rdi, rax
	call	init_general_input_devices
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], 0
	je	.L279
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -2616[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L279:
	mov	rdx, QWORD PTR -2592[rbp]
	lea	rax, -2560[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_general_input_devices
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], 0
	je	.L280
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -2616[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC52[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L278:
	cmp	DWORD PTR -2640[rbp], 1
	jne	.L281
	lea	rdx, -2368[rbp]
	lea	rax, -2560[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	init_gamepad_input_devices
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], 123
	jne	.L282
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 47
	mov	esi, 1
	lea	rdi, .LC53[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L282:
	cmp	DWORD PTR -2616[rbp], 0
	je	.L283
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -2616[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC54[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L283:
	lea	rdx, -2368[rbp]
	mov	rax, QWORD PTR -2592[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_device_info
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], 0
	je	.L280
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -2616[rbp]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC55[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L281:
	mov	rax, QWORD PTR -2592[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC56[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L280:
	lea	rax, -2496[rbp]
	mov	rdi, rax
	call	sigemptyset@PLT
	lea	rax, -2496[rbp]
	mov	rdi, rax
	call	block_sigterm
	mov	QWORD PTR -2600[rbp], 0
	mov	rax, QWORD PTR -2592[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -2584[rbp], rax
	mov	rdx, QWORD PTR -2592[rbp]
	lea	rax, -2600[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], 0
	jg	.L285
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC57[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L285:
	lea	rax, -12[rbp]
	mov	edx, 4
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -2612[rbp], 0
	mov	DWORD PTR -2624[rbp], 0
	lea	rdi, .LC58[rip]
	call	puts@PLT
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	lea	rsi, exitHandler[rip]
	mov	edi, 2
	call	signal@PLT
.L300:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2368[rbp]
	mov	rdi, rdx
#APP
# 1101 "the_stack_data/903504.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2608[rbp], edx
	mov	DWORD PTR -2604[rbp], eax
	mov	rax, QWORD PTR -2368[rbp]
	or	rax, 1
	mov	QWORD PTR -2368[rbp], rax
	mov	DWORD PTR -2620[rbp], 0
	jmp	.L286
.L287:
	mov	rdx, QWORD PTR -2544[rbp]
	mov	eax, DWORD PTR -2620[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -2368[rbp+rax*8]
	mov	rdx, QWORD PTR -2544[rbp]
	mov	eax, DWORD PTR -2620[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -2368[rbp+rax*8], rdx
	add	DWORD PTR -2620[rbp], 1
.L286:
	mov	eax, DWORD PTR -2560[rbp]
	cmp	DWORD PTR -2620[rbp], eax
	jl	.L287
	mov	eax, DWORD PTR -2636[rbp]
	cdqe
	mov	QWORD PTR -2576[rbp], rax
	mov	QWORD PTR -2568[rbp], 0
	mov	eax, DWORD PTR -2536[rbp]
	lea	edi, 1[rax]
	lea	rcx, -2496[rbp]
	lea	rdx, -2576[rbp]
	lea	rax, -2368[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	pselect@PLT
	mov	DWORD PTR -2616[rbp], eax
	mov	eax, DWORD PTR EXIT[rip]
	test	eax, eax
	jne	.L308
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L309
	cmp	DWORD PTR -2616[rbp], 0
	je	.L310
	mov	eax, DWORD PTR wait_for_stdin[rip]
	test	eax, eax
	je	.L292
	mov	rax, QWORD PTR -2368[rbp]
	and	eax, 1
	test	rax, rax
	je	.L292
	lea	rax, -2528[rbp]
	mov	edx, 32
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -2624[rbp]
	mov	WORD PTR -2528[rbp], ax
	mov	WORD PTR -2504[rbp], 1
	mov	WORD PTR -2502[rbp], 28
	mov	DWORD PTR -2500[rbp], 0
	lea	rax, -2528[rbp]
	add	rax, 8
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	lea	rdx, -2528[rbp]
	mov	rax, QWORD PTR -2592[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_replay_event
	lea	rax, -2528[rbp]
	mov	edx, 32
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -2624[rbp]
	mov	WORD PTR -2528[rbp], ax
	mov	WORD PTR -2504[rbp], 0
	mov	WORD PTR -2502[rbp], 0
	mov	DWORD PTR -2500[rbp], 0
	lea	rax, -2528[rbp]
	add	rax, 8
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	lea	rdx, -2528[rbp]
	mov	rax, QWORD PTR -2592[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_replay_event
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L311
	lea	rdi, .LC59[rip]
	call	puts@PLT
	jmp	.L311
.L292:
	mov	DWORD PTR -2620[rbp], 0
	jmp	.L294
.L299:
	mov	rdx, QWORD PTR -2544[rbp]
	mov	eax, DWORD PTR -2620[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2368[rbp+rax*8]
	mov	rdx, QWORD PTR -2544[rbp]
	mov	eax, DWORD PTR -2620[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L295
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L296
	mov	rdx, QWORD PTR -2552[rbp]
	mov	eax, DWORD PTR -2620[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC60[rip]
	mov	eax, 0
	call	printf@PLT
.L296:
	lea	rax, -2528[rbp]
	mov	edx, 32
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -2620[rbp]
	mov	WORD PTR -2528[rbp], ax
	mov	rdx, QWORD PTR -2544[rbp]
	mov	eax, DWORD PTR -2620[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, -2528[rbp]
	lea	rcx, 8[rdx]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -2616[rbp], eax
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L297
	mov	esi, DWORD PTR -2500[rbp]
	movzx	eax, WORD PTR -2502[rbp]
	movzx	ecx, ax
	movzx	eax, WORD PTR -2504[rbp]
	movzx	edx, ax
	mov	eax, DWORD PTR -2616[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC61[rip]
	mov	eax, 0
	call	printf@PLT
.L297:
	movzx	eax, WORD PTR -2504[rbp]
	cmp	ax, 1
	jne	.L298
	movzx	eax, WORD PTR -2502[rbp]
	cmp	ax, 28
	jne	.L298
	mov	eax, DWORD PTR -2500[rbp]
	cmp	eax, 1
	jne	.L298
	mov	eax, DWORD PTR -2620[rbp]
	mov	DWORD PTR -2624[rbp], eax
.L298:
	lea	rdx, -2528[rbp]
	mov	rax, QWORD PTR -2592[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_replay_event
	mov	rax, QWORD PTR -2600[rbp]
	add	rax, 1
	mov	QWORD PTR -2600[rbp], rax
.L295:
	add	DWORD PTR -2620[rbp], 1
.L294:
	mov	eax, DWORD PTR -2560[rbp]
	cmp	DWORD PTR -2620[rbp], eax
	jl	.L299
	jmp	.L300
.L308:
	nop
	jmp	.L289
.L309:
	nop
	jmp	.L289
.L310:
	nop
	jmp	.L289
.L311:
	nop
.L289:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L301
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	printf@PLT
.L301:
	mov	rcx, QWORD PTR -2584[rbp]
	mov	rax, QWORD PTR -2592[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], -1
	jne	.L302
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC63[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L302:
	mov	rdx, QWORD PTR -2592[rbp]
	lea	rax, -2600[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 8
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -2616[rbp], eax
	cmp	DWORD PTR -2616[rbp], 0
	jg	.L303
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC63[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L303:
	mov	rax, QWORD PTR -2592[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -2640[rbp], 0
	jne	.L304
	lea	rax, -2560[rbp]
	mov	rdi, rax
	call	fini_general_input_devices
	jmp	.L276
.L304:
	cmp	DWORD PTR -2640[rbp], 1
	jne	.L306
	lea	rax, -2560[rbp]
	mov	rdi, rax
	call	fini_gamepad_input_devices
	jmp	.L276
.L306:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC64[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L276:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L307
	call	__stack_chk_fail@PLT
.L307:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE47:
	.size	record, .-record
	.section	.rodata
.LC65:
	.string	"recording version: %u\n"
.LC66:
	.string	"recording type: %i\n"
	.align 8
.LC67:
	.string	"number of recorded events: %lu\n"
.LC68:
	.string	"devices:"
.LC69:
	.string	"%2i: %s\n"
.LC70:
	.string	"Unexpected recording type: %d"
.LC71:
	.string	"\nevents:"
	.align 8
.LC72:
	.string	"%ld.%06ld dev: %d type: %d code: %d value %d\n"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB48:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	init_revent_recording
	lea	rdx, -80[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_revent_recording_or_die
	movzx	eax, WORD PTR -80[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC65[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC66[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC67[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -76[rbp]
	test	eax, eax
	jne	.L313
	lea	rdi, .LC68[rip]
	call	puts@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L314
.L315:
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC69[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -88[rbp], 1
.L314:
	mov	eax, DWORD PTR -72[rbp]
	cmp	DWORD PTR -88[rbp], eax
	jl	.L315
	jmp	.L316
.L313:
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, 1
	jne	.L317
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	print_device_info
	jmp	.L316
.L317:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edx, DWORD PTR -76[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC70[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L316:
	lea	rdi, .LC71[rip]
	call	puts@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L318
.L319:
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	mov	esi, DWORD PTR 28[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	movzx	eax, WORD PTR 26[rax]
	movzx	r8d, ax
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	movzx	eax, WORD PTR 24[rax]
	movzx	edi, ax
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movsx	ecx, ax
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	r9, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 5
	add	rax, r9
	mov	rax, QWORD PTR 8[rax]
	sub	rsp, 8
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	rsi, rax
	lea	rdi, .LC72[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	add	DWORD PTR -88[rbp], 1
.L318:
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	cmp	rdx, rax
	jb	.L319
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	fini_revent_recording
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L320
	call	__stack_chk_fail@PLT
.L320:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE48:
	.size	dump, .-dump
	.section	.rodata
	.align 8
.LC73:
	.string	"Opening input devices for playback"
	.align 8
.LC74:
	.string	"Creating gamepad playback device"
.LC75:
	.string	"Unexpected recording mod: %d"
.LC76:
	.string	"Adjusting event timestamps"
.LC77:
	.string	"Starting payback"
	.align 8
.LC78:
	.string	"now %u.%u desiredtime %u.%u sleeping %u uS\n"
.LC79:
	.string	"Could not replay event"
	.align 8
.LC80:
	.string	"replayed event: type %d code %d value %d\n"
	.text
	.globl	replay
	.type	replay, @function
replay:
.LFB49:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	QWORD PTR -232[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	init_revent_recording
	lea	rdx, -80[rbp]
	mov	rax, QWORD PTR -232[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_revent_recording_or_die
	mov	eax, DWORD PTR -76[rbp]
	test	eax, eax
	je	.L322
	cmp	eax, 1
	je	.L323
	jmp	.L348
.L322:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L325
	lea	rdi, .LC73[rip]
	call	puts@PLT
.L325:
	lea	rax, -80[rbp]
	add	rax, 8
	mov	rdi, rax
	call	open_general_input_devices_for_playback_or_die
	jmp	.L326
.L323:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L327
	lea	rdi, .LC74[rip]
	call	puts@PLT
.L327:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -80[rbp]
	add	rdx, 8
	mov	rsi, rax
	mov	rdi, rdx
	call	open_gamepad_input_devices_for_playback_or_die
	jmp	.L326
.L348:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edx, DWORD PTR -76[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC75[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L326:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L328
	lea	rdi, .LC76[rip]
	call	puts@PLT
.L328:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	adjust_event_times
	lea	rax, -144[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -192[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	QWORD PTR -200[rbp], 0
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L330
	lea	rdi, .LC77[rip]
	call	puts@PLT
	jmp	.L330
.L345:
	lea	rax, -176[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	QWORD PTR -160[rbp], rax
	mov	rdx, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	cmp	rax, 999999
	jle	.L331
	mov	rax, QWORD PTR -160[rbp]
	add	rax, 1
	mov	QWORD PTR -160[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	sub	rax, 1000000
	mov	QWORD PTR -152[rbp], rax
.L331:
	mov	rdx, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR -176[rbp]
	cmp	rdx, rax
	jne	.L332
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -168[rbp]
	cmp	rdx, rax
	setg	al
	jmp	.L333
.L332:
	mov	rdx, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR -176[rbp]
	cmp	rdx, rax
	setg	al
.L333:
	test	al, al
	je	.L334
	mov	rax, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -176[rbp]
	sub	rax, rdx
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	sub	rax, rdx
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	test	rax, rax
	jns	.L335
	mov	rax, QWORD PTR -128[rbp]
	sub	rax, 1
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	add	rax, 1000000
	mov	QWORD PTR -120[rbp], rax
.L335:
	mov	rax, QWORD PTR -128[rbp]
	imul	edx, eax, 1000000
	mov	rax, QWORD PTR -120[rbp]
	add	eax, edx
	mov	DWORD PTR -208[rbp], eax
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L336
	mov	rax, QWORD PTR -152[rbp]
	mov	edi, eax
	mov	rax, QWORD PTR -160[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -168[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -176[rbp]
	mov	esi, eax
	mov	eax, DWORD PTR -208[rbp]
	mov	r9d, eax
	mov	r8d, edi
	lea	rdi, .LC78[rip]
	mov	eax, 0
	call	printf@PLT
.L336:
	mov	eax, DWORD PTR -208[rbp]
	mov	edi, eax
	call	usleep@PLT
.L334:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -200[rbp]
	sal	rax, 5
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cwde
	mov	DWORD PTR -212[rbp], eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -200[rbp]
	sal	rax, 5
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR 8[rcx]
	mov	rdx, QWORD PTR 16[rcx]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR 24[rcx]
	mov	QWORD PTR -96[rbp], rax
	jmp	.L337
.L344:
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rcx, -112[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -204[rbp], eax
	cmp	DWORD PTR -204[rbp], 24
	je	.L338
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC79[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L338:
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L339
	mov	ecx, DWORD PTR -92[rbp]
	movzx	eax, WORD PTR -94[rbp]
	movzx	edx, ax
	movzx	eax, WORD PTR -96[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC80[rip]
	mov	eax, 0
	call	printf@PLT
.L339:
	add	QWORD PTR -200[rbp], 1
	mov	rax, QWORD PTR -32[rbp]
	cmp	QWORD PTR -200[rbp], rax
	jnb	.L349
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -200[rbp]
	sal	rax, 5
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cwde
	mov	DWORD PTR -212[rbp], eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -200[rbp]
	sal	rax, 5
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR 8[rcx]
	mov	rdx, QWORD PTR 16[rcx]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR 24[rcx]
	mov	QWORD PTR -96[rbp], rax
.L337:
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -144[rbp]
	cmp	rdx, rax
	jne	.L342
	mov	rdx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -136[rbp]
	cmp	rdx, rax
	sete	al
	jmp	.L343
.L342:
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -144[rbp]
	cmp	rdx, rax
	sete	al
.L343:
	test	al, al
	jne	.L344
	jmp	.L341
.L349:
	nop
.L341:
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -136[rbp], rdx
.L330:
	mov	rax, QWORD PTR -32[rbp]
	cmp	QWORD PTR -200[rbp], rax
	jb	.L345
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, 1
	jne	.L346
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	destroy_replay_device
.L346:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	fini_revent_recording
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L347
	call	__stack_chk_fail@PLT
.L347:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE49:
	.size	replay, .-replay
	.section	.rodata
	.align 8
.LC81:
	.string	"Could not read input devices: %s"
.LC82:
	.string	"DEVICE %d\n"
.LC83:
	.string	"device path: %s\n"
.LC84:
	.string	"yes"
.LC85:
	.string	"no"
.LC86:
	.string	"is gamepad: %s\n"
	.text
	.globl	info
	.type	info, @function
info:
.LFB50:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2416
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -2400[rbp]
	mov	rdi, rax
	call	init_input_devices
	lea	rax, -2400[rbp]
	mov	rdi, rax
	call	init_general_input_devices
	mov	DWORD PTR -2404[rbp], eax
	cmp	DWORD PTR -2404[rbp], 0
	je	.L351
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC81[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L351:
	mov	DWORD PTR -2408[rbp], 0
	jmp	.L352
.L357:
	mov	rdx, QWORD PTR -2384[rbp]
	mov	eax, DWORD PTR -2408[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, -2368[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	get_device_info
	mov	DWORD PTR -2404[rbp], eax
	cmp	DWORD PTR -2404[rbp], 0
	je	.L353
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -2392[rbp]
	mov	eax, DWORD PTR -2408[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L354
.L353:
	mov	eax, DWORD PTR -2408[rbp]
	mov	esi, eax
	lea	rdi, .LC82[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -2392[rbp]
	mov	eax, DWORD PTR -2408[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC83[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -2368[rbp]
	mov	rdi, rax
	call	is_gamepad
	test	eax, eax
	je	.L355
	lea	rax, .LC84[rip]
	jmp	.L356
.L355:
	lea	rax, .LC85[rip]
.L356:
	mov	rsi, rax
	lea	rdi, .LC86[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -2368[rbp]
	mov	rdi, rax
	call	print_device_info
	mov	edi, 10
	call	putchar@PLT
.L354:
	add	DWORD PTR -2408[rbp], 1
.L352:
	mov	eax, DWORD PTR -2400[rbp]
	cmp	DWORD PTR -2408[rbp], eax
	jl	.L357
	lea	rax, -2400[rbp]
	mov	rdi, rax
	call	fini_general_input_devices
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L358
	call	__stack_chk_fail@PLT
.L358:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE50:
	.size	info, .-info
	.section	.rodata
	.align 8
.LC87:
	.ascii	"usage:\n    revent [-h] [-v] COMMAND [OPTIONS] \n\n    Optio"
	.ascii	"ns:\n        -h  print this help message and quit.\n        "
	.ascii	"-v  enable verbose output.\n\n    Commands:\n        record "
	.ascii	"[-t SECONDS] [-d DEVICE] FILE\n            Record input even"
	.ascii	"t. stops after return on STDIN (or, optionally, \n          "
	.ascii	"  a fixed delay)\n\n                FILE       file into whi"
	.ascii	"ch events will be recorded.\n                -t SECONDS time"
	.ascii	", in seconds, for which to record events.\n                 "
	.ascii	"          if not specified, recording will continue until\n "
	.ascii	"                          return key is pressed.\n          "
	.ascii	"      -d DEVICE  the number of the input device form which\n"
	.ascii	"                           events will be recorded. If not s"
	.ascii	"pecified, \n                           all available inputs "
	.ascii	"will be used.\n                -s         Recording will not"
	.ascii	" be stopped if there is \n                           input o"
	.ascii	"n STDIN.\n                -g         Record in \"gamepad\" m"
	.ascii	"ode. A gamepad must be \n                           connecte"
	.ascii	"d to the device. The recording will only\n                  "
	.ascii	"         be done for the gamepad and other input devices\n  "
	.ascii	"                         will not be recorded. In addition t"
	.ascii	"o the input\n                           events, the informat"
	.ascii	"ion about the gamepad will\n                           also "
	.ascii	"be stored in the recording. When this\n                     "
	.ascii	"      recording is played back, revent will first\n         "
	.ascii	"                  create a virtual gamepad device based on t"
	.ascii	"he\n                           stored info and the event wil"
	.ascii	"l be played back\n                           into it. This t"
	.ascii	"ype of recording should be more\n                           "
	.ascii	"portable across different devices.\n\n        replay FILE\n "
	.ascii	"           replays previously recorded events from the speci"
	.ascii	"fied file.\n\n                FILE       file into which eve"
	.ascii	"nts will be recorded.\n\n        dump FILE\n            dump"
	.ascii	"s the contents of the specified event log to STDOUT in\n    "
	.ascii	"        human-readable form.\n\n                FILE       e"
	.ascii	"vent"
	.string	" log which will be dumped.\n\n        info\n             shows info about each event char device\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB51:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC87[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE51:
	.size	usage, .-usage
	.section	.rodata
.LC88:
	.string	"timeout: %d\n"
	.align 8
.LC89:
	.string	"-t parameter must be numeric; got %s."
.LC90:
	.string	"device: %d\n"
	.align 8
.LC91:
	.string	"-d parameter must be numeric; got %s."
.LC92:
	.string	"Unexpected option: %c"
.LC93:
	.string	"hgt:d:vs"
.LC94:
	.string	"Must specify a command."
.LC95:
	.string	"record"
.LC96:
	.string	"replay"
.LC97:
	.string	"dump"
.LC98:
	.string	"info"
.LC99:
	.string	"Unknown command -- %s"
.LC100:
	.string	"file: %s\n"
	.align 8
.LC101:
	.string	"Trailling arguments (use -h for help)."
	.align 8
.LC102:
	.string	"-t parameter is only valid for \"record\" command."
	.align 8
.LC103:
	.string	"-d parameter is only valid for \"record\" command."
	.align 8
.LC104:
	.string	"File path cannot be specified for \"info\" command."
	.align 8
.LC105:
	.string	"Must specify a file for recording/replaying (use -h for help)."
	.text
	.globl	revent_args_init
	.type	revent_args_init, @function
revent_args_init:
.LFB52:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	edi, 24
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 4
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 2147483647
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rax], -1
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	jmp	.L361
.L374:
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 100
	cmp	eax, 18
	ja	.L362
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L364[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L364[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L364:
	.long	.L369-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L368-.L364
	.long	.L367-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L362-.L364
	.long	.L366-.L364
	.long	.L365-.L364
	.long	.L362-.L364
	.long	.L363-.L364
	.text
.L367:
	mov	eax, 0
	call	usage
	mov	edi, 0
	call	exit@PLT
.L368:
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 1
	jmp	.L361
.L365:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	is_numeric
	test	eax, eax
	je	.L370
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L361
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC88[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L361
.L370:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC89[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L369:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	is_numeric
	test	eax, eax
	je	.L372
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 12[rdx], eax
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L361
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	esi, eax
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L361
.L372:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rdx, QWORD PTR optarg[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC91[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L363:
	mov	DWORD PTR verbose[rip], 1
	jmp	.L361
.L366:
	mov	DWORD PTR wait_for_stdin[rip], 0
	jmp	.L361
.L362:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -16[rbp]
	lea	rsi, .LC92[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L361:
	mov	rcx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -28[rbp]
	lea	rdx, .LC93[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	jne	.L374
	mov	eax, DWORD PTR optind[rip]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jne	.L375
	mov	eax, 0
	call	usage
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC94[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L375:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC95[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L376
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L377
.L376:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC96[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L378
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L377
.L378:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC97[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L379
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 2
	jmp	.L377
.L379:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC98[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L380
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 3
	jmp	.L377
.L380:
	mov	eax, 0
	call	usage
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC99[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L377:
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	je	.L381
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	eax, DWORD PTR verbose[rip]
	test	eax, eax
	je	.L382
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rsi, rax
	lea	rdi, .LC100[rip]
	mov	eax, 0
	call	printf@PLT
.L382:
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	je	.L381
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 38
	mov	esi, 1
	lea	rdi, .LC101[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L381:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L383
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 2147483647
	je	.L383
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 48
	mov	esi, 1
	lea	rdi, .LC102[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L383:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L384
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, -1
	je	.L384
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 48
	mov	esi, 1
	lea	rdi, .LC103[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L384:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	jne	.L385
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L385
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 49
	mov	esi, 1
	lea	rdi, .LC104[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L385:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L386
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	jne	.L388
.L386:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L388
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 62
	mov	esi, 1
	lea	rdi, .LC105[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
.L388:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE52:
	.size	revent_args_init, .-revent_args_init
	.globl	revent_args_close
	.type	revent_args_close, @function
revent_args_close:
.LFB53:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE53:
	.size	revent_args_close, .-revent_args_close
	.globl	main
	.type	main, @function
main:
.LFB54:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	rdx, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	lea	rax, -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	revent_args_init
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	je	.L392
	cmp	eax, 3
	ja	.L393
	cmp	eax, 2
	je	.L394
	cmp	eax, 2
	ja	.L393
	test	eax, eax
	je	.L395
	cmp	eax, 1
	je	.L396
	jmp	.L393
.L395:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	esi, ecx
	mov	rdi, rax
	call	record
	jmp	.L393
.L396:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	replay
	jmp	.L393
.L394:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	dump
	jmp	.L393
.L392:
	call	info
	nop
.L393:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	revent_args_close
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L398
	call	__stack_chk_fail@PLT
.L398:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.section	.rodata
	.align 16
	.type	nybble_lookup.0, @object
	.size	nybble_lookup.0, 16
nybble_lookup.0:
	.string	""
	.ascii	"\001\001\002\001\002\002\003\001\002\002\003\002\003\003\004"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"903504.c"
	.text
	.global	MAGIC
	.section	.rodata
	.align	2
	.type	MAGIC, %object
	.size	MAGIC, 7
MAGIC:
	.ascii	"REVENT\000"
	.global	FORMAT_VERSION
	.data
	.align	1
	.type	FORMAT_VERSION, %object
	.size	FORMAT_VERSION, 2
FORMAT_VERSION:
	.short	2
	.global	verbose
	.bss
	.align	2
	.type	verbose, %object
	.size	verbose, 4
verbose:
	.space	4
	.global	wait_for_stdin
	.data
	.align	2
	.type	wait_for_stdin, %object
	.size	wait_for_stdin, 4
wait_for_stdin:
	.word	1
	.text
	.align	2
	.global	is_numeric
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_numeric, %function
is_numeric:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L3
	mov	r3, #0
	b	.L4
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L5
	mov	r3, #1
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_numeric, .-is_numeric
	.align	2
	.global	test_bit
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_bit, %function
test_bit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-12]
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	mov	r2, #1
	lsl	r3, r2, r3
	and	r3, r3, r1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	test_bit, .-test_bit
	.align	2
	.global	count_bits
	.syntax unified
	.arm
	.fpu softvfp
	.type	count_bits, %function
count_bits:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L10:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	and	r3, r3, #15
	ldr	r2, .L12
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #255
	mov	r1, r3
	ldr	r3, .L12
	ldrb	r3, [r3, r1]	@ zero_extendqisi2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	cmp	r3, #95
	ble	.L10
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L13:
	.align	2
.L12:
	.word	nybble_lookup.6794
	.size	count_bits, .-count_bits
	.align	2
	.global	is_gamepad
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_gamepad, %function
is_gamepad:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #264
	add	r3, r3, #3
	mov	r1, #0
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	mov	r3, #0
	b	.L16
.L15:
	ldr	r3, [fp, #-8]
	add	r3, r3, #264
	add	r3, r3, #3
	mov	r1, #1
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	mov	r3, #0
	b	.L16
.L17:
	ldr	r3, [fp, #-8]
	add	r3, r3, #456
	add	r3, r3, #3
	mov	r1, #304
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	mov	r3, #0
	b	.L16
.L18:
	mov	r3, #1
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_gamepad, .-is_gamepad
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: \000"
	.align	2
.LC1:
	.ascii	"Cannot determine size of %s: %s\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_file_size
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_file_size, %function
get_file_size:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #108
	str	r0, [fp, #-112]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-64]
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	b	.L23
.L20:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L24+8
	bl	fwrite
	ldr	r3, .L24+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-112]
	ldr	r1, .L24+12
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L23:
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	get_file_size, .-get_file_size
	.align	2
	.global	get_device_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_device_info, %function
get_device_info:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r2, #2352
	mov	r1, #0
	ldr	r0, [fp, #-28]
	bl	memset
	ldr	r3, [fp, #-28]
	mov	r2, r3
	ldr	r1, .L39
	ldr	r0, [fp, #-24]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L27
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L28
.L27:
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	mov	r2, r3
	ldr	r1, .L39+4
	ldr	r0, [fp, #-24]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L28
.L29:
	ldr	r3, [fp, #-28]
	add	r3, r3, #260
	add	r3, r3, #3
	mov	r2, r3
	ldr	r1, .L39+8
	ldr	r0, [fp, #-24]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L30
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L28
.L30:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L31
.L38:
	ldr	r3, [fp, #-28]
	add	r3, r3, #260
	add	r3, r3, #3
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L33
	ldr	r3, [fp, #-16]
	add	r3, r3, #32
	ldr	r1, .L39+12
	orr	r1, r3, r1
	ldr	r3, [fp, #-28]
	add	r3, r3, #264
	add	r3, r3, #3
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	ioctl
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L34
.L36:
	ldr	r3, [fp, #-28]
	add	r3, r3, #264
	add	r3, r3, #3
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	beq	.L35
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #556]
	add	r1, r2, #1
	ldr	r3, [fp, #-28]
	str	r1, [r3, #556]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #560
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-12]
	add	r3, r3, #64
	mov	r2, r3
	ldr	r3, .L39+16
	orr	r3, r2, r3
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	ioctl
.L35:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L34:
	ldr	r3, [fp, #-12]
	ldr	r2, .L39+20
	cmp	r3, r2
	ble	.L36
	b	.L32
.L33:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L37
	ldr	r3, [fp, #-16]
	add	r3, r3, #32
	ldr	r1, .L39+12
	orr	r1, r3, r1
	ldr	r3, [fp, #-28]
	add	r3, r3, #360
	add	r3, r3, #3
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	ioctl
	b	.L32
.L37:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L32
	ldr	r3, [fp, #-16]
	add	r3, r3, #32
	ldr	r1, .L39+12
	orr	r1, r3, r1
	ldr	r3, [fp, #-28]
	add	r3, r3, #456
	add	r3, r3, #3
	mov	r2, r3
	ldr	r0, [fp, #-24]
	bl	ioctl
.L32:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L31:
	ldr	r3, [fp, #-16]
	cmp	r3, #30
	ble	.L38
	mov	r3, #0
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	-2146941694
	.word	-2130754298
	.word	-2147203808
	.word	-2141174528
	.word	-2145893120
	.word	766
	.size	get_device_info, .-get_device_info
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Could not destroy replay device\000"
	.text
	.align	2
	.global	destroy_replay_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	destroy_replay_device, %function
destroy_replay_device:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, .L44
	ldr	r0, [fp, #-8]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L43
	ldr	r3, .L44+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L44+8
	bl	fwrite
	ldr	r3, .L44+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L44+12
	bl	fwrite
	ldr	r3, .L44+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L43:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	21762
	.word	stderr
	.word	.LC0
	.word	.LC3
	.size	destroy_replay_device, .-destroy_replay_device
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Could not set EVBIT %i\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_evbit, %function
set_evbit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, .L49
	ldr	r0, [fp, #-8]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L48
	ldr	r3, .L49+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L49+8
	bl	fwrite
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L49+12
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L49+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L48:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	1074025828
	.word	stderr
	.word	.LC0
	.word	.LC4
	.size	set_evbit, .-set_evbit
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Could not set KEYBIT %i\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_keybit, %function
set_keybit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, .L54
	ldr	r0, [fp, #-8]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L53
	ldr	r3, .L54+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L54+8
	bl	fwrite
	ldr	r3, .L54+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L54+12
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L54+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L53:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	1074025829
	.word	stderr
	.word	.LC0
	.word	.LC5
	.size	set_keybit, .-set_keybit
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Could not set ABSBIT %i\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_absbit, %function
set_absbit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, .L59
	ldr	r0, [fp, #-8]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L58
	ldr	r3, .L59+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L59+8
	bl	fwrite
	ldr	r3, .L59+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L59+12
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L59+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L58:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L60:
	.align	2
.L59:
	.word	1074025831
	.word	stderr
	.word	.LC0
	.word	.LC6
	.size	set_absbit, .-set_absbit
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Could not set RELBIT %i\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_relbit, %function
set_relbit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, .L64
	ldr	r0, [fp, #-8]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L63
	ldr	r3, .L64+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L64+8
	bl	fwrite
	ldr	r3, .L64+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L64+12
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L64+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L63:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	1074025830
	.word	stderr
	.word	.LC0
	.word	.LC7
	.size	set_relbit, .-set_relbit
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	block_sigterm, %function
block_sigterm:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	ldr	r3, .L68
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #136
	mov	r0, r3
	bl	sigemptyset
	sub	r3, fp, #136
	mov	r1, #15
	mov	r0, r3
	bl	sigaddset
	sub	r3, fp, #136
	ldr	r2, [fp, #-144]
	mov	r1, r3
	mov	r0, #0
	bl	sigprocmask
	nop
	ldr	r3, .L68
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L67
	bl	__stack_chk_fail
.L67:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC8
	.size	block_sigterm, .-block_sigterm
	.section	.rodata
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	adjust_event_times
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust_event_times, %function
adjust_event_times:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	str	r0, [fp, #-48]
	ldr	r3, .L78
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	add	r3, r3, #32
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L77
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #40]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #40]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-28]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	b	.L73
.L75:
	ldr	r3, [fp, #-48]
	ldr	r1, [r3, #40]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-48]
	ldr	r1, [r3, #40]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L74
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #999424
	add	r3, r3, #576
	str	r3, [fp, #-20]
.L74:
	ldr	r3, [fp, #-48]
	ldr	r1, [r3, #40]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-48]
	ldr	r1, [r3, #40]
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [fp, #-20]
	str	r2, [r3, #8]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-44]
	str	r5, [fp, #-40]
.L73:
	ldr	r3, [fp, #-48]
	add	r3, r3, #32
	ldmia	r3, {r2-r3}
	sub	r1, fp, #44
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bcc	.L75
	b	.L70
.L77:
	nop
.L70:
	ldr	r3, .L78
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L76
	bl	__stack_chk_fail
.L76:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L79:
	.align	2
.L78:
	.word	.LC9
	.size	adjust_event_times, .-adjust_event_times
	.section	.rodata
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_record_header
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_record_header, %function
write_record_header:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L88
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #6
	ldr	r1, .L88+4
	ldr	r0, [fp, #-24]
	bl	write
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #5
	bgt	.L81
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L86
.L81:
	ldr	r3, [fp, #-28]
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	write
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bhi	.L83
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L86
.L83:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	write
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bhi	.L84
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L86
.L84:
	sub	r3, fp, #16
	mov	r2, #6
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #16
	mov	r2, #6
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	write
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #5
	bgt	.L85
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L86
.L85:
	mov	r3, #0
.L86:
	ldr	r2, .L88
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L87
	bl	__stack_chk_fail
.L87:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L89:
	.align	2
.L88:
	.word	.LC10
	.word	MAGIC
	.size	write_record_header, .-write_record_header
	.section	.rodata
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_record_header
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_record_header, %function
read_record_header:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L100
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r2, #6
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #5
	bgt	.L91
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L98
.L91:
	mov	r3, #0
	strb	r3, [fp, #-10]
	sub	r3, fp, #16
	ldr	r1, .L100+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L93
	mov	r3, #22
	b	.L98
.L93:
	ldr	r3, [fp, #-36]
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bhi	.L94
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L98
.L94:
	ldr	r3, [fp, #-36]
	ldrh	r3, [r3]
	cmp	r3, #1
	bls	.L95
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bhi	.L96
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L98
.L96:
	sub	r3, fp, #24
	mov	r2, #6
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #5
	bgt	.L97
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L98
.L95:
	ldr	r3, [fp, #-36]
	mov	r2, #0
	str	r2, [r3, #4]
.L97:
	mov	r3, #0
.L98:
	ldr	r2, .L100
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L99
	bl	__stack_chk_fail
.L99:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L101:
	.align	2
.L100:
	.word	.LC11
	.word	MAGIC
	.size	read_record_header, .-read_record_header
	.section	.rodata
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_general_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_general_input_devices, %function
write_general_input_devices:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L111
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-24]
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L103
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L109
.L103:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L105
.L108:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-20]
	sub	r0, fp, #20
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L106
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L109
.L106:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	mov	r1, #1
	bl	fwrite
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bcs	.L107
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L109
.L107:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L105:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L108
	mov	r3, #0
.L109:
	ldr	r2, .L111
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L110
	bl	__stack_chk_fail
.L110:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L112:
	.align	2
.L111:
	.word	.LC12
	.size	write_general_input_devices, .-write_general_input_devices
	.section	.rodata
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_general_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_general_input_devices, %function
read_general_input_devices:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L124
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r0, [fp, #-32]
	ldr	r3, [fp, #-36]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L114
	mov	r3, #5
	b	.L122
.L114:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L116
	mov	r3, #12
	b	.L122
.L116:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L117
.L121:
	sub	r0, fp, #28
	ldr	r3, [fp, #-36]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L118
	mov	r3, #5
	b	.L122
.L118:
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L119
	mov	r3, #12
	b	.L122
.L119:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-36]
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bcs	.L120
	mov	r3, #5
	b	.L122
.L120:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L117:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L121
	mov	r3, #0
.L122:
	ldr	r2, .L124
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L123
	bl	__stack_chk_fail
.L123:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L125:
	.align	2
.L124:
	.word	.LC13
	.size	read_general_input_devices, .-read_general_input_devices
	.align	2
	.global	write_input_id
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_input_id, %function
write_input_id:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #2
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #4
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #6
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	bgt	.L127
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L128
.L127:
	mov	r3, #0
.L128:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	write_input_id, .-write_input_id
	.align	2
	.global	read_input_id
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_input_id, %function
read_input_id:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #2
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #4
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #6
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	bgt	.L130
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L131
.L130:
	mov	r3, #0
.L131:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	read_input_id, .-read_input_id
	.align	2
	.global	write_absinfo
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_absinfo, %function
write_absinfo:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #24
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #4
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #8
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #12
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #16
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #20
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	bgt	.L133
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L134
.L133:
	mov	r3, #0
.L134:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	write_absinfo, .-write_absinfo
	.align	2
	.global	read_absinfo
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_absinfo, %function
read_absinfo:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #24
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #4
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #8
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #12
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #16
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r0, r3, #20
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	bgt	.L136
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L137
.L136:
	mov	r3, #0
.L137:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	read_absinfo, .-read_absinfo
	.section	.rodata
	.align	2
.LC14:
	.ascii	"EV_BITS_SIZE: %d\012\000"
	.align	2
.LC15:
	.ascii	"KEY_BITS_SIZE: %d\012\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_device_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_device_info, %function
write_device_info:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L149
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	write_input_id
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L139
	ldr	r3, [fp, #-12]
	b	.L147
.L139:
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-20]
	sub	r0, fp, #20
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #8
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bls	.L141
	mov	r3, #5
	b	.L147
.L141:
	ldr	r3, [fp, #-28]
	add	r0, r3, #260
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #4
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #264
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #96
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #360
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #96
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #456
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #96
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #292
	bge	.L142
	mov	r3, #5
	b	.L147
.L142:
	mov	r1, #4
	ldr	r0, .L149+4
	bl	printf
	mov	r1, #96
	ldr	r0, .L149+8
	bl	printf
	ldr	r3, [fp, #-28]
	add	r0, r3, #556
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L143
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L147
.L143:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L144
.L146:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #560
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	write_absinfo
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L145
	ldr	r3, [fp, #-12]
	b	.L147
.L145:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L144:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #556]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bhi	.L146
	mov	r3, #0
.L147:
	ldr	r2, .L149
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L148
	bl	__stack_chk_fail
.L148:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L150:
	.align	2
.L149:
	.word	.LC16
	.word	.LC14
	.word	.LC15
	.size	write_device_info, .-write_device_info
	.section	.rodata
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_device_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_device_info, %function
read_device_info:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L163
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	read_input_id
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L152
	ldr	r3, [fp, #-12]
	b	.L161
.L152:
	mov	r3, #0
	str	r3, [fp, #-20]
	sub	r0, fp, #20
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L154
	mov	r3, #5
	b	.L161
.L154:
	ldr	r3, [fp, #-28]
	add	r0, r3, #8
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	mov	r1, #1
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bcs	.L155
	mov	r3, #5
	b	.L161
.L155:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	add	r0, r3, #260
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #4
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #264
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #96
	mov	r1, #1
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #360
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #96
	mov	r1, #1
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r0, r3, #456
	add	r0, r0, #3
	ldr	r3, [fp, #-24]
	mov	r2, #96
	mov	r1, #1
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #292
	bge	.L156
	mov	r3, #5
	b	.L161
.L156:
	ldr	r3, [fp, #-28]
	add	r0, r3, #556
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L157
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L161
.L157:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L158
.L160:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #560
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	read_absinfo
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L159
	ldr	r3, [fp, #-12]
	b	.L161
.L159:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L158:
	ldr	r3, [fp, #-28]
	ldr	r2, [r3, #556]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bhi	.L160
	mov	r3, #0
.L161:
	ldr	r2, .L163
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L162
	bl	__stack_chk_fail
.L162:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L164:
	.align	2
.L163:
	.word	.LC17
	.size	read_device_info, .-read_device_info
	.section	.rodata
	.align	2
.LC18:
	.ascii	"device name: %s\012\000"
	.align	2
.LC19:
	.ascii	"bustype: 0x%x vendor: 0x%x product: 0x%x version: 0"
	.ascii	"x%x\012\000"
	.align	2
.LC20:
	.ascii	"abs_bits: %d\012\000"
	.align	2
.LC21:
	.ascii	"rel_bits: %d\012\000"
	.align	2
.LC22:
	.ascii	"key_bits: %d\012\000"
	.align	2
.LC23:
	.ascii	"num_absinfo: %ld\012\000"
	.align	2
.LC24:
	.ascii	"KEY: \000"
	.align	2
.LC25:
	.ascii	"%04x \000"
	.align	2
.LC26:
	.ascii	"ABS:\000"
	.align	2
.LC27:
	.ascii	"%04x  : min %i, max %i, fuzz %0i, flat %i, res %i\012"
	.ascii	"\000"
	.text
	.align	2
	.global	print_device_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_device_info, %function
print_device_info:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L171
	bl	printf
	ldr	r3, [fp, #-24]
	ldrh	r3, [r3]
	mov	r1, r3
	ldr	r3, [fp, #-24]
	ldrh	r3, [r3, #2]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	ldrh	r3, [r3, #4]
	mov	r0, r3
	ldr	r3, [fp, #-24]
	ldrh	r3, [r3, #6]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L171+4
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #264
	add	r3, r3, #3
	mov	r0, r3
	bl	count_bits
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L171+8
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #360
	add	r3, r3, #3
	mov	r0, r3
	bl	count_bits
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L171+12
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #456
	add	r3, r3, #3
	mov	r0, r3
	bl	count_bits
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L171+16
	bl	printf
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #556]
	mov	r1, r3
	ldr	r0, .L171+20
	bl	printf
	ldr	r0, .L171+24
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L166
.L168:
	ldr	r3, [fp, #-24]
	add	r3, r3, #456
	add	r3, r3, #3
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	beq	.L167
	ldr	r1, [fp, #-16]
	ldr	r0, .L171+28
	bl	printf
.L167:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L166:
	ldr	r3, [fp, #-16]
	ldr	r2, .L171+32
	cmp	r3, r2
	ble	.L168
	mov	r0, #10
	bl	putchar
	ldr	r0, .L171+36
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L169
.L170:
	ldr	r1, [fp, #-24]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #584
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #560
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	ip, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #16]
	ldr	r1, [fp, #-8]
	ldr	r1, [r1, #20]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r1, [fp, #-12]
	ldr	r0, .L171+40
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L169:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #556]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bhi	.L170
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L172:
	.align	2
.L171:
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	766
	.word	.LC26
	.word	.LC27
	.size	print_device_info, .-print_device_info
	.section	.rodata
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	write_replay_event
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_replay_event, %function
write_replay_event:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L183
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-36]
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L174
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L181
.L174:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #4]
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r0, fp, #20
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #8
	bl	fwrite
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L176
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L181
.L176:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3, #8]
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	sub	r0, fp, #20
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #8
	bl	fwrite
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L177
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L181
.L177:
	ldr	r3, [fp, #-36]
	add	r0, r3, #12
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L178
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L181
.L178:
	ldr	r3, [fp, #-36]
	add	r0, r3, #14
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L179
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L181
.L179:
	ldr	r3, [fp, #-36]
	add	r0, r3, #16
	ldr	r3, [fp, #-32]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L180
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L181
.L180:
	mov	r3, #0
.L181:
	ldr	r2, .L183
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L182
	bl	__stack_chk_fail
.L182:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L184:
	.align	2
.L183:
	.word	.LC28
	.size	write_replay_event, .-write_replay_event
	.align	2
	.global	read_replay_event
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_replay_event, %function
read_replay_event:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L186
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L187
.L186:
	ldr	r3, [fp, #-20]
	add	r0, r3, #4
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #8
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L188
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L187
.L188:
	ldr	r3, [fp, #-20]
	add	r0, r3, #8
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #8
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L189
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L187
.L189:
	ldr	r3, [fp, #-20]
	add	r0, r3, #12
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L190
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L187
.L190:
	ldr	r3, [fp, #-20]
	add	r0, r3, #14
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #2
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L191
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L187
.L191:
	ldr	r3, [fp, #-20]
	add	r0, r3, #16
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L192
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L187
.L192:
	mov	r3, #0
.L187:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	read_replay_event, .-read_replay_event
	.section	.rodata
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_legacy_replay_event
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_legacy_replay_event, %function
read_legacy_replay_event:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L205
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-44]
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	bhi	.L194
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L195
	mvn	r3, #0
	b	.L203
.L195:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L194:
	sub	r3, fp, #12
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	bhi	.L197
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L197:
	sub	r3, fp, #28
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #7
	bhi	.L198
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L198:
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r3, r2
	str	r3, [fp, #-20]
	sub	r3, fp, #28
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #7
	bhi	.L199
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L199:
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	mov	r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	sub	r2, fp, #20
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bhi	.L200
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L200:
	ldr	r3, [fp, #-44]
	add	r3, r3, #14
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bhi	.L201
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L201:
	ldr	r3, [fp, #-44]
	add	r3, r3, #16
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	bhi	.L202
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L203
.L202:
	mov	r3, #0
.L203:
	ldr	r2, .L205
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L204
	bl	__stack_chk_fail
.L204:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L206:
	.align	2
.L205:
	.word	.LC29
	.size	read_legacy_replay_event, .-read_legacy_replay_event
	.section	.rodata
	.align	2
.LC30:
	.ascii	"r\000"
	.text
	.align	2
	.global	open_revent_recording
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_revent_recording, %function
open_revent_recording:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r1, .L212
	ldr	r0, [fp, #-16]
	bl	fopen
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L208
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L209
.L208:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r3, r0
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	read_record_header
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L210
	ldr	r3, [fp, #-8]
	b	.L209
.L210:
	ldr	r3, [fp, #-20]
	ldrh	r2, [r3]
	ldr	r3, .L212+4
	ldrh	r3, [r3]
	cmp	r2, r3
	bls	.L211
	mov	r3, #71
	b	.L209
.L211:
	mov	r3, #0
.L209:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L213:
	.align	2
.L212:
	.word	.LC30
	.word	FORMAT_VERSION
	.size	open_revent_recording, .-open_revent_recording
	.section	.rodata
	.align	2
.LC31:
	.ascii	"w\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_recording
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_recording, %function
init_recording:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L219
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L219+4
	ldrh	r3, [r3]
	strh	r3, [fp, #-16]	@ movhi
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-12]
	ldr	r1, .L219+8
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L215
	ldr	r3, [fp, #-20]
	b	.L217
.L215:
	ldr	r0, [fp, #-20]
	bl	fileno
	mov	r2, r0
	sub	r3, fp, #16
	mov	r1, r3
	mov	r0, r2
	bl	write_record_header
	ldr	r3, [fp, #-20]
.L217:
	ldr	r2, .L219
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L218
	bl	__stack_chk_fail
.L218:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L220:
	.align	2
.L219:
	.word	.LC32
	.word	FORMAT_VERSION
	.word	.LC31
	.size	init_recording, .-init_recording
	.align	2
	.global	init_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_input_devices, %function
init_input_devices:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mvn	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	init_input_devices, .-init_input_devices
	.section	.rodata
	.align	2
.LC33:
	.ascii	"/dev/input/event%d\000"
	.align	2
.LC34:
	.ascii	"opened %s\012\000"
	.align	2
.LC35:
	.ascii	"could not open %s\012\000"
	.align	2
.LC36:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_general_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_general_input_devices, %function
init_general_input_devices:
	@ args = 0, pretend = 0, frame = 576
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #580
	str	r0, [fp, #-584]
	ldr	r3, .L240
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-568]
	mov	r3, #0
	str	r3, [fp, #-576]
	mov	r3, #0
	str	r3, [fp, #-572]
	b	.L223
.L228:
	sub	r1, fp, #496
	ldr	r2, [fp, #-576]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	ldr	r2, [fp, #-572]
	ldr	r1, .L240+4
	mov	r0, r3
	bl	sprintf
	sub	r1, fp, #496
	ldr	r2, [fp, #-576]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r2, r0
	ldr	r3, [fp, #-576]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-548]
	ldr	r3, [fp, #-576]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-548]
	cmp	r3, #0
	ble	.L224
	ldr	r3, [fp, #-576]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-548]
	ldr	r2, [fp, #-568]
	cmp	r2, r3
	bge	.L225
	ldr	r3, [fp, #-576]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-548]
	str	r3, [fp, #-568]
.L225:
	ldr	r3, .L240+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L226
	sub	r1, fp, #496
	ldr	r2, [fp, #-576]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L240+12
	bl	printf
.L226:
	ldr	r3, [fp, #-576]
	add	r3, r3, #1
	str	r3, [fp, #-576]
	b	.L227
.L224:
	ldr	r3, .L240+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L227
	sub	r1, fp, #496
	ldr	r2, [fp, #-576]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L240+16
	bl	printf
.L227:
	ldr	r3, [fp, #-572]
	add	r3, r3, #1
	str	r3, [fp, #-572]
.L223:
	ldr	r3, [fp, #-572]
	cmp	r3, #15
	bls	.L228
	ldr	r3, [fp, #-576]
	cmp	r3, #0
	bne	.L229
	mov	r3, #13
	b	.L238
.L229:
	ldr	r2, [fp, #-576]
	ldr	r3, [fp, #-584]
	str	r2, [r3]
	ldr	r3, [fp, #-584]
	ldr	r2, [fp, #-568]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-576]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-584]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-584]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L231
	mov	r3, #12
	b	.L238
.L231:
	mov	r3, #0
	str	r3, [fp, #-572]
	b	.L232
.L234:
	sub	r1, fp, #496
	ldr	r2, [fp, #-572]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	mov	r0, r3
	bl	strlen
	str	r0, [fp, #-564]
	ldr	r3, [fp, #-564]
	add	r1, r3, #1
	ldr	r3, [fp, #-584]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-572]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-584]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-572]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L233
	mov	r3, #12
	b	.L238
.L233:
	ldr	r3, [fp, #-584]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-572]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	sub	r1, fp, #496
	ldr	r2, [fp, #-572]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	lsl	r3, r3, #1
	add	r1, r1, r3
	ldr	r3, [fp, #-564]
	add	r3, r3, #1
	mov	r2, r3
	bl	strncpy
	ldr	r3, [fp, #-572]
	add	r3, r3, #1
	str	r3, [fp, #-572]
.L232:
	ldr	r2, [fp, #-572]
	ldr	r3, [fp, #-576]
	cmp	r2, r3
	bcc	.L234
	ldr	r3, [fp, #-576]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-584]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-584]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L235
	mov	r3, #12
	b	.L238
.L235:
	mov	r3, #0
	str	r3, [fp, #-572]
	b	.L236
.L237:
	ldr	r3, [fp, #-584]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-572]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-572]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	ldr	r3, [r3, #-548]
	str	r3, [r2]
	ldr	r3, [fp, #-572]
	add	r3, r3, #1
	str	r3, [fp, #-572]
.L236:
	ldr	r2, [fp, #-572]
	ldr	r3, [fp, #-576]
	cmp	r2, r3
	bcc	.L237
	mov	r3, #0
.L238:
	ldr	r2, .L240
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L239
	bl	__stack_chk_fail
.L239:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L241:
	.align	2
.L240:
	.word	.LC36
	.word	.LC33
	.word	verbose
	.word	.LC34
	.word	.LC35
	.size	init_general_input_devices, .-init_general_input_devices
	.align	2
	.global	fini_general_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	fini_general_input_devices, %function
fini_general_input_devices:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L243
.L246:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L244
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L244:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L245
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L245:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L243:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L246
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	fini_general_input_devices, .-fini_general_input_devices
	.section	.rodata
	.align	2
.LC37:
	.ascii	"Could not get info for %s: %s\012\000"
	.align	2
.LC38:
	.ascii	"not a gamepad: %s\012\000"
	.align	2
.LC39:
	.ascii	"More than one device identified as a gamepad (run \""
	.ascii	"reven info\" to see which)\000"
	.align	2
.LC40:
	.ascii	"Could not create replay device: %s\000"
	.align	2
.LC41:
	.ascii	"Found gamepad: %s\012\000"
	.align	2
.LC42:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_gamepad_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_gamepad_input_devices, %function
init_gamepad_input_devices:
	@ args = 0, pretend = 0, frame = 2392
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #2384
	sub	sp, sp, #12
	str	r0, [fp, #-2400]
	str	r1, [fp, #-2404]
	ldr	r3, .L267
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2392]
	sub	r3, fp, #2368
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	init_general_input_devices
	str	r0, [fp, #-2388]
	ldr	r3, [fp, #-2388]
	cmp	r3, #0
	beq	.L248
	ldr	r3, [fp, #-2388]
	b	.L263
.L248:
	mov	r3, #0
	str	r3, [fp, #-2396]
	b	.L250
.L258:
	ldr	r2, [fp, #-2376]
	ldr	r3, [fp, #-2396]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	get_device_info
	str	r0, [fp, #-2388]
	ldr	r3, [fp, #-2388]
	cmp	r3, #0
	beq	.L251
	ldr	r3, .L267+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L265
	ldr	r2, [fp, #-2380]
	ldr	r3, [fp, #-2396]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L267+8
	bl	printf
	b	.L265
.L251:
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	is_gamepad
	mov	r3, r0
	cmp	r3, #0
	bne	.L254
	ldr	r3, .L267+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L266
	ldr	r2, [fp, #-2380]
	ldr	r3, [fp, #-2396]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L267+12
	bl	printf
	b	.L266
.L254:
	ldr	r3, [fp, #-2392]
	cmp	r3, #0
	beq	.L256
	ldr	r3, .L267+16
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L267+20
	bl	fwrite
	ldr	r3, .L267+16
	ldr	r3, [r3]
	mov	r2, #76
	mov	r1, #1
	ldr	r0, .L267+24
	bl	fwrite
	ldr	r3, .L267+16
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L256:
	mov	r0, #30
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-2392]
	ldr	r3, [fp, #-2392]
	cmp	r3, #0
	bne	.L257
	ldr	r3, .L267+16
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L267+20
	bl	fwrite
	ldr	r3, .L267+16
	ldr	r4, [r3]
	mov	r0, #12
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L267+28
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L267+16
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L257:
	ldr	r2, [fp, #-2380]
	ldr	r3, [fp, #-2396]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, r3
	ldr	r0, [fp, #-2392]
	bl	strncpy
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #2352
	mov	r1, r3
	ldr	r0, [fp, #-2404]
	bl	memcpy
	b	.L253
.L265:
	nop
	b	.L253
.L266:
	nop
.L253:
	ldr	r3, [fp, #-2396]
	add	r3, r3, #1
	str	r3, [fp, #-2396]
.L250:
	ldr	r3, [fp, #-2384]
	ldr	r2, [fp, #-2396]
	cmp	r2, r3
	blt	.L258
	sub	r3, fp, #2368
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	fini_general_input_devices
	ldr	r3, [fp, #-2392]
	cmp	r3, #0
	bne	.L259
	mov	r3, #123
	b	.L263
.L259:
	ldr	r3, .L267+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L260
	ldr	r1, [fp, #-2392]
	ldr	r0, .L267+32
	bl	printf
.L260:
	ldr	r3, [fp, #-2400]
	mov	r2, #1
	str	r2, [r3]
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-2400]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-2400]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-2392]
	str	r2, [r3]
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-2400]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-2400]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L261
	mov	r3, #12
	b	.L263
.L261:
	ldr	r3, [fp, #-2400]
	ldr	r4, [r3, #8]
	mov	r1, #0
	ldr	r0, [fp, #-2392]
	bl	open
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-2400]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L262
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	b	.L263
.L262:
	ldr	r3, [fp, #-2400]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-2400]
	str	r2, [r3, #12]
	mov	r3, #0
.L263:
	ldr	r2, .L267
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L264
	bl	__stack_chk_fail
.L264:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L268:
	.align	2
.L267:
	.word	.LC42
	.word	verbose
	.word	.LC37
	.word	.LC38
	.word	stderr
	.word	.LC0
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.size	init_gamepad_input_devices, .-init_gamepad_input_devices
	.align	2
	.global	fini_gamepad_input_devices
	.syntax unified
	.arm
	.fpu softvfp
	.type	fini_gamepad_input_devices, %function
fini_gamepad_input_devices:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	fini_general_input_devices
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	fini_gamepad_input_devices, .-fini_gamepad_input_devices
	.align	2
	.global	init_revent_recording
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_revent_recording, %function
init_revent_recording:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	mov	r2, #0
	mov	r3, #0
	str	r2, [r1, #32]
	str	r3, [r1, #36]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-8]
	mov	r2, #2
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #40]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #24]
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	init_input_devices
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	init_revent_recording, .-init_revent_recording
	.align	2
	.global	fini_revent_recording
	.syntax unified
	.arm
	.fpu softvfp
	.type	fini_revent_recording, %function
fini_revent_recording:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L272
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	fini_general_input_devices
	b	.L273
.L272:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	bne	.L273
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	fini_gamepad_input_devices
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	mov	r0, r3
	bl	free
.L273:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #40]
	mov	r0, r3
	bl	free
	ldr	r1, [fp, #-8]
	mov	r2, #0
	mov	r3, #0
	str	r2, [r1, #32]
	str	r3, [r1, #36]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-8]
	mov	r2, #2
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	fini_revent_recording, .-fini_revent_recording
	.section	.rodata
	.align	2
.LC43:
	.ascii	"Could not allocate file descriptor array: %s\000"
	.align	2
.LC44:
	.ascii	"Could not open \"%s\" for writing: %s\000"
	.align	2
.LC45:
	.ascii	"Opened %s\012\000"
	.text
	.align	2
	.global	open_general_input_devices_for_playback_or_die
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_general_input_devices_for_playback_or_die, %function
open_general_input_devices_for_playback_or_die:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L275
	ldr	r3, .L281
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L281+4
	bl	fwrite
	ldr	r3, .L281
	ldr	r4, [r3]
	mov	r0, #12
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L281+8
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L281
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L275:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L276
.L280:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L281+12
	mov	r0, r3
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L277
	ldr	r3, .L281
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L281+4
	bl	fwrite
	ldr	r3, .L281
	ldr	r4, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L281+16
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L281
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L277:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	ble	.L278
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
.L278:
	ldr	r3, .L281+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L279
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L281+24
	bl	printf
.L279:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L276:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L280
	nop
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L282:
	.align	2
.L281:
	.word	stderr
	.word	.LC0
	.word	.LC43
	.word	2049
	.word	.LC44
	.word	verbose
	.word	.LC45
	.size	open_general_input_devices_for_playback_or_die, .-open_general_input_devices_for_playback_or_die
	.section	.rodata
	.align	2
.LC46:
	.ascii	"/dev/uinput\000"
	.align	2
.LC47:
	.ascii	"uinput not supported by the kernel (is the module i"
	.ascii	"nstalled?)\000"
	.align	2
.LC48:
	.ascii	"Cannot access \"/dev/uinput\" (try re-running as ro"
	.ascii	"ot)\000"
	.align	2
.LC49:
	.ascii	"Could not open \"/dev/uinput\" for writing: %s\000"
	.align	2
.LC50:
	.ascii	"revent-replay %s\000"
	.align	2
.LC51:
	.ascii	"Could not write absinfo:\000"
	.align	2
.LC52:
	.ascii	"Could not create replay device:\000"
	.align	2
.LC53:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_replay_device_or_die
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_replay_device_or_die, %function
create_replay_device_or_die:
	@ args = 0, pretend = 0, frame = 1144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1136
	sub	sp, sp, #12
	str	r0, [fp, #-1152]
	ldr	r3, .L299
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L299+4
	ldr	r0, .L299+8
	bl	open
	str	r0, [fp, #-1140]
	ldr	r3, [fp, #-1140]
	cmp	r3, #0
	bge	.L284
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L285
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L299+16
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #61
	mov	r1, #1
	ldr	r0, .L299+20
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L285:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #13
	bne	.L286
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L299+16
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #52
	mov	r1, #1
	ldr	r0, .L299+24
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L286:
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L299+16
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L299+28
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L284:
	sub	r3, fp, #1120
	sub	r3, r3, #12
	ldr	r2, .L299+32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-1152]
	add	r3, r3, #8
	sub	r0, fp, #1120
	sub	r0, r0, #12
	ldr	r2, .L299+36
	mov	r1, #80
	bl	snprintf
	sub	r3, fp, #12
	sub	r3, r3, #1120
	mov	r2, #3
	strh	r2, [r3, #80]	@ movhi
	ldr	r3, [fp, #-1152]
	ldrh	r2, [r3, #2]
	sub	r3, fp, #12
	sub	r3, r3, #1120
	strh	r2, [r3, #82]	@ movhi
	ldr	r3, [fp, #-1152]
	ldrh	r2, [r3, #4]
	sub	r3, fp, #12
	sub	r3, r3, #1120
	strh	r2, [r3, #84]	@ movhi
	ldr	r3, [fp, #-1152]
	ldrh	r2, [r3, #6]
	sub	r3, fp, #12
	sub	r3, r3, #1120
	strh	r2, [r3, #86]	@ movhi
	mov	r1, #0
	ldr	r0, [fp, #-1140]
	bl	set_evbit
	mov	r1, #1
	ldr	r0, [fp, #-1140]
	bl	set_evbit
	mov	r3, #0
	str	r3, [fp, #-1144]
	b	.L287
.L289:
	ldr	r3, [fp, #-1152]
	add	r3, r3, #456
	add	r3, r3, #3
	ldr	r1, [fp, #-1144]
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	beq	.L288
	ldr	r1, [fp, #-1144]
	ldr	r0, [fp, #-1140]
	bl	set_keybit
.L288:
	ldr	r3, [fp, #-1144]
	add	r3, r3, #1
	str	r3, [fp, #-1144]
.L287:
	ldr	r3, [fp, #-1144]
	ldr	r2, .L299+40
	cmp	r3, r2
	ble	.L289
	mov	r1, #2
	ldr	r0, [fp, #-1140]
	bl	set_evbit
	mov	r3, #0
	str	r3, [fp, #-1144]
	b	.L290
.L292:
	ldr	r3, [fp, #-1152]
	add	r3, r3, #360
	add	r3, r3, #3
	ldr	r1, [fp, #-1144]
	mov	r0, r3
	bl	test_bit
	mov	r3, r0
	cmp	r3, #0
	beq	.L291
	ldr	r1, [fp, #-1144]
	ldr	r0, [fp, #-1140]
	bl	set_relbit
.L291:
	ldr	r3, [fp, #-1144]
	add	r3, r3, #1
	str	r3, [fp, #-1144]
.L290:
	ldr	r3, [fp, #-1144]
	cmp	r3, #14
	ble	.L292
	mov	r1, #3
	ldr	r0, [fp, #-1140]
	bl	set_evbit
	mov	r3, #0
	str	r3, [fp, #-1144]
	b	.L293
.L294:
	ldr	r1, [fp, #-1152]
	ldr	r2, [fp, #-1144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #584
	ldr	r3, [r3]
	str	r3, [fp, #-1136]
	ldr	r1, [fp, #-1136]
	ldr	r0, [fp, #-1140]
	bl	set_absbit
	ldr	r1, [fp, #-1152]
	ldr	r2, [fp, #-1144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #564
	ldr	r2, [r3]
	ldr	r3, [fp, #-1136]
	add	r3, r3, #86
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-1116]
	ldr	r1, [fp, #-1152]
	ldr	r2, [fp, #-1144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #568
	ldr	r2, [r3]
	ldr	r3, [fp, #-1136]
	add	r3, r3, #22
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-1116]
	ldr	r1, [fp, #-1152]
	ldr	r2, [fp, #-1144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #572
	ldr	r2, [r3]
	ldr	r3, [fp, #-1136]
	add	r3, r3, #150
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-1116]
	ldr	r1, [fp, #-1152]
	ldr	r2, [fp, #-1144]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #576
	ldr	r2, [r3]
	ldr	r3, [fp, #-1136]
	add	r3, r3, #214
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-1116]
	ldr	r3, [fp, #-1144]
	add	r3, r3, #1
	str	r3, [fp, #-1144]
.L293:
	ldr	r3, [fp, #-1152]
	ldr	r2, [r3, #556]
	ldr	r3, [fp, #-1144]
	cmp	r2, r3
	bhi	.L294
	sub	r3, fp, #1120
	sub	r3, r3, #12
	ldr	r2, .L299+32
	mov	r1, r3
	ldr	r0, [fp, #-1140]
	bl	write
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L299+44
	cmp	r2, r3
	bhi	.L295
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L299+16
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L299+48
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L295:
	ldr	r1, .L299+52
	ldr	r0, [fp, #-1140]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L296
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L299+16
	bl	fwrite
	ldr	r3, .L299+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L299+56
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L299+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L296:
	mov	r0, #3
	bl	sleep
	ldr	r3, [fp, #-1140]
	ldr	r2, .L299
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L298
	bl	__stack_chk_fail
.L298:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L300:
	.align	2
.L299:
	.word	.LC53
	.word	2049
	.word	.LC46
	.word	stderr
	.word	.LC0
	.word	.LC47
	.word	.LC48
	.word	.LC49
	.word	1116
	.word	.LC50
	.word	766
	.word	1115
	.word	.LC51
	.word	21761
	.word	.LC52
	.size	create_replay_device_or_die, .-create_replay_device_or_die
	.section	.rodata
	.align	2
.LC54:
	.ascii	"%s does not appear to be an revent recording\000"
	.align	2
.LC55:
	.ascii	"%s contains recording for unsupported version \"%u\""
	.ascii	"; max supported version is \"%u\"\000"
	.align	2
.LC56:
	.ascii	"%s revent recording appears to be corrupted\000"
	.align	2
.LC57:
	.ascii	"Could not read devices: %s\000"
	.align	2
.LC58:
	.ascii	"Could not allocate gamepad info buffer: %s\000"
	.align	2
.LC59:
	.ascii	"Could not read gamepad info: %s\000"
	.align	2
.LC60:
	.ascii	"Unexpected recording mode: %d\000"
	.align	2
.LC61:
	.ascii	"Could not read the number of recorded events\000"
	.align	2
.LC62:
	.ascii	"Not enough memory to allocate replay buffer\000"
	.align	2
.LC63:
	.ascii	"error reading events: %s\000"
	.align	2
.LC64:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_revent_recording_or_die, %function
read_revent_recording_or_die:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #48
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L323
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-60]
	sub	r2, fp, #48
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	open_revent_recording
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L302
	ldr	r3, [fp, #-44]
	cmp	r3, #22
	bne	.L303
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	ldr	r1, .L323+12
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L303:
	ldr	r3, [fp, #-44]
	cmp	r3, #71
	bne	.L304
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-60]
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, .L323+16
	ldrh	r3, [r3]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-56]
	ldr	r1, .L323+20
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L304:
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	ldr	r1, .L323+24
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L302:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L305
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	ldr	r2, [fp, #-48]
	mov	r1, r2
	mov	r0, r3
	bl	read_general_input_devices
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L306
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L323+28
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L306:
	ldr	r3, [fp, #-60]
	mov	r2, #0
	str	r2, [r3, #24]
	b	.L307
.L305:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	bne	.L308
	mov	r0, #2352
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-60]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #24]
	cmp	r3, #0
	bne	.L309
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r4, [r3]
	mov	r0, #12
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L323+32
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L309:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #24]
	mov	r1, r3
	mov	r0, r2
	bl	read_device_info
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L307
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L323+36
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L308:
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L323+40
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L307:
	ldr	r3, [fp, #-60]
	ldrh	r3, [r3]
	cmp	r3, #1
	bls	.L310
	ldr	r3, [fp, #-60]
	add	r0, r3, #32
	ldr	r3, [fp, #-48]
	mov	r2, #1
	mov	r1, #8
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bgt	.L311
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #44
	mov	r1, #1
	ldr	r0, .L323+44
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L311:
	ldr	r3, [fp, #-60]
	add	r3, r3, #32
	ldmia	r3, {r2-r3}
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-60]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L312
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #43
	mov	r1, #1
	ldr	r0, .L323+48
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L312:
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	b	.L313
.L314:
	ldr	r0, [fp, #-48]
	ldr	r3, [fp, #-60]
	ldr	r1, [r3, #40]
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r1, r3
	bl	read_replay_event
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r6, r2, #1
	adc	r7, r3, #0
	str	r6, [fp, #-36]
	str	r7, [fp, #-32]
.L313:
	ldr	r3, [fp, #-60]
	add	r3, r3, #32
	ldmia	r3, {r2-r3}
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bcc	.L314
	b	.L315
.L310:
	ldr	r0, [fp, #-56]
	bl	get_file_size
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-60]
	str	r2, [r3, #40]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	mov	r0, r3
	bl	fflush
.L319:
	ldr	r3, [fp, #-48]
	mov	r0, r3
	bl	fileno
	ldr	r3, [fp, #-60]
	ldr	r1, [r3, #40]
	ldr	r2, [fp, #-36]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r1, r3
	bl	read_legacy_replay_event
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	beq	.L322
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L318
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L323+8
	bl	fwrite
	ldr	r3, .L323+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-44]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L323+52
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L323+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L318:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-36]
	str	r5, [fp, #-32]
	b	.L319
.L322:
	nop
	ldr	r1, [fp, #-60]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	str	r2, [r1, #32]
	str	r3, [r1, #36]
.L315:
	ldr	r3, [fp, #-48]
	mov	r0, r3
	bl	fclose
	nop
	ldr	r3, .L323
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L320
	bl	__stack_chk_fail
.L320:
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L324:
	.align	2
.L323:
	.word	.LC64
	.word	stderr
	.word	.LC0
	.word	.LC54
	.word	FORMAT_VERSION
	.word	.LC55
	.word	.LC56
	.word	.LC57
	.word	.LC58
	.word	.LC59
	.word	.LC60
	.word	.LC61
	.word	.LC62
	.word	.LC63
	.size	read_revent_recording_or_die, .-read_revent_recording_or_die
	.section	.rodata
	.align	2
.LC65:
	.ascii	"Could not create replay devices: %s\000"
	.text
	.align	2
	.global	open_gamepad_input_devices_for_playback_or_die
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_gamepad_input_devices_for_playback_or_die, %function
open_gamepad_input_devices_for_playback_or_die:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	create_replay_device_or_die
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	mov	r2, #1
	str	r2, [r3]
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L326
	ldr	r3, .L327
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L327+4
	bl	fwrite
	ldr	r3, .L327
	ldr	r4, [r3]
	mov	r0, #12
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L327+8
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L327
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L326:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #12]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L328:
	.align	2
.L327:
	.word	stderr
	.word	.LC0
	.word	.LC65
	.size	open_gamepad_input_devices_for_playback_or_die, .-open_gamepad_input_devices_for_playback_or_die
	.local	EXIT
	.comm	EXIT,4,4
	.align	2
	.global	exitHandler
	.syntax unified
	.arm
	.fpu softvfp
	.type	exitHandler, %function
exitHandler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L330
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L331:
	.align	2
.L330:
	.word	EXIT
	.size	exitHandler, .-exitHandler
	.section	.rodata
	.align	2
.LC66:
	.ascii	"Could not create recording \"%s\": %s\000"
	.align	2
.LC67:
	.ascii	"Could not initialize input devices: %s\000"
	.align	2
.LC68:
	.ascii	"Could not record input devices: %s\000"
	.align	2
.LC69:
	.ascii	"There does not appear to be a gamepad connected\000"
	.align	2
.LC70:
	.ascii	"Problem initializing gamepad device: %s\000"
	.align	2
.LC71:
	.ascii	"Problem writing gamepad info: %s\000"
	.align	2
.LC72:
	.ascii	"Invalid recording mode specified\000"
	.align	2
.LC73:
	.ascii	"Could not initialise event count: %s\000"
	.align	2
.LC74:
	.ascii	"recording...\000"
	.align	2
.LC75:
	.ascii	"added fake return exiting...\000"
	.align	2
.LC76:
	.ascii	"got event from %s\012\000"
	.align	2
.LC77:
	.ascii	"%d event: type %d code %d value %d\012\000"
	.align	2
.LC78:
	.ascii	"Writing event count...\000"
	.align	2
.LC79:
	.ascii	"Could not write event count: %s\000"
	.align	2
.LC80:
	.ascii	"Unexpected mode on finish\000"
	.align	2
.LC81:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	record
	.syntax unified
	.arm
	.fpu softvfp
	.type	record, %function
record:
	@ args = 0, pretend = 0, frame = 2592
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #2592
	sub	sp, sp, #8
	str	r0, [fp, #-2592]
	str	r1, [fp, #-2596]
	str	r2, [fp, #-2600]
	ldr	r3, .L370
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, [fp, #-2600]
	ldr	r0, [fp, #-2592]
	bl	init_recording
	str	r0, [fp, #-2576]
	ldr	r3, [fp, #-2576]
	cmp	r3, #0
	bne	.L333
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-2592]
	ldr	r1, .L370+12
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L333:
	sub	r3, fp, #2512
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r0, r3
	bl	init_input_devices
	ldr	r3, [fp, #-2600]
	cmp	r3, #0
	bne	.L334
	sub	r3, fp, #2512
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r0, r3
	bl	init_general_input_devices
	str	r0, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	beq	.L335
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-2572]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+16
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L335:
	sub	r3, fp, #2512
	sub	r3, r3, #12
	sub	r3, r3, #12
	ldr	r1, [fp, #-2576]
	mov	r0, r3
	bl	write_general_input_devices
	str	r0, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	beq	.L336
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-2572]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+20
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L334:
	ldr	r3, [fp, #-2600]
	cmp	r3, #1
	bne	.L337
	sub	r2, fp, #2352
	sub	r2, r2, #12
	sub	r2, r2, #8
	sub	r3, fp, #2512
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	init_gamepad_input_devices
	str	r0, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmp	r3, #123
	bne	.L338
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #47
	mov	r1, #1
	ldr	r0, .L370+24
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L338:
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	beq	.L339
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-2572]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+28
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L339:
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-2576]
	bl	write_device_info
	str	r0, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	beq	.L336
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-2572]
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+32
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L337:
	ldr	r0, [fp, #-2576]
	bl	fclose
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L370+36
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L336:
	sub	r3, fp, #2480
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	bl	sigemptyset
	sub	r3, fp, #2480
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	bl	block_sigterm
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-2556]
	str	r3, [fp, #-2552]
	ldr	r0, [fp, #-2576]
	bl	ftell
	str	r0, [fp, #-2568]
	sub	r0, fp, #2544
	sub	r0, r0, #12
	ldr	r3, [fp, #-2576]
	mov	r2, #1
	mov	r1, #8
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	bgt	.L341
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+40
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L341:
	sub	r3, fp, #20
	mov	r2, #4
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-2564]
	mov	r3, #0
	str	r3, [fp, #-2588]
	ldr	r0, .L370+44
	bl	puts
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L370+48
	mov	r0, #2
	bl	signal
.L358:
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #8
	str	r3, [fp, #-2560]
	mov	r3, #0
	str	r3, [fp, #-2580]
	b	.L342
.L343:
	ldr	r3, [fp, #-2560]
	ldr	r2, [fp, #-2580]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2580]
	add	r3, r3, #1
	str	r3, [fp, #-2580]
.L342:
	ldr	r3, [fp, #-2580]
	cmp	r3, #31
	bls	.L343
	ldr	r3, [fp, #-2372]
	orr	r3, r3, #1
	str	r3, [fp, #-2372]
	mov	r3, #0
	str	r3, [fp, #-2584]
	b	.L344
.L345:
	ldr	r2, [fp, #-2528]
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	ldr	r1, [r3, #-2360]
	ldr	r0, [fp, #-2528]
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #2
	add	r3, r0, r3
	ldr	r3, [r3]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	str	r1, [r3, #-2360]
	ldr	r3, [fp, #-2584]
	add	r3, r3, #1
	str	r3, [fp, #-2584]
.L344:
	ldr	r3, [fp, #-2536]
	ldr	r2, [fp, #-2584]
	cmp	r2, r3
	blt	.L345
	ldr	r3, [fp, #-2596]
	str	r3, [fp, #-2544]
	mov	r3, #0
	str	r3, [fp, #-2540]
	ldr	r3, [fp, #-2524]
	add	r0, r3, #1
	sub	r1, fp, #2352
	sub	r1, r1, #12
	sub	r1, r1, #8
	sub	r3, fp, #2480
	sub	r3, r3, #12
	sub	r3, r3, #8
	str	r3, [sp, #4]
	sub	r3, fp, #2528
	sub	r3, r3, #12
	sub	r3, r3, #4
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	pselect
	str	r0, [fp, #-2572]
	ldr	r3, .L370+52
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L366
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L367
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	beq	.L368
	ldr	r3, .L370+56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L350
	ldr	r3, [fp, #-2372]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L350
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-2588]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	mov	r2, #1
	strh	r2, [r3, #12]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	mov	r2, #28
	strh	r2, [r3, #14]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-2504]
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-2576]
	bl	write_replay_event
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-2588]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	mov	r2, #0
	strh	r2, [r3, #12]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	mov	r2, #0
	strh	r2, [r3, #14]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-2504]
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-2576]
	bl	write_replay_event
	ldr	r3, .L370+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L369
	ldr	r0, .L370+64
	bl	puts
	b	.L369
.L350:
	mov	r3, #0
	str	r3, [fp, #-2584]
	b	.L352
.L357:
	ldr	r2, [fp, #-2528]
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-2360]
	ldr	r1, [fp, #-2528]
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L353
	ldr	r3, .L370+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L354
	ldr	r2, [fp, #-2532]
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L370+68
	bl	printf
.L354:
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	strh	r2, [r3]	@ movhi
	ldr	r2, [fp, #-2528]
	ldr	r3, [fp, #-2584]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	add	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	bl	read
	str	r0, [fp, #-2572]
	ldr	r3, .L370+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L355
	ldr	r1, [fp, #-2572]
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	ldrh	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	ldrh	r3, [r3, #14]
	mov	r0, r3
	ldr	r3, [fp, #-2504]
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, .L370+72
	bl	printf
.L355:
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	ldrh	r3, [r3, #12]
	cmp	r3, #1
	bne	.L356
	sub	r3, fp, #12
	sub	r3, r3, #2496
	sub	r3, r3, #12
	ldrh	r3, [r3, #14]
	cmp	r3, #28
	bne	.L356
	ldr	r3, [fp, #-2504]
	cmp	r3, #1
	bne	.L356
	ldr	r3, [fp, #-2584]
	str	r3, [fp, #-2588]
.L356:
	sub	r3, fp, #2496
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-2576]
	bl	write_replay_event
	ldr	r2, [fp, #-2556]
	ldr	r3, [fp, #-2552]
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-2556]
	str	r5, [fp, #-2552]
.L353:
	ldr	r3, [fp, #-2584]
	add	r3, r3, #1
	str	r3, [fp, #-2584]
.L352:
	ldr	r3, [fp, #-2536]
	ldr	r2, [fp, #-2584]
	cmp	r2, r3
	blt	.L357
	b	.L358
.L366:
	nop
	b	.L347
.L367:
	nop
	b	.L347
.L368:
	nop
	b	.L347
.L369:
	nop
.L347:
	ldr	r3, .L370+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L359
	ldr	r0, .L370+76
	bl	printf
.L359:
	mov	r2, #0
	ldr	r1, [fp, #-2568]
	ldr	r0, [fp, #-2576]
	bl	fseek
	str	r0, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmn	r3, #1
	bne	.L360
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+80
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L360:
	sub	r0, fp, #2544
	sub	r0, r0, #12
	ldr	r3, [fp, #-2576]
	mov	r2, #1
	mov	r1, #8
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-2572]
	ldr	r3, [fp, #-2572]
	cmp	r3, #0
	bgt	.L361
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L370+80
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L361:
	ldr	r0, [fp, #-2576]
	bl	fclose
	ldr	r3, [fp, #-2600]
	cmp	r3, #0
	bne	.L362
	sub	r3, fp, #2512
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r0, r3
	bl	fini_general_input_devices
	b	.L332
.L362:
	ldr	r3, [fp, #-2600]
	cmp	r3, #1
	bne	.L364
	sub	r3, fp, #2512
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r0, r3
	bl	fini_gamepad_input_devices
	b	.L332
.L364:
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L370+8
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L370+84
	bl	fwrite
	ldr	r3, .L370+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L332:
	ldr	r3, .L370
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L365
	bl	__stack_chk_fail
.L365:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L371:
	.align	2
.L370:
	.word	.LC81
	.word	stderr
	.word	.LC0
	.word	.LC66
	.word	.LC67
	.word	.LC68
	.word	.LC69
	.word	.LC70
	.word	.LC71
	.word	.LC72
	.word	.LC73
	.word	.LC74
	.word	exitHandler
	.word	EXIT
	.word	wait_for_stdin
	.word	verbose
	.word	.LC75
	.word	.LC76
	.word	.LC77
	.word	.LC78
	.word	.LC79
	.word	.LC80
	.size	record, .-record
	.section	.rodata
	.align	2
.LC82:
	.ascii	"recording version: %u\012\000"
	.align	2
.LC83:
	.ascii	"recording type: %i\012\000"
	.align	2
.LC84:
	.ascii	"number of recorded events: %lu\012\000"
	.align	2
.LC85:
	.ascii	"devices:\000"
	.align	2
.LC86:
	.ascii	"%2i: %s\012\000"
	.align	2
.LC87:
	.ascii	"Unexpected recording type: %d\000"
	.align	2
.LC88:
	.ascii	"\012events:\000"
	.align	2
.LC89:
	.ascii	"%ld.%06ld dev: %d type: %d code: %d value %d\012\000"
	.align	2
.LC90:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dump
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump, %function
dump:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #88
	str	r0, [fp, #-80]
	ldr	r3, .L381
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	sub	r3, fp, #68
	mov	r0, r3
	bl	init_revent_recording
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-80]
	bl	read_revent_recording_or_die
	ldrh	r3, [fp, #-68]
	mov	r1, r3
	ldr	r0, .L381+4
	bl	printf
	ldr	r3, [fp, #-64]
	mov	r1, r3
	ldr	r0, .L381+8
	bl	printf
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r0, .L381+12
	bl	printf
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L373
	ldr	r0, .L381+16
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L374
.L375:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-76]
	ldr	r0, .L381+20
	bl	printf
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L374:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	blt	.L375
	b	.L376
.L373:
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bne	.L377
	ldr	r3, [fp, #-44]
	mov	r0, r3
	bl	print_device_info
	b	.L376
.L377:
	ldr	r3, .L381+24
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L381+28
	bl	fwrite
	ldr	r3, .L381+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	ldr	r1, .L381+32
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L381+24
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L376:
	ldr	r0, .L381+36
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L378
.L379:
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r0, [r3, #4]
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	ip, [r3, #8]
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrsh	r3, [r3]
	mov	r5, r3
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrh	r3, [r3, #12]
	mov	lr, r3
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrh	r3, [r3, #14]
	mov	r4, r3
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-76]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #16]
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	lr, [sp]
	mov	r3, r5
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L381+40
	bl	printf
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L378:
	ldr	r3, [fp, #-76]
	mov	r0, r3
	asr	r1, r0, #31
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	bcc	.L379
	sub	r3, fp, #68
	mov	r0, r3
	bl	fini_revent_recording
	nop
	ldr	r3, .L381
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L380
	bl	__stack_chk_fail
.L380:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L382:
	.align	2
.L381:
	.word	.LC90
	.word	.LC82
	.word	.LC83
	.word	.LC84
	.word	.LC85
	.word	.LC86
	.word	stderr
	.word	.LC0
	.word	.LC87
	.word	.LC88
	.word	.LC89
	.size	dump, .-dump
	.section	.rodata
	.align	2
.LC91:
	.ascii	"Opening input devices for playback\000"
	.align	2
.LC92:
	.ascii	"Creating gamepad playback device\000"
	.align	2
.LC93:
	.ascii	"Unexpected recording mod: %d\000"
	.align	2
.LC94:
	.ascii	"Adjusting event timestamps\000"
	.align	2
.LC95:
	.ascii	"Starting payback\000"
	.align	2
.LC96:
	.ascii	"now %u.%u desiredtime %u.%u sleeping %u uS\012\000"
	.align	2
.LC97:
	.ascii	"Could not replay event\000"
	.align	2
.LC98:
	.ascii	"replayed event: type %d code %d value %d\012\000"
	.align	2
.LC99:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	replay
	.syntax unified
	.arm
	.fpu softvfp
	.type	replay, %function
replay:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #152
	str	r0, [fp, #-152]
	ldr	r3, .L412
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r0, r3
	bl	init_revent_recording
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	read_revent_recording_or_die
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	beq	.L384
	cmp	r3, #1
	beq	.L385
	b	.L410
.L384:
	ldr	r3, .L412+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L387
	ldr	r0, .L412+8
	bl	puts
.L387:
	sub	r3, fp, #68
	add	r3, r3, #8
	mov	r0, r3
	bl	open_general_input_devices_for_playback_or_die
	b	.L388
.L385:
	ldr	r3, .L412+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L389
	ldr	r0, .L412+12
	bl	puts
.L389:
	ldr	r2, [fp, #-44]
	sub	r3, fp, #68
	add	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	open_gamepad_input_devices_for_playback_or_die
	b	.L388
.L410:
	ldr	r3, .L412+16
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L412+20
	bl	fwrite
	ldr	r3, .L412+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-64]
	ldr	r1, .L412+24
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L412+16
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L388:
	ldr	r3, .L412+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L390
	ldr	r0, .L412+28
	bl	puts
.L390:
	sub	r3, fp, #68
	mov	r0, r3
	bl	adjust_event_times
	sub	r3, fp, #100
	mov	r2, #8
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #124
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-132]
	str	r3, [fp, #-128]
	ldr	r3, .L412+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L392
	ldr	r0, .L412+32
	bl	puts
	b	.L392
.L407:
	sub	r3, fp, #116
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r2, [fp, #-124]
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	str	r3, [fp, #-108]
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-96]
	add	r3, r2, r3
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-104]
	ldr	r2, .L412+36
	cmp	r3, r2
	blt	.L393
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-104]
	sub	r3, r3, #999424
	sub	r3, r3, #576
	str	r3, [fp, #-104]
.L393:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	bne	.L394
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
	b	.L395
.L394:
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
.L395:
	cmp	r3, #0
	beq	.L396
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-116]
	sub	r3, r2, r3
	str	r3, [fp, #-92]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-112]
	sub	r3, r2, r3
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bge	.L397
	ldr	r3, [fp, #-92]
	sub	r3, r3, #1
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-88]
	add	r3, r3, #999424
	add	r3, r3, #576
	str	r3, [fp, #-88]
.L397:
	ldr	r3, [fp, #-92]
	mov	r1, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	str	r3, [fp, #-140]
	ldr	r3, .L412+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L398
	ldr	r3, [fp, #-116]
	mov	r1, r3
	ldr	r3, [fp, #-112]
	mov	r0, r3
	ldr	r3, [fp, #-108]
	mov	ip, r3
	ldr	r3, [fp, #-104]
	mov	r2, r3
	ldr	r3, [fp, #-140]
	str	r3, [sp, #4]
	str	r2, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L412+40
	bl	printf
.L398:
	ldr	r0, [fp, #-140]
	bl	usleep
.L396:
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrsh	r3, [r3]
	str	r3, [fp, #-144]
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	sub	ip, fp, #84
	add	r3, r3, #4
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	b	.L399
.L406:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r1, fp, #84
	mov	r2, #16
	mov	r0, r3
	bl	write
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-136]
	cmp	r3, #16
	beq	.L400
	ldr	r3, .L412+16
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L412+20
	bl	fwrite
	ldr	r3, .L412+16
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L412+44
	bl	fwrite
	ldr	r3, .L412+16
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L400:
	ldr	r3, .L412+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L401
	ldrh	r3, [fp, #-76]
	mov	r1, r3
	ldrh	r3, [fp, #-74]
	mov	r2, r3
	ldr	r3, [fp, #-72]
	ldr	r0, .L412+48
	bl	printf
.L401:
	sub	r3, fp, #132
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	str	r4, [fp, #-132]
	str	r5, [fp, #-128]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #132
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bcs	.L411
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrsh	r3, [r3]
	str	r3, [fp, #-144]
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-132]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	sub	ip, fp, #84
	add	r3, r3, #4
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
.L399:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	bne	.L404
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	b	.L405
.L404:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
.L405:
	cmp	r3, #0
	bne	.L406
	b	.L403
.L411:
	nop
.L403:
	sub	r3, fp, #100
	sub	r2, fp, #84
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L392:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	sub	r1, fp, #132
	ldmia	r1, {r0-r1}
	cmp	r1, r3
	cmpeq	r0, r2
	bcc	.L407
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	bne	.L408
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r0, r3
	bl	destroy_replay_device
.L408:
	sub	r3, fp, #68
	mov	r0, r3
	bl	fini_revent_recording
	nop
	ldr	r3, .L412
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L409
	bl	__stack_chk_fail
.L409:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L413:
	.align	2
.L412:
	.word	.LC99
	.word	verbose
	.word	.LC91
	.word	.LC92
	.word	stderr
	.word	.LC0
	.word	.LC93
	.word	.LC94
	.word	.LC95
	.word	1000000
	.word	.LC96
	.word	.LC97
	.word	.LC98
	.size	replay, .-replay
	.section	.rodata
	.align	2
.LC100:
	.ascii	"Could not read input devices: %s\000"
	.align	2
.LC101:
	.ascii	"DEVICE %d\012\000"
	.align	2
.LC102:
	.ascii	"device path: %s\012\000"
	.align	2
.LC103:
	.ascii	"yes\000"
	.align	2
.LC104:
	.ascii	"no\000"
	.align	2
.LC105:
	.ascii	"is gamepad: %s\012\000"
	.align	2
.LC106:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	info
	.syntax unified
	.arm
	.fpu softvfp
	.type	info, %function
info:
	@ args = 0, pretend = 0, frame = 2384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #2384
	sub	sp, sp, #4
	ldr	r3, .L423
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #2368
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	init_input_devices
	sub	r3, fp, #2368
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	init_general_input_devices
	str	r0, [fp, #-2388]
	ldr	r3, [fp, #-2388]
	cmp	r3, #0
	beq	.L415
	ldr	r3, .L423+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L423+8
	bl	fwrite
	ldr	r3, .L423+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L423+12
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L423+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L415:
	mov	r3, #0
	str	r3, [fp, #-2392]
	b	.L416
.L421:
	ldr	r2, [fp, #-2376]
	ldr	r3, [fp, #-2392]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	get_device_info
	str	r0, [fp, #-2388]
	ldr	r3, [fp, #-2388]
	cmp	r3, #0
	beq	.L417
	ldr	r2, [fp, #-2380]
	ldr	r3, [fp, #-2392]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L423+16
	bl	printf
	b	.L418
.L417:
	ldr	r1, [fp, #-2392]
	ldr	r0, .L423+20
	bl	printf
	ldr	r2, [fp, #-2380]
	ldr	r3, [fp, #-2392]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L423+24
	bl	printf
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	is_gamepad
	mov	r3, r0
	cmp	r3, #0
	beq	.L419
	ldr	r3, .L423+28
	b	.L420
.L419:
	ldr	r3, .L423+32
.L420:
	mov	r1, r3
	ldr	r0, .L423+36
	bl	printf
	sub	r3, fp, #2352
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	print_device_info
	mov	r0, #10
	bl	putchar
.L418:
	ldr	r3, [fp, #-2392]
	add	r3, r3, #1
	str	r3, [fp, #-2392]
.L416:
	ldr	r3, [fp, #-2384]
	ldr	r2, [fp, #-2392]
	cmp	r2, r3
	blt	.L421
	sub	r3, fp, #2368
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	fini_general_input_devices
	nop
	ldr	r3, .L423
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L422
	bl	__stack_chk_fail
.L422:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L424:
	.align	2
.L423:
	.word	.LC106
	.word	stderr
	.word	.LC0
	.word	.LC100
	.word	.LC37
	.word	.LC101
	.word	.LC102
	.word	.LC103
	.word	.LC104
	.word	.LC105
	.size	info, .-info
	.section	.rodata
	.align	2
.LC107:
	.ascii	"usage:\012    revent [-h] [-v] COMMAND [OPTIONS] \012"
	.ascii	"\012    Options:\012        -h  print this help mes"
	.ascii	"sage and quit.\012        -v  enable verbose output"
	.ascii	".\012\012    Commands:\012        record [-t SECOND"
	.ascii	"S] [-d DEVICE] FILE\012            Record input eve"
	.ascii	"nt. stops after return on STDIN (or, optionally, \012"
	.ascii	"            a fixed delay)\012\012                F"
	.ascii	"ILE       file into which events will be recorded.\012"
	.ascii	"                -t SECONDS time, in seconds, for wh"
	.ascii	"ich to record events.\012                          "
	.ascii	" if not specified, recording will continue until\012"
	.ascii	"                           return key is pressed.\012"
	.ascii	"                -d DEVICE  the number of the input "
	.ascii	"device form which\012                           eve"
	.ascii	"nts will be recorded. If not specified, \012       "
	.ascii	"                    all available inputs will be us"
	.ascii	"ed.\012                -s         Recording will no"
	.ascii	"t be stopped if there is \012                      "
	.ascii	"     input on STDIN.\012                -g         "
	.ascii	"Record in \"gamepad\" mode. A gamepad must be \012 "
	.ascii	"                          connected to the device. "
	.ascii	"The recording will only\012                        "
	.ascii	"   be done for the gamepad and other input devices\012"
	.ascii	"                           will not be recorded. In"
	.ascii	" addition to the input\012                         "
	.ascii	"  events, the information about the gamepad will\012"
	.ascii	"                           also be stored in the re"
	.ascii	"cording. When this\012                           re"
	.ascii	"cording is played back, revent will first\012      "
	.ascii	"                     create a virtual gamepad devic"
	.ascii	"e based on the\012                           stored"
	.ascii	" info and the event will be played back\012        "
	.ascii	"                   into it. This type of recording "
	.ascii	"should be more\012                           portab"
	.ascii	"le across different devices.\012\012        replay "
	.ascii	"FILE\012            replays previously recorded eve"
	.ascii	"nts from the specified file.\012\012               "
	.ascii	" FILE       file into which events will be recorded"
	.ascii	".\012\012        dump FILE\012            dumps the"
	.ascii	" contents of the specified event log to STDOUT in\012"
	.ascii	"            human-readable form.\012\012           "
	.ascii	"     FILE       event"
	.ascii	" log which will be dumped.\012\012        info\012 "
	.ascii	"            shows info about each event char device"
	.ascii	"\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L426
	bl	puts
	nop
	pop	{fp, pc}
.L427:
	.align	2
.L426:
	.word	.LC107
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC108:
	.ascii	"timeout: %d\012\000"
	.align	2
.LC109:
	.ascii	"-t parameter must be numeric; got %s.\000"
	.align	2
.LC110:
	.ascii	"device: %d\012\000"
	.align	2
.LC111:
	.ascii	"-d parameter must be numeric; got %s.\000"
	.align	2
.LC112:
	.ascii	"Unexpected option: %c\000"
	.align	2
.LC113:
	.ascii	"hgt:d:vs\000"
	.align	2
.LC114:
	.ascii	"Must specify a command.\000"
	.align	2
.LC115:
	.ascii	"record\000"
	.align	2
.LC116:
	.ascii	"replay\000"
	.align	2
.LC117:
	.ascii	"dump\000"
	.align	2
.LC118:
	.ascii	"info\000"
	.align	2
.LC119:
	.ascii	"Unknown command -- %s\000"
	.align	2
.LC120:
	.ascii	"file: %s\012\000"
	.align	2
.LC121:
	.ascii	"Trailling arguments (use -h for help).\000"
	.align	2
.LC122:
	.ascii	"-t parameter is only valid for \"record\" command.\000"
	.align	2
.LC123:
	.ascii	"-d parameter is only valid for \"record\" command.\000"
	.align	2
.LC124:
	.ascii	"File path cannot be specified for \"info\" command."
	.ascii	"\000"
	.align	2
.LC125:
	.ascii	"Must specify a file for recording/replaying (use -h"
	.ascii	" for help).\000"
	.text
	.align	2
	.global	revent_args_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	revent_args_init, %function
revent_args_init:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mvn	r2, #-2147483648
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	mvn	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #16]
	b	.L429
.L442:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #100
	cmp	r3, #18
	ldrls	pc, [pc, r3, asl #2]
	b	.L430
.L432:
	.word	.L437
	.word	.L430
	.word	.L430
	.word	.L436
	.word	.L435
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L430
	.word	.L434
	.word	.L433
	.word	.L430
	.word	.L431
.L435:
	bl	usage
	mov	r0, #0
	bl	exit
.L436:
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L429
.L433:
	ldr	r3, .L457
	ldr	r3, [r3]
	mov	r0, r3
	bl	is_numeric
	mov	r3, r0
	cmp	r3, #0
	beq	.L438
	ldr	r3, .L457
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, .L457+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L429
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L457+8
	bl	printf
	b	.L429
.L438:
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	ldr	r2, .L457
	ldr	r2, [r2]
	ldr	r1, .L457+20
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L437:
	ldr	r3, .L457
	ldr	r3, [r3]
	mov	r0, r3
	bl	is_numeric
	mov	r3, r0
	cmp	r3, #0
	beq	.L440
	ldr	r3, .L457
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	ldr	r3, .L457+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L429
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r1, r3
	ldr	r0, .L457+24
	bl	printf
	b	.L429
.L440:
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	ldr	r2, .L457
	ldr	r2, [r2]
	ldr	r1, .L457+28
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L431:
	ldr	r3, .L457+4
	mov	r2, #1
	str	r2, [r3]
	b	.L429
.L434:
	ldr	r3, .L457+32
	mov	r2, #0
	str	r2, [r3]
	b	.L429
.L430:
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L457+36
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L429:
	ldr	r2, .L457+40
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	getopt
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L442
	ldr	r3, .L457+44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bne	.L443
	bl	usage
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L457+48
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L443:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L457+52
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L444
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	b	.L445
.L444:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L457+56
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L446
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3]
	b	.L445
.L446:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L457+60
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L447
	ldr	r3, [fp, #-16]
	mov	r2, #2
	str	r2, [r3]
	b	.L445
.L447:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L457+64
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L448
	ldr	r3, [fp, #-16]
	mov	r2, #3
	str	r2, [r3]
	b	.L445
.L448:
	bl	usage
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L457+68
	bl	fprintf
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L445:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L449
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #16]
	ldr	r3, .L457+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L450
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L457+72
	bl	printf
.L450:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L449
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #38
	mov	r1, #1
	ldr	r0, .L457+76
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L449:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L451
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmn	r3, #-2147483647
	beq	.L451
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #48
	mov	r1, #1
	ldr	r0, .L457+80
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L451:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L452
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	cmn	r3, #1
	beq	.L452
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #48
	mov	r1, #1
	ldr	r0, .L457+84
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L452:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L453
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L453
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #49
	mov	r1, #1
	ldr	r0, .L457+88
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L453:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L454
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L456
.L454:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L456
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L457+16
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r2, #62
	mov	r1, #1
	ldr	r0, .L457+92
	bl	fwrite
	ldr	r3, .L457+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L456:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L458:
	.align	2
.L457:
	.word	optarg
	.word	verbose
	.word	.LC108
	.word	stderr
	.word	.LC0
	.word	.LC109
	.word	.LC110
	.word	.LC111
	.word	wait_for_stdin
	.word	.LC112
	.word	.LC113
	.word	optind
	.word	.LC114
	.word	.LC115
	.word	.LC116
	.word	.LC117
	.word	.LC118
	.word	.LC119
	.word	.LC120
	.word	.LC121
	.word	.LC122
	.word	.LC123
	.word	.LC124
	.word	.LC125
	.size	revent_args_init, .-revent_args_init
	.align	2
	.global	revent_args_close
	.syntax unified
	.arm
	.fpu softvfp
	.type	revent_args_close, %function
revent_args_close:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	revent_args_close, .-revent_args_close
	.section	.rodata
	.align	2
.LC126:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L470
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	sub	r3, fp, #16
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	revent_args_init
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L462
.L464:
	.word	.L467
	.word	.L466
	.word	.L465
	.word	.L463
.L467:
	ldr	r3, [fp, #-16]
	ldr	r0, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r2, r3
	bl	record
	b	.L462
.L466:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	replay
	b	.L462
.L465:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	dump
	b	.L462
.L463:
	bl	info
	nop
.L462:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	revent_args_close
	mov	r3, #0
	ldr	r2, .L470
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L469
	bl	__stack_chk_fail
.L469:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L471:
	.align	2
.L470:
	.word	.LC126
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	nybble_lookup.6794, %object
	.size	nybble_lookup.6794, 16
nybble_lookup.6794:
	.ascii	"\000\001\001\002\001\002\002\003\001\002\002\003\002"
	.ascii	"\003\003\004"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
