	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidp_session
_hidp_session:                          ## @hidp_session
	.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, %r15
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_BT_DBG
	movq	24(%r15), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rax), %esi
	movl	4(%rax), %edx
	jmp	LBB0_3
LBB0_1:
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_3:
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%rax), %esi
	movl	4(%rax), %edx
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_daemonize
	movq	_current@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	$-15, %esi
	callq	_set_user_nice
	movl	(%rbx), %esi
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	callq	_init_waitqueue_entry
	movl	(%rbx), %esi
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_waitqueue_entry
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	%r14, %rsi
	callq	_add_wait_queue
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	%rbx, %rsi
	callq	_add_wait_queue
	leaq	32(%r15), %r14
	movq	%r14, %rdi
	callq	_atomic_read
	testl	%eax, %eax
	je	LBB0_6
LBB0_14:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	leaq	-60(%rbp), %rsi
	callq	_remove_wait_queue
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	leaq	-64(%rbp), %rsi
	callq	_remove_wait_queue
	movq	_hidp_session_sem@GOTPCREL(%rip), %rdi
	callq	_down_write
	movq	%r15, %rdi
	callq	_hidp_del_timer
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_input_unregister_device
	movq	$0, 24(%r15)
LBB0_16:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_hid_destroy_device
	movq	$0, 16(%r15)
LBB0_18:
	movq	_EUNATCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 16(%rcx)
	movq	(%r15), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 16(%rcx)
	movq	%r15, %rdi
	callq	_hidp_schedule
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_fput
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	(%rcx), %r14d
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	sete	%bl
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wait_event_timeout
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_fput
	movq	%r15, %rdi
	callq	___hidp_unlink_session
	movq	_hidp_session_sem@GOTPCREL(%rip), %rdi
	callq	_up_write
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	24(%rax), %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	24(%rax), %r13
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_BT_CONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, (%rcx)
	jne	LBB0_14
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_skb_dequeue
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_skb_orphan
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_hidp_recv_ctrl_frame
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	%rbx, %rdi
	callq	_skb_orphan
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_hidp_recv_intr_frame
LBB0_12:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	callq	_skb_dequeue
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	callq	_hidp_process_transmit
	xorl	%eax, %eax
	callq	_schedule
	movq	%r14, %rdi
	callq	_atomic_read
	testl	%eax, %eax
	je	LBB0_7
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"session %p"

L_.str.1:                               ## @.str.1
	.asciz	"khidpd_%04x%04x"

	.comm	_current,4,2                    ## @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_BT_CONNECTED,8,3               ## @BT_CONNECTED
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_hidp_session_sem,4,2           ## @hidp_session_sem
	.comm	_EUNATCH,8,3                    ## @EUNATCH
	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.no_dead_strip	_hidp_session
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidp_session
_hidp_session:                          ; @hidp_session
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	x8, x9, [x0]
	ldr	x24, [x8, #8]
	ldr	x25, [x9, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_BT_DBG
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_9
; %bb.1:
	ldp	w1, w2, [x8]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
LBB0_2:
	ldp	w1, w2, [x8]
LBB0_3:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_daemonize
Lloh4:
	adrp	x20, _current@GOTPAGE
Lloh5:
	ldr	x20, [x20, _current@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #-15
	bl	_set_user_nice
	ldr	w1, [x20]
	add	x0, sp, #12
	bl	_init_waitqueue_entry
	ldr	w1, [x20]
	add	x0, sp, #8
	bl	_init_waitqueue_entry
	ldr	x0, [x24, #8]
	add	x1, sp, #12
	bl	_add_wait_queue
	ldr	x0, [x25, #8]
	add	x1, sp, #8
	bl	_add_wait_queue
	add	x20, x19, #32
	mov	x0, x20
	bl	_atomic_read
	cbz	w0, LBB0_10
LBB0_4:
Lloh6:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_set_current_state
	ldr	x0, [x25, #8]
	add	x1, sp, #8
	bl	_remove_wait_queue
	ldr	x0, [x24, #8]
	add	x1, sp, #12
	bl	_remove_wait_queue
Lloh9:
	adrp	x0, _hidp_session_sem@GOTPAGE
Lloh10:
	ldr	x0, [x0, _hidp_session_sem@GOTPAGEOFF]
	bl	_down_write
	mov	x0, x19
	bl	_hidp_del_timer
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_input_unregister_device
	str	xzr, [x19, #24]
LBB0_6:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_hid_destroy_device
	str	xzr, [x19, #16]
LBB0_8:
Lloh11:
	adrp	x8, _EUNATCH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EUNATCH@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldp	x10, x9, [x19]
	ldr	x9, [x9, #8]
	str	x8, [x9, #16]
	ldr	x9, [x10, #8]
	str	x8, [x9, #16]
	mov	x0, x19
	bl	_hidp_schedule
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_fput
	ldp	x9, x8, [x24]
	ldr	w20, [x8]
Lloh14:
	adrp	x8, _BT_CLOSED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BT_CLOSED@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x9, x8
	cset	w21, eq
	mov	w0, #500
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_wait_event_timeout
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_fput
	mov	x0, x19
	bl	___hidp_unlink_session
Lloh17:
	adrp	x0, _hidp_session_sem@GOTPAGE
Lloh18:
	ldr	x0, [x0, _hidp_session_sem@GOTPAGEOFF]
	bl	_up_write
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	mov	w1, #0
	mov	w2, #0
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_2
	b	LBB0_3
LBB0_10:
	add	x21, x24, #24
	add	x22, x25, #24
Lloh19:
	adrp	x26, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh20:
	ldr	x26, [x26, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh21:
	adrp	x27, _BT_CONNECTED@GOTPAGE
Lloh22:
	ldr	x27, [x27, _BT_CONNECTED@GOTPAGEOFF]
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w0, [x26]
	bl	_set_current_state
	ldr	x8, [x24]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x25]
	cmp	x9, x8
	b.ne	LBB0_4
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_skb_dequeue
	mov	x23, x0
	cbz	x0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	x0, x23
	bl	_skb_orphan
	mov	x0, x19
	mov	x1, x23
	bl	_hidp_recv_ctrl_frame
	b	LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	mov	x0, x23
	bl	_skb_orphan
	mov	x0, x19
	mov	x1, x23
	bl	_hidp_recv_intr_frame
LBB0_16:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_skb_dequeue
	mov	x23, x0
	cbnz	x0, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	bl	_hidp_process_transmit
	bl	_schedule
	mov	x0, x20
	bl	_atomic_read
	cbz	w0, LBB0_11
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"session %p"

l_.str.1:                               ; @.str.1
	.asciz	"khidpd_%04x%04x"

	.comm	_current,4,2                    ; @current
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_BT_CONNECTED,8,3               ; @BT_CONNECTED
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_hidp_session_sem,4,2           ; @hidp_session_sem
	.comm	_EUNATCH,8,3                    ; @EUNATCH
	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.no_dead_strip	_hidp_session
.subsections_via_symbols
