	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_tun_generic
_open_tun_generic:                      ## @open_tun_generic
	.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	$520, %rsp                      ## imm = 0x208
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rdx, %rax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, -48(%rbp)
	movq	(%r8), %rdx
	movq	_DEV_TYPE_NULL@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_3
## %bb.1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.2:
	movq	%rbx, %rdi
	addq	$520, %rsp                      ## imm = 0x208
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_open_null                      ## TAILCALL
LBB0_3:
	movq	%rdi, %r14
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdx
	leaq	-304(%rbp), %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%rax, %rcx
	jmp	LBB0_13
LBB0_5:
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.6:
	movq	%r14, %rdi
	callq	_has_digit
	testl	%eax, %eax
	je	LBB0_7
LBB0_12:
	leaq	L_.str.5(%rip), %rdx
	leaq	-304(%rbp), %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%r14, %rcx
LBB0_13:
	xorl	%eax, %eax
	callq	_openvpn_snprintf
LBB0_14:
	movq	%r14, %rdi
	callq	_if_nametoindex
	testq	%rax, %rax
	jle	LBB0_16
## %bb.15:
	movq	_M_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_msg
	movl	$1, 8(%rbx)
LBB0_16:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-304(%rbp), %rdi
	callq	_open
	movq	%rax, 16(%rbx)
LBB0_17:
	movq	%rax, %rdi
	callq	_set_nonblock
	movq	16(%rbx), %rdi
	callq	_set_cloexec
	movq	_M_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	leaq	-304(%rbp), %rdx
	xorl	%eax, %eax
	callq	_msg
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_string_alloc
	movl	%eax, 12(%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	addq	$520, %rsp                      ## imm = 0x208
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	-304(%rbp), %r13
	leaq	L_.str.3(%rip), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$256, %esi                      ## imm = 0x100
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_openvpn_snprintf
	leaq	-560(%rbp), %rdi
	movl	$256, %esi                      ## imm = 0x100
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_openvpn_snprintf
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_open
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_M_ERRNO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_D_READ_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	%r12, %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_msg
	incl	%r15d
	cmpl	$256, %r15d                     ## imm = 0x100
	jne	LBB0_8
## %bb.11:
	movq	_M_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_msg
	jmp	LBB0_14
LBB0_9:
	leaq	-560(%rbp), %r14
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_TYPE_NULL,8,3              ## @DEV_TYPE_NULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

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

L_.str.2:                               ## @.str.2
	.asciz	"%s%d"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_D_READ_WRITE,4,2               ## @D_READ_WRITE
	.comm	_M_ERRNO,4,2                    ## @M_ERRNO
L_.str.3:                               ## @.str.3
	.asciz	"Tried opening %s (failed)"

	.comm	_M_FATAL,4,2                    ## @M_FATAL
L_.str.4:                               ## @.str.4
	.asciz	"Cannot allocate TUN/TAP dev dynamically"

L_.str.5:                               ## @.str.5
	.asciz	"/dev/%s"

	.comm	_M_INFO,4,2                     ## @M_INFO
L_.str.6:                               ## @.str.6
	.asciz	"TUN/TAP device %s exists previously, keep at program end"

	.comm	_M_ERR,4,2                      ## @M_ERR
L_.str.8:                               ## @.str.8
	.asciz	"TUN/TAP device %s opened"

	.comm	_TAPGIFNAME,4,2                 ## @TAPGIFNAME
	.no_dead_strip	_open_tun_generic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_tun_generic
_open_tun_generic:                      ; @open_tun_generic
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #544
	mov	x19, x4
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-96]
	ldr	x9, [x4]
Lloh3:
	adrp	x10, _DEV_TYPE_NULL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DEV_TYPE_NULL@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
	ldur	x8, [x29, #-96]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.2:
	mov	x0, x19
	add	sp, sp, #544
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_open_null
LBB0_3:
	mov	x8, x2
	mov	x20, x0
Lloh9:
	adrp	x21, _M_INFO@GOTPAGE
Lloh10:
	ldr	x21, [x21, _M_INFO@GOTPAGEOFF]
Lloh11:
	adrp	x25, _O_RDWR@GOTPAGE
Lloh12:
	ldr	x25, [x25, _O_RDWR@GOTPAGEOFF]
	cbz	x2, LBB0_5
; %bb.4:
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #272
	mov	w1, #256
	mov	x3, x8
	b	LBB0_8
LBB0_5:
	cbz	w3, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_has_digit
	cbz	w0, LBB0_14
LBB0_7:
Lloh15:
	adrp	x2, l_.str.5@PAGE
Lloh16:
	add	x2, x2, l_.str.5@PAGEOFF
	add	x0, sp, #272
	mov	w1, #256
	mov	x3, x20
LBB0_8:
	bl	_openvpn_snprintf
LBB0_9:
	mov	x0, x20
	bl	_if_nametoindex
	cmp	x0, #1
	b.lt	LBB0_11
; %bb.10:
	ldr	w0, [x21]
	str	x20, [sp]
Lloh17:
	adrp	x1, l_.str.6@PAGE
Lloh18:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_msg
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_11:
	ldr	w1, [x25]
	add	x0, sp, #272
	bl	_open
	str	x0, [x19, #16]
LBB0_12:
	bl	_set_nonblock
	ldr	x0, [x19, #16]
	bl	_set_cloexec
	ldr	w0, [x21]
	add	x8, sp, #272
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.8@PAGE
Lloh20:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_msg
	mov	x0, x20
	mov	x1, #0
	bl	_string_alloc
	str	w0, [x19, #12]
	ldur	x8, [x29, #-96]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.13:
	add	sp, sp, #544
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w26, #0
Lloh24:
	adrp	x21, l_.str.1@PAGE
Lloh25:
	add	x21, x21, l_.str.1@PAGEOFF
	add	x27, sp, #272
Lloh26:
	adrp	x22, l_.str.2@PAGE
Lloh27:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh28:
	adrp	x28, _D_READ_WRITE@GOTPAGE
Lloh29:
	ldr	x28, [x28, _D_READ_WRITE@GOTPAGEOFF]
Lloh30:
	adrp	x24, _M_ERRNO@GOTPAGE
Lloh31:
	ldr	x24, [x24, _M_ERRNO@GOTPAGEOFF]
Lloh32:
	adrp	x23, l_.str.3@PAGE
Lloh33:
	add	x23, x23, l_.str.3@PAGEOFF
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	str	x26, [sp]
	add	x0, sp, #272
	mov	w1, #256
	mov	x2, x21
	mov	x3, x20
	bl	_openvpn_snprintf
	str	x26, [sp]
	add	x0, sp, #16
	mov	w1, #256
	mov	x2, x22
	mov	x3, x20
	bl	_openvpn_snprintf
	ldr	w1, [x25]
	add	x0, sp, #272
	bl	_open
	str	x0, [x19, #16]
	cbnz	x0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w8, [x28]
	ldr	w9, [x24]
	orr	w0, w9, w8
	str	x27, [sp]
	mov	x1, x23
	bl	_msg
	add	w26, w26, #1
	cmp	w26, #256
	b.ne	LBB0_15
; %bb.17:
Lloh34:
	adrp	x8, _M_FATAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _M_FATAL@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_msg
Lloh39:
	adrp	x21, _M_INFO@GOTPAGE
Lloh40:
	ldr	x21, [x21, _M_INFO@GOTPAGEOFF]
	b	LBB0_9
LBB0_18:
	add	x20, sp, #16
Lloh41:
	adrp	x21, _M_INFO@GOTPAGE
Lloh42:
	ldr	x21, [x21, _M_INFO@GOTPAGEOFF]
	b	LBB0_12
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_TYPE_NULL,8,3              ; @DEV_TYPE_NULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

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

l_.str.2:                               ; @.str.2
	.asciz	"%s%d"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_D_READ_WRITE,4,2               ; @D_READ_WRITE
	.comm	_M_ERRNO,4,2                    ; @M_ERRNO
l_.str.3:                               ; @.str.3
	.asciz	"Tried opening %s (failed)"

	.comm	_M_FATAL,4,2                    ; @M_FATAL
l_.str.4:                               ; @.str.4
	.asciz	"Cannot allocate TUN/TAP dev dynamically"

l_.str.5:                               ; @.str.5
	.asciz	"/dev/%s"

	.comm	_M_INFO,4,2                     ; @M_INFO
l_.str.6:                               ; @.str.6
	.asciz	"TUN/TAP device %s exists previously, keep at program end"

	.comm	_M_ERR,4,2                      ; @M_ERR
l_.str.8:                               ; @.str.8
	.asciz	"TUN/TAP device %s opened"

	.comm	_TAPGIFNAME,4,2                 ; @TAPGIFNAME
	.no_dead_strip	_open_tun_generic
.subsections_via_symbols
