	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kcm_service                    ## -- Begin function kcm_service
	.p2align	4, 0x90
_kcm_service:                           ## @kcm_service
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r12
	leaq	-88(%rbp), %rdi
	callq	_krb5_data_zero
	movl	%ebx, %edi
	callq	_heim_ipc_cred_get_uid
	movl	%eax, -44(%rbp)
	movl	%ebx, %edi
	callq	_heim_ipc_cred_get_gid
	movl	%eax, -48(%rbp)
	movl	%ebx, %edi
	callq	_heim_ipc_cred_get_pid
	movl	%eax, %r13d
	movl	%eax, -56(%rbp)
	movl	%ebx, %edi
	callq	_heim_ipc_cred_get_session
	movl	%eax, -52(%rbp)
	movl	(%r12), %eax
	cmpl	$3, %eax
	jg	LBB0_3
## %bb.1:
	movzbl	%r13b, %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_kcm_log
	jmp	LBB0_2
LBB0_3:
	movq	8(%r12), %rcx
	movb	(%rcx), %dl
	movb	1(%rcx), %bl
	movq	_KCM_PROTOCOL_VERSION_MAJOR@GOTPCREL(%rip), %rsi
	cmpb	(%rsi), %dl
	jne	LBB0_5
## %bb.4:
	movq	_KCM_PROTOCOL_VERSION_MINOR@GOTPCREL(%rip), %rsi
	cmpb	(%rsi), %bl
	jne	LBB0_5
## %bb.6:
	addq	$2, %rcx
	movq	%rcx, -72(%rbp)
	addq	$-2, %rax
	movq	%rax, -64(%rbp)
	movq	_kcm_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-88(%rbp), %rbx
	movq	%rbx, %rcx
	callq	_kcm_dispatch
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	*%r14
	movq	%rbx, %rdi
	callq	_krb5_data_free
	jmp	LBB0_7
LBB0_5:
	movzbl	%bl, %ecx
	movzbl	%dl, %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_kcm_log
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	*%r14
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malformed request from process %d (too short)"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KCM_PROTOCOL_VERSION_MAJOR,1,0 ## @KCM_PROTOCOL_VERSION_MAJOR
	.comm	_KCM_PROTOCOL_VERSION_MINOR,1,0 ## @KCM_PROTOCOL_VERSION_MINOR
L_.str.1:                               ## @.str.1
	.asciz	"incorrect protocol version %d.%d from process %d"

	.comm	_kcm_context,4,2                ## @kcm_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kcm_service                    ; -- Begin function kcm_service
	.p2align	2
_kcm_service:                           ; @kcm_service
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x4
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	add	x0, sp, #16
	bl	_krb5_data_zero
	mov	x0, x23
	bl	_heim_ipc_cred_get_uid
	str	w0, [sp, #60]
	mov	x0, x23
	bl	_heim_ipc_cred_get_gid
	str	w0, [sp, #56]
	mov	x0, x23
	bl	_heim_ipc_cred_get_pid
	mov	x22, x0
	str	w0, [sp, #48]
	mov	x0, x23
	bl	_heim_ipc_cred_get_session
	str	w0, [sp, #52]
	ldr	w8, [x21]
	cmp	w8, #3
	b.gt	LBB0_2
; %bb.1:
	and	w2, w22, #0xff
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	x10, [x21, #8]
	ldrb	w2, [x10]
Lloh2:
	adrp	x9, _KCM_PROTOCOL_VERSION_MAJOR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _KCM_PROTOCOL_VERSION_MAJOR@GOTPAGEOFF]
	ldrb	w11, [x9]
	ldrb	w9, [x10, #1]
Lloh4:
	adrp	x12, _KCM_PROTOCOL_VERSION_MINOR@GOTPAGE
Lloh5:
	ldr	x12, [x12, _KCM_PROTOCOL_VERSION_MINOR@GOTPAGEOFF]
	ldrb	w12, [x12]
	cmp	w2, w11
	ccmp	w9, w12, #0, eq
	b.eq	LBB0_5
; %bb.3:
	stp	x9, x22, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	w0, #1
	bl	_kcm_log
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, #0
	blr	x19
	b	LBB0_6
LBB0_5:
	add	x9, x10, #2
	sub	x8, x8, #2
	stp	x9, x8, [sp, #32]
Lloh11:
	adrp	x8, _kcm_context@GOTPAGE
Lloh12:
	ldr	x8, [x8, _kcm_context@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, sp, #48
	add	x2, sp, #32
	add	x3, sp, #16
	bl	_kcm_dispatch
	mov	x1, x0
	add	x2, sp, #16
	mov	x0, x20
	blr	x19
	add	x0, sp, #16
	bl	_krb5_data_free
LBB0_6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malformed request from process %d (too short)"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KCM_PROTOCOL_VERSION_MAJOR,1,0 ; @KCM_PROTOCOL_VERSION_MAJOR
	.comm	_KCM_PROTOCOL_VERSION_MINOR,1,0 ; @KCM_PROTOCOL_VERSION_MINOR
l_.str.1:                               ; @.str.1
	.asciz	"incorrect protocol version %d.%d from process %d"

	.comm	_kcm_context,4,2                ; @kcm_context
.subsections_via_symbols
