xunge/DecIR huggingface dataset:
/* Variables and functions */
long double acosl(long double);
long double acosd(long double x) {
  return acosl(x) / 3.141592653589793238462643383279502884L * 180.0L;
}


x86 assembly (clang, -O0):
<acosd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <acosl@plt>
fldt   0xecf(%rip)
fdivrp %st,%st(1)
flds   0xed7(%rip)
fmulp  %st,%st(1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosd>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <acosl@plt>
fldt   0xeda(%rip)
fdivrp %st,%st(1)
fmuls  0xee2(%rip)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @acosd(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @acosl(x86_fp80 %3)
%5 = fdiv x86_fp80 %4, 0xK4000C90FDAA22168C235
%6 = fmul x86_fp80 %5, 0xK4006B400000000000000
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @acosd(x86_fp80 %0) {
%2 = tail call x86_fp80 @acosl(x86_fp80 %0)
%3 = fdiv x86_fp80 %2, 0xK4000C90FDAA22168C235
%4 = fmul x86_fp80 %3, 0xK4006B400000000000000
ret x86_fp80 %4
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *duplique_chaine(char *src) {
  char *dest = malloc(sizeof(char) * strlen(src));
  strcpy(dest, src);
  return dest;
}


x86 assembly (clang, -O0):
<duplique_chaine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
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):
<duplique_chaine>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @duplique_chaine(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @duplique_chaine(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @malloc(i32 %2)
%4 = tail call i32 @strcpy(i8* %3, i8* %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *);
void DESCRIBE(char *text) {
  printf("%s-- %s --%s\n", "\x1B[36m", text, "\x1B[0m");
}


x86 assembly (clang, -O0):
<DESCRIBE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee0(%rip),%rsi
lea    0xedf(%rip),%rcx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DESCRIBE>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xeec(%rip),%rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s-- %s --%s\0A\00"
@.str.1 = [6 x i8] c"\1B[36m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @DESCRIBE(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s-- %s --%s\0A\00"
@.str.1 = [6 x i8] c"\1B[36m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @DESCRIBE(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __assume(int);
int /*<<< orphan*/ __debugbreak();
int /*<<< orphan*/ __noop(int);
void no_ms_builtins() {
  __assume(1);
  __noop(1);
  __debugbreak();
}


x86 assembly (clang, -O0):
<no_ms_builtins>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <__assume@plt>
mov    $0x1,%edi
call   1030 <__noop@plt>
mov    $0x0,%al
call   1050 <__debugbreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_ms_builtins>:
push   %rax
mov    $0x1,%edi
call   1040 <__assume@plt>
mov    $0x1,%edi
call   1030 <__noop@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <__debugbreak@plt>

LLVM IR (-O0):
define void @no_ms_builtins() {
%1 = call i32 @__assume(i32 1)
%2 = call i32 @__noop(i32 1)
%3 = call i32 (...) @__debugbreak()
ret void
}

LLVM IR (-O2):
define void @no_ms_builtins() {
%1 = tail call i32 @__assume(i32 1)
%2 = tail call i32 @__noop(i32 1)
%3 = tail call i32 (...) @__debugbreak()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void h2(char *str) { printf("<H2>%s</H2>\n", str); }


x86 assembly (clang, -O0):
<h2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"<H2>%s</H2>\0A\00"
define void @h2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<H2>%s</H2>\0A\00"
define void @h2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int /*<<< orphan*/ wait(int *);
void ChildSig(int sigtype) {
  int status;
  signal(SIGCHLD, ChildSig);
  wait(&status);
}


x86 assembly (clang, -O0):
<ChildSig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2e95(%rip),%rsi
call   1030 <signal@plt>
lea    -0x8(%rbp),%rdi
call   1040 <wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChildSig>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rsi
call   1030 <signal@plt>
lea    0x4(%rsp),%rdi
call   1040 <wait@plt>
pop    %rax
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
define void @ChildSig(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @SIGCHLD
%5 = call i32 @signal(i32 %4, void (i32)* @ChildSig)
%6 = call i32 @wait(i32* %3)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
define void @ChildSig(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @SIGCHLD
%5 = tail call i32 @signal(i32 %4, void (i32)* @ChildSig)
%6 = call i32 @wait(i32* %2)
ret void
}
/* Variables and functions */
int searchargs(int, char **, char *);
int searchargspair(int argc, char *argv[], char *findone, char *findtwo) {
  return searchargs(argc, argv, findone) & searchargs(argc, argv, findtwo);
}


x86 assembly (clang, -O0):
<searchargspair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <searchargs@plt>
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <searchargs@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
and    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchargspair>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <searchargs@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <searchargs@plt>
and    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @searchargspair(i32 %0, i8** %1, i8* %2, i8* %3) {
%5 = tail call i32 @searchargs(i32 %0, i8** %1, i8* %2)
%6 = tail call i32 @searchargs(i32 %0, i8** %1, i8* %3)
%7 = and i32 %6, %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int next(char *buf, size_t bufsiz) {
  int i;
  sscanf(buf, "%d", &i);
  snprintf(buf, bufsiz, "Goto %d", i);
  return (--i);
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
lea    0xeaa(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xed4(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1040 <sscanf@plt>
mov    0x4(%rsp),%ecx
lea    0xeba(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <snprintf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"Goto %d\00"
define i32 @next(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = load i32, i32* %5
%11 = call i32 @snprintf(i8* %8, i64 %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %5
%13 = add nsw i32 %12, -1
store i32 %13, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"Goto %d\00"
define i32 @next(i8* %0, i64 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = add nsw i32 %8, -1
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA_PSS_PARAMS;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ RSA_PSS_PARAMS_it;
RSA_PSS_PARAMS *RSA_PSS_PARAMS_new(void) {
  return (RSA_PSS_PARAMS *)ASN1_item_new(&RSA_PSS_PARAMS_it);
}


x86 assembly (clang, -O0):
<RSA_PSS_PARAMS_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSA_PSS_PARAMS_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@RSA_PSS_PARAMS_it = global i32 0
define i32* @RSA_PSS_PARAMS_new() {
%1 = call i64 @ASN1_item_new(i32* @RSA_PSS_PARAMS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@RSA_PSS_PARAMS_it = global i32 0
define i32* @RSA_PSS_PARAMS_new() {
%1 = tail call i64 @ASN1_item_new(i32* @RSA_PSS_PARAMS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int f(int type) { return type; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int test_38(void) {
  int *ptr = NULL;
  return *ptr;
}


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

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

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

LLVM IR (-O2):
define i32 @test_38() {
ret i32 undef
}
void ToUppercase(char *str) {
  while (*str) {
    if ((*str >= 'a') && (*str <= 'z')) {
      *str = *str - ('a' - 'A');
    }
    str++;
  }
}


x86 assembly (clang, -O0):
<ToUppercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <ToUppercase+0x58>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     1147 <ToUppercase+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     1147 <ToUppercase+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x20,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <ToUppercase+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToUppercase>:
mov    (%rdi),%al
test   %al,%al
je     112a <ToUppercase+0x2a>
add    $0x1,%rdi
jmp    111b <ToUppercase+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <ToUppercase+0x2a>
lea    -0x61(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <ToUppercase+0x10>
add    $0xe0,%al
mov    %al,-0x1(%rdi)
jmp    1110 <ToUppercase+0x10>
ret

LLVM IR (-O0):
define void @ToUppercase(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %24, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %27
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %24
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 122
br i1 %16, label %17, label %24
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = sub nsw i32 %20, 32
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %2
store i8 %22, i8* %23
br label %24
24: ; preds = %17, %12, %7
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %3
27: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ToUppercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -97
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nsw i8 %5, -32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
int globalvar_add_simple_enum(const char *name, int *value, const char **names,
                              int max) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @globalvar_add_simple_enum(i8* nocapture readnone %0, i32* nocapture readnone %1, i8** nocapture readnone %2, i32 %3) {
ret i32 0
}
/* Type definitions */
struct ejson_driver_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void d_close_object(struct ejson_driver_t *d) {
  printf("},");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<d_close_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_close_object>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
%struct.ejson_driver_t = type { i32 }
@.str = [3 x i8] c"},\00"
@stdout = global i32 0
define void @d_close_object(%struct.ejson_driver_t* %0) {
%2 = alloca %struct.ejson_driver_t*
store %struct.ejson_driver_t* %0, %struct.ejson_driver_t** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.ejson_driver_t = type { i32 }
@.str = [3 x i8] c"},\00"
@stdout = global i32 0
define void @d_close_object(%struct.ejson_driver_t* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) const char *
sd_bus_track_first(void *track) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_bus_track_first(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
unsigned int const_time_fill_msb(unsigned int);
unsigned int const_time_is_zero(unsigned int val) {
  return const_time_fill_msb(~val & (val - 1));
}


x86 assembly (clang, -O0):
<const_time_is_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    %eax,%edi
call   1030 <const_time_fill_msb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<const_time_is_zero>:
mov    %edi,%eax
not    %eax
add    $0xffffffff,%edi
and    %eax,%edi
jmp    1030 <const_time_fill_msb@plt>

LLVM IR (-O0):
define i32 @const_time_is_zero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = load i32, i32* %2
%6 = sub i32 %5, 1
%7 = and i32 %4, %6
%8 = call i32 @const_time_fill_msb(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @const_time_is_zero(i32 %0) {
%2 = xor i32 %0, -1
%3 = add i32 %0, -1
%4 = and i32 %3, %2
%5 = tail call i32 @const_time_fill_msb(i32 %4)
ret i32 %5
}
int encrypt(int n) { return -n; }


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

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

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

LLVM IR (-O2):
define i32 @encrypt(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_push_de(void) { op_write1(0xd5); }


x86 assembly (clang, -O0):
<op_enc_push_de>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd5,%edi
call   1030 <op_write1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_enc_push_de>:
mov    $0xd5,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_push_de() {
%1 = call i32 @op_write1(i32 213)
ret void
}

LLVM IR (-O2):
define void @op_enc_push_de() {
%1 = tail call i32 @op_write1(i32 213)
ret void
}
int uf2_mkdir_for(const char *filename) {
  char *mutable = strdup(filename);
  int result = uf2_mkdir_impl(mutable, mutable);
  free(mutable);
  return result;
}


x86 assembly (clang, -O0):
<uf2_mkdir_for>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <uf2_mkdir_impl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uf2_mkdir_for>:
push   %rbp
push   %rbx
push   %rax
call   1040 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <uf2_mkdir_impl@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @uf2_mkdir_for(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strdup(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @uf2_mkdir_impl to i32 (i8*, i8*, ...)*)(i8* %7, i8* %8)
store i32 %9, i32* %4
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @uf2_mkdir_for(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @uf2_mkdir_impl to i32 (i8*, i8*, ...)*)(i8* %2, i8* %2)
tail call void @free(i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, m, d;
  scanf("%d", &n);
  m = n * n;
  d = n * n * n;
  printf("%d\n", m);
  printf("%d\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int putchar(int ic) {
  printf("%c", ic);
  return 1;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @putchar(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int get_pos() {
  int pos;
  do {
    printf("Que posicion quieres cambiar? ");
    scanf("%d", &pos);
  } while (pos < 1 || pos > 20);
  return pos - 1;
}


x86 assembly (clang, -O0):
<get_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     115d <get_pos+0x3d>
cmpl   $0x14,-0x4(%rbp)
setg   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1128 <get_pos+0x8>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pos>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%r14
lea    0xee8(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x15(%rax),%ecx
cmp    $0xffffffec,%ecx
jb     1140 <get_pos+0x20>
add    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Que posicion quieres cambiar? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_pos() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
br label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 20
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ true, %5 ], [ %10, %8 ]
br i1 %12, label %2, label %13
13: ; preds = %11
%14 = load i32, i32* %1
%15 = sub nsw i32 %14, 1
ret i32 %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"Que posicion quieres cambiar? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_pos() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -21
%8 = icmp ult i32 %7, -20
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = add nsw i32 %6, -1
ret i32 %10
}
double test(double x, int sel1, int sel2) {
  double input = sel1 ? -x : __builtin_fabs(x);
  if (sel2)
    return __builtin_cos(input);
  else
    return __builtin_cosh(input);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1163 <test+0x43>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1178 <test+0x58>
movsd  -0x10(%rbp),%xmm0
movaps 0xe91(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     11a0 <test+0x80>
movsd  -0x20(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    11af <test+0x8f>
movsd  -0x20(%rbp),%xmm0
call   1030 <cosh@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
test   %edi,%edi
je     1134 <test+0x14>
xorps  0xed5(%rip),%xmm0
test   %esi,%esi
je     113f <test+0x1f>
jmp    1040 <cos@plt>
andps  0xed5(%rip),%xmm0
test   %esi,%esi
jne    112f <test+0xf>
jmp    1030 <cosh@plt>

LLVM IR (-O0):
define double @test(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store double %0, double* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load double, double* %5
%13 = fneg double %12
br label %17
14: ; preds = %3
%15 = load double, double* %5
%16 = call double @llvm.fabs.f64(double %15)
br label %17
17: ; preds = %14, %11
%18 = phi double [ %13, %11 ], [ %16, %14 ]
store double %18, double* %8
%19 = load i32, i32* %7
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = load double, double* %8
%23 = call double @cos(double %22)
store double %23, double* %4
br label %27
24: ; preds = %17
%25 = load double, double* %8
%26 = call double @cosh(double %25)
store double %26, double* %4
br label %27
27: ; preds = %24, %21
%28 = load double, double* %4
ret double %28
}

LLVM IR (-O2):
define double @test(double %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = fneg double %0
%6 = tail call double @llvm.fabs.f64(double %0)
%7 = select i1 %4, double %6, double %5
%8 = icmp eq i32 %2, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call double @cos(double %7)
br label %13
11: ; preds = %3
%12 = tail call double @cosh(double %7)
br label %13
13: ; preds = %11, %9
%14 = phi double [ %10, %9 ], [ %12, %11 ]
ret double %14
}
void EVP_PKEY_add1_attr(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_add1_attr() {
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ reuse_null_size();
int /*<<< orphan*/ reuse_out_of_mem();
void *xmalloc(size_t size) {
  void *ptr;
  if (size == 0)
    reuse_null_size();
  ptr = malloc(size);
  if (ptr == NULL)
    reuse_out_of_mem();
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114e <xmalloc+0x1e>
mov    $0x0,%al
call   1040 <reuse_null_size@plt>
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116d <xmalloc+0x3d>
mov    $0x0,%al
call   1050 <reuse_out_of_mem@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1140 <xmalloc+0x10>
xor    %eax,%eax
call   1040 <reuse_null_size@plt>
mov    %rbx,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1157 <xmalloc+0x27>
xor    %eax,%eax
call   1050 <reuse_out_of_mem@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @reuse_null_size()
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @malloc(i64 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @reuse_out_of_mem()
br label %10
10: ; preds = %8, %5
ret i8* %6
}
int islower(int c) {
  switch (c) {
  case 'a':
  case 'b':
  case 'c':
  case 'd':
  case 'e':
  case 'f':
  case 'g':
  case 'h':
  case 'i':
  case 'j':
  case 'k':
  case 'l':
  case 'm':
  case 'n':
  case 'o':
  case 'p':
  case 'q':
  case 'r':
  case 's':
  case 't':
  case 'u':
  case 'v':
  case 'w':
  case 'x':
  case 'y':
  case 'z':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff9f,%eax
sub    $0x19,%eax
ja     1127 <islower+0x27>
jmp    111b <islower+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <islower+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 97, label %5
i32 98, label %5
i32 99, label %5
i32 100, label %5
i32 101, label %5
i32 102, label %5
i32 103, label %5
i32 104, label %5
i32 105, label %5
i32 106, label %5
i32 107, label %5
i32 108, label %5
i32 109, label %5
i32 110, label %5
i32 111, label %5
i32 112, label %5
i32 113, label %5
i32 114, label %5
i32 115, label %5
i32 116, label %5
i32 117, label %5
i32 118, label %5
i32 119, label %5
i32 120, label %5
i32 121, label %5
i32 122, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void logRunnerEnded() {}


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

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

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

LLVM IR (-O2):
define void @logRunnerEnded() {
ret void
}
OP(dd, cf) { op_cf(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_cf()
ret i32 undef
}
int calcIndex(int n, int i, int size) { return (n - i + size) % size; }


x86 assembly (clang, -O0):
<calcIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcIndex>:
mov    %edx,%ecx
sub    %esi,%edi
lea    (%rdi,%rcx,1),%eax
cltd
idiv   %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @calcIndex(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %6
%13 = srem i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @calcIndex(i32 %0, i32 %1, i32 %2) {
%4 = sub i32 %0, %1
%5 = add nsw i32 %4, %2
%6 = srem i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int sv_send_event(int, int, int, int, int, int, int);
int vox_send_event(int slot, int channel_num, int note, int vel, int module,
                   int ctl, int ctl_val) {
  return sv_send_event(slot, channel_num, note, vel, module, ctl, ctl_val);
}


x86 assembly (clang, -O0):
<vox_send_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <sv_send_event@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vox_send_event>:
jmp    1030 <sv_send_event@plt>

LLVM IR (-O0):
define i32 @vox_send_event(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @sv_send_event(i32 %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @vox_send_event(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @sv_send_event(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %8
}
/* Variables and functions */
int checkFactors(int);
int tNumber(int);
bool nDivisors(int n, int nFactors) {
  int number = tNumber(n);
  number = checkFactors(number);
  return (number >= nFactors);
}


x86 assembly (clang, -O0):
<nDivisors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <tNumber@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <checkFactors@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nDivisors>:
push   %rbx
mov    %esi,%ebx
call   1040 <tNumber@plt>
mov    %eax,%edi
call   1030 <checkFactors@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setge  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nDivisors(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @tNumber(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = call i32 @checkFactors(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = icmp sge i32 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @nDivisors(i32 %0, i32 %1) {
%3 = tail call i32 @tNumber(i32 %0)
%4 = tail call i32 @checkFactors(i32 %3)
%5 = icmp sge i32 %4, %1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ init_cond();
int /*<<< orphan*/ lax_friedrichs_ch();
int system(char *);
int main() {
  int ret_codes = 0;
  init_cond();
  lax_friedrichs_ch();
  ret_codes = system("../bin/plot_LF");
  ret_codes = system("../bin/plot_LF_last");
  return ret_codes;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <init_cond@plt>
mov    $0x0,%al
call   1030 <lax_friedrichs_ch@plt>
lea    0xea5(%rip),%rdi
call   1040 <system@plt>
mov    %eax,-0x8(%rbp)
lea    0xea5(%rip),%rdi
call   1040 <system@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_cond@plt>
xor    %eax,%eax
call   1030 <lax_friedrichs_ch@plt>
lea    0xeba(%rip),%rdi
call   1040 <system@plt>
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"../bin/plot_LF\00"
@.str.1 = [20 x i8] c"../bin/plot_LF_last\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @init_cond()
%4 = call i32 (...) @lax_friedrichs_ch()
%5 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %2
%6 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i32 %6, i32* %2
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"../bin/plot_LF\00"
@.str.1 = [20 x i8] c"../bin/plot_LF_last\00"
define i32 @main() {
%1 = tail call i32 (...) @init_cond()
%2 = tail call i32 (...) @lax_friedrichs_ch()
%3 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
int try_parse_int_imp(char *, void *, int, int);
bool try_parse_ulong_long(char *str, unsigned long long *value_ptr) {
  return try_parse_int_imp(str, (void *)value_ptr, sizeof(unsigned long long),
                           false);
}


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

x86 assembly (clang, -O2):
<try_parse_ulong_long>:
mov    $0x8,%edx
xor    %ecx,%ecx
jmp    1030 <try_parse_int_imp@plt>

LLVM IR (-O0):
define i32 @try_parse_ulong_long(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
%5 = load i8*, i8** %3
%6 = load i64*, i64** %4
%7 = bitcast i64* %6 to i8*
%8 = call i32 @try_parse_int_imp(i8* %5, i8* %7, i32 8, i32 0)
ret i32 %8
}

LLVM IR (-O2):
define i32 @try_parse_ulong_long(i8* %0, i64* %1) {
%3 = bitcast i64* %1 to i8*
%4 = tail call i32 @try_parse_int_imp(i8* %0, i8* %3, i32 8, i32 0)
ret i32 %4
}
void HUMIDITY_CLEAR_PWR() {}


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

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

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

LLVM IR (-O2):
define void @HUMIDITY_CLEAR_PWR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ w5100_write_byte(int, unsigned int);
void w5100_writePATR(unsigned data) { w5100_write_byte(0x001C, data); }


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

x86 assembly (clang, -O2):
mov    %edi,%esi
mov    $0x1c,%edi
jmp    1030 <w5100_write_byte@plt>

LLVM IR (-O0):
define void @w5100_writePATR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @w5100_write_byte(i32 28, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w5100_writePATR(i32 %0) {
%2 = tail call i32 @w5100_write_byte(i32 28, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
void nonzero_stack() {
  char buf[40096];
  memset(buf, 0x80, 40096);
}


x86 assembly (clang, -O0):
<nonzero_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9ca0,%rsp
lea    -0x9ca0(%rbp),%rdi
mov    $0x80,%esi
mov    $0x9ca0,%edx
call   1030 <memset@plt>
add    $0x9ca0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonzero_stack>:
sub    $0x9ca8,%rsp
mov    %rsp,%rdi
mov    $0x80,%esi
mov    $0x9ca0,%edx
call   1030 <memset@plt>
add    $0x9ca8,%rsp
ret

LLVM IR (-O0):
define void @nonzero_stack() {
%1 = alloca [40096 x i8]
%2 = getelementptr inbounds [40096 x i8], [40096 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i32 128, i32 40096)
ret void
}

LLVM IR (-O2):
define void @nonzero_stack() {
%1 = alloca [40096 x i8]
%2 = getelementptr inbounds [40096 x i8], [40096 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i32 128, i32 40096)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
void COPY_4FV(GLfloat dst[4], const GLfloat src[4]) {
  memcpy(dst, src, sizeof(GLfloat) * 4);
}


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

x86 assembly (clang, -O2):
<COPY_4FV>:
mov    $0x10,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @COPY_4FV(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 = load i32*, i32** %4
%7 = call i32 @memcpy(i32* %5, i32* %6, i32 16)
ret void
}

LLVM IR (-O2):
define void @COPY_4FV(i32* %0, i32* %1) {
%3 = tail call i32 @memcpy(i32* %0, i32* %1, i32 16)
ret void
}
void skip_ws(const char **s) {
  while (**s == ' ' || **s == '\t' || **s == '\n')
    ++*s;
}


x86 assembly (clang, -O0):
<skip_ws>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     114b <skip_ws+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     114b <skip_ws+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115b <skip_ws+0x5b>
jmp    116e <skip_ws+0x6e>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <skip_ws+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_ws>:
mov    (%rdi),%rax
add    $0x1,%rax
movabs $0x100000600,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl -0x1(%rax),%edx
cmp    $0x20,%rdx
ja     1139 <skip_ws+0x39>
bt     %rdx,%rcx
jae    1139 <skip_ws+0x39>
mov    %rax,(%rdi)
add    $0x1,%rax
jmp    1120 <skip_ws+0x20>
ret

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

LLVM IR (-O2):
define void @skip_ws(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
i8 10, label %6
]
6: ; preds = %3, %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
void dev_init(void) {}


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

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

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

LLVM IR (-O2):
define void @dev_init() {
ret void
}