	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_resource_create_ioctl
_virtio_gpu_resource_create_ioctl:      ## @virtio_gpu_resource_create_ioctl
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movl	$0, -44(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -64(%rbp)
	movups	%xmm0, -80(%rbp)
	movups	%xmm0, -96(%rbp)
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	movl	56(%r12), %ecx
	movl	%ecx, -56(%rbp)
	movl	52(%r12), %ecx
	movl	%ecx, -60(%rbp)
	movl	48(%r12), %ecx
	movl	%ecx, -64(%rbp)
	movq	24(%r12), %rcx
	movq	%rcx, -104(%rbp)
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	$1, -96(%rbp)
	movl	12(%r12), %eax
	movl	%eax, -92(%rbp)
	movl	(%r12), %eax
	movl	%eax, -88(%rbp)
	movl	16(%r12), %eax
	movl	%eax, -84(%rbp)
	movsd	4(%r12), %xmm0                  ## xmm0 = mem[0],zero
	movsd	40(%r12), %xmm1                 ## xmm1 = mem[0],zero
	shufps	$65, %xmm1, %xmm0               ## xmm0 = xmm0[1,0],xmm1[0,1]
	movups	%xmm0, -80(%rbp)
LBB0_10:
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.11:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)
LBB0_12:
	callq	_virtio_gpu_fence_alloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %rbx
	leaq	-104(%rbp), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_virtio_gpu_alloc_object
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_dma_fence_put
	movq	%r15, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_19
LBB0_1:
	cmpl	$2, (%r12)
	jge	LBB0_2
## %bb.4:
	cmpl	$2, 4(%r12)
	jge	LBB0_2
## %bb.5:
	cmpl	$2, 8(%r12)
	jge	LBB0_2
## %bb.6:
	cmpl	$2, 12(%r12)
	jne	LBB0_2
## %bb.7:
	cmpl	$2, 16(%r12)
	jl	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r15, %r13
	addq	$4, %r13
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_drm_gem_handle_create
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_drm_gem_object_release
	jmp	LBB0_19
LBB0_18:
	movq	%r13, %rdi
	callq	_drm_gem_object_put_unlocked
	movl	(%r15), %eax
	movl	%eax, 36(%r12)
	movl	-44(%rbp), %eax
	movl	%eax, 32(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_virtio_gpu_resource_create_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtio_gpu_resource_create_ioctl
_virtio_gpu_resource_create_ioctl:      ; @virtio_gpu_resource_create_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x0, [x0]
	stur	wzr, [x29, #-36]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #40]
	stur	q0, [sp, #24]
	stur	q0, [sp, #8]
	ldr	w8, [x0]
	cbz	w8, LBB0_7
LBB0_1:
	ldr	w9, [x19, #56]
	str	w9, [sp, #48]
	ldr	d0, [x19, #48]
	str	d0, [sp, #40]
	ldr	x9, [x19, #24]
	str	x9, [sp]
	cbz	w8, LBB0_3
; %bb.2:
	mov	w8, #1
	ldp	w10, w11, [x19, #12]
	stp	w8, w10, [sp, #8]
	ldr	w8, [x19]
	stp	w8, w11, [sp, #16]
	ldur	d0, [x19, #4]
	ldr	d1, [x19, #40]
	rev64.2s	v0, v0
	mov.d	v0[1], v1[0]
	stur	q0, [sp, #24]
LBB0_3:
	cbz	x9, LBB0_13
; %bb.4:
	bl	_virtio_gpu_fence_alloc
	cbz	x0, LBB0_14
LBB0_5:
	mov	x22, x0
	mov	x1, sp
	mov	x0, x21
	mov	x2, x22
	bl	_virtio_gpu_alloc_object
	mov	x21, x0
	mov	x0, x22
	bl	_dma_fence_put
	mov	x0, x21
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.6:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_16
LBB0_7:
	ldr	w9, [x19]
	cmp	w9, #2
	b.ge	LBB0_12
; %bb.8:
	ldr	w9, [x19, #4]
	cmp	w9, #2
	b.ge	LBB0_12
; %bb.9:
	ldr	w9, [x19, #8]
	cmp	w9, #2
	b.ge	LBB0_12
; %bb.10:
	ldr	w9, [x19, #12]
	cmp	w9, #2
	b.ne	LBB0_12
; %bb.11:
	ldr	w9, [x19, #16]
	cmp	w9, #2
	b.lt	LBB0_1
LBB0_12:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh2:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [sp]
	bl	_virtio_gpu_fence_alloc
	cbnz	x0, LBB0_5
LBB0_14:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_16:
	mov	x0, x20
	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
	add	sp, sp, #112
	ret
LBB0_17:
	add	x22, x21, #4
	sub	x2, x29, #36
	mov	x0, x20
	mov	x1, x22
	bl	_drm_gem_handle_create
	mov	x20, x0
	cbz	w0, LBB0_19
; %bb.18:
	mov	x0, x22
	bl	_drm_gem_object_release
	b	LBB0_16
LBB0_19:
	mov	x0, x22
	bl	_drm_gem_object_put_unlocked
	ldr	w8, [x21]
	ldur	w9, [x29, #-36]
	stp	w9, w8, [x19, #32]
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_virtio_gpu_resource_create_ioctl
.subsections_via_symbols
