	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_sigaltstack                ## -- Begin function sys_sigaltstack
	.p2align	4, 0x90
_sys_sigaltstack:                       ## @sys_sigaltstack
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_STRACE
	movq	_current@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	8(%rax), %r15
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_lock
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_altstack_to_user
	movq	-48(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-64(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	_user_put
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	callq	_unlock
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_3:
	testq	%r12, %r12
	je	LBB0_13
## %bb.4:
	movq	(%r13), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_is_on_altstack
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_unlock
	movq	__EPERM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_6:
	movq	-48(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-64(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%r12, %rdi
	callq	_user_get
	testq	%rax, %rax
	jne	LBB0_2
## %bb.8:
	movq	_SS_DISABLE_@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -64(%rbp)
	je	LBB0_10
## %bb.9:
	movl	$0, 12(%r15)
	jmp	LBB0_13
LBB0_10:
	movq	-56(%rbp), %rax
	movq	_MINSIGSTKSZ_@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_12
## %bb.11:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_12:
	movl	-48(%rbp), %ecx
	movl	%ecx, 12(%r15)
	movq	%rax, (%r15)
LBB0_13:
	movq	%r14, %rdi
	callq	_unlock
	xorl	%eax, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sigaltstack(0x%x, 0x%x)"

	.comm	_current,8,3                    ## @current
	.comm	__EFAULT,4,2                    ## @_EFAULT
	.comm	__EPERM,4,2                     ## @_EPERM
	.comm	_SS_DISABLE_,4,2                ## @SS_DISABLE_
	.comm	_MINSIGSTKSZ_,8,3               ## @MINSIGSTKSZ_
	.comm	__ENOMEM,4,2                    ## @_ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_sigaltstack                ; -- Begin function sys_sigaltstack
	.p2align	2
_sys_sigaltstack:                       ; @sys_sigaltstack
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x22
	bl	_STRACE
Lloh2:
	adrp	x23, _current@GOTPAGE
Lloh3:
	ldr	x23, [x23, _current@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x21, [x8, #8]
	add	x19, x21, #8
	mov	x0, x19
	bl	_lock
	cbz	x22, LBB0_3
; %bb.1:
	add	x1, sp, #24
	mov	x0, x21
	bl	_altstack_to_user
	ldur	q0, [sp, #24]
	str	q0, [sp]
	ldr	x8, [sp, #40]
	str	x8, [sp, #16]
	mov	x1, sp
	mov	x0, x22
	bl	_user_put
	cbz	x0, LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_unlock
Lloh4:
	adrp	x8, __EFAULT@GOTPAGE
Lloh5:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_3:
	cbz	x20, LBB0_7
; %bb.4:
	ldr	x8, [x23]
	ldr	w0, [x8]
	mov	x1, x21
	bl	_is_on_altstack
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_unlock
Lloh7:
	adrp	x8, __EPERM@GOTPAGE
Lloh8:
	ldr	x8, [x8, __EPERM@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_6:
	add	x1, sp, #24
	mov	x0, x20
	bl	_user_get
	cbnz	x0, LBB0_2
LBB0_7:
	mov	x0, x19
	bl	_unlock
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sigaltstack(0x%x, 0x%x)"

	.comm	_current,8,3                    ; @current
	.comm	__EFAULT,4,2                    ; @_EFAULT
	.comm	__EPERM,4,2                     ; @_EPERM
	.comm	_SS_DISABLE_,4,2                ; @SS_DISABLE_
	.comm	_MINSIGSTKSZ_,8,3               ; @MINSIGSTKSZ_
	.comm	__ENOMEM,4,2                    ; @_ENOMEM
.subsections_via_symbols
