	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_firmware_image
_check_firmware_image:                  ## @check_firmware_image
	.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
	movq	%rdi, %r12
	movq	_HDR_OFFSET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	movq	_HDR_FW_VERS@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_ioread16be
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	movl	%eax, %r14d
	movq	_HDR_API_VERS@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_ioread16be
	movq	(%rbx), %rdi
	addq	8(%r12), %rdi
	movl	%eax, %r15d
	movq	_HDR_FW_OPTIONS@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_ioread32be
	movq	_FW_OPTION_TRACE_EN@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r15d, %ebx
	sarl	$8, %ebx
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movl	%ecx, (%r12)
	movl	4(%r12), %edi
	movzbl	%r15b, %r8d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r9
	cmovneq	%rax, %r9
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_dev_info
	movq	_API_VERSION_MAJ@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %ebx
	je	LBB0_2
## %bb.1:
	movl	4(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDR_OFFSET,8,3                 ## @HDR_OFFSET
	.comm	_HDR_FW_VERS,8,3                ## @HDR_FW_VERS
	.comm	_HDR_API_VERS,8,3               ## @HDR_API_VERS
	.comm	_HDR_FW_OPTIONS,8,3             ## @HDR_FW_OPTIONS
	.comm	_FW_OPTION_TRACE_EN,4,2         ## @FW_OPTION_TRACE_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ColdFire initialized, firmware v%d API v%d.%d (trace %s)\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"disabled"

	.comm	_API_VERSION_MAJ,4,2            ## @API_VERSION_MAJ
L_.str.3:                               ## @.str.3
	.asciz	"Unsupported coprocessor API version !\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_check_firmware_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_firmware_image
_check_firmware_image:                  ; @check_firmware_image
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x22, _HDR_OFFSET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HDR_OFFSET@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	adrp	x10, _HDR_FW_VERS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _HDR_FW_VERS@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x0, x8, x10
	bl	_ioread16be
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
Lloh5:
	adrp	x10, _HDR_API_VERS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _HDR_API_VERS@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x0, x8, x10
	bl	_ioread16be
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
Lloh8:
	adrp	x10, _HDR_FW_OPTIONS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HDR_FW_OPTIONS@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x0, x8, x10
	bl	_ioread32be
Lloh11:
	adrp	x8, _FW_OPTION_TRACE_EN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FW_OPTION_TRACE_EN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	str	w8, [x19]
	ldr	w0, [x19, #4]
	asr	w22, w21, #8
	and	w4, w21, #0xff
Lloh14:
	adrp	x8, l_.str.2@PAGE
Lloh15:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh16:
	adrp	x9, l_.str.1@PAGE
Lloh17:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x5, x9, x8, ne
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	bl	_dev_info
Lloh20:
	adrp	x8, _API_VERSION_MAJ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _API_VERSION_MAJ@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #4]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_HDR_OFFSET,8,3                 ; @HDR_OFFSET
	.comm	_HDR_FW_VERS,8,3                ; @HDR_FW_VERS
	.comm	_HDR_API_VERS,8,3               ; @HDR_API_VERS
	.comm	_HDR_FW_OPTIONS,8,3             ; @HDR_FW_OPTIONS
	.comm	_FW_OPTION_TRACE_EN,4,2         ; @FW_OPTION_TRACE_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ColdFire initialized, firmware v%d API v%d.%d (trace %s)\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"disabled"

	.comm	_API_VERSION_MAJ,4,2            ; @API_VERSION_MAJ
l_.str.3:                               ; @.str.3
	.asciz	"Unsupported coprocessor API version !\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_check_firmware_image
.subsections_via_symbols
