	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_sock_wait_state             ## -- Begin function bt_sock_wait_state
	.p2align	4, 0x90
_bt_sock_wait_state:                    ## @bt_sock_wait_state
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_wait@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_BT_DBG
	movl	4(%r14), %edi
	movq	%rbx, %rsi
	callq	_add_wait_queue
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, (%r14)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %edi
	callq	_set_current_state
	testq	%r12, %r12
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_release_sock
	movq	%r12, %rdi
	callq	_schedule_timeout
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_lock_sock
	movq	%r14, %rdi
	callq	_sock_error
	testl	%eax, %eax
	je	LBB0_1
	jmp	LBB0_8
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
	movq	%r12, %rdi
	callq	_sock_intr_errno
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movl	4(%r14), %edi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_remove_wait_queue
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sk %p"

	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_sock_wait_state             ; -- Begin function bt_sock_wait_state
	.p2align	2
_bt_sock_wait_state:                    ; @bt_sock_wait_state
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _wait@GOTPAGE
Lloh1:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _current@GOTPAGE
Lloh3:
	ldr	x23, [x23, _current@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_DECLARE_WAITQUEUE
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_BT_DBG
	ldr	w0, [x19, #4]
	mov	x1, x22
	bl	_add_wait_queue
Lloh6:
	adrp	x24, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x24]
	bl	_set_current_state
	cbz	x20, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x23]
	bl	_signal_pending
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_release_sock
	mov	x0, x20
	bl	_schedule_timeout
	mov	x20, x0
	mov	x0, x19
	bl	_lock_sock
	mov	x0, x19
	bl	_sock_error
	cbz	w0, LBB0_1
	b	LBB0_8
LBB0_5:
	mov	w22, #0
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_sock_intr_errno
LBB0_8:
	mov	x22, x0
LBB0_9:
Lloh11:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_set_current_state
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x1, _wait@GOTPAGE
Lloh15:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_remove_wait_queue
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sk %p"

	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
.subsections_via_symbols
