	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimote_init_set_type
_wiimote_init_set_type:                 ## @wiimote_init_set_type
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_WIIMOTE_DEV_GENERIC@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	(%rdi), %rbx
	movq	(%rbx), %rcx
	movq	8(%rbx), %r8
	movq	16(%rbx), %rdx
	movq	_WIIMOTE_EXT_BALANCE_BOARD@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_WIIMOTE_DEV_BALANCE_BOARD@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_2:
	movq	_WIIMOTE_EXT_PRO_CONTROLLER@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_WIIMOTE_DEV_PRO_CONTROLLER@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %r12
LBB0_19:
	cmpq	%r13, %r12
	jne	LBB0_21
LBB0_20:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %r9
	xorl	%eax, %eax
	callq	_hid_info
	jmp	LBB0_22
LBB0_21:
	movq	_wiimote_devtype_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%r12,4), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_hid_info
	movq	%r12, %r13
LBB0_22:
	movq	%r14, %rdi
	movq	%r13, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wiimote_modules_load           ## TAILCALL
LBB0_4:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%rdx, %rdi
	movq	%rdx, %r12
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	_USB_VENDOR_ID_NINTENDO@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rax), %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_20
## %bb.14:
	movq	_USB_DEVICE_ID_NINTENDO_WIIMOTE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r8
	jne	LBB0_16
## %bb.15:
	movq	_WIIMOTE_DEV_GEN10@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_5:
	movq	_WIIMOTE_DEV_GEN10@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	_WIIMOTE_DEV_GEN20@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_10:
	movq	_WIIMOTE_DEV_BALANCE_BOARD@GOTPCREL(%rip), %rax
LBB0_6:
	movq	%r12, %rdx
	movq	(%rax), %r12
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jmp	LBB0_19
LBB0_12:
	movq	_WIIMOTE_DEV_PRO_CONTROLLER@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_16:
	movq	_USB_DEVICE_ID_NINTENDO_WIIMOTE2@GOTPCREL(%rip), %rax
	movq	%r13, %r12
	cmpq	(%rax), %r8
	jne	LBB0_19
## %bb.17:
	movq	_WIIMOTE_DEV_GEN20@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIMOTE_DEV_GENERIC,8,3        ## @WIIMOTE_DEV_GENERIC
	.comm	_WIIMOTE_EXT_BALANCE_BOARD,8,3  ## @WIIMOTE_EXT_BALANCE_BOARD
	.comm	_WIIMOTE_DEV_BALANCE_BOARD,8,3  ## @WIIMOTE_DEV_BALANCE_BOARD
	.comm	_WIIMOTE_EXT_PRO_CONTROLLER,8,3 ## @WIIMOTE_EXT_PRO_CONTROLLER
	.comm	_WIIMOTE_DEV_PRO_CONTROLLER,8,3 ## @WIIMOTE_DEV_PRO_CONTROLLER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Nintendo RVL-CNT-01"

	.comm	_WIIMOTE_DEV_GEN10,8,3          ## @WIIMOTE_DEV_GEN10
L_.str.1:                               ## @.str.1
	.asciz	"Nintendo RVL-CNT-01-TR"

	.comm	_WIIMOTE_DEV_GEN20,8,3          ## @WIIMOTE_DEV_GEN20
L_.str.2:                               ## @.str.2
	.asciz	"Nintendo RVL-WBC-01"

L_.str.3:                               ## @.str.3
	.asciz	"Nintendo RVL-CNT-01-UC"

	.comm	_USB_VENDOR_ID_NINTENDO,8,3     ## @USB_VENDOR_ID_NINTENDO
	.comm	_USB_DEVICE_ID_NINTENDO_WIIMOTE,8,3 ## @USB_DEVICE_ID_NINTENDO_WIIMOTE
	.comm	_USB_DEVICE_ID_NINTENDO_WIIMOTE2,8,3 ## @USB_DEVICE_ID_NINTENDO_WIIMOTE2
L_.str.4:                               ## @.str.4
	.asciz	"cannot detect device; NAME: %s VID: %04x PID: %04x EXT: %04x\n"

L_.str.5:                               ## @.str.5
	.asciz	"detected device: %s\n"

	.comm	_wiimote_devtype_names,8,3      ## @wiimote_devtype_names
	.no_dead_strip	_wiimote_init_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimote_init_set_type
_wiimote_init_set_type:                 ; @wiimote_init_set_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _WIIMOTE_DEV_GENERIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIIMOTE_DEV_GENERIC@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	ldr	x20, [x0]
	ldp	x25, x26, [x20]
	ldr	x22, [x20, #16]
Lloh3:
	adrp	x8, _WIIMOTE_EXT_BALANCE_BOARD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WIIMOTE_EXT_BALANCE_BOARD@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_2
LBB0_1:
Lloh6:
	adrp	x8, _WIIMOTE_DEV_BALANCE_BOARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIIMOTE_DEV_BALANCE_BOARD@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
Lloh8:
	adrp	x8, _WIIMOTE_EXT_PRO_CONTROLLER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WIIMOTE_EXT_PRO_CONTROLLER@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _WIIMOTE_DEV_PRO_CONTROLLER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WIIMOTE_DEV_PRO_CONTROLLER@GOTPAGEOFF]
	b	LBB0_12
LBB0_4:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.5:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cbz	w0, LBB0_11
; %bb.6:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cbz	w0, LBB0_1
; %bb.7:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cbz	w0, LBB0_3
; %bb.8:
Lloh21:
	adrp	x8, _USB_VENDOR_ID_NINTENDO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _USB_VENDOR_ID_NINTENDO@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x25, x8
	b.ne	LBB0_13
; %bb.9:
Lloh24:
	adrp	x8, _USB_DEVICE_ID_NINTENDO_WIIMOTE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _USB_DEVICE_ID_NINTENDO_WIIMOTE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x26, x8
	b.ne	LBB0_14
LBB0_10:
Lloh27:
	adrp	x8, _WIIMOTE_DEV_GEN10@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WIIMOTE_DEV_GEN10@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh29:
	adrp	x8, _WIIMOTE_DEV_GEN20@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WIIMOTE_DEV_GEN20@GOTPAGEOFF]
LBB0_12:
	ldr	x23, [x8]
	cmp	x23, x24
	b.ne	LBB0_15
LBB0_13:
	stp	x26, x21, [sp, #8]
	str	x25, [sp]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_hid_info
	mov	x23, x24
	b	LBB0_16
LBB0_14:
Lloh33:
	adrp	x8, _USB_DEVICE_ID_NINTENDO_WIIMOTE2@GOTPAGE
Lloh34:
	ldr	x8, [x8, _USB_DEVICE_ID_NINTENDO_WIIMOTE2@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
Lloh36:
	adrp	x9, _WIIMOTE_DEV_GEN20@GOTPAGE
Lloh37:
	ldr	x9, [x9, _WIIMOTE_DEV_GEN20@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x26, x8
	csel	x23, x9, x24, eq
	cmp	x23, x24
	b.eq	LBB0_13
LBB0_15:
Lloh39:
	adrp	x8, _wiimote_devtype_names@GOTPAGE
Lloh40:
	ldr	x8, [x8, _wiimote_devtype_names@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	ldrsw	x2, [x8, x23, lsl #2]
Lloh42:
	adrp	x1, l_.str.5@PAGE
Lloh43:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_hid_info
LBB0_16:
	mov	x0, x19
	mov	x1, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_wiimote_modules_load
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIMOTE_DEV_GENERIC,8,3        ; @WIIMOTE_DEV_GENERIC
	.comm	_WIIMOTE_EXT_BALANCE_BOARD,8,3  ; @WIIMOTE_EXT_BALANCE_BOARD
	.comm	_WIIMOTE_DEV_BALANCE_BOARD,8,3  ; @WIIMOTE_DEV_BALANCE_BOARD
	.comm	_WIIMOTE_EXT_PRO_CONTROLLER,8,3 ; @WIIMOTE_EXT_PRO_CONTROLLER
	.comm	_WIIMOTE_DEV_PRO_CONTROLLER,8,3 ; @WIIMOTE_DEV_PRO_CONTROLLER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Nintendo RVL-CNT-01"

	.comm	_WIIMOTE_DEV_GEN10,8,3          ; @WIIMOTE_DEV_GEN10
l_.str.1:                               ; @.str.1
	.asciz	"Nintendo RVL-CNT-01-TR"

	.comm	_WIIMOTE_DEV_GEN20,8,3          ; @WIIMOTE_DEV_GEN20
l_.str.2:                               ; @.str.2
	.asciz	"Nintendo RVL-WBC-01"

l_.str.3:                               ; @.str.3
	.asciz	"Nintendo RVL-CNT-01-UC"

	.comm	_USB_VENDOR_ID_NINTENDO,8,3     ; @USB_VENDOR_ID_NINTENDO
	.comm	_USB_DEVICE_ID_NINTENDO_WIIMOTE,8,3 ; @USB_DEVICE_ID_NINTENDO_WIIMOTE
	.comm	_USB_DEVICE_ID_NINTENDO_WIIMOTE2,8,3 ; @USB_DEVICE_ID_NINTENDO_WIIMOTE2
l_.str.4:                               ; @.str.4
	.asciz	"cannot detect device; NAME: %s VID: %04x PID: %04x EXT: %04x\n"

l_.str.5:                               ; @.str.5
	.asciz	"detected device: %s\n"

	.comm	_wiimote_devtype_names,8,3      ; @wiimote_devtype_names
	.no_dead_strip	_wiimote_init_set_type
.subsections_via_symbols
