	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_drm_ipp_task_setup_buffer
_exynos_drm_ipp_task_setup_buffer:      ## @exynos_drm_ipp_task_setup_buffer
	.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	48(%rdi), %rax
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %r15d
	testq	%r13, %r13
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rax), %esi
	movl	%r15d, %edi
	callq	_DIV_ROUND_UP
	movl	%eax, %r15d
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12), %rax
	movq	40(%r12), %rcx
	movl	(%rax,%r13,4), %ebx
	movl	(%rcx,%r13,4), %esi
	movq	%r14, %rdi
	callq	_exynos_drm_gem_get
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	imull	%r15d, %ebx
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	8(%r12), %rcx
	movq	32(%r12), %rax
	movq	(%rax,%r13,8), %rax
	addq	%rax, %rbx
	movq	(%rcx,%r13,8), %rcx
	cmpq	(%rcx), %rbx
	ja	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	addq	8(%rcx), %rax
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%r13,8)
	incq	%r13
	movq	48(%r12), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r13
	jl	LBB0_2
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_7:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	testl	%r13d, %r13d
	jne	LBB0_8
	jmp	LBB0_12
LBB0_6:
	incq	%r13
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r13d, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_exynos_drm_gem_put
	movq	8(%r12), %rax
	movq	$0, -8(%rax,%rbx,8)
	decq	%rbx
	jne	LBB0_9
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_exynos_drm_ipp_task_setup_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_drm_ipp_task_setup_buffer
_exynos_drm_ipp_task_setup_buffer:      ; @exynos_drm_ipp_task_setup_buffer
	.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
	ldr	x8, [x0, #48]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x19, #16]
	cbz	x22, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_DIV_ROUND_UP
	mov	x21, x0
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	lsl	x9, x22, #2
	ldr	w23, [x8, x9]
	ldr	x8, [x19, #40]
	ldr	w1, [x8, x9]
	mov	x0, x20
	bl	_exynos_drm_gem_get
	cbz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mul	w10, w23, w21
	ldr	x8, [x19, #8]
	lsl	x9, x22, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x9]
	ldr	x11, [x19, #8]
	ldr	x9, [x11, x9]
	ldr	x11, [x9]
	add	x10, x8, x10
	cmp	x10, x11
	b.hi	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x9, #8]
	add	x8, x9, x8
	ldr	x9, [x19]
	str	x8, [x9, x22, lsl #3]
	add	x22, x22, #1
	ldr	x8, [x19, #48]
	ldrsw	x9, [x8]
	cmp	x22, x9
	b.lt	LBB0_2
LBB0_7:
	mov	w20, #0
	b	LBB0_12
LBB0_8:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	cbnz	w22, LBB0_10
	b	LBB0_12
LBB0_9:
	add	x22, x22, #1
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	sub	x21, x22, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	lsl	x22, x21, #3
	ldr	x0, [x8, x22]
	bl	_exynos_drm_gem_put
	ldr	x8, [x19, #8]
	str	xzr, [x8, x22]
	sub	x21, x21, #1
	cmn	x21, #1
	b.ne	LBB0_11
LBB0_12:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_exynos_drm_ipp_task_setup_buffer
.subsections_via_symbols
