	.file	"extr_config.c_get_sdl_joystick_name.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Couldn't init SDL joystick subsystem: %s"
	.text
	.p2align 4
	.type	get_sdl_joystick_name, @function
get_sdl_joystick_name:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edi
	mov	edi, DWORD PTR SDL_INIT_JOYSTICK[rip]
	call	SDL_WasInit@PLT
	test	eax, eax
	jne	.L2
	mov	edi, DWORD PTR SDL_INIT_JOYSTICK[rip]
	call	SDL_InitSubSystem@PLT
	cmp	eax, -1
	je	.L12
	mov	edi, r12d
	call	SDL_JoystickName@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L5
	mov	edi, DWORD PTR SDL_INIT_JOYSTICK[rip]
	call	SDL_QuitSubSystem@PLT
.L1:
	mov	rax, r12
	pop	r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, r12d
	call	SDL_JoystickName@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	lea	r12, JoyName.1937[rip]
	mov	edx, 255
	mov	rsi, rax
	lea	rdi, JoyName.1937[rip]
	call	strncpy@PLT
	mov	rax, r12
	mov	BYTE PTR JoyName.1937[rip+255], 0
	pop	r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xor	eax, eax
	xor	r12d, r12d
	call	SDL_GetError@PLT
	mov	edi, DWORD PTR M64MSG_ERROR[rip]
	lea	rsi, .LC0[rip]
	mov	edx, eax
	call	DebugMessage@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, 255
	mov	rsi, rax
	lea	rdi, JoyName.1937[rip]
	call	strncpy@PLT
	mov	edi, DWORD PTR SDL_INIT_JOYSTICK[rip]
	mov	BYTE PTR JoyName.1937[rip+255], 0
	lea	r12, JoyName.1937[rip]
	call	SDL_QuitSubSystem@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	get_sdl_joystick_name, .-get_sdl_joystick_name
	.local	JoyName.1937
	.comm	JoyName.1937,256,32
	.comm	SDL_INIT_JOYSTICK,4,4
	.comm	M64MSG_ERROR,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_config.c_get_sdl_joystick_name.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Couldn't init SDL joystick subsystem: %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_sdl_joystick_name, %function
get_sdl_joystick_name:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L13
	mov	r4, r0
	ldr	r0, [r6]
	bl	SDL_WasInit
	subs	r5, r0, #0
	bne	.L2
	ldr	r0, [r6]
	bl	SDL_InitSubSystem
	cmn	r0, #1
	beq	.L12
	mov	r0, r4
	bl	SDL_JoystickName
	subs	r4, r0, #0
	bne	.L5
	ldr	r0, [r6]
	bl	SDL_QuitSubSystem
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	SDL_JoystickName
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, .L13+4
	mov	r1, r4
	mov	r0, r3
	mov	r2, #255
	bl	strncpy
	mov	r2, #0
	mov	r4, r0
	strb	r2, [r0, #255]
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r3, .L13+8
	mov	r4, r5
	ldr	r5, [r3]
	bl	SDL_GetError
	ldr	r1, .L13+12
	mov	r2, r0
	mov	r0, r5
	bl	DebugMessage
	b	.L1
.L5:
	ldr	r3, .L13+4
	mov	r1, r4
	mov	r0, r3
	mov	r2, #255
	bl	strncpy
	mov	r3, r0
	ldr	r0, [r6]
	mov	r4, r3
	strb	r5, [r3, #255]
	bl	SDL_QuitSubSystem
	b	.L1
.L14:
	.align	2
.L13:
	.word	SDL_INIT_JOYSTICK
	.word	.LANCHOR0
	.word	M64MSG_ERROR
	.word	.LC0
	.size	get_sdl_joystick_name, .-get_sdl_joystick_name
	.comm	SDL_INIT_JOYSTICK,4,4
	.comm	M64MSG_ERROR,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	JoyName.4221, %object
	.size	JoyName.4221, 256
JoyName.4221:
	.space	256
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
