	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_object_idr
_fill_object_idr:                       ## @fill_object_idr
	.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
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	(%rsi), %edi
	callq	_READ_ONCE
	movl	%eax, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r13
	movl	%ebx, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	jle	LBB0_10
## %bb.2:
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r14,4), %edx
	movq	_DRM_MODE_OBJECT_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_drm_mode_object_find
	movq	%rax, (%r13,%r14,8)
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax), %rdi
	callq	_drm_mode_object_lease_required
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	cmpq	%r14, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.12:
	movq	%r12, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rdx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_validate_lease
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.14:
	xorl	%r12d, %r12d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%r12
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_26
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r12,8), %r15
	movl	8(%r15), %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_LEASE
	leal	1(%rbx), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	_drm_lease_idr_object@GOTPCREL(%rip), %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	callq	_idr_alloc
	testl	%eax, %eax
	js	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r15), %rax
	movq	_DRM_MODE_OBJECT_CRTC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r15, %rdi
	callq	_obj_to_crtc
	movq	%rax, %r15
	movq	8(%rax), %rax
	movl	(%rax), %edx
	leal	1(%rdx), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	_drm_lease_idr_object@GOTPCREL(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_idr_alloc
	testl	%eax, %eax
	js	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%rax), %edx
	leal	1(%rdx), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	_drm_lease_idr_object@GOTPCREL(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_idr_alloc
	testl	%eax, %eax
	jns	LBB0_25
## %bb.24:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_17
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_33
LBB0_10:
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	movl	%r14d, %ecx
	callq	_validate_lease
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_11
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_LEASE
	jmp	LBB0_27
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_27:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_32
## %bb.28:
	xorl	%ebx, %ebx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_29 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_32
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	callq	_drm_mode_object_put
	jmp	LBB0_31
LBB0_11:
	xorl	%r14d, %r14d
LBB0_32:
	movq	%r13, %rdi
	callq	_kfree
LBB0_33:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_17
LBB0_26:
	xorl	%r14d, %r14d
	jmp	LBB0_27
LBB0_21:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rdi
LBB0_17:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_LEASE
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRM_MODE_OBJECT_ANY,4,2        ## @DRM_MODE_OBJECT_ANY
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid object for lease\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"lease validation failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"Adding object %d to lease\n"

	.comm	_drm_lease_idr_object,4,2       ## @drm_lease_idr_object
L_.str.3:                               ## @.str.3
	.asciz	"Object %d cannot be inserted into leases (%d)\n"

	.comm	_DRM_MODE_OBJECT_CRTC,8,3       ## @DRM_MODE_OBJECT_CRTC
L_.str.4:                               ## @.str.4
	.asciz	"Object primary plane %d cannot be inserted into leases (%d)\n"

L_.str.5:                               ## @.str.5
	.asciz	"Object cursor plane %d cannot be inserted into leases (%d)\n"

	.no_dead_strip	_fill_object_idr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_object_idr
_fill_object_idr:                       ; @fill_object_idr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x24, x4
	mov	x20, x3
	mov	x21, x2
	mov	x25, x1
	mov	x23, x0
	ldr	w0, [x1]
	bl	_READ_ONCE
	mov	x27, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x22, x0
	mov	w28, w20
	cmp	w20, #1
	b.lt	LBB0_16
; %bb.2:
	mov	x19, #0
Lloh3:
	adrp	x26, _DRM_MODE_OBJECT_ANY@GOTPAGE
Lloh4:
	ldr	x26, [x26, _DRM_MODE_OBJECT_ANY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24, x19, lsl #2]
	ldr	w3, [x26]
	mov	x0, x23
	mov	x1, x25
	bl	_drm_mode_object_find
	str	x0, [x22, x19, lsl #3]
	cbz	x0, LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x0]
	bl	_drm_mode_object_lease_required
	cbz	w0, LBB0_19
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #1
	cmp	x28, x19
	b.ne	LBB0_3
; %bb.6:
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	mov	x3, x27
	bl	_validate_lease
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.7:
	mov	x24, x27
	mov	x25, x28
	mov	x19, x22
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x19, x19, #8
	subs	x25, x25, #1
	b.eq	LBB0_29
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x19]
	ldr	w26, [x27, #8]
	str	x26, [sp]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	add	w3, w26, #1
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w4, [x8]
	mov	x0, x21
Lloh10:
	adrp	x1, _drm_lease_idr_object@GOTPAGE
Lloh11:
	ldr	x1, [x1, _drm_lease_idr_object@GOTPAGEOFF]
	mov	x2, x26
	bl	_idr_alloc
	tbnz	w0, #31, LBB0_28
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x27]
Lloh12:
	adrp	x9, _DRM_MODE_OBJECT_CRTC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DRM_MODE_OBJECT_CRTC@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w24, #0, #0, eq
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x27
	bl	_obj_to_crtc
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	w2, [x8]
	add	w3, w2, #1
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	mov	x0, x21
Lloh18:
	adrp	x1, _drm_lease_idr_object@GOTPAGE
Lloh19:
	ldr	x1, [x1, _drm_lease_idr_object@GOTPAGEOFF]
	bl	_idr_alloc
	tbnz	w0, #31, LBB0_30
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w2, [x8]
	add	w3, w2, #1
Lloh20:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
	mov	x0, x21
Lloh23:
	adrp	x1, _drm_lease_idr_object@GOTPAGE
Lloh24:
	ldr	x1, [x1, _drm_lease_idr_object@GOTPAGEOFF]
	bl	_idr_alloc
	tbz	w0, #31, LBB0_8
; %bb.14:
	mov	x23, x0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	stp	x26, x23, [sp]
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG_LEASE
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	b	LBB0_21
LBB0_15:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_27
LBB0_16:
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	mov	x3, x27
	bl	_validate_lease
	mov	x23, x0
	cbz	w0, LBB0_26
LBB0_17:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	b	LBB0_21
LBB0_18:
Lloh32:
	adrp	x8, _ENOENT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh36:
	adrp	x8, _EINVAL@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_21:
	cmp	w20, #1
	b.lt	LBB0_26
; %bb.22:
	mov	x19, x22
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x19, x19, #8
	subs	x28, x28, #1
	b.eq	LBB0_26
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	cbz	x0, LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	bl	_drm_mode_object_put
	b	LBB0_23
LBB0_26:
	mov	x0, x22
	bl	_kfree
LBB0_27:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_28:
	mov	x23, x0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	stp	x26, x23, [sp]
Lloh38:
	adrp	x0, l_.str.3@PAGE
Lloh39:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	b	LBB0_21
LBB0_29:
	mov	w23, #0
	b	LBB0_21
LBB0_30:
	mov	x27, x0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	stp	x26, x27, [sp]
Lloh40:
	adrp	x0, l_.str.4@PAGE
Lloh41:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	mov	x23, x27
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRM_MODE_OBJECT_ANY,4,2        ; @DRM_MODE_OBJECT_ANY
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid object for lease\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"lease validation failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"Adding object %d to lease\n"

	.comm	_drm_lease_idr_object,4,2       ; @drm_lease_idr_object
l_.str.3:                               ; @.str.3
	.asciz	"Object %d cannot be inserted into leases (%d)\n"

	.comm	_DRM_MODE_OBJECT_CRTC,8,3       ; @DRM_MODE_OBJECT_CRTC
l_.str.4:                               ; @.str.4
	.asciz	"Object primary plane %d cannot be inserted into leases (%d)\n"

l_.str.5:                               ; @.str.5
	.asciz	"Object cursor plane %d cannot be inserted into leases (%d)\n"

	.no_dead_strip	_fill_object_idr
.subsections_via_symbols
