	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_pam_setcred                 ## -- Begin function do_pam_setcred
	.p2align	4, 0x90
_do_pam_setcred:                        ## @do_pam_setcred
	.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
	movl	%edi, %ebx
	movq	_sshpam_handle@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_PAM_CONV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_store_conv@GOTPCREL(%rip), %rdx
	callq	_pam_set_item
	movq	_sshpam_err@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movq	_PAM_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_pam_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_fatal
LBB0_2:
	testl	%ebx, %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
	movq	_PAM_ESTABLISH_CRED@GOTPCREL(%rip), %rbx
	cmoveq	_PAM_REINITIALIZE_CRED@GOTPCREL(%rip), %rbx
	xorl	%eax, %eax
	callq	_debug
	movl	(%r14), %edi
	movl	(%rbx), %esi
	callq	_pam_setcred
	movq	%rax, (%r15)
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.5:
	movq	_sshpam_cred_established@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_sshpam_authenticated@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_pam_strerror
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fatal                          ## TAILCALL
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_debug                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sshpam_handle,4,2              ## @sshpam_handle
	.comm	_PAM_CONV,4,2                   ## @PAM_CONV
	.comm	_store_conv,4,2                 ## @store_conv
	.comm	_sshpam_err,8,3                 ## @sshpam_err
	.comm	_PAM_SUCCESS,8,3                ## @PAM_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PAM: failed to set PAM_CONV: %s"

L_.str.1:                               ## @.str.1
	.asciz	"PAM: establishing credentials"

	.comm	_PAM_ESTABLISH_CRED,4,2         ## @PAM_ESTABLISH_CRED
L_.str.2:                               ## @.str.2
	.asciz	"PAM: reinitializing credentials"

	.comm	_PAM_REINITIALIZE_CRED,4,2      ## @PAM_REINITIALIZE_CRED
	.comm	_sshpam_cred_established,4,2    ## @sshpam_cred_established
	.comm	_sshpam_authenticated,8,3       ## @sshpam_authenticated
L_.str.3:                               ## @.str.3
	.asciz	"PAM: pam_setcred(): %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_pam_setcred                 ; -- Begin function do_pam_setcred
	.p2align	2
_do_pam_setcred:                        ; @do_pam_setcred
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
Lloh0:
	adrp	x20, _sshpam_handle@GOTPAGE
Lloh1:
	ldr	x20, [x20, _sshpam_handle@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _PAM_CONV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAM_CONV@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, _store_conv@GOTPAGE
Lloh6:
	ldr	x2, [x2, _store_conv@GOTPAGEOFF]
	bl	_pam_set_item
Lloh7:
	adrp	x21, _sshpam_err@GOTPAGE
Lloh8:
	ldr	x21, [x21, _sshpam_err@GOTPAGEOFF]
	str	x0, [x21]
Lloh9:
	adrp	x22, _PAM_SUCCESS@GOTPAGE
Lloh10:
	ldr	x22, [x22, _PAM_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x1, x0
	ldr	w0, [x20]
	bl	_pam_strerror
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
LBB0_2:
Lloh13:
	adrp	x8, l_.str.1@PAGE
Lloh14:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh15:
	adrp	x9, l_.str.2@PAGE
Lloh16:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x0, x9, x8, eq
Lloh17:
	adrp	x8, _PAM_REINITIALIZE_CRED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PAM_REINITIALIZE_CRED@GOTPAGEOFF]
Lloh19:
	adrp	x9, _PAM_ESTABLISH_CRED@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PAM_ESTABLISH_CRED@GOTPAGEOFF]
	csel	x19, x8, x9, eq
	bl	_debug
	ldr	w0, [x20]
	ldr	w1, [x19]
	bl	_pam_setcred
	str	x0, [x21]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh21:
	adrp	x8, _sshpam_cred_established@GOTPAGE
Lloh22:
	ldr	x8, [x8, _sshpam_cred_established@GOTPAGEOFF]
	mov	w9, #1
Lloh23:
	str	w9, [x8]
	b	LBB0_7
LBB0_4:
	mov	x1, x0
Lloh24:
	adrp	x8, _sshpam_authenticated@GOTPAGE
Lloh25:
	ldr	x8, [x8, _sshpam_authenticated@GOTPAGEOFF]
Lloh26:
	ldr	x19, [x8]
	ldr	w0, [x20]
	bl	_pam_strerror
	mov	x1, x0
	cbz	x19, LBB0_6
; %bb.5:
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_fatal
LBB0_6:
	str	x1, [sp]
Lloh29:
	adrp	x0, l_.str.3@PAGE
Lloh30:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_debug
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_sshpam_handle,4,2              ; @sshpam_handle
	.comm	_PAM_CONV,4,2                   ; @PAM_CONV
	.comm	_store_conv,4,2                 ; @store_conv
	.comm	_sshpam_err,8,3                 ; @sshpam_err
	.comm	_PAM_SUCCESS,8,3                ; @PAM_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PAM: failed to set PAM_CONV: %s"

l_.str.1:                               ; @.str.1
	.asciz	"PAM: establishing credentials"

	.comm	_PAM_ESTABLISH_CRED,4,2         ; @PAM_ESTABLISH_CRED
l_.str.2:                               ; @.str.2
	.asciz	"PAM: reinitializing credentials"

	.comm	_PAM_REINITIALIZE_CRED,4,2      ; @PAM_REINITIALIZE_CRED
	.comm	_sshpam_cred_established,4,2    ; @sshpam_cred_established
	.comm	_sshpam_authenticated,8,3       ; @sshpam_authenticated
l_.str.3:                               ; @.str.3
	.asciz	"PAM: pam_setcred(): %s"

.subsections_via_symbols
