	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_devicetree
_update_devicetree:                     ## @update_devicetree
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_rtas_token
	movq	_RTAS_UNKNOWN_SERVICE@GOTPCREL(%rip), %rcx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	_RTAS_DATA_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be64
	movl	%eax, (%r15)
	movq	%r15, %rax
	addq	$16, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_NODE_ACTION_MASK@GOTPCREL(%rip), %r13
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$1, -48(%rbp)                   ## 4-byte Folded Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_18
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_rcall
	cmpl	$1, %eax
	ja	LBB0_18
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_be32_to_cpu
	testl	%eax, (%r13)
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	movl	(%r12), %edi
	callq	_be32_to_cpu
	testl	%eax, (%r13)
	je	LBB0_17
LBB0_10:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
	movl	(%r12), %edi
	callq	_be32_to_cpu
	movl	%eax, %r14d
	andl	(%r13), %r14d
	movl	(%r12), %edi
	callq	_be32_to_cpu
	movl	%eax, %r15d
	movq	_NODE_COUNT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_pr_devel
	movq	%r12, %rax
	addq	$4, %rax
	testl	%r15d, %r15d
	jg	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%rax, %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=3
	addq	$8, %rax
	movq	%rax, %r12
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=3
	movq	%r12, %rax
	decl	%r15d
	je	LBB0_9
LBB0_12:                                ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_10 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	$130, %r14d
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=3
	leaq	4(%rax), %r12
	cmpl	$128, %r14d
	jne	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=3
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_update_node
	jmp	LBB0_16
LBB0_18:
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ibm,update-nodes"

	.comm	_RTAS_UNKNOWN_SERVICE,4,2       ## @RTAS_UNKNOWN_SERVICE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTAS_DATA_BUF_SIZE,4,2         ## @RTAS_DATA_BUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NODE_ACTION_MASK,4,2           ## @NODE_ACTION_MASK
	.comm	_NODE_COUNT_MASK,4,2            ## @NODE_COUNT_MASK
L_.str.1:                               ## @.str.1
	.asciz	"device reconfiguration - action: %#x, nodes: %#x\n"

	.no_dead_strip	_update_devicetree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_devicetree
_update_devicetree:                     ; @update_devicetree
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rtas_token
Lloh2:
	adrp	x8, _RTAS_UNKNOWN_SERVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTAS_UNKNOWN_SERVICE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_2:
Lloh7:
	adrp	x8, _RTAS_DATA_BUF_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RTAS_DATA_BUF_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_17
; %bb.3:
	mov	x20, x0
	ldr	x8, [x22]
	ldr	w0, [x8]
	bl	_cpu_to_be64
	mov	x21, x20
	str	w0, [x21], #16
Lloh13:
	adrp	x27, _NODE_ACTION_MASK@GOTPAGE
Lloh14:
	ldr	x27, [x27, _NODE_ACTION_MASK@GOTPAGEOFF]
Lloh15:
	adrp	x28, _NODE_COUNT_MASK@GOTPAGE
Lloh16:
	ldr	x28, [x28, _NODE_COUNT_MASK@GOTPAGEOFF]
Lloh17:
	adrp	x22, l_.str.1@PAGE
Lloh18:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, #1
	b.ne	LBB0_16
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	mov	x1, x20
	mov	x2, x19
	bl	_rcall
	cmp	w0, #1
	b.hi	LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	ldr	w0, [x21]
	bl	_be32_to_cpu
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x21
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	w0, [x26]
	bl	_be32_to_cpu
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_4
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_13 Depth 3
	ldr	w0, [x26]
	bl	_be32_to_cpu
	ldr	w8, [x27]
	and	w24, w8, w0
	ldr	w0, [x26], #4
	bl	_be32_to_cpu
	ldr	w8, [x28]
	and	w25, w8, w0
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	bl	_pr_devel
	mov	x8, x26
	cmp	w25, #1
	b.ge	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x26, x8
	b	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=3
	add	x26, x8, #8
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=3
	mov	x8, x26
	subs	w25, w25, #1
	b.eq	LBB0_8
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	cmp	w24, #130
	b.eq	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=3
	add	x26, x8, #4
	cmp	w24, #128
	b.ne	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=3
	ldr	w0, [x8]
	mov	x1, x19
	bl	_update_node
	b	LBB0_12
LBB0_16:
	mov	x0, x20
	bl	_kfree
	mov	w0, #0
	b	LBB0_19
LBB0_17:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ibm,update-nodes"

	.comm	_RTAS_UNKNOWN_SERVICE,4,2       ; @RTAS_UNKNOWN_SERVICE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTAS_DATA_BUF_SIZE,4,2         ; @RTAS_DATA_BUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NODE_ACTION_MASK,4,2           ; @NODE_ACTION_MASK
	.comm	_NODE_COUNT_MASK,4,2            ; @NODE_COUNT_MASK
l_.str.1:                               ; @.str.1
	.asciz	"device reconfiguration - action: %#x, nodes: %#x\n"

	.no_dead_strip	_update_devicetree
.subsections_via_symbols
