	.file	"extr_task_autodetect.c_input_autoconfigure_joypad_add.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"N/A"
.LC1:
	.string	"input_device_display_name"
.LC2:
	.string	"input_device_type"
.LC3:
	.string	"remote"
.LC4:
	.string	" configured."
.LC5:
	.string	"%s %s #%u."
.LC6:
	.string	"input_swap_override"
	.text
	.p2align 4
	.type	input_autoconfigure_joypad_add, @function
input_autoconfigure_joypad_add:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 440
	.cfi_def_cfa_offset 496
	mov	rdx, QWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 424[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR input_autoconfigured[rip]
	mov	r15d, DWORD PTR [rax+rdx*4]
	test	r15d, r15d
	jne	.L31
.L2:
	lea	r12, 160[rsp]
	mov	ecx, 128
	mov	rdi, rbp
	mov	BYTE PTR 32[rsp], 0
	mov	rdx, r12
	lea	rsi, .LC1[rip]
	lea	r14, 288[rsp]
	mov	BYTE PTR 288[rsp], 0
	mov	BYTE PTR 160[rsp], 0
	call	config_get_array@PLT
	mov	ecx, 128
	mov	rdx, r14
	mov	rdi, rbp
	lea	rsi, .LC2[rip]
	call	config_get_array@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR input_autoconfigured[rip]
	mov	rdi, rbp
	mov	DWORD PTR [rdx+rax*4], 1
	mov	rdx, QWORD PTR input_autoconf_binds[rip]
	mov	esi, DWORD PTR [rdx+rax*4]
	call	input_autoconfigure_joypad_conf@PLT
	lea	rsi, .LC3[rip]
	mov	rdi, r14
	call	string_is_equal@PLT
	test	rax, rax
	je	.L3
	mov	rdi, r12
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L32
.L4:
	mov	rdi, r12
	call	string_is_empty@PLT
	lea	rsi, .LC0[rip]
	test	rax, rax
	cmove	rsi, r12
.L5:
	lea	r14, 32[rsp]
	mov	edx, 128
	mov	rdi, r14
	call	strlcpy@PLT
	mov	edx, 128
	lea	rsi, .LC4[rip]
	mov	rdi, r14
	call	strlcat@PLT
	mov	eax, DWORD PTR remote_is_bound.1994[rip]
	test	eax, eax
	je	.L33
.L6:
	mov	DWORD PTR remote_is_bound.1994[rip], 1
	cmp	QWORD PTR [rbx], 0
	jne	.L7
	mov	DWORD PTR input_autoconfigure_swap_override[rip], 1
	mov	rdi, r12
	call	string_is_empty@PLT
	test	rax, rax
	je	.L34
.L13:
	mov	edi, DWORD PTR [rbx]
	mov	rsi, QWORD PTR 8[rbx]
	call	input_config_set_device_display_name@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	string_is_empty@PLT
	test	rax, rax
	je	.L35
.L15:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	input_config_set_device_config_name@PLT
	mov	rdi, QWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	input_config_set_device_config_path@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, r12
	mov	DWORD PTR 28[rsp], 0
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L36
.L8:
	mov	rdi, r12
	call	string_is_empty@PLT
	lea	rcx, .LC0[rip]
	test	rax, rax
	cmove	rcx, r12
.L9:
	mov	r9, QWORD PTR [rbx]
	mov	edi, DWORD PTR MSG_DEVICE_CONFIGURED_IN_PORT[rip]
	mov	QWORD PTR 8[rsp], rcx
	lea	r14, 32[rsp]
	mov	QWORD PTR [rsp], r9
	call	msg_hash_to_str@PLT
	mov	r9, QWORD PTR [rsp]
	mov	rcx, QWORD PTR 8[rsp]
	mov	rdi, r14
	mov	r8, rax
	lea	rdx, .LC5[rip]
	mov	esi, 128
	call	snprintf@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L37
.L10:
	test	r15d, r15d
	je	.L38
.L7:
	mov	rdi, r12
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L13
.L34:
	mov	edi, DWORD PTR [rbx]
	mov	rsi, r12
	call	input_config_set_device_display_name@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L15
.L35:
	mov	rdi, QWORD PTR 0[rbp]
	call	path_basename@PLT
	mov	edi, DWORD PTR [rbx]
	mov	rsi, rax
	call	input_config_set_device_config_name@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, QWORD PTR 0[rbp]
	call	input_config_set_device_config_path@PLT
.L16:
	xor	eax, eax
	call	input_autoconfigure_joypad_reindex_devices@PLT
	mov	rax, QWORD PTR 424[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L39
	add	rsp, 440
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L8
	mov	rcx, QWORD PTR 8[rbx]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdi, QWORD PTR 8[rbx]
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L4
	mov	rsi, QWORD PTR 8[rbx]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, QWORD PTR 8[rsi]
	xor	r15d, r15d
	call	string_is_empty@PLT
	test	rax, rax
	sete	r15b
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdi, r13
	call	task_free_title@PLT
	mov	rdi, r14
	call	strdup@PLT
	mov	rdi, r13
	mov	esi, eax
	call	task_set_title@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L38:
	mov	rdi, r13
	call	task_free_title@PLT
	mov	rdi, r14
	call	strdup@PLT
	mov	rdi, r13
	mov	esi, eax
	call	task_set_title@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L37:
	lea	rdx, 28[rsp]
	lea	rsi, .LC6[rip]
	mov	rdi, rbp
	call	config_get_bool@PLT
	test	rax, rax
	je	.L11
	mov	eax, DWORD PTR 28[rsp]
	mov	DWORD PTR input_autoconfigure_swap_override[rip], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	mov	DWORD PTR input_autoconfigure_swap_override[rip], 0
	jmp	.L10
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	input_autoconfigure_joypad_add, .-input_autoconfigure_joypad_add
	.local	remote_is_bound.1994
	.comm	remote_is_bound.1994,4,4
	.comm	input_autoconfigured,8,8
	.comm	input_autoconfigure_swap_override,4,4
	.comm	input_autoconf_binds,8,8
	.comm	MSG_DEVICE_CONFIGURED_IN_PORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_task_autodetect.c_input_autoconfigure_joypad_add.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"N/A\000"
	.align	2
.LC1:
	.ascii	"input_device_display_name\000"
	.align	2
.LC2:
	.ascii	"input_device_type\000"
	.align	2
.LC3:
	.ascii	"remote\000"
	.align	2
.LC4:
	.ascii	" configured.\000"
	.align	2
.LC5:
	.ascii	"%s %s #%u.\000"
	.align	2
.LC6:
	.ascii	"input_swap_override\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	input_autoconfigure_joypad_add, %function
input_autoconfigure_joypad_add:
	@ args = 0, pretend = 0, frame = 392
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r9, .L38
	mov	r4, r1
	ldr	r3, [r9]
	ldr	r1, [r1]
	sub	sp, sp, #404
	ldr	r7, [r3, r1, lsl #2]
	ldr	r3, .L38+4
	cmp	r7, #0
	mov	r5, r0
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #396]
	mov	r3,#0
	bne	.L31
.L2:
	mov	ip, #0
	add	r6, sp, #140
	mov	r2, r6
	mov	r3, #128
	ldr	r1, .L38+8
	mov	r0, r5
	strb	ip, [sp, #268]
	strb	ip, [sp, #140]
	strb	ip, [sp, #12]
	bl	config_get_array
	mov	r3, #128
	ldr	r1, .L38+12
	add	r2, sp, #268
	mov	r0, r5
	bl	config_get_array
	mov	r0, #1
	ldr	r2, .L38+16
	ldr	r3, [r4]
	ldr	r1, [r9]
	ldr	r2, [r2]
	str	r0, [r1, r3, lsl #2]
	ldr	r1, [r2, r3, lsl #2]
	mov	r0, r5
	bl	input_autoconfigure_joypad_conf
	ldr	r1, .L38+20
	add	r0, sp, #268
	bl	string_is_equal
	subs	r3, r0, #0
	mov	r0, r6
	beq	.L3
	bl	string_is_empty
	cmp	r0, #0
	bne	.L32
.L4:
	mov	r0, r6
	bl	string_is_empty
	cmp	r0, #0
	ldr	r1, .L38+24
	moveq	r1, r6
.L5:
	mov	r2, #128
	ldr	r7, .L38+28
	add	r0, sp, #12
	bl	strlcpy
	mov	r2, #128
	ldr	r1, .L38+32
	add	r0, sp, #12
	bl	strlcat
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L33
.L6:
	mov	r3, #1
	ldr	r2, [r4]
	str	r3, [r7]
	cmp	r2, #0
	ldreq	r2, .L38+36
	streq	r3, [r2]
	b	.L7
.L3:
	str	r3, [sp, #8]
	bl	string_is_empty
	cmp	r0, #0
	bne	.L34
.L8:
	mov	r0, r6
	bl	string_is_empty
	cmp	r0, #0
	ldr	r9, .L38+24
	moveq	r9, r6
.L9:
	ldr	r3, .L38+40
	ldr	r0, [r3]
	bl	msg_hash_to_str
	ldr	r2, [r4]
	mov	r3, r9
	str	r0, [sp]
	str	r2, [sp, #4]
	mov	r1, #128
	ldr	r2, .L38+44
	add	r0, sp, #12
	bl	snprintf
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L35
.L10:
	cmp	r7, #0
	beq	.L36
.L7:
	mov	r0, r6
	bl	string_is_empty
	cmp	r0, #0
	moveq	r1, r6
	ldmne	r4, {r0, r1}
	ldreq	r0, [r4]
	bl	input_config_set_device_display_name
	ldr	r0, [r5]
	bl	string_is_empty
	cmp	r0, #0
	bne	.L15
	ldr	r0, [r5]
	ldr	r6, [r4]
	bl	path_basename
	mov	r1, r0
	mov	r0, r6
	bl	input_config_set_device_config_name
	ldr	r1, [r5]
	ldr	r0, [r4]
	bl	input_config_set_device_config_path
.L16:
	bl	input_autoconfigure_joypad_reindex_devices
	ldr	r3, .L38+4
	ldr	r2, [r3]
	ldr	r3, [sp, #396]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L37
	add	sp, sp, #404
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L32:
	ldr	r0, [r4, #4]
	bl	string_is_empty
	cmp	r0, #0
	bne	.L4
	ldr	r1, [r4, #4]
	b	.L5
.L34:
	ldr	r0, [r4, #4]
	bl	string_is_empty
	cmp	r0, #0
	bne	.L8
	ldr	r9, [r4, #4]
	b	.L9
.L15:
	ldr	r1, .L38+24
	ldr	r0, [r4]
	bl	input_config_set_device_config_name
	ldr	r0, [r4]
	ldr	r1, .L38+24
	bl	input_config_set_device_config_path
	b	.L16
.L31:
	ldr	r0, [r4, #4]
	bl	string_is_empty
	clz	r7, r0
	lsr	r7, r7, #5
	b	.L2
.L33:
	mov	r0, r8
	bl	task_free_title
	add	r0, sp, #12
	bl	strdup
	mov	r1, r0
	mov	r0, r8
	bl	task_set_title
	b	.L6
.L36:
	mov	r0, r8
	bl	task_free_title
	add	r0, sp, #12
	bl	strdup
	mov	r1, r0
	mov	r0, r8
	bl	task_set_title
	b	.L7
.L35:
	add	r2, sp, #8
	mov	r0, r5
	ldr	r1, .L38+48
	bl	config_get_bool
	cmp	r0, #0
	ldr	r3, .L38+36
	ldrne	r2, [sp, #8]
	streq	r0, [r3]
	strne	r2, [r3]
	b	.L10
.L37:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	input_autoconfigured
	.word	.LC7
	.word	.LC1
	.word	.LC2
	.word	input_autoconf_binds
	.word	.LC3
	.word	.LC0
	.word	.LANCHOR0
	.word	.LC4
	.word	input_autoconfigure_swap_override
	.word	MSG_DEVICE_CONFIGURED_IN_PORT
	.word	.LC5
	.word	.LC6
	.size	input_autoconfigure_joypad_add, .-input_autoconfigure_joypad_add
	.comm	input_autoconfigured,4,4
	.comm	input_autoconfigure_swap_override,4,4
	.comm	input_autoconf_binds,4,4
	.comm	MSG_DEVICE_CONFIGURED_IN_PORT,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	remote_is_bound.4278, %object
	.size	remote_is_bound.4278, 4
remote_is_bound.4278:
	.space	4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
