#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 */

/* Variables and functions */
int /*<<< orphan*/ add(int *, int *);
int /*<<< orphan*/ arrcpy(int *, int *);
int /*<<< orphan*/ negate(int *);
int /*<<< orphan*/ setnull(int *);
void subtract(int a[16], int b[16]) {
  int temp[16];
  setnull(temp);
  arrcpy(temp, b);
  negate(temp);
  int one[16];
  setnull(one);
  one[16 - 1] = 1;
  add(temp, one);
  add(a, temp);
}


x86 assembly (clang, -O0):
<subtract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
call   1060 <setnull@plt>
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <arrcpy@plt>
lea    -0x50(%rbp),%rdi
call   1050 <negate@plt>
lea    -0x90(%rbp),%rdi
call   1060 <setnull@plt>
movl   $0x1,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1030 <add@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <add@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x40(%rsp),%r15
mov    %r15,%rdi
call   1060 <setnull@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <arrcpy@plt>
mov    %r15,%rdi
call   1050 <negate@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <setnull@plt>
movl   $0x1,0x3c(%rsp)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <add@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <add@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @subtract(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [16 x i32]
%6 = alloca [16 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%8 = call i32 @setnull(i32* %7)
%9 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%10 = load i32*, i32** %4
%11 = call i32 @arrcpy(i32* %9, i32* %10)
%12 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%13 = call i32 @negate(i32* %12)
%14 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 0
%15 = call i32 @setnull(i32* %14)
%16 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 15
store i32 1, i32* %16
%17 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%18 = getelementptr inbounds [16 x i32], [16 x i32]* %6, i64 0, i64 0
%19 = call i32 @add(i32* %17, i32* %18)
%20 = load i32*, i32** %3
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %5, i64 0, i64 0
%22 = call i32 @add(i32* %20, i32* %21)
ret void
}

LLVM IR (-O2):
define void @subtract(i32* %0, i32* %1) {
%3 = alloca [16 x i32]
%4 = alloca [16 x i32]
%5 = bitcast [16 x i32]* %3 to i8*
%6 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 0
%7 = call i32 @setnull(i32* %6)
%8 = call i32 @arrcpy(i32* %6, i32* %1)
%9 = call i32 @negate(i32* %6)
%10 = bitcast [16 x i32]* %4 to i8*
%11 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 0
%12 = call i32 @setnull(i32* %11)
%13 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 15
store i32 1, i32* %13
%14 = call i32 @add(i32* %6, i32* %11)
%15 = call i32 @add(i32* %0, i32* %6)
ret void
}