	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_io_flags_to_modenum
_mrb_io_flags_to_modenum:               ## @mrb_io_flags_to_modenum
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%esi, %eax
	andb	$-125, %al
	cmpb	$-128, %al
	je	LBB0_4
## %bb.1:
	cmpb	$-127, %al
	je	LBB0_5
## %bb.2:
	xorl	%ecx, %ecx
	cmpb	$-126, %al
	jne	LBB0_7
## %bb.3:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ecx
LBB0_7:
	movq	_FMODE_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	je	LBB0_9
## %bb.8:
	movq	_O_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	movq	_FMODE_TRUNC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%esi, %edx
	je	LBB0_11
## %bb.10:
	movq	_O_TRUNC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_11:
	orl	%ecx, %eax
	movq	_FMODE_CREATE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	je	LBB0_13
## %bb.12:
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_13:
	orl	%esi, %edx
	orl	%edx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_FMODE_APPEND,4,2               ## @FMODE_APPEND
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_FMODE_TRUNC,4,2                ## @FMODE_TRUNC
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_FMODE_CREATE,4,2               ## @FMODE_CREATE
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_FMODE_BINMODE,4,2              ## @FMODE_BINMODE
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.no_dead_strip	_mrb_io_flags_to_modenum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_io_flags_to_modenum
_mrb_io_flags_to_modenum:               ; @mrb_io_flags_to_modenum
	.cfi_startproc
; %bb.0:
	mov	w8, #131
	and	w8, w1, w8
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh2:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	b	LBB0_8
LBB0_7:
	mov	w8, #0
LBB0_8:
Lloh6:
	adrp	x9, _FMODE_APPEND@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FMODE_APPEND@GOTPAGEOFF]
Lloh8:
	adrp	x10, _O_APPEND@GOTPAGE
Lloh9:
	ldr	x10, [x10, _O_APPEND@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
	tst	w9, w1
	csel	w9, wzr, w10, eq
Lloh12:
	adrp	x10, _FMODE_TRUNC@GOTPAGE
Lloh13:
	ldr	x10, [x10, _FMODE_TRUNC@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh14:
	ldr	w9, [x10]
Lloh15:
	adrp	x10, _O_TRUNC@GOTPAGE
Lloh16:
	ldr	x10, [x10, _O_TRUNC@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w9, w1
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _FMODE_CREATE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FMODE_CREATE@GOTPAGEOFF]
Lloh20:
	adrp	x10, _O_CREAT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _O_CREAT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	ldr	w10, [x10]
	tst	w9, w1
	csel	w9, wzr, w10, eq
	orr	w0, w8, w9
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_FMODE_APPEND,4,2               ; @FMODE_APPEND
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_FMODE_TRUNC,4,2                ; @FMODE_TRUNC
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_FMODE_CREATE,4,2               ; @FMODE_CREATE
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_FMODE_BINMODE,4,2              ; @FMODE_BINMODE
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.no_dead_strip	_mrb_io_flags_to_modenum
.subsections_via_symbols
