	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prog_page
_prog_page:                             ## @prog_page
	.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	%esi, %r14d
	movq	%rdi, %rbx
	cmpq	$0, 48(%rdi)
	je	LBB0_4
## %bb.1:
	movq	24(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_NS_DBG
	movq	56(%rbx), %rdi
	movslq	32(%rbx), %rcx
	leaq	(%rdi,%rcx,4), %rax
	movslq	36(%rbx), %r12
	leaq	(%rax,%r12,4), %r15
	movq	24(%rbx), %rax
	movl	16(%rbx), %edx
	movl	%edx, %r13d
	imull	%eax, %r13d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	addl	%r12d, %ecx
	addl	%ecx, %r13d
	movq	(%rbx), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.2:
	movl	%r13d, -44(%rbp)
	movq	48(%rbx), %rsi
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_read_file
	cmpl	%r14d, %eax
	je	LBB0_11
## %bb.3:
	movq	24(%rbx), %rsi
	movslq	%eax, %rdx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_30
LBB0_4:
	movq	%rbx, %rdi
	callq	_NS_GET_PAGE
	cmpq	$0, (%rax)
	jne	LBB0_7
## %bb.5:
	movq	%rax, %r15
	movq	24(%rbx), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_NS_DBG
	movl	40(%rbx), %edi
	movq	_GFP_NOFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmem_cache_alloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_49
## %bb.6:
	movl	16(%rbx), %edx
	movq	%rax, %rdi
	movl	$255, %esi
	callq	_memset
LBB0_7:
	movq	%rbx, %rdi
	callq	_NS_PAGE_BYTE_OFF
	testl	%r14d, %r14d
	jle	LBB0_47
## %bb.8:
	movq	8(%rbx), %rdx
	movl	%r14d, %esi
	cmpl	$8, %r14d
	jb	LBB0_9
## %bb.33:
	leaq	(%rdx,%rsi,4), %rcx
	cmpq	%rcx, %rax
	jae	LBB0_35
## %bb.34:
	leaq	(%rax,%rsi,4), %rcx
	cmpq	%rcx, %rdx
	jae	LBB0_35
LBB0_9:
	xorl	%edi, %edi
LBB0_41:
	movq	%rdi, %r8
	notq	%r8
	addq	%rsi, %r8
	movq	%rsi, %rcx
	andq	$3, %rcx
	je	LBB0_43
	.p2align	4, 0x90
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rdi,4), %ebx
	andl	%ebx, (%rax,%rdi,4)
	incq	%rdi
	decq	%rcx
	jne	LBB0_42
LBB0_43:
	xorl	%ecx, %ecx
	cmpq	$3, %r8
	jb	LBB0_48
	.p2align	4, 0x90
LBB0_44:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rdi,4), %ebx
	andl	%ebx, (%rax,%rdi,4)
	movl	4(%rdx,%rdi,4), %ebx
	andl	%ebx, 4(%rax,%rdi,4)
	movl	8(%rdx,%rdi,4), %ebx
	andl	%ebx, 8(%rax,%rdi,4)
	movl	12(%rdx,%rdi,4), %ebx
	andl	%ebx, 12(%rax,%rdi,4)
	addq	$4, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_44
	jmp	LBB0_48
LBB0_10:
	movl	$255, %esi
	callq	_memset
LBB0_11:
	testl	%r14d, %r14d
	jle	LBB0_27
## %bb.12:
	movq	8(%rbx), %rax
	movl	%r14d, %r9d
	cmpl	$8, %r14d
	jb	LBB0_13
## %bb.14:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	%r12, %rcx
	leaq	(%rax,%r9,4), %rdx
	cmpq	%rdx, %r15
	jae	LBB0_16
## %bb.15:
	leaq	(%rcx,%r9), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rdx,4), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_16
LBB0_13:
	xorl	%edx, %edx
LBB0_22:
	movq	%rdx, %rcx
	notq	%rcx
	addq	%r9, %rcx
	movq	%r9, %rsi
	andq	$3, %rsi
	je	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %edi
	andl	%edi, (%r15,%rdx,4)
	incq	%rdx
	decq	%rsi
	jne	LBB0_23
LBB0_24:
	cmpq	$3, %rcx
	jb	LBB0_27
## %bb.25:
	addq	-72(%rbp), %r12                 ## 8-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%r12,4), %rcx
	addq	$12, %rcx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdx,4), %esi
	andl	%esi, -12(%rcx,%rdx,4)
	movl	4(%rax,%rdx,4), %esi
	andl	%esi, -8(%rcx,%rdx,4)
	movl	8(%rax,%rdx,4), %esi
	andl	%esi, -4(%rcx,%rdx,4)
	movl	12(%rax,%rdx,4), %esi
	andl	%esi, (%rcx,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %r9
	jne	LBB0_26
	jmp	LBB0_27
LBB0_16:
	movl	%r9d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_50
## %bb.17:
	movq	%r8, %rdi
	andq	$-2, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rcx
	addq	$48, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rax,%rsi,4), %xmm0
	movups	16(%rax,%rsi,4), %xmm1
	movups	-48(%rcx,%rsi,4), %xmm2
	andps	%xmm0, %xmm2
	movups	-32(%rcx,%rsi,4), %xmm0
	andps	%xmm1, %xmm0
	movups	-16(%rcx,%rsi,4), %xmm1
	movups	(%rcx,%rsi,4), %xmm3
	movups	%xmm2, -48(%rcx,%rsi,4)
	movups	%xmm0, -32(%rcx,%rsi,4)
	movups	32(%rax,%rsi,4), %xmm0
	andps	%xmm1, %xmm0
	movups	48(%rax,%rsi,4), %xmm1
	andps	%xmm3, %xmm1
	movups	%xmm0, -16(%rcx,%rsi,4)
	movups	%xmm1, (%rcx,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_18
## %bb.19:
	testb	$1, %r8b
	je	LBB0_21
LBB0_20:
	movups	(%rax,%rsi,4), %xmm0
	movups	16(%rax,%rsi,4), %xmm1
	movups	(%r15,%rsi,4), %xmm2
	andps	%xmm0, %xmm2
	movups	16(%r15,%rsi,4), %xmm0
	andps	%xmm1, %xmm0
	movups	%xmm2, (%r15,%rsi,4)
	movups	%xmm0, 16(%r15,%rsi,4)
LBB0_21:
	cmpq	%r9, %rdx
	jne	LBB0_22
LBB0_27:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_45
## %bb.28:
	movl	%r13d, -44(%rbp)
	movq	48(%rbx), %rsi
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_write_file
	xorl	%ecx, %ecx
	cmpl	%r14d, %eax
	je	LBB0_48
	jmp	LBB0_29
LBB0_45:
	movl	16(%rbx), %ecx
	movl	24(%rbx), %eax
	imull	%ecx, %eax
	movl	%eax, -44(%rbp)
	movq	48(%rbx), %rsi
	movq	56(%rbx), %rdx
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	callq	_write_file
	cmpl	16(%rbx), %eax
	jne	LBB0_29
## %bb.46:
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	movl	$1, (%rax,%rcx,4)
LBB0_47:
	xorl	%ecx, %ecx
	jmp	LBB0_48
LBB0_29:
	movq	24(%rbx), %rsi
	movslq	%eax, %rdx
	leaq	L_.str.2(%rip), %rdi
LBB0_30:
	xorl	%eax, %eax
	callq	_NS_ERR
LBB0_31:
	movl	$-1, %ecx
LBB0_48:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_49:
	movq	24(%rbx), %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_NS_ERR
	jmp	LBB0_31
LBB0_35:
	movl	%esi, %edi
	andl	$-8, %edi
	leaq	-8(%rdi), %rcx
	movq	%rcx, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rcx, %rcx
	je	LBB0_51
## %bb.36:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rdx,%rcx,4), %xmm0
	movups	16(%rdx,%rcx,4), %xmm1
	movups	(%rax,%rcx,4), %xmm2
	andps	%xmm0, %xmm2
	movups	16(%rax,%rcx,4), %xmm0
	andps	%xmm1, %xmm0
	movups	32(%rax,%rcx,4), %xmm1
	movups	48(%rax,%rcx,4), %xmm3
	movups	%xmm2, (%rax,%rcx,4)
	movups	%xmm0, 16(%rax,%rcx,4)
	movups	32(%rdx,%rcx,4), %xmm0
	andps	%xmm1, %xmm0
	movups	48(%rdx,%rcx,4), %xmm1
	andps	%xmm3, %xmm1
	movups	%xmm0, 32(%rax,%rcx,4)
	movups	%xmm1, 48(%rax,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rbx
	jne	LBB0_37
## %bb.38:
	testb	$1, %r8b
	je	LBB0_40
LBB0_39:
	movups	(%rdx,%rcx,4), %xmm0
	movups	16(%rdx,%rcx,4), %xmm1
	movups	(%rax,%rcx,4), %xmm2
	andps	%xmm0, %xmm2
	movups	16(%rax,%rcx,4), %xmm0
	andps	%xmm1, %xmm0
	movups	%xmm2, (%rax,%rcx,4)
	movups	%xmm0, 16(%rax,%rcx,4)
LBB0_40:
	xorl	%ecx, %ecx
	cmpq	%rsi, %rdi
	je	LBB0_48
	jmp	LBB0_41
LBB0_50:
	xorl	%esi, %esi
	testb	$1, %r8b
	jne	LBB0_20
	jmp	LBB0_21
LBB0_51:
	xorl	%ecx, %ecx
	testb	$1, %r8b
	jne	LBB0_39
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prog_page: writing page %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"prog_page: read error for page %d ret %ld\n"

L_.str.2:                               ## @.str.2
	.asciz	"prog_page: write error for page %d ret %ld\n"

L_.str.3:                               ## @.str.3
	.asciz	"prog_page: allocating page %d\n"

	.comm	_GFP_NOFS,4,2                   ## @GFP_NOFS
L_.str.4:                               ## @.str.4
	.asciz	"prog_page: error allocating memory for page %d\n"

	.no_dead_strip	_prog_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prog_page
_prog_page:                             ; @prog_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x1, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_NS_DBG
	ldr	x22, [x19, #56]
	ldpsw	x25, x26, [x19, #32]
	add	x8, x22, x25, lsl #2
	add	x21, x8, x26, lsl #2
	ldr	x8, [x19, #24]
	ldr	w2, [x19, #16]
	add	w9, w26, w25
	madd	w23, w2, w8, w9
	ldr	x9, [x19]
	ldr	w24, [x9, x8, lsl #2]
	cbz	w24, LBB0_14
; %bb.2:
	str	w23, [sp, #12]
	ldr	x1, [x19, #48]
	add	x4, sp, #12
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_read_file
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w20
	b.eq	LBB0_15
; %bb.3:
	ldr	x1, [x19, #24]
	sxtw	x8, w0
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_32
LBB0_4:
	mov	x0, x19
	bl	_NS_GET_PAGE
	ldr	x8, [x0]
	cbnz	x8, LBB0_7
; %bb.5:
	mov	x21, x0
	ldr	x1, [x19, #24]
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_NS_DBG
	ldr	w0, [x19, #40]
Lloh6:
	adrp	x8, _GFP_NOFS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_NOFS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kmem_cache_alloc
	str	x0, [x21]
	cbz	x0, LBB0_31
; %bb.6:
	ldr	w2, [x19, #16]
	mov	w1, #255
	bl	_memset
LBB0_7:
	mov	x0, x19
	bl	_NS_PAGE_BYTE_OFF
	cmp	w20, #1
	b.lt	LBB0_24
; %bb.8:
	ldr	x9, [x19, #8]
	mov	w8, w20
	cmp	w20, #16
	b.lo	LBB0_11
; %bb.9:
	lsl	x10, x8, #2
	add	x11, x9, x10
	cmp	x0, x11
	b.hs	LBB0_34
; %bb.10:
	add	x10, x0, x10
	cmp	x9, x10
	b.hs	LBB0_34
LBB0_11:
	mov	x10, #0
LBB0_12:
	lsl	x12, x10, #2
	add	x11, x0, x12
	add	x9, x9, x12
	sub	x8, x8, x10
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #4
	ldr	w12, [x11]
	and	w10, w12, w10
	str	w10, [x11], #4
	subs	x8, x8, #1
	b.ne	LBB0_13
	b	LBB0_24
LBB0_14:
	mov	x0, x22
	mov	w1, #255
	bl	_memset
LBB0_15:
	cmp	w20, #1
	b.lt	LBB0_22
; %bb.16:
	ldr	x9, [x19, #8]
	mov	w8, w20
	cmp	w20, #16
	b.lo	LBB0_19
; %bb.17:
	add	x11, x26, x25
	add	x10, x9, x8, lsl #2
	cmp	x21, x10
	b.hs	LBB0_28
; %bb.18:
	add	x10, x11, x8
	add	x10, x22, x10, lsl #2
	cmp	x9, x10
	b.hs	LBB0_28
LBB0_19:
	mov	x10, #0
LBB0_20:
	add	x11, x10, x26
	add	x11, x11, x25
	add	x11, x22, x11, lsl #2
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #4
	ldr	w12, [x11]
	and	w10, w12, w10
	str	w10, [x11], #4
	subs	x8, x8, #1
	b.ne	LBB0_21
LBB0_22:
	cbz	w24, LBB0_25
; %bb.23:
	str	w23, [sp, #12]
	ldr	x1, [x19, #48]
	add	x4, sp, #12
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_write_file
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w20
	b.ne	LBB0_27
LBB0_24:
	mov	w0, #0
	b	LBB0_33
LBB0_25:
	ldr	w8, [x19, #24]
	ldr	w3, [x19, #16]
	mul	w8, w3, w8
	str	w8, [sp, #12]
	ldp	x1, x2, [x19, #48]
	add	x4, sp, #12
	mov	x0, x19
	bl	_write_file
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #16]
	cmp	w0, w8
	b.ne	LBB0_27
; %bb.26:
	mov	w0, #0
	ldr	x8, [x19]
	ldr	x9, [x19, #24]
	mov	w10, #1
	str	w10, [x8, x9, lsl #2]
	b	LBB0_33
LBB0_27:
	ldr	x1, [x19, #24]
	sxtw	x8, w0
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_32
LBB0_28:
	and	x10, x8, #0xfffffff0
	add	x11, x22, x11, lsl #2
	add	x11, x11, #32
	add	x12, x9, #32
	mov	x13, x10
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11]
	and.16b	v0, v4, v0
	and.16b	v1, v5, v1
	and.16b	v2, v6, v2
	and.16b	v3, v7, v3
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_29
; %bb.30:
	cmp	x10, x8
	b.eq	LBB0_22
	b	LBB0_20
LBB0_31:
	ldr	x1, [x19, #24]
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_32:
	bl	_NS_ERR
	mov	w0, #-1
LBB0_33:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_34:
	and	x10, x8, #0xfffffff0
	add	x11, x0, #32
	add	x12, x9, #32
	mov	x13, x10
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11]
	and.16b	v0, v4, v0
	and.16b	v1, v5, v1
	and.16b	v2, v6, v2
	and.16b	v3, v7, v3
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_35
; %bb.36:
	cmp	x10, x8
	b.eq	LBB0_24
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prog_page: writing page %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"prog_page: read error for page %d ret %ld\n"

l_.str.2:                               ; @.str.2
	.asciz	"prog_page: write error for page %d ret %ld\n"

l_.str.3:                               ; @.str.3
	.asciz	"prog_page: allocating page %d\n"

	.comm	_GFP_NOFS,4,2                   ; @GFP_NOFS
l_.str.4:                               ; @.str.4
	.asciz	"prog_page: error allocating memory for page %d\n"

	.no_dead_strip	_prog_page
.subsections_via_symbols
