	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_control                    ## -- Begin function hid_control
	.p2align	4, 0x90
_hid_control:                           ## @hid_control
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setg	%dil
	callq	_assert
	movl	(%r15), %ebx
	movl	%ebx, %eax
	sarl	$4, %eax
	cmpl	$1, %eax
	je	LBB0_4
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	testb	$15, %bl
	je	LBB0_15
## %bb.3:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_13
LBB0_4:
	andl	$15, %ebx
	cmpl	$5, %ebx
	ja	LBB0_11
## %bb.5:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_6:
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	movl	(%r15), %ecx
	andl	$15, %ecx
	cmpl	$1, %ecx
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rdx, %rcx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_15
LBB0_12:
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	leaq	L_.str.8(%rip), %rsi
LBB0_13:
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
LBB0_14:
	xorl	%eax, %eax
	callq	_syslog
LBB0_15:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	movl	(%r15), %ecx
	leaq	L_.str.7(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	jmp	LBB0_14
LBB0_7:
	movq	_LOG_NOTICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_8
LBB0_9:
	movq	_LOG_NOTICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	leaq	L_.str.5(%rip), %rsi
LBB0_8:
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_15
LBB0_10:
	movq	_LOG_NOTICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bt_ntoa
	leaq	L_.str.6(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_syslog
	movq	%r14, %rdi
	callq	_session_close
	jmp	LBB0_15
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_6
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got handshake message with error response 0x%x from %s"

	.comm	_LOG_WARNING,4,2                ## @LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Device %s requested %s reset"

L_.str.2:                               ## @.str.2
	.asciz	"hard"

L_.str.3:                               ## @.str.3
	.asciz	"soft"

	.comm	_LOG_NOTICE,4,2                 ## @LOG_NOTICE
L_.str.4:                               ## @.str.4
	.asciz	"Device %s requested Suspend"

L_.str.5:                               ## @.str.5
	.asciz	"Device %s requested Exit Suspend"

L_.str.6:                               ## @.str.6
	.asciz	"Device %s unplugged virtual cable"

L_.str.7:                               ## @.str.7
	.asciz	"Device %s sent unknown HID_Control message 0x%x"

L_.str.8:                               ## @.str.8
	.asciz	"Got unexpected message 0x%x on Control channel from %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_control                    ; -- Begin function hid_control
	.p2align	2
_hid_control:                           ; @hid_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	cmp	x21, #0
	cset	w0, gt
	bl	_assert
	ldr	w21, [x20]
	asr	w8, w21, #4
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.1:
	cbnz	w8, LBB0_7
; %bb.2:
	tst	w21, #0xf
	b.eq	LBB0_10
; %bb.3:
Lloh0:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	and	w8, w21, #0xf
	cmp	w8, #5
	b.hi	LBB0_11
; %bb.5:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
Lloh7:
	adrp	x8, _LOG_WARNING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LOG_WARNING@GOTPAGEOFF]
Lloh9:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x2, x0
	ldr	w8, [x20]
	and	w8, w8, #0xf
Lloh10:
	adrp	x9, l_.str.3@PAGE
Lloh11:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh12:
	adrp	x10, l_.str.2@PAGE
Lloh13:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, #1
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	b	LBB0_9
LBB0_7:
Lloh16:
	adrp	x8, _LOG_WARNING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LOG_WARNING@GOTPAGEOFF]
Lloh18:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_8:
	mov	x0, x20
	mov	x2, x21
LBB0_9:
	bl	_syslog
LBB0_10:
	mov	x0, #0
	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
	add	sp, sp, #64
	ret
LBB0_11:
Lloh21:
	adrp	x8, _LOG_WARNING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LOG_WARNING@GOTPAGEOFF]
Lloh23:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x2, x0
	ldr	w8, [x20]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.7@PAGE
Lloh25:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	b	LBB0_9
LBB0_12:
Lloh26:
	adrp	x8, _LOG_NOTICE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LOG_NOTICE@GOTPAGEOFF]
Lloh28:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x2, x0
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	b	LBB0_9
LBB0_13:
Lloh31:
	adrp	x8, _LOG_NOTICE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LOG_NOTICE@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x2, x0
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	b	LBB0_9
LBB0_14:
Lloh36:
	adrp	x8, _LOG_NOTICE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _LOG_NOTICE@GOTPAGEOFF]
Lloh38:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, #0
	bl	_bt_ntoa
	mov	x2, x0
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_syslog
	mov	x0, x19
	bl	_session_close
	b	LBB0_10
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
	.byte	(LBB0_14-LBB0_6)>>2
                                        ; -- End function
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got handshake message with error response 0x%x from %s"

	.comm	_LOG_WARNING,4,2                ; @LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Device %s requested %s reset"

l_.str.2:                               ; @.str.2
	.asciz	"hard"

l_.str.3:                               ; @.str.3
	.asciz	"soft"

	.comm	_LOG_NOTICE,4,2                 ; @LOG_NOTICE
l_.str.4:                               ; @.str.4
	.asciz	"Device %s requested Suspend"

l_.str.5:                               ; @.str.5
	.asciz	"Device %s requested Exit Suspend"

l_.str.6:                               ; @.str.6
	.asciz	"Device %s unplugged virtual cable"

l_.str.7:                               ; @.str.7
	.asciz	"Device %s sent unknown HID_Control message 0x%x"

l_.str.8:                               ; @.str.8
	.asciz	"Got unexpected message 0x%x on Control channel from %s"

.subsections_via_symbols
