#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 */
typedef scalar_t__ __u64;

/* Variables and functions */
scalar_t__ XFRM_INF;
int /*<<< orphan*/ sprintf(char *, char *, unsigned long long);
int /*<<< orphan*/ strcpy(char *, char *);
const char *strxf_limit(__u64 limit) {
  static char str[32];
  if (limit == XFRM_INF)
    strcpy(str, "(INF)");
  else
    sprintf(str, "%llu", (unsigned long long)limit);
  return str;
}


x86 assembly (clang, -O0):
<strxf_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%rax
jne    1158 <strxf_limit+0x38>
lea    0x2ef9(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcpy@plt>
jmp    116f <strxf_limit+0x4f>
mov    -0x8(%rbp),%rdx
lea    0x2edd(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2eca(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strxf_limit>:
push   %rax
mov    0x2eb8(%rip),%rax
cmp    %rdi,(%rax)
jne    1142 <strxf_limit+0x22>
lea    0x2f0c(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1158 <strxf_limit+0x38>
mov    %rdi,%rdx
lea    0x2ef4(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ee1(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@strxf_limit.str = internal global [32 x i8] zeroinitializer
@XFRM_INF = global i64 0
@.str = [6 x i8] c"(INF)\00"
@.str.1 = [5 x i8] c"%llu\00"
define i8* @strxf_limit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @XFRM_INF
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @strxf_limit.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = load i64, i64* %2
%10 = call i32 @sprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @strxf_limit.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %8, %6
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @strxf_limit.str, i64 0, i64 0)
}

LLVM IR (-O2):
@strxf_limit.str = internal global [32 x i8] zeroinitializer
@XFRM_INF = global i64 0
@.str = [6 x i8] c"(INF)\00"
@.str.1 = [5 x i8] c"%llu\00"
define i8* @strxf_limit(i64 %0) {
%2 = load i64, i64* @XFRM_INF
%3 = icmp eq i64 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @strcpy(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @strxf_limit.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @strxf_limit.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %0)
br label %8
8: ; preds = %6, %4
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @strxf_limit.str, i64 0, i64 0)
}