	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_perf_mad
_get_perf_mad:                          ## @get_perf_mad
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$32, -72(%rbp)
	movl	$0, -48(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r12
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	movl	(%r15), %esi
	movl	$32, %edi
	callq	_kmalloc
	movq	%rax, %r15
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.2:
	testq	%r15, %r15
	je	LBB0_8
## %bb.3:
	movl	$1, 8(%rbx)
	movq	_IB_MGMT_CLASS_PERF_MGMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	$1, 12(%rbx)
	movq	_IB_MGMT_METHOD_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, 16(%rbx)
	movq	_IB_PMA_CLASS_PORT_INFO@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rax
	movl	%r13d, 164(%rax)
LBB0_5:
	movq	_IB_MAD_IGNORE_MKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rax
	leaq	-72(%rbp), %r10
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	pushq	%rax
	pushq	%r10
	pushq	%r15
	pushq	$32
	callq	*(%r12)
	addq	$32, %rsp
	movq	_IB_MAD_RESULT_SUCCESS@GOTPCREL(%rip), %rcx
	movq	_IB_MAD_RESULT_REPLY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%eax
	testl	%eax, %edx
	jne	LBB0_9
## %bb.6:
	movslq	-44(%rbp), %rsi                 ## 4-byte Folded Reload
	shlq	$2, %rsi
	addq	(%r15), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memcpy
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
	jmp	LBB0_11
LBB0_7:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %r14d
LBB0_11:
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_kfree
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IB_MGMT_CLASS_PERF_MGMT,4,2    ## @IB_MGMT_CLASS_PERF_MGMT
	.comm	_IB_MGMT_METHOD_GET,4,2         ## @IB_MGMT_METHOD_GET
	.comm	_IB_PMA_CLASS_PORT_INFO,8,3     ## @IB_PMA_CLASS_PORT_INFO
	.comm	_IB_MAD_IGNORE_MKEY,4,2         ## @IB_MAD_IGNORE_MKEY
	.comm	_IB_MAD_RESULT_SUCCESS,4,2      ## @IB_MAD_RESULT_SUCCESS
	.comm	_IB_MAD_RESULT_REPLY,4,2        ## @IB_MAD_RESULT_REPLY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_get_perf_mad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_perf_mad
_get_perf_mad:                          ; @get_perf_mad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	w8, #32
	str	x8, [sp, #24]
	str	wzr, [sp, #20]
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x5
	mov	x23, x4
	mov	x22, x3
	mov	x26, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #32
	bl	_kzalloc
	mov	x20, x0
	ldr	w1, [x21]
	mov	w0, #32
	bl	_kmalloc
	mov	x21, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh4:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_4:
Lloh7:
	adrp	x8, _IB_MGMT_CLASS_PERF_MGMT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IB_MGMT_CLASS_PERF_MGMT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	movi.2s	v0, #1
	str	d0, [x20, #8]
Lloh10:
	adrp	x9, _IB_MGMT_METHOD_GET@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IB_MGMT_METHOD_GET@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
	str	x26, [x20, #16]
Lloh13:
	adrp	x8, _IB_PMA_CLASS_PORT_INFO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IB_PMA_CLASS_PORT_INFO@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x8, x26
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x20]
	str	w24, [x8, #164]
LBB0_6:
	ldr	x8, [x25]
Lloh16:
	adrp	x9, _IB_MAD_IGNORE_MKEY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IB_MAD_IGNORE_MKEY@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x9]
	add	x9, sp, #20
	add	x10, sp, #24
	stp	x10, x9, [sp]
	mov	x0, x25
	mov	x2, x24
	mov	x3, #0
	mov	x4, #0
	mov	x5, x20
	mov	w6, #32
	mov	x7, x21
	blr	x8
Lloh19:
	adrp	x8, _IB_MAD_RESULT_SUCCESS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IB_MAD_RESULT_SUCCESS@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _IB_MAD_RESULT_REPLY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IB_MAD_RESULT_REPLY@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w8, w0
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x21]
	add	x1, x8, w23, sxtw #2
	mov	x0, x22
	mov	x2, x19
	bl	_memcpy
	b	LBB0_10
LBB0_8:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	bl	_kfree
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IB_MGMT_CLASS_PERF_MGMT,4,2    ; @IB_MGMT_CLASS_PERF_MGMT
	.comm	_IB_MGMT_METHOD_GET,4,2         ; @IB_MGMT_METHOD_GET
	.comm	_IB_PMA_CLASS_PORT_INFO,8,3     ; @IB_PMA_CLASS_PORT_INFO
	.comm	_IB_MAD_IGNORE_MKEY,4,2         ; @IB_MAD_IGNORE_MKEY
	.comm	_IB_MAD_RESULT_SUCCESS,4,2      ; @IB_MAD_RESULT_SUCCESS
	.comm	_IB_MAD_RESULT_REPLY,4,2        ; @IB_MAD_RESULT_REPLY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_get_perf_mad
.subsections_via_symbols
