	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function net_getparams
_net_getparams:                         ## @net_getparams
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_MAXHOSTNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	%ebx, %edi
	callq	_rarp_getipaddress
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_str.7(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movq	_myip@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_inet_ntoa
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	movl	%ebx, %edi
	callq	_bp_whoami
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_str.6(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	movq	_gateip@GOTPCREL(%rip), %rdx
	movq	$0, (%rdx)
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rcx
	callq	_bp_getfile
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%r14, %rdi
	callq	_ip_convertaddr
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_netmask@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_8:
	movq	_rootpath@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	_rootip@GOTPCREL(%rip), %r14
	movl	%ebx, %edi
	movq	%r14, %rdx
	callq	_bp_getfile
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_str(%rip), %rdi
LBB0_2:
	callq	_puts
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %eax
	leaq	-16(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_net_parse_rootpath
	movq	_INADDR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, (%r14)
	jmp	LBB0_12
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXHOSTNAMELEN,4,2             ## @MAXHOSTNAMELEN
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"net_open: client addr: %s\n"

	.comm	_myip,8,3                       ## @myip
	.comm	_gateip,8,3                     ## @gateip
L_.str.3:                               ## @.str.3
	.asciz	"gateway"

	.comm	_netmask,8,3                    ## @netmask
L_.str.4:                               ## @.str.4
	.asciz	"root"

	.comm	_rootip,8,3                     ## @rootip
	.comm	_rootpath,8,3                   ## @rootpath
	.comm	_INADDR_NONE,8,3                ## @INADDR_NONE
	.comm	_debug,8,3                      ## @debug
	.comm	_hostname,8,3                   ## @hostname
	.comm	_try_bootp,8,3                  ## @try_bootp
L_str:                                  ## @str
	.asciz	"net_open: bootparam/getfile RPC failed"

L_str.6:                                ## @str.6
	.asciz	"net_open: bootparam/whoami RPC failed"

L_str.7:                                ## @str.7
	.asciz	"net_open: RARP failed"

	.no_dead_strip	_net_getparams
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function net_getparams
_net_getparams:                         ; @net_getparams
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #16
	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, #-24]
Lloh3:
	adrp	x8, _MAXHOSTNAMELEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXHOSTNAMELEN@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	x20, x9, x8
	mov	sp, x20
	bl	_rarp_getipaddress
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_str.7@PAGE
Lloh9:
	add	x0, x0, l_str.7@PAGEOFF
	b	LBB0_9
LBB0_2:
Lloh10:
	adrp	x8, _myip@GOTPAGE
Lloh11:
	ldr	x8, [x8, _myip@GOTPAGEOFF]
Lloh12:
	ldr	x0, [x8]
	bl	_inet_ntoa
	str	x0, [sp, #-16]!
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	add	sp, sp, #16
	mov	x0, x19
	bl	_bp_whoami
	cbz	x0, LBB0_4
; %bb.3:
Lloh15:
	adrp	x0, l_str.6@PAGE
Lloh16:
	add	x0, x0, l_str.6@PAGEOFF
	b	LBB0_9
LBB0_4:
Lloh17:
	adrp	x2, _gateip@GOTPAGE
Lloh18:
	ldr	x2, [x2, _gateip@GOTPAGEOFF]
	str	xzr, [x2]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_bp_getfile
	cbnz	x0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_ip_convertaddr
	cbz	x0, LBB0_7
; %bb.6:
Lloh21:
	adrp	x8, _netmask@GOTPAGE
Lloh22:
	ldr	x8, [x8, _netmask@GOTPAGEOFF]
Lloh23:
	str	x0, [x8]
LBB0_7:
Lloh24:
	adrp	x8, _rootpath@GOTPAGE
Lloh25:
	ldr	x8, [x8, _rootpath@GOTPAGEOFF]
Lloh26:
	ldr	x3, [x8]
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
Lloh29:
	adrp	x20, _rootip@GOTPAGE
Lloh30:
	ldr	x20, [x20, _rootip@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, x20
	bl	_bp_getfile
	cbz	x0, LBB0_12
; %bb.8:
Lloh31:
	adrp	x0, l_str@PAGE
Lloh32:
	add	x0, x0, l_str@PAGEOFF
LBB0_9:
	bl	_puts
Lloh33:
	adrp	x8, _EIO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
LBB0_10:
	ldur	x8, [x29, #-24]
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.11:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	_net_parse_rootpath
Lloh39:
	adrp	x9, _INADDR_NONE@GOTPAGE
Lloh40:
	ldr	x9, [x9, _INADDR_NONE@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x0, x9
	b.eq	LBB0_14
; %bb.13:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20]
	b	LBB0_10
LBB0_14:
	mov	w0, #0
	b	LBB0_10
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXHOSTNAMELEN,4,2             ; @MAXHOSTNAMELEN
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"net_open: client addr: %s\n"

	.comm	_myip,8,3                       ; @myip
	.comm	_gateip,8,3                     ; @gateip
l_.str.3:                               ; @.str.3
	.asciz	"gateway"

	.comm	_netmask,8,3                    ; @netmask
l_.str.4:                               ; @.str.4
	.asciz	"root"

	.comm	_rootip,8,3                     ; @rootip
	.comm	_rootpath,8,3                   ; @rootpath
	.comm	_INADDR_NONE,8,3                ; @INADDR_NONE
	.comm	_debug,8,3                      ; @debug
	.comm	_hostname,8,3                   ; @hostname
	.comm	_try_bootp,8,3                  ; @try_bootp
l_str:                                  ; @str
	.asciz	"net_open: bootparam/getfile RPC failed"

l_str.6:                                ; @str.6
	.asciz	"net_open: bootparam/whoami RPC failed"

l_str.7:                                ; @str.7
	.asciz	"net_open: RARP failed"

	.no_dead_strip	_net_getparams
.subsections_via_symbols
