	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qmem_alloc
_qmem_alloc:                            ## @qmem_alloc
	.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
	testl	%edx, %edx
	je	LBB0_1
## %bb.3:
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movl	%r12d, (%rax)
	imull	%r14d, %r12d
	movslq	%r12d, %rsi
	movq	_OTX2_ALIGN@GOTPCREL(%rip), %r12
	addq	(%r12), %rsi
	movq	%rsi, 32(%rax)
	movq	%rax, %rdx
	addq	$16, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movl	%r14d, 4(%rbx)
	movl	16(%rbx), %edi
	movq	(%r12), %rsi
	callq	_ALIGN
	cltq
	movq	%rax, %rcx
	subq	16(%rbx), %rcx
	movq	%rcx, 8(%rbx)
	addq	%rcx, 24(%rbx)
	movq	%rax, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OTX2_ALIGN,8,3                 ## @OTX2_ALIGN
	.no_dead_strip	_qmem_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qmem_alloc
_qmem_alloc:                            ; @qmem_alloc
	.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
	cbz	w2, LBB0_4
; %bb.1:
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #40
	bl	_devm_kzalloc
	str	x0, [x23]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x19, x0
	str	w22, [x0]
Lloh2:
	adrp	x23, _OTX2_ALIGN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _OTX2_ALIGN@GOTPAGEOFF]
	mul	w8, w22, w20
	ldr	x9, [x23]
	add	x1, x9, w8, sxtw
	str	x1, [x0, #32]
	add	x2, x0, #16
	ldr	w3, [x24]
	mov	x0, x21
	bl	_dma_alloc_coherent
	str	x0, [x19, #24]
	cbz	x0, LBB0_5
; %bb.3:
	str	w20, [x19, #4]
	ldr	w0, [x19, #16]
	ldr	x1, [x23]
	bl	_ALIGN
	mov	x8, x0
	mov	w0, #0
	sxtw	x8, w8
	ldp	x9, x10, [x19, #16]
	sub	x9, x8, x9
	add	x10, x10, x9
	stp	x8, x10, [x19, #16]
	str	x9, [x19, #8]
	b	LBB0_7
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OTX2_ALIGN,8,3                 ; @OTX2_ALIGN
	.no_dead_strip	_qmem_alloc
.subsections_via_symbols
