	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mrb_io_s_sysopen               ## -- Begin function mrb_io_s_sysopen
	.p2align	4, 0x90
_mrb_io_s_sysopen:                      ## @mrb_io_s_sysopen
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_mrb_nil_value
	movl	%eax, -28(%rbp)
	xorl	%eax, %eax
	callq	_mrb_nil_value
	movl	%eax, -24(%rbp)
	movl	$-1, -20(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-28(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	leaq	-20(%rbp), %r8
	movq	%rbx, %rdi
	callq	_mrb_get_args
	movl	-24(%rbp), %edi
	callq	_mrb_nil_p
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_mrb_str_new_cstr
	movl	%eax, -24(%rbp)
LBB0_2:
	cmpl	$0, -20(%rbp)
	jns	LBB0_4
## %bb.3:
	movl	$438, -20(%rbp)                 ## imm = 0x1B6
LBB0_4:
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mrb_string_value_cstr
	movq	%rax, %r14
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mrb_string_value_cstr
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mrb_io_modestr_to_flags
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_mrb_io_flags_to_modenum
	movl	-20(%rbp), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_mrb_cloexec_open
	movl	%eax, %edi
	callq	_mrb_fixnum_value
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"S|Si"

L_.str.1:                               ## @.str.1
	.asciz	"r"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mrb_io_s_sysopen               ; -- Begin function mrb_io_s_sysopen
	.p2align	2
_mrb_io_s_sysopen:                      ; @mrb_io_s_sysopen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mrb_nil_value
	str	w0, [sp, #12]
	bl	_mrb_nil_value
	mov	w8, #-1
	stp	w8, w0, [sp, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x19
	bl	_mrb_get_args
	ldr	w0, [sp, #8]
	bl	_mrb_nil_p
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mrb_str_new_cstr
	str	w0, [sp, #8]
LBB0_2:
	ldr	w8, [sp, #4]
	tbz	w8, #31, LBB0_4
; %bb.3:
	mov	w8, #438
	str	w8, [sp, #4]
LBB0_4:
	add	x1, sp, #12
	mov	x0, x19
	bl	_mrb_string_value_cstr
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_mrb_string_value_cstr
	mov	x1, x0
	mov	x0, x19
	bl	_mrb_io_modestr_to_flags
	mov	x1, x0
	mov	x0, x19
	bl	_mrb_io_flags_to_modenum
	mov	x2, x0
	ldr	w3, [sp, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_mrb_cloexec_open
	bl	_mrb_fixnum_value
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"S|Si"

l_.str.1:                               ; @.str.1
	.asciz	"r"

.subsections_via_symbols
