	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hiddev_connect                 ## -- Begin function hiddev_connect
	.p2align	4, 0x90
_hiddev_connect:                        ## @hiddev_connect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	24(%rdi), %rbx
	testl	%esi, %esi
	je	LBB0_1
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %r15
	leaq	36(%rax), %rdi
	callq	_init_waitqueue_head
	leaq	32(%r15), %rdi
	callq	_INIT_LIST_HEAD
	leaq	28(%r15), %rdi
	callq	_spin_lock_init
	movq	%r15, %rdi
	addq	$24, %rdi
	callq	_mutex_init
	movq	%r15, 8(%r13)
	movq	%r13, 16(%r15)
	movl	$1, (%r15)
	movq	(%rbx), %rdi
	movq	_hiddev_class@GOTPCREL(%rip), %rsi
	callq	_usb_register_dev
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_hid_err
	movq	$0, 8(%r13)
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_11
LBB0_1:
	movl	(%r13), %ecx
	movl	$-1, %r14d
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	$8, %ebx
	xorl	%r15d, %r15d
	movq	_HID_COLLECTION_APPLICATION@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movl	%ecx, %eax
	addq	$16, %rbx
	cmpq	%rax, %r15
	jae	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rax
	movq	-8(%rax,%rbx), %rdx
	cmpq	(%r12), %rdx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rax,%rbx), %edi
	callq	_IS_INPUT_APPLICATION
	movl	(%r13), %ecx
	testl	%eax, %eax
	jne	LBB0_5
LBB0_6:
	cmpl	%r15d, %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_7
	jmp	LBB0_11
LBB0_10:
	movq	_HID_QUIRK_NO_INIT_REPORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r13), %eax
	movl	%eax, 4(%r15)
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_COLLECTION_APPLICATION,8,3 ## @HID_COLLECTION_APPLICATION
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_hiddev_class,4,2               ## @hiddev_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not able to get a minor for this device\n"

	.comm	_HID_QUIRK_NO_INIT_REPORTS,4,2  ## @HID_QUIRK_NO_INIT_REPORTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hiddev_connect                 ; -- Begin function hiddev_connect
	.p2align	2
_hiddev_connect:                        ; @hiddev_connect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x21, [x0, #24]
	cbz	w1, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.2:
	mov	x20, x0
	add	x0, x0, #36
	bl	_init_waitqueue_head
	add	x0, x20, #32
	bl	_INIT_LIST_HEAD
	add	x0, x20, #28
	bl	_spin_lock_init
	add	x0, x20, #24
	bl	_mutex_init
	str	x20, [x19, #8]
	str	x19, [x20, #16]
	mov	w8, #1
	str	w8, [x20]
	ldr	x0, [x21]
Lloh3:
	adrp	x1, _hiddev_class@GOTPAGE
Lloh4:
	ldr	x1, [x1, _hiddev_class@GOTPAGEOFF]
	bl	_usb_register_dev
	cbz	w0, LBB0_12
; %bb.3:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_hid_err
	str	xzr, [x19, #8]
	mov	x0, x20
	bl	_kfree
	b	LBB0_10
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
; %bb.5:
	mov	x22, #0
	mov	x20, #0
Lloh7:
	adrp	x23, _HID_COLLECTION_APPLICATION@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HID_COLLECTION_APPLICATION@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x20, x20, #1
	add	x22, x22, #16
	cmp	x20, w8, uxtw
	b.hs	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x10, [x9, x22]
	ldr	x11, [x23]
	cmp	x10, x11
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x9, x22
	ldr	w0, [x8, #8]
	bl	_IS_INPUT_APPLICATION
	ldr	w8, [x19]
	cbnz	w0, LBB0_6
LBB0_9:
	cmp	w8, w20
	b.ne	LBB0_1
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w8, [x19, #4]
Lloh9:
	adrp	x9, _HID_QUIRK_NO_INIT_REPORTS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HID_QUIRK_NO_INIT_REPORTS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	x9, [x21]
	ldr	w9, [x9]
	stp	w8, w9, [x20, #4]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_COLLECTION_APPLICATION,8,3 ; @HID_COLLECTION_APPLICATION
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_hiddev_class,4,2               ; @hiddev_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not able to get a minor for this device\n"

	.comm	_HID_QUIRK_NO_INIT_REPORTS,4,2  ; @HID_QUIRK_NO_INIT_REPORTS
.subsections_via_symbols
