	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_firmware
_load_firmware:                         ## @load_firmware
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_firmware_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	_FW_HEADER_MAGIC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.5:
	movq	%rax, 8(%rbx)
	movslq	8(%rax), %rcx
	addq	%rax, %rcx
	movq	%rcx, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	movl	16(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	callq	_device_printf
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sdma_fw"

L_.str.1:                               ## @.str.1
	.asciz	"Can't get firmware.\n"

	.comm	_FW_HEADER_MAGIC,8,3            ## @FW_HEADER_MAGIC
L_.str.2:                               ## @.str.2
	.asciz	"Can't use firmware.\n"

	.no_dead_strip	_load_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_firmware
_load_firmware:                         ; @load_firmware
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_firmware_get
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, _FW_HEADER_MAGIC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _FW_HEADER_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #0
	ldrsw	x9, [x8, #8]
	add	x9, x8, x9
	stp	x9, x8, [x19]
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
	ldr	w0, [x19, #16]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_5:
	bl	_device_printf
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sdma_fw"

l_.str.1:                               ; @.str.1
	.asciz	"Can't get firmware.\n"

	.comm	_FW_HEADER_MAGIC,8,3            ; @FW_HEADER_MAGIC
l_.str.2:                               ; @.str.2
	.asciz	"Can't use firmware.\n"

	.no_dead_strip	_load_firmware
.subsections_via_symbols
