	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_init_test
_perf_init_test:                        ## @perf_init_test
	.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	%rdi, %r14
	movq	16(%rdi), %r15
	movq	8(%r15), %rdi
	movq	16(%r15), %rax
	movl	(%rax), %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_dev_to_node
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_kmalloc_node
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	16(%r15), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_get_random_bytes
	movq	_use_dma@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.5:
	callq	_dma_cap_zero
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dma_cap_set
	movq	_perf_dma_filter@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_dma_request_channel
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movq	8(%r15), %rdi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	leaq	4(%r15), %rdi
	callq	_atomic_dec
	movq	%r15, %rdi
	callq	_wake_up
	movl	4(%r14), %edi
	callq	_kfree
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_use_dma,4,2                    ## @use_dma
	.comm	_DMA_MEMCPY,4,2                 ## @DMA_MEMCPY
	.comm	_perf_dma_filter,4,2            ## @perf_dma_filter
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: Failed to get DMA channel\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_perf_init_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_init_test
_perf_init_test:                        ; @perf_init_test
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldp	x0, x8, [x20, #8]
	ldr	w21, [x8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	bl	_dev_to_node
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_kmalloc_node
	str	w0, [x19, #4]
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
	bl	_get_random_bytes
Lloh3:
	adrp	x8, _use_dma@GOTPAGE
Lloh4:
	ldr	x8, [x8, _use_dma@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
	bl	_dma_cap_zero
Lloh6:
	adrp	x8, _DMA_MEMCPY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_MEMCPY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_dma_cap_set
Lloh9:
	adrp	x8, _perf_dma_filter@GOTPAGE
Lloh10:
	ldr	x8, [x8, _perf_dma_filter@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_dma_request_channel
	str	w0, [x19, #12]
	cbz	w0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_atomic_set
LBB0_4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldr	x0, [x20, #8]
	ldr	w2, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	add	x0, x20, #4
	bl	_atomic_dec
	mov	x0, x20
	bl	_wake_up
	ldr	w0, [x19, #4]
	bl	_kfree
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_use_dma,4,2                    ; @use_dma
	.comm	_DMA_MEMCPY,4,2                 ; @DMA_MEMCPY
	.comm	_perf_dma_filter,4,2            ; @perf_dma_filter
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: Failed to get DMA channel\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_perf_init_test
.subsections_via_symbols
