	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dinput_init_context            ## -- Begin function dinput_init_context
	.p2align	4, 0x90
_dinput_init_context:                   ## @dinput_init_context
	.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	_g_dinput_ctx@GOTPCREL(%rip), %rax
	movl	$1, %ebx
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	callq	_GetModuleHandle
	movq	_DIRECTINPUT_VERSION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_IID_IDirectInput8@GOTPCREL(%rip), %rdx
	movq	_g_dinput_ctx@GOTPCREL(%rip), %rcx
	movl	%eax, %edi
	xorl	%r8d, %r8d
	callq	_DirectInput8Create
	movl	%eax, %edi
	callq	_SUCCEEDED
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	xorl	%ebx, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_dinput_ctx,8,3               ## @g_dinput_ctx
	.comm	_DIRECTINPUT_VERSION,4,2        ## @DIRECTINPUT_VERSION
	.comm	_IID_IDirectInput8,8,3          ## @IID_IDirectInput8
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[DINPUT]: Failed to initialize DirectInput.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dinput_init_context            ; -- Begin function dinput_init_context
	.p2align	2
_dinput_init_context:                   ; @dinput_init_context
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _g_dinput_ctx@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_dinput_ctx@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, #0
	bl	_GetModuleHandle
Lloh3:
	adrp	x8, _DIRECTINPUT_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DIRECTINPUT_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, _IID_IDirectInput8@GOTPAGE
Lloh7:
	ldr	x2, [x2, _IID_IDirectInput8@GOTPAGEOFF]
Lloh8:
	adrp	x3, _g_dinput_ctx@GOTPAGE
Lloh9:
	ldr	x3, [x3, _g_dinput_ctx@GOTPAGEOFF]
	mov	x4, #0
	bl	_DirectInput8Create
	bl	_SUCCEEDED
	cbz	w0, LBB0_3
LBB0_2:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_g_dinput_ctx,8,3               ; @g_dinput_ctx
	.comm	_DIRECTINPUT_VERSION,4,2        ; @DIRECTINPUT_VERSION
	.comm	_IID_IDirectInput8,8,3          ; @IID_IDirectInput8
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[DINPUT]: Failed to initialize DirectInput.\n"

.subsections_via_symbols
