	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbhid_open
_usbhid_open:                           ## @usbhid_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	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_HID_OPENED@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	_HID_QUIRK_ALWAYS_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	testl	%eax, (%rbx)
	jne	LBB0_11
## %bb.1:
	movq	8(%r14), %rdi
	callq	_usb_autopm_get_interface
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	8(%r14), %rax
	movl	$1, (%rax)
	movq	_HID_RESUME_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	_HID_IN_POLLING@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_hid_start_in
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_5
## %bb.8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	8(%r14), %rdi
	movl	$0, (%rdi)
	callq	_usb_autopm_put_interface
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.9:
	negl	%r15d
	jmp	LBB0_10
LBB0_2:
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_5:
	movq	%rbx, %rdi
	callq	_hid_io_error
LBB0_6:
	movq	8(%r14), %rdi
	callq	_usb_autopm_put_interface
LBB0_7:
	movl	$50, %edi
	callq	_msleep
	xorl	%r15d, %r15d
LBB0_10:
	movq	_HID_RESUME_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_OPENED,4,2                 ## @HID_OPENED
	.comm	_HID_QUIRK_ALWAYS_POLL,4,2      ## @HID_QUIRK_ALWAYS_POLL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_HID_RESUME_RUNNING,4,2         ## @HID_RESUME_RUNNING
	.comm	_HID_IN_POLLING,4,2             ## @HID_IN_POLLING
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_usbhid_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbhid_open
_usbhid_open:                           ; @usbhid_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, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x22, _HID_OPENED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HID_OPENED@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_set_bit
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _HID_QUIRK_ALWAYS_POLL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HID_QUIRK_ALWAYS_POLL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_12
LBB0_2:
	ldr	x0, [x19, #8]
	bl	_usb_autopm_get_interface
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x8, [x19, #8]
	mov	w9, #1
	str	w9, [x8]
Lloh5:
	adrp	x21, _HID_RESUME_RUNNING@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HID_RESUME_RUNNING@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_set_bit
Lloh7:
	adrp	x23, _HID_IN_POLLING@GOTPAGE
Lloh8:
	ldr	x23, [x23, _HID_IN_POLLING@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x19
	bl	_set_bit
	mov	x0, x20
	bl	_hid_start_in
	cbz	w0, LBB0_9
; %bb.4:
Lloh9:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_8
; %bb.5:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	ldr	w0, [x22]
	mov	x1, x19
	bl	_clear_bit
	ldr	w0, [x23]
	mov	x1, x19
	bl	_clear_bit
	ldr	x0, [x19, #8]
	str	wzr, [x0]
	bl	_usb_autopm_put_interface
	cbz	w20, LBB0_10
; %bb.6:
	neg	w20, w20
	b	LBB0_11
LBB0_7:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_clear_bit
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_8:
	mov	x0, x20
	bl	_hid_io_error
LBB0_9:
	ldr	x0, [x19, #8]
	bl	_usb_autopm_put_interface
LBB0_10:
	mov	w0, #50
	bl	_msleep
	mov	w20, #0
LBB0_11:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
LBB0_12:
	mov	x0, x20
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_OPENED,4,2                 ; @HID_OPENED
	.comm	_HID_QUIRK_ALWAYS_POLL,4,2      ; @HID_QUIRK_ALWAYS_POLL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_HID_RESUME_RUNNING,4,2         ; @HID_RESUME_RUNNING
	.comm	_HID_IN_POLLING,4,2             ; @HID_IN_POLLING
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_usbhid_open
.subsections_via_symbols
