	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnad_get_flash_partition_by_offset
_bnad_get_flash_partition_by_offset:    ## @bnad_get_flash_partition_by_offset
	.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	$40, %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, %r13
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)
	movq	$0, -72(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_init_completion
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	leaq	4(%rbx), %rdi
	movq	_bnad_cb_completion@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rcx
	movq	%r15, %rsi
	callq	_bfa_nw_flash_get_attr
	movq	%rax, %r14
	movq	_BFA_STATUS_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%rbx, %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	cmpq	%r12, %r14
	jne	LBB0_12
## %bb.2:
	leaq	-64(%rbp), %rdi
	callq	_wait_for_completion
	movq	-72(%rbp), %rax
	movq	_BFA_STATUS_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.3:
	movq	(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_11
## %bb.4:
	movq	8(%r15), %rcx
	addq	$16, %rcx
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	$24, %rcx
	decq	%rax
	je	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-16(%rcx), %rdx
	cmpq	%r13, %rdx
	jg	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-8(%rcx), %rsi
	addq	%rdx, %rsi
	cmpq	%r13, %rsi
	jle	LBB0_5
## %bb.8:
	movq	(%rcx), %rbx
	movq	%rdx, (%rdi)
	jmp	LBB0_12
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r15, %rdi
	callq	_kfree
LBB0_13:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_bnad_cb_completion,4,2         ## @bnad_cb_completion
	.comm	_BFA_STATUS_OK,8,3              ## @BFA_STATUS_OK
	.no_dead_strip	_bnad_get_flash_partition_by_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnad_get_flash_partition_by_offset
_bnad_get_flash_partition_by_offset:    ; @bnad_get_flash_partition_by_offset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	str	x22, [sp, #24]
	str	xzr, [sp, #8]
	add	x8, sp, #8
	add	x23, x8, #8
	mov	x0, x23
	bl	_init_completion
	mov	x0, x22
	mov	x1, #0
	bl	_spin_lock_irqsave
	add	x0, x22, #4
Lloh3:
	adrp	x8, _bnad_cb_completion@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bnad_cb_completion@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x1, x19
	bl	_bfa_nw_flash_get_attr
	mov	x24, x0
Lloh6:
	adrp	x25, _BFA_STATUS_OK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _BFA_STATUS_OK@GOTPAGEOFF]
	ldr	x26, [x25]
	mov	x0, x22
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	mov	x22, #0
	cmp	x24, x26
	b.ne	LBB0_11
; %bb.2:
	mov	x0, x23
	bl	_wait_for_completion
	ldr	x8, [sp, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.3:
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.4:
	ldr	x9, [x19, #8]
	add	x9, x9, #16
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #24
	subs	x8, x8, #1
	b.eq	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x10, [x9, #-16]
	cmp	x10, x21
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldur	x11, [x9, #-8]
	add	x11, x11, x10
	cmp	x11, x21
	b.le	LBB0_5
; %bb.8:
	ldr	x22, [x9]
	str	x10, [x20]
	b	LBB0_11
LBB0_9:
	mov	x22, #0
	b	LBB0_12
LBB0_10:
	mov	x22, #0
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_bnad_cb_completion,4,2         ; @bnad_cb_completion
	.comm	_BFA_STATUS_OK,8,3              ; @BFA_STATUS_OK
	.no_dead_strip	_bnad_get_flash_partition_by_offset
.subsections_via_symbols
