#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 EXIT_SUCCESS;
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts("argumenty:");
  if (*argv) {
    puts(*argv);
    return main(argc - 1, argv + 1);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1177 <main+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1040 <main@plt>
mov    %eax,-0x4(%rbp)
jmp    1183 <main+0x63>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdi
test   %rdi,%rdi
je     1159 <main+0x49>
add    $0x8,%rbx
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <main+0x30>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"argumenty:\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load i8**, i8*** %5
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %19
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = call i32 @puts(i8* %12)
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = call i32 @main(i32 %15, i8** %17)
store i32 %18, i32* %3
br label %21
19: ; preds = %2
%20 = load i32, i32* @EXIT_SUCCESS
store i32 %20, i32* %3
br label %21
21: ; preds = %19, %10
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@.str = [11 x i8] c"argumenty:\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %12, %6 ], [ %4, %2 ]
%8 = phi i8** [ %10, %6 ], [ %1, %2 ]
%9 = tail call i32 @puts(i8* %7)
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %10
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}