	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_str_setbyte
_mrb_str_setbyte:                       ## @mrb_str_setbyte
	.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, %r15d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	callq	_mrb_get_args
	movl	%r15d, %edi
	callq	_RSTRING_LEN
	movl	%eax, %ebx
	movl	-36(%rbp), %eax
	movl	%ebx, %ecx
	negl	%ecx
	cmpl	%ecx, %eax
	jl	LBB0_2
## %bb.1:
	cmpl	%eax, %ebx
	jle	LBB0_2
## %bb.3:
	testl	%eax, %eax
	js	LBB0_4
LBB0_5:
	movl	%r15d, %edi
	callq	_mrb_str_ptr
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mrb_str_modify
	movl	-40(%rbp), %eax
	movzbl	%al, %ebx
	movl	%ebx, -40(%rbp)
	movl	%r15d, %edi
	callq	_RSTRING_PTR
	movslq	-36(%rbp), %rcx
	movb	%bl, (%rax,%rcx)
	movzbl	-40(%rbp), %edi
	callq	_mrb_fixnum_value
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_E_INDEX_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movzbl	%al, %edi
	callq	_mrb_fixnum_value
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %ecx
	callq	_mrb_raisef
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jns	LBB0_5
LBB0_4:
	addl	%ebx, %eax
	movl	%eax, -36(%rbp)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ii"

	.comm	_E_INDEX_ERROR,4,2              ## @E_INDEX_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"index %S is out of array"

	.no_dead_strip	_mrb_str_setbyte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_str_setbyte
_mrb_str_setbyte:                       ; @mrb_str_setbyte
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_mrb_get_args
	mov	x0, x19
	bl	_RSTRING_LEN
	mov	x21, x0
	ldr	w8, [sp, #12]
	neg	w9, w0
	cmp	w8, w9
	ccmp	w0, w8, #4, ge
	b.gt	LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, _E_INDEX_ERROR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _E_INDEX_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x9]
	and	w0, w8, #0xff
	bl	_mrb_fixnum_value
	mov	x3, x0
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	bl	_mrb_raisef
	ldr	w8, [sp, #12]
LBB0_2:
	tbz	w8, #31, LBB0_4
; %bb.3:
	add	w8, w8, w21
	str	w8, [sp, #12]
LBB0_4:
	mov	x0, x19
	bl	_mrb_str_ptr
	mov	x1, x0
	mov	x0, x20
	bl	_mrb_str_modify
	ldr	w20, [sp, #8]
	and	w8, w20, #0xff
	str	w8, [sp, #8]
	mov	x0, x19
	bl	_RSTRING_PTR
	ldrsw	x8, [sp, #12]
	strb	w20, [x0, x8]
	ldrb	w0, [sp, #8]
	bl	_mrb_fixnum_value
	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	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ii"

	.comm	_E_INDEX_ERROR,4,2              ; @E_INDEX_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"index %S is out of array"

	.no_dead_strip	_mrb_str_setbyte
.subsections_via_symbols
