#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 prevod(char *, unsigned int *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  unsigned cislo;
  printf("Mam %i parametru:\n", argc);
  for (int i = 0; i < argc; ++i) {
    int result = prevod(argv[i], &cislo);
    printf("%s	Vysledek: %i Cislo: %u\n", argv[i], result, cislo);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a0 <main+0x80>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <prevod@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114e <main+0x2e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec8(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebp,%ebp
jle    1189 <main+0x69>
mov    %ebp,%r12d
lea    0xc(%rsp),%r14
lea    0xebf(%rip),%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%rdi
mov    %r14,%rsi
call   1040 <prevod@plt>
mov    (%rbx,%rbp,8),%rsi
mov    0xc(%rsp),%ecx
mov    %r15,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Mam %i parametru:\0A\00"
@.str.1 = [27 x i8] c"%s\09Vysledek: %i Cislo: %u\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9)
store i32 0, i32* %7
br label %11
11: ; preds = %30, %2
%12 = load i32, i32* %7
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %33
15: ; preds = %11
%16 = load i8**, i8*** %5
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 @prevod(i8* %20, i32* %6)
store i32 %21, i32* %8
%22 = load i8**, i8*** %5
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = load i32, i32* %8
%28 = load i32, i32* %6
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %26, i32 %27, i32 %28)
br label %30
30: ; preds = %15
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %11
33: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Mam %i parametru:\0A\00"
@.str.1 = [27 x i8] c"%s\09Vysledek: %i Cislo: %u\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = zext i32 %0 to i64
br label %10
9: ; preds = %10, %2
ret i32 0
10: ; preds = %7, %10
%11 = phi i64 [ 0, %7 ], [ %18, %10 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = call i32 @prevod(i8* %13, i32* %3)
%15 = load i8*, i8** %12
%16 = load i32, i32* %3
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %15, i32 %14, i32 %16)
%18 = add nuw nsw i64 %11, 1
%19 = icmp eq i64 %18, %8
br i1 %19, label %9, label %10
}