	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msc_win_set_lockout
_msc_win_set_lockout:                   ## @msc_win_set_lockout
	.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	8(%rdi), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_4
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %r12d
	cmpl	%r13d, %r12d
	jne	LBB0_5
## %bb.2:
	movl	%r14d, (%rbx)
	movq	_WIN_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r14d, %eax
	jne	LBB0_9
## %bb.3:
	movq	8(%rbx), %rdi
	callq	_atomic_inc
	jmp	LBB0_11
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_5:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	8(%rbx), %rdi
	callq	_msc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_dev_warn_ratelimited
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.6:
	movq	_WIN_READY@GOTPCREL(%rip), %rcx
	movq	_WIN_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r13d, (%rcx)
	jne	LBB0_15
## %bb.7:
	cmpl	%eax, %r12d
	jne	LBB0_15
## %bb.8:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_9:
	cmpl	%r13d, %eax
	jne	LBB0_11
## %bb.10:
	movq	8(%rbx), %rdi
	callq	_atomic_dec
LBB0_11:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_12:
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	negl	%r14d
	cmpl	%r13d, %eax
	jne	LBB0_13
## %bb.16:
	xorl	%eax, %eax
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	je	LBB0_14
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"expected lockout state %d, got %d\n"

	.comm	_WIN_LOCKED,4,2                 ## @WIN_LOCKED
	.comm	_WIN_READY,4,2                  ## @WIN_READY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_msc_win_set_lockout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msc_win_set_lockout
_msc_win_set_lockout:                   ; @msc_win_set_lockout
	.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
	ldr	x8, [x0, #8]
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x23, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w22, [x23]
	cmp	w22, w19
	b.ne	LBB0_4
; %bb.2:
	str	w21, [x23]
Lloh0:
	adrp	x8, _WIN_LOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIN_LOCKED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_8
; %bb.3:
	ldr	x0, [x23, #8]
	bl	_atomic_inc
	b	LBB0_10
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	ldr	x0, [x23, #8]
	bl	_msc_dev
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x22
	bl	_dev_warn_ratelimited
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	cbz	w24, LBB0_11
; %bb.5:
Lloh8:
	adrp	x8, _WIN_READY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WIN_READY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
Lloh11:
	adrp	x8, _WIN_LOCKED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WIN_LOCKED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w9, w19
	ccmp	w22, w8, #0, eq
	b.eq	LBB0_13
; %bb.6:
	cmp	w8, w19
	ccmp	w22, w21, #0, eq
	b.eq	LBB0_11
; %bb.7:
	neg	w0, w24
	b	LBB0_12
LBB0_8:
	cmp	w8, w19
	b.ne	LBB0_10
; %bb.9:
	ldr	x0, [x23, #8]
	bl	_atomic_dec
LBB0_10:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
LBB0_13:
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"expected lockout state %d, got %d\n"

	.comm	_WIN_LOCKED,4,2                 ; @WIN_LOCKED
	.comm	_WIN_READY,4,2                  ; @WIN_READY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_msc_win_set_lockout
.subsections_via_symbols
