	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_sock_poll                   ## -- Begin function bt_sock_poll
	.p2align	4, 0x90
_bt_sock_poll:                          ## @bt_sock_poll
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	callq	_BT_DBG
	movl	40(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_poll_wait
	movq	(%r15), %rax
	movq	_BT_LISTEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.20:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bt_accept_poll                 ## TAILCALL
LBB0_1:
	cmpq	$0, 32(%r15)
	je	LBB0_2
LBB0_3:
	movq	_POLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_4
LBB0_2:
	leaq	28(%r15), %rdi
	callq	_skb_queue_empty
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movl	8(%r15), %eax
	movq	_RCV_SHUTDOWN@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	andl	%eax, %ebx
	je	LBB0_6
## %bb.5:
	movq	_POLLRDHUP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
LBB0_6:
	movq	_SHUTDOWN_MASK@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	movq	_POLLHUP@GOTPCREL(%rip), %r12
	cmpl	(%rsi), %eax
	jne	LBB0_8
## %bb.7:
	movl	(%r12), %edx
LBB0_8:
	orl	%edx, %ecx
	orl	%ecx, %ebx
	leaq	24(%r15), %rdi
	callq	_skb_queue_empty
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	(%r14), %eax
	testl	%eax, 8(%r15)
	je	LBB0_11
LBB0_10:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
LBB0_11:
	movq	(%r15), %rax
	movq	_BT_CLOSED@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movl	(%r12), %r14d
LBB0_13:
	orl	%ebx, %r14d
	movq	_BT_CONNECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.14:
	movq	_BT_CONNECT2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.15:
	movq	_BT_CONFIG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.16:
	movq	%r15, %rdi
	callq	_sock_writeable
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	movq	_POLLWRNORM@GOTPCREL(%rip), %rcx
	movq	_POLLWRBAND@GOTPCREL(%rip), %rdx
	orl	(%rax), %r14d
	orl	(%rcx), %r14d
	orl	(%rdx), %r14d
	jmp	LBB0_19
LBB0_18:
	movq	_SOCK_ASYNC_NOSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rsi
	callq	_set_bit
LBB0_19:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sock %p, sk %p"

	.comm	_BT_LISTEN,8,3                  ## @BT_LISTEN
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_RCV_SHUTDOWN,4,2               ## @RCV_SHUTDOWN
	.comm	_POLLRDHUP,4,2                  ## @POLLRDHUP
	.comm	_SHUTDOWN_MASK,4,2              ## @SHUTDOWN_MASK
	.comm	_POLLHUP,4,2                    ## @POLLHUP
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.comm	_BT_CLOSED,8,3                  ## @BT_CLOSED
	.comm	_BT_CONNECT,8,3                 ## @BT_CONNECT
	.comm	_BT_CONNECT2,8,3                ## @BT_CONNECT2
	.comm	_BT_CONFIG,8,3                  ## @BT_CONFIG
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
	.comm	_POLLWRBAND,4,2                 ## @POLLWRBAND
	.comm	_SOCK_ASYNC_NOSPACE,4,2         ## @SOCK_ASYNC_NOSPACE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_sock_poll                   ; -- Begin function bt_sock_poll
	.p2align	2
_bt_sock_poll:                          ; @bt_sock_poll
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x0
	ldr	x19, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_BT_DBG
	ldr	w1, [x19, #40]
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _BT_LISTEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BT_LISTEN@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_bt_accept_poll
LBB0_2:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _POLLERR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POLLERR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	b	LBB0_6
LBB0_4:
	add	x0, x19, #28
	bl	_skb_queue_empty
	cbz	w0, LBB0_3
; %bb.5:
	mov	w8, #0
LBB0_6:
Lloh8:
	adrp	x22, _RCV_SHUTDOWN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _RCV_SHUTDOWN@GOTPAGEOFF]
	ldr	w9, [x19, #8]
	ldr	w10, [x22]
Lloh10:
	adrp	x11, _POLLRDHUP@GOTPAGE
Lloh11:
	ldr	x11, [x11, _POLLRDHUP@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w10, w8
Lloh13:
	adrp	x10, _SHUTDOWN_MASK@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SHUTDOWN_MASK@GOTPAGEOFF]
Lloh15:
	adrp	x20, _POLLHUP@GOTPAGE
Lloh16:
	ldr	x20, [x20, _POLLHUP@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	ldr	w11, [x20]
	cmp	w9, w10
	csel	w9, w11, wzr, eq
	orr	w21, w8, w9
	add	x0, x19, #24
	bl	_skb_queue_empty
	cbz	w0, LBB0_8
; %bb.7:
	ldr	w8, [x19, #8]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _POLLIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh22:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w21
	orr	w21, w8, w9
LBB0_9:
	ldr	x8, [x19]
Lloh24:
	adrp	x9, _BT_CLOSED@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BT_CLOSED@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	ldr	w10, [x20]
	cmp	x8, x9
	csel	w9, w10, wzr, eq
	orr	w20, w9, w21
Lloh27:
	adrp	x9, _BT_CONNECT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _BT_CONNECT@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.10:
Lloh30:
	adrp	x9, _BT_CONNECT2@GOTPAGE
Lloh31:
	ldr	x9, [x9, _BT_CONNECT2@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.11:
Lloh33:
	adrp	x9, _BT_CONFIG@GOTPAGE
Lloh34:
	ldr	x9, [x9, _BT_CONFIG@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.12:
	mov	x0, x19
	bl	_sock_writeable
	cbz	x0, LBB0_14
; %bb.13:
Lloh36:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _POLLWRNORM@GOTPAGE
Lloh40:
	ldr	x9, [x9, _POLLWRNORM@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
Lloh42:
	adrp	x10, _POLLWRBAND@GOTPAGE
Lloh43:
	ldr	x10, [x10, _POLLWRBAND@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
	orr	w8, w8, w20
	orr	w8, w8, w9
	orr	w20, w8, w10
	b	LBB0_15
LBB0_14:
Lloh45:
	adrp	x8, _SOCK_ASYNC_NOSPACE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SOCK_ASYNC_NOSPACE@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_set_bit
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sock %p, sk %p"

	.comm	_BT_LISTEN,8,3                  ; @BT_LISTEN
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_RCV_SHUTDOWN,4,2               ; @RCV_SHUTDOWN
	.comm	_POLLRDHUP,4,2                  ; @POLLRDHUP
	.comm	_SHUTDOWN_MASK,4,2              ; @SHUTDOWN_MASK
	.comm	_POLLHUP,4,2                    ; @POLLHUP
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_BT_CLOSED,8,3                  ; @BT_CLOSED
	.comm	_BT_CONNECT,8,3                 ; @BT_CONNECT
	.comm	_BT_CONNECT2,8,3                ; @BT_CONNECT2
	.comm	_BT_CONFIG,8,3                  ; @BT_CONFIG
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
	.comm	_POLLWRBAND,4,2                 ; @POLLWRBAND
	.comm	_SOCK_ASYNC_NOSPACE,4,2         ; @SOCK_ASYNC_NOSPACE
.subsections_via_symbols
