	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btstack_set_poweron
_btstack_set_poweron:                   ## @btstack_set_poweron
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_btstack_try_load
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	_btstack_thread@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.2:
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_btstack_thread_func@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_sthread_create
	jmp	LBB0_8
LBB0_4:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.5:
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	_btstack_quit_source@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.7:
	callq	_CFRunLoopSourceSignal
	movq	(%r14), %rdi
	callq	_sthread_join
	xorl	%eax, %eax
LBB0_8:
	movq	%rax, (%r14)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_btstack_thread,8,3             ## @btstack_thread
	.comm	_btstack_thread_func,4,2        ## @btstack_thread_func
	.comm	_btstack_quit_source,8,3        ## @btstack_quit_source
	.no_dead_strip	_btstack_set_poweron
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btstack_set_poweron
_btstack_set_poweron:                   ; @btstack_set_poweron
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_btstack_try_load
	cbz	w0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x20, _btstack_thread@GOTPAGE
Lloh1:
	ldr	x20, [x20, _btstack_thread@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	w19, LBB0_4
; %bb.2:
	cbnz	x8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _btstack_thread_func@GOTPAGE
Lloh3:
	ldr	x8, [x8, _btstack_thread_func@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_sthread_create
	b	LBB0_7
LBB0_4:
	cbnz	w19, LBB0_8
; %bb.5:
Lloh5:
	adrp	x9, _btstack_quit_source@GOTPAGE
Lloh6:
	ldr	x9, [x9, _btstack_quit_source@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x9]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_8
; %bb.6:
	bl	_CFRunLoopSourceSignal
	ldr	x0, [x20]
	bl	_sthread_join
	mov	x0, #0
LBB0_7:
	str	x0, [x20]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_btstack_thread,8,3             ; @btstack_thread
	.comm	_btstack_thread_func,4,2        ; @btstack_thread_func
	.comm	_btstack_quit_source,8,3        ; @btstack_quit_source
	.no_dead_strip	_btstack_set_poweron
.subsections_via_symbols
