	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cloudabi64_fetch_syscall_args
_cloudabi64_fetch_syscall_args:         ## @cloudabi64_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
	movq	40(%rdi), %rax
	movq	(%rax), %rcx
	movq	%rcx, 8(%rdi)
	movq	_CLOUDABI64_SYS_MAXSYSCALL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_1
## %bb.2:
	movq	_cloudabi64_sysent@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	leaq	(%rdx,%rcx,4), %rsi
	movq	%rsi, 24(%rdi)
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, 32(%rdi)
	movl	28(%rax), %ecx
	movq	16(%rdi), %rdx
	movl	%ecx, (%rdx)
	movl	24(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movl	8(%rax), %ecx
	movl	%ecx, 8(%rdx)
	movl	20(%rax), %ecx
	movl	%ecx, 12(%rdx)
	movl	16(%rax), %ecx
	movl	%ecx, 16(%rdx)
	movl	12(%rax), %ecx
	movl	%ecx, 20(%rdx)
	movq	(%rdi), %rcx
	movl	$0, (%rcx)
	movl	8(%rax), %eax
	movl	%eax, 4(%rcx)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOUDABI64_SYS_MAXSYSCALL,8,3  ## @CLOUDABI64_SYS_MAXSYSCALL
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_cloudabi64_sysent,8,3          ## @cloudabi64_sysent
	.no_dead_strip	_cloudabi64_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 cloudabi64_fetch_syscall_args
_cloudabi64_fetch_syscall_args:         ; @cloudabi64_fetch_syscall_args
	.cfi_startproc
; %bb.0:
	ldr	x9, [x0, #40]
	ldr	x10, [x9]
	str	x10, [x0, #8]
Lloh0:
	adrp	x11, _CLOUDABI64_SYS_MAXSYSCALL@GOTPAGE
Lloh1:
	ldr	x11, [x11, _CLOUDABI64_SYS_MAXSYSCALL@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.hs	LBB0_2
; %bb.1:
	mov	x8, x0
	mov	w0, #0
Lloh3:
	adrp	x11, _cloudabi64_sysent@GOTPAGE
Lloh4:
	ldr	x11, [x11, _cloudabi64_sysent@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	lsl	x10, x10, #2
	add	x12, x11, x10
	str	x12, [x8, #24]
	ldr	w10, [x11, x10]
	str	w10, [x8, #32]
	ldr	w10, [x9, #28]
	ldr	x11, [x8, #16]
	str	w10, [x11]
	ldr	w10, [x9, #24]
	str	w10, [x11, #4]
	ldr	w10, [x9, #8]
	str	w10, [x11, #8]
	ldr	w10, [x9, #20]
	str	w10, [x11, #12]
	ldr	w10, [x9, #16]
	str	w10, [x11, #16]
	ldr	w10, [x9, #12]
	str	w10, [x11, #20]
	ldr	x8, [x8]
	str	wzr, [x8]
	ldr	w9, [x9, #8]
	str	w9, [x8, #4]
	ret
LBB0_2:
Lloh6:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOUDABI64_SYS_MAXSYSCALL,8,3  ; @CLOUDABI64_SYS_MAXSYSCALL
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_cloudabi64_sysent,8,3          ; @cloudabi64_sysent
	.no_dead_strip	_cloudabi64_fetch_syscall_args
.subsections_via_symbols
