xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__23__IO__selectIOFunc();
void HplMsp430Usart1P__URXD__selectIOFunc(void) {
  HplMsp430GeneralIOP__23__IO__selectIOFunc();
}


x86 assembly (clang, -O0):
<HplMsp430Usart1P__URXD__selectIOFunc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMsp430GeneralIOP__23__IO__selectIOFunc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HplMsp430Usart1P__URXD__selectIOFunc>:
xor    %eax,%eax
jmp    1030 <HplMsp430GeneralIOP__23__IO__selectIOFunc@plt>

LLVM IR (-O0):
define void @HplMsp430Usart1P__URXD__selectIOFunc() {
%1 = call i32 (...) @HplMsp430GeneralIOP__23__IO__selectIOFunc()
ret void
}

LLVM IR (-O2):
define void @HplMsp430Usart1P__URXD__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__23__IO__selectIOFunc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int recvfrom(int, void *, int, int /*<<< orphan*/, int /*<<< orphan*/ *,
             int /*<<< orphan*/ *);
int RecvMsgByUdp(int nFile, void *pData, int *pnSize) {
  int nSize;
  assert((*pnSize = recvfrom(nFile, pData, *pnSize, 0, NULL, NULL)) > 0);
  return 0;
}


x86 assembly (clang, -O0):
<RecvMsgByUdp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%r8
call   1040 <recvfrom@plt>
mov    -0x18(%rbp),%rcx
mov    %eax,(%rcx)
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RecvMsgByUdp>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdx),%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <recvfrom@plt>
mov    %eax,(%rbx)
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @RecvMsgByUdp(i32 %0, i8* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = call i32 @recvfrom(i32 %8, i8* %9, i32 %11, i32 0, i32* null, i32* null)
%13 = load i32*, i32** %6
store i32 %12, i32* %13
%14 = icmp sgt i32 %12, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @RecvMsgByUdp(i32 %0, i8* %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = tail call i32 @recvfrom(i32 %0, i8* %1, i32 %4, i32 0, i32* null, i32* null)
store i32 %5, i32* %2
%6 = icmp sgt i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
char foo6(int);
__attribute__((no)) signed char bar6(int x) { return foo6(x + 6); }


x86 assembly (clang, -O0):
<bar6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x6,%edi
call   1030 <foo6@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar6>:
add    $0x6,%edi
jmp    1030 <foo6@plt>

LLVM IR (-O0):
define signext i8 @bar6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 6
%5 = call signext i8 @foo6(i32 %4)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @bar6(i32 %0) {
%2 = add nsw i32 %0, 6
%3 = tail call signext i8 @foo6(i32 %2)
ret i8 %3
}
/* Variables and functions */
double f_to_c(double);
double f_to_k(double fahrenheit) { return (f_to_c(fahrenheit) + 273.15); }


x86 assembly (clang, -O0):
<f_to_k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <f_to_c@plt>
movsd  0xed1(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_to_k>:
push   %rax
call   1030 <f_to_c@plt>
addsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f_to_k(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @f_to_c(double %3)
%5 = fadd double %4, 2.731500e+02
ret double %5
}

LLVM IR (-O2):
define double @f_to_k(double %0) {
%2 = tail call double @f_to_c(double %0)
%3 = fadd double %2, 2.731500e+02
ret double %3
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
struct fsm *fsm_concat_m_n(struct fsm *, int, int);
struct fsm *fsm_concat_n(struct fsm *net1, int n) {
  return (fsm_concat_m_n(net1, n, n));
}


x86 assembly (clang, -O0):
<fsm_concat_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <fsm_concat_m_n@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_concat_n>:
mov    %esi,%edx
jmp    1030 <fsm_concat_m_n@plt>

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_concat_n(%struct.fsm* %0, i32 %1) {
%3 = alloca %struct.fsm*
%4 = alloca i32
store %struct.fsm* %0, %struct.fsm** %3
store i32 %1, i32* %4
%5 = load %struct.fsm*, %struct.fsm** %3
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = call %struct.fsm* @fsm_concat_m_n(%struct.fsm* %5, i32 %6, i32 %7)
ret %struct.fsm* %8
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_concat_n(%struct.fsm* %0, i32 %1) {
%3 = tail call %struct.fsm* @fsm_concat_m_n(%struct.fsm* %0, i32 %1, i32 %1)
ret %struct.fsm* %3
}
/* Variables and functions */
scalar_t__ get_real_sec(int);
float fget_real_sec(int flag) { return (float)get_real_sec(flag); }


x86 assembly (clang, -O0):
<fget_real_sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_real_sec@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget_real_sec>:
push   %rax
call   1030 <get_real_sec@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fget_real_sec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @get_real_sec(i32 %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @fget_real_sec(i32 %0) {
%2 = tail call i64 @get_real_sec(i32 %0)
%3 = sitofp i64 %2 to float
ret float %3
}
prntwrd(w) char *w;
{
  register int wsize;
  if ((wsize = strlen(w)) < 8) {
    printf("\n%s\t\t", w);
  } else if ((wsize >= 8) && (wsize < 16)) {
    printf("\n%s\t", w);
  } else {
    printf("\n%s  ", w);
  };
}


x86 assembly (clang, -O0):
<prntwrd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x8,%eax
jge    1158 <prntwrd+0x38>
mov    -0x10(%rbp),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    119a <prntwrd+0x7a>
cmpl   $0x8,-0x14(%rbp)
jl     1183 <prntwrd+0x63>
cmpl   $0x10,-0x14(%rbp)
jge    1183 <prntwrd+0x63>
mov    -0x10(%rbp),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1195 <prntwrd+0x75>
mov    -0x10(%rbp),%rsi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    119a <prntwrd+0x7a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prntwrd>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x10,%eax
lea    0xed3(%rip),%rcx
lea    0xed1(%rip),%rdx
cmovb  %rcx,%rdx
cmp    $0x8,%eax
lea    0xeb8(%rip),%rdi
cmovge %rdx,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A%s\09\09\00"
@.str.1 = [5 x i8] c"\0A%s\09\00"
@.str.2 = [6 x i8] c"\0A%s \00"
define i32 @prntwrd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %4
%8 = icmp slt i32 %7, 8
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %25
12: ; preds = %1
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 8
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 16
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i8*, i8** %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %19)
br label %24
21: ; preds = %15, %12
%22 = load i8*, i8** %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %22)
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %9
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%s\09\09\00"
@.str.1 = [5 x i8] c"\0A%s\09\00"
@.str.2 = [6 x i8] c"\0A%s \00"
define i32 @prntwrd(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp slt i32 %3, 8
%5 = icmp ult i32 %3, 16
%6 = select i1 %5, 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.2, i64 0, i64 0)
%7 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %7, i8* %0)
ret i32 undef
}
/* Variables and functions */
long long pow(long long, long long);
int /*<<< orphan*/ printf(char *, long long);
int /*<<< orphan*/ scanf(char *, long long *, long long *);
int main() {
  long long a = 1, b = 0, c = 1;
  scanf("%lld %lld", &a, &b);
  c = pow(a, b);
  printf("ans: %lld", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
lea    0xea2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <pow@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x1,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xeb3(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1050 <pow@plt>
lea    0xe98(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lld %lld\00"
@.str.1 = [10 x i8] c"ans: %lld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 1, i64* %2
store i64 0, i64* %3
store i64 1, i64* %4
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%6 = load i64, i64* %2
%7 = load i64, i64* %3
%8 = call i64 @pow(i64 %6, i64 %7)
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lld %lld\00"
@.str.1 = [10 x i8] c"ans: %lld\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 1, i64* %1
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = load i64, i64* %1
%7 = load i64, i64* %2
%8 = call i64 @pow(i64 %6, i64 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %8)
ret i32 0
}
void RTLockValidatorRecExclReleaseOwner(void) {}


x86 assembly (clang, -O0):
<RTLockValidatorRecExclReleaseOwner>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTLockValidatorRecExclReleaseOwner>:
ret

LLVM IR (-O0):
define void @RTLockValidatorRecExclReleaseOwner() {
ret void
}

LLVM IR (-O2):
define void @RTLockValidatorRecExclReleaseOwner() {
ret void
}
int f_ble_mm1(float *a1, float *a2) {
  return (__builtin_islessequal(*a1, *a2));
}


x86 assembly (clang, -O0):
<f_ble_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_ble_mm1>:
movss  (%rsi),%xmm0
xor    %eax,%eax
ucomiss (%rdi),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @f_ble_mm1(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fcmp ole float %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f_ble_mm1(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = fcmp ole float %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ popen_nsupdate(char const *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, char const *);
int remove_ipv6(const char *hostname, const char *server,
                const char *priv_key) {
  char input[4096];
  snprintf(input, sizeof(input), "server %s\nupdate delete %s AAAA\nsend\nquit",
           server, hostname);
  popen_nsupdate(priv_key, input);
  return 0;
}


x86 assembly (clang, -O0):
<remove_ipv6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1020(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    $0x1000,%esi
lea    0xeae(%rip),%rdx
call   1040 <snprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1020(%rbp),%rsi
call   1030 <popen_nsupdate@plt>
xor    %eax,%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_ipv6>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %rdx,%rbx
mov    %rsi,%rcx
mov    %rdi,%r8
lea    0xec6(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1000,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <popen_nsupdate@plt>
xor    %eax,%eax
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [42 x i8] c"server %s\0Aupdate delete %s AAAA\0Asend\0Aquit\00"
define i32 @remove_ipv6(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [4096 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = call i32 @snprintf(i8* %8, i32 4096, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = load i8*, i8** %6
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %7, i64 0, i64 0
%14 = call i32 @popen_nsupdate(i8* %12, i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"server %s\0Aupdate delete %s AAAA\0Asend\0Aquit\00"
define i32 @remove_ipv6(i8* %0, i8* %1, i8* %2) {
%4 = alloca [4096 x i8]
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%6 = call i32 @snprintf(i8* %5, i32 4096, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%7 = call i32 @popen_nsupdate(i8* %2, i8* %5)
ret i32 0
}
char *COM_StripPathFromFilename(const char *in) {
  char *s = strrchr(in, '/');
  if (s == ((void *)0))
    return strdup(in);
  else
    return strdup(s + 1);
}


x86 assembly (clang, -O0):
<COM_StripPathFromFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115b <COM_StripPathFromFilename+0x3b>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    116c <COM_StripPathFromFilename+0x4c>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_StripPathFromFilename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1140 <COM_StripPathFromFilename+0x20>
add    $0x1,%rax
mov    %rax,%rdi
pop    %rbx
jmp    1040 <strdup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strdup@plt>

LLVM IR (-O0):
define i8* @COM_StripPathFromFilename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i32 47)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %2
br label %16
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = call i8* @strdup(i8* %14)
store i8* %15, i8** %2
br label %16
16: ; preds = %12, %9
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
define noalias i8* @COM_StripPathFromFilename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @strdup(i8* %0)
br label %9
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = tail call i8* @strdup(i8* %7)
br label %9
9: ; preds = %6, %4
%10 = phi i8* [ %5, %4 ], [ %8, %6 ]
ret i8* %10
}
/* Variables and functions */
long ceil(double num) {
  long res = (long)num;
  if (num != res) {
    res++;
  }
  return res;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jne    1133 <ceil+0x33>
jp     1133 <ceil+0x33>
jmp    113f <ceil+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
cvttsd2si %xmm0,%rcx
cvtsi2sd %rcx,%xmm1
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @ceil(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i64
store i64 %5, i64* %3
%6 = load double, double* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to double
%9 = fcmp une double %6, %8
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i64, i64* %3
%12 = add nsw i64 %11, 1
store i64 %12, i64* %3
br label %13
13: ; preds = %10, %1
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @ceil(double %0) {
%2 = fptosi double %0 to i64
%3 = sitofp i64 %2 to double
%4 = fcmp une double %3, %0
%5 = zext i1 %4 to i64
%6 = add nsw i64 %5, %2
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int rightrot(int, int);
int main() {
  int x, n;
  x = 0x70f0f0f1;
  n = 4;
  printf("%08x >>(rotated) %d = %08x\n", x, n, rightrot(x, n));
  x = 0x170f0f0f;
  n = 8;
  printf("%08x >>(rotated) %d = %08x\n", x, n, rightrot(x, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x70f0f0f1,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <rightrot@plt>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    %eax,%ecx
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x170f0f0f,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <rightrot@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x70f0f0f1,%edi
mov    $0x4,%esi
call   1040 <rightrot@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x70f0f0f1,%esi
mov    $0x4,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
mov    $0x170f0f0f,%edi
mov    $0x8,%esi
call   1040 <rightrot@plt>
mov    %rbx,%rdi
mov    $0x170f0f0f,%esi
mov    $0x8,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%08x >>(rotated) %d = %08x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1894838513, i32* %2
store i32 4, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @rightrot(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %8)
store i32 386862863, i32* %2
store i32 8, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @rightrot(i32 %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"%08x >>(rotated) %d = %08x\0A\00"
define i32 @main() {
%1 = tail call i32 @rightrot(i32 1894838513, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1894838513, i32 4, i32 %1)
%3 = tail call i32 @rightrot(i32 386862863, i32 8)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 386862863, i32 8, i32 %3)
ret i32 0
}
int _putchar_r(ptr, c)
struct _reent *ptr;
int c;
{ return __sputc(c, _stdout_r(ptr)); }


x86 assembly (clang, -O0):
<_putchar_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <_stdout_r@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1030 <__sputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_putchar_r>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
call   1040 <_stdout_r@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <__sputc@plt>

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_putchar_r(%struct._reent* %0, i32 %1) {
%3 = alloca %struct._reent*
%4 = alloca i32
store %struct._reent* %0, %struct._reent** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load %struct._reent*, %struct._reent** %3
%7 = call i32 (%struct._reent*, ...) bitcast (i32 (...)* @_stdout_r to i32 (%struct._reent*, ...)*)(%struct._reent* %6)
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @__sputc to i32 (i32, i32, ...)*)(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_putchar_r(%struct._reent* %0, i32 %1) {
%3 = tail call i32 (%struct._reent*, ...) bitcast (i32 (...)* @_stdout_r to i32 (%struct._reent*, ...)*)(%struct._reent* %0)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @__sputc to i32 (i32, i32, ...)*)(i32 %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
int main() {
  write(1, "hello world\n", 13);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
mov    $0xd,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0xd,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 13)
%3 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 13)
%2 = tail call i32 @_exit(i32 0)
unreachable
}
int isalpha(int c) { return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); }


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <isalpha+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113f <isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <isalpha+0x39>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int omp_get_max_threads();
int numa_num_configured_cpus() { return omp_get_max_threads(); }


x86 assembly (clang, -O0):
<numa_num_configured_cpus>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omp_get_max_threads@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<numa_num_configured_cpus>:
xor    %eax,%eax
jmp    1030 <omp_get_max_threads@plt>

LLVM IR (-O0):
define i32 @numa_num_configured_cpus() {
%1 = call i32 (...) @omp_get_max_threads()
ret i32 %1
}

LLVM IR (-O2):
define i32 @numa_num_configured_cpus() {
%1 = tail call i32 (...) @omp_get_max_threads()
ret i32 %1
}
int qcs_min_double(double a, double b) { return a > b ? b : a; }


x86 assembly (clang, -O0):
<qcs_min_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <qcs_min_double+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <qcs_min_double+0x37>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcs_min_double>:
minsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @qcs_min_double(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
br label %12
10: ; preds = %2
%11 = load double, double* %3
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
%14 = fptosi double %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @qcs_min_double(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %1, double %0
%5 = fptosi double %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
char *my_strncpy(char *, char *, int /*<<< orphan*/);
char *my_strcpy(char *dest, char *src) {
  return my_strncpy(dest, src, my_strlen(src));
}


x86 assembly (clang, -O0):
<my_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <my_strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <my_strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <my_strncpy@plt>

LLVM IR (-O0):
define i8* @my_strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @my_strlen(i8* %7)
%9 = call i8* @my_strncpy(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @my_strcpy(i8* %0, i8* %1) {
%3 = tail call i32 @my_strlen(i8* %1)
%4 = tail call i8* @my_strncpy(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
void check_keys_moved(float x, float y, float mv_x, float mv_y) {}


x86 assembly (clang, -O0):
<check_keys_moved>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_keys_moved>:
ret

LLVM IR (-O0):
define void @check_keys_moved(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
ret void
}

LLVM IR (-O2):
define void @check_keys_moved(float %0, float %1, float %2, float %3) {
ret void
}
void test_iscntrl_macro(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, iscntrl(i++) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_iscntrl_macro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1184 <test_iscntrl_macro+0x64>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1030 <iscntrl@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%esi
cmovne %eax,%ecx
lea    0xe8f(%rip),%rdi
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    112f <test_iscntrl_macro+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_iscntrl_macro>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1030 <iscntrl@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_iscntrl_macro+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_iscntrl_macro = [19 x i8] c"test_iscntrl_macro\00"
define void @test_iscntrl_macro() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 @iscntrl(i32 %9)
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_iscntrl_macro, i64 0, i64 0), i32 %8, i32 %14)
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_iscntrl_macro = [19 x i8] c"test_iscntrl_macro\00"
define void @test_iscntrl_macro() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 @iscntrl(i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_iscntrl_macro, i64 0, i64 0), i32 %2, i32 %6)
%8 = icmp eq i32 %3, 256
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
/* Variables and functions */
int INTERNAL_SSL_INIT() {
  static int InitDone = 0;
  char *Tempstr = NULL;
  return (0);
}


x86 assembly (clang, -O0):
<INTERNAL_SSL_INIT>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<INTERNAL_SSL_INIT>:
xor    %eax,%eax
ret

LLVM IR (-O0):
@INTERNAL_SSL_INIT.InitDone = internal global i32 0
define i32 @INTERNAL_SSL_INIT() {
%1 = alloca i8*
store i8* null, i8** %1
ret i32 0
}

LLVM IR (-O2):
define i32 @INTERNAL_SSL_INIT() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *malloc_wr(size_t count_byte) {
  void *ptmp = malloc(count_byte);
  if (!ptmp) {
    fprintf(stderr, " Can't alloc memory. Program exit\n");
    exit(EXIT_FAILURE);
  }
  return ptmp;
}


x86 assembly (clang, -O0):
<malloc_wr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <malloc_wr+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_wr>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <malloc_wr+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c" Can't alloc memory. Program exit\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @malloc_wr(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c" Can't alloc memory. Program exit\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @malloc_wr(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ f();
void g() {
  f();
  f();
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <f@plt>
mov    $0x0,%al
call   1030 <f@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @g() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @f()
ret void
}

LLVM IR (-O2):
define void @g() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @f()
ret void
}
long long bit07() { return 0x0000000000000080LL; }


x86 assembly (clang, -O0):
<bit07>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit07>:
mov    $0x80,%eax
ret

LLVM IR (-O0):
define i64 @bit07() {
ret i64 128
}

LLVM IR (-O2):
define i64 @bit07() {
ret i64 128
}
unsigned int MAJOR(unsigned int dev) { return dev >> 20; }


x86 assembly (clang, -O0):
<MAJOR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x14,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAJOR>:
mov    %edi,%eax
shr    $0x14,%eax
ret

LLVM IR (-O0):
define i32 @MAJOR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 20
ret i32 %4
}

LLVM IR (-O2):
define i32 @MAJOR(i32 %0) {
%2 = lshr i32 %0, 20
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ state_reset();
void init(void) {
  glClearColor(0.1, 0.1, 0.1, 1.0);
  glShadeModel(GL_SMOOTH);
  glEnable(GL_DEPTH_TEST);
  state_reset();
  return;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
movsd  0xeb4(%rip),%xmm2
movsd  0xeb4(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1040 <glClearColor@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    $0x0,%al
call   1050 <state_reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
movsd  0xeb7(%rip),%xmm0
movsd  0xeb7(%rip),%xmm3
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1040 <glClearColor@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <state_reset@plt>

LLVM IR (-O0):
@GL_SMOOTH = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = call i32 @glClearColor(double 1.000000e-01, double 1.000000e-01, double 1.000000e-01, double 1.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = call i32 @glShadeModel(i32 %2)
%4 = load i32, i32* @GL_DEPTH_TEST
%5 = call i32 @glEnable(i32 %4)
%6 = call i32 (...) @state_reset()
ret void
}

LLVM IR (-O2):
@GL_SMOOTH = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = tail call i32 @glClearColor(double 1.000000e-01, double 1.000000e-01, double 1.000000e-01, double 1.000000e+00)
%2 = load i32, i32* @GL_SMOOTH
%3 = tail call i32 @glShadeModel(i32 %2)
%4 = load i32, i32* @GL_DEPTH_TEST
%5 = tail call i32 @glEnable(i32 %4)
%6 = tail call i32 (...) @state_reset()
ret void
}
void f71(void) {
  ({
    a:
      ({ 0; });
      ({ 0; });
      goto a;
      0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f71>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    1104 <f71+0x4>

x86 assembly (clang, -O2):
<f71>:
jmp    1100 <f71>

LLVM IR (-O0):
define void @f71() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
br label %4
4: ; preds = %4, %0
store i32 0, i32* %1
%5 = load i32, i32* %1
store i32 0, i32* %2
%6 = load i32, i32* %2
br label %4
}

LLVM IR (-O2):
define void @f71() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  int z = __VERIFIER_nondet_int();
  while (x - y > 0) {
    x = -x + y;
    y = z;
    z = z + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    116b <main+0x5b>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %4
br label %8
8: ; preds = %13, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sub nsw i32 %9, %10
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %8
%14 = load i32, i32* %2
%15 = sub nsw i32 0, %14
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %4
store i32 %18, i32* %3
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %8
21: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PTRACE_TRACEME;
scalar_t__ ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/ *,
                  int /*<<< orphan*/ *);
int main() {
  if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) < 0) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <ptrace@plt>
cmp    $0x0,%rax
jge    1145 <main+0x35>
jmp    1145 <main+0x35>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <ptrace@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@PTRACE_TRACEME = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @PTRACE_TRACEME
%3 = call i64 @ptrace(i32 %2, i32 0, i32* null, i32* null)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
@PTRACE_TRACEME = global i32 0
define i32 @main() {
%1 = load i32, i32* @PTRACE_TRACEME
%2 = tail call i64 @ptrace(i32 %1, i32 0, i32* null, i32* null)
ret i32 0
}
int test_imm_C5int8_mem(signed char *val) {
  return ((*val) & (0xC5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C5int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xc5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C5int8_mem>:
testb  $0xc5,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C5int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 197
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_C5int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -59
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void PWMFaultIntClearExt(uint32_t ui32Base, uint32_t ui32FaultInts) {
  ;

  ;
  (*((volatile uint32_t *)(ui32Base + 0x0000001C))) = ui32FaultInts;
}


x86 assembly (clang, -O0):
<PWMFaultIntClearExt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMFaultIntClearExt>:
mov    %rsi,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @PWMFaultIntClearExt(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 28
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @PWMFaultIntClearExt(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 28
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usleep(unsigned int);
void waiting_progress(unsigned int time_interval) {
  int i;
  for (i = 0; i < 50; i++) {
    fflush(stdout);
    usleep(time_interval * 10000);
  }
}


x86 assembly (clang, -O0):
<waiting_progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    1164 <waiting_progress+0x44>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
imul   $0x2710,-0x4(%rbp),%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <waiting_progress+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waiting_progress>:
push   %rbp
push   %r14
push   %rbx
imul   $0x2710,%edi,%ebx
mov    $0x32,%ebp
mov    0x2eaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%r14),%edi
call   1030 <fflush@plt>
mov    %ebx,%edi
call   1040 <usleep@plt>
add    $0xffffffff,%ebp
jne    1140 <waiting_progress+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @waiting_progress(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 50
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
%10 = load i32, i32* %2
%11 = mul i32 %10, 10000
%12 = call i32 @usleep(i32 %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @waiting_progress(i32 %0) {
%2 = mul i32 %0, 10000
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %8, %3 ]
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = tail call i32 @usleep(i32 %2)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, 50
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
int on_recv_from(struct fs_context *context, char *data, int length,
                 struct sockaddr_in *fromaddr) {
  return 0;
}


x86 assembly (clang, -O0):
<on_recv_from>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_recv_from>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.fs_context = type opaque
%struct.sockaddr_in = type opaque
define i32 @on_recv_from(%struct.fs_context* %0, i8* %1, i32 %2, %struct.sockaddr_in* %3) {
%5 = alloca %struct.fs_context*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.sockaddr_in*
store %struct.fs_context* %0, %struct.fs_context** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.sockaddr_in* %3, %struct.sockaddr_in** %8
ret i32 0
}

LLVM IR (-O2):
%struct.fs_context = type opaque
%struct.sockaddr_in = type opaque
define i32 @on_recv_from(%struct.fs_context* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, %struct.sockaddr_in* nocapture readnone %3) {
ret i32 0
}