	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_eeprom_acquire_semaphore ## -- Begin function il4965_eeprom_acquire_semaphore
	.p2align	4, 0x90
_il4965_eeprom_acquire_semaphore:       ## @il4965_eeprom_acquire_semaphore
	.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	_EEPROM_SEM_RETRY_LIMIT@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	xorl	%ebx, %ebx
	movq	_CSR_HW_IF_CONFIG_REG@GOTPCREL(%rip), %r12
	movq	_CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM@GOTPCREL(%rip), %r13
	movq	_EEPROM_SEM_TIMEOUT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%r15, %rdi
	callq	_il_set_bit
	movl	(%r12), %esi
	movl	(%r13), %ecx
	movl	(%r14), %r8d
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	__il_poll_bit
	testl	%eax, %eax
	jns	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	_EEPROM_SEM_RETRY_LIMIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	jl	LBB0_4
	jmp	LBB0_5
LBB0_1:
                                        ## implicit-def: $eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EEPROM_SEM_RETRY_LIMIT,8,3     ## @EEPROM_SEM_RETRY_LIMIT
	.comm	_CSR_HW_IF_CONFIG_REG,4,2       ## @CSR_HW_IF_CONFIG_REG
	.comm	_CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM,4,2 ## @CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM
	.comm	_EEPROM_SEM_TIMEOUT,4,2         ## @EEPROM_SEM_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_eeprom_acquire_semaphore ; -- Begin function il4965_eeprom_acquire_semaphore
	.p2align	2
_il4965_eeprom_acquire_semaphore:       ; @il4965_eeprom_acquire_semaphore
	.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
Lloh0:
	adrp	x20, _EEPROM_SEM_RETRY_LIMIT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _EEPROM_SEM_RETRY_LIMIT@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x21, #0
Lloh2:
	adrp	x22, _CSR_HW_IF_CONFIG_REG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CSR_HW_IF_CONFIG_REG@GOTPAGEOFF]
Lloh4:
	adrp	x23, _CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM@GOTPAGEOFF]
Lloh6:
	adrp	x24, _EEPROM_SEM_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x24, [x24, _EEPROM_SEM_TIMEOUT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_il_set_bit
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w4, [x24]
	mov	x0, x19
	mov	x3, x2
	bl	__il_poll_bit
	tbz	w0, #31, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldr	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
                                        ; implicit-def: $w0
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EEPROM_SEM_RETRY_LIMIT,8,3     ; @EEPROM_SEM_RETRY_LIMIT
	.comm	_CSR_HW_IF_CONFIG_REG,4,2       ; @CSR_HW_IF_CONFIG_REG
	.comm	_CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM,4,2 ; @CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM
	.comm	_EEPROM_SEM_TIMEOUT,4,2         ; @EEPROM_SEM_TIMEOUT
.subsections_via_symbols
