	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mrb_basicsocket_setsockopt
_mrb_basicsocket_setsockopt:            ## @mrb_basicsocket_setsockopt
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_mrb_get_args
	cmpl	$1, %eax
	je	LBB0_16
## %bb.1:
	cmpl	$3, %eax
	jne	LBB0_19
## %bb.2:
	movl	-48(%rbp), %edi
	callq	_mrb_fixnum_p
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_mrb_raise
LBB0_4:
	movl	-48(%rbp), %edi
	callq	_mrb_fixnum
	movl	%eax, %r15d
	movl	-44(%rbp), %edi
	callq	_mrb_string_p
	testq	%rax, %rax
	jne	LBB0_20
## %bb.5:
	movl	-44(%rbp), %edi
	callq	_mrb_type
	movq	_MRB_TT_TRUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movl	-44(%rbp), %edi
	callq	_mrb_type
	movq	_MRB_TT_FALSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_7:
	movl	-44(%rbp), %edi
	callq	_mrb_test
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, -52(%rbp)
LBB0_13:
	leaq	-52(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
LBB0_14:
	callq	_mrb_str_new
	movl	%eax, -44(%rbp)
	jmp	LBB0_20
LBB0_16:
	movl	-48(%rbp), %esi
	movq	%r12, %rdi
	callq	_mrb_obj_classname
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	callq	_mrb_raise
LBB0_18:
	movl	-48(%rbp), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_mrb_funcall
	movl	%eax, %edi
	callq	_mrb_fixnum
	movl	%eax, %r15d
	movl	-48(%rbp), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_mrb_funcall
	movl	%eax, %edi
	callq	_mrb_fixnum
	movl	%eax, -56(%rbp)
	movl	-48(%rbp), %esi
	leaq	L_.str.7(%rip), %rdx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_mrb_funcall
	movl	%eax, -44(%rbp)
	jmp	LBB0_20
LBB0_19:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_mrb_fixnum_value
	leaq	L_.str.8(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_mrb_raisef
	xorl	%r15d, %r15d
LBB0_20:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_socket_fd
	movl	%eax, %r13d
	movl	-56(%rbp), %r14d
	movl	-44(%rbp), %edi
	callq	_RSTRING_PTR
	movl	%eax, %ebx
	movl	-44(%rbp), %edi
	callq	_RSTRING_LEN
	movl	%r13d, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_setsockopt
	cmpl	$-1, %eax
	jne	LBB0_22
## %bb.21:
	leaq	L_.str.9(%rip), %rsi
	movq	%r12, %rdi
	callq	_mrb_sys_fail
LBB0_22:
	xorl	%edi, %edi
	callq	_mrb_fixnum_value
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	-44(%rbp), %edi
	callq	_mrb_fixnum_p
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movl	-56(%rbp), %eax
	movq	_IP_MULTICAST_TTL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.10:
	movq	_IP_MULTICAST_LOOP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_11
## %bb.12:
	movl	-44(%rbp), %edi
	callq	_mrb_fixnum
	movl	%eax, -52(%rbp)
	jmp	LBB0_13
LBB0_15:
	movq	_E_ARGUMENT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	callq	_mrb_raise
	jmp	LBB0_20
LBB0_11:
	movl	-44(%rbp), %edi
	callq	_mrb_fixnum
	movb	%al, -52(%rbp)
	leaq	-52(%rbp), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"o|io"

	.comm	_E_ARGUMENT_ERROR,4,2           ## @E_ARGUMENT_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"level is not an integer"

	.comm	_MRB_TT_TRUE,8,3                ## @MRB_TT_TRUE
	.comm	_MRB_TT_FALSE,8,3               ## @MRB_TT_FALSE
	.comm	_IP_MULTICAST_TTL,4,2           ## @IP_MULTICAST_TTL
	.comm	_IP_MULTICAST_LOOP,4,2          ## @IP_MULTICAST_LOOP
L_.str.2:                               ## @.str.2
	.asciz	"optval should be true, false, an integer, or a string"

L_.str.3:                               ## @.str.3
	.asciz	"Socket::Option"

L_.str.4:                               ## @.str.4
	.asciz	"not an instance of Socket::Option"

L_.str.5:                               ## @.str.5
	.asciz	"level"

L_.str.6:                               ## @.str.6
	.asciz	"optname"

L_.str.7:                               ## @.str.7
	.asciz	"data"

L_.str.8:                               ## @.str.8
	.asciz	"wrong number of arguments (%S for 3)"

L_.str.9:                               ## @.str.9
	.asciz	"setsockopt"

	.no_dead_strip	_mrb_basicsocket_setsockopt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mrb_basicsocket_setsockopt
_mrb_basicsocket_setsockopt:            ; @mrb_basicsocket_setsockopt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #4
	add	x3, sp, #12
	add	x4, sp, #8
	bl	_mrb_get_args
	cmp	w0, #1
	b.eq	LBB0_10
; %bb.1:
	cmp	w0, #3
	b.ne	LBB0_13
; %bb.2:
	ldr	w0, [sp, #4]
	bl	_mrb_fixnum_p
	cbnz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_4:
	ldr	w0, [sp, #4]
	bl	_mrb_fixnum
	mov	x21, x0
	ldr	w0, [sp, #8]
	bl	_mrb_string_p
	cbnz	x0, LBB0_14
; %bb.5:
	ldr	w0, [sp, #8]
	bl	_mrb_type
Lloh7:
	adrp	x8, _MRB_TT_TRUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MRB_TT_TRUE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_mrb_type
Lloh10:
	adrp	x8, _MRB_TT_FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MRB_TT_FALSE@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_17
LBB0_7:
	ldr	w0, [sp, #8]
	bl	_mrb_test
	cmp	x0, #0
	cset	w8, ne
	str	w8, [sp]
LBB0_8:
	mov	x1, sp
	mov	x0, x19
	mov	w2, #4
LBB0_9:
	bl	_mrb_str_new
	str	w0, [sp, #8]
	b	LBB0_14
LBB0_10:
	ldr	w1, [sp, #4]
	mov	x0, x19
	bl	_mrb_obj_classname
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.11:
Lloh15:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.4@PAGE
Lloh19:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
LBB0_12:
	ldr	w1, [sp, #4]
Lloh20:
	adrp	x2, l_.str.5@PAGE
Lloh21:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_mrb_funcall
	bl	_mrb_fixnum
	mov	x21, x0
	ldr	w1, [sp, #4]
Lloh22:
	adrp	x2, l_.str.6@PAGE
Lloh23:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_mrb_funcall
	bl	_mrb_fixnum
	str	w0, [sp, #12]
	ldr	w1, [sp, #4]
Lloh24:
	adrp	x2, l_.str.7@PAGE
Lloh25:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_mrb_funcall
	str	w0, [sp, #8]
	b	LBB0_14
LBB0_13:
Lloh26:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
	bl	_mrb_fixnum_value
	mov	x3, x0
Lloh29:
	adrp	x2, l_.str.8@PAGE
Lloh30:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_mrb_raisef
	mov	w21, #0
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_socket_fd
	mov	x20, x0
	ldp	w0, w22, [sp, #8]
	bl	_RSTRING_PTR
	mov	x23, x0
	ldr	w0, [sp, #8]
	bl	_RSTRING_LEN
	mov	x4, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_setsockopt
	cmn	w0, #1
	b.ne	LBB0_16
; %bb.15:
Lloh31:
	adrp	x1, l_.str.9@PAGE
Lloh32:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_mrb_sys_fail
LBB0_16:
	mov	w0, #0
	bl	_mrb_fixnum_value
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
	ldr	w0, [sp, #8]
	bl	_mrb_fixnum_p
	cbz	x0, LBB0_21
; %bb.18:
	ldr	w8, [sp, #12]
Lloh33:
	adrp	x9, _IP_MULTICAST_TTL@GOTPAGE
Lloh34:
	ldr	x9, [x9, _IP_MULTICAST_TTL@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_22
; %bb.19:
Lloh36:
	adrp	x9, _IP_MULTICAST_LOOP@GOTPAGE
Lloh37:
	ldr	x9, [x9, _IP_MULTICAST_LOOP@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_22
; %bb.20:
	ldr	w0, [sp, #8]
	bl	_mrb_fixnum
	str	w0, [sp]
	b	LBB0_8
LBB0_21:
Lloh39:
	adrp	x8, _E_ARGUMENT_ERROR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _E_ARGUMENT_ERROR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x2, l_.str.2@PAGE
Lloh43:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mrb_raise
	b	LBB0_14
LBB0_22:
	ldr	w0, [sp, #8]
	bl	_mrb_fixnum
	strb	w0, [sp]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #1
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"o|io"

	.comm	_E_ARGUMENT_ERROR,4,2           ; @E_ARGUMENT_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"level is not an integer"

	.comm	_MRB_TT_TRUE,8,3                ; @MRB_TT_TRUE
	.comm	_MRB_TT_FALSE,8,3               ; @MRB_TT_FALSE
	.comm	_IP_MULTICAST_TTL,4,2           ; @IP_MULTICAST_TTL
	.comm	_IP_MULTICAST_LOOP,4,2          ; @IP_MULTICAST_LOOP
l_.str.2:                               ; @.str.2
	.asciz	"optval should be true, false, an integer, or a string"

l_.str.3:                               ; @.str.3
	.asciz	"Socket::Option"

l_.str.4:                               ; @.str.4
	.asciz	"not an instance of Socket::Option"

l_.str.5:                               ; @.str.5
	.asciz	"level"

l_.str.6:                               ; @.str.6
	.asciz	"optname"

l_.str.7:                               ; @.str.7
	.asciz	"data"

l_.str.8:                               ; @.str.8
	.asciz	"wrong number of arguments (%S for 3)"

l_.str.9:                               ; @.str.9
	.asciz	"setsockopt"

	.no_dead_strip	_mrb_basicsocket_setsockopt
.subsections_via_symbols
