	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bfa_ioc_hw_sem_init
_bfa_ioc_hw_sem_init:                   ## @bfa_ioc_hw_sem_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_readl
	testb	$1, %al
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$20, %edi
	callq	_udelay
	movl	(%rbx), %edi
	jmp	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_bfa_ioc_get_cur_ioc_fwstate
	movq	_BFI_IOC_UNINIT@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_4
## %bb.7:
	movl	(%rbx), %esi
	movl	$1, %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_4:
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_bfa_nw_ioc_fwver_get
	movl	-24(%rbp), %edi
	callq	_swab32
	movq	_BFI_FWBOOT_TYPE_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_bfa_ioc_fwver_clear
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bfa_ioc_set_cur_ioc_fwstate
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bfa_ioc_set_alt_ioc_fwstate
	movl	4(%rbx), %edi
	callq	_readl
	movl	4(%rbx), %esi
	movl	$1, %edi
	callq	_writel
LBB0_6:
	movl	(%rbx), %esi
	movl	$1, %edi
	callq	_writel
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BFI_IOC_UNINIT,4,2             ## @BFI_IOC_UNINIT
	.comm	_BFI_FWBOOT_TYPE_NORMAL,8,3     ## @BFI_FWBOOT_TYPE_NORMAL
	.no_dead_strip	_bfa_ioc_hw_sem_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bfa_ioc_hw_sem_init
_bfa_ioc_hw_sem_init:                   ; @bfa_ioc_hw_sem_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0]
	bl	_readl
	tbz	w0, #0, LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_udelay
	ldr	w0, [x19]
	bl	_readl
	tbnz	w0, #0, LBB0_1
LBB0_2:
	mov	x0, x19
	bl	_bfa_ioc_get_cur_ioc_fwstate
Lloh0:
	adrp	x20, _BFI_IOC_UNINIT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BFI_IOC_UNINIT@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w1, [x19]
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_writel
LBB0_4:
	add	x1, sp, #8
	mov	x0, x19
	bl	_bfa_nw_ioc_fwver_get
	ldr	w0, [sp, #8]
	bl	_swab32
Lloh2:
	adrp	x8, _BFI_FWBOOT_TYPE_NORMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BFI_FWBOOT_TYPE_NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_bfa_ioc_fwver_clear
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bfa_ioc_set_cur_ioc_fwstate
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bfa_ioc_set_alt_ioc_fwstate
	ldr	w0, [x19, #4]
	bl	_readl
	ldr	w1, [x19, #4]
	mov	w0, #1
	bl	_writel
LBB0_6:
	ldr	w1, [x19]
	mov	w0, #1
	bl	_writel
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BFI_IOC_UNINIT,4,2             ; @BFI_IOC_UNINIT
	.comm	_BFI_FWBOOT_TYPE_NORMAL,8,3     ; @BFI_FWBOOT_TYPE_NORMAL
	.no_dead_strip	_bfa_ioc_hw_sem_init
.subsections_via_symbols
