	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshpam_cleanup                 ## -- Begin function sshpam_cleanup
	.p2align	4, 0x90
_sshpam_cleanup:                        ## @sshpam_cleanup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_sshpam_handle@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.1:
	movq	_use_privsep@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_mm_is_monitor
	testl	%eax, %eax
	je	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_debug
	movq	(%rbx), %rdi
	movq	_PAM_CONV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_null_conv@GOTPCREL(%rip), %rdx
	callq	_pam_set_item
	movq	_sshpam_session_open@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_debug
	movq	(%rbx), %rdi
	movq	_PAM_SILENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pam_close_session
	movq	$0, (%r14)
LBB0_5:
	movq	_sshpam_cred_established@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_debug
	movq	(%rbx), %rdi
	movq	_PAM_DELETE_CRED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pam_setcred
	movq	$0, (%r14)
LBB0_7:
	movq	_sshpam_authenticated@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	(%rbx), %rdi
	movq	_sshpam_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pam_end
	movq	$0, (%rbx)
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sshpam_handle,8,3              ## @sshpam_handle
	.comm	_use_privsep,8,3                ## @use_privsep
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PAM: cleanup"

	.comm	_PAM_CONV,4,2                   ## @PAM_CONV
	.comm	_null_conv,4,2                  ## @null_conv
	.comm	_sshpam_session_open,8,3        ## @sshpam_session_open
L_.str.1:                               ## @.str.1
	.asciz	"PAM: closing session"

	.comm	_PAM_SILENT,4,2                 ## @PAM_SILENT
	.comm	_sshpam_cred_established,8,3    ## @sshpam_cred_established
L_.str.2:                               ## @.str.2
	.asciz	"PAM: deleting credentials"

	.comm	_PAM_DELETE_CRED,4,2            ## @PAM_DELETE_CRED
	.comm	_sshpam_authenticated,8,3       ## @sshpam_authenticated
	.comm	_sshpam_err,4,2                 ## @sshpam_err
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshpam_cleanup                 ; -- Begin function sshpam_cleanup
	.p2align	2
_sshpam_cleanup:                        ; @sshpam_cleanup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _sshpam_handle@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sshpam_handle@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.1:
Lloh2:
	adrp	x8, _use_privsep@GOTPAGE
Lloh3:
	ldr	x8, [x8, _use_privsep@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_mm_is_monitor
	cbz	w0, LBB0_8
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debug
	ldr	x0, [x19]
Lloh7:
	adrp	x8, _PAM_CONV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PAM_CONV@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, _null_conv@GOTPAGE
Lloh11:
	ldr	x2, [x2, _null_conv@GOTPAGEOFF]
	bl	_pam_set_item
Lloh12:
	adrp	x20, _sshpam_session_open@GOTPAGE
Lloh13:
	ldr	x20, [x20, _sshpam_session_open@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_debug
	ldr	x0, [x19]
Lloh16:
	adrp	x8, _PAM_SILENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PAM_SILENT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_pam_close_session
	str	xzr, [x20]
LBB0_5:
Lloh19:
	adrp	x20, _sshpam_cred_established@GOTPAGE
Lloh20:
	ldr	x20, [x20, _sshpam_cred_established@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.6:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_debug
	ldr	x0, [x19]
Lloh23:
	adrp	x8, _PAM_DELETE_CRED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PAM_DELETE_CRED@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_pam_setcred
	str	xzr, [x20]
LBB0_7:
Lloh26:
	adrp	x8, _sshpam_authenticated@GOTPAGE
Lloh27:
	ldr	x8, [x8, _sshpam_authenticated@GOTPAGEOFF]
Lloh28:
	str	xzr, [x8]
	ldr	x0, [x19]
Lloh29:
	adrp	x8, _sshpam_err@GOTPAGE
Lloh30:
	ldr	x8, [x8, _sshpam_err@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_pam_end
	str	xzr, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_sshpam_handle,8,3              ; @sshpam_handle
	.comm	_use_privsep,8,3                ; @use_privsep
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PAM: cleanup"

	.comm	_PAM_CONV,4,2                   ; @PAM_CONV
	.comm	_null_conv,4,2                  ; @null_conv
	.comm	_sshpam_session_open,8,3        ; @sshpam_session_open
l_.str.1:                               ; @.str.1
	.asciz	"PAM: closing session"

	.comm	_PAM_SILENT,4,2                 ; @PAM_SILENT
	.comm	_sshpam_cred_established,8,3    ; @sshpam_cred_established
l_.str.2:                               ; @.str.2
	.asciz	"PAM: deleting credentials"

	.comm	_PAM_DELETE_CRED,4,2            ; @PAM_DELETE_CRED
	.comm	_sshpam_authenticated,8,3       ; @sshpam_authenticated
	.comm	_sshpam_err,4,2                 ; @sshpam_err
.subsections_via_symbols
