	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function valid_header
_valid_header:                          ## @valid_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	cmpl	$4, %esi
	jb	LBB0_7
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_fdt_magic
	movq	_FDT_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_fdt_version
	movq	_MAX_VERSION@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jg	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	callq	_fdt_last_comp_version
	cmpq	(%r12), %rax
	jge	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_fdt_totalsize
	cmpl	%r15d, %eax
	jge	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_fdt_off_dt_struct
	cmpl	%r15d, %eax
	jge	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_fdt_off_dt_strings
	xorl	%r14d, %r14d
	cmpl	%r15d, %eax
	setl	%r14b
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FDT_MAGIC,8,3                  ## @FDT_MAGIC
	.comm	_MAX_VERSION,8,3                ## @MAX_VERSION
	.no_dead_strip	_valid_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function valid_header
_valid_header:                          ; @valid_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cmp	w1, #4
	b.lo	LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_fdt_magic
Lloh0:
	adrp	x8, _FDT_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FDT_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.2:
	mov	x0, x20
	bl	_fdt_version
Lloh3:
	adrp	x21, _MAX_VERSION@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAX_VERSION@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.gt	LBB0_7
; %bb.3:
	mov	x0, x20
	bl	_fdt_last_comp_version
	ldr	x8, [x21]
	cmp	x0, x8
	b.ge	LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_fdt_totalsize
	cmp	w0, w19
	b.ge	LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_fdt_off_dt_struct
	cmp	w0, w19
	b.ge	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_fdt_off_dt_strings
	cmp	w0, w19
	cset	w0, lt
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FDT_MAGIC,8,3                  ; @FDT_MAGIC
	.comm	_MAX_VERSION,8,3                ; @MAX_VERSION
	.no_dead_strip	_valid_header
.subsections_via_symbols
