	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igc_get_hw_semaphore_i225
_igc_get_hw_semaphore_i225:             ## @igc_get_hw_semaphore_i225
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	leaq	1(%r12), %r13
	xorl	%ebx, %ebx
	testq	%r12, %r12
	js	LBB0_1
## %bb.5:
	movq	_IGC_SWSM@GOTPCREL(%rip), %r14
	movq	_IGC_SWSM_SMBI@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_rd32
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$600, %esi                      ## imm = 0x258
	callq	_usleep_range
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	cmpq	%r13, %rbx
	jne	LBB0_2
LBB0_8:
	leaq	L_.str(%rip), %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$0, (%rdi)
	je	LBB0_20
## %bb.9:
	movl	$0, (%rdi)
	callq	_igc_put_hw_semaphore
	xorl	%ebx, %ebx
	testq	%r12, %r12
	js	LBB0_10
## %bb.11:
	movq	_IGC_SWSM@GOTPCREL(%rip), %r15
	movq	_IGC_SWSM_SMBI@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_rd32
	testl	%eax, (%r14)
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$600, %esi                      ## imm = 0x258
	callq	_usleep_range
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_12
## %bb.15:
	leaq	L_.str(%rip), %r14
	jmp	LBB0_20
LBB0_13:
	leaq	L_.str(%rip), %r14
LBB0_10:
	cmpq	%r13, %rbx
	je	LBB0_20
LBB0_2:
	xorl	%ebx, %ebx
	testq	%r12, %r12
	js	LBB0_3
## %bb.16:
	movq	_IGC_SWSM@GOTPCREL(%rip), %r14
	movq	_IGC_SWSM_SWESMBI@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_rd32
	movl	(%r14), %edi
	orl	(%r12), %eax
	movl	%eax, %esi
	callq	_wr32
	movl	(%r14), %edi
	callq	_rd32
	testl	%eax, (%r12)
	jne	LBB0_3
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$600, %esi                      ## imm = 0x258
	callq	_usleep_range
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_17
	jmp	LBB0_19
LBB0_3:
	cmpq	%r13, %rbx
	jne	LBB0_4
LBB0_19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_igc_put_hw_semaphore
	leaq	L_.str.1(%rip), %r14
LBB0_20:
	movq	%r14, %rdi
	callq	_hw_dbg
	movq	_IGC_ERR_NVM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_IGC_SWSM,4,2                   ## @IGC_SWSM
	.comm	_IGC_SWSM_SMBI,4,2              ## @IGC_SWSM_SMBI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Driver can't access device - SMBI bit is set.\n"

	.comm	_IGC_ERR_NVM,8,3                ## @IGC_ERR_NVM
	.comm	_IGC_SWSM_SWESMBI,4,2           ## @IGC_SWSM_SWESMBI
L_.str.1:                               ## @.str.1
	.asciz	"Driver can't access the NVM\n"

	.no_dead_strip	_igc_get_hw_semaphore_i225
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igc_get_hw_semaphore_i225
_igc_get_hw_semaphore_i225:             ; @igc_get_hw_semaphore_i225
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x22, [x0, #8]
	add	x21, x22, #1
	mov	x20, #0
	tbnz	x22, #63, LBB0_4
; %bb.1:
Lloh0:
	adrp	x23, _IGC_SWSM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IGC_SWSM@GOTPAGEOFF]
Lloh2:
	adrp	x24, _IGC_SWSM_SMBI@GOTPAGE
Lloh3:
	ldr	x24, [x24, _IGC_SWSM_SMBI@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_rd32
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #500
	mov	w1, #600
	bl	_usleep_range
	add	x20, x20, #1
	cmp	x21, x20
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	cmp	x20, x21
	b.ne	LBB0_12
LBB0_5:
	ldr	w8, [x19]
	cbz	w8, LBB0_11
; %bb.6:
	str	wzr, [x19]
	mov	x0, x19
	bl	_igc_put_hw_semaphore
	mov	x23, #0
	tbnz	x22, #63, LBB0_10
; %bb.7:
	add	x24, x22, #1
Lloh4:
	adrp	x25, _IGC_SWSM@GOTPAGE
Lloh5:
	ldr	x25, [x25, _IGC_SWSM@GOTPAGEOFF]
Lloh6:
	adrp	x26, _IGC_SWSM_SMBI@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IGC_SWSM_SMBI@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	bl	_rd32
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #500
	mov	w1, #600
	bl	_usleep_range
	add	x23, x23, #1
	cmp	x24, x23
	b.ne	LBB0_8
	b	LBB0_18
LBB0_10:
	cmp	x23, x21
	b.ne	LBB0_12
LBB0_11:
Lloh10:
	adrp	x20, l_.str@PAGE
Lloh11:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_18
LBB0_12:
	mov	x20, #0
	tbnz	x22, #63, LBB0_16
; %bb.13:
	add	x22, x22, #1
Lloh12:
	adrp	x23, _IGC_SWSM@GOTPAGE
Lloh13:
	ldr	x23, [x23, _IGC_SWSM@GOTPAGEOFF]
Lloh14:
	adrp	x24, _IGC_SWSM_SWESMBI@GOTPAGE
Lloh15:
	ldr	x24, [x24, _IGC_SWSM_SWESMBI@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_rd32
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w1, w9, w0
	mov	x0, x8
	bl	_wr32
	ldr	w0, [x23]
	bl	_rd32
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	w0, #500
	mov	w1, #600
	bl	_usleep_range
	add	x20, x20, #1
	cmp	x22, x20
	b.ne	LBB0_14
	b	LBB0_17
LBB0_16:
	cmp	x20, x21
	b.ne	LBB0_20
LBB0_17:
	mov	x0, x19
	bl	_igc_put_hw_semaphore
Lloh16:
	adrp	x20, l_.str.1@PAGE
Lloh17:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_18:
	mov	x0, x20
	bl	_hw_dbg
Lloh18:
	adrp	x8, _IGC_ERR_NVM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IGC_ERR_NVM@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_19:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	x0, #0
	b	LBB0_19
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IGC_SWSM,4,2                   ; @IGC_SWSM
	.comm	_IGC_SWSM_SMBI,4,2              ; @IGC_SWSM_SMBI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Driver can't access device - SMBI bit is set.\n"

	.comm	_IGC_ERR_NVM,8,3                ; @IGC_ERR_NVM
	.comm	_IGC_SWSM_SWESMBI,4,2           ; @IGC_SWSM_SWESMBI
l_.str.1:                               ; @.str.1
	.asciz	"Driver can't access the NVM\n"

	.no_dead_strip	_igc_get_hw_semaphore_i225
.subsections_via_symbols
