	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_check_add
_sony_check_add:                        ## @sony_check_add
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %eax
	movq	_DUALSHOCK4_CONTROLLER_BT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.1:
	movq	_MOTION_CONTROLLER_BT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.2:
	movq	_NAVIGATION_CONTROLLER_BT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_SIXAXIS_CONTROLLER_BT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
LBB0_4:
	movq	%r15, %rdi
	callq	_sony_get_bt_devaddr
	xorl	%ebx, %ebx
	testq	%rax, %rax
	js	LBB0_8
## %bb.5:
	xorl	%r14d, %r14d
LBB0_6:
	movq	%r15, %rdi
	callq	_sony_check_add_dev_list
	movl	%eax, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_8:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_hid_warn
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_DUALSHOCK4_CONTROLLER_USB@GOTPCREL(%rip), %rcx
	movq	_DUALSHOCK4_DONGLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_18
## %bb.11:
	movq	_DS4_FEATURE_REPORT_0x81_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %r14
	movq	8(%r15), %rdi
	movl	(%rbx), %ecx
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_HID_REQ_GET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$129, %esi
	movq	%r14, %rdx
	callq	_hid_hw_raw_request
	cmpl	(%rbx), %eax
	jne	LBB0_14
## %bb.16:
	movq	16(%r15), %rdi
	movq	%r14, %rsi
	addq	$4, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	jmp	LBB0_17
LBB0_18:
	movq	_SIXAXIS_CONTROLLER_USB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_21
## %bb.19:
	movq	_NAVIGATION_CONTROLLER_USB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
LBB0_21:
	movq	_SIXAXIS_REPORT_0xF2_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.22:
	movq	%rax, %r14
	movq	8(%r15), %rdi
	movl	(%rbx), %ecx
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_HID_REQ_GET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$242, %esi
	movq	%r14, %rdx
	callq	_hid_hw_raw_request
	cmpl	(%rbx), %eax
	jne	LBB0_24
## %bb.23:
	movq	16(%r15), %rcx
	movl	16(%r14), %eax
	movl	%eax, 20(%rcx)
	movl	20(%r14), %eax
	movl	%eax, 16(%rcx)
	movl	24(%r14), %eax
	movl	%eax, 12(%rcx)
	movl	28(%r14), %eax
	movl	%eax, 8(%rcx)
	movl	32(%r14), %eax
	movl	%eax, 4(%rcx)
	movl	36(%r14), %eax
	movl	%eax, (%rcx)
	movq	8(%r15), %rax
LBB0_17:
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	jmp	LBB0_6
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_14:
	movl	%eax, %r12d
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_15
LBB0_24:
	movl	%eax, %r12d
	movq	8(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_15:
	callq	_hid_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r12d, %r12d
	cmovsl	%r12d, %ebx
	jmp	LBB0_7
LBB0_20:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_DUALSHOCK4_CONTROLLER_BT,4,2   ## @DUALSHOCK4_CONTROLLER_BT
	.comm	_MOTION_CONTROLLER_BT,4,2       ## @MOTION_CONTROLLER_BT
	.comm	_NAVIGATION_CONTROLLER_BT,4,2   ## @NAVIGATION_CONTROLLER_BT
	.comm	_SIXAXIS_CONTROLLER_BT,4,2      ## @SIXAXIS_CONTROLLER_BT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UNIQ does not contain a MAC address; duplicate check skipped\n"

	.comm	_DUALSHOCK4_CONTROLLER_USB,4,2  ## @DUALSHOCK4_CONTROLLER_USB
	.comm	_DUALSHOCK4_DONGLE,4,2          ## @DUALSHOCK4_DONGLE
	.comm	_DS4_FEATURE_REPORT_0x81_SIZE,4,2 ## @DS4_FEATURE_REPORT_0x81_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HID_FEATURE_REPORT,4,2         ## @HID_FEATURE_REPORT
	.comm	_HID_REQ_GET_REPORT,4,2         ## @HID_REQ_GET_REPORT
L_.str.1:                               ## @.str.1
	.asciz	"failed to retrieve feature report 0x81 with the DualShock 4 MAC address\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"%pMR"

	.comm	_SIXAXIS_CONTROLLER_USB,4,2     ## @SIXAXIS_CONTROLLER_USB
	.comm	_NAVIGATION_CONTROLLER_USB,4,2  ## @NAVIGATION_CONTROLLER_USB
	.comm	_SIXAXIS_REPORT_0xF2_SIZE,4,2   ## @SIXAXIS_REPORT_0xF2_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"failed to retrieve feature report 0xf2 with the Sixaxis MAC address\n"

	.no_dead_strip	_sony_check_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_check_add
_sony_check_add:                        ; @sony_check_add
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DUALSHOCK4_CONTROLLER_BT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DUALSHOCK4_CONTROLLER_BT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _MOTION_CONTROLLER_BT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MOTION_CONTROLLER_BT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, _NAVIGATION_CONTROLLER_BT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAVIGATION_CONTROLLER_BT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x9, _SIXAXIS_CONTROLLER_BT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SIXAXIS_CONTROLLER_BT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
LBB0_4:
	mov	x0, x19
	bl	_sony_get_bt_devaddr
	tbnz	x0, #63, LBB0_8
; %bb.5:
	mov	x20, #0
LBB0_6:
	mov	x0, x19
	bl	_sony_check_add_dev_list
	mov	x19, x0
LBB0_7:
	mov	x0, x20
	bl	_kfree
	b	LBB0_10
LBB0_8:
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hid_warn
LBB0_9:
	mov	w19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh14:
	adrp	x9, _DUALSHOCK4_CONTROLLER_USB@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DUALSHOCK4_CONTROLLER_USB@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _DUALSHOCK4_DONGLE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DUALSHOCK4_DONGLE@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:
Lloh20:
	adrp	x22, _DS4_FEATURE_REPORT_0x81_SIZE@GOTPAGE
Lloh21:
	ldr	x22, [x22, _DS4_FEATURE_REPORT_0x81_SIZE@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh22:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_21
; %bb.13:
	mov	x20, x0
	ldr	x0, [x19, #8]
	ldr	w3, [x22]
Lloh25:
	adrp	x8, _HID_FEATURE_REPORT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HID_FEATURE_REPORT@GOTPAGEOFF]
Lloh27:
	ldr	w4, [x8]
Lloh28:
	adrp	x8, _HID_REQ_GET_REPORT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HID_REQ_GET_REPORT@GOTPAGEOFF]
Lloh30:
	ldr	w5, [x8]
	mov	w1, #129
	mov	x2, x20
	bl	_hid_hw_raw_request
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_22
; %bb.14:
	ldr	x0, [x19, #16]
	add	x1, x20, #4
	mov	w2, #8
	bl	_memcpy
	ldp	x8, x3, [x19, #8]
	ldr	w0, [x8]
	b	LBB0_20
LBB0_15:
Lloh31:
	adrp	x9, _SIXAXIS_CONTROLLER_USB@GOTPAGE
Lloh32:
	ldr	x9, [x9, _SIXAXIS_CONTROLLER_USB@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.16:
Lloh34:
	adrp	x9, _NAVIGATION_CONTROLLER_USB@GOTPAGE
Lloh35:
	ldr	x9, [x9, _NAVIGATION_CONTROLLER_USB@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_17:
Lloh37:
	adrp	x22, _SIXAXIS_REPORT_0xF2_SIZE@GOTPAGE
Lloh38:
	ldr	x22, [x22, _SIXAXIS_REPORT_0xF2_SIZE@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh39:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_21
; %bb.18:
	mov	x20, x0
	ldr	x0, [x19, #8]
	ldr	w3, [x22]
Lloh42:
	adrp	x8, _HID_FEATURE_REPORT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _HID_FEATURE_REPORT@GOTPAGEOFF]
Lloh44:
	ldr	w4, [x8]
Lloh45:
	adrp	x8, _HID_REQ_GET_REPORT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _HID_REQ_GET_REPORT@GOTPAGEOFF]
Lloh47:
	ldr	w5, [x8]
	mov	w1, #242
	mov	x2, x20
	bl	_hid_hw_raw_request
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_23
; %bb.19:
	ldr	w8, [x20, #16]
	ldp	x9, x3, [x19, #8]
	str	w8, [x3, #20]
	ldr	w8, [x20, #20]
	str	w8, [x3, #16]
	ldr	w8, [x20, #24]
	str	w8, [x3, #12]
	ldr	w8, [x20, #28]
	str	w8, [x3, #8]
	ldr	w8, [x20, #32]
	str	w8, [x3, #4]
	ldr	w8, [x20, #36]
	str	w8, [x3]
	ldr	w0, [x9]
LBB0_20:
Lloh48:
	adrp	x2, l_.str.2@PAGE
Lloh49:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	b	LBB0_6
LBB0_21:
Lloh50:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_10
LBB0_22:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh53:
	adrp	x1, l_.str.1@PAGE
Lloh54:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_24
LBB0_23:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh55:
	adrp	x1, l_.str.3@PAGE
Lloh56:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_24:
	bl	_hid_err
Lloh57:
	adrp	x8, _EINVAL@GOTPAGE
Lloh58:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	cmp	w21, #0
	csneg	w19, w21, w8, lt
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_DUALSHOCK4_CONTROLLER_BT,4,2   ; @DUALSHOCK4_CONTROLLER_BT
	.comm	_MOTION_CONTROLLER_BT,4,2       ; @MOTION_CONTROLLER_BT
	.comm	_NAVIGATION_CONTROLLER_BT,4,2   ; @NAVIGATION_CONTROLLER_BT
	.comm	_SIXAXIS_CONTROLLER_BT,4,2      ; @SIXAXIS_CONTROLLER_BT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UNIQ does not contain a MAC address; duplicate check skipped\n"

	.comm	_DUALSHOCK4_CONTROLLER_USB,4,2  ; @DUALSHOCK4_CONTROLLER_USB
	.comm	_DUALSHOCK4_DONGLE,4,2          ; @DUALSHOCK4_DONGLE
	.comm	_DS4_FEATURE_REPORT_0x81_SIZE,4,2 ; @DS4_FEATURE_REPORT_0x81_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HID_FEATURE_REPORT,4,2         ; @HID_FEATURE_REPORT
	.comm	_HID_REQ_GET_REPORT,4,2         ; @HID_REQ_GET_REPORT
l_.str.1:                               ; @.str.1
	.asciz	"failed to retrieve feature report 0x81 with the DualShock 4 MAC address\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"%pMR"

	.comm	_SIXAXIS_CONTROLLER_USB,4,2     ; @SIXAXIS_CONTROLLER_USB
	.comm	_NAVIGATION_CONTROLLER_USB,4,2  ; @NAVIGATION_CONTROLLER_USB
	.comm	_SIXAXIS_REPORT_0xF2_SIZE,4,2   ; @SIXAXIS_REPORT_0xF2_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"failed to retrieve feature report 0xf2 with the Sixaxis MAC address\n"

	.no_dead_strip	_sony_check_add
.subsections_via_symbols
