	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ppe_open
_ppe_open:                              ## @ppe_open
	.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	%rdi, %r15
	movzwl	(%rdi), %r13d
	movl	4(%rdi), %r14d
	movq	_g_atm_priv_data@GOTPCREL(%rip), %rax
	movq	16(%rax), %rdi
	movq	56(%r15), %rax
	movslq	(%rax), %r12
	movq	16(%r15), %rax
	movq	_ATM_AAL5@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	movq	_ATM_AAL0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	shlq	$4, %r12
	leaq	(%rdi,%r12), %rax
	movl	24(%r15), %ecx
	cmpl	$128, %ecx
	je	LBB0_7
## %bb.5:
	cmpl	$130, %ecx
	je	LBB0_10
## %bb.6:
	cmpl	$131, %ecx
	jne	LBB0_8
LBB0_7:
	movq	(%rax), %rax
	subq	8(%rdi,%r12), %rax
	cmpq	%rax, 32(%r15)
	jle	LBB0_8
	jmp	LBB0_11
LBB0_10:
	movq	(%rax), %rax
	subq	8(%rdi,%r12), %rax
	cmpq	%rax, 48(%r15)
	jg	LBB0_11
LBB0_8:
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movswl	%r13w, %ebx
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_find_vpivci
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:
	movq	_EADDRINUSE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_12:
	movl	%r14d, %ecx
	movw	%r13w, -42(%rbp)                ## 2-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	_g_atm_priv_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_MAX_PVC_NUMBER@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_13
## %bb.14:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	_g_atm_priv_data@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r14), %eax
	incq	%rbx
	cmpl	%eax, %ebx
	jl	LBB0_15
	jmp	LBB0_18
LBB0_13:
	xorl	%ebx, %ebx
	movl	%ecx, %r13d
	cmpl	%eax, %ebx
	je	LBB0_11
LBB0_20:
	leaq	16(%r15), %rsi
	movl	24(%r15), %eax
	cmpl	$131, %eax
	je	LBB0_23
## %bb.21:
	cmpl	$130, %eax
	je	LBB0_24
## %bb.22:
	cmpl	$128, %eax
	jne	LBB0_26
LBB0_23:
	leaq	32(%r15), %rax
	jmp	LBB0_25
LBB0_16:
	movq	8(%r13), %rax
	movq	%r15, (%rax,%rbx,8)
	movl	(%r14), %eax
LBB0_18:
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	cmpl	%eax, %ebx
	jne	LBB0_20
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_29:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	leaq	48(%r15), %rax
LBB0_25:
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, 8(%rcx,%r12)
LBB0_26:
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_set_qsb
	movq	56(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movzwl	-42(%rbp), %eax                 ## 2-byte Folded Reload
	movw	%ax, (%r15)
	movl	%r13d, 4(%r15)
	movq	_ATM_VF_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	64(%r15), %rsi
	callq	_set_bit
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_28
## %bb.27:
	movq	_RX_DMA_CH_AAL@GOTPCREL(%rip), %r8
	movb	(%r8), %dl
	movq	_RX_DMA_CH_OAM@GOTPCREL(%rip), %rsi
	movb	(%rsi), %cl
	movl	$1, %edi
	movl	$1, %eax
	shll	%cl, %eax
	btsl	%edx, %eax
	movq	_MBOX_IGU1_ISRC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movb	(%rsi), %cl
	shll	%cl, %edi
	movb	(%r8), %al
	btsl	%eax, %edi
	movq	_MBOX_IGU1_IER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edi, (%rax)
	movq	_PPE_MAILBOX_IGU1_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_enable_irq
LBB0_28:
	movq	56(%r15), %rax
	movl	(%rax), %r12d
	movq	_FIRST_QSB_QID@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	addl	%ebx, %edi
	callq	_WTX_QUEUE_CONFIG
	movl	%r12d, (%rax)
	movq	16(%r15), %rax
	xorl	%ecx, %ecx
	movq	_ATM_AAL5@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	xorl	%r15d, %r15d
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	%ebx, %edx
	xorl	%r8d, %r8d
	callq	_set_htu_entry
	addl	$16, %ebx
	movl	(%r14), %ecx
	addl	%ebx, %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movq	_MBOX_IGU1_ISRC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%rcx)
	movl	$1, %eax
	addl	(%r14), %ebx
	movl	%ebx, %ecx
	shll	%cl, %eax
	movq	_MBOX_IGU1_IER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, (%rcx)
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_g_atm_priv_data,24,3           ## @g_atm_priv_data
	.comm	_ATM_AAL5,8,3                   ## @ATM_AAL5
	.comm	_ATM_AAL0,8,3                   ## @ATM_AAL0
	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
	.comm	_MAX_PVC_NUMBER,4,2             ## @MAX_PVC_NUMBER
	.comm	_ATM_VF_READY,4,2               ## @ATM_VF_READY
	.comm	_RX_DMA_CH_AAL,4,2              ## @RX_DMA_CH_AAL
	.comm	_RX_DMA_CH_OAM,4,2              ## @RX_DMA_CH_OAM
	.comm	_MBOX_IGU1_ISRC,8,3             ## @MBOX_IGU1_ISRC
	.comm	_MBOX_IGU1_IER,8,3              ## @MBOX_IGU1_IER
	.comm	_PPE_MAILBOX_IGU1_INT,4,2       ## @PPE_MAILBOX_IGU1_INT
	.comm	_FIRST_QSB_QID,4,2              ## @FIRST_QSB_QID
	.no_dead_strip	_ppe_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ppe_open
_ppe_open:                              ; @ppe_open
	.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	x22, x0
	ldr	x8, [x22, #16]!
Lloh0:
	adrp	x25, _ATM_AAL5@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ATM_AAL5@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh2:
	adrp	x10, _ATM_AAL0@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ATM_AAL0@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x0
	ldrh	w26, [x0]
	ldr	w20, [x0, #4]
Lloh5:
	adrp	x23, _g_atm_priv_data@GOTPAGE
Lloh6:
	ldr	x23, [x23, _g_atm_priv_data@GOTPAGEOFF]
	ldr	x27, [x23, #16]
	ldr	x8, [x0, #56]
	ldr	x8, [x8]
	lsl	x9, x8, #32
	sxtw	x28, w8
	add	x8, x27, x9, asr #28
	ldr	w9, [x0, #24]
	cmp	w9, #128
	b.eq	LBB0_4
; %bb.2:
	cmp	w9, #130
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, #131
	b.ne	LBB0_8
LBB0_4:
	ldr	x9, [x19, #32]
	b	LBB0_7
LBB0_5:
Lloh7:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
	ldr	x9, [x19, #48]
LBB0_7:
	ldr	x8, [x8]
	add	x10, x27, x28, lsl #4
	ldr	x10, [x10, #8]
	sub	x8, x8, x10
	cmp	x9, x8
	b.gt	LBB0_16
LBB0_8:
	sxth	w21, w26
	mov	x0, x21
	mov	x1, x20
	bl	_find_vpivci
	tbnz	w0, #31, LBB0_10
; %bb.9:
Lloh9:
	adrp	x8, _EADDRINUSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EADDRINUSE@GOTPAGEOFF]
	b	LBB0_17
LBB0_10:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	ldr	x9, [x23]
Lloh11:
	adrp	x21, _MAX_PVC_NUMBER@GOTPAGE
Lloh12:
	ldr	x21, [x21, _MAX_PVC_NUMBER@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	str	x9, [sp]                        ; 8-byte Folded Spill
	b.lt	LBB0_14
; %bb.11:
	mov	x23, #0
Lloh13:
	adrp	x24, _g_atm_priv_data@GOTPAGE
Lloh14:
	ldr	x24, [x24, _g_atm_priv_data@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x24
	bl	_test_and_set_bit
	cbz	x0, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x21]
	add	x23, x23, #1
	cmp	w23, w8
	b.lt	LBB0_12
	b	LBB0_15
LBB0_14:
	mov	w23, #0
LBB0_15:
	cmp	w23, w8
	b.ne	LBB0_20
LBB0_16:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	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
LBB0_19:
	ldr	x8, [x24, #8]
	str	x19, [x8, x23, lsl #3]
	ldr	w8, [x21]
	cmp	w23, w8
	b.eq	LBB0_16
LBB0_20:
	ldr	w8, [x19, #24]
	cmp	w8, #131
	b.eq	LBB0_23
; %bb.21:
	cmp	w8, #130
	b.eq	LBB0_24
; %bb.22:
	cmp	w8, #128
	b.ne	LBB0_26
LBB0_23:
	add	x8, x19, #32
	b	LBB0_25
LBB0_24:
	add	x8, x19, #48
LBB0_25:
	ldr	x8, [x8]
	add	x9, x27, x28, lsl #4
	ldr	x10, [x9, #8]
	add	x8, x10, x8
	str	x8, [x9, #8]
LBB0_26:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_set_qsb
	ldr	x8, [x19, #56]
	ldr	x8, [x8]
	strh	w26, [x19]
	stp	w20, w8, [x19, #4]
Lloh17:
	adrp	x8, _ATM_VF_READY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATM_VF_READY@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, x19, #64
	bl	_set_bit
Lloh20:
	adrp	x24, _MBOX_IGU1_ISRC@GOTPAGE
Lloh21:
	ldr	x24, [x24, _MBOX_IGU1_ISRC@GOTPAGEOFF]
Lloh22:
	adrp	x22, _MBOX_IGU1_IER@GOTPAGE
Lloh23:
	ldr	x22, [x22, _MBOX_IGU1_IER@GOTPAGEOFF]
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cbnz	x8, LBB0_28
; %bb.27:
Lloh24:
	adrp	x8, _RX_DMA_CH_AAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RX_DMA_CH_AAL@GOTPAGEOFF]
	ldr	w9, [x8]
	mov	w10, #1
	lsl	w9, w10, w9
Lloh26:
	adrp	x11, _RX_DMA_CH_OAM@GOTPAGE
Lloh27:
	ldr	x11, [x11, _RX_DMA_CH_OAM@GOTPAGEOFF]
	ldr	w12, [x11]
	lsl	w12, w10, w12
	orr	w9, w12, w9
	ldr	x12, [x24]
	str	w9, [x12]
	ldr	w8, [x8]
	lsl	w8, w10, w8
	ldr	w9, [x11]
	lsl	w9, w10, w9
	orr	w8, w9, w8
	ldr	x9, [x22]
	str	w8, [x9]
Lloh28:
	adrp	x8, _PPE_MAILBOX_IGU1_INT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PPE_MAILBOX_IGU1_INT@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	bl	_enable_irq
LBB0_28:
	ldr	x8, [x19, #56]
	ldr	x21, [x8]
Lloh31:
	adrp	x26, _FIRST_QSB_QID@GOTPAGE
Lloh32:
	ldr	x26, [x26, _FIRST_QSB_QID@GOTPAGEOFF]
	ldr	w8, [x26]
	add	w0, w8, w23
	bl	_WTX_QUEUE_CONFIG
	str	w21, [x0]
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w3, eq
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	mov	x1, x20
	mov	x2, x23
	mov	w4, #0
	bl	_set_htu_entry
	mov	w0, #0
	ldr	w8, [x26]
	add	w9, w23, #16
	add	w8, w9, w8
	mov	w10, #1
	lsl	w8, w10, w8
	ldr	x11, [x24]
	ldr	w12, [x11]
	orr	w8, w12, w8
	str	w8, [x11]
	ldr	w8, [x26]
	add	w8, w9, w8
	lsl	w8, w10, w8
	ldr	x9, [x22]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_g_atm_priv_data,24,3           ; @g_atm_priv_data
	.comm	_ATM_AAL5,8,3                   ; @ATM_AAL5
	.comm	_ATM_AAL0,8,3                   ; @ATM_AAL0
	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
	.comm	_MAX_PVC_NUMBER,4,2             ; @MAX_PVC_NUMBER
	.comm	_ATM_VF_READY,4,2               ; @ATM_VF_READY
	.comm	_RX_DMA_CH_AAL,4,2              ; @RX_DMA_CH_AAL
	.comm	_RX_DMA_CH_OAM,4,2              ; @RX_DMA_CH_OAM
	.comm	_MBOX_IGU1_ISRC,8,3             ; @MBOX_IGU1_ISRC
	.comm	_MBOX_IGU1_IER,8,3              ; @MBOX_IGU1_IER
	.comm	_PPE_MAILBOX_IGU1_INT,4,2       ; @PPE_MAILBOX_IGU1_INT
	.comm	_FIRST_QSB_QID,4,2              ; @FIRST_QSB_QID
	.no_dead_strip	_ppe_open
.subsections_via_symbols
