	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _get_protocol
__get_protocol:                         ## @_get_protocol
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	__kbd@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpl	$-1, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_hId@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	$1, %esi
	callq	_iosAlloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r14
	movq	(%r12), %rax
	movq	_USB_REQTYPE_INTERFACE_GET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_USB_REQ_GETPROTOCOL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %edi
	movl	4(%rax), %r8d
	movq	%r14, (%rsp)
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_USB_WriteCtrlMsg
	movl	(%r14), %ebx
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_iosFree
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__kbd,8,3                       ## @_kbd
	.comm	_hId,4,2                        ## @hId
	.comm	_USB_REQTYPE_INTERFACE_GET,4,2  ## @USB_REQTYPE_INTERFACE_GET
	.comm	_USB_REQ_GETPROTOCOL,4,2        ## @USB_REQ_GETPROTOCOL
	.no_dead_strip	__get_protocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _get_protocol
__get_protocol:                         ; @_get_protocol
	.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
Lloh0:
	adrp	x20, __kbd@GOTPAGE
Lloh1:
	ldr	x20, [x20, __kbd@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x8]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.2:
Lloh2:
	adrp	x21, _hId@GOTPAGE
Lloh3:
	ldr	x21, [x21, _hId@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #1
	bl	_iosAlloc
	cbz	x0, LBB0_4
; %bb.3:
	mov	x19, x0
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _USB_REQTYPE_INTERFACE_GET@GOTPAGE
Lloh5:
	ldr	x9, [x9, _USB_REQTYPE_INTERFACE_GET@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x9]
Lloh7:
	adrp	x9, _USB_REQ_GETPROTOCOL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _USB_REQ_GETPROTOCOL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x9]
	ldp	w0, w4, [x8]
	mov	w3, #0
	mov	w5, #1
	mov	x6, x19
	bl	_USB_WriteCtrlMsg
	ldr	w20, [x19]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_iosFree
	b	LBB0_5
LBB0_4:
	mov	w20, #-1
LBB0_5:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	__kbd,8,3                       ; @_kbd
	.comm	_hId,4,2                        ; @hId
	.comm	_USB_REQTYPE_INTERFACE_GET,4,2  ; @USB_REQTYPE_INTERFACE_GET
	.comm	_USB_REQ_GETPROTOCOL,4,2        ; @USB_REQ_GETPROTOCOL
	.no_dead_strip	__get_protocol
.subsections_via_symbols
