	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_get_fw
_ipw_get_fw:                            ## @ipw_get_fw
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	(%rdi), %rdx
	movq	%rsi, %rdi
	movq	%r14, %rsi
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r12), %rax
	movslq	(%rax), %r15
	cmpq	$15, %r15
	ja	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_IPW_ERROR
	jmp	LBB0_8
LBB0_5:
	movq	8(%rax), %rbx
	movl	12(%rbx), %edi
	callq	_le32_to_cpu
	cltq
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %edi
	callq	_le32_to_cpu
	movslq	%eax, %r13
	addq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	movl	4(%rbx), %edi
	callq	_le32_to_cpu
	cltq
	addq	%r13, %rax
	addq	$16, %rax
	cmpq	%r15, %rax
	jbe	LBB0_7
## %bb.6:
	movq	(%r12), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
LBB0_4:
	callq	_IPW_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_7:
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	sarl	$16, %r15d
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	movzbl	%al, %ecx
	movq	(%r12), %rax
	movl	(%rax), %r8d
	addl	$-16, %r8d
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_IPW_DEBUG_INFO
	xorl	%ebx, %ebx
LBB0_8:
	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	"%s request_firmware failed: Reason %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s is too small (%zd)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"%s is too small or corrupt (%zd)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Read firmware '%s' image v%d.%d (%zd bytes)\n"

	.no_dead_strip	_ipw_get_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_get_fw
_ipw_get_fw:                            ; @ipw_get_fw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	ldr	x2, [x0]
	mov	x0, x1
	mov	x1, x19
	bl	_request_firmware
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x20]
	ldrsw	x21, [x8]
	cmp	w21, #15
	b.hi	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	b	LBB0_6
LBB0_3:
	mov	x21, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_IPW_ERROR
	b	LBB0_8
LBB0_4:
	ldr	x22, [x8, #8]
	ldr	w0, [x22, #12]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x23, w0
	ldr	w0, [x22, #8]
	bl	_le32_to_cpu
	add	x23, x23, w0, sxtw
	ldr	w0, [x22, #4]
	bl	_le32_to_cpu
	add	x8, x23, w0, sxtw
	add	x8, x8, #16
	cmp	x8, x21
	b.ls	LBB0_7
; %bb.5:
	ldr	x8, [x20]
	ldr	w2, [x8]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
LBB0_6:
	bl	_IPW_ERROR
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
	ldr	w0, [x22]
	bl	_le32_to_cpu
	asr	w21, w0, #16
	ldr	w0, [x22]
	bl	_le32_to_cpu
	and	w3, w0, #0xff
	ldr	x8, [x20]
	ldr	w8, [x8]
	sub	w4, w8, #16
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	bl	_IPW_DEBUG_INFO
	mov	w21, #0
LBB0_8:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s request_firmware failed: Reason %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s is too small (%zd)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"%s is too small or corrupt (%zd)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Read firmware '%s' image v%d.%d (%zd bytes)\n"

	.no_dead_strip	_ipw_get_fw
.subsections_via_symbols
