#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*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
void pobieranie(int *rozmiar, int **liczby) {
  int i;
  for (i = 0; i < (*rozmiar); i++) {
    printf("Podaj %d liczbe:\n", i + 1);
    scanf("%d", *liczby + i);
  }
}


x86 assembly (clang, -O0):
<pobieranie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1184 <pobieranie+0x64>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea1(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <pobieranie+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pobieranie>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmpl   $0x0,(%rdi)
jle    1179 <pobieranie+0x59>
mov    %rsi,%r14
mov    %rdi,%r13
xor    %ebp,%ebp
lea    0xec1(%rip),%r15
lea    0xecc(%rip),%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    (%r14),%rsi
add    %rbp,%rsi
mov    %r12,%rdi
call   1040 <scanf@plt>
movslq 0x0(%r13),%rax
add    $0x4,%rbp
cmp    %rax,%rbx
jl     1150 <pobieranie+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Podaj %d liczbe:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @pobieranie(i32* %0, i32** %1) {
%3 = alloca i32*
%4 = alloca i32**
%5 = alloca i32
store i32* %0, i32** %3
store i32** %1, i32*** %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %24
11: ; preds = %6
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32**, i32*** %4
%16 = load i32*, i32** %15
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
br label %21
21: ; preds = %11
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Podaj %d liczbe:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @pobieranie(i32* nocapture %0, i32** nocapture %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %16
5: ; preds = %2, %5
%6 = phi i64 [ %7, %5 ], [ 0, %2 ]
%7 = add nuw nsw i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32*, i32** %1
%11 = getelementptr inbounds i32, i32* %10, i64 %6
%12 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = load i32, i32* %0
%14 = sext i32 %13 to i64
%15 = icmp slt i64 %7, %14
br i1 %15, label %5, label %16
16: ; preds = %5, %2
ret void
}