	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_tap                       ## -- Begin function open_tap
	.p2align	4, 0x90
_open_tap:                              ## @open_tap
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_TAP_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	movq	_tapfd@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.1:
	leaq	-56(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.4:
	movq	_tapdev@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movl	-56(%rbp), %edi
	movq	_S_IFCHR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_devname
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_strcpy
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r12d
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	-36(%rbp), %edi
	movl	(%r15), %esi
	callq	_strcpy
	movl	$1500, -48(%rbp)                ## imm = 0x5DC
	movq	_SIOCSIFMTU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	movq	%r14, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	-36(%rbp), %edi
	movl	(%r15), %esi
	callq	_strcpy
	movq	_SIOCGIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	movq	%r14, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.10:
	movzwl	-44(%rbp), %eax
	movl	-40(%rbp), %ebx
	shll	$16, %ebx
	orl	%eax, %ebx
	movq	_IFF_UP@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	-36(%rbp), %edi
	movl	(%r15), %esi
	callq	_strcpy
	movzwl	%bx, %eax
	movl	%eax, -44(%rbp)
	shrl	$16, %ebx
	movl	%ebx, -40(%rbp)
	movq	_SIOCSIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	movq	%r14, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.12:
	movl	%r12d, %edi
	callq	_close
	movl	(%r15), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_time_print
LBB0_3:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	_open_tap.cold.1
	jmp	LBB0_3
LBB0_5:
	callq	_open_tap.cold.2
	jmp	LBB0_3
LBB0_7:
	callq	_open_tap.cold.3
	jmp	LBB0_3
LBB0_9:
	callq	_open_tap.cold.4
	jmp	LBB0_3
LBB0_11:
	callq	_open_tap.cold.5
	jmp	LBB0_3
LBB0_13:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function open_tap.cold.1
_open_tap.cold.1:                       ## @open_tap.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function open_tap.cold.2
_open_tap.cold.2:                       ## @open_tap.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function open_tap.cold.3
_open_tap.cold.3:                       ## @open_tap.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function open_tap.cold.4
_open_tap.cold.4:                       ## @open_tap.cold.4
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function open_tap.cold.5
_open_tap.cold.5:                       ## @open_tap.cold.5
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_TAP_DEV,4,2                    ## @TAP_DEV
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_tapfd,4,2                      ## @tapfd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't open tap: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"fstat()"

	.comm	_tapdev,4,2                     ## @tapdev
	.comm	_S_IFCHR,4,2                    ## @S_IFCHR
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
L_.str.2:                               ## @.str.2
	.asciz	"socket()"

	.comm	_SIOCSIFMTU,4,2                 ## @SIOCSIFMTU
L_.str.3:                               ## @.str.3
	.asciz	"ioctl(SIOCSIFMTU)"

	.comm	_SIOCGIFFLAGS,4,2               ## @SIOCGIFFLAGS
L_.str.4:                               ## @.str.4
	.asciz	"ioctl(SIOCGIFFLAGS)"

	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.comm	_SIOCSIFFLAGS,4,2               ## @SIOCSIFFLAGS
L_.str.5:                               ## @.str.5
	.asciz	"ioctl(SIOCSIFFLAGS)"

L_.str.6:                               ## @.str.6
	.asciz	"Opened tap device: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_tap                       ; -- Begin function open_tap
	.p2align	2
_open_tap:                              ; @open_tap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, _TAP_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TAP_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_open
Lloh6:
	adrp	x8, _tapfd@GOTPAGE
Lloh7:
	ldr	x8, [x8, _tapfd@GOTPAGEOFF]
Lloh8:
	str	w0, [x8]
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.1:
	add	x1, sp, #24
	bl	_fstat
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
Lloh9:
	adrp	x20, _tapdev@GOTPAGE
Lloh10:
	ldr	x20, [x20, _tapdev@GOTPAGEOFF]
	ldr	w19, [x20]
	ldr	w0, [sp, #24]
Lloh11:
	adrp	x8, _S_IFCHR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _S_IFCHR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_devname
	mov	x1, x0
	mov	x0, x19
	bl	_strcpy
Lloh14:
	adrp	x8, _PF_INET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.3:
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [sp, #20]
	ldr	w1, [x20]
	bl	_strcpy
	mov	w8, #1500
	str	w8, [sp, #8]
Lloh20:
	adrp	x8, _SIOCSIFMTU@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SIOCSIFMTU@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [sp, #20]
	ldr	w1, [x20]
	bl	_strcpy
Lloh23:
	adrp	x8, _SIOCGIFFLAGS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SIOCGIFFLAGS@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.5:
	ldrh	w8, [sp, #12]
	ldr	w9, [sp, #16]
	bfi	w8, w9, #16, #16
Lloh26:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w21, w8, w9
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [sp, #20]
	ldr	w1, [x20]
	bl	_strcpy
	and	w8, w21, #0xffff
	lsr	w9, w21, #16
	stp	w8, w9, [sp, #12]
Lloh29:
	adrp	x8, _SIOCSIFFLAGS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SIOCSIFFLAGS@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.6:
	mov	x0, x19
	bl	_close
	ldr	w1, [x20]
Lloh32:
	adrp	x0, l_.str.6@PAGE
Lloh33:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_time_print
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
Lloh34:
	adrp	x8, _errno@GOTPAGE
Lloh35:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
Lloh37:
	adrp	x0, l_.str@PAGE
Lloh38:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	w0, #1
	bl	_exit
LBB0_8:
	bl	_open_tap.cold.1
LBB0_9:
	bl	_open_tap.cold.2
LBB0_10:
	bl	_open_tap.cold.3
LBB0_11:
	bl	_open_tap.cold.4
LBB0_12:
	bl	_open_tap.cold.5
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function open_tap.cold.1
_open_tap.cold.1:                       ; @open_tap.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh39:
	adrp	x0, l_.str.1@PAGE
Lloh40:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function open_tap.cold.2
_open_tap.cold.2:                       ; @open_tap.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh41:
	adrp	x0, l_.str.2@PAGE
Lloh42:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function open_tap.cold.3
_open_tap.cold.3:                       ; @open_tap.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh43:
	adrp	x0, l_.str.3@PAGE
Lloh44:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function open_tap.cold.4
_open_tap.cold.4:                       ; @open_tap.cold.4
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh45:
	adrp	x0, l_.str.4@PAGE
Lloh46:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function open_tap.cold.5
_open_tap.cold.5:                       ; @open_tap.cold.5
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh47:
	adrp	x0, l_.str.5@PAGE
Lloh48:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function OUTLINED_FUNCTION_0
_OUTLINED_FUNCTION_0:                   ; @OUTLINED_FUNCTION_0 Thunk
	.cfi_startproc
; %bb.0:
	mov	w0, #1
	b	_exit
	.cfi_endproc
                                        ; -- End function
	.comm	_TAP_DEV,4,2                    ; @TAP_DEV
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_tapfd,4,2                      ; @tapfd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't open tap: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"fstat()"

	.comm	_tapdev,4,2                     ; @tapdev
	.comm	_S_IFCHR,4,2                    ; @S_IFCHR
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
l_.str.2:                               ; @.str.2
	.asciz	"socket()"

	.comm	_SIOCSIFMTU,4,2                 ; @SIOCSIFMTU
l_.str.3:                               ; @.str.3
	.asciz	"ioctl(SIOCSIFMTU)"

	.comm	_SIOCGIFFLAGS,4,2               ; @SIOCGIFFLAGS
l_.str.4:                               ; @.str.4
	.asciz	"ioctl(SIOCGIFFLAGS)"

	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.comm	_SIOCSIFFLAGS,4,2               ; @SIOCSIFFLAGS
l_.str.5:                               ; @.str.5
	.asciz	"ioctl(SIOCSIFFLAGS)"

l_.str.6:                               ; @.str.6
	.asciz	"Opened tap device: %s\n"

.subsections_via_symbols
