	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btmrvl_service_main_thread
_btmrvl_service_main_thread:            ## @btmrvl_service_main_thread
	.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, %r13
	movq	8(%rdi), %rbx
	movq	32(%rbx), %r15
	movq	_current@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	leaq	-52(%rbp), %rdi
	callq	_init_waitqueue_entry
	movq	_PF_NOFREEZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	orl	%eax, (%rcx)
	leaq	8(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %r14
	jmp	LBB0_1
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %eax
	movq	(%rbx), %rcx
	addl	%eax, (%rcx)
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_kfree_skb
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r12
	movq	%r13, %rdi
	leaq	-52(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_add_wait_queue
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	cmpq	$0, 16(%r15)
	je	LBB0_2
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_BT_DBG
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 24(%r15)
	je	LBB0_3
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_remove_wait_queue
	leaq	L_.str.1(%rip), %rdi
	callq	_BT_DBG
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 24(%r15)
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, 24(%r15)
	movq	%r12, %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_PS_SLEEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r12, %rbx
	jne	LBB0_9
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_queue_empty
	testq	%rax, %rax
	je	LBB0_16
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r15), %rax
	movq	_PS_SLEEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, 8(%rbx)
	je	LBB0_1
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_dequeue
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_btmrvl_tx_pkt
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rax
	incl	4(%rax)
	jmp	LBB0_18
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, 8(%r12)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_queue_empty
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_6
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	incq	16(%r15)
	movq	%rbx, %rdi
	callq	*24(%rbx)
	jmp	LBB0_1
LBB0_19:
	leaq	L_.str.2(%rip), %rdi
	callq	_BT_DBG
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_PF_NOFREEZE,4,2                ## @PF_NOFREEZE
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"main_thread is sleeping..."

	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
L_.str.1:                               ## @.str.1
	.asciz	"main_thread woke up"

L_.str.2:                               ## @.str.2
	.asciz	"main_thread: break from main thread"

	.comm	_PS_SLEEP,8,3                   ## @PS_SLEEP
	.no_dead_strip	_btmrvl_service_main_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btmrvl_service_main_thread
_btmrvl_service_main_thread:            ; @btmrvl_service_main_thread
	.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
	ldr	x20, [x0, #8]
	ldr	x26, [x20, #32]
Lloh0:
	adrp	x21, _current@GOTPAGE
Lloh1:
	ldr	x21, [x21, _current@GOTPAGEOFF]
	ldr	x1, [x21]
	add	x0, sp, #12
	bl	_init_waitqueue_entry
Lloh2:
	adrp	x8, _PF_NOFREEZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PF_NOFREEZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x21]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	add	x21, x26, #8
	add	x22, x20, #16
Lloh5:
	adrp	x27, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh6:
	ldr	x27, [x27, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh7:
	adrp	x28, _TASK_RUNNING@GOTPAGE
Lloh8:
	ldr	x28, [x28, _TASK_RUNNING@GOTPAGEOFF]
Lloh9:
	adrp	x24, l_.str.1@PAGE
Lloh10:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh11:
	adrp	x23, _PS_SLEEP@GOTPAGE
Lloh12:
	ldr	x23, [x23, _PS_SLEEP@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	ldr	x9, [x20]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	bl	_kfree_skb
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x19
	bl	_add_wait_queue
	ldr	w0, [x27]
	bl	_set_current_state
	ldr	x8, [x26, #16]
	cbz	x8, LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_DBG
	bl	_schedule
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26, #24]
	cbz	x8, LBB0_16
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x28]
	bl	_set_current_state
	add	x1, sp, #12
	mov	x0, x19
	bl	_remove_wait_queue
	mov	x0, x24
	bl	_BT_DBG
	bl	_kthread_should_stop
	cbnz	x0, LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x26, #24]
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x26, #24]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_skb_queue_empty
	cbz	x0, LBB0_18
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x26]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_skb_dequeue
	cbz	x0, LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
	mov	x0, x20
	mov	x1, x25
	bl	_btmrvl_tx_pkt
	cbz	x0, LBB0_1
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20]
	ldr	w9, [x8, #4]
	add	w9, w9, #1
	str	w9, [x8, #4]
	b	LBB0_2
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_4
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_skb_queue_empty
	cbnz	x0, LBB0_4
	b	LBB0_6
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x26, #16]
	add	x8, x8, #1
	str	x8, [x26, #16]
	ldr	x8, [x20, #24]
	mov	x0, x20
	blr	x8
	b	LBB0_3
LBB0_19:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BT_DBG
	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
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_PF_NOFREEZE,4,2                ; @PF_NOFREEZE
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"main_thread is sleeping..."

	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
l_.str.1:                               ; @.str.1
	.asciz	"main_thread woke up"

l_.str.2:                               ; @.str.2
	.asciz	"main_thread: break from main thread"

	.comm	_PS_SLEEP,8,3                   ; @PS_SLEEP
	.no_dead_strip	_btmrvl_service_main_thread
.subsections_via_symbols
