#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*/ test_add(int, int, int, int, int, int);
int main(int argc, char **argv) {
  test_add(10, 99, 0, 0, 10, 99);
  test_add(0, 0, 1, 20, 1, 20);
  test_add(10, 99, 1, 20, 12, 19);
  test_add(10, 20, 1, 99, 12, 19);
  test_add(-10, 99, 1, 20, -9, 79);
  test_add(-10, 20, 1, 99, -8, 21);
  test_add(10, 99, -1, 20, 9, 79);
  test_add(10, 20, -1, 99, 8, 21);
  test_add(-10, 99, -1, 20, -12, 19);
  test_add(-10, 20, -1, 99, -12, 19);
  test_add(20000, 10, 32000, 1, 32767, 99);
  test_add(32767, 80, 0, 19, 32767, 99);
  test_add(32767, 80, 0, 20, 32767, 99);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%r8d
mov    $0x63,%r9d
xor    %ecx,%ecx
mov    %r8d,%edi
mov    %r9d,%esi
mov    %ecx,%edx
call   1030 <test_add@plt>
xor    %esi,%esi
mov    $0x1,%r8d
mov    $0x14,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r9d,%ecx
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x63,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
mov    $0xc,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x63,%ecx
mov    $0xc,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x63,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
mov    $0xfffffff7,%r8d
mov    $0x4f,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x63,%ecx
mov    $0xfffffff8,%r8d
mov    $0x15,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x63,%esi
mov    $0xffffffff,%edx
mov    $0x14,%ecx
mov    $0x9,%r8d
mov    $0x4f,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x14,%esi
mov    $0xffffffff,%edx
mov    $0x63,%ecx
mov    $0x8,%r8d
mov    $0x15,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x63,%esi
mov    $0xffffffff,%edx
mov    $0x14,%ecx
mov    $0xfffffff4,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x14,%esi
mov    $0xffffffff,%edx
mov    $0x63,%ecx
mov    $0xfffffff4,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0x4e20,%edi
mov    $0xa,%esi
mov    $0x7d00,%edx
mov    $0x1,%ecx
mov    $0x7fff,%r8d
mov    $0x63,%r9d
call   1030 <test_add@plt>
mov    $0x7fff,%r8d
mov    $0x50,%esi
xor    %edx,%edx
mov    $0x13,%ecx
mov    $0x63,%r9d
mov    %r8d,%edi
call   1030 <test_add@plt>
mov    $0x7fff,%r8d
mov    $0x50,%esi
xor    %edx,%edx
mov    $0x14,%ecx
mov    $0x63,%r9d
mov    %r8d,%edi
call   1030 <test_add@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x63,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0xa,%r8d
mov    $0x63,%r9d
call   1030 <test_add@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
mov    $0x1,%r8d
mov    $0x14,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x63,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
mov    $0xc,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x63,%ecx
mov    $0xc,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x63,%esi
mov    $0x1,%edx
mov    $0x14,%ecx
mov    $0xfffffff7,%r8d
mov    $0x4f,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x14,%esi
mov    $0x1,%edx
mov    $0x63,%ecx
mov    $0xfffffff8,%r8d
mov    $0x15,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x63,%esi
mov    $0xffffffff,%edx
mov    $0x14,%ecx
mov    $0x9,%r8d
mov    $0x4f,%r9d
call   1030 <test_add@plt>
mov    $0xa,%edi
mov    $0x14,%esi
mov    $0xffffffff,%edx
mov    $0x63,%ecx
mov    $0x8,%r8d
mov    $0x15,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x63,%esi
mov    $0xffffffff,%edx
mov    $0x14,%ecx
mov    $0xfffffff4,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0xfffffff6,%edi
mov    $0x14,%esi
mov    $0xffffffff,%edx
mov    $0x63,%ecx
mov    $0xfffffff4,%r8d
mov    $0x13,%r9d
call   1030 <test_add@plt>
mov    $0x4e20,%edi
mov    $0xa,%esi
mov    $0x7d00,%edx
mov    $0x1,%ecx
mov    $0x7fff,%r8d
mov    $0x63,%r9d
call   1030 <test_add@plt>
mov    $0x7fff,%edi
mov    $0x50,%esi
xor    %edx,%edx
mov    $0x13,%ecx
mov    $0x7fff,%r8d
mov    $0x63,%r9d
call   1030 <test_add@plt>
mov    $0x7fff,%edi
mov    $0x50,%esi
xor    %edx,%edx
mov    $0x14,%ecx
mov    $0x7fff,%r8d
mov    $0x63,%r9d
call   1030 <test_add@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @test_add(i32 10, i32 99, i32 0, i32 0, i32 10, i32 99)
%7 = call i32 @test_add(i32 0, i32 0, i32 1, i32 20, i32 1, i32 20)
%8 = call i32 @test_add(i32 10, i32 99, i32 1, i32 20, i32 12, i32 19)
%9 = call i32 @test_add(i32 10, i32 20, i32 1, i32 99, i32 12, i32 19)
%10 = call i32 @test_add(i32 -10, i32 99, i32 1, i32 20, i32 -9, i32 79)
%11 = call i32 @test_add(i32 -10, i32 20, i32 1, i32 99, i32 -8, i32 21)
%12 = call i32 @test_add(i32 10, i32 99, i32 -1, i32 20, i32 9, i32 79)
%13 = call i32 @test_add(i32 10, i32 20, i32 -1, i32 99, i32 8, i32 21)
%14 = call i32 @test_add(i32 -10, i32 99, i32 -1, i32 20, i32 -12, i32 19)
%15 = call i32 @test_add(i32 -10, i32 20, i32 -1, i32 99, i32 -12, i32 19)
%16 = call i32 @test_add(i32 20000, i32 10, i32 32000, i32 1, i32 32767, i32 99)
%17 = call i32 @test_add(i32 32767, i32 80, i32 0, i32 19, i32 32767, i32 99)
%18 = call i32 @test_add(i32 32767, i32 80, i32 0, i32 20, i32 32767, i32 99)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_add(i32 10, i32 99, i32 0, i32 0, i32 10, i32 99)
%4 = tail call i32 @test_add(i32 0, i32 0, i32 1, i32 20, i32 1, i32 20)
%5 = tail call i32 @test_add(i32 10, i32 99, i32 1, i32 20, i32 12, i32 19)
%6 = tail call i32 @test_add(i32 10, i32 20, i32 1, i32 99, i32 12, i32 19)
%7 = tail call i32 @test_add(i32 -10, i32 99, i32 1, i32 20, i32 -9, i32 79)
%8 = tail call i32 @test_add(i32 -10, i32 20, i32 1, i32 99, i32 -8, i32 21)
%9 = tail call i32 @test_add(i32 10, i32 99, i32 -1, i32 20, i32 9, i32 79)
%10 = tail call i32 @test_add(i32 10, i32 20, i32 -1, i32 99, i32 8, i32 21)
%11 = tail call i32 @test_add(i32 -10, i32 99, i32 -1, i32 20, i32 -12, i32 19)
%12 = tail call i32 @test_add(i32 -10, i32 20, i32 -1, i32 99, i32 -12, i32 19)
%13 = tail call i32 @test_add(i32 20000, i32 10, i32 32000, i32 1, i32 32767, i32 99)
%14 = tail call i32 @test_add(i32 32767, i32 80, i32 0, i32 19, i32 32767, i32 99)
%15 = tail call i32 @test_add(i32 32767, i32 80, i32 0, i32 20, i32 32767, i32 99)
ret i32 0
}