int main(int argc, char **argv) {
  int a, b;
  printf("Hello. Please enter your first integer: ");
  scanf("%d", &a);
  printf("Hello. Please enter your second integer: ");
  scanf("%d", &b);
  printf("Sum: %d\n", b + a);
  printf("Difference: %d\n", ({
                               __typeof__(a) _a = (a);
                               __typeof__(b) _b = (b);
                               _a > _b ? _a : _b;
                             }) - ({
                               __typeof__(a) _a = (a);
                               __typeof__(b) _b = (b);
                               _a < _b ? _a : _b;
                             }));
  printf("Product: %d\n", a * b);
  printf("Quotient: %d\n", ({
                             __typeof__(a) _a = (a);
                             __typeof__(b) _b = (b);
                             _a > _b ? _a : _b;
                           }) / ({
                             __typeof__(a) _a = (a);
                             __typeof__(b) _b = (b);
                             _a < _b ? _a : _b;
                           }));
  printf("Remainder: %d\n", ({
                              __typeof__(a) _a = (a);
                              __typeof__(b) _b = (b);
                              _a > _b ? _a : _b;
                            }) % ({
                              __typeof__(a) _a = (a);
                              __typeof__(b) _b = (b);
                              _a < _b ? _a : _b;
                            }));
  printf("Average: %f\n", (float)((a + b) / 2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x18(%rbp),%esi
add    -0x14(%rbp),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    11b0 <main+0x90>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    11b6 <main+0x96>
mov    -0x20(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11e5 <main+0xc5>
mov    -0x28(%rbp),%eax
mov    %eax,-0x6c(%rbp)
jmp    11eb <main+0xcb>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%esi
mov    -0x6c(%rbp),%eax
mov    %eax,-0x30(%rbp)
sub    -0x30(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
imul   -0x18(%rbp),%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jle    123d <main+0x11d>
mov    -0x34(%rbp),%eax
mov    %eax,-0x70(%rbp)
jmp    1243 <main+0x123>
mov    -0x38(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1272 <main+0x152>
mov    -0x40(%rbp),%eax
mov    %eax,-0x78(%rbp)
jmp    1278 <main+0x158>
mov    -0x44(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x78(%rbp),%ecx
mov    %ecx,-0x48(%rbp)
cltd
idivl  -0x48(%rbp)
mov    %eax,%esi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jle    12b8 <main+0x198>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    12be <main+0x19e>
mov    -0x50(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    12f0 <main+0x1d0>
mov    -0x58(%rbp),%eax
mov    %eax,-0x84(%rbp)
jmp    12f9 <main+0x1d9>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x80(%rbp),%eax
mov    -0x84(%rbp),%ecx
mov    %ecx,-0x60(%rbp)
cltd
idivl  -0x60(%rbp)
mov    %edx,%esi
lea    0xd78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd63(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
add    0x8(%rsp),%esi
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
cmp    %ecx,%eax
mov    %ecx,%esi
cmovg  %eax,%esi
cmovl  %eax,%ecx
sub    %ecx,%esi
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
imul   0xc(%rsp),%esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%esi
cmp    %esi,%ecx
mov    %esi,%eax
cmovg  %ecx,%eax
cmovl  %ecx,%esi
cltd
idiv   %esi
lea    0xeab(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%esi
cmp    %esi,%ecx
mov    %esi,%eax
cmovg  %ecx,%eax
cmovl  %ecx,%esi
cltd
idiv   %esi
lea    0xe94(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%eax
add    0xc(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
cvtsi2ss %ecx,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Hello. Please enter your first integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [42 x i8] c"Hello. Please enter your second integer: \00"
@.str.3 = [9 x i8] c"Sum: %d\0A\00"
@.str.4 = [16 x i8] c"Difference: %d\0A\00"
@.str.5 = [13 x i8] c"Product: %d\0A\00"
@.str.6 = [14 x i8] c"Quotient: %d\0A\00"
@.str.7 = [15 x i8] c"Remainder: %d\0A\00"
@.str.8 = [13 x i8] c"Average: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%30 = load i32, i32* %7
%31 = load i32, i32* %6
%32 = add nsw i32 %30, %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %6
store i32 %34, i32* %8
%35 = load i32, i32* %7
store i32 %35, i32* %9
%36 = load i32, i32* %8
%37 = load i32, i32* %9
%38 = icmp sgt i32 %36, %37
br i1 %38, label %39, label %41
39: ; preds = %2
%40 = load i32, i32* %8
br label %43
41: ; preds = %2
%42 = load i32, i32* %9
br label %43
43: ; preds = %41, %39
%44 = phi i32 [ %40, %39 ], [ %42, %41 ]
store i32 %44, i32* %10
%45 = load i32, i32* %10
%46 = load i32, i32* %6
store i32 %46, i32* %11
%47 = load i32, i32* %7
store i32 %47, i32* %12
%48 = load i32, i32* %11
%49 = load i32, i32* %12
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %53
51: ; preds = %43
%52 = load i32, i32* %11
br label %55
53: ; preds = %43
%54 = load i32, i32* %12
br label %55
55: ; preds = %53, %51
%56 = phi i32 [ %52, %51 ], [ %54, %53 ]
store i32 %56, i32* %13
%57 = load i32, i32* %13
%58 = sub nsw i32 %45, %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %6
%61 = load i32, i32* %7
%62 = mul nsw i32 %60, %61
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %6
store i32 %64, i32* %14
%65 = load i32, i32* %7
store i32 %65, i32* %15
%66 = load i32, i32* %14
%67 = load i32, i32* %15
%68 = icmp sgt i32 %66, %67
br i1 %68, label %69, label %71
69: ; preds = %55
%70 = load i32, i32* %14
br label %73
71: ; preds = %55
%72 = load i32, i32* %15
br label %73
73: ; preds = %71, %69
%74 = phi i32 [ %70, %69 ], [ %72, %71 ]
store i32 %74, i32* %16
%75 = load i32, i32* %16
%76 = load i32, i32* %6
store i32 %76, i32* %17
%77 = load i32, i32* %7
store i32 %77, i32* %18
%78 = load i32, i32* %17
%79 = load i32, i32* %18
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %83
81: ; preds = %73
%82 = load i32, i32* %17
br label %85
83: ; preds = %73
%84 = load i32, i32* %18
br label %85
85: ; preds = %83, %81
%86 = phi i32 [ %82, %81 ], [ %84, %83 ]
store i32 %86, i32* %19
%87 = load i32, i32* %19
%88 = sdiv i32 %75, %87
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %88)
%90 = load i32, i32* %6
store i32 %90, i32* %20
%91 = load i32, i32* %7
store i32 %91, i32* %21
%92 = load i32, i32* %20
%93 = load i32, i32* %21
%94 = icmp sgt i32 %92, %93
br i1 %94, label %95, label %97
95: ; preds = %85
%96 = load i32, i32* %20
br label %99
97: ; preds = %85
%98 = load i32, i32* %21
br label %99
99: ; preds = %97, %95
%100 = phi i32 [ %96, %95 ], [ %98, %97 ]
store i32 %100, i32* %22
%101 = load i32, i32* %22
%102 = load i32, i32* %6
store i32 %102, i32* %23
%103 = load i32, i32* %7
store i32 %103, i32* %24
%104 = load i32, i32* %23
%105 = load i32, i32* %24
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %109
107: ; preds = %99
%108 = load i32, i32* %23
br label %111
109: ; preds = %99
%110 = load i32, i32* %24
br label %111
111: ; preds = %109, %107
%112 = phi i32 [ %108, %107 ], [ %110, %109 ]
store i32 %112, i32* %25
%113 = load i32, i32* %25
%114 = srem i32 %101, %113
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %114)
%116 = load i32, i32* %6
%117 = load i32, i32* %7
%118 = add nsw i32 %116, %117
%119 = sdiv i32 %118, 2
%120 = sitofp i32 %119 to float
%121 = fpext float %120 to double
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), double %121)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Hello. Please enter your first integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [42 x i8] c"Hello. Please enter your second integer: \00"
@.str.3 = [9 x i8] c"Sum: %d\0A\00"
@.str.4 = [16 x i8] c"Difference: %d\0A\00"
@.str.5 = [13 x i8] c"Product: %d\0A\00"
@.str.6 = [14 x i8] c"Quotient: %d\0A\00"
@.str.7 = [15 x i8] c"Remainder: %d\0A\00"
@.str.8 = [13 x i8] c"Average: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add nsw i32 %12, %11
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp sgt i32 %15, %16
%18 = select i1 %17, i32 %15, i32 %16
%19 = icmp slt i32 %15, %16
%20 = select i1 %19, i32 %15, i32 %16
%21 = sub nsw i32 %18, %20
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = mul nsw i32 %24, %23
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = icmp sgt i32 %27, %28
%30 = select i1 %29, i32 %27, i32 %28
%31 = icmp slt i32 %27, %28
%32 = select i1 %31, i32 %27, i32 %28
%33 = sdiv i32 %30, %32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = icmp sgt i32 %35, %36
%38 = select i1 %37, i32 %35, i32 %36
%39 = icmp slt i32 %35, %36
%40 = select i1 %39, i32 %35, i32 %36
%41 = srem i32 %38, %40
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %3
%44 = load i32, i32* %4
%45 = add nsw i32 %44, %43
%46 = sdiv i32 %45, 2
%47 = sitofp i32 %46 to float
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), double %48)
ret i32 0
}