	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_chip
_get_chip:                              ## @get_chip
	.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
	movl	%ecx, %ebx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	leaq	20(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	24(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, (%rax)
	leaq	8(%r13), %rax
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, (%rax)
	movq	%r13, %rdi
	callq	_mutex_unlock
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	callq	_chip_ready
	movl	%eax, %r12d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_24
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %r13
	testq	%r13, %r13
	je	LBB0_23
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_FL_WRITING@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_FL_ERASING@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_FL_OTP_WRITE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_FL_SHUTDOWN@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_23
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_FL_SYNCING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_23
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	16(%r13), %r14
	testq	%r14, %r14
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r15, %r14
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	20(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_trylock
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	8(%r14), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%ebx, %ecx
	callq	_chip_ready
	movl	%eax, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_lock
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	_FL_SYNCING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_put_chip
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_1
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	16(%r13), %rax
	movq	_FL_ERASING@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jne	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%ebx, 16(%rcx)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	_wait@GOTPCREL(%rip), %r14
	movq	%r14, %rsi
	callq	_add_wait_queue
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_schedule
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_remove_wait_queue
	movq	%r12, %rdi
	callq	_mutex_lock
	jmp	LBB0_1
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_24:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_FL_WRITING,4,2                 ## @FL_WRITING
	.comm	_FL_ERASING,4,2                 ## @FL_ERASING
	.comm	_FL_OTP_WRITE,4,2               ## @FL_OTP_WRITE
	.comm	_FL_SHUTDOWN,4,2                ## @FL_SHUTDOWN
	.comm	_FL_SYNCING,8,3                 ## @FL_SYNCING
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.no_dead_strip	_get_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_chip
_get_chip:                              ; @get_chip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _current@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_DECLARE_WAITQUEUE
	add	x9, x21, #20
	add	x8, x21, #24
	stp	x8, x9, [sp, #8]                ; 16-byte Folded Spill
Lloh6:
	adrp	x25, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EAGAIN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
Lloh8:
	adrp	x27, _FL_WRITING@GOTPAGE
Lloh9:
	ldr	x27, [x27, _FL_WRITING@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	x21, [x24]
	mov	x24, x8
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	str	x21, [x24]
	mov	x0, x26
	bl	_mutex_unlock
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_chip_ready
	ldr	w8, [x25]
	cmn	w0, w8
	b.ne	LBB0_20
LBB0_5:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x26, [x21, #32]
	cbz	x26, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x27]
Lloh10:
	adrp	x9, _FL_ERASING@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FL_ERASING@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _FL_OTP_WRITE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _FL_OTP_WRITE@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
Lloh16:
	adrp	x11, _FL_SHUTDOWN@GOTPAGE
Lloh17:
	ldr	x11, [x11, _FL_SHUTDOWN@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	ccmp	w10, w19, #4, ne
	ccmp	w11, w19, #4, ne
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x8, [x21]
Lloh19:
	adrp	x9, _FL_SYNCING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FL_SYNCING@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x26
	bl	_mutex_lock
	mov	x24, x26
	ldr	x28, [x24, #16]!
	cmp	x28, #0
	ccmp	x28, x21, #4, ne
	b.ne	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
Lloh22:
	adrp	x8, _FL_ERASING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FL_ERASING@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	x8, x26
	ldr	x9, [x8, #8]!
	cbz	x9, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=2
	ldr	w9, [x9, #16]
	cmp	w9, w19
	b.ne	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x26
	bl	_mutex_unlock
Lloh25:
	adrp	x8, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_set_current_state
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x26
Lloh28:
	adrp	x23, _wait@GOTPAGE
Lloh29:
	ldr	x23, [x23, _wait@GOTPAGEOFF]
	mov	x1, x23
	bl	_add_wait_queue
	ldr	x24, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x24
	bl	_mutex_unlock
	bl	_schedule
	mov	x0, x26
	mov	x1, x23
	bl	_remove_wait_queue
	mov	x0, x24
	bl	_mutex_lock
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x0, x28, #20
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	bl	_mutex_trylock
	mov	x23, x0
	mov	x0, x26
	bl	_mutex_unlock
	cbz	w23, LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=2
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x27
	bl	_mutex_unlock
	ldr	x2, [x28, #8]
	mov	x0, x22
	mov	x1, x28
	mov	x3, x19
	bl	_chip_ready
	mov	x23, x0
	mov	x0, x27
	bl	_mutex_lock
	ldr	w8, [x25]
	cmn	w23, w8
	b.eq	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=2
	cbnz	w23, LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x26
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh30:
	adrp	x9, _FL_SYNCING@GOTPAGE
Lloh31:
	ldr	x9, [x9, _FL_SYNCING@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=2
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_mutex_unlock
Lloh33:
	adrp	x27, _FL_WRITING@GOTPAGE
Lloh34:
	ldr	x27, [x27, _FL_WRITING@GOTPAGEOFF]
	b	LBB0_9
LBB0_18:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x2, [x28, #8]
	mov	x0, x22
	mov	x1, x28
	bl	_put_chip
LBB0_19:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_mutex_unlock
	b	LBB0_1
LBB0_20:
	mov	x23, x0
LBB0_21:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_mutex_unlock
	b	LBB0_21
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_FL_WRITING,4,2                 ; @FL_WRITING
	.comm	_FL_ERASING,4,2                 ; @FL_ERASING
	.comm	_FL_OTP_WRITE,4,2               ; @FL_OTP_WRITE
	.comm	_FL_SHUTDOWN,4,2                ; @FL_SHUTDOWN
	.comm	_FL_SYNCING,8,3                 ; @FL_SYNCING
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.no_dead_strip	_get_chip
.subsections_via_symbols
