	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gr2d_init
_gr2d_init:                             ## @gr2d_init
	.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	%rdi, %rbx
	callq	_host1x_to_drm_client
	movq	%rax, %r12
	movl	12(%rbx), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	_HOST1X_SYNCPT_HAS_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%r12, %rdi
	callq	_to_gr2d
	movq	%rax, %r14
	movl	8(%rbx), %edi
	callq	_host1x_channel_request
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_host1x_syncpt_request
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_host1x_client_iommu_attach
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	4(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
LBB0_8:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_host1x_syncpt_free
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_9:
	movl	(%r14), %edi
	callq	_host1x_channel_put
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_tegra_drm_register_client
	testl	%eax, %eax
	jns	LBB0_10
## %bb.7:
	movl	%eax, %r12d
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_host1x_client_iommu_detach
	movl	%r12d, %r15d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST1X_SYNCPT_HAS_BASE,8,3     ## @HOST1X_SYNCPT_HAS_BASE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to request syncpoint: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to attach to domain: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to register client: %d\n"

	.no_dead_strip	_gr2d_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gr2d_init
_gr2d_init:                             ; @gr2d_init
	.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	x20, x0
	bl	_host1x_to_drm_client
	mov	x21, x0
	ldr	w0, [x20, #12]
	bl	_dev_get_drvdata
	mov	x22, x0
Lloh0:
	adrp	x8, _HOST1X_SYNCPT_HAS_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOST1X_SYNCPT_HAS_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	mov	x0, x21
	bl	_to_gr2d
	mov	x19, x0
	ldr	w0, [x20, #8]
	bl	_host1x_channel_request
	str	w0, [x19]
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x20
	mov	x1, x23
	bl	_host1x_syncpt_request
	ldr	x8, [x20]
	str	w0, [x8]
	cbz	w0, LBB0_6
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_host1x_client_iommu_attach
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	w0, [x20, #8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_4:
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_host1x_syncpt_free
	b	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	w0, [x20, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_7:
	ldr	w0, [x19]
	bl	_host1x_channel_put
LBB0_8:
	mov	x0, x21
	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
LBB0_9:
	ldr	w0, [x22]
	mov	x1, x21
	bl	_tegra_drm_register_client
	tbnz	w0, #31, LBB0_11
; %bb.10:
	mov	w21, #0
	b	LBB0_8
LBB0_11:
	mov	x21, x0
	ldr	w0, [x20, #8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_host1x_client_iommu_detach
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST1X_SYNCPT_HAS_BASE,8,3     ; @HOST1X_SYNCPT_HAS_BASE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to request syncpoint: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to attach to domain: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to register client: %d\n"

	.no_dead_strip	_gr2d_init
.subsections_via_symbols
