#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 test_add();
int test_and();
int test_ashr();
int test_icmp();
int test_lshr();
int test_mul();
int test_or();
int test_rem();
int test_sdiv();
int test_select();
int test_sext();
int test_shl();
int test_sub();
int test_trunc();
int test_udiv();
int test_xor();
int test_zext();
int entrypoint(void) {
  return test_add() + test_sub() + test_mul() + test_udiv() + test_sdiv() +
         test_rem() + test_shl() + test_lshr() + test_ashr() + test_and() +
         test_or() + test_xor() + test_sext() + test_zext() + test_trunc() +
         test_icmp() + test_select();
}


x86 assembly (clang, -O0):
<entrypoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1120 <test_add@plt>
mov    %eax,-0x40(%rbp)
mov    $0x0,%al
call   10d0 <test_sub@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    $0x0,%al
call   1040 <test_mul@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    $0x0,%al
call   10a0 <test_udiv@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   10c0 <test_sdiv@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    $0x0,%al
call   1070 <test_rem@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x0,%al
call   10e0 <test_shl@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1130 <test_lshr@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   10b0 <test_ashr@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   10f0 <test_and@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1080 <test_or@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <test_xor@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1110 <test_sext@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1100 <test_zext@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <test_trunc@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <test_icmp@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1090 <test_select@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<entrypoint>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1120 <test_add@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10d0 <test_sub@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1040 <test_mul@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10a0 <test_udiv@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10c0 <test_sdiv@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1070 <test_rem@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10e0 <test_shl@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1130 <test_lshr@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   10b0 <test_ashr@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   10f0 <test_and@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1080 <test_or@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1030 <test_xor@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1110 <test_sext@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1100 <test_zext@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1050 <test_trunc@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %eax,%eax
call   1060 <test_icmp@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1090 <test_select@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @entrypoint() {
%1 = call i32 (...) @test_add()
%2 = call i32 (...) @test_sub()
%3 = add nsw i32 %1, %2
%4 = call i32 (...) @test_mul()
%5 = add nsw i32 %3, %4
%6 = call i32 (...) @test_udiv()
%7 = add nsw i32 %5, %6
%8 = call i32 (...) @test_sdiv()
%9 = add nsw i32 %7, %8
%10 = call i32 (...) @test_rem()
%11 = add nsw i32 %9, %10
%12 = call i32 (...) @test_shl()
%13 = add nsw i32 %11, %12
%14 = call i32 (...) @test_lshr()
%15 = add nsw i32 %13, %14
%16 = call i32 (...) @test_ashr()
%17 = add nsw i32 %15, %16
%18 = call i32 (...) @test_and()
%19 = add nsw i32 %17, %18
%20 = call i32 (...) @test_or()
%21 = add nsw i32 %19, %20
%22 = call i32 (...) @test_xor()
%23 = add nsw i32 %21, %22
%24 = call i32 (...) @test_sext()
%25 = add nsw i32 %23, %24
%26 = call i32 (...) @test_zext()
%27 = add nsw i32 %25, %26
%28 = call i32 (...) @test_trunc()
%29 = add nsw i32 %27, %28
%30 = call i32 (...) @test_icmp()
%31 = add nsw i32 %29, %30
%32 = call i32 (...) @test_select()
%33 = add nsw i32 %31, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @entrypoint() {
%1 = tail call i32 (...) @test_add()
%2 = tail call i32 (...) @test_sub()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @test_mul()
%5 = add nsw i32 %3, %4
%6 = tail call i32 (...) @test_udiv()
%7 = add nsw i32 %5, %6
%8 = tail call i32 (...) @test_sdiv()
%9 = add nsw i32 %7, %8
%10 = tail call i32 (...) @test_rem()
%11 = add nsw i32 %9, %10
%12 = tail call i32 (...) @test_shl()
%13 = add nsw i32 %11, %12
%14 = tail call i32 (...) @test_lshr()
%15 = add nsw i32 %13, %14
%16 = tail call i32 (...) @test_ashr()
%17 = add nsw i32 %15, %16
%18 = tail call i32 (...) @test_and()
%19 = add nsw i32 %17, %18
%20 = tail call i32 (...) @test_or()
%21 = add nsw i32 %19, %20
%22 = tail call i32 (...) @test_xor()
%23 = add nsw i32 %21, %22
%24 = tail call i32 (...) @test_sext()
%25 = add nsw i32 %23, %24
%26 = tail call i32 (...) @test_zext()
%27 = add nsw i32 %25, %26
%28 = tail call i32 (...) @test_trunc()
%29 = add nsw i32 %27, %28
%30 = tail call i32 (...) @test_icmp()
%31 = add nsw i32 %29, %30
%32 = tail call i32 (...) @test_select()
%33 = add nsw i32 %31, %32
ret i32 %33
}