	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidraw_open
_hidraw_open:                           ## @hidraw_open
	.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	%rsi, %rbx
	callq	_iminor
	movl	%eax, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_minors_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_hidraw_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	%r14d, %r13d
	movq	(%rax,%r13,8), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	cmpl	$0, 16(%r14)
	je	LBB0_4
## %bb.5:
	movl	8(%r14), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 8(%r14)
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_10:
	movq	%r14, 8(%r15)
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_mutex_init
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rsi
	addq	$4, %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %rdi
	callq	_spin_unlock_irqrestore
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	jmp	LBB0_11
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	_minors_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jns	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_kfree
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jns	LBB0_14
	jmp	LBB0_13
LBB0_6:
	movl	12(%r14), %edi
	movq	_PM_HINT_FULLON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hid_hw_power
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	12(%r14), %edi
	callq	_hid_hw_open
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.9:
	movq	(%r12), %rax
	movq	(%rax,%r13,8), %r14
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %ebx
	decl	8(%r14)
	jmp	LBB0_11
LBB0_15:
	movl	12(%r14), %edi
	movq	_PM_HINT_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hid_hw_power
	decl	8(%r14)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_minors_lock,4,2                ## @minors_lock
	.comm	_hidraw_table,8,3               ## @hidraw_table
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PM_HINT_FULLON,4,2             ## @PM_HINT_FULLON
	.comm	_PM_HINT_NORMAL,4,2             ## @PM_HINT_NORMAL
	.no_dead_strip	_hidraw_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidraw_open
_hidraw_open:                           ; @hidraw_open
	.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, x1
	bl	_iminor
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
Lloh3:
	adrp	x0, _minors_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _minors_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh5:
	adrp	x22, _hidraw_table@GOTPAGE
Lloh6:
	ldr	x22, [x22, _hidraw_table@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x23, [x8, w21, uxtw #3]
	cbz	x23, LBB0_6
; %bb.2:
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_6
; %bb.3:
	mov	w24, w21
	ldr	w8, [x23, #8]
	add	w9, w8, #1
	str	w9, [x23, #8]
	cbz	w8, LBB0_11
; %bb.4:
	mov	w21, #0
LBB0_5:
	str	x23, [x19, #8]
	add	x0, x19, #4
	bl	_mutex_init
	ldr	x8, [x22]
	lsl	x23, x24, #3
	ldr	x0, [x8, x23]
	bl	_spin_lock_irqsave
	ldr	x8, [x22]
	ldr	x8, [x8, x23]
	add	x1, x8, #4
	mov	x0, x19
	bl	_list_add_tail
	ldr	x8, [x22]
	ldr	x0, [x8, x23]
	bl	_spin_unlock_irqrestore
	str	x19, [x20]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
Lloh10:
	adrp	x0, _minors_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _minors_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	tbz	w21, #31, LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x0, x21
	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_10:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	tbz	w21, #31, LBB0_9
	b	LBB0_8
LBB0_11:
	ldr	w0, [x23, #12]
Lloh15:
	adrp	x8, _PM_HINT_FULLON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PM_HINT_FULLON@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_hid_hw_power
	tbnz	w0, #31, LBB0_14
; %bb.12:
	ldr	w0, [x23, #12]
	bl	_hid_hw_open
	mov	x21, x0
	tbnz	w0, #31, LBB0_15
; %bb.13:
	ldr	x8, [x22]
	ldr	x23, [x8, x24, lsl #3]
	b	LBB0_5
LBB0_14:
	mov	x21, x0
	b	LBB0_16
LBB0_15:
	ldr	w0, [x23, #12]
Lloh18:
	adrp	x8, _PM_HINT_NORMAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PM_HINT_NORMAL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_hid_hw_power
LBB0_16:
	ldr	w8, [x23, #8]
	sub	w8, w8, #1
	str	w8, [x23, #8]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_minors_lock,4,2                ; @minors_lock
	.comm	_hidraw_table,8,3               ; @hidraw_table
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PM_HINT_FULLON,4,2             ; @PM_HINT_FULLON
	.comm	_PM_HINT_NORMAL,4,2             ; @PM_HINT_NORMAL
	.no_dead_strip	_hidraw_open
.subsections_via_symbols
