	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_long_term_buff
_alloc_long_term_buff:                  ## @alloc_long_term_buff
	.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	%rsi, %rbx
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movl	%edx, (%rsi)
	leaq	4(%rsi), %rax
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	movl	%edx, %esi
	movq	%rax, %rdx
	callq	_dma_alloc_coherent
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	8(%r15), %eax
	movl	%eax, 12(%rbx)
	incl	%eax
	movl	%eax, 8(%r15)
	leaq	4(%r15), %r13
	movq	%r13, %rdi
	callq	_init_completion
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movl	12(%rbx), %ecx
	movq	%r15, %rdi
	callq	_send_request_map
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movl	8(%rbx), %edx
	movl	(%rbx), %esi
	movl	4(%rbx), %ecx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_7
LBB0_4:
	movq	%r13, %rdi
	callq	_wait_for_completion
	movl	(%r15), %edx
	testl	%edx, %edx
	je	LBB0_5
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	8(%rbx), %edx
	movl	(%rbx), %esi
	movl	4(%rbx), %ecx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	movl	$-1, %r12d
	jmp	LBB0_7
LBB0_5:
	xorl	%r12d, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't alloc long term buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't map long term buffer,rc = %d\n"

	.no_dead_strip	_alloc_long_term_buff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_long_term_buff
_alloc_long_term_buff:                  ; @alloc_long_term_buff
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x8, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #16]
	str	w2, [x1]
	add	x2, x1, #4
Lloh0:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x9]
	mov	x0, x19
	mov	x1, x8
	bl	_dma_alloc_coherent
	str	w0, [x20, #8]
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x21, #8]
	str	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x21, #8]
	add	x23, x21, #4
	mov	x0, x23
	bl	_init_completion
	ldp	w2, w1, [x20]
	ldr	w3, [x20, #12]
	mov	x0, x21
	bl	_send_request_map
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
	ldp	w3, w2, [x20, #4]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dma_free_coherent
	b	LBB0_7
LBB0_3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_4:
	mov	x0, x23
	bl	_wait_for_completion
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.5:
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldp	w3, w2, [x20, #4]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dma_free_coherent
	mov	w22, #-1
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't alloc long term buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't map long term buffer,rc = %d\n"

	.no_dead_strip	_alloc_long_term_buff
.subsections_via_symbols
