	.file	"extr_socket.c_mrb_basicsocket_setnonblock.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"b"
.LC1:
	.string	"fcntl"
	.text
	.p2align 4
	.type	mrb_basicsocket_setnonblock, @function
mrb_basicsocket_setnonblock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdx, rsp
	call	mrb_get_args@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	socket_fd@PLT
	mov	esi, DWORD PTR F_GETFL[rip]
	xor	edx, edx
	mov	edi, eax
	mov	r12d, eax
	call	fcntl@PLT
	mov	ebx, eax
	cmp	eax, 1
	je	.L9
.L2:
	cmp	QWORD PTR [rsp], 0
	mov	edx, DWORD PTR O_NONBLOCK[rip]
	je	.L3
	or	edx, ebx
.L4:
	mov	esi, DWORD PTR F_SETFL[rip]
	mov	edi, r12d
	call	fcntl@PLT
	cmp	eax, -1
	je	.L10
.L5:
	xor	eax, eax
	call	mrb_nil_value@PLT
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L11
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	not	edx
	and	edx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	mrb_sys_fail@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	mrb_sys_fail@PLT
	jmp	.L5
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mrb_basicsocket_setnonblock, .-mrb_basicsocket_setnonblock
	.comm	O_NONBLOCK,4,4
	.comm	NO_ERROR,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,4,4
	.comm	FIONBIO,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_socket.c_mrb_basicsocket_setnonblock.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"b\000"
	.align	2
.LC1:
	.ascii	"fcntl\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mrb_basicsocket_setnonblock, %function
mrb_basicsocket_setnonblock:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	mov	r5, r0
	sub	sp, sp, #8
	ldr	r3, .L12
	mov	r2, sp
	ldr	r1, .L12+4
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	mrb_get_args
	mov	r1, r4
	mov	r0, r5
	bl	socket_fd
	ldr	r3, .L12+8
	mov	r2, #0
	ldr	r1, [r3]
	mov	r6, r0
	bl	fcntl
	cmp	r0, #1
	mov	r4, r0
	beq	.L9
.L2:
	ldr	r2, [sp]
	ldr	r3, .L12+12
	cmp	r2, #0
	ldr	r2, [r3]
	ldr	r3, .L12+16
	orrne	r2, r4, r2
	biceq	r2, r4, r2
	mov	r0, r6
	ldr	r1, [r3]
	bl	fcntl
	cmn	r0, #1
	beq	.L10
.L5:
	bl	mrb_nil_value
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	mov	r0, r5
	ldr	r1, .L12+20
	bl	mrb_sys_fail
	b	.L2
.L10:
	mov	r0, r5
	ldr	r1, .L12+20
	bl	mrb_sys_fail
	b	.L5
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	.LC0
	.word	F_GETFL
	.word	O_NONBLOCK
	.word	F_SETFL
	.word	.LC1
	.size	mrb_basicsocket_setnonblock, .-mrb_basicsocket_setnonblock
	.comm	O_NONBLOCK,4,4
	.comm	NO_ERROR,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,4,4
	.comm	FIONBIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
