	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_devrecv                     ## -- Begin function bt_devrecv
	.p2align	4, 0x90
_bt_devrecv:                            ## @bt_devrecv
	.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
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	%rcx, %rbx
	movq	%rsi, %r12
	movl	%edi, %r15d
	testq	%rcx, %rcx
	js	LBB0_11
## %bb.4:
	leaq	-44(%rbp), %r13
	movq	%r13, %rdi
	callq	_FD_ZERO
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_FD_SET
	movq	%rbx, -56(%rbp)
	movq	$0, -64(%rbp)
	leal	1(%r15), %ebx
	movq	_EAGAIN@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	leaq	-44(%rbp), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	-64(%rbp), %r8
	callq	_select
	testl	%eax, %eax
	jns	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r13), %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
	jmp	LBB0_23
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_22:
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_23:
	movl	$-1, %eax
LBB0_24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	je	LBB0_9
## %bb.10:
	leaq	-44(%rbp), %rsi
	movl	%r15d, %edi
	callq	_FD_ISSET
	movl	%eax, %edi
	callq	_assert
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_read
	testl	%eax, %eax
	jns	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
	jmp	LBB0_23
LBB0_14:
	movl	%eax, %ebx
	movl	(%r12), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_21
## %bb.15:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_19:
	movl	$132, %eax
	cmpl	$132, %ebx
	je	LBB0_24
	jmp	LBB0_21
LBB0_9:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_16:
	movl	$134, %eax
	cmpl	$134, %ebx
	je	LBB0_24
	jmp	LBB0_21
LBB0_20:
	movl	$133, %eax
	cmpl	$133, %ebx
	je	LBB0_24
	jmp	LBB0_21
LBB0_17:
	cmpl	$4, %ebx
	jb	LBB0_21
## %bb.18:
	movl	%ebx, %r14d
	movl	$131, %edi
	callq	_le16toh
	movslq	%eax, %rcx
	addq	$4, %rcx
	movl	%ebx, %eax
	cmpq	%r14, %rcx
	je	LBB0_24
LBB0_21:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_16
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_ETIMEDOUT,8,3                  ## @ETIMEDOUT
	.comm	_EIO,8,3                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bt_devrecv                     ; -- Begin function bt_devrecv
	.p2align	2
_bt_devrecv:                            ; @bt_devrecv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	cbz	x1, LBB0_6
; %bb.1:
	mov	x20, x2
	cbz	x2, LBB0_6
; %bb.2:
	mov	x22, x3
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EAGAIN@GOTPAGEOFF]
Lloh2:
	adrp	x24, _EINTR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EINTR@GOTPAGEOFF]
	tbnz	x3, #63, LBB0_12
; %bb.3:
	add	x0, sp, #28
	bl	_FD_ZERO
	add	x1, sp, #28
	mov	x0, x21
	bl	_FD_SET
	stp	xzr, x22, [sp, #8]
	add	w22, w21, #1
Lloh4:
	adrp	x25, _errno@GOTPAGE
Lloh5:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #28
	add	x4, sp, #8
	mov	x0, x22
	mov	x2, #0
	mov	x3, #0
	bl	_select
	tbz	w0, #31, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x23]
	ldr	x10, [x24]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_4
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _errno@GOTPAGE
Lloh9:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh10:
	str	x8, [x9]
LBB0_8:
	mov	w22, #-1
LBB0_9:
	mov	x0, x22
	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
	add	sp, sp, #112
	ret
LBB0_10:
	cbz	w0, LBB0_17
; %bb.11:
	add	x1, sp, #28
	mov	x0, x21
	bl	_FD_ISSET
	bl	_assert
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_read
	tbz	w0, #31, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x23]
	ldr	x10, [x24]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_12
	b	LBB0_8
LBB0_14:
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_22
; %bb.15:
	mov	x22, x0
Lloh14:
	adrp	x9, lJTI0_0@PAGE
Lloh15:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_16
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_16:
	cmp	w22, #132
	b.eq	LBB0_9
	b	LBB0_22
LBB0_17:
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x25]
	b	LBB0_8
LBB0_18:
	cmp	w22, #134
	b.eq	LBB0_9
	b	LBB0_22
LBB0_19:
	cmp	w22, #133
	b.eq	LBB0_9
	b	LBB0_22
LBB0_20:
	cmp	w22, #4
	b.lo	LBB0_22
; %bb.21:
	mov	w0, #131
	bl	_le16toh
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x8, x8, #4
	cmp	x8, w22, uxtw
	b.eq	LBB0_9
LBB0_22:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_16-LBB0_16)>>2
	.byte	(LBB0_19-LBB0_16)>>2
	.byte	(LBB0_18-LBB0_16)>>2
	.byte	(LBB0_20-LBB0_16)>>2
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_ETIMEDOUT,8,3                  ; @ETIMEDOUT
	.comm	_EIO,8,3                        ; @EIO
.subsections_via_symbols
