	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_file_s_chmod
_mrb_file_s_chmod:                      ## @mrb_file_s_chmod
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_mrb_gc_arena_save
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%r15, %rdi
	callq	_mrb_get_args
	cmpq	$0, -48(%rbp)
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_mrb_locale_free
	incq	%rbx
	cmpq	-48(%rbp), %rbx
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_mrb_str_to_cstr
	movq	%rax, %r12
	movq	%rax, %rdi
	movl	$-1, %esi
	callq	_mrb_locale_from_utf8
	movq	%rax, %r13
	movq	-64(%rbp), %rsi
	movq	%rax, %rdi
	callq	_CHMOD
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_mrb_locale_free
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mrb_sys_fail
	jmp	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mrb_gc_arena_restore
	movq	-48(%rbp), %rdi
	callq	_mrb_fixnum_value
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i*"

	.no_dead_strip	_mrb_file_s_chmod
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_file_s_chmod
_mrb_file_s_chmod:                      ; @mrb_file_s_chmod
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	bl	_mrb_gc_arena_save
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #24
	add	x3, sp, #8
	add	x4, sp, #16
	mov	x0, x19
	bl	_mrb_get_args
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_mrb_locale_free
	add	x23, x23, #1
	ldr	x8, [sp, #16]
	cmp	x23, x8
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x19
	bl	_mrb_str_to_cstr
	mov	x21, x0
	mov	w1, #-1
	bl	_mrb_locale_from_utf8
	mov	x22, x0
	ldr	x1, [sp, #24]
	bl	_CHMOD
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_mrb_locale_free
	mov	x0, x19
	mov	x1, x21
	bl	_mrb_sys_fail
	b	LBB0_2
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_gc_arena_restore
	ldr	x0, [sp, #16]
	bl	_mrb_fixnum_value
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i*"

	.no_dead_strip	_mrb_file_s_chmod
.subsections_via_symbols
