	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_getsockopt                 ## -- Begin function sys_getsockopt
	.p2align	4, 0x90
_sys_getsockopt:                        ## @sys_getsockopt
	.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	%r8d, %r15d
	movl	%ecx, %r8d
	movl	%edx, %r14d
	movl	%esi, %r13d
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r14d, %ecx
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%r15d, %r9d
	callq	_STRACE
	movl	%ebx, %edi
	callq	_sock_getfd
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	%r15d, %edi
	callq	_user_get
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_20
LBB0_1:
	movq	__EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_20
LBB0_4:
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rsi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_user_read
	testq	%rax, %rax
	je	LBB0_5
LBB0_17:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_5:
	movq	_SOL_SOCKET_@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_11
## %bb.6:
	movq	_SO_DOMAIN_@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_SO_TYPE_@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_SO_PROTOCOL_@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_9
## %bb.10:
	movq	_SO_PEERCRED_@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_9
LBB0_11:
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_sock_opt_to_real
	testl	%eax, %eax
	js	LBB0_9
## %bb.12:
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_sock_level_to_real
	testl	%eax, %eax
	js	LBB0_9
## %bb.13:
	movl	(%r12), %edi
	leaq	-48(%rbp), %rcx
	leaq	-64(%rbp), %r8
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_getsockopt
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movl	-64(%rbp), %esi
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	xorl	%eax, %eax
	callq	_user_put
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:
	leaq	-48(%rbp), %rsi
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_user_put
	testq	%rax, %rax
	jne	LBB0_17
	jmp	LBB0_19
LBB0_9:
	movq	__EINVAL@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %ebx
LBB0_19:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rsp
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%eax, %eax
	callq	_errno_map
	movl	%eax, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getsockopt(%d, %d, %d, %#x, %#x)"

	.comm	__EBADF,4,2                     ## @_EBADF
	.comm	__EFAULT,4,2                    ## @_EFAULT
	.comm	_SOL_SOCKET_,4,2                ## @SOL_SOCKET_
	.comm	_SO_DOMAIN_,4,2                 ## @SO_DOMAIN_
	.comm	_SO_TYPE_,4,2                   ## @SO_TYPE_
	.comm	_SO_PROTOCOL_,4,2               ## @SO_PROTOCOL_
	.comm	__EINVAL,4,2                    ## @_EINVAL
	.comm	_SO_PEERCRED_,4,2               ## @SO_PEERCRED_
	.comm	_peer_lock,4,2                  ## @peer_lock
	.comm	_AF_LOCAL_,8,3                  ## @AF_LOCAL_
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_getsockopt                 ; -- Begin function sys_getsockopt
	.p2align	2
_sys_getsockopt:                        ; @sys_getsockopt
	.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, x4
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	mov	x4, x19
	mov	x5, x20
	bl	_STRACE
	mov	x0, x22
	bl	_sock_getfd
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	mov	x0, x20
	bl	_user_get
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, __EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_3:
Lloh5:
	adrp	x8, __EBADF@GOTPAGE
Lloh6:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_4:
	mov	x24, sp
	add	x1, sp, #12
	mov	x0, x19
	bl	_user_read
	cbz	x0, LBB0_6
LBB0_5:
Lloh8:
	adrp	x8, __EFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
	b	LBB0_15
LBB0_6:
Lloh10:
	adrp	x8, _SOL_SOCKET_@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOL_SOCKET_@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.7:
Lloh13:
	adrp	x8, _SO_DOMAIN_@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SO_DOMAIN_@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _SO_TYPE_@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SO_TYPE_@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _SO_PROTOCOL_@GOTPAGE
Lloh20:
	ldr	x10, [x10, _SO_PROTOCOL_@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	cmp	w8, w23
	ccmp	w9, w23, #4, ne
	ccmp	w10, w23, #4, ne
	b.eq	LBB0_14
; %bb.8:
Lloh22:
	adrp	x8, _SO_PEERCRED_@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SO_PEERCRED_@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w23
	b.eq	LBB0_14
LBB0_9:
	mov	x0, x23
	mov	x1, x21
	bl	_sock_opt_to_real
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	x23, x0
	mov	x0, x21
	bl	_sock_level_to_real
	tbnz	w0, #31, LBB0_14
; %bb.11:
	mov	x1, x0
	ldr	w0, [x22]
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x2, x23
	bl	_getsockopt
	tbnz	w0, #31, LBB0_18
; %bb.12:
	ldr	w8, [sp, #8]
	str	x8, [sp]
	mov	x0, x20
	bl	_user_put
	cbnz	x0, LBB0_5
; %bb.13:
	add	x8, sp, #12
	str	x8, [sp]
	mov	x0, x19
	bl	_user_put
Lloh25:
	adrp	x8, __EFAULT@GOTPAGE
Lloh26:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
	b	LBB0_16
LBB0_14:
Lloh28:
	adrp	x8, __EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
LBB0_16:
	mov	sp, x24
LBB0_17:
	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_18:
	bl	_errno_map
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getsockopt(%d, %d, %d, %#x, %#x)"

	.comm	__EBADF,4,2                     ; @_EBADF
	.comm	__EFAULT,4,2                    ; @_EFAULT
	.comm	_SOL_SOCKET_,4,2                ; @SOL_SOCKET_
	.comm	_SO_DOMAIN_,4,2                 ; @SO_DOMAIN_
	.comm	_SO_TYPE_,4,2                   ; @SO_TYPE_
	.comm	_SO_PROTOCOL_,4,2               ; @SO_PROTOCOL_
	.comm	__EINVAL,4,2                    ; @_EINVAL
	.comm	_SO_PEERCRED_,4,2               ; @SO_PEERCRED_
	.comm	_peer_lock,4,2                  ; @peer_lock
	.comm	_AF_LOCAL_,8,3                  ; @AF_LOCAL_
.subsections_via_symbols
