xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int test_fork_sigchld_ignored(void) {
  signal(SIGCHLD, SIG_IGN);
  int n = fork();
  if (n == 0)
    exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<test_fork_sigchld_ignored>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    116a <test_fork_sigchld_ignored+0x3a>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fork_sigchld_ignored>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1157 <test_fork_sigchld_ignored+0x27>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define i32 @test_fork_sigchld_ignored() {
%1 = alloca i32
%2 = load i32, i32* @SIGCHLD
%3 = load i32, i32* @SIG_IGN
%4 = call i32 @signal(i32 %2, i32 %3)
%5 = call i32 (...) @fork()
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define i32 @test_fork_sigchld_ignored() {
%1 = load i32, i32* @SIGCHLD
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = tail call i32 (...) @fork()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ EC_KEY;
typedef int /*<<< orphan*/ EC_GROUP;

/* Variables and functions */
int /*<<< orphan*/ *EC_KEY_new();
int /*<<< orphan*/ EC_KEY_set_group(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *sm2_ec_group2();
EC_KEY *EC_KEY_new_group2() {
  EC_KEY *ret = EC_KEY_new();
  if (ret == NULL)
    return NULL;
  EC_GROUP *group = sm2_ec_group2();
  EC_KEY_set_group(ret, group);
  return ret;
}


x86 assembly (clang, -O0):
<EC_KEY_new_group2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1040 <EC_KEY_new@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <EC_KEY_new_group2+0x2b>
movq   $0x0,-0x8(%rbp)
jmp    117b <EC_KEY_new_group2+0x4b>
mov    $0x0,%al
call   1030 <sm2_ec_group2@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <EC_KEY_set_group@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EC_KEY_new_group2>:
push   %rbx
xor    %eax,%eax
call   1040 <EC_KEY_new@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1152 <EC_KEY_new_group2+0x22>
xor    %eax,%eax
call   1030 <sm2_ec_group2@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <EC_KEY_set_group@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @EC_KEY_new_group2() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32*
%4 = call i32* (...) @EC_KEY_new()
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %0
store i32* null, i32** %1
br label %14
8: ; preds = %0
%9 = call i32* (...) @sm2_ec_group2()
store i32* %9, i32** %3
%10 = load i32*, i32** %2
%11 = load i32*, i32** %3
%12 = call i32 @EC_KEY_set_group(i32* %10, i32* %11)
%13 = load i32*, i32** %2
store i32* %13, i32** %1
br label %14
14: ; preds = %8, %7
%15 = load i32*, i32** %1
ret i32* %15
}

LLVM IR (-O2):
define i32* @EC_KEY_new_group2() {
%1 = tail call i32* (...) @EC_KEY_new()
%2 = icmp eq i32* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32* (...) @sm2_ec_group2()
%5 = tail call i32 @EC_KEY_set_group(i32* %1, i32* %4)
br label %6
6: ; preds = %0, %3
ret i32* %1
}
int mus_audio_open_input(int dev, int srate, int chans, int format, int size) {
  return (-1);
}


x86 assembly (clang, -O0):
<mus_audio_open_input>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mus_audio_open_input(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 -1
}

LLVM IR (-O2):
define i32 @mus_audio_open_input(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 -1
}
AR0RX1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[10000000]) = (p1[x1]); }


x86 assembly (clang, -O0):
<AR0RX1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2625a00(%rax)
02
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0RX1>:
movslq %esi,%rax
movss  (%rcx,%rax,4),%xmm0
movss  %xmm0,0x2625a00(%rdx)
02
ret

LLVM IR (-O0):
define i32 @AR0RX1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = load float, float* %19
%21 = load float*, float** %12
%22 = getelementptr inbounds float, float* %21, i64 10000000
store float %20, float* %22
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @AR0RX1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds float, float* %5, i64 %7
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %4, i64 10000000
store float %9, float* %10
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ test_rmr(char *);
void test_init() {
  test_rmr("/tmp/avfstest");
  mkdir("/tmp/avfstest", 0777);
}


x86 assembly (clang, -O0):
<test_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <test_rmr@plt>
lea    0xec9(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_init>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <test_rmr@plt>
mov    %rbx,%rdi
mov    $0x1ff,%esi
pop    %rbx
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/tmp/avfstest\00"
define void @test_init() {
%1 = call i32 @test_rmr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 511)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/tmp/avfstest\00"
define void @test_init() {
%1 = tail call i32 @test_rmr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 511)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void err(char *l) {
  fprintf(stderr, "Error: %s\n", l);
  exit(1);
}


x86 assembly (clang, -O0):
<err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ USART_transmit(char);
void USART_putstring(char *StringPtr) {
  while (*StringPtr != '\0') {
    USART_transmit(*StringPtr);
    StringPtr++;
  }
}


x86 assembly (clang, -O0):
<USART_putstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <USART_putstring+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <USART_transmit@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <USART_putstring+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USART_putstring>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <USART_putstring+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <USART_transmit@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <USART_putstring+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @USART_putstring(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @USART_transmit(i8 signext %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @USART_putstring(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @USART_transmit(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void RTLogGetFlags(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogGetFlags() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glMap2d_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glMap2f_size(GLenum e) {
  return __glMap2d_size(e);
}


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

x86 assembly (clang, -O2):
<__glMap2f_size>:
jmp    1030 <__glMap2d_size@plt>

LLVM IR (-O0):
define hidden i32 @__glMap2f_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__glMap2d_size(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define hidden i32 @__glMap2f_size(i32 %0) {
%2 = tail call i32 @__glMap2d_size(i32 %0)
ret i32 %2
}
int checkBid(int currentBid, int maximumBid) {
  if (currentBid > maximumBid || currentBid == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<checkBid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1120 <checkBid+0x20>
cmpl   $0x0,-0x8(%rbp)
jne    112c <checkBid+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <checkBid+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkBid>:
cmp    %esi,%edi
setg   %al
test   %edi,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @checkBid(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9, %2
store i32 1, i32* %3
br label %14
13: ; preds = %9
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @checkBid(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = icmp eq i32 %0, 0
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Bubble(int);
int main() {
  int i;
  for (i = 0; i < 5; i++)
    Bubble(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <Bubble@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <Bubble@plt>
mov    $0x1,%edi
call   1030 <Bubble@plt>
mov    $0x2,%edi
call   1030 <Bubble@plt>
mov    $0x3,%edi
call   1030 <Bubble@plt>
mov    $0x4,%edi
call   1030 <Bubble@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @Bubble(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @Bubble(i32 0)
%2 = tail call i32 @Bubble(i32 1)
%3 = tail call i32 @Bubble(i32 2)
%4 = tail call i32 @Bubble(i32 3)
%5 = tail call i32 @Bubble(i32 4)
ret i32 0
}
double absolute(double x) {
  if (x > 0.0)
    return x;
  else
    return -x;
}


x86 assembly (clang, -O0):
<absolute>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112a <absolute+0x2a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114b <absolute+0x4b>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absolute>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @absolute(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %3
store double %7, double* %2
br label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fneg double %9
store double %10, double* %2
br label %11
11: ; preds = %8, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @absolute(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int x();
main() { return x(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <x@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @x()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @x()
ret i32 %1
}
/* Variables and functions */
unsigned long in_long(int);
int /*<<< orphan*/ out_long(int, unsigned long);
int pci_bus_probe() {
  unsigned long init = 0x80000000;
  out_long(0xCF8, init);
  init = in_long(0xCFC);
  if (init == 0xFFFFFFFF)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<pci_bus_probe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80000000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xcf8,%edi
call   1040 <out_long@plt>
mov    $0xcfc,%edi
call   1030 <in_long@plt>
mov    %rax,-0x10(%rbp)
mov    $0xffffffff,%eax
cmp    %rax,-0x10(%rbp)
jne    1168 <pci_bus_probe+0x48>
movl   $0x0,-0x4(%rbp)
jmp    116f <pci_bus_probe+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_bus_probe>:
push   %rax
mov    $0x80000000,%esi
mov    $0xcf8,%edi
call   1040 <out_long@plt>
mov    $0xcfc,%edi
call   1030 <in_long@plt>
mov    $0xffffffff,%edx
xor    %ecx,%ecx
cmp    %rdx,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pci_bus_probe() {
%1 = alloca i32
%2 = alloca i64
store i64 2147483648, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @out_long(i32 3320, i64 %3)
%5 = call i64 @in_long(i32 3324)
store i64 %5, i64* %2
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 4294967295
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %1
br label %10
9: ; preds = %0
store i32 1, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @pci_bus_probe() {
%1 = tail call i32 @out_long(i32 3320, i64 2147483648)
%2 = tail call i64 @in_long(i32 3324)
%3 = icmp ne i64 %2, 4294967295
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t hash2size(unsigned short hash) {
  if (hash <= 128) {
    return hash * 16;
  } else {
    return (hash - 128) * 64 + (16 * 128);
  }
}


x86 assembly (clang, -O0):
<hash2size>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
cmp    $0x80,%eax
jg     112c <hash2size+0x2c>
movzwl -0xa(%rbp),%eax
shl    $0x4,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    1143 <hash2size+0x43>
movzwl -0xa(%rbp),%eax
sub    $0x80,%eax
shl    $0x6,%eax
add    $0x800,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash2size>:
mov    %edi,%ecx
shl    $0x4,%ecx
mov    %edi,%eax
shl    $0x6,%eax
add    $0xffffe800,%eax
cmp    $0x81,%edi
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i64 @hash2size(i16 zeroext %0) {
%2 = alloca i64
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = icmp sle i32 %5, 128
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = mul nsw i32 %9, 16
%11 = sext i32 %10 to i64
store i64 %11, i64* %2
br label %19
12: ; preds = %1
%13 = load i16, i16* %3
%14 = zext i16 %13 to i32
%15 = sub nsw i32 %14, 128
%16 = mul nsw i32 %15, 64
%17 = add nsw i32 %16, 2048
%18 = sext i32 %17 to i64
store i64 %18, i64* %2
br label %19
19: ; preds = %12, %7
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @hash2size(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = icmp ult i16 %0, 129
%4 = shl nuw nsw i32 %2, 4
%5 = shl nuw nsw i32 %2, 6
%6 = add nsw i32 %5, -6144
%7 = select i1 %3, i32 %4, i32 %6
%8 = zext i32 %7 to i64
ret i64 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ __LONG_LONG_PAIR(int /*<<< orphan*/, int /*<<< orphan*/);
size_t __pwrite(int, void *, size_t, int /*<<< orphan*/, int /*<<< orphan*/);
size_t __libc_pwrite(int fd, void *buf, size_t count, off_t offset) {
  return __pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(0, offset));
}


x86 assembly (clang, -O0):
<__libc_pwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%esi
xor    %edi,%edi
call   1030 <__LONG_LONG_PAIR@plt>
mov    -0x34(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    %eax,%r8d
xor    %ecx,%ecx
call   1040 <__pwrite@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__libc_pwrite>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
mov    %ecx,%esi
call   1030 <__LONG_LONG_PAIR@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %ecx,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <__pwrite@plt>

LLVM IR (-O0):
define i64 @__libc_pwrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @__LONG_LONG_PAIR(i32 0, i32 %12)
%14 = call i64 @__pwrite(i32 %9, i8* %10, i64 %11, i32 0, i32 %13)
ret i64 %14
}

LLVM IR (-O2):
define i64 @__libc_pwrite(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @__LONG_LONG_PAIR(i32 0, i32 %3)
%6 = tail call i64 @__pwrite(i32 %0, i8* %1, i64 %2, i32 0, i32 %5)
ret i64 %6
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISREG(int /*<<< orphan*/);
scalar_t__ lstat(char *, struct stat *);
int check_file(char *path) {
  struct stat info;
  return lstat(path, &info) || !S_ISREG(info.st_mode);
}


x86 assembly (clang, -O0):
<check_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <lstat@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    115e <check_file+0x3e>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <lstat@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <check_file+0x18>
pop    %rcx
ret
mov    (%rsp),%edi
call   1040 <S_ISREG@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @check_file(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @lstat(i8* %4, %struct.stat* %3)
%6 = icmp ne i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = call i32 @S_ISREG(i32 %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %7, %1
%14 = phi i1 [ true, %1 ], [ %12, %7 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @check_file(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @lstat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @S_ISREG(i32 %8)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ 1, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ _strpair(char *, int, int, int *);
int strcpair(char *src, int iLvalue, int iRvalue) {
  int iLen;
  if (_strpair(src, iLvalue, iRvalue, &iLen)) {
    return iLen;
  }
  return -1;
}


x86 assembly (clang, -O0):
<strcpair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    -0x1c(%rbp),%rcx
call   1030 <_strpair@plt>
cmp    $0x0,%rax
je     114a <strcpair+0x3a>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1151 <strcpair+0x41>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpair>:
push   %rax
lea    0x4(%rsp),%rcx
call   1030 <_strpair@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strcpair(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i64 @_strpair(i8* %9, i32 %10, i32 %11, i32* %8)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32, i32* %8
store i32 %15, i32* %4
br label %17
16: ; preds = %3
store i32 -1, i32* %4
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @strcpair(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i64 @_strpair(i8* %0, i32 %1, i32 %2, i32* %4)
%7 = icmp eq i64 %6, 0
%8 = load i32, i32* %4
%9 = select i1 %7, i32 -1, i32 %8
ret i32 %9
}
double fabs(double x) {
  if (x < 0)
    return (x - x) - (x);
  else
    return x;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1130 <fabs+0x30>
movsd  -0x10(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113a <fabs+0x3a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
movapd %xmm0,%xmm2
subsd  %xmm0,%xmm2
subsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load double, double* %3
%8 = load double, double* %3
%9 = fsub double %7, %8
%10 = load double, double* %3
%11 = fsub double %9, %10
store double %11, double* %2
br label %14
12: ; preds = %1
%13 = load double, double* %3
store double %13, double* %2
br label %14
14: ; preds = %12, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @fabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fsub double %0, %0
%4 = fsub double %3, %0
%5 = select i1 %2, double %4, double %0
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ xorshift128plus();
uint64_t sam_rand(void) { return xorshift128plus(); }


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

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

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

LLVM IR (-O2):
define i32 @sam_rand() {
%1 = tail call i32 (...) @xorshift128plus()
ret i32 %1
}
void XtAppReleaseCacheRefs() {}


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

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

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

LLVM IR (-O2):
define void @XtAppReleaseCacheRefs() {
ret void
}
void aesenc(void) { asm volatile("aesenc %xmm0, %xmm1"); }


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

x86 assembly (clang, -O2):
<aesenc>:
aesenc %xmm0,%xmm1
ret

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

LLVM IR (-O2):
define void @aesenc() {
tail call void asm sideeffect "aesenc %xmm0, %xmm1", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void start_adc(void) {
  (*(volatile unsigned int *)(0x7E00B000)) |= 1;
  while ((*(volatile unsigned int *)(0x7E00B000)) & 1)
    ;
  return;
}


x86 assembly (clang, -O0):
<start_adc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7e00b000,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x7e00b000,%eax
mov    %ecx,(%rax)
mov    $0x7e00b000,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112d <start_adc+0x2d>
jmp    1115 <start_adc+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_adc>:
orl    $0x1,0x7e00b000
01
nopl   0x0(%rax,%rax,1)
mov    0x7e00b000,%eax
test   $0x1,%al
jne    1110 <start_adc+0x10>
ret

LLVM IR (-O0):
define void @start_adc() {
%1 = load volatile i32, i32* inttoptr (i64 2113974272 to i32*)
%2 = or i32 %1, 1
store volatile i32 %2, i32* inttoptr (i64 2113974272 to i32*)
br label %3
3: ; preds = %7, %0
%4 = load volatile i32, i32* inttoptr (i64 2113974272 to i32*)
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @start_adc() {
%1 = load volatile i32, i32* inttoptr (i64 2113974272 to i32*)
%2 = or i32 %1, 1
store volatile i32 %2, i32* inttoptr (i64 2113974272 to i32*)
br label %3
3: ; preds = %3, %0
%4 = load volatile i32, i32* inttoptr (i64 2113974272 to i32*)
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ list_replace(struct list_head *, struct list_head *);
void list_replace_init(struct list_head *old_e, struct list_head *new_e) {
  list_replace(old_e, new_e);
  INIT_LIST_HEAD(old_e);
}


x86 assembly (clang, -O0):
<list_replace_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <list_replace@plt>
mov    -0x8(%rbp),%rdi
call   1030 <INIT_LIST_HEAD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call i32 @list_replace(%struct.list_head* %5, %struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @INIT_LIST_HEAD(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_replace(%struct.list_head* %0, %struct.list_head* %1)
%4 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msgqueue_sendstring(char *);
void ClearGraphic(void) {
  msgqueue_sendstring("0");
  return;
}


x86 assembly (clang, -O0):
<ClearGraphic>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <msgqueue_sendstring@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearGraphic>:
lea    0xee9(%rip),%rdi
jmp    1030 <msgqueue_sendstring@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
define void @ClearGraphic() {
%1 = call i32 @msgqueue_sendstring(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define void @ClearGraphic() {
%1 = tail call i32 @msgqueue_sendstring(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flushinp();
void nmstermio_clear_input(void) { flushinp(); }


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

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

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

LLVM IR (-O2):
define void @nmstermio_clear_input() {
%1 = tail call i32 (...) @flushinp()
ret void
}
int skip(int arr[], int elem, int size, int index) {
  while (index < size && elem == arr[index]) {
    index++;
  }
  return index;
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x15(%rbp)
jge    1136 <skip+0x36>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1146 <skip+0x46>
jmp    1154 <skip+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1111 <skip+0x11>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
mov    %ecx,%eax
cmp    %edx,%ecx
jge    1121 <skip+0x21>
movslq %eax,%rcx
lea    (%rdi,%rcx,4),%rcx
nopl   (%rax)
cmp    %esi,(%rcx)
jne    1121 <skip+0x21>
add    $0x1,%eax
add    $0x4,%rcx
cmp    %eax,%edx
jne    1110 <skip+0x10>
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @skip(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
br label %9
9: ; preds = %23, %4
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = load i32, i32* %6
%15 = load i32*, i32** %5
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = icmp eq i32 %14, %19
br label %21
21: ; preds = %13, %9
%22 = phi i1 [ false, %9 ], [ %20, %13 ]
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
br label %9
26: ; preds = %21
%27 = load i32, i32* %8
ret i32 %27
}

LLVM IR (-O2):
define i32 @skip(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %3, %2
br i1 %5, label %6, label %19
6: ; preds = %4
%7 = sext i32 %3 to i64
br label %8
8: ; preds = %6, %13
%9 = phi i64 [ %7, %6 ], [ %14, %13 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = add nsw i64 %9, 1
%15 = trunc i64 %14 to i32
%16 = icmp eq i32 %15, %2
br i1 %16, label %19, label %8
17: ; preds = %8
%18 = trunc i64 %9 to i32
br label %19
19: ; preds = %13, %17, %4
%20 = phi i32 [ %3, %4 ], [ %18, %17 ], [ %2, %13 ]
ret i32 %20
}
/* Type definitions */
struct stack_s {
  int dummy;
};
struct identifier_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ stack_push(struct stack_s *, struct identifier_s *);
int type_push(struct identifier_s *id, struct stack_s *stack) {
  stack_push(stack, id);
  return 1;
}


x86 assembly (clang, -O0):
<type_push>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <stack_push@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type_push>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <stack_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.identifier_s = type { i32 }
%struct.stack_s = type { i32 }
define i32 @type_push(%struct.identifier_s* %0, %struct.stack_s* %1) {
%3 = alloca %struct.identifier_s*
%4 = alloca %struct.stack_s*
store %struct.identifier_s* %0, %struct.identifier_s** %3
store %struct.stack_s* %1, %struct.stack_s** %4
%5 = load %struct.stack_s*, %struct.stack_s** %4
%6 = load %struct.identifier_s*, %struct.identifier_s** %3
%7 = call i32 @stack_push(%struct.stack_s* %5, %struct.identifier_s* %6)
ret i32 1
}

LLVM IR (-O2):
%struct.identifier_s = type { i32 }
%struct.stack_s = type { i32 }
define i32 @type_push(%struct.identifier_s* %0, %struct.stack_s* %1) {
%3 = tail call i32 @stack_push(%struct.stack_s* %1, %struct.identifier_s* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strcmp(char *, char *);
void strcmp_diff_length_0() {
  char *x = "12345";
  char *y = "234";
  clang_analyzer_eval(strcmp(x, y) < 0);
}


x86 assembly (clang, -O0):
<strcmp_diff_length_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_diff_length_0>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <strcmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"234\00"
define void @strcmp_diff_length_0() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %3, i8* %4)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"234\00"
define void @strcmp_diff_length_0() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fedisableexcept(int);
int feenableexcept(int);
int /*<<< orphan*/ support_fpu_flag(int);
int support_fpu_trap(int flag) {
  int exceptions = 0;
  int old;
  if (!support_fpu_flag(flag))
    return 0;
  old = feenableexcept(exceptions);
  if (old == -1)
    return 0;
  fedisableexcept(exceptions & ~old);
  return 1;
}


x86 assembly (clang, -O0):
<support_fpu_trap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <support_fpu_flag@plt>
cmp    $0x0,%eax
jne    115f <support_fpu_trap+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1197 <support_fpu_trap+0x67>
mov    -0xc(%rbp),%edi
call   1030 <feenableexcept@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1180 <support_fpu_trap+0x50>
movl   $0x0,-0x4(%rbp)
jmp    1197 <support_fpu_trap+0x67>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
and    %eax,%edi
call   1040 <fedisableexcept@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<support_fpu_trap>:
push   %rbx
call   1050 <support_fpu_flag@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     1154 <support_fpu_trap+0x24>
xor    %edi,%edi
call   1030 <feenableexcept@plt>
cmp    $0xffffffff,%eax
je     1154 <support_fpu_trap+0x24>
xor    %edi,%edi
call   1040 <fedisableexcept@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @support_fpu_trap(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @support_fpu_flag(i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %22
10: ; preds = %1
%11 = load i32, i32* %4
%12 = call i32 @feenableexcept(i32 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %2
br label %22
16: ; preds = %10
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = xor i32 %18, -1
%20 = and i32 %17, %19
%21 = call i32 @fedisableexcept(i32 %20)
store i32 1, i32* %2
br label %22
22: ; preds = %16, %15, %9
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @support_fpu_trap(i32 %0) {
%2 = tail call i32 @support_fpu_flag(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @feenableexcept(i32 0)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @fedisableexcept(i32 0)
br label %9
9: ; preds = %4, %1, %7
%10 = phi i32 [ 1, %7 ], [ 0, %1 ], [ 0, %4 ]
ret i32 %10
}
/* Variables and functions */
int sin(float);
int sqrt(double);
float funcu(float x) { return (float)(sqrt(3.1415926 - x) / sin(x)); }


x86 assembly (clang, -O0):
<funcu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec2(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sin@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcu>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm1
movsd  0xec9(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
call   1030 <sin@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @funcu(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fsub double 0x400921FB4D12D84A, %4
%6 = call i32 @sqrt(double %5)
%7 = load float, float* %2
%8 = call i32 @sin(float %7)
%9 = sdiv i32 %6, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @funcu(float %0) {
%2 = fpext float %0 to double
%3 = fsub double 0x400921FB4D12D84A, %2
%4 = tail call i32 @sqrt(double %3)
%5 = tail call i32 @sin(float %0)
%6 = sdiv i32 %4, %5
%7 = sitofp i32 %6 to float
ret float %7
}
char is_nose(char nose) {
  char noses[] = {'-', '\'', 'o', '~', '^', 0};
  for (int i = 0; noses[i] != 0; i++)
    if (noses[i] == nose) {
      return noses[i];
    }
  return 0;
}


x86 assembly (clang, -O0):
<is_nose>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
mov    0xef0(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xeea(%rip),%ax
mov    %ax,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
movsbl -0x8(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     116f <is_nose+0x6f>
movslq -0xc(%rbp),%rax
movsbl -0x8(%rbp,%rax,1),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jne    115c <is_nose+0x5c>
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp,%rax,1),%al
mov    %al,-0x1(%rbp)
jmp    1173 <is_nose+0x73>
jmp    1161 <is_nose+0x61>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <is_nose+0x25>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_nose>:
cmp    $0x5d,%dil
jle    111b <is_nose+0x1b>
cmp    $0x5e,%dil
je     112a <is_nose+0x2a>
cmp    $0x6f,%dil
je     112d <is_nose+0x2d>
cmp    $0x7e,%dil
jne    1133 <is_nose+0x33>
mov    $0x7e,%al
ret
cmp    $0x27,%dil
je     1130 <is_nose+0x30>
mov    $0x2d,%al
cmp    $0x2d,%dil
jne    1133 <is_nose+0x33>
ret
mov    $0x5e,%al
ret
mov    $0x6f,%al
ret
mov    $0x27,%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@__const.is_nose.noses = [6 x i8] c"-'o~^\00"
define signext i8 @is_nose(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca [6 x i8]
%5 = alloca i32
store i8 %0, i8* %3
%6 = bitcast [6 x i8]* %4 to i8*
store i32 0, i32* %5
br label %7
7: ; preds = %29, %1
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %32
14: ; preds = %7
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %19, %21
br i1 %22, label %23, label %28
23: ; preds = %14
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 %25
%27 = load i8, i8* %26
store i8 %27, i8* %2
br label %33
28: ; preds = %14
br label %29
29: ; preds = %28
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %7
32: ; preds = %7
store i8 0, i8* %2
br label %33
33: ; preds = %32, %23
%34 = load i8, i8* %2
ret i8 %34
}

LLVM IR (-O2):
define signext i8 @is_nose(i8 signext %0) {
switch i8 %0, label %2 [
i8 45, label %7
i8 39, label %3
i8 111, label %4
i8 126, label %5
i8 94, label %6
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i8 [ 45, %1 ], [ 0, %2 ], [ 39, %3 ], [ 111, %4 ], [ 126, %5 ], [ 94, %6 ]
ret i8 %8
}
int do_692() { return 692; }


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

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

LLVM IR (-O0):
define i32 @do_692() {
ret i32 692
}

LLVM IR (-O2):
define i32 @do_692() {
ret i32 692
}
/* Variables and functions */
bool nrf53_errata_85(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf53_errata_85() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf53_errata_85() {
ret i32 0
}
/* Type definitions */
struct vec4 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec4_min(float *, float *, float *);
__attribute__((always_)) struct vec4 *
psvec4_min(struct vec4 *result, struct vec4 *a, struct vec4 *b) {
  vec4_min((float *)result, (float *)a, (float *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec4_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <vec4_min@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec4_min>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4_min@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_min(%struct.vec4* %0, %struct.vec4* %1, %struct.vec4* %2) {
%4 = alloca %struct.vec4*
%5 = alloca %struct.vec4*
%6 = alloca %struct.vec4*
store %struct.vec4* %0, %struct.vec4** %4
store %struct.vec4* %1, %struct.vec4** %5
store %struct.vec4* %2, %struct.vec4** %6
%7 = load %struct.vec4*, %struct.vec4** %4
%8 = bitcast %struct.vec4* %7 to float*
%9 = load %struct.vec4*, %struct.vec4** %5
%10 = bitcast %struct.vec4* %9 to float*
%11 = load %struct.vec4*, %struct.vec4** %6
%12 = bitcast %struct.vec4* %11 to float*
%13 = call i32 @vec4_min(float* %8, float* %10, float* %12)
%14 = load %struct.vec4*, %struct.vec4** %4
ret %struct.vec4* %14
}

LLVM IR (-O2):
%struct.vec4 = type { i32 }
define %struct.vec4* @psvec4_min(%struct.vec4* returned %0, %struct.vec4* %1, %struct.vec4* %2) {
%4 = bitcast %struct.vec4* %0 to float*
%5 = bitcast %struct.vec4* %1 to float*
%6 = bitcast %struct.vec4* %2 to float*
%7 = tail call i32 @vec4_min(float* %4, float* %5, float* %6)
ret %struct.vec4* %0
}