	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function guess_input_format
_guess_input_format:                    ## @guess_input_format
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-40(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movl	-40(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %r14
LBB0_9:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	-40(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %r15
	leaq	-48(%rbp), %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fread
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_fclose
	cmpl	$1, %r12d
	jne	LBB0_9
## %bb.6:
	movq	-48(%rbp), %rdi
	callq	_fdt32_to_cpu
	movq	%rax, -48(%rbp)
	movq	_FDT_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_guess_type_by_name
	movq	%rax, %r14
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fs"

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

	.comm	_FDT_MAGIC,8,3                  ## @FDT_MAGIC
L_.str.2:                               ## @.str.2
	.asciz	"dtb"

	.no_dead_strip	_guess_input_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function guess_input_format
_guess_input_format:                    ; @guess_input_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	add	x1, sp, #8
	bl	_stat
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_3
; %bb.5:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.6:
	mov	x21, x0
	mov	x0, sp
	mov	w1, #4
	mov	w2, #1
	mov	x3, x21
	bl	_fread
	mov	x22, x0
	mov	x0, x21
	bl	_fclose
	cmp	w22, #1
	b.ne	LBB0_3
; %bb.7:
	ldr	x0, [sp]
	bl	_fdt32_to_cpu
	str	x0, [sp]
Lloh4:
	adrp	x8, _FDT_MAGIC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FDT_MAGIC@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.8:
Lloh7:
	adrp	x19, l_.str.2@PAGE
Lloh8:
	add	x19, x19, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_guess_type_by_name
	mov	x19, x0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fs"

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

	.comm	_FDT_MAGIC,8,3                  ; @FDT_MAGIC
l_.str.2:                               ; @.str.2
	.asciz	"dtb"

	.no_dead_strip	_guess_input_format
.subsections_via_symbols
