	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function translate_to_user
_translate_to_user:                     ## @translate_to_user
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %ecx
	movl	8(%rdi), %eax
	cmpl	$16, 4(%rdi)
	jne	LBB0_5
## %bb.1:
	cmpl	$1, %ecx
	je	LBB0_5
## %bb.2:
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_copy_to_user
	testq	%rax, %rax
	je	LBB0_17
LBB0_4:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	jmp	LBB0_17
LBB0_5:
	cltq
	movslq	12(%rbx), %rsi
	imulq	%rax, %rsi
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	cltd
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	idivl	%esi
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jle	LBB0_16
## %bb.6:
	xorl	%r13d, %r13d
	testl	%ecx, %ecx
	jle	LBB0_13
	.p2align	4, 0x90
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%edi, -60(%rbp,%r14,2)
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r14
	movslq	%ecx, %rax
	cmpq	%rax, %r14
	jge	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$8, 4(%rbx)
	movl	(%r12,%r14,2), %edi
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	callq	_S16_TO_U8
	movb	%al, -60(%rbp,%r14)
	movl	(%rbx), %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%rbx), %edx
	movq	%r15, %rdi
	leaq	-60(%rbp), %rsi
	callq	_copy_to_user
	testq	%rax, %rax
	jne	LBB0_4
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	incl	%r13d
	cmpl	-64(%rbp), %r13d                ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	addq	-72(%rbp), %r12                 ## 8-byte Folded Reload
	movslq	16(%rbx), %rax
	addq	%rax, %r15
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jg	LBB0_8
	jmp	LBB0_13
LBB0_16:
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	imull	-72(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_translate_to_user
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function translate_to_user
_translate_to_user:                     ; @translate_to_user
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldp	w8, w10, [x0]
	ldr	w9, [x0, #8]
	cmp	w10, #16
	ccmp	w8, #1, #4, eq
	ccmp	w9, #1, #0, ne
	b.eq	LBB0_11
; %bb.1:
	mov	x21, x0
	sxtw	x9, w9
	ldrsw	x10, [x0, #12]
	mul	x23, x9, x10
	sdiv	w22, w22, w23
	cmp	w22, #1
	b.lt	LBB0_13
; %bb.2:
	mov	w24, #0
	add	x25, sp, #12
	cmp	w8, #1
	b.lt	LBB0_8
LBB0_3:
	mov	x26, #0
	mov	x27, #0
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	w0, [x25, x26]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x27, #1
	add	x26, x26, #2
	cmp	x27, w8, sxtw
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x21, #4]
	ldr	w0, [x19, x26]
	cmp	w9, #8
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_S16_TO_U8
	strb	w0, [x25, x27]
	ldr	w8, [x21]
	b	LBB0_5
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21, #16]
	add	x1, sp, #12
	mov	x0, x20
	bl	_copy_to_user
	cbnz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w24, w24, #1
	cmp	w24, w22
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x19, x19, x23
	ldrsw	x8, [x21, #16]
	add	x20, x20, x8
	ldr	w8, [x21]
	cmp	w8, #1
	b.ge	LBB0_3
	b	LBB0_8
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_copy_to_user
	cbz	x0, LBB0_14
LBB0_12:
Lloh3:
	adrp	x8, _EFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_13:
	mul	w22, w22, w23
LBB0_14:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_translate_to_user
.subsections_via_symbols
