	.file	"extr_io.c_mrb_cloexec_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"open %s"
	.text
	.p2align 4
	.globl	mrb_cloexec_open
	.type	mrb_cloexec_open, @function
mrb_cloexec_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	mov	esi, -1
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	rdi, r15
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	ebx, DWORD PTR FALSE[rip]
	call	mrb_locale_from_utf8@PLT
	mov	r14, rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	test	ebx, ebx
	jne	.L4
	mov	eax, DWORD PTR errno[rip]
	add	eax, -128
	cmp	eax, 1
	ja	.L4
	mov	rdi, r13
	call	mrb_garbage_collect@PLT
	mov	ebx, DWORD PTR TRUE[rip]
.L2:
	mov	edx, r12d
	mov	esi, ebp
	mov	rdi, r14
	call	open@PLT
	mov	r8d, eax
	cmp	eax, -1
	je	.L9
	mov	rdi, r14
	mov	DWORD PTR 12[rsp], eax
	call	mrb_locale_free@PLT
	mov	r8d, DWORD PTR 12[rsp]
	cmp	r8d, 2
	jle	.L5
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdx, r15
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], r8d
	call	mrb_format@PLT
	mov	rdi, r13
	mov	esi, eax
	call	RSTRING_CSTR@PLT
	mov	rdi, r13
	mov	esi, eax
	call	mrb_sys_fail@PLT
	mov	rdi, r14
	call	mrb_locale_free@PLT
	mov	r8d, DWORD PTR 12[rsp]
.L5:
	mov	esi, r8d
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], r8d
	call	mrb_fd_cloexec@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mrb_cloexec_open, .-mrb_cloexec_open
	.comm	errno,4,4
	.comm	TRUE,4,4
	.comm	O_NOINHERIT,8,8
	.comm	O_CLOEXEC,8,8
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_io.c_mrb_cloexec_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"open %s\000"
	.text
	.align	2
	.global	mrb_cloexec_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	mrb_cloexec_open, %function
mrb_cloexec_open:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, .L10
	mov	fp, r1
	mov	r5, r0
	sub	sp, sp, #12
	mov	r0, r1
	mvn	r1, #0
	mov	r8, r2
	mov	r7, r3
	ldr	r4, [ip]
	bl	mrb_locale_from_utf8
	ldr	r9, .L10+4
	mov	r6, r0
	ldr	r10, .L10+8
	b	.L2
.L9:
	cmp	r4, #0
	bne	.L4
	ldr	r2, [r9]
	sub	r2, r2, #128
	cmp	r2, #1
	bhi	.L4
	mov	r0, r5
	bl	mrb_garbage_collect
	ldr	r4, [r10]
.L2:
	mov	r2, r7
	mov	r1, r8
	mov	r0, r6
	bl	open
	cmn	r0, #1
	mov	r3, r0
	beq	.L9
	str	r0, [sp, #4]
	mov	r0, r6
	bl	mrb_locale_free
	ldr	r3, [sp, #4]
	cmp	r3, #2
	ble	.L5
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r2, fp
	ldr	r1, .L10+12
	mov	r0, r5
	str	r3, [sp, #4]
	bl	mrb_format
	mov	r1, r0
	mov	r0, r5
	bl	RSTRING_CSTR
	mov	r1, r0
	mov	r0, r5
	bl	mrb_sys_fail
	mov	r0, r6
	bl	mrb_locale_free
	ldr	r3, [sp, #4]
.L5:
	mov	r1, r3
	mov	r0, r5
	str	r3, [sp, #4]
	bl	mrb_fd_cloexec
	ldr	r3, [sp, #4]
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	.align	2
.L10:
	.word	FALSE
	.word	errno
	.word	TRUE
	.word	.LC0
	.size	mrb_cloexec_open, .-mrb_cloexec_open
	.comm	errno,4,4
	.comm	TRUE,4,4
	.comm	O_NOINHERIT,4,4
	.comm	O_CLOEXEC,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
