	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ngene_load_firm
_ngene_load_firm:                       ## @ngene_load_firm
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	$0, -48(%rbp)
	movq	16(%rdi), %rax
	movl	(%rax), %eax
	cmpl	$18, %eax
	je	LBB0_9
## %bb.1:
	cmpl	$17, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$16, %eax
	jne	LBB0_3
## %bb.4:
	leaq	L_.str.1(%rip), %r15
	movl	$23498, %r13d                   ## imm = 0x5BCA
	jmp	LBB0_6
LBB0_9:
	leaq	L_.str.3(%rip), %r15
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_request_firmware
	testq	%rax, %rax
	js	LBB0_10
## %bb.11:
	movq	-48(%rbp), %rax
	movq	(%rax), %r12
	leaq	L_.str.3(%rip), %r15
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.2(%rip), %r15
	movl	$24446, %r13d                   ## imm = 0x5F7E
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %r15
	movl	$23466, %r13d                   ## imm = 0x5BAA
LBB0_6:
	movl	$1, (%rbx)
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_request_firmware
	testq	%rax, %rax
	js	LBB0_10
## %bb.7:
	movq	-48(%rbp), %rax
	movq	(%rax), %r12
	cmpq	%r12, %r13
	jne	LBB0_8
LBB0_12:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dev_info
	movq	-48(%rbp), %rax
	movq	8(%rax), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_ngene_command_load_firmware
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dev_err
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dev_info
	movl	$-1, %ebx
	jmp	LBB0_14
LBB0_8:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_dev_err
	movl	$-1, %ebx
LBB0_13:
	movq	-48(%rbp), %rdi
	callq	_release_firmware
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ngene_15.fw"

L_.str.1:                               ## @.str.1
	.asciz	"ngene_16.fw"

L_.str.2:                               ## @.str.2
	.asciz	"ngene_17.fw"

L_.str.3:                               ## @.str.3
	.asciz	"ngene_18.fw"

L_.str.4:                               ## @.str.4
	.asciz	"Could not load firmware file %s.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Copy %s to your hotplug directory!\n"

L_.str.6:                               ## @.str.6
	.asciz	"Firmware %s has invalid size!"

L_.str.7:                               ## @.str.7
	.asciz	"Loading firmware file %s.\n"

	.no_dead_strip	_ngene_load_firm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ngene_load_firm
_ngene_load_firm:                       ; @ngene_load_firm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	str	xzr, [sp, #8]
	ldp	x19, x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #18
	b.eq	LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, l_.str@PAGE
Lloh1:
	add	x9, x9, l_.str@PAGEOFF
	mov	w10, #23466
Lloh2:
	adrp	x11, l_.str.2@PAGE
Lloh3:
	add	x11, x11, l_.str.2@PAGEOFF
	mov	w12, #24446
	cmp	w8, #16
Lloh4:
	adrp	x13, l_.str.1@PAGE
Lloh5:
	add	x13, x13, l_.str.1@PAGEOFF
	mov	w14, #23498
	csel	x10, x10, x14, ne
	csel	x9, x9, x13, ne
	cmp	w8, #17
	csel	x23, x12, x10, eq
	csel	x21, x11, x9, eq
	mov	w8, #1
	str	w8, [x20]
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x19
	bl	_request_firmware
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldr	x8, [sp, #8]
	ldr	x22, [x8]
	cmp	x23, x22
	b.eq	LBB0_6
; %bb.3:
Lloh6:
	adrp	x1, l_.str.6@PAGE
Lloh7:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	mov	w19, #-1
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x21, l_.str.3@PAGE
Lloh9:
	add	x21, x21, l_.str.3@PAGEOFF
	add	x0, sp, #8
	mov	x1, x21
	mov	x2, x19
	bl	_request_firmware
	tbnz	x0, #63, LBB0_8
; %bb.5:
	ldr	x8, [sp, #8]
	ldr	x22, [x8]
Lloh10:
	adrp	x21, l_.str.3@PAGE
Lloh11:
	add	x21, x21, l_.str.3@PAGEOFF
LBB0_6:
Lloh12:
	adrp	x1, l_.str.7@PAGE
Lloh13:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_info
	ldr	x8, [sp, #8]
	ldr	x1, [x8, #8]
	mov	x0, x20
	mov	x2, x22
	bl	_ngene_command_load_firmware
	mov	x19, x0
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_release_firmware
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_info
	mov	w19, #-1
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ngene_15.fw"

l_.str.1:                               ; @.str.1
	.asciz	"ngene_16.fw"

l_.str.2:                               ; @.str.2
	.asciz	"ngene_17.fw"

l_.str.3:                               ; @.str.3
	.asciz	"ngene_18.fw"

l_.str.4:                               ; @.str.4
	.asciz	"Could not load firmware file %s.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Copy %s to your hotplug directory!\n"

l_.str.6:                               ; @.str.6
	.asciz	"Firmware %s has invalid size!"

l_.str.7:                               ; @.str.7
	.asciz	"Loading firmware file %s.\n"

	.no_dead_strip	_ngene_load_firm
.subsections_via_symbols
