	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_drm_gem_create             ## -- Begin function mtk_drm_gem_create
	.p2align	4, 0x90
_mtk_drm_gem_create:                    ## @mtk_drm_gem_create
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	(%rdi), %r12
	callq	_mtk_drm_gem_init
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_1:
	movq	_DMA_ATTR_WRITE_COMBINE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, 24(%rbx)
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.2:
	movq	_DMA_ATTR_NO_KERNEL_MAPPING@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	movl	%r8d, 24(%rbx)
LBB0_3:
	movl	(%r12), %edi
	movl	28(%rbx), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdx
	callq	_dma_alloc_attrs
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	movq	%rax, 16(%rbx)
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_DRM_DEBUG_DRIVER
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %r14
	addq	$28, %r14
	movl	28(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_drm_gem_object_release
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_ATTR_WRITE_COMBINE,4,2     ## @DMA_ATTR_WRITE_COMBINE
	.comm	_DMA_ATTR_NO_KERNEL_MAPPING,4,2 ## @DMA_ATTR_NO_KERNEL_MAPPING
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate %zx byte dma buffer"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"cookie = %p dma_addr = %pad size = %zu\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtk_drm_gem_create             ; -- Begin function mtk_drm_gem_create
	.p2align	2
_mtk_drm_gem_create:                    ; @mtk_drm_gem_create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x20, x1
	ldr	x22, [x0]
	bl	_mtk_drm_gem_init
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_2:
Lloh0:
	adrp	x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	str	w4, [x19, #24]
	cbnz	w21, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _DMA_ATTR_NO_KERNEL_MAPPING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_ATTR_NO_KERNEL_MAPPING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w4, w8, w4
	str	w4, [x19, #24]
LBB0_4:
	ldr	w0, [x22]
	ldr	w1, [x19, #28]
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x2, x19
	bl	_dma_alloc_attrs
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.5:
	mov	x1, x0
	cbz	w21, LBB0_7
; %bb.6:
	str	x1, [x19, #16]
LBB0_7:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	add	x20, x19, #28
	ldr	w1, [x19, #28]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	mov	x0, x20
	bl	_drm_gem_object_release
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_ATTR_WRITE_COMBINE,4,2     ; @DMA_ATTR_WRITE_COMBINE
	.comm	_DMA_ATTR_NO_KERNEL_MAPPING,4,2 ; @DMA_ATTR_NO_KERNEL_MAPPING
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate %zx byte dma buffer"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"cookie = %p dma_addr = %pad size = %zu\n"

.subsections_via_symbols
