	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_setup_inbuf
_perf_setup_inbuf:                      ## @perf_setup_inbuf
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %rbx
	movq	(%rbx), %rdi
	movl	16(%r14), %esi
	movl	8(%rbx), %edx
	leaq	-48(%rbp), %rcx
	leaq	-40(%rbp), %r8
	leaq	-32(%rbp), %r9
	callq	_ntb_mw_get_align
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_11
LBB0_2:
	movq	(%r14), %rdi
	cmpq	-32(%rbp), %rdi
	jle	LBB0_4
## %bb.3:
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	leaq	-32(%rbp), %rcx
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_4:
	movq	-40(%rbp), %rsi
	callq	_round_up
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_perf_free_inbuf
	movq	(%rbx), %rdi
	movq	(%r14), %rsi
	leaq	8(%r14), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movl	%eax, 20(%r14)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	(%r15), %edi
	movq	-48(%rbp), %rsi
	callq	_IS_ALIGNED
	movq	(%rbx), %rdi
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	16(%r14), %esi
	movl	12(%r14), %edx
	movl	8(%r14), %ecx
	movq	(%r14), %r8
	callq	_ntb_mw_set_trans
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_5:
	movq	(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_7:
	xorl	%r15d, %r15d
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_perf_free_inbuf
	jmp	LBB0_11
LBB0_12:
	movq	_PERF_CMD_SXLAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_perf_cmd_exec
	xorl	%r15d, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't get inbuf restrictions\n"

L_.str.1:                               ## @.str.1
	.asciz	"Too big inbuf size %pa > %pa\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to alloc inbuf of %pa\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Unaligned inbuf allocated\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to set inbuf translation\n"

	.comm	_PERF_CMD_SXLAT,4,2             ## @PERF_CMD_SXLAT
	.no_dead_strip	_perf_setup_inbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_setup_inbuf
_perf_setup_inbuf:                      ; @perf_setup_inbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, [x0, #24]
	ldr	x0, [x21]
	ldr	w1, [x19, #16]
	ldr	w2, [x21, #8]
	add	x3, sp, #40
	add	x4, sp, #32
	add	x5, sp, #24
	bl	_ntb_mw_get_align
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	x0, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_2:
	ldr	x0, [x19]
	ldr	x8, [sp, #24]
	cmp	x0, x8
	b.le	LBB0_4
; %bb.3:
	ldr	x0, [x21]
	add	x8, sp, #24
	stp	x19, x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	ldr	x1, [sp, #32]
	bl	_round_up
	str	x0, [x19]
	mov	x0, x19
	bl	_perf_free_inbuf
	ldr	x0, [x21]
	ldr	x1, [x19]
	add	x20, x19, #8
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x2, x20
	bl	_dma_alloc_coherent
	str	w0, [x19, #20]
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x20]
	ldr	x1, [sp, #40]
	bl	_IS_ALIGNED
	mov	x8, x0
	ldr	x0, [x21]
	cbz	w8, LBB0_10
; %bb.6:
	ldp	w2, w1, [x19, #12]
	ldr	w3, [x19, #8]
	ldr	x4, [x19]
	bl	_ntb_mw_set_trans
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.7:
	ldr	x0, [x21]
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_8:
	ldr	x0, [x21]
	str	x19, [sp]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_10:
	mov	w20, #0
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_11:
	bl	_dev_err
	mov	x0, x19
	bl	_perf_free_inbuf
	b	LBB0_13
LBB0_12:
Lloh17:
	adrp	x8, _PERF_CMD_SXLAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PERF_CMD_SXLAT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_perf_cmd_exec
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't get inbuf restrictions\n"

l_.str.1:                               ; @.str.1
	.asciz	"Too big inbuf size %pa > %pa\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to alloc inbuf of %pa\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Unaligned inbuf allocated\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to set inbuf translation\n"

	.comm	_PERF_CMD_SXLAT,4,2             ; @PERF_CMD_SXLAT
	.no_dead_strip	_perf_setup_inbuf
.subsections_via_symbols
