#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*/ assertTrue(char *, int);
int varargs_i(int, int, int, int);
void test_varargs_invocation() {
  assertTrue("varargs_i(0, 91, 92, 93) == 91", varargs_i(0, 91, 92, 93) == 91);
  ;
  assertTrue("varargs_i(1, 91, 92, 93) == 92", varargs_i(1, 91, 92, 93) == 92);
  ;
  assertTrue("varargs_i(2, 91, 92, 93) == 93", varargs_i(2, 91, 92, 93) == 93);
  ;
}


x86 assembly (clang, -O0):
<test_varargs_invocation>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x5b,%esi
mov    $0x5c,%edx
mov    $0x5d,%ecx
call   1040 <varargs_i@plt>
cmp    $0x5b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb4(%rip),%rdi
call   1030 <assertTrue@plt>
mov    $0x1,%edi
mov    $0x5b,%esi
mov    $0x5c,%edx
mov    $0x5d,%ecx
call   1040 <varargs_i@plt>
cmp    $0x5c,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea3(%rip),%rdi
call   1030 <assertTrue@plt>
mov    $0x2,%edi
mov    $0x5b,%esi
mov    $0x5c,%edx
mov    $0x5d,%ecx
call   1040 <varargs_i@plt>
cmp    $0x5d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe92(%rip),%rdi
call   1030 <assertTrue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_varargs_invocation>:
push   %rax
xor    %edi,%edi
mov    $0x5b,%esi
mov    $0x5c,%edx
mov    $0x5d,%ecx
call   1040 <varargs_i@plt>
xor    %esi,%esi
cmp    $0x5b,%eax
sete   %sil
lea    0xeb9(%rip),%rdi
call   1030 <assertTrue@plt>
mov    $0x1,%edi
mov    $0x5b,%esi
mov    $0x5c,%edx
mov    $0x5d,%ecx
call   1040 <varargs_i@plt>
xor    %esi,%esi
cmp    $0x5c,%eax
sete   %sil
lea    0xeaa(%rip),%rdi
call   1030 <assertTrue@plt>
mov    $0x2,%edi
mov    $0x5b,%esi
mov    $0x5c,%edx
mov    $0x5d,%ecx
call   1040 <varargs_i@plt>
xor    %esi,%esi
cmp    $0x5d,%eax
sete   %sil
lea    0xe9b(%rip),%rdi
pop    %rax
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"varargs_i(0, 91, 92, 93) == 91\00"
@.str.1 = [31 x i8] c"varargs_i(1, 91, 92, 93) == 92\00"
@.str.2 = [31 x i8] c"varargs_i(2, 91, 92, 93) == 93\00"
define void @test_varargs_invocation() {
%1 = call i32 @varargs_i(i32 0, i32 91, i32 92, i32 93)
%2 = icmp eq i32 %1, 91
%3 = zext i1 %2 to i32
%4 = call i32 @assertTrue(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @varargs_i(i32 1, i32 91, i32 92, i32 93)
%6 = icmp eq i32 %5, 92
%7 = zext i1 %6 to i32
%8 = call i32 @assertTrue(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @varargs_i(i32 2, i32 91, i32 92, i32 93)
%10 = icmp eq i32 %9, 93
%11 = zext i1 %10 to i32
%12 = call i32 @assertTrue(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"varargs_i(0, 91, 92, 93) == 91\00"
@.str.1 = [31 x i8] c"varargs_i(1, 91, 92, 93) == 92\00"
@.str.2 = [31 x i8] c"varargs_i(2, 91, 92, 93) == 93\00"
define void @test_varargs_invocation() {
%1 = tail call i32 @varargs_i(i32 0, i32 91, i32 92, i32 93)
%2 = icmp eq i32 %1, 91
%3 = zext i1 %2 to i32
%4 = tail call i32 @assertTrue(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @varargs_i(i32 1, i32 91, i32 92, i32 93)
%6 = icmp eq i32 %5, 92
%7 = zext i1 %6 to i32
%8 = tail call i32 @assertTrue(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call i32 @varargs_i(i32 2, i32 91, i32 92, i32 93)
%10 = icmp eq i32 %9, 93
%11 = zext i1 %10 to i32
%12 = tail call i32 @assertTrue(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret void
}