	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armada_gem_alloc_object
_armada_gem_alloc_object:               ## @armada_gem_alloc_object
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_roundup_gem_size
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_drm_gem_object_init
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_4:
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
	movq	___GFP_RECLAIMABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_mapping_set_gfp_mask
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_DRM_DEBUG_DRIVER
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_RECLAIMABLE,4,2          ## @__GFP_RECLAIMABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc obj %p size %zu\n"

	.no_dead_strip	_armada_gem_alloc_object
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function armada_gem_alloc_object
_armada_gem_alloc_object:               ; @armada_gem_alloc_object
	.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, x0
	mov	x0, x1
	bl	_roundup_gem_size
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_drm_gem_object_init
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _GFP_HIGHUSER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GFP_HIGHUSER@GOTPAGEOFF]
	ldr	x0, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, ___GFP_RECLAIMABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___GFP_RECLAIMABLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_mapping_set_gfp_mask
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_DRM_DEBUG_DRIVER
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_RECLAIMABLE,4,2          ; @__GFP_RECLAIMABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc obj %p size %zu\n"

	.no_dead_strip	_armada_gem_alloc_object
.subsections_via_symbols
