#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*/ get_string(char *);
char *s_let(char *, char *);
int /*<<< orphan*/ strtol(int /*<<< orphan*/, char **, int);
char *macisinteger(char *arg) {
  char *b;
  strtol(get_string(arg), &b, 10);
  if (((*arg) == '\0') || ((*b) != '\0'))
    return (s_let("false", arg));
  return (s_let("true", arg));
}


x86 assembly (clang, -O0):
<macisinteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1175 <macisinteger+0x45>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     118e <macisinteger+0x5e>
mov    -0x10(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1030 <s_let@plt>
mov    %rax,-0x8(%rbp)
jmp    11a2 <macisinteger+0x72>
mov    -0x10(%rbp),%rsi
lea    0xe6d(%rip),%rdi
call   1030 <s_let@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macisinteger>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <get_string@plt>
lea    0x8(%rsp),%rsi
mov    %eax,%edi
mov    $0xa,%edx
call   1050 <strtol@plt>
cmpb   $0x0,(%rbx)
je     116f <macisinteger+0x3f>
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
lea    0xea4(%rip),%rax
lea    0xe97(%rip),%rdi
cmove  %rax,%rdi
jmp    1176 <macisinteger+0x46>
lea    0xe8a(%rip),%rdi
mov    %rbx,%rsi
call   1030 <s_let@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i8* @macisinteger(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @get_string(i8* %5)
%7 = call i32 @strtol(i32 %6, i8** %4, i32 10)
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %12, %1
%18 = load i8*, i8** %3
%19 = call i8* @s_let(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %18)
store i8* %19, i8** %2
br label %23
20: ; preds = %12
%21 = load i8*, i8** %3
%22 = call i8* @s_let(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %21)
store i8* %22, i8** %2
br label %23
23: ; preds = %20, %17
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
@.str = [6 x i8] c"false\00"
@.str.1 = [5 x i8] c"true\00"
define i8* @macisinteger(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i32 @get_string(i8* %0)
%5 = call i32 @strtol(i32 %4, i8** %2, i32 10)
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
%12 = select i1 %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
br label %13
13: ; preds = %8, %1
%14 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %1 ], [ %12, %8 ]
%15 = call i8* @s_let(i8* %14, i8* %0)
ret i8* %15
}