#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*/ test_open(char *, char *);
int main(int argc, char *const argv[]) {
  int i;
  char str[100];
  test_open("/dev/pt3video0", "test0.ts");
  test_open("/dev/pt3video1", "test1.ts");
  test_open("/dev/pt3video2", "test2.ts");
  test_open("/dev/pt3video3", "test3.ts");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed7(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <test_open@plt>
lea    0xedc(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <test_open@plt>
lea    0xee1(%rip),%rdi
lea    0xee9(%rip),%rsi
call   1030 <test_open@plt>
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <test_open@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef0(%rip),%rsi
call   1030 <test_open@plt>
lea    0xeed(%rip),%rdi
lea    0xef5(%rip),%rsi
call   1030 <test_open@plt>
lea    0xef2(%rip),%rdi
lea    0xefa(%rip),%rsi
call   1030 <test_open@plt>
lea    0xef7(%rip),%rdi
lea    0xeff(%rip),%rsi
call   1030 <test_open@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/dev/pt3video0\00"
@.str.1 = [9 x i8] c"test0.ts\00"
@.str.2 = [15 x i8] c"/dev/pt3video1\00"
@.str.3 = [9 x i8] c"test1.ts\00"
@.str.4 = [15 x i8] c"/dev/pt3video2\00"
@.str.5 = [9 x i8] c"test2.ts\00"
@.str.6 = [15 x i8] c"/dev/pt3video3\00"
@.str.7 = [9 x i8] c"test3.ts\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca [100 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"/dev/pt3video0\00"
@.str.1 = [9 x i8] c"test0.ts\00"
@.str.2 = [15 x i8] c"/dev/pt3video1\00"
@.str.3 = [9 x i8] c"test1.ts\00"
@.str.4 = [15 x i8] c"/dev/pt3video2\00"
@.str.5 = [9 x i8] c"test2.ts\00"
@.str.6 = [15 x i8] c"/dev/pt3video3\00"
@.str.7 = [9 x i8] c"test3.ts\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @test_open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}