#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int __breakpoint__inner_inv(int /*<<< orphan*/ **, size_t *, size_t *, size_t *,
                            size_t *);
int __breakpoint__outer_inv(int /*<<< orphan*/ **, size_t *, size_t *, size_t *,
                            size_t *);
void multiple_array_inc(uint8_t a[], size_t n, size_t m) {
  size_t i, j;
  for (j = 0; __breakpoint__outer_inv(&a, &n, &m, &i, &j), j < m; ++j) {
    for (i = 0; __breakpoint__inner_inv(&a, &n, &m, &i, &j), i < n; ++i) {
      ++a[i];
    }
  }
}


x86 assembly (clang, -O0):
<multiple_array_inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
call   1030 <__breakpoint__outer_inv@plt>
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    11ca <multiple_array_inc+0xaa>
movq   $0x0,-0x20(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
call   1040 <__breakpoint__inner_inv@plt>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    11b4 <multiple_array_inc+0x94>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    116b <multiple_array_inc+0x4b>
jmp    11b9 <multiple_array_inc+0x99>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    113c <multiple_array_inc+0x1c>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiple_array_inc>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %rdi,0x28(%rsp)
mov    %rsi,0x20(%rsp)
mov    %rdx,0x18(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x28(%rsp),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1030 <__breakpoint__outer_inv@plt>
mov    0x8(%rsp),%rax
cmp    0x18(%rsp),%rax
jae    11f4 <multiple_array_inc+0xd4>
lea    0x28(%rsp),%r14
lea    0x20(%rsp),%r15
lea    0x18(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0x8(%rsp),%rbx
jmp    11b6 <multiple_array_inc+0x96>
xchg   %ax,%ax
addq   $0x1,0x8(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
call   1030 <__breakpoint__outer_inv@plt>
mov    0x8(%rsp),%rax
cmp    0x18(%rsp),%rax
jae    11f4 <multiple_array_inc+0xd4>
movq   $0x0,0x10(%rsp)
nop
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
call   1040 <__breakpoint__inner_inv@plt>
mov    0x10(%rsp),%rax
cmp    0x20(%rsp),%rax
jae    1190 <multiple_array_inc+0x70>
mov    0x28(%rsp),%rcx
addl   $0x1,(%rcx,%rax,4)
add    $0x1,%rax
mov    %rax,0x10(%rsp)
jmp    11c0 <multiple_array_inc+0xa0>
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @multiple_array_inc(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i64 0, i64* %8
br label %9
9: ; preds = %30, %3
%10 = call i32 @__breakpoint__outer_inv(i32** %4, i64* %5, i64* %6, i64* %7, i64* %8)
%11 = load i64, i64* %8
%12 = load i64, i64* %6
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %33
14: ; preds = %9
store i64 0, i64* %7
br label %15
15: ; preds = %26, %14
%16 = call i32 @__breakpoint__inner_inv(i32** %4, i64* %5, i64* %6, i64* %7, i64* %8)
%17 = load i64, i64* %7
%18 = load i64, i64* %5
%19 = icmp ult i64 %17, %18
br i1 %19, label %20, label %29
20: ; preds = %15
%21 = load i32*, i32** %4
%22 = load i64, i64* %7
%23 = getelementptr inbounds i32, i32* %21, i64 %22
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 1
store i32 %25, i32* %23
br label %26
26: ; preds = %20
%27 = load i64, i64* %7
%28 = add i64 %27, 1
store i64 %28, i64* %7
br label %15
29: ; preds = %15
br label %30
30: ; preds = %29
%31 = load i64, i64* %8
%32 = add i64 %31, 1
store i64 %32, i64* %8
br label %9
33: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @multiple_array_inc(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = bitcast i64* %7 to i8*
%10 = bitcast i64* %8 to i8*
store i64 0, i64* %8
%11 = call i32 @__breakpoint__outer_inv(i32** %4, i64* %5, i64* %6, i64* %7, i64* %8)
%12 = load i64, i64* %8
%13 = load i64, i64* %6
%14 = icmp ult i64 %12, %13
br i1 %14, label %15, label %38
15: ; preds = %3, %31
store i64 0, i64* %7
%16 = call i32 @__breakpoint__inner_inv(i32** %4, i64* %5, i64* %6, i64* %7, i64* %8)
%17 = load i64, i64* %7
%18 = load i64, i64* %5
%19 = icmp ult i64 %17, %18
br i1 %19, label %20, label %31
20: ; preds = %15, %20
%21 = phi i64 [ %28, %20 ], [ %17, %15 ]
%22 = load i32*, i32** %4
%23 = getelementptr inbounds i32, i32* %22, i64 %21
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 1
store i32 %25, i32* %23
%26 = add nuw i64 %21, 1
store i64 %26, i64* %7
%27 = call i32 @__breakpoint__inner_inv(i32** %4, i64* %5, i64* %6, i64* %7, i64* %8)
%28 = load i64, i64* %7
%29 = load i64, i64* %5
%30 = icmp ult i64 %28, %29
br i1 %30, label %20, label %31
31: ; preds = %20, %15
%32 = load i64, i64* %8
%33 = add i64 %32, 1
store i64 %33, i64* %8
%34 = call i32 @__breakpoint__outer_inv(i32** %4, i64* %5, i64* %6, i64* %7, i64* %8)
%35 = load i64, i64* %8
%36 = load i64, i64* %6
%37 = icmp ult i64 %35, %36
br i1 %37, label %15, label %38
38: ; preds = %31, %3
ret void
}