	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_get_capsets
_virtio_gpu_get_capsets:                ## @virtio_gpu_get_capsets
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%esi, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_6
## %bb.2:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	shlq	$4, %r13
	xorl	%r14d, %r14d
	movq	_HZ@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_virtio_gpu_cmd_get_capset_info
	movq	8(%r15), %rax
	xorl	%esi, %esi
	cmpq	$0, (%rax,%r14)
	movl	16(%r15), %edi
	setg	%sil
	movl	(%r12), %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_timeout
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r14), %rdx
	movl	12(%rax,%r14), %ecx
	movl	8(%rax,%r14), %r8d
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_DRM_INFO
	incl	%ebx
	addq	$16, %r14
	cmpq	%r14, %r13
	jne	LBB0_3
LBB0_6:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	8(%r15), %rdi
	callq	_kfree
	movq	$0, 8(%r15)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate cap sets\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"timed out waiting for cap set %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"cap set %d: id %d, max-version %d, max-size %d\n"

	.no_dead_strip	_virtio_gpu_get_capsets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtio_gpu_get_capsets
_virtio_gpu_get_capsets:                ; @virtio_gpu_get_capsets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.1:
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x23, #0
	mov	w21, #0
	mov	w8, w20
	lsl	x24, x8, #4
Lloh3:
	adrp	x25, _HZ@GOTPAGE
Lloh4:
	ldr	x25, [x25, _HZ@GOTPAGEOFF]
Lloh5:
	adrp	x22, l_.str.2@PAGE
Lloh6:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_virtio_gpu_cmd_get_capset_info
	ldr	w0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x23]
	cmp	x8, #0
	cset	w1, gt
	ldr	w8, [x25]
	add	w2, w8, w8, lsl #2
	bl	_wait_event_timeout
	cbz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x23
	ldr	x2, [x8]
	ldp	w4, w3, [x8, #8]
	mov	x0, x22
	mov	x1, x21
	bl	_DRM_INFO
	add	w21, w21, #1
	add	x23, x23, #16
	cmp	x24, x23
	b.ne	LBB0_3
LBB0_5:
	str	w20, [x19]
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	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
	add	sp, sp, #96
	b	_DRM_ERROR
LBB0_7:
	str	x21, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_8:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate cap sets\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"timed out waiting for cap set %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"cap set %d: id %d, max-version %d, max-size %d\n"

	.no_dead_strip	_virtio_gpu_get_capsets
.subsections_via_symbols
