	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdx
	callq	_getopt
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_usage
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_getopt
	cmpl	$-1, %eax
	jne	LBB0_2
LBB0_3:
	movq	_optind@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ttyname
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ttyname
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ttyname
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_7:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_9:
	movq	(%r15,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movsbl	(%rax), %eax
	cmpl	$98, %eax
	je	LBB0_18
## %bb.12:
	cmpl	$121, %eax
	je	LBB0_17
## %bb.13:
	cmpl	$110, %eax
	jne	LBB0_19
## %bb.14:
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	movq	_S_IXGRP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	-32(%rbp), %esi
	jmp	LBB0_15
LBB0_10:
	movl	-32(%rbp), %eax
	movq	_S_IXUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_S_IXGRP@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	testl	%ecx, %ecx
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%rdx, %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_printf
	jmp	LBB0_20
LBB0_18:
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	movq	_S_IXGRP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %esi
	orl	%ecx, %esi
	notl	%esi
	andl	-32(%rbp), %esi
	orl	%ecx, %esi
	jmp	LBB0_15
LBB0_17:
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_S_IXGRP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	%eax, %esi
	notl	%esi
	andl	-32(%rbp), %esi
	orl	%eax, %esi
LBB0_15:
	movq	%r14, %rdi
	callq	_chmod
	testl	%eax, %eax
	jns	LBB0_20
## %bb.16:
	leaq	L_.str.7(%rip), %rsi
	movl	$2, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_20
LBB0_19:
	xorl	%eax, %eax
	callq	_usage
LBB0_20:
	movl	-32(%rbp), %ecx
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	movq	_S_IXGRP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	xorl	%eax, %eax
	testl	%ecx, %edx
	sete	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_optind,8,3                     ## @optind
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
L_.str.1:                               ## @.str.1
	.asciz	"unknown tty"

L_.str.2:                               ## @.str.2
	.asciz	"stat"

L_.str.3:                               ## @.str.3
	.asciz	"is %s\n"

	.comm	_S_IXUSR,4,2                    ## @S_IXUSR
L_.str.4:                               ## @.str.4
	.asciz	"y"

	.comm	_S_IXGRP,4,2                    ## @S_IXGRP
L_.str.5:                               ## @.str.5
	.asciz	"b"

L_.str.6:                               ## @.str.6
	.asciz	"n"

L_.str.7:                               ## @.str.7
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	bl	_getopt
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_usage
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_getopt
	cmn	w0, #1
	b.ne	LBB0_2
LBB0_3:
Lloh4:
	adrp	x8, _optind@GOTPAGE
Lloh5:
	ldr	x8, [x8, _optind@GOTPAGEOFF]
Lloh6:
	ldr	x21, [x8]
Lloh7:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_ttyname
	mov	x19, x0
	cbnz	x0, LBB0_7
; %bb.4:
Lloh10:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_ttyname
	mov	x19, x0
	cbnz	x0, LBB0_7
; %bb.5:
Lloh13:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_ttyname
	mov	x19, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_err
LBB0_7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	cbz	x0, LBB0_9
; %bb.8:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_err
LBB0_9:
	ldr	x8, [x20, x21, lsl #3]
Lloh20:
	adrp	x20, _S_IXUSR@GOTPAGE
Lloh21:
	ldr	x20, [x20, _S_IXUSR@GOTPAGEOFF]
Lloh22:
	adrp	x21, _S_IXGRP@GOTPAGE
Lloh23:
	ldr	x21, [x21, _S_IXGRP@GOTPAGEOFF]
	cbz	x8, LBB0_14
; %bb.10:
	ldrsb	w8, [x8]
	cmp	w8, #98
	b.eq	LBB0_15
; %bb.11:
	cmp	w8, #121
	b.eq	LBB0_16
; %bb.12:
	cmp	w8, #110
	b.ne	LBB0_19
; %bb.13:
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	ldr	w10, [x21]
	orr	w9, w10, w9
	bic	w1, w8, w9
	b	LBB0_17
LBB0_14:
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	ldr	w10, [x21]
Lloh24:
	adrp	x11, l_.str.5@PAGE
Lloh25:
	add	x11, x11, l_.str.5@PAGEOFF
Lloh26:
	adrp	x12, l_.str.6@PAGE
Lloh27:
	add	x12, x12, l_.str.6@PAGEOFF
	tst	w10, w8
	csel	x10, x12, x11, eq
Lloh28:
	adrp	x11, l_.str.4@PAGE
Lloh29:
	add	x11, x11, l_.str.4@PAGEOFF
	tst	w9, w8
	csel	x1, x10, x11, eq
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	b	LBB0_20
LBB0_15:
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	ldr	w10, [x21]
	orr	w9, w10, w9
	bic	w8, w8, w9
	orr	w1, w8, w10
	b	LBB0_17
LBB0_16:
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	ldr	w10, [x21]
	orr	w10, w10, w9
	bic	w8, w8, w10
	orr	w1, w8, w9
LBB0_17:
	mov	x0, x19
	bl	_chmod
	tbz	w0, #31, LBB0_20
; %bb.18:
	str	x19, [sp]
Lloh32:
	adrp	x1, l_.str.7@PAGE
Lloh33:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #2
	bl	_err
	b	LBB0_20
LBB0_19:
	bl	_usage
LBB0_20:
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	ldr	w10, [x21]
	orr	w9, w10, w9
	tst	w9, w8
	cset	w0, eq
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_optind,8,3                     ; @optind
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
l_.str.1:                               ; @.str.1
	.asciz	"unknown tty"

l_.str.2:                               ; @.str.2
	.asciz	"stat"

l_.str.3:                               ; @.str.3
	.asciz	"is %s\n"

	.comm	_S_IXUSR,4,2                    ; @S_IXUSR
l_.str.4:                               ; @.str.4
	.asciz	"y"

	.comm	_S_IXGRP,4,2                    ; @S_IXGRP
l_.str.5:                               ; @.str.5
	.asciz	"b"

l_.str.6:                               ; @.str.6
	.asciz	"n"

l_.str.7:                               ; @.str.7
	.asciz	"%s"

.subsections_via_symbols
