	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function obtain_firmware
_obtain_firmware:                       ## @obtain_firmware
	.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	_fw_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %r15
	movl	$40000, %edi                    ## imm = 0x9C40
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	_fw_state@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_FW_TRY@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_5
## %bb.1:
	addq	%r15, %rbx
	movq	_fw_mutex@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	$20, %edi
	callq	_msleep
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	cmpq	(%r14), %rax
	je	LBB0_2
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dd_dev_err
	movq	_FW_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	movq	_fw_err@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx)
LBB0_5:
	movq	_FW_EMPTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	___obtain_firmware
LBB0_7:
	movq	_fw_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_fw_err@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fw_mutex,4,2                   ## @fw_mutex
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_fw_state,8,3                   ## @fw_state
	.comm	_FW_TRY,8,3                     ## @FW_TRY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout waiting for firmware try"

	.comm	_FW_ERR,8,3                     ## @FW_ERR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_fw_err,4,2                     ## @fw_err
	.comm	_FW_EMPTY,8,3                   ## @FW_EMPTY
	.no_dead_strip	_obtain_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function obtain_firmware
_obtain_firmware:                       ; @obtain_firmware
	.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
Lloh0:
	adrp	x0, _fw_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _fw_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x24, _jiffies@GOTPAGE
Lloh3:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x20, [x24]
	mov	w0, #40000
	bl	_msecs_to_jiffies
Lloh4:
	adrp	x23, _fw_state@GOTPAGE
Lloh5:
	ldr	x23, [x23, _fw_state@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh6:
	adrp	x25, _FW_TRY@GOTPAGE
Lloh7:
	ldr	x25, [x25, _FW_TRY@GOTPAGEOFF]
	ldr	x9, [x25]
Lloh8:
	adrp	x22, _fw_err@GOTPAGE
Lloh9:
	ldr	x22, [x22, _fw_err@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	add	x20, x0, x20
Lloh10:
	adrp	x21, _fw_mutex@GOTPAGE
Lloh11:
	ldr	x21, [x21, _fw_mutex@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #20
	bl	_msleep
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x23]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_2
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_err
Lloh14:
	adrp	x8, _FW_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FW_ERR@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x23]
Lloh17:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	neg	w9, w9
	str	w9, [x22]
LBB0_5:
Lloh20:
	adrp	x9, _FW_EMPTY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _FW_EMPTY@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	___obtain_firmware
LBB0_7:
Lloh23:
	adrp	x0, _fw_mutex@GOTPAGE
Lloh24:
	ldr	x0, [x0, _fw_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x22]
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_fw_mutex,4,2                   ; @fw_mutex
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_fw_state,8,3                   ; @fw_state
	.comm	_FW_TRY,8,3                     ; @FW_TRY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout waiting for firmware try"

	.comm	_FW_ERR,8,3                     ; @FW_ERR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_fw_err,4,2                     ; @fw_err
	.comm	_FW_EMPTY,8,3                   ; @FW_EMPTY
	.no_dead_strip	_obtain_firmware
.subsections_via_symbols
