#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 *, char const *, char const *, size_t, size_t,
                          char const *);
int _stdint(char const *progname, size_t size, char const *name,
            size_t expected) {
  int ret = 0;
  char const *message = "";
  if (size != expected) {
    ret = 1;
    message = "FAILED";
  }
  printf("%s: Testing %s: %u (%u)%s\n", progname, name, size, expected,
         message);
  return ret;
}


x86 assembly (clang, -O0):
<_stdint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xeeb(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     115a <_stdint+0x4a>
movl   $0x1,-0x24(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%r9
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stdint>:
push   %rbx
mov    %rcx,%r8
mov    %rsi,%rcx
mov    %rdi,%rsi
xor    %ebx,%ebx
cmp    %r8,%rcx
setne  %bl
lea    0xef8(%rip),%rax
lea    0xed0(%rip),%r9
cmove  %rax,%r9
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [7 x i8] c"FAILED\00"
@.str.2 = [27 x i8] c"%s: Testing %s: %u (%u)%s\0A\00"
define i32 @_stdint(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
store i32 0, i32* %9
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %10
%11 = load i64, i64* %6
%12 = load i64, i64* %8
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %4
store i32 1, i32* %9
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %10
br label %15
15: ; preds = %14, %4
%16 = load i8*, i8** %5
%17 = load i8*, i8** %7
%18 = load i64, i64* %6
%19 = load i64, i64* %8
%20 = load i8*, i8** %10
%21 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %16, i8* %17, i64 %18, i64 %19, i8* %20)
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [7 x i8] c"FAILED\00"
@.str.2 = [27 x i8] c"%s: Testing %s: %u (%u)%s\0A\00"
define i32 @_stdint(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = icmp eq i64 %1, %3
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %2, i64 %1, i64 %3, i8* %8)
ret i32 %7
}