#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*/ EXIT_FAILURE;
int /*<<< orphan*/ atoi(char const *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int test_fifo(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int test_fifo_var(int argc, const char **argv) {
  do {
    if (argc != 4)
      exit(EXIT_FAILURE);
  } while (0);
  return test_fifo(atoi(argv[1]), atoi(argv[2]), atoi(argv[3]));
}


x86 assembly (clang, -O0):
<test_fifo_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x4(%rbp)
je     1157 <test_fifo_var+0x27>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
jmp    115c <test_fifo_var+0x2c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1030 <atoi@plt>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1050 <test_fifo@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fifo_var>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x4,%edi
jne    116c <test_fifo_var+0x3c>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%r14d
mov    0x10(%rbx),%rdi
call   1030 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   1030 <atoi@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <test_fifo@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @test_fifo_var(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
br label %5
5: ; preds = %2
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 4
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %5
br label %12
12: ; preds = %11
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
%17 = load i8**, i8*** %4
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
%21 = load i8**, i8*** %4
%22 = getelementptr inbounds i8*, i8** %21, i64 3
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
%25 = call i32 @test_fifo(i32 %16, i32 %20, i32 %24)
ret i32 %25
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @test_fifo_var(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @atoi(i8* %12)
%14 = getelementptr inbounds i8*, i8** %1, i64 3
%15 = load i8*, i8** %14
%16 = tail call i32 @atoi(i8* %15)
%17 = tail call i32 @test_fifo(i32 %10, i32 %13, i32 %16)
ret i32 %17
}