Try compiling your file with -S, eg xcrun swiftc -Ounchecked -S adler.swift. I get the below output for the closure passed to withUnsafeBytes, which is where the inner loop is contained. I don't see anything obviously wrong here except for the byte-at-a-time memory accesses that @harlanhaskins already pointed out.
_$s5adler15adler32Checksum2ofs6UInt32V10Foundation4DataV_tFySWXEfU_:
sub sp, sp, #16
cbz x0, LBB2_20
sub x8, x1, x0
cmp x8, #1
b.ne LBB2_4
cmp x1, x0
b.ne LBB2_7
mov w9, #0
cmp x1, x0
b.ne LBB2_8
b LBB2_9
LBB2_4:
cmp x8, #15
b.le LBB2_9
mov w9, #5552
cmp x8, x9
b.ge LBB2_12
mov x9, #0
b LBB2_19
LBB2_7:
ldrb w9, [x0]
cmp x1, x0
b.eq LBB2_9
LBB2_8:
ldr w8, [x2]
add w8, w8, w9
mov w9, #32881
movk w9, #32775, lsl #16
umull x9, w8, w9
lsr x9, x9, #47
mov w10, #65521
msub w8, w9, w10, w8
str w8, [x2]
ldr w9, [x3]
add w8, w9, w8
b LBB2_21
LBB2_9:
cmp x8, #1
b.lt LBB2_20
mov x9, #0
LBB2_11:
ldrb w10, [x0, x9]
ldr w11, [x2]
add w10, w11, w10
str w10, [x2]
ldr w11, [x3]
add w10, w11, w10
str w10, [x3]
add x9, x9, #1
cmp x9, x8
b.lt LBB2_11
b LBB2_20
LBB2_12:
mov x9, #0
mov w10, #32881
movk w10, #32775, lsl #16
mov w11, #65521
mov x12, #-5552
mov w13, #11103
mov x15, x8
LBB2_13:
mov x14, x15
mov w15, #348
LBB2_14:
add x16, x0, x9
ldrb w17, [x16]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #1]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #2]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #3]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #4]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #5]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #6]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #7]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #8]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #9]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #10]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #11]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #12]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #13]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w17, [x16, #14]
ldr w1, [x2]
add w17, w1, w17
str w17, [x2]
ldr w1, [x3]
add w17, w1, w17
str w17, [x3]
ldrb w16, [x16, #15]
ldr w17, [x2]
add w16, w17, w16
str w16, [x2]
ldr w17, [x3]
add w16, w17, w16
str w16, [x3]
ldr w16, [x2]
mul x17, x16, x10
lsr x17, x17, #47
msub w16, w17, w11, w16
str w16, [x2]
ldr w16, [x3]
mul x17, x16, x10
lsr x17, x17, #47
msub w16, w17, w11, w16
str w16, [x3]
add x9, x9, #16
sub x15, x15, #1
cmp x15, #1
b.hi LBB2_14
add x15, x14, x12
cmp x14, x13
b.gt LBB2_13
mov w10, #5553
cmp x14, x10
b.ge LBB2_19
add sp, sp, #16
ret
LBB2_18:
ldrb w10, [x0, x9]
ldr w11, [x2]
add w10, w11, w10
str w10, [x2]
ldr w11, [x3]
add w10, w11, w10
str w10, [x3]
add x9, x9, #1
LBB2_19:
cmp x9, x8
b.lt LBB2_18
LBB2_20:
ldr w8, [x2]
mov w9, #32881
movk w9, #32775, lsl #16
mul x9, x8, x9
lsr x9, x9, #47
mov w10, #65521
msub w8, w9, w10, w8
str w8, [x2]
ldr w8, [x3]
LBB2_21:
mov w9, #32881
movk w9, #32775, lsl #16
umull x9, w8, w9
lsr x9, x9, #47
mov w10, #65521
msub w8, w9, w10, w8
str w8, [x3]
add sp, sp, #16
ret