#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int variavelA = 0;
  printf("Digite um número maior que zero: ");
  while (!scanf("%d", &variavelA) || !variavelA) {
    printf("Digite um número maior que zero: ");
    getchar();
  }
  printf("%d", variavelA);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1180 <main+0x50>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1190 <main+0x60>
jmp    11aa <main+0x7a>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
jmp    1154 <main+0x24>
mov    -0x8(%rbp),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
test   %eax,%eax
je     116c <main+0x3c>
mov    0xc(%rsp),%esi
test   %esi,%esi
jne    11a8 <main+0x78>
lea    0xe8d(%rip),%r14
lea    0xea9(%rip),%r15
lea    0xc(%rsp),%rbx
nop
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
test   %eax,%eax
je     1180 <main+0x50>
mov    0xc(%rsp),%esi
test   %esi,%esi
je     1180 <main+0x50>
lea    0xe74(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Digite um n\C3\BAmero maior que zero: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %13, %0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ true, %4 ], [ %10, %7 ]
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (...) @getchar()
br label %4
16: ; preds = %11
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [35 x i8] c"Digite um n\C3\BAmero maior que zero: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = icmp eq i32 %4, 0
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
%8 = select i1 %5, i1 true, i1 %7
br i1 %8, label %9, label %17
9: ; preds = %0, %9
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @getchar()
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%13 = icmp eq i32 %12, 0
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 0
%16 = select i1 %13, i1 true, i1 %15
br i1 %16, label %9, label %17
17: ; preds = %9, %0
%18 = phi i32 [ %6, %0 ], [ %14, %9 ]
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret i32 0
}