	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pam_setenv                     ## -- Begin function pam_setenv
	.p2align	4, 0x90
_pam_setenv:                            ## @pam_setenv
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_ENTER
	cmpb	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$61, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_PAM_SYSTEM_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RETURNC
LBB0_3:
	testl	%r12d, %r12d
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_openpam_findenv
	testq	%rax, %rax
	js	LBB0_6
## %bb.5:
	movq	_PAM_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RETURNC
LBB0_6:
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_asprintf
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	movq	_PAM_BUF_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RETURNC
LBB0_8:
	movq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pam_putenv
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_FREE
	movl	%ebx, %edi
	callq	_RETURNC
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_PAM_SYSTEM_ERR,4,2             ## @PAM_SYSTEM_ERR
	.comm	_PAM_SUCCESS,4,2                ## @PAM_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s=%s"

	.comm	_PAM_BUF_ERR,4,2                ## @PAM_BUF_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pam_setenv                     ; -- Begin function pam_setenv
	.p2align	2
_pam_setenv:                            ; @pam_setenv
	.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	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_ENTER
	ldrb	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	w1, #61
	bl	_strchr
	cbz	x0, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
Lloh6:
	adrp	x8, _PAM_SYSTEM_ERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAM_SYSTEM_ERR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_RETURNC
LBB0_3:
	cbnz	w22, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_openpam_findenv
	tbnz	x0, #63, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _PAM_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAM_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_RETURNC
LBB0_6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	x2, x21
	mov	x3, x20
	bl	_asprintf
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh14:
	adrp	x8, _PAM_BUF_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PAM_BUF_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_RETURNC
LBB0_8:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_pam_putenv
	mov	x19, x0
	ldr	x0, [sp, #8]
	bl	_FREE
	mov	x0, x19
	bl	_RETURNC
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_PAM_SYSTEM_ERR,4,2             ; @PAM_SYSTEM_ERR
	.comm	_PAM_SUCCESS,4,2                ; @PAM_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s=%s"

	.comm	_PAM_BUF_ERR,4,2                ; @PAM_BUF_ERR
.subsections_via_symbols
