	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function link_getaddr
_link_getaddr:                          ## @link_getaddr
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_ADDR@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_strlen
	leaq	2(%rax), %rdi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_6:
	movb	$58, (%rbx)
	movq	%rbx, %rdi
	incq	%rdi
	movq	%r14, %rsi
	callq	_strcpy
	movl	$32, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_link_addr
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_7
LBB0_3:
	movl	$32, -48(%rbp)
	movq	_ETHER_ADDR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, -44(%rbp)
	movq	$0, -24(%rbp)
	movq	_AF_LINK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	-40(%rbp), %rdi
	callq	_arc4random_buf
	movq	-40(%rbp), %rax
	movl	$252, %ecx
	andl	(%rax), %ecx
	orl	$2, %ecx
	movl	%ecx, (%rax)
LBB0_7:
	movl	-44(%rbp), %eax
	cmpl	$5, %eax
	jb	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	movl	-44(%rbp), %eax
LBB0_9:
	movq	_AF_LINK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_link_ridreq@GOTPCREL(%rip), %rbx
	movq	%rcx, 8(%rbx)
	movl	%eax, (%rbx)
	leaq	-48(%rbp), %rdi
	callq	_LLADDR
	movl	4(%rbx), %esi
	movl	-44(%rbp), %edx
	movl	%eax, %edi
	callq	_bcopy
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_link_ridreq,16,3               ## @link_ridreq
	.comm	_ADDR,4,2                       ## @ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't set link-level netmask or broadcast"

L_.str.1:                               ## @.str.1
	.asciz	"random"

	.comm	_ETHER_ADDR_LEN,4,2             ## @ETHER_ADDR_LEN
	.comm	_AF_LINK,8,3                    ## @AF_LINK
L_.str.2:                               ## @.str.2
	.asciz	"malloc failed"

L_.str.3:                               ## @.str.3
	.asciz	"malformed link-level address"

	.no_dead_strip	_link_getaddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function link_getaddr
_link_getaddr:                          ; @link_getaddr
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_strcmp
Lloh7:
	adrp	x21, _AF_LINK@GOTPAGE
Lloh8:
	ldr	x21, [x21, _AF_LINK@GOTPAGEOFF]
	cbz	w0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_strlen
	add	x0, x0, #2
	bl	_malloc
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_5:
	mov	w8, #58
	mov	x0, x20
	strb	w8, [x0], #1
	mov	x1, x19
	bl	_strcpy
	mov	w8, #32
	str	w8, [sp]
	mov	x1, sp
	mov	x0, x20
	bl	_link_addr
	mov	x0, x20
	bl	_free
	b	LBB0_7
LBB0_6:
	mov	w8, #32
Lloh11:
	adrp	x9, _ETHER_ADDR_LEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ETHER_ADDR_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x9]
	stp	w8, w1, [sp]
	ldr	x8, [x21]
	stp	x8, xzr, [sp, #16]
	mov	x8, sp
	add	x0, x8, #8
	bl	_arc4random_buf
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
	and	w9, w9, #0xfc
	orr	w9, w9, #0x2
	str	w9, [x8]
LBB0_7:
	ldr	w8, [sp, #4]
	cmp	w8, #5
	b.lo	LBB0_9
; %bb.8:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	w8, [sp, #4]
LBB0_9:
	ldr	x9, [x21]
Lloh16:
	adrp	x19, _link_ridreq@GOTPAGE
Lloh17:
	ldr	x19, [x19, _link_ridreq@GOTPAGEOFF]
	str	x9, [x19, #8]
	str	w8, [x19]
	mov	x0, sp
	bl	_LLADDR
	ldr	w1, [x19, #4]
	ldr	w2, [sp, #4]
	bl	_bcopy
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_link_ridreq,16,3               ; @link_ridreq
	.comm	_ADDR,4,2                       ; @ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't set link-level netmask or broadcast"

l_.str.1:                               ; @.str.1
	.asciz	"random"

	.comm	_ETHER_ADDR_LEN,4,2             ; @ETHER_ADDR_LEN
	.comm	_AF_LINK,8,3                    ; @AF_LINK
l_.str.2:                               ; @.str.2
	.asciz	"malloc failed"

l_.str.3:                               ; @.str.3
	.asciz	"malformed link-level address"

	.no_dead_strip	_link_getaddr
.subsections_via_symbols
