#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*/ assert(int);
int atoi(char *);
int atol(char *);
int labs(int);
int strtol(char *, char **, int);
int strtoul(char *, int /*<<< orphan*/ *, int);
int main(void) {
  char buf[] = "42, and stuff.";
  char *ptr;
  assert(atoi("0") == 0);
  assert(atoi("1") == 1);
  assert(atoi(" 123456") == 123456);
  assert(atoi("-72") == -72);
  assert(atoi("  -84") == -84);
  assert(atoi("2147483647") == 2147483647);
  assert(atoi("hello!123") == 0);
  assert(atoi(buf) == 42);
  assert(atoi("42isthemagicnumber") == 42);
  assert(atoi("0x800") == 0);
  assert(atol("2147483648") == 2147483648);
  assert(atol("-2147483649") == -2147483649);
  assert(strtol("0x800", NULL, 0) == 0x800);
  assert(strtol("0x0x800", NULL, 0) == 0);
  assert(strtol("z", NULL, -1) == 0);
  assert(strtol("11111", NULL, 1) == 0);
  assert(strtol("z", NULL, 37) == 0);
  assert(strtol("z", NULL, 36) == 35);
  assert(strtol("-Y", NULL, 36) == -34);
  ptr = buf;
  assert(strtol(buf, &ptr, 10) == 42);
  assert(ptr == buf + 2);
  assert(strtoul("0", NULL, 10) == 0);
  assert(strtoul("1", NULL, 10) == 1);
  assert(strtoul(" 123456", NULL, 10) == 123456);
  assert(strtoul("-72", NULL, 10) == 0);
  assert(strtoul("9999999999", NULL, 10) == 9999999999);
  assert(strtoul("hello!123", NULL, 10) == 0);
  assert(strtoul(buf, NULL, 10) == 42);
  assert(strtoul("42isthemagicnumber", NULL, 10) == 42);
  assert(strtoul(" 123456", NULL, 0) == 123456);
  assert(strtoul("0x800", NULL, 0) == 0x800);
  assert(strtoul("0x0x800", NULL, 0) == 0);
  assert(strtoul("z", NULL, -1) == 0);
  assert(strtoul("11111", NULL, 1) == 0);
  assert(strtoul("z", NULL, 37) == 0);
  assert(strtoul("z", NULL, 36) == 35);
  assert(strtoul("Y", NULL, 36) == 34);
  assert(labs(0) == 0);
  assert(labs(2147483647) == 2147483647);
  assert(labs(-2147483647) == 2147483647);
  assert(labs(9223372036854775807) == 9223372036854775807);
  assert(labs(-9223372036854775807) == 9223372036854775807);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe8a(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xe88(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xe82(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xe7a(%rip),%al
mov    %al,-0x5(%rbp)
lea    0xec8(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeb4(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe39(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x1e240,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe23(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0xffffffb8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe0b(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0xffffffac,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xdf5(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x7fffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xde2(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x13(%rbp),%rdi
call   1080 <atoi@plt>
cmp    $0x2a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xdb7(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x2a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xdc7(%rip),%rdi
call   1080 <atoi@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xd92(%rip),%rdi
call   1060 <atol@plt>
cltq
mov    $0x80000000,%ecx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xd7a(%rip),%rdi
call   1060 <atol@plt>
cltq
movabs $0xffffffff7fffffff,%rcx
ff ff ff
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xd60(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1050 <strtol@plt>
cmp    $0x800,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xd3a(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1050 <strtol@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xd20(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffffffff,%edx
call   1050 <strtol@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xcfd(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1050 <strtol@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xcd6(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x25,%edx
call   1050 <strtol@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xcb1(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x24,%edx
call   1050 <strtol@plt>
cmp    $0x23,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xc94(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x24,%edx
call   1050 <strtol@plt>
cmp    $0xffffffde,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x13(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x13(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1050 <strtol@plt>
cmp    $0x2a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rax
lea    -0x13(%rbp),%rcx
add    $0x2,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xc1f(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xc02(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xb7e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x1e240,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xb5f(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xb96(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cltq
movabs $0x2540be3ff,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xb1e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    -0x13(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x2a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xae1(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
cmp    $0x2a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xa95(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1070 <strtoul@plt>
cmp    $0x1e240,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xac4(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1070 <strtoul@plt>
cmp    $0x800,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xa9e(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xa84(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffffffff,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xa61(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xa3a(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x25,%edx
call   1070 <strtoul@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xa15(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x24,%edx
call   1070 <strtoul@plt>
cmp    $0x23,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0x9f9(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x24,%edx
call   1070 <strtoul@plt>
cmp    $0x22,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %edi,%edi
call   1030 <labs@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x7fffffff,%edi
call   1030 <labs@plt>
cmp    $0x7fffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x80000001,%edi
call   1030 <labs@plt>
cmp    $0x7fffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0xffffffff,%edi
call   1030 <labs@plt>
cltq
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1030 <labs@plt>
cltq
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
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
sub    $0x18,%rsp
movabs $0x2e666675747320,%rax
mov    %rax,0xf(%rsp)
movabs $0x20646e61202c3234,%rax
6e 64 20
mov    %rax,0x8(%rsp)
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
lea    0xe6c(%rip),%r14
mov    %r14,%rdi
call   1060 <atoi@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
lea    0x8(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <atoi@plt>
xor    %edi,%edi
cmp    $0x2a,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xe3f(%rip),%r13
mov    %r13,%rdi
call   1060 <atoi@plt>
xor    %edi,%edi
cmp    $0x2a,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xe37(%rip),%rdi
call   1060 <atoi@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
lea    0xe04(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <strtol@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xdef(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1040 <strtol@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xdce(%rip),%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <strtol@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x25,%edx
call   1040 <strtol@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %rbp,(%rsp)
mov    %rsp,%rsi
mov    %rbp,%rdi
mov    $0xa,%edx
call   1040 <strtol@plt>
xor    %edi,%edi
cmp    $0x2a,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xa(%rsp),%rax
xor    %edi,%edi
cmp    %rax,(%rsp)
sete   %dil
call   1030 <assert@plt>
lea    0xd41(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xd29(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xcd1(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x1e240,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xcb3(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xcc4(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x2a,%eax
sete   %dil
call   1030 <assert@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x2a,%eax
sete   %dil
call   1030 <assert@plt>
mov    %r15,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x1e240,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xc2a(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x800,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xc08(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x25,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x23,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xb95(%rip),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1050 <strtoul@plt>
xor    %edi,%edi
cmp    $0x22,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.buf = [15 x i8] c"42, and stuff.\00"
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [8 x i8] c" 123456\00"
@.str.3 = [4 x i8] c"-72\00"
@.str.4 = [6 x i8] c" -84\00"
@.str.5 = [11 x i8] c"2147483647\00"
@.str.6 = [10 x i8] c"hello!123\00"
@.str.7 = [19 x i8] c"42isthemagicnumber\00"
@.str.8 = [6 x i8] c"0x800\00"
@.str.9 = [11 x i8] c"2147483648\00"
@.str.10 = [12 x i8] c"-2147483649\00"
@.str.11 = [8 x i8] c"0x0x800\00"
@.str.12 = [2 x i8] c"z\00"
@.str.13 = [6 x i8] c"11111\00"
@.str.14 = [3 x i8] c"-Y\00"
@.str.15 = [11 x i8] c"9999999999\00"
@.str.16 = [2 x i8] c"Y\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [15 x i8]* %2 to i8*
%5 = call i32 @atoi(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @atoi(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @atoi(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i32 %13, 123456
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 @atoi(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i32 %17, -72
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = call i32 @atoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i32 %21, -84
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = call i32 @atoi(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%26 = icmp eq i32 %25, 2147483647
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = call i32 @atoi(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%34 = call i32 @atoi(i8* %33)
%35 = icmp eq i32 %34, 42
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = call i32 @atoi(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%39 = icmp eq i32 %38, 42
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = call i32 @atoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = call i32 @atol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%47 = sext i32 %46 to i64
%48 = icmp eq i64 %47, 2147483648
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = call i32 @atol(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%52 = sext i32 %51 to i64
%53 = icmp eq i64 %52, -2147483649
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
%56 = call i32 @strtol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** null, i32 0)
%57 = icmp eq i32 %56, 2048
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = call i32 @strtol(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** null, i32 0)
%61 = icmp eq i32 %60, 0
%62 = zext i1 %61 to i32
%63 = call i32 @assert(i32 %62)
%64 = call i32 @strtol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** null, i32 -1)
%65 = icmp eq i32 %64, 0
%66 = zext i1 %65 to i32
%67 = call i32 @assert(i32 %66)
%68 = call i32 @strtol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8** null, i32 1)
%69 = icmp eq i32 %68, 0
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = call i32 @strtol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** null, i32 37)
%73 = icmp eq i32 %72, 0
%74 = zext i1 %73 to i32
%75 = call i32 @assert(i32 %74)
%76 = call i32 @strtol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** null, i32 36)
%77 = icmp eq i32 %76, 35
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78)
%80 = call i32 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8** null, i32 36)
%81 = icmp eq i32 %80, -34
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82)
%84 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
store i8* %84, i8** %3
%85 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%86 = call i32 @strtol(i8* %85, i8** %3, i32 10)
%87 = icmp eq i32 %86, 42
%88 = zext i1 %87 to i32
%89 = call i32 @assert(i32 %88)
%90 = load i8*, i8** %3
%91 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%92 = getelementptr inbounds i8, i8* %91, i64 2
%93 = icmp eq i8* %90, %92
%94 = zext i1 %93 to i32
%95 = call i32 @assert(i32 %94)
%96 = call i32 @strtoul(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
%97 = icmp eq i32 %96, 0
%98 = zext i1 %97 to i32
%99 = call i32 @assert(i32 %98)
%100 = call i32 @strtoul(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null, i32 10)
%101 = icmp eq i32 %100, 1
%102 = zext i1 %101 to i32
%103 = call i32 @assert(i32 %102)
%104 = call i32 @strtoul(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* null, i32 10)
%105 = icmp eq i32 %104, 123456
%106 = zext i1 %105 to i32
%107 = call i32 @assert(i32 %106)
%108 = call i32 @strtoul(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* null, i32 10)
%109 = icmp eq i32 %108, 0
%110 = zext i1 %109 to i32
%111 = call i32 @assert(i32 %110)
%112 = call i32 @strtoul(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i32* null, i32 10)
%113 = sext i32 %112 to i64
%114 = icmp eq i64 %113, 9999999999
%115 = zext i1 %114 to i32
%116 = call i32 @assert(i32 %115)
%117 = call i32 @strtoul(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32* null, i32 10)
%118 = icmp eq i32 %117, 0
%119 = zext i1 %118 to i32
%120 = call i32 @assert(i32 %119)
%121 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%122 = call i32 @strtoul(i8* %121, i32* null, i32 10)
%123 = icmp eq i32 %122, 42
%124 = zext i1 %123 to i32
%125 = call i32 @assert(i32 %124)
%126 = call i32 @strtoul(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32* null, i32 10)
%127 = icmp eq i32 %126, 42
%128 = zext i1 %127 to i32
%129 = call i32 @assert(i32 %128)
%130 = call i32 @strtoul(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* null, i32 0)
%131 = icmp eq i32 %130, 123456
%132 = zext i1 %131 to i32
%133 = call i32 @assert(i32 %132)
%134 = call i32 @strtoul(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* null, i32 0)
%135 = icmp eq i32 %134, 2048
%136 = zext i1 %135 to i32
%137 = call i32 @assert(i32 %136)
%138 = call i32 @strtoul(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32* null, i32 0)
%139 = icmp eq i32 %138, 0
%140 = zext i1 %139 to i32
%141 = call i32 @assert(i32 %140)
%142 = call i32 @strtoul(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32* null, i32 -1)
%143 = icmp eq i32 %142, 0
%144 = zext i1 %143 to i32
%145 = call i32 @assert(i32 %144)
%146 = call i32 @strtoul(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i32* null, i32 1)
%147 = icmp eq i32 %146, 0
%148 = zext i1 %147 to i32
%149 = call i32 @assert(i32 %148)
%150 = call i32 @strtoul(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32* null, i32 37)
%151 = icmp eq i32 %150, 0
%152 = zext i1 %151 to i32
%153 = call i32 @assert(i32 %152)
%154 = call i32 @strtoul(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32* null, i32 36)
%155 = icmp eq i32 %154, 35
%156 = zext i1 %155 to i32
%157 = call i32 @assert(i32 %156)
%158 = call i32 @strtoul(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i32* null, i32 36)
%159 = icmp eq i32 %158, 34
%160 = zext i1 %159 to i32
%161 = call i32 @assert(i32 %160)
%162 = call i32 @labs(i32 0)
%163 = icmp eq i32 %162, 0
%164 = zext i1 %163 to i32
%165 = call i32 @assert(i32 %164)
%166 = call i32 @labs(i32 2147483647)
%167 = icmp eq i32 %166, 2147483647
%168 = zext i1 %167 to i32
%169 = call i32 @assert(i32 %168)
%170 = call i32 @labs(i32 -2147483647)
%171 = icmp eq i32 %170, 2147483647
%172 = zext i1 %171 to i32
%173 = call i32 @assert(i32 %172)
%174 = call i32 @labs(i32 -1)
%175 = sext i32 %174 to i64
%176 = icmp eq i64 %175, 9223372036854775807
%177 = zext i1 %176 to i32
%178 = call i32 @assert(i32 %177)
%179 = call i32 @labs(i32 1)
%180 = sext i32 %179 to i64
%181 = icmp eq i64 %180, 9223372036854775807
%182 = zext i1 %181 to i32
%183 = call i32 @assert(i32 %182)
ret i32 0
}

LLVM IR (-O2):
@__const.main.buf = [15 x i8] c"42, and stuff.\00"
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [8 x i8] c" 123456\00"
@.str.3 = [4 x i8] c"-72\00"
@.str.6 = [10 x i8] c"hello!123\00"
@.str.7 = [19 x i8] c"42isthemagicnumber\00"
@.str.8 = [6 x i8] c"0x800\00"
@.str.11 = [8 x i8] c"0x0x800\00"
@.str.12 = [2 x i8] c"z\00"
@.str.13 = [6 x i8] c"11111\00"
@.str.15 = [11 x i8] c"9999999999\00"
@.str.16 = [2 x i8] c"Y\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%4 = bitcast i8** %2 to i8*
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 @assert(i32 1)
%8 = tail call i32 @assert(i32 1)
%9 = tail call i32 @assert(i32 1)
%10 = tail call i32 @assert(i32 1)
%11 = tail call i32 @atoi(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = call i32 @atoi(i8* %3)
%16 = icmp eq i32 %15, 42
%17 = zext i1 %16 to i32
%18 = tail call i32 @assert(i32 %17)
%19 = tail call i32 @atoi(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%20 = icmp eq i32 %19, 42
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call i32 @atoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
%26 = tail call i32 @assert(i32 %25)
%27 = tail call i32 @assert(i32 0)
%28 = tail call i32 @assert(i32 0)
%29 = tail call i32 @assert(i32 1)
%30 = tail call i32 @strtol(i8* nocapture getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** null, i32 0)
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = tail call i32 @assert(i32 %32)
%34 = tail call i32 @strtol(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** null, i32 -1)
%35 = icmp eq i32 %34, 0
%36 = zext i1 %35 to i32
%37 = tail call i32 @assert(i32 %36)
%38 = tail call i32 @strtol(i8* nocapture getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8** null, i32 1)
%39 = icmp eq i32 %38, 0
%40 = zext i1 %39 to i32
%41 = tail call i32 @assert(i32 %40)
%42 = tail call i32 @strtol(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i8** null, i32 37)
%43 = icmp eq i32 %42, 0
%44 = zext i1 %43 to i32
%45 = tail call i32 @assert(i32 %44)
%46 = tail call i32 @assert(i32 1)
%47 = tail call i32 @assert(i32 1)
store i8* %3, i8** %2
%48 = call i32 @strtol(i8* %3, i8** %2, i32 10)
%49 = icmp eq i32 %48, 42
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = load i8*, i8** %2
%53 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 2
%54 = icmp eq i8* %52, %53
%55 = zext i1 %54 to i32
%56 = call i32 @assert(i32 %55)
%57 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
%58 = icmp eq i32 %57, 0
%59 = zext i1 %58 to i32
%60 = call i32 @assert(i32 %59)
%61 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null, i32 10)
%62 = icmp eq i32 %61, 1
%63 = zext i1 %62 to i32
%64 = call i32 @assert(i32 %63)
%65 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* null, i32 10)
%66 = icmp eq i32 %65, 123456
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32* null, i32 10)
%70 = icmp eq i32 %69, 0
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i32* null, i32 10)
%74 = call i32 @assert(i32 0)
%75 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32* null, i32 10)
%76 = icmp eq i32 %75, 0
%77 = zext i1 %76 to i32
%78 = call i32 @assert(i32 %77)
%79 = call i32 @strtoul(i8* nocapture %3, i32* null, i32 10)
%80 = icmp eq i32 %79, 42
%81 = zext i1 %80 to i32
%82 = call i32 @assert(i32 %81)
%83 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32* null, i32 10)
%84 = icmp eq i32 %83, 42
%85 = zext i1 %84 to i32
%86 = call i32 @assert(i32 %85)
%87 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* null, i32 0)
%88 = icmp eq i32 %87, 123456
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* null, i32 0)
%92 = icmp eq i32 %91, 2048
%93 = zext i1 %92 to i32
%94 = call i32 @assert(i32 %93)
%95 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32* null, i32 0)
%96 = icmp eq i32 %95, 0
%97 = zext i1 %96 to i32
%98 = call i32 @assert(i32 %97)
%99 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32* null, i32 -1)
%100 = icmp eq i32 %99, 0
%101 = zext i1 %100 to i32
%102 = call i32 @assert(i32 %101)
%103 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i32* null, i32 1)
%104 = icmp eq i32 %103, 0
%105 = zext i1 %104 to i32
%106 = call i32 @assert(i32 %105)
%107 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32* null, i32 37)
%108 = icmp eq i32 %107, 0
%109 = zext i1 %108 to i32
%110 = call i32 @assert(i32 %109)
%111 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32* null, i32 36)
%112 = icmp eq i32 %111, 35
%113 = zext i1 %112 to i32
%114 = call i32 @assert(i32 %113)
%115 = call i32 @strtoul(i8* nocapture getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i32* null, i32 36)
%116 = icmp eq i32 %115, 34
%117 = zext i1 %116 to i32
%118 = call i32 @assert(i32 %117)
%119 = call i32 @assert(i32 1)
%120 = call i32 @assert(i32 1)
%121 = call i32 @assert(i32 1)
%122 = call i32 @assert(i32 0)
%123 = call i32 @assert(i32 0)
ret i32 0
}