	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cloudabi32_set_syscall_retval
_cloudabi32_set_syscall_retval:         ## @cloudabi32_set_syscall_retval
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpl	$129, %esi
	je	LBB0_8
## %bb.1:
	movq	8(%rdi), %rbx
	cmpl	$128, %esi
	je	LBB0_5
## %bb.2:
	testl	%esi, %esi
	jne	LBB0_6
## %bb.3:
	movl	4(%rdi), %edi
	movq	8(%rbx), %rsi
	movl	$4, %edx
	callq	_copyout
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	_CLOUDABI_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_5:
	movl	24(%rbx), %eax
	subl	%eax, 28(%rbx)
	movq	8(%rbx), %rax
	movq	%rax, 16(%rbx)
	movl	(%rdi), %edi
	movq	_PCB_FULL_IRET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_set_pcb_flags                  ## TAILCALL
LBB0_6:
	movl	%esi, %edi
	callq	_cloudabi_convert_errno
LBB0_7:
	movl	%eax, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOUDABI_EFAULT,4,2            ## @CLOUDABI_EFAULT
	.comm	_PCB_FULL_IRET,4,2              ## @PCB_FULL_IRET
	.no_dead_strip	_cloudabi32_set_syscall_retval
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cloudabi32_set_syscall_retval
_cloudabi32_set_syscall_retval:         ; @cloudabi32_set_syscall_retval
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w1, #129
	b.eq	LBB0_6
; %bb.1:
	ldr	x19, [x0, #8]
	cmp	w1, #128
	b.eq	LBB0_4
; %bb.2:
	cbnz	w1, LBB0_5
; %bb.3:
	ldr	w0, [x0, #4]
	ldr	x1, [x19, #8]
	mov	w2, #4
	bl	_copyout
Lloh0:
	adrp	x8, _CLOUDABI_EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLOUDABI_EFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w8, wzr, w8, eq
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
	ldp	w8, w9, [x19, #24]
	sub	w8, w9, w8
	str	w8, [x19, #28]
	ldr	x8, [x19, #8]
	str	x8, [x19, #16]
	ldr	w0, [x0]
Lloh3:
	adrp	x8, _PCB_FULL_IRET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCB_FULL_IRET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_pcb_flags
LBB0_5:
	mov	x0, x1
	bl	_cloudabi_convert_errno
	str	w0, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOUDABI_EFAULT,4,2            ; @CLOUDABI_EFAULT
	.comm	_PCB_FULL_IRET,4,2              ; @PCB_FULL_IRET
	.no_dead_strip	_cloudabi32_set_syscall_retval
.subsections_via_symbols
