	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _fdt_rw_check_header
__fdt_rw_check_header:                  ## @_fdt_rw_check_header
	.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
	callq	_FDT_CHECK_HEADER
	movq	%r14, %rdi
	callq	_fdt_version
	cmpl	$16, %eax
	jg	LBB0_3
## %bb.1:
	movq	_FDT_ERR_BADVERSION@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_fdt_size_dt_struct
	movq	%r14, %rdi
	movl	$4, %esi
	movl	%eax, %edx
	callq	__fdt_blocks_misordered
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_FDT_ERR_BADLAYOUT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_fdt_version
	xorl	%ebx, %ebx
	cmpl	$18, %eax
	jl	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$17, %esi
	callq	_fdt_set_version
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_FDT_ERR_BADVERSION,4,2         ## @FDT_ERR_BADVERSION
	.comm	_FDT_ERR_BADLAYOUT,4,2          ## @FDT_ERR_BADLAYOUT
	.no_dead_strip	__fdt_rw_check_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _fdt_rw_check_header
__fdt_rw_check_header:                  ; @_fdt_rw_check_header
	.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
	bl	_FDT_CHECK_HEADER
	mov	x0, x19
	bl	_fdt_version
	cmp	w0, #16
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _FDT_ERR_BADVERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FDT_ERR_BADVERSION@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_fdt_size_dt_struct
	mov	x2, x0
	mov	x0, x19
	mov	w1, #4
	bl	__fdt_blocks_misordered
	cbz	x0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x8, _FDT_ERR_BADLAYOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FDT_ERR_BADLAYOUT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_fdt_version
	cmp	w0, #18
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #17
	bl	_fdt_set_version
LBB0_8:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_FDT_ERR_BADVERSION,4,2         ; @FDT_ERR_BADVERSION
	.comm	_FDT_ERR_BADLAYOUT,4,2          ; @FDT_ERR_BADLAYOUT
	.no_dead_strip	__fdt_rw_check_header
.subsections_via_symbols
