	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _msm_gem_kernel_new
__msm_gem_kernel_new:                   ## @_msm_gem_kernel_new
	.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
	movq	%r9, %r13
	movq	%r8, %r15
	movq	%rcx, %r12
	movl	16(%rbp), %r14d
	movl	%r14d, %ecx
	callq	__msm_gem_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_1:
	testq	%r13, %r13
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_msm_gem_get_and_pin_iova
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
LBB0_3:
	movq	%rbx, %rdi
	callq	_msm_gem_get_vaddr
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_msm_gem_unpin_iova
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
LBB0_5:
	movq	%rbx, %rdi
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.6:
	callq	_drm_gem_object_put
	jmp	LBB0_11
LBB0_10:
	callq	_drm_gem_object_put_unlocked
LBB0_11:
	movl	%r13d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	testq	%r15, %r15
	je	LBB0_9
## %bb.8:
	movq	%rbx, (%r15)
LBB0_9:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	__msm_gem_kernel_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _msm_gem_kernel_new
__msm_gem_kernel_new:                   ; @_msm_gem_kernel_new
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x6
	mov	x23, x5
	mov	x21, x4
	mov	x22, x3
	mov	x3, x6
	bl	__msm_gem_new
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_2:
	cbz	x23, LBB0_6
; %bb.3:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_msm_gem_get_and_pin_iova
	mov	x23, x0
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x20
	cbz	w19, LBB0_8
LBB0_5:
	bl	_drm_gem_object_put
	b	LBB0_9
LBB0_6:
	mov	x0, x20
	bl	_msm_gem_get_vaddr
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.7:
	mov	x0, x20
	mov	x1, x22
	bl	_msm_gem_unpin_iova
	mov	x0, x23
	bl	_PTR_ERR
	mov	x23, x0
	mov	x0, x20
	cbnz	w19, LBB0_5
LBB0_8:
	bl	_drm_gem_object_put_unlocked
LBB0_9:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_10:
	cbz	x21, LBB0_12
; %bb.11:
	str	x20, [x21]
LBB0_12:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	__msm_gem_kernel_new
.subsections_via_symbols
