	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hrz_open_rx
_hrz_open_rx:                           ## @hrz_open_rx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_RX_CHANNEL_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_memmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	movq	_DBG_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_PRINTD
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r12,8), %r13
	addq	$4, %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_rd_mem
	movq	%rax, %r14
	movq	_BUFFER_PTR_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_RX_CHANNEL_DISABLED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_1
## %bb.2:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_DBG_FLOW@GOTPCREL(%rip), %r13
	movslq	(%r15), %rax
	testq	%rax, %rax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.3:
	movq	8(%r15), %rcx
	leaq	-1(%rax), %rdx
	movl	%edx, (%r15)
	movq	-8(%rcx,%rax,8), %r12
	movq	_DBG_VCC@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_PRINTD
	movq	_RX_CHANNEL_DISABLED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	movq	_RX_CHANNEL_IDLE@GOTPCREL(%rip), %r15
	je	LBB0_5
## %bb.4:
	cmpq	(%r15), %r12
	jne	LBB0_7
LBB0_5:
	movq	_DBG_ERR@GOTPCREL(%rip), %rax
	movl	(%r14), %edi
	orl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_PRINTD
	movq	(%r15), %r12
	jmp	LBB0_7
LBB0_1:
	movq	_DBG_ERR@GOTPCREL(%rip), %rax
	movq	_DBG_VCC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_PRINTD
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	movq	_DBG_VCC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_PRINTD
	movq	_RX_CHANNEL_IDLE@GOTPCREL(%rip), %r15
	movq	%r14, %r12
LBB0_7:
	movq	%rbx, %r14
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_CHANNEL_TYPE_AAL5@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	orq	%r12, %rdx
	movq	_FIRST_CELL_OF_AAL5_FRAME@GOTPCREL(%rip), %rax
	orq	(%rax), %rdx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_wr_mem
	cmpq	(%r15), %r12
	je	LBB0_9
## %bb.8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_wr_mem
LBB0_9:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PRINTD
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_CHANNEL_IDLE,8,3            ## @RX_CHANNEL_IDLE
	.comm	_memmap,8,3                     ## @memmap
	.comm	_DBG_FLOW,4,2                   ## @DBG_FLOW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hrz_open_rx %x"

	.comm	_BUFFER_PTR_MASK,8,3            ## @BUFFER_PTR_MASK
	.comm	_RX_CHANNEL_DISABLED,8,3        ## @RX_CHANNEL_DISABLED
	.comm	_DBG_ERR,4,2                    ## @DBG_ERR
	.comm	_DBG_VCC,4,2                    ## @DBG_VCC
L_.str.1:                               ## @.str.1
	.asciz	"RX channel for VC already open"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"using a spare buffer: %u"

L_.str.3:                               ## @.str.3
	.asciz	"bad spare buffer pointer, using IDLE"

L_.str.4:                               ## @.str.4
	.asciz	"using IDLE buffer pointer"

	.comm	_CHANNEL_TYPE_AAL5,8,3          ## @CHANNEL_TYPE_AAL5
	.comm	_FIRST_CELL_OF_AAL5_FRAME,8,3   ## @FIRST_CELL_OF_AAL5_FRAME
L_.str.5:                               ## @.str.5
	.asciz	"hrz_open_rx ok"

	.no_dead_strip	_hrz_open_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hrz_open_rx
_hrz_open_rx:                           ; @hrz_open_rx
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _RX_CHANNEL_IDLE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _RX_CHANNEL_IDLE@GOTPAGEOFF]
Lloh2:
	adrp	x8, _memmap@GOTPAGE
Lloh3:
	ldr	x8, [x8, _memmap@GOTPAGEOFF]
	ldr	x22, [x26]
Lloh4:
	ldr	x8, [x8]
	ldr	x25, [x8]
Lloh5:
	adrp	x24, _DBG_FLOW@GOTPAGE
Lloh6:
	ldr	x24, [x24, _DBG_FLOW@GOTPAGEOFF]
	ldr	w0, [x24]
	str	x1, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PRINTD
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	add	x8, x25, x20, lsl #3
	add	x23, x8, #4
	mov	x0, x19
	mov	x1, x23
	bl	_rd_mem
Lloh9:
	adrp	x8, _BUFFER_PTR_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BUFFER_PTR_MASK@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	and	x28, x8, x0
	mov	x0, x21
	bl	_spin_unlock_irqrestore
Lloh12:
	adrp	x27, _RX_CHANNEL_DISABLED@GOTPAGE
Lloh13:
	ldr	x27, [x27, _RX_CHANNEL_DISABLED@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x28, x8
	b.ne	LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x9, [x19, #8]
	sub	w8, w8, #1
	str	w8, [x19]
	ldr	x22, [x9, w8, sxtw #3]
Lloh14:
	adrp	x28, _DBG_VCC@GOTPAGE
Lloh15:
	ldr	x28, [x28, _DBG_VCC@GOTPAGEOFF]
	ldr	w0, [x28]
	str	x22, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_PRINTD
	ldr	x8, [x27]
	cmp	x22, x8
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x26]
	cmp	x22, x8
	b.ne	LBB0_7
LBB0_4:
Lloh18:
	adrp	x8, _DBG_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DBG_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w0, w9, w8
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_PRINTD
	ldr	x22, [x26]
	b	LBB0_7
LBB0_5:
Lloh23:
	adrp	x8, _DBG_ERR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DBG_ERR@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _DBG_VCC@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DBG_VCC@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PRINTD
Lloh31:
	adrp	x8, _EBUSY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
Lloh34:
	adrp	x8, _DBG_VCC@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DBG_VCC@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_PRINTD
LBB0_7:
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh39:
	adrp	x8, _CHANNEL_TYPE_AAL5@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CHANNEL_TYPE_AAL5@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	orr	x8, x8, x22
Lloh42:
	adrp	x9, _FIRST_CELL_OF_AAL5_FRAME@GOTPAGE
Lloh43:
	ldr	x9, [x9, _FIRST_CELL_OF_AAL5_FRAME@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	orr	x2, x8, x9
	mov	x0, x19
	mov	x1, x23
	bl	_wr_mem
	ldr	x8, [x26]
	cmp	x22, x8
	b.eq	LBB0_9
; %bb.8:
	add	x1, x25, x20, lsl #3
	mov	x0, x19
	mov	x2, x22
	bl	_wr_mem
LBB0_9:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x24]
Lloh45:
	adrp	x1, l_.str.5@PAGE
Lloh46:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_PRINTD
	mov	w0, #0
LBB0_10:
	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	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_CHANNEL_IDLE,8,3            ; @RX_CHANNEL_IDLE
	.comm	_memmap,8,3                     ; @memmap
	.comm	_DBG_FLOW,4,2                   ; @DBG_FLOW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hrz_open_rx %x"

	.comm	_BUFFER_PTR_MASK,8,3            ; @BUFFER_PTR_MASK
	.comm	_RX_CHANNEL_DISABLED,8,3        ; @RX_CHANNEL_DISABLED
	.comm	_DBG_ERR,4,2                    ; @DBG_ERR
	.comm	_DBG_VCC,4,2                    ; @DBG_VCC
l_.str.1:                               ; @.str.1
	.asciz	"RX channel for VC already open"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"using a spare buffer: %u"

l_.str.3:                               ; @.str.3
	.asciz	"bad spare buffer pointer, using IDLE"

l_.str.4:                               ; @.str.4
	.asciz	"using IDLE buffer pointer"

	.comm	_CHANNEL_TYPE_AAL5,8,3          ; @CHANNEL_TYPE_AAL5
	.comm	_FIRST_CELL_OF_AAL5_FRAME,8,3   ; @FIRST_CELL_OF_AAL5_FRAME
l_.str.5:                               ; @.str.5
	.asciz	"hrz_open_rx ok"

	.no_dead_strip	_hrz_open_rx
.subsections_via_symbols
