	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openpam_check_desc_owner_perms ## -- Begin function openpam_check_desc_owner_perms
	.p2align	4, 0x90
_openpam_check_desc_owner_perms:        ## @openpam_check_desc_owner_perms
	.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	%esi, %ebx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_geteuid
	movq	%rax, %r12
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edi
	callq	_fstat
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_PAM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_openpam_log
	jmp	LBB0_10
LBB0_2:
	movl	-48(%rbp), %r15d
	movl	%r15d, %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	cmpq	%r12, %rax
	jne	LBB0_8
LBB0_6:
	movq	_S_IWGRP@GOTPCREL(%rip), %rax
	movq	_S_IWOTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_7
LBB0_8:
	movq	_PAM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	callq	_openpam_log
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movq	_PAM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_openpam_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ebx
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movl	$-1, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_PAM_LOG_ERROR,4,2              ## @PAM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %m"

L_.str.1:                               ## @.str.1
	.asciz	"%s: not a regular file"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_S_IWGRP,4,2                    ## @S_IWGRP
	.comm	_S_IWOTH,4,2                    ## @S_IWOTH
L_.str.2:                               ## @.str.2
	.asciz	"%s: insecure ownership or permissions"

	.comm	_EPERM,4,2                      ## @EPERM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openpam_check_desc_owner_perms ; -- Begin function openpam_check_desc_owner_perms
	.p2align	2
_openpam_check_desc_owner_perms:        ; @openpam_check_desc_owner_perms
	.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	x21, x1
	mov	x19, x0
	bl	_geteuid
	mov	x20, x0
	mov	x1, sp
	mov	x0, x21
	bl	_fstat
Lloh0:
	adrp	x22, _errno@GOTPAGE
Lloh1:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w20, [x22]
Lloh2:
	adrp	x8, _PAM_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAM_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_openpam_log
	b	LBB0_9
LBB0_2:
	ldr	w21, [sp]
	mov	x0, x21
	bl	_S_ISREG
	cbz	w0, LBB0_7
; %bb.3:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_5
; %bb.4:
	cmp	x8, x20
	b.ne	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _S_IWGRP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _S_IWGRP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _S_IWOTH@GOTPAGE
Lloh11:
	ldr	x9, [x9, _S_IWOTH@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_11
LBB0_6:
Lloh13:
	adrp	x8, _PAM_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAM_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_openpam_log
Lloh18:
	adrp	x8, _EPERM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh20:
	adrp	x8, _PAM_LOG_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PAM_LOG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_openpam_log
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w20, [x8]
LBB0_9:
	str	w20, [x22]
	mov	w0, #-1
LBB0_10:
	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
LBB0_11:
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_PAM_LOG_ERROR,4,2              ; @PAM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %m"

l_.str.1:                               ; @.str.1
	.asciz	"%s: not a regular file"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_S_IWGRP,4,2                    ; @S_IWGRP
	.comm	_S_IWOTH,4,2                    ; @S_IWOTH
l_.str.2:                               ; @.str.2
	.asciz	"%s: insecure ownership or permissions"

	.comm	_EPERM,4,2                      ; @EPERM
.subsections_via_symbols
