	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ldisc_open
_ldisc_open:                            ## @ldisc_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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	32(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_CAP_SYS_TTY_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_10
LBB0_3:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_ser_release
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rdx
	leaq	-112(%rbp), %rdi
	movl	$64, %esi
	callq	_snprintf
	movq	_IFNAMSIZ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_8
## %bb.4:
	movq	_NET_NAME_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_caifdev_setup@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-112(%rbp), %rsi
	movl	$24, %edi
	callq	_alloc_netdev
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_tty_kref_get
	movl	%eax, 16(%r12)
	movq	%r15, 8(%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_debugfs_init
	movq	_N_TTY_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r12, 16(%r14)
	movq	_TTY_DO_WRITE_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %r14
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	%r15, %rdi
	callq	_register_netdevice
	testl	%eax, %eax
	je	LBB0_15
## %bb.6:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	%r15, %rdi
	callq	_free_netdev
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.14:
	movl	%ebx, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_ser_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_ser_list@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_list_add
	movq	%r14, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	%r15, %rdi
	callq	_netif_stop_queue
	movq	%r12, %rdi
	callq	_update_tty_status
	jmp	LBB0_13
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_CAP_SYS_TTY_CONFIG,4,2         ## @CAP_SYS_TTY_CONFIG
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cf%s"

	.comm	_IFNAMSIZ,4,2                   ## @IFNAMSIZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NET_NAME_UNKNOWN,4,2           ## @NET_NAME_UNKNOWN
	.comm	_caifdev_setup,4,2              ## @caifdev_setup
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_N_TTY_BUF_SIZE,4,2             ## @N_TTY_BUF_SIZE
	.comm	_TTY_DO_WRITE_WAKEUP,4,2        ## @TTY_DO_WRITE_WAKEUP
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ser_lock,4,2                   ## @ser_lock
	.comm	_ser_list,4,2                   ## @ser_list
	.no_dead_strip	_ldisc_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ldisc_open
_ldisc_open:                            ; @ldisc_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x0, #32]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_capable
	cbnz	w0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _CAP_SYS_TTY_CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAP_SYS_TTY_CONFIG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_10
LBB0_3:
	mov	x0, #0
	bl	_ser_release
	ldr	x3, [x19]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #64
	bl	_snprintf
Lloh11:
	adrp	x8, _IFNAMSIZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IFNAMSIZ@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ge	LBB0_8
; %bb.4:
Lloh14:
	adrp	x8, _NET_NAME_UNKNOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NET_NAME_UNKNOWN@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _caifdev_setup@GOTPAGE
Lloh18:
	ldr	x8, [x8, _caifdev_setup@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	w0, #24
	bl	_alloc_netdev
	cbz	x0, LBB0_9
; %bb.5:
	mov	x20, x0
	bl	_netdev_priv
	mov	x21, x0
	mov	x0, x19
	bl	_tty_kref_get
	str	w0, [x21, #16]
	str	x20, [x21, #8]
	mov	x0, x21
	mov	x1, x19
	bl	_debugfs_init
Lloh20:
	adrp	x8, _N_TTY_BUF_SIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _N_TTY_BUF_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	x21, [x19, #16]
Lloh23:
	adrp	x8, _TTY_DO_WRITE_WAKEUP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TTY_DO_WRITE_WAKEUP@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	bl	_rtnl_lock
	mov	x0, x20
	bl	_register_netdevice
	cbz	w0, LBB0_14
; %bb.6:
	bl	_rtnl_unlock
	mov	x0, x20
	bl	_free_netdev
Lloh26:
	adrp	x8, _ENODEV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh28:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
Lloh30:
	adrp	x8, _EINVAL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh34:
	adrp	x8, _EPERM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldur	x8, [x29, #-40]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
Lloh39:
	adrp	x19, _ser_lock@GOTPAGE
Lloh40:
	ldr	x19, [x19, _ser_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_spin_lock
Lloh41:
	adrp	x1, _ser_list@GOTPAGE
Lloh42:
	ldr	x1, [x1, _ser_list@GOTPAGEOFF]
	mov	x0, x21
	bl	_list_add
	mov	x0, x19
	bl	_spin_unlock
	bl	_rtnl_unlock
	mov	x0, x20
	bl	_netif_stop_queue
	mov	x0, x21
	bl	_update_tty_status
	mov	w0, #0
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_CAP_SYS_TTY_CONFIG,4,2         ; @CAP_SYS_TTY_CONFIG
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cf%s"

	.comm	_IFNAMSIZ,4,2                   ; @IFNAMSIZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NET_NAME_UNKNOWN,4,2           ; @NET_NAME_UNKNOWN
	.comm	_caifdev_setup,4,2              ; @caifdev_setup
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_N_TTY_BUF_SIZE,4,2             ; @N_TTY_BUF_SIZE
	.comm	_TTY_DO_WRITE_WAKEUP,4,2        ; @TTY_DO_WRITE_WAKEUP
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ser_lock,4,2                   ; @ser_lock
	.comm	_ser_list,4,2                   ; @ser_list
	.no_dead_strip	_ldisc_open
.subsections_via_symbols
