	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup                          ## -- Begin function setup
	.p2align	4, 0x90
_setup:                                 ## @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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_fd_list_count@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_fd_list@GOTPCREL(%rip), %r13
	movq	_O_EXCL@GOTPCREL(%rip), %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%r15), %esi
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movl	8(%rax,%rbx), %edi
	movl	12(%rax,%rbx), %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edi
	callq	_close
	movq	(%r13), %rax
	movl	8(%rax,%rbx), %edi
	movl	(%rax,%rbx), %edx
	movl	4(%rax,%rbx), %esi
	callq	_chown
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movq	_fd_list_count@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jl	LBB0_2
LBB0_6:
	xorl	%r12d, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	$-1, %r12d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
LBB0_10:
	callq	_perror
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_fd_list_count,4,2              ## @fd_list_count
	.comm	_fd_list,8,3                    ## @fd_list
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open"

L_.str.1:                               ## @.str.1
	.asciz	"chown"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup                          ; -- Begin function setup
	.p2align	2
_setup:                                 ; @setup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x21, _fd_list_count@GOTPAGE
Lloh1:
	ldr	x21, [x21, _fd_list_count@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x23, #0
Lloh2:
	adrp	x24, _fd_list@GOTPAGE
Lloh3:
	ldr	x24, [x24, _fd_list@GOTPAGEOFF]
Lloh4:
	adrp	x26, _O_CREAT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _O_CREAT@GOTPAGEOFF]
Lloh6:
	adrp	x27, _O_EXCL@GOTPAGE
Lloh7:
	ldr	x27, [x27, _O_EXCL@GOTPAGEOFF]
Lloh8:
	adrp	x19, l_.str@PAGE
Lloh9:
	add	x19, x19, l_.str@PAGEOFF
Lloh10:
	adrp	x25, l_.str.1@PAGE
Lloh11:
	add	x25, x25, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x8, x8, x22
	ldr	w9, [x26]
	ldr	w10, [x27]
	orr	w1, w10, w9
	ldp	w0, w2, [x8, #8]
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_close
	ldr	x8, [x24]
	add	x8, x8, x22
	ldp	w1, w0, [x8, #4]
	ldr	w2, [x8]
	bl	_chown
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #16
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_5:
	mov	w20, #0
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w20, #-1
	b	LBB0_9
LBB0_8:
	mov	x20, x0
	mov	x19, x25
LBB0_9:
	mov	x0, x19
	bl	_perror
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_fd_list_count,4,2              ; @fd_list_count
	.comm	_fd_list,8,3                    ; @fd_list
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open"

l_.str.1:                               ; @.str.1
	.asciz	"chown"

.subsections_via_symbols
