	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_register_client        ## -- Begin function smscore_register_client
	.p2align	4, 0x90
_smscore_register_client:               ## @smscore_register_client
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	(%rsi), %edx
	movl	4(%rsi), %esi
	callq	_smscore_find_client
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EEXIST@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r12
	movq	%rax, %rdi
	addq	$24, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r15, 16(%r12)
	movl	16(%rbx), %eax
	movl	%eax, 12(%r12)
	movl	12(%rbx), %eax
	movl	%eax, 8(%r12)
	movl	8(%rbx), %eax
	movl	%eax, 4(%r12)
	leaq	4(%r15), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_list_add_locked
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_smscore_validate_client
	movq	%r12, (%r14)
	movl	8(%rbx), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Client already exist.\n"

	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"%p %d %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smscore_register_client        ; -- Begin function smscore_register_client
	.p2align	2
_smscore_register_client:               ; @smscore_register_client
	.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, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w1, [x1, #4]
	ldr	w2, [x19]
	bl	_smscore_find_client
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh2:
	adrp	x8, _EEXIST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x22, x0
	add	x0, x0, #24
	bl	_INIT_LIST_HEAD
	str	x21, [x22, #16]
	ldr	w8, [x19, #16]
	str	w8, [x22, #12]
	ldr	d0, [x19, #8]
	stur	d0, [x22, #4]
	add	x1, x21, #4
	mov	x0, x22
	mov	x2, x21
	bl	_list_add_locked
	ldp	w3, w2, [x19]
	mov	x0, x21
	mov	x1, x22
	bl	_smscore_validate_client
	str	x22, [x20]
	ldp	w2, w1, [x19, #4]
	ldr	w3, [x19]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	mov	w0, #0
LBB0_5:
	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
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Client already exist.\n"

	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"%p %d %d\n"

.subsections_via_symbols
