	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dcn20_setup_gsl_group_as_lock  ## -- Begin function dcn20_setup_gsl_group_as_lock
	.p2align	4, 0x90
_dcn20_setup_gsl_group_as_lock:         ## @dcn20_setup_gsl_group_as_lock
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	(%r15), %ebx
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.1:
	testl	%ebx, %ebx
	jg	LBB0_21
## %bb.2:
	movq	%r12, %rdi
	callq	_find_free_gsl_group
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_ASSERT
	movl	%ebx, (%r15)
	cmpl	$3, %ebx
	je	LBB0_6
## %bb.3:
	cmpl	$2, %ebx
	je	LBB0_7
## %bb.4:
	cmpl	$1, %ebx
	jne	LBB0_20
## %bb.5:
	movl	$1, -48(%rbp)
	movq	(%r12), %rax
	jmp	LBB0_8
LBB0_9:
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.10:
	movl	$0, (%r15)
	cmpl	$3, %ebx
	je	LBB0_14
## %bb.11:
	cmpl	$2, %ebx
	je	LBB0_15
## %bb.12:
	cmpl	$1, %ebx
	jne	LBB0_20
## %bb.13:
	movl	$0, -48(%rbp)
	movq	(%r12), %rax
	jmp	LBB0_16
LBB0_6:
	movl	$1, -40(%rbp)
	movq	(%r12), %rax
	addq	$8, %rax
	jmp	LBB0_8
LBB0_7:
	movl	$1, -44(%rbp)
	movq	(%r12), %rax
	addq	$4, %rax
LBB0_8:
	movl	$1, (%rax)
	movl	$1, %eax
	jmp	LBB0_17
LBB0_14:
	movl	$0, -40(%rbp)
	movq	(%r12), %rax
	addq	$8, %rax
	jmp	LBB0_16
LBB0_15:
	movl	$0, -44(%rbp)
	movq	(%r12), %rax
	addq	$4, %rax
LBB0_16:
	movl	$0, (%rax)
	xorl	%eax, %eax
LBB0_17:
	movl	%eax, -36(%rbp)
	movq	8(%r15), %rdi
	movq	(%rdi), %rcx
	movq	8(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	cmpq	$0, (%rcx)
	je	LBB0_20
## %bb.19:
	xorl	%r12d, %r12d
	testl	%r14d, %r14d
	setne	%r12b
	leaq	-48(%rbp), %rsi
	callq	*%rax
	movq	8(%r15), %rdi
	movq	(%rdi), %rax
	shll	$2, %r12d
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	*(%rax)
	jmp	LBB0_21
LBB0_20:
	xorl	%eax, %eax
	callq	_BREAK_TO_DEBUGGER
LBB0_21:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dcn20_setup_gsl_group_as_lock  ; -- Begin function dcn20_setup_gsl_group_as_lock
	.p2align	2
_dcn20_setup_gsl_group_as_lock:         ; @dcn20_setup_gsl_group_as_lock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w21, [x19]
	cbz	w20, LBB0_6
; %bb.1:
	cmp	w21, #0
	b.gt	LBB0_21
; %bb.2:
	mov	x0, x22
	bl	_find_free_gsl_group
	mov	x21, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_ASSERT
	str	w21, [x19]
	cmp	w21, #3
	b.eq	LBB0_11
; %bb.3:
	cmp	w21, #2
	b.eq	LBB0_12
; %bb.4:
	cmp	w21, #1
	b.ne	LBB0_20
; %bb.5:
	mov	w8, #1
	str	w8, [sp]
	ldr	x8, [x22]
	b	LBB0_13
LBB0_6:
	cbz	w21, LBB0_21
; %bb.7:
	str	wzr, [x19]
	cmp	w21, #3
	b.eq	LBB0_14
; %bb.8:
	cmp	w21, #2
	b.eq	LBB0_15
; %bb.9:
	cmp	w21, #1
	b.ne	LBB0_20
; %bb.10:
	str	wzr, [sp]
	ldr	x8, [x22]
	b	LBB0_16
LBB0_11:
	mov	w8, #1
	str	w8, [sp, #8]
	ldr	x8, [x22]
	add	x8, x8, #8
	b	LBB0_13
LBB0_12:
	mov	w8, #1
	str	w8, [sp, #4]
	ldr	x8, [x22]
	add	x8, x8, #4
LBB0_13:
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_17
LBB0_14:
	str	wzr, [sp, #8]
	ldr	x8, [x22]
	add	x8, x8, #8
	b	LBB0_16
LBB0_15:
	str	wzr, [sp, #4]
	ldr	x8, [x22]
	add	x8, x8, #4
LBB0_16:
	mov	w9, #0
	str	wzr, [x8]
LBB0_17:
	str	w9, [sp, #12]
	ldr	x0, [x19, #8]
	ldr	x9, [x0]
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_20
; %bb.18:
	ldr	x9, [x9]
	cbz	x9, LBB0_20
; %bb.19:
	cmp	w20, #0
	cset	w20, ne
	mov	x1, sp
	blr	x8
	ldr	x0, [x19, #8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	lsl	w2, w20, #2
	mov	x1, x21
	blr	x8
	b	LBB0_21
LBB0_20:
	bl	_BREAK_TO_DEBUGGER
LBB0_21:
	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
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
