	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hidraw_connect                 ## -- Begin function hidraw_connect
	.p2align	4, 0x90
_hidraw_connect:                        ## @hidraw_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_minors_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_HIDRAW_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.4:
	movq	_hidraw_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rax
	cmpq	%rax, %rbx
	jne	LBB0_5
## %bb.10:
	testl	%r12d, %r12d
	jne	LBB0_11
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_13
LBB0_3:
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_11:
	negl	%r12d
	movq	_minors_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_13
LBB0_6:
	movq	%r15, (%rcx,%rax,8)
	movl	%eax, %ebx
LBB0_7:
	movq	_hidraw_class@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addq	$8, %r14
	movq	_hidraw_major@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_MKDEV
	movl	%ebx, (%rsp)
	leaq	L_.str(%rip), %r8
	leaq	L_.str.1(%rip), %r9
	xorl	%r12d, %r12d
	movl	%r13d, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_device_create
	movl	%eax, 24(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	_hidraw_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movq	$0, (%rax,%rcx,8)
	movq	_minors_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	24(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree
	movl	%ebx, %eax
	jmp	LBB0_14
LBB0_12:
	movq	_minors_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	leaq	20(%r15), %rdi
	callq	_init_waitqueue_head
	movq	%r15, %rdi
	addq	$16, %rdi
	callq	_INIT_LIST_HEAD
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movl	%ebx, (%r15)
	movl	$1, 4(%r15)
	movq	%r15, (%rax)
LBB0_13:
	movl	%r12d, %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_minors_lock,4,2                ## @minors_lock
	.comm	_HIDRAW_MAX_DEVICES,4,2         ## @HIDRAW_MAX_DEVICES
	.comm	_hidraw_table,8,3               ## @hidraw_table
	.comm	_hidraw_class,4,2               ## @hidraw_class
	.comm	_hidraw_major,4,2               ## @hidraw_major
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d"

L_.str.1:                               ## @.str.1
	.asciz	"hidraw"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hidraw_connect                 ; -- Begin function hidraw_connect
	.p2align	2
_hidraw_connect:                        ; @hidraw_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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x0, _minors_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _minors_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh8:
	adrp	x8, _HIDRAW_MAX_DEVICES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HIDRAW_MAX_DEVICES@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x8, #0
Lloh11:
	adrp	x9, _hidraw_table@GOTPAGE
Lloh12:
	ldr	x9, [x9, _hidraw_table@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x8, lsl #3]
	cbz	x10, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	cmp	x21, x8
	b.ne	LBB0_3
; %bb.5:
	cbnz	w22, LBB0_8
	b	LBB0_10
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_7:
	mov	w21, #0
	cbz	w22, LBB0_10
LBB0_8:
	neg	w22, w22
Lloh17:
	adrp	x0, _minors_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _minors_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_kfree
	b	LBB0_13
LBB0_9:
	str	x19, [x9, x8, lsl #3]
	mov	x21, x8
LBB0_10:
Lloh19:
	adrp	x8, _hidraw_class@GOTPAGE
Lloh20:
	ldr	x8, [x8, _hidraw_class@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
	add	x23, x20, #8
Lloh22:
	adrp	x8, _hidraw_major@GOTPAGE
Lloh23:
	ldr	x8, [x8, _hidraw_major@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_MKDEV
	mov	x2, x0
Lloh25:
	adrp	x4, l_.str@PAGE
Lloh26:
	add	x4, x4, l_.str@PAGEOFF
Lloh27:
	adrp	x5, l_.str.1@PAGE
Lloh28:
	add	x5, x5, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	mov	x3, #0
	mov	x6, x21
	bl	_device_create
	str	w0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
Lloh29:
	adrp	x8, _hidraw_table@GOTPAGE
Lloh30:
	ldr	x8, [x8, _hidraw_table@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	xzr, [x8, w21, uxtw #3]
Lloh32:
	adrp	x0, _minors_lock@GOTPAGE
Lloh33:
	ldr	x0, [x0, _minors_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x19, #24]
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	b	LBB0_14
LBB0_12:
Lloh34:
	adrp	x0, _minors_lock@GOTPAGE
Lloh35:
	ldr	x0, [x0, _minors_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	add	x0, x19, #20
	bl	_init_waitqueue_head
	add	x0, x19, #16
	bl	_INIT_LIST_HEAD
	mov	w22, #0
	str	x20, [x19, #8]
	mov	w8, #1
	stp	w21, w8, [x19]
	str	x19, [x20]
LBB0_13:
	mov	x0, x22
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_minors_lock,4,2                ; @minors_lock
	.comm	_HIDRAW_MAX_DEVICES,4,2         ; @HIDRAW_MAX_DEVICES
	.comm	_hidraw_table,8,3               ; @hidraw_table
	.comm	_hidraw_class,4,2               ; @hidraw_class
	.comm	_hidraw_major,4,2               ; @hidraw_major
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d"

l_.str.1:                               ; @.str.1
	.asciz	"hidraw"

.subsections_via_symbols
