	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_set_tiling_ioctl           ## -- Begin function vc4_set_tiling_ioctl
	.p2align	4, 0x90
_vc4_set_tiling_ioctl:                  ## @vc4_set_tiling_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rsi)
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %rbx
	movl	8(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_1
## %bb.6:
	movl	$1, %r15d
	jmp	LBB0_7
LBB0_4:
	xorl	%r15d, %r15d
LBB0_7:
	movl	12(%rbx), %esi
	movq	%rdx, %rdi
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_vc4_bo
	movl	%r15d, (%rax)
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movl	12(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to look up GEM BO %d\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_set_tiling_ioctl           ; -- Begin function vc4_set_tiling_ioctl
	.p2align	2
_vc4_set_tiling_ioctl:                  ; @vc4_set_tiling_ioctl
	.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
	ldr	x8, [x1]
	cbz	x8, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
	mov	x19, x1
	ldr	w8, [x1, #8]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_1
; %bb.6:
	mov	w21, #1
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	ldr	w1, [x19, #12]
	mov	x0, x2
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_10
; %bb.9:
	mov	x20, x0
	bl	_to_vc4_bo
	str	w21, [x0]
	mov	x0, x20
	bl	_drm_gem_object_put_unlocked
	mov	w0, #0
	b	LBB0_3
LBB0_10:
	ldr	w1, [x19, #12]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh4:
	adrp	x8, _ENOENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to look up GEM BO %d\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
