	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_io_modestr_to_flags
_mrb_io_modestr_to_flags:               ## @mrb_io_modestr_to_flags
	.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	%rsi, %r14
	movq	%rdi, %r15
	movsbl	(%rsi), %eax
	cmpl	$97, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$119, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$114, %eax
	jne	LBB0_6
## %bb.3:
	movq	_FMODE_READABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_7
LBB0_5:
	movq	_FMODE_WRITABLE@GOTPCREL(%rip), %rax
	movq	_FMODE_APPEND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movq	_FMODE_CREATE@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	jmp	LBB0_7
LBB0_4:
	movq	_FMODE_WRITABLE@GOTPCREL(%rip), %rax
	movq	_FMODE_CREATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movq	_FMODE_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	jmp	LBB0_7
LBB0_6:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mrb_str_new_cstr
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_mrb_raisef
	xorl	%r13d, %r13d
LBB0_7:
	movb	1(%r14), %al
	testb	%al, %al
	je	LBB0_15
## %bb.8:
	leaq	2(%r14), %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mrb_str_new_cstr
	movq	%r15, %rdi
	movl	%ebx, %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	callq	_mrb_raisef
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movzbl	(%r12), %eax
	incq	%r12
	testb	%al, %al
	je	LBB0_15
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %eax
	cmpl	$43, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$98, %eax
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_FMODE_BINMODE@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_FMODE_READWRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	jmp	LBB0_14
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMODE_READABLE,4,2             ## @FMODE_READABLE
	.comm	_FMODE_WRITABLE,4,2             ## @FMODE_WRITABLE
	.comm	_FMODE_CREATE,4,2               ## @FMODE_CREATE
	.comm	_FMODE_TRUNC,4,2                ## @FMODE_TRUNC
	.comm	_FMODE_APPEND,4,2               ## @FMODE_APPEND
	.comm	_E_ARGUMENT_ERROR,4,2           ## @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"illegal access mode %S"

	.comm	_FMODE_BINMODE,4,2              ## @FMODE_BINMODE
	.comm	_FMODE_READWRITE,4,2            ## @FMODE_READWRITE
	.no_dead_strip	_mrb_io_modestr_to_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_io_modestr_to_flags
_mrb_io_modestr_to_flags:               ; @mrb_io_modestr_to_flags
	.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
	mov	x19, x1
	mov	x20, x0
	ldrsb	w8, [x1]
	cmp	w8, #97
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #119
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #114
	b.ne	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _FMODE_READABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FMODE_READABLE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldrb	w8, [x19, #1]
	cbnz	w8, LBB0_8
	b	LBB0_15
LBB0_4:
Lloh3:
	adrp	x8, _FMODE_WRITABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FMODE_WRITABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _FMODE_APPEND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FMODE_APPEND@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _FMODE_CREATE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FMODE_CREATE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _FMODE_WRITABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FMODE_WRITABLE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _FMODE_CREATE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FMODE_CREATE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _FMODE_TRUNC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FMODE_TRUNC@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldrb	w8, [x19, #1]
	cbnz	w8, LBB0_8
	b	LBB0_15
LBB0_7:
Lloh19:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_mrb_str_new_cstr
	mov	x3, x0
Lloh22:
	adrp	x2, l_.str@PAGE
Lloh23:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_mrb_raisef
	mov	w21, #0
	ldrb	w8, [x19, #1]
	cbz	w8, LBB0_15
LBB0_8:
	mov	w24, #2
Lloh24:
	adrp	x25, _FMODE_READWRITE@GOTPAGE
Lloh25:
	ldr	x25, [x25, _FMODE_READWRITE@GOTPAGEOFF]
Lloh26:
	adrp	x26, _FMODE_BINMODE@GOTPAGE
Lloh27:
	ldr	x26, [x26, _FMODE_BINMODE@GOTPAGEOFF]
Lloh28:
	adrp	x27, _E_ARGUMENT_ERROR@GOTPAGE
Lloh29:
	ldr	x27, [x27, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh30:
	adrp	x22, l_.str@PAGE
Lloh31:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w23, [x27]
	mov	x0, x20
	mov	x1, x19
	bl	_mrb_str_new_cstr
	mov	x3, x0
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_mrb_raisef
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldrb	w8, [x19, x24]
	add	x24, x24, #1
	cbz	w8, LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	and	w9, w8, #0xff
	cmp	w9, #43
	b.eq	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sxtb	w8, w8
	cmp	w8, #98
	b.ne	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x26]
	orr	w21, w8, w21
	b	LBB0_10
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x25]
	orr	w21, w8, w21
	b	LBB0_10
LBB0_15:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_FMODE_READABLE,4,2             ; @FMODE_READABLE
	.comm	_FMODE_WRITABLE,4,2             ; @FMODE_WRITABLE
	.comm	_FMODE_CREATE,4,2               ; @FMODE_CREATE
	.comm	_FMODE_TRUNC,4,2                ; @FMODE_TRUNC
	.comm	_FMODE_APPEND,4,2               ; @FMODE_APPEND
	.comm	_E_ARGUMENT_ERROR,4,2           ; @E_ARGUMENT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"illegal access mode %S"

	.comm	_FMODE_BINMODE,4,2              ; @FMODE_BINMODE
	.comm	_FMODE_READWRITE,4,2            ; @FMODE_READWRITE
	.no_dead_strip	_mrb_io_modestr_to_flags
.subsections_via_symbols
