#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 */
scalar_t__ get_num_val(char *, unsigned int *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ show_float(unsigned int);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  int i;
  unsigned uf;
  if (argc < 2)
    usage(argv[0]);
  for (i = 1; i < argc; i++) {
    char *sval = argv[i];
    if (get_num_val(sval, &uf)) {
      show_float(uf);
    } else {
      printf("Invalid 32-bit number: '%s'\n", sval);
      usage(argv[0]);
    }
  }
  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)
cmpl   $0x2,-0x8(%rbp)
jge    116c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e2 <main+0xa2>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <get_num_val@plt>
cmp    $0x0,%rax
je     11b3 <main+0x73>
mov    -0x18(%rbp),%edi
call   1060 <show_float@plt>
jmp    11cf <main+0x8f>
mov    -0x20(%rbp),%rsi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
jmp    11d4 <main+0x94>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1173 <main+0x33>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
cmp    $0x1,%edi
jg     116d <main+0x2d>
mov    (%r12),%rdi
call   1050 <usage@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %edi,%r13d
mov    $0x1,%ebp
lea    0x4(%rsp),%r14
lea    0xe7f(%rip),%r15
jmp    11ad <main+0x6d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    (%r12),%rdi
call   1050 <usage@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
je     115c <main+0x1c>
mov    (%r12,%rbp,8),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <get_num_val@plt>
test   %rax,%rax
je     1190 <main+0x50>
mov    0x4(%rsp),%edi
call   1060 <show_float@plt>
jmp    11a4 <main+0x64>

LLVM IR (-O0):
@.str = [29 x i8] c"Invalid 32-bit number: '%s'\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 i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @usage(i8* %14)
br label %16
16: ; preds = %11, %2
store i32 1, i32* %6
br label %17
17: ; preds = %41, %16
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %44
21: ; preds = %17
%22 = load i8**, i8*** %5
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
store i8* %26, i8** %8
%27 = load i8*, i8** %8
%28 = call i64 @get_num_val(i8* %27, i32* %7)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %21
%31 = load i32, i32* %7
%32 = call i32 @show_float(i32 %31)
br label %40
33: ; preds = %21
%34 = load i8*, i8** %8
%35 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %34)
%36 = load i8**, i8*** %5
%37 = getelementptr inbounds i8*, i8** %36, i64 0
%38 = load i8*, i8** %37
%39 = call i32 @usage(i8* %38)
br label %40
40: ; preds = %33, %30
br label %41
41: ; preds = %40
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %6
br label %17
44: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Invalid 32-bit number: '%s'\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @usage(i8* %7)
br label %27
9: ; preds = %2
%10 = zext i32 %0 to i64
br label %11
11: ; preds = %9, %24
%12 = phi i64 [ 1, %9 ], [ %25, %24 ]
%13 = getelementptr inbounds i8*, i8** %1, i64 %12
%14 = load i8*, i8** %13
%15 = call i64 @get_num_val(i8* %14, i32* %3)
%16 = icmp eq i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %11
%18 = load i32, i32* %3
%19 = call i32 @show_float(i32 %18)
br label %24
20: ; preds = %11
%21 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %14)
%22 = load i8*, i8** %1
%23 = call i32 @usage(i8* %22)
br label %24
24: ; preds = %20, %17
%25 = add nuw nsw i64 %12, 1
%26 = icmp eq i64 %25, %10
br i1 %26, label %27, label %11
27: ; preds = %24, %6
ret i32 0
}