	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xpad_resume
_xpad_resume:                           ## @xpad_resume
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_usb_get_intfdata
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_XTYPE_XBOX360W@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xpad360w_start_input           ## TAILCALL
LBB0_1:
	movq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r14)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_xpad_start_input
	jmp	LBB0_5
LBB0_3:
	movq	(%rbx), %rax
	movq	_XTYPE_XBOXONE@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_xpad_start_xbox_one
LBB0_5:
	movl	%eax, %r15d
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XTYPE_XBOX360W,8,3             ## @XTYPE_XBOX360W
	.comm	_XTYPE_XBOXONE,8,3              ## @XTYPE_XBOXONE
	.no_dead_strip	_xpad_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xpad_resume
_xpad_resume:                           ; @xpad_resume
	.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
	bl	_usb_get_intfdata
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _XTYPE_XBOX360W@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XTYPE_XBOX360W@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_xpad360w_start_input
LBB0_2:
	ldr	x19, [x20, #8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_xpad_start_input
	b	LBB0_6
LBB0_4:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _XTYPE_XBOXONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _XTYPE_XBOXONE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_xpad_start_xbox_one
LBB0_6:
	mov	x20, x0
	b	LBB0_8
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_XTYPE_XBOX360W,8,3             ; @XTYPE_XBOX360W
	.comm	_XTYPE_XBOXONE,8,3              ; @XTYPE_XBOXONE
	.no_dead_strip	_xpad_resume
.subsections_via_symbols
