	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cc2520_register
_cc2520_register:                       ## @cc2520_register
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_cc2520_ops@GOTPCREL(%rip), %rsi
	movl	$24, %edi
	callq	_ieee802154_alloc_hw
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%r14, 32(%rax)
	movq	8(%r14), %rcx
	movq	%rcx, 24(%rax)
	movq	$0, 16(%rax)
	movq	8(%rax), %rdi
	addq	$40, %rdi
	callq	_ieee802154_random_extended_addr
	movq	(%r14), %rcx
	movq	8(%rcx), %rax
	movq	8(%rax), %rdx
	movl	$134215680, (%rdx)              ## imm = 0x7FFF800
	movq	_IEEE802154_HW_TX_OMIT_CKSUM@GOTPCREL(%rip), %rdx
	movq	_IEEE802154_HW_AFILT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movq	_IEEE802154_HW_PROMISCUOUS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	movl	%esi, (%rcx)
	movq	_WPAN_PHY_FLAG_TXPOWER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	cmpl	$0, 16(%r14)
	je	LBB0_2
## %bb.3:
	movq	_cc2520_cc2591_powers@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	%rdi, 16(%rax)
	callq	_ARRAY_SIZE
	movq	(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 24(%rcx)
	movq	16(%rcx), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_cc2520_powers@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	%rdi, 16(%rax)
	callq	_ARRAY_SIZE
	movq	(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 24(%rcx)
	movq	16(%rcx), %rax
	addq	$16, %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 32(%rcx)
	movl	$11, (%rcx)
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_vdbg
	movq	(%r14), %rdi
	callq	_ieee802154_register_hw
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	callq	_ieee802154_free_hw
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_cc2520_ops,4,2                 ## @cc2520_ops
	.comm	_IEEE802154_HW_TX_OMIT_CKSUM,4,2 ## @IEEE802154_HW_TX_OMIT_CKSUM
	.comm	_IEEE802154_HW_AFILT,4,2        ## @IEEE802154_HW_AFILT
	.comm	_IEEE802154_HW_PROMISCUOUS,4,2  ## @IEEE802154_HW_PROMISCUOUS
	.comm	_WPAN_PHY_FLAG_TXPOWER,4,2      ## @WPAN_PHY_FLAG_TXPOWER
	.comm	_cc2520_powers,8,3              ## @cc2520_powers
	.comm	_cc2520_cc2591_powers,8,3       ## @cc2520_cc2591_powers
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"registered cc2520\n"

	.no_dead_strip	_cc2520_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cc2520_register
_cc2520_register:                       ; @cc2520_register
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x1, _cc2520_ops@GOTPAGE
Lloh4:
	ldr	x1, [x1, _cc2520_ops@GOTPAGEOFF]
	mov	w0, #24
	bl	_ieee802154_alloc_hw
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	str	x19, [x0, #32]
	ldr	x8, [x19, #8]
	stp	xzr, x8, [x0, #16]
	ldr	x8, [x0, #8]
	add	x0, x8, #40
	bl	_ieee802154_random_extended_addr
	ldr	x9, [x19]
	ldr	x8, [x9, #8]
	ldr	x10, [x8, #8]
	mov	w11, #134215680
	str	w11, [x10]
Lloh5:
	adrp	x10, _IEEE802154_HW_TX_OMIT_CKSUM@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IEEE802154_HW_TX_OMIT_CKSUM@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _IEEE802154_HW_AFILT@GOTPAGE
Lloh9:
	ldr	x11, [x11, _IEEE802154_HW_AFILT@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	orr	w10, w11, w10
Lloh11:
	adrp	x11, _IEEE802154_HW_PROMISCUOUS@GOTPAGE
Lloh12:
	ldr	x11, [x11, _IEEE802154_HW_PROMISCUOUS@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	orr	w10, w10, w11
	str	w10, [x9]
Lloh14:
	adrp	x9, _WPAN_PHY_FLAG_TXPOWER@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WPAN_PHY_FLAG_TXPOWER@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	str	w9, [x8, #36]
	ldr	w9, [x19, #16]
	cbz	w9, LBB0_4
; %bb.2:
Lloh17:
	adrp	x9, _cc2520_cc2591_powers@GOTPAGE
Lloh18:
	ldr	x9, [x9, _cc2520_cc2591_powers@GOTPAGEOFF]
Lloh19:
	ldr	x0, [x9]
	str	x0, [x8, #16]
	bl	_ARRAY_SIZE
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	str	x0, [x8, #24]
	ldr	x9, [x8, #16]
	b	LBB0_5
LBB0_3:
	neg	w20, w20
	b	LBB0_7
LBB0_4:
Lloh20:
	adrp	x9, _cc2520_powers@GOTPAGE
Lloh21:
	ldr	x9, [x9, _cc2520_powers@GOTPAGEOFF]
Lloh22:
	ldr	x0, [x9]
	str	x0, [x8, #16]
	bl	_ARRAY_SIZE
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	str	x0, [x8, #24]
	ldr	x9, [x8, #16]
	add	x9, x9, #16
LBB0_5:
	ldr	w9, [x9]
	str	w9, [x8, #32]
	mov	w9, #11
	str	w9, [x8]
	ldr	x0, [x19, #8]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	ldr	x0, [x19]
	bl	_ieee802154_register_hw
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x0, [x19]
	bl	_ieee802154_free_hw
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_cc2520_ops,4,2                 ; @cc2520_ops
	.comm	_IEEE802154_HW_TX_OMIT_CKSUM,4,2 ; @IEEE802154_HW_TX_OMIT_CKSUM
	.comm	_IEEE802154_HW_AFILT,4,2        ; @IEEE802154_HW_AFILT
	.comm	_IEEE802154_HW_PROMISCUOUS,4,2  ; @IEEE802154_HW_PROMISCUOUS
	.comm	_WPAN_PHY_FLAG_TXPOWER,4,2      ; @WPAN_PHY_FLAG_TXPOWER
	.comm	_cc2520_powers,8,3              ; @cc2520_powers
	.comm	_cc2520_cc2591_powers,8,3       ; @cc2520_cc2591_powers
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"registered cc2520\n"

	.no_dead_strip	_cc2520_register
.subsections_via_symbols
