	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_lock_objects
_submit_lock_objects:                   ## @submit_lock_objects
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movl	$-1, %esi
	xorl	%ebx, %ebx
	movq	_BO_LOCKED@GOTPCREL(%rip), %rdi
	movl	$-1, %r12d
	jmp	LBB0_2
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_BO_LOCKED@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ecx
	movq	8(%r13), %rax
	orl	%ecx, (%rax,%r14)
	movl	(%r13), %ecx
	movl	$-1, %esi
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%ecx, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movl	%r12d, %edx
	cmpq	%rdx, %rbx
	cmovel	%esi, %r12d
	movq	%rbx, %r14
	shlq	$4, %r14
	movl	(%rdi), %edx
	testl	%edx, (%rax,%r14)
	jne	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax,%r14), %rax
	movq	(%rax), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ww_mutex_lock_interruptible
	movl	%eax, %r15d
	movq	_EALREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_ERROR
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	movl	%ebx, %r14d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_submit_unlock_object
	leal	-1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jg	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_submit_unlock_object
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_EDEADLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rax
	shlq	$4, %r14
	movq	8(%rax,%r14), %rax
	movq	(%rax), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ww_mutex_lock_slow_interruptible
	testl	%eax, %eax
	jne	LBB0_12
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_BO_LOCKED@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ecx
	movq	8(%r13), %rax
	orl	%ecx, (%rax,%r14)
	movl	(%r13), %ecx
	movl	$0, %ebx
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	testl	%ecx, %ecx
	movl	$-1, %esi
	jg	LBB0_2
LBB0_15:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ww_acquire_done
	xorl	%r15d, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%eax, %r15d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_BO_LOCKED,4,2                  ## @BO_LOCKED
	.comm	_EALREADY,4,2                   ## @EALREADY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BO at index %u already on submit list\n"

	.comm	_EDEADLK,4,2                    ## @EDEADLK
	.no_dead_strip	_submit_lock_objects
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_lock_objects
_submit_lock_objects:                   ; @submit_lock_objects
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x20, x0
	mov	x23, #0
	ldr	x8, [x0, #8]
	mov	w22, #-1
Lloh0:
	adrp	x25, _BO_LOCKED@GOTPAGE
Lloh1:
	ldr	x25, [x25, _BO_LOCKED@GOTPAGEOFF]
Lloh2:
	adrp	x26, _EALREADY@GOTPAGE
Lloh3:
	ldr	x26, [x26, _EALREADY@GOTPAGEOFF]
Lloh4:
	adrp	x27, _EDEADLK@GOTPAGE
Lloh5:
	ldr	x27, [x27, _EDEADLK@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x25]
	ldr	x8, [x20, #8]
	ldr	w10, [x8, x21]
	orr	w9, w10, w9
	str	w9, [x8, x21]
	ldr	w9, [x20]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	cmp	x23, w9, sxtw
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	x23, w22, uxtw
	csinv	w22, w22, wzr, ne
	lsl	x21, x23, #4
	ldr	w10, [x8, x21]
	ldr	w11, [x25]
	tst	w11, w10
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, x23, lsl #4
	ldr	x8, [x8, #8]
	ldr	x0, [x8]
	mov	x1, x19
	bl	_ww_mutex_lock_interruptible
	mov	x24, x0
	ldr	w8, [x26]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_DRM_ERROR
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w24, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x23
	and	x21, x23, #0xffffffff
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	mov	x1, x23
	bl	_submit_unlock_object
	sub	w8, w23, #1
	cmp	w23, #0
	mov	x23, x8
	b.gt	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w22, #1
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_submit_unlock_object
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	cmn	w24, w8
	b.ne	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x21, lsl #4
	ldr	x8, [x8, #8]
	ldr	x0, [x8]
	mov	x1, x19
	bl	_ww_mutex_lock_slow_interruptible
	cbnz	w0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
	ldr	w9, [x25]
	ldr	x8, [x20, #8]
	lsl	x10, x21, #4
	ldr	w11, [x8, x10]
	orr	w9, w11, w9
	str	w9, [x8, x10]
	ldr	w9, [x20]
	mov	x22, x28
	cmp	w9, #0
	b.gt	LBB0_4
LBB0_15:
	mov	x0, x19
	bl	_ww_acquire_done
	mov	w24, #0
LBB0_16:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	x24, x0
	b	LBB0_16
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BO_LOCKED,4,2                  ; @BO_LOCKED
	.comm	_EALREADY,4,2                   ; @EALREADY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BO at index %u already on submit list\n"

	.comm	_EDEADLK,4,2                    ; @EDEADLK
	.no_dead_strip	_submit_lock_objects
.subsections_via_symbols
