xunge/DecIR huggingface dataset:
/* Type definitions */
struct argp_state {
  int dummy;
};
typedef int /*<<< orphan*/ error_t;

/* Variables and functions */
int /*<<< orphan*/ E2BIG;
error_t parse_opt(int key, char *arg, struct argp_state *state) {
  return E2BIG;
}


x86 assembly (clang, -O0):
<parse_opt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_opt>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.argp_state = type { i32 }
@E2BIG = global i32 0
define i32 @parse_opt(i32 %0, i8* %1, %struct.argp_state* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.argp_state*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.argp_state* %2, %struct.argp_state** %6
%7 = load i32, i32* @E2BIG
ret i32 %7
}

LLVM IR (-O2):
%struct.argp_state = type { i32 }
@E2BIG = global i32 0
define i32 @parse_opt(i32 %0, i8* nocapture readnone %1, %struct.argp_state* nocapture readnone %2) {
%4 = load i32, i32* @E2BIG
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gpio_clr(int);
int /*<<< orphan*/ gpio_set(int);
int /*<<< orphan*/ reg_data(short);
int /*<<< orphan*/ usleep(int);
void LCD_data(short data) {
  reg_data(data);
  gpio_clr(1 << 18);
  gpio_clr(1 << 23);
  usleep(1);
  gpio_set(1 << 23);
}


x86 assembly (clang, -O0):
<LCD_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1050 <reg_data@plt>
mov    $0x40000,%edi
call   1030 <gpio_clr@plt>
mov    $0x800000,%edi
call   1030 <gpio_clr@plt>
mov    $0x1,%edi
call   1060 <usleep@plt>
mov    $0x800000,%edi
call   1040 <gpio_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_data>:
push   %rax
call   1050 <reg_data@plt>
mov    $0x40000,%edi
call   1030 <gpio_clr@plt>
mov    $0x800000,%edi
call   1030 <gpio_clr@plt>
mov    $0x1,%edi
call   1060 <usleep@plt>
mov    $0x800000,%edi
pop    %rax
jmp    1040 <gpio_set@plt>

LLVM IR (-O0):
define void @LCD_data(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @reg_data(i16 signext %3)
%5 = call i32 @gpio_clr(i32 262144)
%6 = call i32 @gpio_clr(i32 8388608)
%7 = call i32 @usleep(i32 1)
%8 = call i32 @gpio_set(i32 8388608)
ret void
}

LLVM IR (-O2):
define void @LCD_data(i16 signext %0) {
%2 = tail call i32 @reg_data(i16 signext %0)
%3 = tail call i32 @gpio_clr(i32 262144)
%4 = tail call i32 @gpio_clr(i32 8388608)
%5 = tail call i32 @usleep(i32 1)
%6 = tail call i32 @gpio_set(i32 8388608)
ret void
}
/* Variables and functions */
unsigned int OsaInstallDriver(unsigned int);
unsigned int CgosLibInstall(unsigned int install) {
  return OsaInstallDriver(install);
}


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

x86 assembly (clang, -O2):
<CgosLibInstall>:
jmp    1030 <OsaInstallDriver@plt>

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

LLVM IR (-O2):
define i32 @CgosLibInstall(i32 %0) {
%2 = tail call i32 @OsaInstallDriver(i32 %0)
ret i32 %2
}
/* Variables and functions */
void *ft_memchr(const void *s, int c, size_t n) {
  const unsigned char *p;
  p = s;
  while (n-- > 0)
    if (*p++ == (unsigned char)c)
      return ((void *)(p - 1));
  return (NULL);
}


x86 assembly (clang, -O0):
<ft_memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
jbe    1166 <ft_memchr+0x66>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movzbl (%rax),%eax
mov    -0x14(%rbp),%ecx
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    1161 <ft_memchr+0x61>
mov    -0x28(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    116e <ft_memchr+0x6e>
jmp    1117 <ft_memchr+0x17>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memchr>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
sub    $0x1,%rdx
jb     1124 <ft_memchr+0x24>
lea    0x1(%rdi),%rax
cmp    %sil,0x1(%rdi)
mov    %rax,%rdi
jne    1110 <ft_memchr+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @ft_memchr(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
store i8* %9, i8** %8
br label %10
10: ; preds = %26, %3
%11 = load i64, i64* %7
%12 = add i64 %11, -1
store i64 %12, i64* %7
%13 = icmp ugt i64 %11, 0
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = load i8*, i8** %8
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %8
%17 = load i8, i8* %15
%18 = zext i8 %17 to i32
%19 = load i32, i32* %6
%20 = trunc i32 %19 to i8
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %18, %21
br i1 %22, label %23, label %26
23: ; preds = %14
%24 = load i8*, i8** %8
%25 = getelementptr inbounds i8, i8* %24, i64 -1
store i8* %25, i8** %4
br label %28
26: ; preds = %14
br label %10
27: ; preds = %10
store i8* null, i8** %4
br label %28
28: ; preds = %27, %23
%29 = load i8*, i8** %4
ret i8* %29
}

LLVM IR (-O2):
define i8* @ft_memchr(i8* %0, i32 %1, i64 %2) {
%4 = trunc i32 %1 to i8
br label %5
5: ; preds = %9, %3
%6 = phi i64 [ %2, %3 ], [ %10, %9 ]
%7 = phi i8* [ %0, %3 ], [ %11, %9 ]
%8 = icmp eq i64 %6, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add i64 %6, -1
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %7
%13 = icmp eq i8 %12, %4
br i1 %13, label %14, label %5
14: ; preds = %5, %9
%15 = phi i8* [ %7, %9 ], [ null, %5 ]
ret i8* %15
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ copyr();
int /*<<< orphan*/ help();
int main(void) {
  int i;
  char s[256];
  help();
  copyr();
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [256 x i8]
store i32 0, i32* %1
%4 = call i32 (...) @help()
%5 = call i32 (...) @copyr()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @help()
%2 = tail call i32 (...) @copyr()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void main(int argc, char *argv[]) {
  char buffer[512];
  if (argc > 1)
    strcpy(buffer, argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1140 <main+0x30>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     112f <main+0x1f>
sub    $0x208,%rsp
mov    0x8(%rsi),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
add    $0x208,%rsp
ret

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [512 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strcpy(i8* %9, i8* %12)
br label %14
14: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @strcpy(i8* %4, i8* %8)
br label %10
10: ; preds = %6, %2
ret void
}
void w9(void *x, double y) { *(double *)(x + 32759) = y; }


x86 assembly (clang, -O0):
<w9>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ff7(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w9>:
movsd  %xmm0,0x7ff7(%rdi)
ret

LLVM IR (-O0):
define void @w9(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32759
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w9(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32759
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dtor() { printf("Create!\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Create!\0A\00"
define void @dtor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"Create!\00"
define void @dtor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
int toSteps(double angle) { return (int)(angle / 1.8); }


x86 assembly (clang, -O0):
<toSteps>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toSteps>:
divsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @toSteps(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.800000e+00
%5 = fptosi double %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @toSteps(double %0) {
%2 = fdiv double %0, 1.800000e+00
%3 = fptosi double %2 to i32
ret i32 %3
}
int getWordSize() { return 4; }


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

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

LLVM IR (-O0):
define i32 @getWordSize() {
ret i32 4
}

LLVM IR (-O2):
define i32 @getWordSize() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ mempcpy(char *, int /*<<< orphan*/, int);
void mempcpy11() {
  char a[4] = {0};
  mempcpy(a, 0, 4);
}


x86 assembly (clang, -O0):
<mempcpy11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <mempcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mempcpy11>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <mempcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @mempcpy11() {
%1 = alloca [4 x i8]
%2 = bitcast [4 x i8]* %1 to i8*
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%4 = call i32 @mempcpy(i8* %3, i32 0, i32 4)
ret void
}

LLVM IR (-O2):
define void @mempcpy11() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @mempcpy(i8* %2, i32 0, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bsp_putc(char);
void putout(char c, void *context) { bsp_putc(c); }


x86 assembly (clang, -O0):
<putout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <bsp_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putout>:
jmp    1030 <bsp_putc@plt>

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

LLVM IR (-O2):
define void @putout(i8 signext %0, i8* nocapture readnone %1) {
%3 = tail call i32 @bsp_putc(i8 signext %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int htons(int);
uint16_t packRGB565(uint8_t red, uint8_t green, uint8_t blue) {
  uint8_t r5 = red >> 3;
  uint8_t g6 = green >> 2;
  uint8_t b5 = blue >> 3;
  uint16_t pixel = (r5 << 11) | (g6 << 5) | b5;
  return htons(pixel);
}


x86 assembly (clang, -O0):
<packRGB565>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shl    $0xb,%eax
mov    -0x14(%rbp),%ecx
shl    $0x5,%ecx
or     %ecx,%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <htons@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packRGB565>:
sar    $0x3,%edx
and    $0xfffffff8,%edi
shl    $0x8,%edi
lea    0x0(,%rsi,8),%eax
and    $0xffffffe0,%eax
or     %eax,%edi
or     %edx,%edi
jmp    1030 <htons@plt>

LLVM IR (-O0):
define i32 @packRGB565(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %4
%12 = ashr i32 %11, 3
store i32 %12, i32* %7
%13 = load i32, i32* %5
%14 = ashr i32 %13, 2
store i32 %14, i32* %8
%15 = load i32, i32* %6
%16 = ashr i32 %15, 3
store i32 %16, i32* %9
%17 = load i32, i32* %7
%18 = shl i32 %17, 11
%19 = load i32, i32* %8
%20 = shl i32 %19, 5
%21 = or i32 %18, %20
%22 = load i32, i32* %9
%23 = or i32 %21, %22
store i32 %23, i32* %10
%24 = load i32, i32* %10
%25 = call i32 @htons(i32 %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @packRGB565(i32 %0, i32 %1, i32 %2) {
%4 = ashr i32 %2, 3
%5 = shl i32 %0, 8
%6 = and i32 %5, -2048
%7 = shl i32 %1, 3
%8 = and i32 %7, -32
%9 = or i32 %8, %6
%10 = or i32 %9, %4
%11 = tail call i32 @htons(i32 %10)
ret i32 %11
}
/* Variables and functions */
double atmoT(double);
int pow(double, double);
double atmoPressure(double h) {
  double pressure;
  pressure = 101325 * pow(atmoT(h) / 298.15, 5.25);
  return pressure;
}


x86 assembly (clang, -O0):
<atmoPressure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <atmoT@plt>
movsd  0xec9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeb5(%rip),%xmm1
call   1040 <pow@plt>
imul   $0x18bcd,%eax,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atmoPressure>:
push   %rax
call   1030 <atmoT@plt>
divsd  0xed2(%rip),%xmm0
movsd  0xed2(%rip),%xmm1
call   1040 <pow@plt>
imul   $0x18bcd,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @atmoPressure(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @atmoT(double %4)
%6 = fdiv double %5, 2.981500e+02
%7 = call i32 @pow(double %6, double 5.250000e+00)
%8 = mul nsw i32 101325, %7
%9 = sitofp i32 %8 to double
store double %9, double* %3
%10 = load double, double* %3
ret double %10
}

LLVM IR (-O2):
define double @atmoPressure(double %0) {
%2 = tail call double @atmoT(double %0)
%3 = fdiv double %2, 2.981500e+02
%4 = tail call i32 @pow(double %3, double 5.250000e+00)
%5 = mul nsw i32 %4, 101325
%6 = sitofp i32 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main() {
  sleep(5);
  sleep(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <sleep@plt>
mov    $0x1,%edi
call   1030 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 5)
%2 = tail call i32 @sleep(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void putstr(const char *str) { fputs(str, stdout); }


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putstr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @putstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @putstr(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret void
}
float interp(float val, float a, float b) { return (b - a) * val + a; }


x86 assembly (clang, -O0):
<interp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp>:
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @interp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float, float* %4
%11 = load float, float* %5
%12 = call float @llvm.fmuladd.f32(float %9, float %10, float %11)
ret float %12
}

LLVM IR (-O2):
define float @interp(float %0, float %1, float %2) {
%4 = fsub float %2, %1
%5 = tail call float @llvm.fmuladd.f32(float %4, float %0, float %1)
ret float %5
}
/* Variables and functions */
scalar_t__ strlen(char *);
char *corta_string(char *apuntador) {
  return ((strlen(apuntador)) > 0) ? apuntador + 1
                                   : "Error la cadena está vacía";
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jle    1140 <corta_string+0x30>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <corta_string+0x40>
lea    0xeb9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <corta_string+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0x1,%rbx
test   %rax,%rax
lea    0xed9(%rip),%rax
cmovg  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Error la cadena est\C3\A1 vac\C3\ADa\00"
define i8* @corta_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i8* [ %8, %6 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), %9 ]
ret i8* %11
}

LLVM IR (-O2):
@.str = [29 x i8] c"Error la cadena est\C3\A1 vac\C3\ADa\00"
define i8* @corta_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp sgt i64 %2, 0
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = select i1 %3, i8* %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_leaderboard(char *opt) {
  if (strcmp(opt, "-l") == 0)
    return 1;
  if (strcmp(opt, "--leaderboard") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_leaderboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_leaderboard+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_leaderboard+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_leaderboard+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_leaderboard+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_leaderboard>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_leaderboard+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-l\00"
@.str.1 = [14 x i8] c"--leaderboard\00"
define i32 @opt_leaderboard(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"-l\00"
@.str.1 = [14 x i8] c"--leaderboard\00"
define i32 @opt_leaderboard(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
unsigned int UARTRegConfigModeEnable(unsigned int, int);
unsigned int UARTEnhanFuncEnable(unsigned int baseAdd) {
  unsigned int enhanFnBitVal = 0;
  unsigned int lcrRegValue = 0;
  lcrRegValue = UARTRegConfigModeEnable(baseAdd, (0x00BF));
  enhanFnBitVal =
      ((*((volatile unsigned int *)(baseAdd + (0x8)))) & (0x00000010u));
  (*((volatile unsigned int *)(baseAdd + (0x8)))) |= (0x00000010u);
  (*((volatile unsigned int *)(baseAdd + (0xC)))) = lcrRegValue;
  return enhanFnBitVal;
}


x86 assembly (clang, -O0):
<UARTEnhanFuncEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xbf,%esi
call   1030 <UARTRegConfigModeEnable@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     $0x10,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTEnhanFuncEnable>:
push   %rbx
mov    %edi,%ebx
mov    $0xbf,%esi
call   1030 <UARTRegConfigModeEnable@plt>
lea    0x8(%rbx),%edx
mov    (%rdx),%ecx
orl    $0x10,(%rdx)
and    $0x10,%ecx
add    $0xc,%ebx
mov    %eax,(%rbx)
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @UARTEnhanFuncEnable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = call i32 @UARTRegConfigModeEnable(i32 %5, i32 191)
store i32 %6, i32* %4
%7 = load i32, i32* %2
%8 = add i32 %7, 8
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, 16
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = add i32 %13, 8
%15 = zext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
%17 = load volatile i32, i32* %16
%18 = or i32 %17, 16
store volatile i32 %18, i32* %16
%19 = load i32, i32* %4
%20 = load i32, i32* %2
%21 = add i32 %20, 12
%22 = zext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
store volatile i32 %19, i32* %23
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @UARTEnhanFuncEnable(i32 %0) {
%2 = tail call i32 @UARTRegConfigModeEnable(i32 %0, i32 191)
%3 = add i32 %0, 8
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 16
%8 = load volatile i32, i32* %5
%9 = or i32 %8, 16
store volatile i32 %9, i32* %5
%10 = add i32 %0, 12
%11 = zext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
store volatile i32 %2, i32* %12
ret i32 %7
}
void corrupt_block(void *ptr, int block_size, int offset) {
  unsigned char *p = (unsigned char *)ptr;
  p += block_size + offset;
  *(p + 4) = 'e';
  *(p + 5) = 0xAA;
}


x86 assembly (clang, -O0):
<corrupt_block>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x65,0x4(%rax)
mov    -0x18(%rbp),%rax
movb   $0xaa,0x5(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<corrupt_block>:
add    %edx,%esi
movslq %esi,%rax
movw   $0xaa65,0x4(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @corrupt_block(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
store i8* %8, i8** %7
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i8*, i8** %7
%13 = sext i32 %11 to i64
%14 = getelementptr inbounds i8, i8* %12, i64 %13
store i8* %14, i8** %7
%15 = load i8*, i8** %7
%16 = getelementptr inbounds i8, i8* %15, i64 4
store i8 101, i8* %16
%17 = load i8*, i8** %7
%18 = getelementptr inbounds i8, i8* %17, i64 5
store i8 -86, i8* %18
ret void
}

LLVM IR (-O2):
define void @corrupt_block(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 4
store i8 101, i8* %7
%8 = getelementptr inbounds i8, i8* %6, i64 5
store i8 -86, i8* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void TS_Xlen(void) {
  fputs("Length error: dynamic array too long\n", stderr);
  abort();
}


x86 assembly (clang, -O0):
<TS_Xlen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<TS_Xlen>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Length error: dynamic array too long\0A\00"
@stderr = global i32 0
define void @TS_Xlen() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"Length error: dynamic array too long\0A\00"
@stderr = global i32 0
define void @TS_Xlen() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int genrand64_int64();
double mt_rand_double_ranged(double min, double max) {
  return (genrand64_int64() >> 11) * (1.0 / 9007199254740992.0) * (max - min) +
         min;
}


x86 assembly (clang, -O0):
<mt_rand_double_ranged>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <genrand64_int64@plt>
sar    $0xb,%eax
cvtsi2sd %eax,%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mt_rand_double_ranged>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <genrand64_int64@plt>
sar    $0xb,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xec7(%rip),%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @mt_rand_double_ranged(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 (...) @genrand64_int64()
%6 = ashr i32 %5, 11
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 0x3CA0000000000000
%9 = load double, double* %4
%10 = load double, double* %3
%11 = fsub double %9, %10
%12 = load double, double* %3
%13 = call double @llvm.fmuladd.f64(double %8, double %11, double %12)
ret double %13
}

LLVM IR (-O2):
define double @mt_rand_double_ranged(double %0, double %1) {
%3 = tail call i32 (...) @genrand64_int64()
%4 = ashr i32 %3, 11
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 0x3CA0000000000000
%7 = fsub double %1, %0
%8 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %0)
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __syscall_getpgid(int /*<<< orphan*/);
pid_t getpgid(pid_t pid) { return (__syscall_getpgid(pid)); }


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

x86 assembly (clang, -O2):
<getpgid>:
jmp    1030 <__syscall_getpgid@plt>

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

LLVM IR (-O2):
define i32 @getpgid(i32 %0) {
%2 = tail call i32 @__syscall_getpgid(i32 %0)
ret i32 %2
}
/* Variables and functions */
double exp(double);
double dAUX1bp4a(double x) { return -2.0 * (1 + x) * exp(x); }


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

x86 assembly (clang, -O2):
<dAUX1bp4a>:
push   %rax
movsd  0xee7(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee3(%rip),%xmm1
movsd  %xmm1,(%rsp)
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @dAUX1bp4a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double 1.000000e+00, %3
%5 = fmul double -2.000000e+00, %4
%6 = load double, double* %2
%7 = call double @exp(double %6)
%8 = fmul double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @dAUX1bp4a(double %0) {
%2 = fadd double %0, 1.000000e+00
%3 = fmul double %2, -2.000000e+00
%4 = tail call double @exp(double %0)
%5 = fmul double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strlen(char *);
char *voltea_string(char *);
int main(void) {
  char *s = "Campos verdes";
  char *s_duplicado = malloc(strlen(s));
  s_duplicado = voltea_string(s);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <voltea_string@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe78(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
call   1060 <voltea_string@plt>
mov    %rax,%rbx
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @malloc(i32 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %2
%8 = call i8* @voltea_string(i8* %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 @free(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @voltea_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret i32 0
}
int clskconnx(x)
int x;
{
  int t, rc;
  rc = clsconnx(x);
  return (rc);
}


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

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

LLVM IR (-O0):
define i32 @clskconnx(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @clsconnx to i32 (i32, ...)*)(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
ret i32 %7
}

LLVM IR (-O2):
define i32 @clskconnx(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @clsconnx to i32 (i32, ...)*)(i32 %0)
ret i32 %2
}
double Sq(double x) { return x * x; }


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

x86 assembly (clang, -O2):
<Sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Sq(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
ret double %5
}

LLVM IR (-O2):
define double @Sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double sinh(double);
int main() {
  double x, ret;
  x = 0.5;
  ret = sinh(x);
  printf("The hyperbolic sine of %lf is %lf degrees\n", x, ret);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"The hyperbolic sine of %lf is %lf degrees\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 5.000000e-01, double* %2
%4 = load double, double* %2
%5 = call double @sinh(double %4)
store double %5, double* %3
%6 = load double, double* %2
%7 = load double, double* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), double %6, double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"The hyperbolic sine of %lf is %lf degrees\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), double 5.000000e-01, double 0x3FE0ACD00FE63B97)
ret i32 0
}
void GI2C1_ReleaseBus(void) {}


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

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

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

LLVM IR (-O2):
define void @GI2C1_ReleaseBus() {
ret void
}
void path_018_expected_7(int a, int b) {
  switch (a) {
  case 0:
    return;
  case 1:
    if (a > 10) {
      return;
    }
    break;
  case 2:
    return;
  default:
    break;
  }
  if (b) {
  }
}


x86 assembly (clang, -O0):
<path_018_expected_7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     113f <path_018_expected_7+0x3f>
jmp    111d <path_018_expected_7+0x1d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1144 <path_018_expected_7+0x44>
jmp    112e <path_018_expected_7+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1158 <path_018_expected_7+0x58>
jmp    115d <path_018_expected_7+0x5d>
jmp    1171 <path_018_expected_7+0x71>
cmpl   $0xa,-0x4(%rbp)
jle    1153 <path_018_expected_7+0x53>
jmp    1171 <path_018_expected_7+0x71>
jmp    1162 <path_018_expected_7+0x62>
jmp    1171 <path_018_expected_7+0x71>
jmp    1162 <path_018_expected_7+0x62>
cmpl   $0x0,-0x8(%rbp)
je     1171 <path_018_expected_7+0x71>
jmp    1171 <path_018_expected_7+0x71>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @path_018_expected_7(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
switch i32 %5, label %13 [
i32 0, label %6
i32 1, label %7
i32 2, label %12
]
6: ; preds = %2
br label %18
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %7
br label %18
11: ; preds = %7
br label %14
12: ; preds = %2
br label %18
13: ; preds = %2
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
br label %18
18: ; preds = %6, %10, %12, %17, %14
ret void
}

LLVM IR (-O2):
define void @path_018_expected_7(i32 %0, i32 %1) {
ret void
}
int multbytwo(int num) { return num * 2; }


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

x86 assembly (clang, -O2):
<multbytwo>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @multbytwo(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ errno;
char const *strerror(int /*<<< orphan*/);
const char *dlib_syserr() { return strerror(errno); }


x86 assembly (clang, -O0):
<dlib_syserr>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <strerror@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlib_syserr>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <strerror@plt>

LLVM IR (-O0):
@errno = global i32 0
define i8* @dlib_syserr() {
%1 = load i32, i32* @errno
%2 = call i8* @strerror(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@errno = global i32 0
define i8* @dlib_syserr() {
%1 = load i32, i32* @errno
%2 = tail call i8* @strerror(i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xd0() {
  Assert_real((islower(208) == 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_islower.c",
              1045, ("islower should be 0 for 0xd0"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xd0>:
push   %rax
mov    $0xd0,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x415,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd0\00"
define void @t_islower_0xd0() {
%1 = call i64 @islower(i32 208)
%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 1045, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xd0\00"
define void @t_islower_0xd0() {
%1 = tail call i64 @islower(i32 208)
%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 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int mpeg3_minor() { return 8; }


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

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

LLVM IR (-O0):
define i32 @mpeg3_minor() {
ret i32 8
}

LLVM IR (-O2):
define i32 @mpeg3_minor() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int count_between_up(int userin1, int userin2) {
  int loop;
  for (loop = userin1; loop <= userin2; loop++) {
    printf("%d ", loop);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<count_between_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     114f <count_between_up+0x3f>
mov    -0x10(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <count_between_up+0x14>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_between_up>:
push   %rbp
push   %r14
push   %rbx
cmp    %esi,%edi
jg     1153 <count_between_up+0x33>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1140 <count_between_up+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @count_between_up(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %0, %2 ]
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add i32 %5, 1
%8 = icmp eq i32 %5, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = tail call i32 @putchar(i32 10)
ret i32 undef
}
/* Type definitions */
struct uzlib_uncomp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ uzlib_get_byte(struct uzlib_uncomp *);
void tinf_skip_bytes(struct uzlib_uncomp *d, int num) {
  while (num--)
    uzlib_get_byte(d);
}


x86 assembly (clang, -O0):
<tinf_skip_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1141 <tinf_skip_bytes+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <uzlib_get_byte@plt>
jmp    111f <tinf_skip_bytes+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tinf_skip_bytes>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
je     112d <tinf_skip_bytes+0x1d>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
mov    %r14,%rdi
call   1030 <uzlib_get_byte@plt>
add    $0xffffffff,%ebx
jne    1120 <tinf_skip_bytes+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.uzlib_uncomp = type { i32 }
define void @tinf_skip_bytes(%struct.uzlib_uncomp* %0, i32 %1) {
%3 = alloca %struct.uzlib_uncomp*
%4 = alloca i32
store %struct.uzlib_uncomp* %0, %struct.uzlib_uncomp** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load %struct.uzlib_uncomp*, %struct.uzlib_uncomp** %3
%11 = call i32 @uzlib_get_byte(%struct.uzlib_uncomp* %10)
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
%struct.uzlib_uncomp = type { i32 }
define void @tinf_skip_bytes(%struct.uzlib_uncomp* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @uzlib_get_byte(%struct.uzlib_uncomp* %0)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}