	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_th_msu_buffer_register   ## -- Begin function intel_th_msu_buffer_register
	.p2align	4, 0x90
_intel_th_msu_buffer_register:          ## @intel_th_msu_buffer_register
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	_msu_buffer_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	(%r15), %edi
	callq	___msu_buffer_entry_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	movq	%r15, 16(%r12)
	movq	%r14, 8(%r12)
	movq	_msu_buffer_list@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
	xorl	%ebx, %ebx
LBB0_5:
	movq	_msu_buffer_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_6:
	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	_msu_buffer_mutex,4,2           ## @msu_buffer_mutex
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_msu_buffer_list,4,2            ## @msu_buffer_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_th_msu_buffer_register   ; -- Begin function intel_th_msu_buffer_register
	.p2align	2
_intel_th_msu_buffer_register:          ; @intel_th_msu_buffer_register
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x0, _msu_buffer_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _msu_buffer_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w0, [x21]
	bl	___msu_buffer_entry_find
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _EEXIST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_kfree
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_4:
	stp	x20, x21, [x19, #8]
Lloh11:
	adrp	x1, _msu_buffer_list@GOTPAGE
Lloh12:
	ldr	x1, [x1, _msu_buffer_list@GOTPAGEOFF]
	mov	x0, x19
	bl	_list_add_tail
	mov	w20, #0
LBB0_5:
Lloh13:
	adrp	x0, _msu_buffer_mutex@GOTPAGE
Lloh14:
	ldr	x0, [x0, _msu_buffer_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x20
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_msu_buffer_mutex,4,2           ; @msu_buffer_mutex
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_msu_buffer_list,4,2            ; @msu_buffer_list
.subsections_via_symbols
