	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_chan_ctl
_open_chan_ctl:                         ## @open_chan_ctl
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_adapter_type@GOTPCREL(%rip), %r15
	movslq	(%r15), %rax
	cmpq	$3, %rax
	ja	LBB0_2
## %bb.1:
	leaq	l_reltable.open_chan_ctl(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	leaq	-112(%rbp), %rdi
	movl	%r14d, %edx
	callq	_sprintf
LBB0_2:
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:
	movl	%eax, %ebx
	movslq	(%r15), %rax
	cmpq	$3, %rax
	ja	LBB0_9
## %bb.8:
	leaq	l_reltable.open_chan_ctl.10(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	movq	_chan_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%r14d, %edx
	callq	_sprintf
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.5:
	leaq	-112(%rbp), %rdi
	callq	_perror
	movl	$-1, %edi
	callq	_exit
LBB0_11:
	callq	___stack_chk_fail
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	callq	_fprintf
	movl	$-1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_adapter_type,4,2               ## @adapter_type
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/cx%d"

L_.str.1:                               ## @.str.1
	.asciz	"/dev/ct%d"

L_.str.2:                               ## @.str.2
	.asciz	"/dev/cp%d"

L_.str.3:                               ## @.str.3
	.asciz	"/dev/ce%d"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENODEV,8,3                     ## @ENODEV
	.comm	_stderr,4,2                     ## @stderr
L_.str.4:                               ## @.str.4
	.asciz	"chan%d: not configured\n"

	.comm	_chan_name,8,3                  ## @chan_name
L_.str.5:                               ## @.str.5
	.asciz	"cx%d"

L_.str.6:                               ## @.str.6
	.asciz	"ct%d"

L_.str.7:                               ## @.str.7
	.asciz	"cp%d"

L_.str.8:                               ## @.str.8
	.asciz	"ce%d"

	.comm	_SERIAL_GETNAME,4,2             ## @SERIAL_GETNAME
	.no_dead_strip	_open_chan_ctl
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.open_chan_ctl
l_reltable.open_chan_ctl:
	.long	L_.str-l_reltable.open_chan_ctl
	.long	L_.str.1-l_reltable.open_chan_ctl
	.long	L_.str.2-l_reltable.open_chan_ctl
	.long	L_.str.3-l_reltable.open_chan_ctl

	.p2align	2                               ## @reltable.open_chan_ctl.10
l_reltable.open_chan_ctl.10:
	.long	L_.str.5-l_reltable.open_chan_ctl.10
	.long	L_.str.6-l_reltable.open_chan_ctl.10
	.long	L_.str.7-l_reltable.open_chan_ctl.10
	.long	L_.str.8-l_reltable.open_chan_ctl.10

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_chan_ctl
_open_chan_ctl:                         ; @open_chan_ctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _adapter_type@GOTPAGE
Lloh4:
	ldr	x21, [x21, _adapter_type@GOTPAGEOFF]
	ldrsw	x8, [x21]
	cmp	w8, #3
	b.hi	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, l_switch.table.open_chan_ctl@PAGE
Lloh6:
	add	x9, x9, l_switch.table.open_chan_ctl@PAGEOFF
	ldr	x1, [x9, x8, lsl #3]
	add	x0, sp, #8
	mov	x2, x19
	bl	_sprintf
LBB0_2:
	add	x0, sp, #8
	mov	w1, #0
	bl	_open
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x20, x0
	ldrsw	x8, [x21]
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.4:
Lloh7:
	adrp	x9, l_switch.table.open_chan_ctl.9@PAGE
Lloh8:
	add	x9, x9, l_switch.table.open_chan_ctl.9@PAGEOFF
	ldr	x1, [x9, x8, lsl #3]
Lloh9:
	adrp	x8, _chan_name@GOTPAGE
Lloh10:
	ldr	x8, [x8, _chan_name@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	mov	x2, x19
	bl	_sprintf
LBB0_5:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_7:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _ENODEV@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.8:
	add	x0, sp, #8
	bl	_perror
	mov	w0, #-1
	bl	_exit
LBB0_9:
	bl	___stack_chk_fail
LBB0_10:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x19
	bl	_fprintf
	mov	w0, #-1
	bl	_exit
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_adapter_type,4,2               ; @adapter_type
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/cx%d"

l_.str.1:                               ; @.str.1
	.asciz	"/dev/ct%d"

l_.str.2:                               ; @.str.2
	.asciz	"/dev/cp%d"

l_.str.3:                               ; @.str.3
	.asciz	"/dev/ce%d"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENODEV,8,3                     ; @ENODEV
	.comm	_stderr,4,2                     ; @stderr
l_.str.4:                               ; @.str.4
	.asciz	"chan%d: not configured\n"

	.comm	_chan_name,8,3                  ; @chan_name
l_.str.5:                               ; @.str.5
	.asciz	"cx%d"

l_.str.6:                               ; @.str.6
	.asciz	"ct%d"

l_.str.7:                               ; @.str.7
	.asciz	"cp%d"

l_.str.8:                               ; @.str.8
	.asciz	"ce%d"

	.comm	_SERIAL_GETNAME,4,2             ; @SERIAL_GETNAME
	.no_dead_strip	_open_chan_ctl
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.open_chan_ctl
l_switch.table.open_chan_ctl:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3

	.p2align	3                               ; @switch.table.open_chan_ctl.9
l_switch.table.open_chan_ctl.9:
	.quad	l_.str.5
	.quad	l_.str.6
	.quad	l_.str.7
	.quad	l_.str.8

.subsections_via_symbols
