	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netdump_start
_netdump_start:                         ## @netdump_start
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsp, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_INET_ADDRSTRLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	xorl	%eax, %eax
	callq	_netdump_enabled
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movq	_panicstr@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movq	_nd_server@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_INADDR_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	leaq	L_str.5(%rip), %rdi
	jmp	LBB0_10
LBB0_4:
	leaq	L_str.6(%rip), %rdi
	jmp	LBB0_10
LBB0_5:
	movq	$0, (%rbx)
	movq	_nd_ifp@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -56(%rbp)
	movq	_nd_client@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -60(%rbp)
	movq	%rax, -96(%rbp)
	movq	_nd_gateway@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_NETDUMP_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_NETDUMP_ACKPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_nd_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, -88(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_7
## %bb.6:
	callq	_strlen
	incq	%rax
	jmp	LBB0_8
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	movq	%rax, -80(%rbp)
	leaq	-96(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_debugnet_connect
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	leaq	L_str(%rip), %rdi
LBB0_10:
	callq	_puts
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_15
## %bb.13:
	movl	%ebx, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_inet_ntoa_r
	movq	%rax, %r14
	movq	-48(%rbp), %rdi
	callq	_debugnet_get_gw_mac
	leaq	L_.str.3(%rip), %rdi
	leaq	L_.str.4(%rip), %rcx
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	-48(%rbp), %rax
	movq	_nd_conf@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_12
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_INET_ADDRSTRLEN,4,2            ## @INET_ADDRSTRLEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_panicstr,8,3                   ## @panicstr
	.comm	_nd_server,8,3                  ## @nd_server
	.comm	_INADDR_ANY,8,3                 ## @INADDR_ANY
	.comm	_nd_ifp,4,2                     ## @nd_ifp
	.comm	_nd_client,4,2                  ## @nd_client
	.comm	_nd_gateway,4,2                 ## @nd_gateway
	.comm	_NETDUMP_PORT,4,2               ## @NETDUMP_PORT
	.comm	_NETDUMP_ACKPORT,4,2            ## @NETDUMP_ACKPORT
	.comm	_nd_path,8,3                    ## @nd_path
	.section	__TEXT,__cstring,cstring_literals
L_.str.3:                               ## @.str.3
	.asciz	"netdumping to %s (%6D)\n"

L_.str.4:                               ## @.str.4
	.asciz	":"

	.comm	_nd_conf,8,3                    ## @nd_conf
L_str:                                  ## @str
	.asciz	"failed to contact netdump server"

L_str.5:                                ## @str.5
	.asciz	"netdump_start: can't netdump; no server IP given"

L_str.6:                                ## @str.6
	.asciz	"netdump_start: netdump may only be used after a panic"

	.no_dead_strip	_netdump_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netdump_start
_netdump_start:                         ; @netdump_start
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #64
	mov	x20, x0
	mov	x21, sp
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	x8, _INET_ADDRSTRLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INET_ADDRSTRLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	bl	_netdump_enabled
	cbz	w0, LBB0_10
; %bb.1:
Lloh8:
	adrp	x8, _panicstr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _panicstr@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	sub	x0, x29, #88
	mov	w1, #0
	mov	w2, #48
	bl	_memset
Lloh11:
	adrp	x22, _nd_server@GOTPAGE
Lloh12:
	ldr	x22, [x22, _nd_server@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh13:
	adrp	x9, _INADDR_ANY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _INADDR_ANY@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh16:
	adrp	x0, l_str.5@PAGE
Lloh17:
	add	x0, x0, l_str.5@PAGEOFF
	b	LBB0_9
LBB0_4:
Lloh18:
	adrp	x0, l_str.6@PAGE
Lloh19:
	add	x0, x0, l_str.6@PAGEOFF
	b	LBB0_9
LBB0_5:
	str	xzr, [x20]
Lloh20:
	adrp	x9, _nd_ifp@GOTPAGE
Lloh21:
	ldr	x9, [x9, _nd_ifp@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	stur	w9, [x29, #-48]
Lloh23:
	adrp	x9, _nd_client@GOTPAGE
Lloh24:
	ldr	x9, [x9, _nd_client@GOTPAGEOFF]
Lloh25:
	adrp	x10, _nd_gateway@GOTPAGE
Lloh26:
	ldr	x10, [x10, _nd_gateway@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	ldr	w10, [x10]
	stp	w10, w9, [x29, #-56]
Lloh29:
	adrp	x9, _NETDUMP_PORT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _NETDUMP_PORT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, _NETDUMP_ACKPORT@GOTPAGE
Lloh33:
	ldr	x10, [x10, _NETDUMP_ACKPORT@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	stp	w10, w9, [x29, #-64]
Lloh35:
	adrp	x9, _nd_path@GOTPAGE
Lloh36:
	ldr	x9, [x9, _nd_path@GOTPAGEOFF]
Lloh37:
	ldr	x0, [x9]
	stp	x8, x0, [x29, #-88]
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.6:
	bl	_strlen
	add	x8, x0, #1
LBB0_7:
	stur	x8, [x29, #-72]
	sub	x0, x29, #88
	sub	x1, x29, #96
	bl	_debugnet_connect
	cbz	w0, LBB0_13
; %bb.8:
Lloh38:
	adrp	x0, l_str@PAGE
Lloh39:
	add	x0, x0, l_str@PAGEOFF
LBB0_9:
	bl	_puts
LBB0_10:
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
LBB0_11:
	mov	sp, x21
	ldur	x8, [x29, #-40]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.12:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x0, [x22]
	mov	x1, x19
	bl	_inet_ntoa_r
	mov	x19, x0
	ldur	x0, [x29, #-96]
	bl	_debugnet_get_gw_mac
                                        ; kill: def $w0 killed $w0 def $x0
	sub	sp, sp, #32
Lloh46:
	adrp	x8, l_.str.4@PAGE
Lloh47:
	add	x8, x8, l_.str.4@PAGEOFF
	stp	x0, x8, [sp, #8]
	str	x19, [sp]
Lloh48:
	adrp	x0, l_.str.3@PAGE
Lloh49:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	add	sp, sp, #32
	mov	w0, #0
	ldur	x8, [x29, #-96]
Lloh50:
	adrp	x9, _nd_conf@GOTPAGE
Lloh51:
	ldr	x9, [x9, _nd_conf@GOTPAGEOFF]
Lloh52:
	str	x8, [x9]
	b	LBB0_11
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh27
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotStr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_INET_ADDRSTRLEN,4,2            ; @INET_ADDRSTRLEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_panicstr,8,3                   ; @panicstr
	.comm	_nd_server,8,3                  ; @nd_server
	.comm	_INADDR_ANY,8,3                 ; @INADDR_ANY
	.comm	_nd_ifp,4,2                     ; @nd_ifp
	.comm	_nd_client,4,2                  ; @nd_client
	.comm	_nd_gateway,4,2                 ; @nd_gateway
	.comm	_NETDUMP_PORT,4,2               ; @NETDUMP_PORT
	.comm	_NETDUMP_ACKPORT,4,2            ; @NETDUMP_ACKPORT
	.comm	_nd_path,8,3                    ; @nd_path
	.section	__TEXT,__cstring,cstring_literals
l_.str.3:                               ; @.str.3
	.asciz	"netdumping to %s (%6D)\n"

l_.str.4:                               ; @.str.4
	.asciz	":"

	.comm	_nd_conf,8,3                    ; @nd_conf
l_str:                                  ; @str
	.asciz	"failed to contact netdump server"

l_str.5:                                ; @str.5
	.asciz	"netdump_start: can't netdump; no server IP given"

l_str.6:                                ; @str.6
	.asciz	"netdump_start: netdump may only be used after a panic"

	.no_dead_strip	_netdump_start
.subsections_via_symbols
