xunge/DecIR huggingface dataset:
/* Type definitions */
struct Graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ addEdge(struct Graph *, int, int);
struct Graph *createGraph(int);
int /*<<< orphan*/ printGraph(struct Graph *);
int main() {
  struct Graph *graph = createGraph(4);
  addEdge(graph, 0, 2);
  addEdge(graph, 1, 3);
  addEdge(graph, 2, 3);
  printGraph(graph);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <createGraph@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <addEdge@plt>
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <addEdge@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <addEdge@plt>
mov    -0x10(%rbp),%rdi
call   1050 <printGraph@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <createGraph@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <addEdge@plt>
mov    %rbx,%rdi
call   1050 <printGraph@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Graph = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Graph*
store i32 0, i32* %1
%3 = call %struct.Graph* @createGraph(i32 4)
store %struct.Graph* %3, %struct.Graph** %2
%4 = load %struct.Graph*, %struct.Graph** %2
%5 = call i32 @addEdge(%struct.Graph* %4, i32 0, i32 2)
%6 = load %struct.Graph*, %struct.Graph** %2
%7 = call i32 @addEdge(%struct.Graph* %6, i32 1, i32 3)
%8 = load %struct.Graph*, %struct.Graph** %2
%9 = call i32 @addEdge(%struct.Graph* %8, i32 2, i32 3)
%10 = load %struct.Graph*, %struct.Graph** %2
%11 = call i32 @printGraph(%struct.Graph* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.Graph = type { i32 }
define i32 @main() {
%1 = tail call %struct.Graph* @createGraph(i32 4)
%2 = tail call i32 @addEdge(%struct.Graph* %1, i32 0, i32 2)
%3 = tail call i32 @addEdge(%struct.Graph* %1, i32 1, i32 3)
%4 = tail call i32 @addEdge(%struct.Graph* %1, i32 2, i32 3)
%5 = tail call i32 @printGraph(%struct.Graph* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb1() {
  Assert_real((isspace(177) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              890, ("isspace should be 0 for 0xb1"));
}


x86 assembly (clang, -O0):
<t_isspace_0xb1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb1,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x37a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xb1>:
push   %rax
mov    $0xb1,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb1\00"
define void @t_isspace_0xb1() {
%1 = call i64 @isspace(i32 177)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb1\00"
define void @t_isspace_0xb1() {
%1 = tail call i64 @isspace(i32 177)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long long bit53() { return 0x0020000000000000LL; }


x86 assembly (clang, -O0):
<bit53>:
push   %rbp
mov    %rsp,%rbp
movabs $0x20000000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit53>:
movabs $0x20000000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit53() {
ret i64 9007199254740992
}

LLVM IR (-O2):
define i64 @bit53() {
ret i64 9007199254740992
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int kill(int /*<<< orphan*/, int /*<<< orphan*/);
int signalParent(pid_t pid) { return kill(pid, SIGUSR1); }


x86 assembly (clang, -O0):
<signalParent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signalParent>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <kill@plt>

LLVM IR (-O0):
@SIGUSR1 = global i32 0
define i32 @signalParent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGUSR1
%5 = call i32 @kill(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define i32 @signalParent(i32 %0) {
%2 = load i32, i32* @SIGUSR1
%3 = tail call i32 @kill(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ find2();
int main(void) {
  find2();
  return EXIT_SUCCESS;
}


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

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @find2()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
int cc1_warn_at_w(const struct where *where, unsigned char *pwarn,
                  const char *fmt, ...) {
  (void)where;
  (void)pwarn;
  (void)fmt;
  return 0;
}


x86 assembly (clang, -O0):
<cc1_warn_at_w>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.where = type opaque
define i32 @cc1_warn_at_w(%struct.where* %0, i8* %1, i8* %2, ...) {
%4 = alloca %struct.where*
%5 = alloca i8*
%6 = alloca i8*
store %struct.where* %0, %struct.where** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.where*, %struct.where** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
%struct.where = type opaque
define i32 @cc1_warn_at_w(%struct.where* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, ...) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void smpte_fec_set_n(uint8_t *p_fec) { p_fec[12] |= 0x80; }


x86 assembly (clang, -O0):
<smpte_fec_set_n>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%ecx
or     $0x80,%ecx
mov    %ecx,0x30(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_fec_set_n>:
orb    $0x80,0x30(%rdi)
ret

LLVM IR (-O0):
define void @smpte_fec_set_n(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 12
%5 = load i32, i32* %4
%6 = or i32 %5, 128
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @smpte_fec_set_n(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 12
%3 = load i32, i32* %2
%4 = or i32 %3, 128
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
char const *_GetBoxSource(char *, int, int);
const char *GetBoxSourceReal(char *str, int src) {
  return _GetBoxSource(str, src, 1);
}


x86 assembly (clang, -O0):
<GetBoxSourceReal>:
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    $0x1,%edx
call   1030 <_GetBoxSource@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetBoxSourceReal>:
mov    $0x1,%edx
jmp    1030 <_GetBoxSource@plt>

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

LLVM IR (-O2):
define i8* @GetBoxSourceReal(i8* %0, i32 %1) {
%3 = tail call i8* @_GetBoxSource(i8* %0, i32 %1, i32 1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exp(int /*<<< orphan*/);
int /*<<< orphan*/ lgamma(unsigned long);
long lround(int /*<<< orphan*/);
long int fac(unsigned long int n) { return lround(exp(lgamma(n + 1))); }


x86 assembly (clang, -O0):
<fac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1050 <lgamma@plt>
mov    %eax,%edi
call   1040 <exp@plt>
mov    %eax,%edi
call   1030 <lround@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fac>:
push   %rax
add    $0x1,%rdi
call   1050 <lgamma@plt>
mov    %eax,%edi
call   1040 <exp@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <lround@plt>

LLVM IR (-O0):
define i64 @fac(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1
%5 = call i32 @lgamma(i64 %4)
%6 = call i32 @exp(i32 %5)
%7 = call i64 @lround(i32 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @fac(i64 %0) {
%2 = add i64 %0, 1
%3 = tail call i32 @lgamma(i64 %2)
%4 = tail call i32 @exp(i32 %3)
%5 = tail call i64 @lround(i32 %4)
ret i64 %5
}
/* Variables and functions */
float shmAdd(float *, long, double);
float shmDec(float *addr, long i) { return shmAdd(addr, i, -1.0); }


x86 assembly (clang, -O0):
<shmDec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  0xed0(%rip),%xmm0
call   1030 <shmAdd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shmDec>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <shmAdd@plt>

LLVM IR (-O0):
define float @shmDec(float* %0, i64 %1) {
%3 = alloca float*
%4 = alloca i64
store float* %0, float** %3
store i64 %1, i64* %4
%5 = load float*, float** %3
%6 = load i64, i64* %4
%7 = call float @shmAdd(float* %5, i64 %6, double -1.000000e+00)
ret float %7
}

LLVM IR (-O2):
define float @shmDec(float* %0, i64 %1) {
%3 = tail call float @shmAdd(float* %0, i64 %1, double -1.000000e+00)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ output_0();
int /*<<< orphan*/ output_1();
void energenie_plug2() {
  output_0();
  output_1();
  output_1();
}


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

x86 assembly (clang, -O2):
<energenie_plug2>:
push   %rax
xor    %eax,%eax
call   1040 <output_0@plt>
xor    %eax,%eax
call   1030 <output_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <output_1@plt>

LLVM IR (-O0):
define void @energenie_plug2() {
%1 = call i32 (...) @output_0()
%2 = call i32 (...) @output_1()
%3 = call i32 (...) @output_1()
ret void
}

LLVM IR (-O2):
define void @energenie_plug2() {
%1 = tail call i32 (...) @output_0()
%2 = tail call i32 (...) @output_1()
%3 = tail call i32 (...) @output_1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WATCHDOG_ENABLER_SaveConfig();
void WATCHDOG_ENABLER_Sleep(void) { WATCHDOG_ENABLER_SaveConfig(); }


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

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

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

LLVM IR (-O2):
define void @WATCHDOG_ENABLER_Sleep() {
%1 = tail call i32 (...) @WATCHDOG_ENABLER_SaveConfig()
ret void
}
/* Variables and functions */
void Default_GPIOTE1_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_GPIOTE1_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_GPIOTE1_IRQHandler+0x9>
jmp    1109 <Default_GPIOTE1_IRQHandler+0x9>

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

LLVM IR (-O0):
define void @Default_GPIOTE1_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_GPIOTE1_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, int /*<<< orphan*/ *, int);
__attribute__((always_)) void store32(void *dst, uint32_t w) {
  memcpy(dst, &w, sizeof w);
}


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

x86 assembly (clang, -O2):
<store32>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @store32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @memcpy(i8* %5, i32* %4, i32 4)
ret void
}

LLVM IR (-O2):
define void @store32(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void foo2(void) { foo(); }


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

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

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

LLVM IR (-O2):
define void @foo2() {
%1 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void AlarmFunc(int signo) {
  printf("No correct answer from the mote. \n"
         "Check the firware is XEE-compatible. Or try again.");
  exit(0);
}


x86 assembly (clang, -O0):
<AlarmFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<AlarmFunc>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [85 x i8] c"No correct answer from the mote. \0ACheck the firware is XEE-compatible. Or try again.\00"
define void @AlarmFunc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [85 x i8] c"No correct answer from the mote. \0ACheck the firware is XEE-compatible. Or try again.\00"
define void @AlarmFunc(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
int some_stub(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @some_stub() {
ret i32 0
}
int ehTransitiva() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ehTransitiva() {
ret i32 0
}
void __attribute__((weak)) sdio_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<sdio_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdio_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.sdio_isr = [9 x i8] c"sdio_isr\00"
define weak void @sdio_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.sdio_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.sdio_isr = [9 x i8] c"sdio_isr\00"
define weak void @sdio_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.sdio_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stop_scheduler();
void handle_term(int signum) { stop_scheduler(); }


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

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

LLVM IR (-O0):
define void @handle_term(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @stop_scheduler()
ret void
}

LLVM IR (-O2):
define void @handle_term(i32 %0) {
%2 = tail call i32 (...) @stop_scheduler()
ret void
}
char groo(p, q)
int p;
int q;
{ return ((char)(--q * q + (p / 10) * q + --p)); }


x86 assembly (clang, -O0):
<groo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
mov    -0x4(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
add    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<groo>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    -0x1(%rsi),%edx
add    %esi,%ecx
add    $0xffffffff,%ecx
imul   %edx,%ecx
add    %ecx,%eax
add    $0xff,%al
ret

LLVM IR (-O0):
define signext i8 @groo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = add nsw i32 %5, -1
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = sdiv i32 %9, 10
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
%13 = add nsw i32 %8, %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, -1
store i32 %15, i32* %3
%16 = add nsw i32 %13, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @groo(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sdiv i32 %0, 10
%5 = add i32 %3, %4
%6 = mul i32 %5, %3
%7 = add i32 %0, 255
%8 = add i32 %7, %6
%9 = trunc i32 %8 to i8
ret i8 %9
}
int test_imm_BFuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xBF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BFuint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xbf,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_BFuint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 191
%7 = icmp ne i64 %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_BFuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 820338753536
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_to_montgomery(uintptr_t, uintptr_t);
void fiat_p224_to_montgomery(uint32_t out1[7], const uint32_t arg1[7]) {
  internal_fiat_p224_to_montgomery((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_p224_to_montgomery>:
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   1030 <internal_fiat_p224_to_montgomery@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p224_to_montgomery>:
jmp    1030 <internal_fiat_p224_to_montgomery@plt>

LLVM IR (-O0):
define void @fiat_p224_to_montgomery(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p224_to_montgomery(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_to_montgomery(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p224_to_montgomery(i64 %3, i64 %4)
ret void
}
int label_symlinkfile_set(const char *path) {
  int r = 0;
  return r;
}


x86 assembly (clang, -O0):
<label_symlinkfile_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @label_symlinkfile_set(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strdup(char *s) {
  char *p;
  p = (char *)malloc(strlen(s) + 1);
  if (p != NULL)
    strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <strdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %15
15: ; preds = %11, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %7, %1
ret i8* %5
}
double CubicEaseIn(double p) { return p * p * p; }


x86 assembly (clang, -O0):
<CubicEaseIn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CubicEaseIn>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @CubicEaseIn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @CubicEaseIn(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
void ttt(int *wwp) {
  int xyz = 6;
  do {
  } while (!xyz);
}


x86 assembly (clang, -O0):
<ttt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
jmp    1114 <ttt+0x14>
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    110f <ttt+0xf>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ttt(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 6, i32* %3
br label %4
4: ; preds = %5, %1
br label %5
5: ; preds = %4
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %4, label %9
9: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ttt(i32* nocapture %0) {
ret void
}
int test_026(int a, int b, int c, int d) { return a + ((a >> 31) & 1); }


x86 assembly (clang, -O0):
<test_026>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
and    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_026>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_026(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
%9 = load i32, i32* %5
%10 = load i32, i32* %5
%11 = ashr i32 %10, 31
%12 = and i32 %11, 1
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_026(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = lshr i32 %0, 31
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ bs;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_RCVBUF;
int /*<<< orphan*/ diep(char *);
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int sock_enlarge_in(int fd) {
  int bs = 33554431;
  if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bs, sizeof(bs)) == -1)
    diep("setsockopt");
  return 0;
}


x86 assembly (clang, -O0):
<sock_enlarge_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1ffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    116b <sock_enlarge_in+0x4b>
lea    0xe9a(%rip),%rdi
call   1040 <diep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_enlarge_in>:
push   %rax
movl   $0x1ffffff,0x4(%rsp)
01
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    115c <sock_enlarge_in+0x3c>
lea    0xea9(%rip),%rdi
call   1040 <diep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_RCVBUF = global i32 0
@.str = [11 x i8] c"setsockopt\00"
define i32 @sock_enlarge_in(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 33554431, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_RCVBUF
%7 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i32* %3, i32 4)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @diep(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret i32 0
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_RCVBUF = global i32 0
@.str = [11 x i8] c"setsockopt\00"
define i32 @sock_enlarge_in(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 33554431, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_RCVBUF
%6 = call i32 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @diep(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret i32 0
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_slide(float *, float *, float *);
__attribute__((always_)) struct vec2 *
psvec2_slide(struct vec2 *result, struct vec2 *a, struct vec2 *b) {
  vec2_slide((float *)result, (float *)a, (float *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec2_slide>:
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 <vec2_slide@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_slide(%struct.vec2* returned %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = bitcast %struct.vec2* %0 to float*
%5 = bitcast %struct.vec2* %1 to float*
%6 = bitcast %struct.vec2* %2 to float*
%7 = tail call i32 @vec2_slide(float* %4, float* %5, float* %6)
ret %struct.vec2* %0
}
/* Variables and functions */
char *fgets(int /*<<< orphan*/, char *, int);
char *gets(char *str, int n) { return fgets(0, str, n); }


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

x86 assembly (clang, -O2):
<gets>:
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <fgets@plt>

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

LLVM IR (-O2):
define i8* @gets(i8* %0, i32 %1) {
%3 = tail call i8* @fgets(i32 0, i8* %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ dodgy_addition(int, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ test_safe_call();
int main(void) {
  test_safe_call();
  printf("%ld\n", dodgy_addition(8, 5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_safe_call@plt>
mov    $0x8,%edi
mov    $0x5,%esi
call   1040 <dodgy_addition@plt>
mov    %eax,%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_safe_call@plt>
mov    $0x8,%edi
mov    $0x5,%esi
call   1040 <dodgy_addition@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_safe_call()
%3 = call i32 @dodgy_addition(i32 8, i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @test_safe_call()
%2 = tail call i32 @dodgy_addition(i32 8, i32 5)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(int /*<<< orphan*/);
void string_2(void) {
  char text[] = "Going! Going! Gone!";
  char *t;
  t = text;
  while (*t)
    puts(t++);
}


x86 assembly (clang, -O0):
<string_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1167 <string_2+0x57>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
mov    %eax,%edi
call   1030 <puts@plt>
jmp    113f <string_2+0x2f>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_2>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x21656e,0x10(%rsp)
lea    0x1(%rsp),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <puts@plt>
add    $0x1,%ebx
cmpb   $0x0,(%r14)
lea    0x1(%r14),%r14
jne    1140 <string_2+0x30>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.string_2.text = [20 x i8] c"Going! Going! Gone!\00"
define void @string_2() {
%1 = alloca [20 x i8]
%2 = alloca i8*
%3 = bitcast [20 x i8]* %1 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
store i8* %4, i8** %2
br label %5
5: ; preds = %9, %0
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
%12 = ptrtoint i8* %10 to i32
%13 = call i32 @puts(i32 %12)
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
@__const.string_2.text = [20 x i8] c"Going! Going! Gone!\00"
define void @string_2() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i8* [ %5, %3 ], [ %2, %0 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = ptrtoint i8* %4 to i64
%7 = trunc i64 %6 to i32
%8 = call i32 @puts(i32 %7)
%9 = load i8, i8* %5
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret void
}
double test4(double x) { return __builtin_exp(x); }


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @test4(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
ret double %4
}

LLVM IR (-O2):
define double @test4(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
float HourAngle(char lLST, char lRA) { return lLST - lRA; }


x86 assembly (clang, -O0):
<HourAngle>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<HourAngle>:
sub    %esi,%edi
cvtsi2ss %edi,%xmm0
ret

LLVM IR (-O0):
define float @HourAngle(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %6, %8
%10 = sitofp i32 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @HourAngle(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = sext i8 %1 to i32
%5 = sub nsw i32 %3, %4
%6 = sitofp i32 %5 to float
ret float %6
}
unsigned int usrp_to_host_u32(unsigned int x) { return x; }


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

x86 assembly (clang, -O2):
<usrp_to_host_u32>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @usrp_to_host_u32(i32 returned %0) {
ret i32 %0
}
void XRayLabelFrame(const char *fmt, ...) {}


x86 assembly (clang, -O0):
<XRayLabelFrame>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @XRayLabelFrame(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @XRayLabelFrame(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, unsigned int);
void *ia_css_cpu_mem_copy(void *dst, const void *src, unsigned int size) {
  return memcpy(dst, src, size);
}


x86 assembly (clang, -O0):
<ia_css_cpu_mem_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ia_css_cpu_mem_copy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @ia_css_cpu_mem_copy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i8* @memcpy(i8* %7, i8* %8, i32 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @ia_css_cpu_mem_copy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @memcpy(i8* %0, i8* %1, i32 %2)
ret i8* %4
}
unsigned addval_436(unsigned x) { return x + 3687104905U; }


x86 assembly (clang, -O0):
<addval_436>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xdbc4c189,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addval_436>:
lea    -0x243b3e77(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_436(i32 %0) {
%2 = add i32 %0, -607862391
ret i32 %2
}
/* Variables and functions */
double pow(double, int);
double revenue(int year) {
  int money = 203.265 * pow(1.071, (year - 1984));
  return money;
}


x86 assembly (clang, -O0):
<revenue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x7c0,%edi
movsd  0xedc(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec4(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revenue>:
push   %rax
add    $0xfffff840,%edi
movsd  0xee1(%rip),%xmm0
call   1030 <pow@plt>
mulsd  0xedc(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @revenue(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1984
%6 = call double @pow(double 1.071000e+00, i32 %5)
%7 = fmul double 2.032650e+02, %6
%8 = fptosi double %7 to i32
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @revenue(i32 %0) {
%2 = add nsw i32 %0, -1984
%3 = tail call double @pow(double 1.071000e+00, i32 %2)
%4 = fmul double %3, 2.032650e+02
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}
/* Variables and functions */
double filling_fraction(double);
double kravtsov_f(double x) { return (x * x * x * filling_fraction(x)); }


x86 assembly (clang, -O0):
<kravtsov_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <filling_fraction@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kravtsov_f>:
push   %rax
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
call   1030 <filling_fraction@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @kravtsov_f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = load double, double* %2
%9 = call double @filling_fraction(double %8)
%10 = fmul double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @kravtsov_f(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
%4 = tail call double @filling_fraction(double %0)
%5 = fmul double %3, %4
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long fclose(int /*<<< orphan*/ *);
long file___NativeFile_io_close___impl(FILE *self) { return fclose(self); }


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

x86 assembly (clang, -O2):
<file___NativeFile_io_close___impl>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define i64 @file___NativeFile_io_close___impl(i32* nocapture %0) {
%2 = tail call i64 @fclose(i32* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int *arr, int n) {
  for (int i = 0; i < n; i++) {
    printf("%d ", *arr);
    arr++;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1160 <printArray+0x50>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %2
%5 = tail call i32 @putchar(i32 10)
ret void
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ 0, %2 ]
%8 = phi i32* [ %11, %6 ], [ %0, %2 ]
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds i32, i32* %8, i64 1
%12 = add nuw nsw i32 %7, 1
%13 = icmp eq i32 %12, %1
br i1 %13, label %4, label %6
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ RSA_PKCS1_PADDING;
int RSA_private_encrypt(int, unsigned char *, unsigned char *,
                        int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *createRSA(char const *, int /*<<< orphan*/);
int private_encrypt(const char *data, int data_len, const char *key,
                    unsigned char *encrypted) {
  RSA *rsa = createRSA(key, 0);
  return RSA_private_encrypt(data_len, (unsigned char *)data, encrypted, rsa,
                             RSA_PKCS1_PADDING);
}


x86 assembly (clang, -O0):
<private_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1030 <createRSA@plt>
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    0x2e7c(%rip),%rax
mov    (%rax),%r8d
call   1040 <RSA_private_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<private_encrypt>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rdx,%rdi
xor    %esi,%esi
call   1030 <createRSA@plt>
mov    0x2e9b(%rip),%rcx
mov    (%rcx),%r8d
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <RSA_private_encrypt@plt>

LLVM IR (-O0):
@RSA_PKCS1_PADDING = global i32 0
define i32 @private_encrypt(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %7
%11 = call i32* @createRSA(i8* %10, i32 0)
store i32* %11, i32** %9
%12 = load i32, i32* %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %8
%15 = load i32*, i32** %9
%16 = load i32, i32* @RSA_PKCS1_PADDING
%17 = call i32 @RSA_private_encrypt(i32 %12, i8* %13, i8* %14, i32* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
@RSA_PKCS1_PADDING = global i32 0
define i32 @private_encrypt(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32* @createRSA(i8* %2, i32 0)
%6 = load i32, i32* @RSA_PKCS1_PADDING
%7 = tail call i32 @RSA_private_encrypt(i32 %1, i8* %0, i8* %3, i32* %5, i32 %6)
ret i32 %7
}