	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_priv_io_setup                  ## -- Begin function priv_io_setup
	.p2align	4, 0x90
_priv_io_setup:                         ## @priv_io_setup
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_DEV_IO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-24(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_4
## %bb.1:
	movq	_ALLPERMS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	-24(%rbp), %esi
	movq	_saved_perms@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	movq	_EXPECTED_PERMS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	%edx, %esi
	jne	LBB0_5
## %bb.2:
	movl	(%rbx), %edi
	movq	_NEW_PERMS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_chmod
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	movq	_initialized@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
	jmp	LBB0_7
LBB0_6:
	movl	(%rbx), %esi
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_7:
	movl	$-1, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEV_IO,4,2                     ## @DEV_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"priv_io_setup: stat(%s)"

	.comm	_ALLPERMS,4,2                   ## @ALLPERMS
	.comm	_saved_perms,4,2                ## @saved_perms
	.comm	_EXPECTED_PERMS,4,2             ## @EXPECTED_PERMS
L_.str.1:                               ## @.str.1
	.asciz	"priv_io_setup: perms = 0%o; expected 0%o"

	.comm	_NEW_PERMS,4,2                  ## @NEW_PERMS
L_.str.2:                               ## @.str.2
	.asciz	"priv_io_setup: chmod(%s, 0%o)"

	.comm	_initialized,4,2                ## @initialized
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_priv_io_setup                  ; -- Begin function priv_io_setup
	.p2align	2
_priv_io_setup:                         ; @priv_io_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _DEV_IO@GOTPAGE
Lloh1:
	ldr	x19, [x19, _DEV_IO@GOTPAGEOFF]
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_stat
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldr	w8, [sp, #8]
Lloh2:
	adrp	x9, _ALLPERMS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ALLPERMS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _saved_perms@GOTPAGE
Lloh6:
	ldr	x10, [x10, _saved_perms@GOTPAGEOFF]
	and	w1, w9, w8
Lloh7:
	str	w1, [x10]
Lloh8:
	adrp	x8, _EXPECTED_PERMS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EXPECTED_PERMS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	cmp	w1, w2
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x19]
Lloh11:
	adrp	x20, _NEW_PERMS@GOTPAGE
Lloh12:
	ldr	x20, [x20, _NEW_PERMS@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_chmod
	tbnz	x0, #63, LBB0_6
; %bb.3:
	mov	w0, #0
Lloh13:
	adrp	x8, _initialized@GOTPAGE
Lloh14:
	ldr	x8, [x8, _initialized@GOTPAGEOFF]
	mov	w9, #1
Lloh15:
	str	w9, [x8]
	b	LBB0_9
LBB0_4:
	ldr	w1, [x19]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	b	LBB0_8
LBB0_6:
	ldr	w1, [x19]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	_warn
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DEV_IO,4,2                     ; @DEV_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"priv_io_setup: stat(%s)"

	.comm	_ALLPERMS,4,2                   ; @ALLPERMS
	.comm	_saved_perms,4,2                ; @saved_perms
	.comm	_EXPECTED_PERMS,4,2             ; @EXPECTED_PERMS
l_.str.1:                               ; @.str.1
	.asciz	"priv_io_setup: perms = 0%o; expected 0%o"

	.comm	_NEW_PERMS,4,2                  ; @NEW_PERMS
l_.str.2:                               ; @.str.2
	.asciz	"priv_io_setup: chmod(%s, 0%o)"

	.comm	_initialized,4,2                ; @initialized
.subsections_via_symbols
