	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2400m_dnload_bcf
_i2400m_dnload_bcf:                     ## @i2400m_dnload_bcf
	.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
	subq	$56, %rsp
	.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, %r15
	movq	%rdi, %rbx
	callq	_i2400m_dev
	leaq	L_.str(%rip), %rdx
	movl	$3, %edi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rcx
	movq	%r15, %r8
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %r9
	callq	_d_fnstart
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	callq	_le32_to_cpu
	movslq	%eax, %r15
	shlq	$2, %r15
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r14,%r15), %rbx
	movl	4(%r14,%r15), %edi
	callq	_le32_to_cpu
	movslq	%eax, %r13
	addq	$8, %r13
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_ALIGN
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r14,%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, (%rsp)
	movl	$7, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %r14
	movq	%r12, %rcx
	movq	%rbx, %r12
	movq	%r15, %r8
	movq	%r13, %r9
	xorl	%eax, %eax
	callq	_d_printf
	movq	%rbx, %rdi
	callq	_i2400m_brh_get_opcode
	movq	_I2400M_BRH_SIGNED_JUMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_i2400m_brh_get_opcode
	movq	_I2400M_BRH_JUMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	addq	%rbx, %r15
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	ja	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$20, %edi
	callq	___i2400m_msleep
	movq	_I2400M_BM_CMD_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %rdx
	leaq	-88(%rbp), %rcx
	movl	$8, %r8d
	callq	_i2400m_bm_cmd
	movq	%r14, %r12
	incq	%r12
	jmp	LBB0_1
LBB0_3:
	leaq	L_.str.2(%rip), %rdx
	movl	$5, %edi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_d_printf
	jmp	LBB0_6
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r14, %rcx
	movq	%r15, %r8
	movq	-56(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	movq	%rbx, %r15
LBB0_6:
	movl	%r15d, (%rsp)
	leaq	L_.str.5(%rip), %rdx
	movl	$3, %edi
	movq	%r12, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	callq	_d_fnend
	movq	%r15, %rax
	addq	$56, %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	"(i2400m %p bcf %p bcf_len %zu)\n"

L_.str.1:                               ## @.str.1
	.asciz	"downloading section #%zu (@%zu %zu B) to 0x%08x\n"

	.comm	_I2400M_BRH_SIGNED_JUMP,8,3     ## @I2400M_BRH_SIGNED_JUMP
	.comm	_I2400M_BRH_JUMP,8,3            ## @I2400M_BRH_JUMP
L_.str.2:                               ## @.str.2
	.asciz	"jump found @%zu\n"

L_.str.3:                               ## @.str.3
	.asciz	"fw %s: bad section #%zu, end (@%zu) beyond EOF (@%zu)\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_I2400M_BM_CMD_RAW,4,2          ## @I2400M_BM_CMD_RAW
L_.str.5:                               ## @.str.5
	.asciz	"(i2400m %p bcf %p bcf_len %zu) = %d\n"

	.no_dead_strip	_i2400m_dnload_bcf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2400m_dnload_bcf
_i2400m_dnload_bcf:                     ; @i2400m_dnload_bcf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_i2400m_dev
	mov	x22, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #3
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	bl	_d_fnstart
	ldr	w0, [x20]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sbfiz	x23, x0, #2, #32
	mov	w24, #1
Lloh2:
	adrp	x25, _I2400M_BRH_SIGNED_JUMP@GOTPAGE
Lloh3:
	ldr	x25, [x25, _I2400M_BRH_SIGNED_JUMP@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x26, x20, x23
	ldr	w0, [x26, #4]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x28, x8, #8
	mov	x0, x28
	mov	w1, #4
	bl	_ALIGN
	mov	x27, x0
	ldr	w0, [x26]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x28, x0, [sp, #8]
	str	x23, [sp]
	mov	w0, #7
	mov	x1, x22
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x3, x24
	bl	_d_printf
	mov	x0, x26
	bl	_i2400m_brh_get_opcode
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x26
	bl	_i2400m_brh_get_opcode
Lloh6:
	adrp	x8, _I2400M_BRH_JUMP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2400M_BRH_JUMP@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x23, x27, x23
	cmp	x23, x19
	b.hi	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #20
	bl	___i2400m_msleep
Lloh9:
	adrp	x8, _I2400M_BM_CMD_RAW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2400M_BM_CMD_RAW@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	add	x3, sp, #24
	mov	x0, x21
	mov	x1, x26
	mov	x2, x27
	mov	w4, #8
	bl	_i2400m_bm_cmd
	add	x24, x24, #1
	b	LBB0_1
LBB0_5:
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #5
	mov	x1, x22
	mov	x3, x23
	bl	_d_printf
	b	LBB0_7
LBB0_6:
	ldr	w2, [x21]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x3, x24
	mov	x4, x23
	mov	x5, x19
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	neg	x23, x8
LBB0_7:
Lloh19:
	adrp	x2, l_.str.5@PAGE
Lloh20:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	w0, #3
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	mov	x6, x23
	bl	_d_fnend
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(i2400m %p bcf %p bcf_len %zu)\n"

l_.str.1:                               ; @.str.1
	.asciz	"downloading section #%zu (@%zu %zu B) to 0x%08x\n"

	.comm	_I2400M_BRH_SIGNED_JUMP,8,3     ; @I2400M_BRH_SIGNED_JUMP
	.comm	_I2400M_BRH_JUMP,8,3            ; @I2400M_BRH_JUMP
l_.str.2:                               ; @.str.2
	.asciz	"jump found @%zu\n"

l_.str.3:                               ; @.str.3
	.asciz	"fw %s: bad section #%zu, end (@%zu) beyond EOF (@%zu)\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_I2400M_BM_CMD_RAW,4,2          ; @I2400M_BM_CMD_RAW
l_.str.5:                               ; @.str.5
	.asciz	"(i2400m %p bcf %p bcf_len %zu) = %d\n"

	.no_dead_strip	_i2400m_dnload_bcf
.subsections_via_symbols
