	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_alloc_generic_buf      ## -- Begin function s5p_mfc_alloc_generic_buf
	.p2align	4, 0x90
_s5p_mfc_alloc_generic_buf:             ## @s5p_mfc_alloc_generic_buf
	.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
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	(%rdi), %rax
	movl	%esi, %ecx
	movq	(%rax,%rcx,8), %r12
	movl	4(%rdx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_mfc_debug
	movl	%r15d, (%rbx)
	movl	4(%rbx), %esi
	leaq	8(%rbx), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	movl	%eax, %edx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_mfc_debug
	jmp	LBB0_3
LBB0_2:
	movl	4(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_mfc_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Allocating generic buf: %zu\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"Allocated addr %p %pad\n"

L_.str.2:                               ## @.str.2
	.asciz	"Allocating generic buffer of size %zu failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_s5p_mfc_alloc_generic_buf      ; -- Begin function s5p_mfc_alloc_generic_buf
	.p2align	2
_s5p_mfc_alloc_generic_buf:             ; @s5p_mfc_alloc_generic_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x8, [x0]
	ldr	x21, [x8, w1, uxtw #3]
	ldr	w2, [x2, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_mfc_debug
	str	w20, [x19]
	ldr	w1, [x19, #4]
	add	x20, x19, #8
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_dma_alloc_coherent
	str	w0, [x19, #12]
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	str	x20, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_mfc_debug
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w1, [x19, #4]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_mfc_err
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Allocating generic buf: %zu\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"Allocated addr %p %pad\n"

l_.str.2:                               ; @.str.2
	.asciz	"Allocating generic buffer of size %zu failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
