#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*/ assert(int);
int my_f(int, int, ...);
int my_g(int, int, int);
int main() {
  assert(my_f(3, 10, 20, 30) == 30);
  assert(my_f(1, 10, 20, 30) == 10);
  assert(my_f(1, 10) == 10);
  assert(my_g(11, 22, 33) == 33);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
mov    $0xa,%esi
mov    $0x14,%edx
mov    $0x1e,%ecx
mov    $0x0,%al
call   1050 <my_f@plt>
cmp    $0x1e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x14,%edx
mov    $0x1e,%ecx
mov    $0x0,%al
call   1050 <my_f@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x0,%al
call   1050 <my_f@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0xb,%edi
mov    $0x16,%esi
mov    $0x21,%edx
call   1030 <my_g@plt>
cmp    $0x21,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0xa,%esi
mov    $0x14,%edx
mov    $0x1e,%ecx
xor    %eax,%eax
call   1050 <my_f@plt>
xor    %edi,%edi
cmp    $0x1e,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
mov    $0x14,%edx
mov    $0x1e,%ecx
xor    %eax,%eax
call   1050 <my_f@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <my_f@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0xb,%edi
mov    $0x16,%esi
mov    $0x21,%edx
call   1030 <my_g@plt>
xor    %edi,%edi
cmp    $0x21,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (i32, i32, ...) @my_f(i32 3, i32 10, i32 20, i32 30)
%2 = icmp eq i32 %1, 30
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 (i32, i32, ...) @my_f(i32 1, i32 10, i32 20, i32 30)
%6 = icmp eq i32 %5, 10
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 (i32, i32, ...) @my_f(i32 1, i32 10)
%10 = icmp eq i32 %9, 10
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @my_g(i32 11, i32 22, i32 33)
%14 = icmp eq i32 %13, 33
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, i32, ...) @my_f(i32 3, i32 10, i32 20, i32 30)
%2 = icmp eq i32 %1, 30
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 (i32, i32, ...) @my_f(i32 1, i32 10, i32 20, i32 30)
%6 = icmp eq i32 %5, 10
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 (i32, i32, ...) @my_f(i32 1, i32 10)
%10 = icmp eq i32 %9, 10
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @my_g(i32 11, i32 22, i32 33)
%14 = icmp eq i32 %13, 33
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret i32 0
}