	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ButtonConfigBegin              ## -- Begin function ButtonConfigBegin
	.p2align	4, 0x90
_ButtonConfigBegin:                     ## @ButtonConfigBegin
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_SDL_INIT_VIDEO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_SDL_QuitSubSystem
	xorl	%eax, %eax
	callq	_KillVideo
	movq	_bcpv@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_KillJoysticks
	movq	_bcpj@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	(%rbx), %edi
	callq	_SDL_WasInit
	movl	(%rbx), %edi
	testl	%eax, %edi
	jne	LBB0_3
## %bb.1:
	callq	_SDL_InitSubSystem
	cmpl	$-1, %eax
	je	LBB0_2
LBB0_3:
	movl	$1, %ebx
	movl	$300, %edi                      ## imm = 0x12C
	movl	$1, %esi
	movl	$8, %edx
	xorl	%ecx, %ecx
	callq	_SDL_SetVideoMode
	leaq	L_.str(%rip), %rdi
	xorl	%esi, %esi
	callq	_SDL_WM_SetCaption
	xorl	%eax, %eax
	callq	_InitJoysticks
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_SDL_GetError
	movl	%eax, %edi
	callq	_FCEUD_Message
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_INIT_VIDEO,4,2             ## @SDL_INIT_VIDEO
	.comm	_bcpv,4,2                       ## @bcpv
	.comm	_bcpj,4,2                       ## @bcpj
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Button Config"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ButtonConfigBegin              ; -- Begin function ButtonConfigBegin
	.p2align	2
_ButtonConfigBegin:                     ; @ButtonConfigBegin
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _SDL_INIT_VIDEO@GOTPAGE
Lloh1:
	ldr	x19, [x19, _SDL_INIT_VIDEO@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_SDL_QuitSubSystem
	bl	_KillVideo
Lloh2:
	adrp	x8, _bcpv@GOTPAGE
Lloh3:
	ldr	x8, [x8, _bcpv@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
	bl	_KillJoysticks
Lloh5:
	adrp	x8, _bcpj@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bcpj@GOTPAGEOFF]
Lloh7:
	str	w0, [x8]
	ldr	w0, [x19]
	bl	_SDL_WasInit
	mov	x8, x0
	ldr	w0, [x19]
	tst	w0, w8
	b.ne	LBB0_2
; %bb.1:
	bl	_SDL_InitSubSystem
	cmn	w0, #1
	b.eq	LBB0_4
LBB0_2:
	mov	w19, #1
	mov	w0, #300
	mov	w1, #1
	mov	w2, #8
	mov	w3, #0
	bl	_SDL_SetVideoMode
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	bl	_SDL_WM_SetCaption
	bl	_InitJoysticks
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	bl	_SDL_GetError
	bl	_FCEUD_Message
	mov	w19, #0
	b	LBB0_3
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_INIT_VIDEO,4,2             ; @SDL_INIT_VIDEO
	.comm	_bcpv,4,2                       ; @bcpv
	.comm	_bcpj,4,2                       ; @bcpj
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Button Config"

.subsections_via_symbols
