	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cloudabi32_fetch_syscall_args
_cloudabi32_fetch_syscall_args:         ## @cloudabi32_fetch_syscall_args
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %r14
	movq	(%r14), %rax
	movq	%rax, 16(%rdi)
	movq	_CLOUDABI32_SYS_MAXSYSCALL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_cloudabi32_sysent@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rcx,%rax,4), %rdx
	movq	%rdx, 40(%rdi)
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 24(%rdi)
	movl	32(%r14), %eax
	movq	32(%rdi), %rsi
	movl	%eax, (%rsi)
	movl	8(%r14), %eax
	movl	%eax, 4(%rsi)
	movl	28(%r14), %eax
	movl	%eax, 8(%rsi)
	movl	24(%r14), %eax
	movl	%eax, 12(%rsi)
	movl	24(%rdi), %eax
	cmpl	$5, %eax
	jl	LBB0_4
## %bb.3:
	movq	16(%r14), %rdi
	addq	$16, %rsi
	leal	-16(,%rax,4), %edx
	callq	_copyin
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movq	(%rbx), %rax
	movl	$0, (%rax)
	movl	8(%r14), %ecx
	movl	%ecx, 4(%rax)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOUDABI32_SYS_MAXSYSCALL,8,3  ## @CLOUDABI32_SYS_MAXSYSCALL
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_cloudabi32_sysent,8,3          ## @cloudabi32_sysent
	.no_dead_strip	_cloudabi32_fetch_syscall_args
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cloudabi32_fetch_syscall_args
_cloudabi32_fetch_syscall_args:         ; @cloudabi32_fetch_syscall_args
	.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
	ldr	x20, [x0, #8]
	ldr	x8, [x20]
	str	x8, [x0, #16]
Lloh0:
	adrp	x9, _CLOUDABI32_SYS_MAXSYSCALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CLOUDABI32_SYS_MAXSYSCALL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x9, _cloudabi32_sysent@GOTPAGE
Lloh4:
	ldr	x9, [x9, _cloudabi32_sysent@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	lsl	x8, x8, #2
	add	x10, x9, x8
	str	x10, [x0, #40]
	ldr	w8, [x9, x8]
	str	w8, [x0, #24]
	ldr	w9, [x20, #32]
	ldr	x8, [x0, #32]
	str	w9, [x8]
	ldr	w9, [x20, #8]
	str	w9, [x8, #4]
	ldr	w9, [x20, #28]
	str	w9, [x8, #8]
	ldr	w9, [x20, #24]
	str	w9, [x8, #12]
	ldr	w9, [x0, #24]
	cmp	w9, #5
	b.lt	LBB0_3
; %bb.2:
	ldr	x0, [x20, #16]
	add	x1, x8, #16
	lsl	w8, w9, #2
	sub	w2, w8, #16
	bl	_copyin
	cbnz	w0, LBB0_5
LBB0_3:
	mov	w0, #0
	ldr	x8, [x19]
	str	wzr, [x8]
	ldr	w9, [x20, #8]
	str	w9, [x8, #4]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOUDABI32_SYS_MAXSYSCALL,8,3  ; @CLOUDABI32_SYS_MAXSYSCALL
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_cloudabi32_sysent,8,3          ; @cloudabi32_sysent
	.no_dead_strip	_cloudabi32_fetch_syscall_args
.subsections_via_symbols
