	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmtcp_attach
_atmtcp_attach:                         ## @atmtcp_attach
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	$0, -32(%rbp)
	cmpl	$-1, %esi
	je	LBB0_7
## %bb.1:
	movl	%ebx, %edi
	callq	_atm_dev_lookup
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r15
	movq	8(%rax), %rax
	cmpq	_atmtcp_v_dev_ops@GOTPCREL(%rip), %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_atm_dev_put
	movq	_EMEDIUMTYPE@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_7:
	leaq	-32(%rbp), %rdx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_atmtcp_create
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	-32(%rbp), %r15
	jmp	LBB0_9
LBB0_4:
	movq	%r15, %rdi
	callq	_PRIV
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_9:
	movq	%r15, %rdi
	callq	_PRIV
	movq	%r14, (%rax)
	movq	_atmtcp_control_dev@GOTPCREL(%rip), %r15
	movq	%r15, 24(%r14)
	movq	%r14, %rdi
	callq	_sk_atm
	movl	%eax, %edi
	callq	_vcc_insert_socket
	movq	_ATM_VF_META@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r14), %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_ATM_VF_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	-32(%rbp), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_atm_init_aal5
	movq	%r15, (%r14)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_atmtcp_v_dev_ops,4,2           ## @atmtcp_v_dev_ops
	.comm	_EMEDIUMTYPE,4,2                ## @EMEDIUMTYPE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_atmtcp_control_dev,4,2         ## @atmtcp_control_dev
	.comm	_ATM_VF_META,4,2                ## @ATM_VF_META
	.comm	_ATM_VF_READY,4,2               ## @ATM_VF_READY
	.no_dead_strip	_atmtcp_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmtcp_attach
_atmtcp_attach:                         ; @atmtcp_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	cmn	w1, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_atm_dev_lookup
	str	x0, [sp, #8]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _atmtcp_v_dev_ops@GOTPAGE
Lloh1:
	ldr	x9, [x9, _atmtcp_v_dev_ops@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_atm_dev_put
Lloh2:
	adrp	x8, _EMEDIUMTYPE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EMEDIUMTYPE@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #0
	bl	_atmtcp_create
	cbnz	w0, LBB0_10
; %bb.5:
	ldr	x20, [sp, #8]
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	_PRIV
	ldr	x8, [x0]
	cbz	x8, LBB0_9
; %bb.7:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_PRIV
	str	x19, [x0]
Lloh6:
	adrp	x21, _atmtcp_control_dev@GOTPAGE
Lloh7:
	ldr	x21, [x21, _atmtcp_control_dev@GOTPAGEOFF]
	str	x21, [x19, #24]
	mov	x0, x19
	bl	_sk_atm
	bl	_vcc_insert_socket
Lloh8:
	adrp	x8, _ATM_VF_META@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATM_VF_META@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x20, x19, #16
	mov	x1, x20
	bl	_set_bit
Lloh11:
	adrp	x8, _ATM_VF_READY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATM_VF_READY@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_atm_init_aal5
	str	x21, [x19]
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_atmtcp_v_dev_ops,4,2           ; @atmtcp_v_dev_ops
	.comm	_EMEDIUMTYPE,4,2                ; @EMEDIUMTYPE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_atmtcp_control_dev,4,2         ; @atmtcp_control_dev
	.comm	_ATM_VF_META,4,2                ; @ATM_VF_META
	.comm	_ATM_VF_READY,4,2               ; @ATM_VF_READY
	.no_dead_strip	_atmtcp_attach
.subsections_via_symbols
