xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *cmd) {
  printf("Usage: %s [options] [<CAN-contoller-name>]\n"
         "\tOptions:\n"
         "\t-q           : don't print header line\n"
         "\t-l           : list all support CAN controller names\n"
         "\t-b <bitrate> : bit-rate in bits/sec\n"
         "\t-s <samp_pt> : sample-point in one-tenth of a percent\n"
         "\t               or 0 for CIA recommended sample points\n"
         "\t-c <clock>   : real CAN system clock in Hz\n",
         cmd);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [339 x i8] c"Usage: %s [options] [<CAN-contoller-name>]\0A\09Options:\0A\09-q : don't print header line\0A\09-l : list all support CAN controller names\0A\09-b <bitrate> : bit-rate in bits/sec\0A\09-s <samp_pt> : sample-point in one-tenth of a percent\0A\09 or 0 for CIA recommended sample points\0A\09-c <clock> : real CAN system clock in Hz\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([339 x i8], [339 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [339 x i8] c"Usage: %s [options] [<CAN-contoller-name>]\0A\09Options:\0A\09-q : don't print header line\0A\09-l : list all support CAN controller names\0A\09-b <bitrate> : bit-rate in bits/sec\0A\09-s <samp_pt> : sample-point in one-tenth of a percent\0A\09 or 0 for CIA recommended sample points\0A\09-c <clock> : real CAN system clock in Hz\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([339 x i8], [339 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
struct machine {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ delete_logins(struct machine *, int);
void logout_machine(struct machine *machine) { delete_logins(machine, 1); }


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

x86 assembly (clang, -O2):
<logout_machine>:
mov    $0x1,%esi
jmp    1030 <delete_logins@plt>

LLVM IR (-O0):
%struct.machine = type { i32 }
define void @logout_machine(%struct.machine* %0) {
%2 = alloca %struct.machine*
store %struct.machine* %0, %struct.machine** %2
%3 = load %struct.machine*, %struct.machine** %2
%4 = call i32 @delete_logins(%struct.machine* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.machine = type { i32 }
define void @logout_machine(%struct.machine* %0) {
%2 = tail call i32 @delete_logins(%struct.machine* %0, i32 1)
ret void
}
void TimerConfigure(unsigned long ulBase, unsigned long ulConfig) {
  ;

  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x0000000C))) &=
      ~(0x00000001 | 0x00000100);
  (*((volatile unsigned long *)(ulBase + 0x00000000))) = ulConfig >> 24;
  (*((volatile unsigned long *)(ulBase + 0x00000004))) = ulConfig & 255;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) = (ulConfig >> 8) & 255;
}


x86 assembly (clang, -O0):
<TimerConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
and    $0xfffffffffffffefe,%rcx
mov    %rcx,0xc(%rax)
mov    -0x10(%rbp),%rcx
shr    $0x18,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
and    $0xff,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x4(%rax)
mov    -0x10(%rbp),%rcx
shr    $0x8,%rcx
and    $0xff,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerConfigure>:
mov    %rsi,%rax
movzbl %al,%ecx
movzbl %ah,%edx
andq   $0xfffffffffffffefe,0xc(%rdi)
ff
shr    $0x18,%rax
mov    %rax,(%rdi)
mov    %rcx,0x4(%rdi)
mov    %rdx,0x8(%rdi)
ret

LLVM IR (-O0):
define void @TimerConfigure(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 12
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = and i64 %8, -258
store volatile i64 %9, i64* %7
%10 = load i64, i64* %4
%11 = lshr i64 %10, 24
%12 = load i64, i64* %3
%13 = add i64 %12, 0
%14 = inttoptr i64 %13 to i64*
store volatile i64 %11, i64* %14
%15 = load i64, i64* %4
%16 = and i64 %15, 255
%17 = load i64, i64* %3
%18 = add i64 %17, 4
%19 = inttoptr i64 %18 to i64*
store volatile i64 %16, i64* %19
%20 = load i64, i64* %4
%21 = lshr i64 %20, 8
%22 = and i64 %21, 255
%23 = load i64, i64* %3
%24 = add i64 %23, 8
%25 = inttoptr i64 %24 to i64*
store volatile i64 %22, i64* %25
ret void
}

LLVM IR (-O2):
define void @TimerConfigure(i64 %0, i64 %1) {
%3 = add i64 %0, 12
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = and i64 %5, -258
store volatile i64 %6, i64* %4
%7 = lshr i64 %1, 24
%8 = inttoptr i64 %0 to i64*
store volatile i64 %7, i64* %8
%9 = and i64 %1, 255
%10 = add i64 %0, 4
%11 = inttoptr i64 %10 to i64*
store volatile i64 %9, i64* %11
%12 = lshr i64 %1, 8
%13 = and i64 %12, 255
%14 = add i64 %0, 8
%15 = inttoptr i64 %14 to i64*
store volatile i64 %13, i64* %15
ret void
}
double ln_rad_to_deg(double radians) {
  return (radians * (5.7295779513082320877e1));
}


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

x86 assembly (clang, -O2):
<ln_rad_to_deg>:
mulsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @ln_rad_to_deg(double %0) {
%2 = fmul double %0, 0x404CA5DC1A63C1F8
ret double %2
}
int test_imm_C9int64_lowword_reg(long long val) {
  return ((val) & (0xC9 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_C9int64_lowword_reg>:
test   $0xc9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C9int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 201
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ unimplemented();
void norm_dir(void) { unimplemented(); }


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

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

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

LLVM IR (-O2):
define void @norm_dir() {
%1 = tail call i32 (...) @unimplemented()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dae_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<dae_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @dae_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, size_t);
void *MemoryCopy(void *dest, const void *src, size_t count) {
  strncpy((char *)dest, (char *)src, count);
  return dest;
}


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

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

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

LLVM IR (-O2):
define i8* @MemoryCopy(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %2)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum(int, int, int, int, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int x = sum(4, 3, 32, 22, 0);
  printf("hello world %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
mov    $0x3,%esi
mov    $0x20,%edx
mov    $0x16,%ecx
xor    %r8d,%r8d
call   1040 <sum@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
mov    $0x3,%esi
mov    $0x20,%edx
mov    $0x16,%ecx
xor    %r8d,%r8d
call   1040 <sum@plt>
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"hello world %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @sum(i32 4, i32 3, i32 32, i32 22, i32 0)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"hello world %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sum(i32 4, i32 3, i32 32, i32 22, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void foo74() {}


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

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

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

LLVM IR (-O2):
define void @foo74() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void printUsage() {
  fprintf(stdout, "\nUsage: -P HTTP_PORT [-H HTTP_HOST -V VNC_HOST] \n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [50 x i8] c"\0AUsage: -P HTTP_PORT [-H HTTP_HOST -V VNC_HOST] \0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [50 x i8] c"\0AUsage: -P HTTP_PORT [-H HTTP_HOST -V VNC_HOST] \0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *__mempcpy(void *dstpp, const void *srcpp, size_t len) {
  memcpy(dstpp, srcpp, len);
  return (void *)(((char *)dstpp) + len);
}


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

x86 assembly (clang, -O2):
<__mempcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @__mempcpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%5 = getelementptr inbounds i8, i8* %0, i64 %2
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *argv0) {
  fprintf(stderr,
          "Usage: %s [options] filebase\n"
          "  -d <device number to use>\n"
          "  -n <number of pages to scan>\n"
          "  -p <first page number> (zero based)\n"
          "  -q <quality>: percent 1-100\n"
          "  -b <block size>\n"
          "  -w <width in inches>\n"
          "  -h <height in inches>\n"
          "  -c <compression type> (0x81 is jpeg)\n"
          "  -s (output to stdout)\n"
          "  -r <resolution> (e.g. 300)\n"
          "  -f scan from flatbed\n"
          "  -i or --interactive: interactive mode\n"
          "  --list: show USB devices\n"
          "  --duplex: scan front and back\n",
          argv0);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [436 x i8] c"Usage: %s [options] filebase\0A -d <device number to use>\0A -n <number of pages to scan>\0A -p <first page number> (zero based)\0A -q <quality>: percent 1-100\0A -b <block size>\0A -w <width in inches>\0A -h <height in inches>\0A -c <compression type> (0x81 is jpeg)\0A -s (output to stdout)\0A -r <resolution> (e.g. 300)\0A -f scan from flatbed\0A -i or --interactive: interactive mode\0A --list: show USB devices\0A --duplex: scan front and back\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([436 x i8], [436 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [436 x i8] c"Usage: %s [options] filebase\0A -d <device number to use>\0A -n <number of pages to scan>\0A -p <first page number> (zero based)\0A -q <quality>: percent 1-100\0A -b <block size>\0A -w <width in inches>\0A -h <height in inches>\0A -c <compression type> (0x81 is jpeg)\0A -s (output to stdout)\0A -r <resolution> (e.g. 300)\0A -f scan from flatbed\0A -i or --interactive: interactive mode\0A --list: show USB devices\0A --duplex: scan front and back\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([436 x i8], [436 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
int gfx_load_font(int num, char *font_filename, int size) { return 0; }


x86 assembly (clang, -O0):
<gfx_load_font>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gfx_load_font(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
int rl_vi_bracktype(c)
int c;
{
  switch (c) {
  case '(':
    return 1;
  case ')':
    return -1;
  case '[':
    return 2;
  case ']':
    return -2;
  case '{':
    return 3;
  case '}':
    return -3;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<rl_vi_bracktype>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x28,%eax
je     1170 <rl_vi_bracktype+0x70>
jmp    111b <rl_vi_bracktype+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x29,%eax
je     117c <rl_vi_bracktype+0x7c>
jmp    112c <rl_vi_bracktype+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x5b,%eax
je     1188 <rl_vi_bracktype+0x88>
jmp    113d <rl_vi_bracktype+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x5d,%eax
je     1194 <rl_vi_bracktype+0x94>
jmp    114e <rl_vi_bracktype+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x7b,%eax
je     11a0 <rl_vi_bracktype+0xa0>
jmp    115f <rl_vi_bracktype+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x7d,%eax
je     11ac <rl_vi_bracktype+0xac>
jmp    11b8 <rl_vi_bracktype+0xb8>
movl   $0x1,-0x4(%rbp)
jmp    11bf <rl_vi_bracktype+0xbf>
movl   $0xffffffff,-0x4(%rbp)
jmp    11bf <rl_vi_bracktype+0xbf>
movl   $0x2,-0x4(%rbp)
jmp    11bf <rl_vi_bracktype+0xbf>
movl   $0xfffffffe,-0x4(%rbp)
jmp    11bf <rl_vi_bracktype+0xbf>
movl   $0x3,-0x4(%rbp)
jmp    11bf <rl_vi_bracktype+0xbf>
movl   $0xfffffffd,-0x4(%rbp)
jmp    11bf <rl_vi_bracktype+0xbf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rl_vi_bracktype>:
lea    -0x5b(%rdi),%eax
cmp    $0x22,%eax
ja     111e <rl_vi_bracktype+0x1e>
lea    0xef1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%eax
ret
cmp    $0x28,%edi
je     1143 <rl_vi_bracktype+0x43>
cmp    $0x29,%edi
jne    112e <rl_vi_bracktype+0x2e>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret
mov    $0xfffffffe,%eax
ret
mov    $0x3,%eax
ret
mov    $0xfffffffd,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @rl_vi_bracktype(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 40, label %5
i32 41, label %6
i32 91, label %7
i32 93, label %8
i32 123, label %9
i32 125, label %10
]
5: ; preds = %1
store i32 1, i32* %2
br label %12
6: ; preds = %1
store i32 -1, i32* %2
br label %12
7: ; preds = %1
store i32 2, i32* %2
br label %12
8: ; preds = %1
store i32 -2, i32* %2
br label %12
9: ; preds = %1
store i32 3, i32* %2
br label %12
10: ; preds = %1
store i32 -3, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @rl_vi_bracktype(i32 %0) {
switch i32 %0, label %7 [
i32 40, label %8
i32 41, label %2
i32 91, label %3
i32 93, label %4
i32 123, label %5
i32 125, label %6
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3, %2
%9 = phi i32 [ 0, %7 ], [ -3, %6 ], [ 3, %5 ], [ -2, %4 ], [ 2, %3 ], [ -1, %2 ], [ 1, %1 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;
typedef int __u32;

/* Variables and functions */
volatile __u32 gtx_in32(volatile __u8 *mmioaddr, __u32 reg) {
  return *((volatile __u32 *)(mmioaddr + reg));
}


x86 assembly (clang, -O0):
<gtx_in32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtx_in32>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @gtx_in32(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load volatile i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @gtx_in32(i32* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load volatile i32, i32* %4
ret i32 %5
}
void SteamAPI_ISteamMatchmaking_SetLobbyMemberData(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmaking_SetLobbyMemberData>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmaking_SetLobbyMemberData = [46 x i8] c"SteamAPI_ISteamMatchmaking_SetLobbyMemberData\00"
define void @SteamAPI_ISteamMatchmaking_SetLobbyMemberData(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @__func__.SteamAPI_ISteamMatchmaking_SetLobbyMemberData, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmaking_SetLobbyMemberData = [46 x i8] c"SteamAPI_ISteamMatchmaking_SetLobbyMemberData\00"
define void @SteamAPI_ISteamMatchmaking_SetLobbyMemberData(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @__func__.SteamAPI_ISteamMatchmaking_SetLobbyMemberData, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ toshiba_set_lcd_brightness(int, int);
void Toshiba_lcdBrightness_UpOneStep(int use_hardware) {
  toshiba_set_lcd_brightness(-5, use_hardware);
}


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

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

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

LLVM IR (-O2):
define void @Toshiba_lcdBrightness_UpOneStep(i32 %0) {
%2 = tail call i32 @toshiba_set_lcd_brightness(i32 -5, i32 %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int fd;
};
struct epoll_event {
  int events;
  TYPE_1__ data;
};

/* Variables and functions */
int /*<<< orphan*/ EPOLL_CTL_ADD;
int /*<<< orphan*/ epoll_ctl(int, int /*<<< orphan*/, int,
                             struct epoll_event *);
void add_event(int epollfd, int fd, int state) {
  struct epoll_event ev;
  ev.events = state;
  ev.data.fd = fd;
  epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev);
}


x86 assembly (clang, -O0):
<add_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
lea    -0x18(%rbp),%rcx
call   1030 <epoll_ctl@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_event>:
push   %rax
mov    %esi,%eax
mov    %edx,(%rsp)
mov    %esi,0x4(%rsp)
mov    0x2ec7(%rip),%rcx
mov    (%rcx),%esi
mov    %rsp,%rcx
mov    %eax,%edx
call   1030 <epoll_ctl@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.epoll_event = type { i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
@EPOLL_CTL_ADD = global i32 0
define void @add_event(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.epoll_event
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %7, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %5
%11 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %7, i32 0, i32 1
%12 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %11, i32 0, i32 0
store i32 %10, i32* %12
%13 = load i32, i32* %4
%14 = load i32, i32* @EPOLL_CTL_ADD
%15 = load i32, i32* %5
%16 = call i32 @epoll_ctl(i32 %13, i32 %14, i32 %15, %struct.epoll_event* %7)
ret void
}

LLVM IR (-O2):
%struct.epoll_event = type { i32, %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32 }
@EPOLL_CTL_ADD = global i32 0
define void @add_event(i32 %0, i32 %1, i32 %2) {
%4 = alloca %struct.epoll_event
%5 = bitcast %struct.epoll_event* %4 to i8*
%6 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %4, i64 0, i32 0
store i32 %2, i32* %6
%7 = getelementptr inbounds %struct.epoll_event, %struct.epoll_event* %4, i64 0, i32 1, i32 0
store i32 %1, i32* %7
%8 = load i32, i32* @EPOLL_CTL_ADD
%9 = call i32 @epoll_ctl(i32 %0, i32 %8, i32 %1, %struct.epoll_event* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GC_INIT();
int gc_main(int, char **);
int main(int argc, char **argv) {
  GC_INIT();
  return gc_main(argc, argv);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <GC_INIT@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <gc_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @GC_INIT()
%4 = tail call i32 @gc_main(i32 %0, i8** %1)
ret i32 %4
}
double ldexp(double x, int expo) {
  double r;
  double e = expo;
  __asm__ __volatile__("fscale; fst %%st(0)" : "=t"(r) : "0"(x), "u"(e));
  return r;
}


x86 assembly (clang, -O0):
<ldexp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
fldl   -0x28(%rbp)
fldl   -0x30(%rbp)
fxch   %st(1)
fscale
fst    %st(0)
fstp   %st(1)
fstpl  -0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexp>:
cvtsi2sd %edi,%xmm1
movsd  %xmm0,-0x8(%rsp)
movsd  %xmm1,-0x10(%rsp)
fldl   -0x8(%rsp)
fldl   -0x10(%rsp)
fxch   %st(1)
fscale
fst    %st(0)
fstp   %st(1)
fstpl  -0x18(%rsp)
movsd  -0x18(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @ldexp(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
store double %8, double* %6
%9 = load double, double* %3
%10 = load double, double* %6
%11 = call double asm sideeffect "fscale; fst %st(0)", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(double %9, double %10)
store double %11, double* %5
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @ldexp(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = tail call double asm sideeffect "fscale; fst %st(0)", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(double %0, double %3)
ret double %4
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", EOF);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern int shmem_int_swap(int *target, int value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_int_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define i32 @shmem_int_swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define i32 @shmem_int_swap(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
bmove(dst, src, len) char *dst, *src;
int len;
{ bcopy(src, dst, len); }


x86 assembly (clang, -O0):
<bmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x0,%al
call   1030 <bcopy@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmove>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
xor    %eax,%eax
jmp    1030 <bcopy@plt>

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

LLVM IR (-O2):
define i32 @bmove(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @bcopy to i32 (i8*, i8*, i32, ...)*)(i8* %1, i8* %0, i32 %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ add_argument(char *);
int /*<<< orphan*/ build_arglist(char *);
int /*<<< orphan*/ pathmod(char *, char *, char *, int);
int /*<<< orphan*/ run_command();
void convert_s_to_o(char *path) {
  build_arglist("/bin/as");
  add_argument(path);
  run_command();
  pathmod(path, ".s", ".o", 5);
}


x86 assembly (clang, -O0):
<convert_s_to_o>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1050 <build_arglist@plt>
mov    -0x8(%rbp),%rdi
call   1030 <add_argument@plt>
mov    $0x0,%al
call   1040 <run_command@plt>
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
lea    0xe91(%rip),%rdx
mov    $0x5,%ecx
call   1060 <pathmod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_s_to_o>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1050 <build_arglist@plt>
mov    %rbx,%rdi
call   1030 <add_argument@plt>
xor    %eax,%eax
call   1040 <run_command@plt>
lea    0xea2(%rip),%rsi
lea    0xe9e(%rip),%rdx
mov    %rbx,%rdi
mov    $0x5,%ecx
pop    %rbx
jmp    1060 <pathmod@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/as\00"
@.str.1 = [3 x i8] c".s\00"
@.str.2 = [3 x i8] c".o\00"
define void @convert_s_to_o(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @build_arglist(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @add_argument(i8* %4)
%6 = call i32 (...) @run_command()
%7 = load i8*, i8** %2
%8 = call i32 @pathmod(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/as\00"
@.str.1 = [3 x i8] c".s\00"
@.str.2 = [3 x i8] c".o\00"
define void @convert_s_to_o(i8* %0) {
%2 = tail call i32 @build_arglist(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @add_argument(i8* %0)
%4 = tail call i32 (...) @run_command()
%5 = tail call i32 @pathmod(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret void
}
/* Variables and functions */
int Func2(int);
int Func1(int x) {
  x = Func2(x + 1);
  return x;
}


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

x86 assembly (clang, -O2):
<Func1>:
add    $0x1,%edi
jmp    1030 <Func2@plt>

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

LLVM IR (-O2):
define i32 @Func1(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @Func2(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x49() {
  Assert_real((isalpha(73)),
              "/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_isalpha.c",
              370, ("isalpha should be 1 for I"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x49>:
push   %rbp
mov    %rsp,%rbp
mov    $0x49,%edi
call   1030 <isalpha@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x172,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x49>:
push   %rax
mov    $0x49,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x172,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for I\00"
define void @t_isalpha_0x49() {
%1 = call i32 @isalpha(i32 73)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([26 x i8], [26 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for I\00"
define void @t_isalpha_0x49() {
%1 = tail call i32 @isalpha(i32 73)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 370, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((weak)) char *_sys_command_string(char *cmd, int len) {
  (void)len;
  return cmd;
}


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

x86 assembly (clang, -O2):
<_sys_command_string>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define weak i8* @_sys_command_string(i8* %0, i32 %1) {
ret i8* %0
}
void ff_hevc_put_hevc_bi_epel_hv24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv24_10_sse4() {
ret void
}
unsigned int sysmon_diode2millikelvin(unsigned int adc_value) {
  int raw = adc_value;
  raw = raw >> 6;
  raw = raw * 503975 / 1024;
  return raw;
}


x86 assembly (clang, -O0):
<sysmon_diode2millikelvin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x6,%eax
mov    %eax,-0x8(%rbp)
imul   $0x7b0a7,-0x8(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysmon_diode2millikelvin>:
sar    $0x6,%edi
imul   $0x7b0a7,%edi,%ecx
lea    0x3ff(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @sysmon_diode2millikelvin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = ashr i32 %5, 6
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 %7, 503975
%9 = sdiv i32 %8, 1024
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @sysmon_diode2millikelvin(i32 %0) {
%2 = ashr i32 %0, 6
%3 = mul nsw i32 %2, 503975
%4 = sdiv i32 %3, 1024
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_readable_size() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_readable_size"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [40 x i8] c"NOT IMPLEMENTED:pa_stream_readable_size\00"
define i32 @pa_stream_readable_size() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void bar(void) {
  enum foo_tag { e_foo };
  volatile unsigned char a = e_foo;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movb   $0x0,-0x1(%rsp)
ret

LLVM IR (-O0):
define void @bar() {
%1 = alloca i8
store volatile i8 0, i8* %1
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = alloca i8
store volatile i8 0, i8* %1
ret void
}
/* Type definitions */
struct tag {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ object_copy(void const *);
struct tag *tag_create_object_(char const *, int /*<<< orphan*/);
struct tag *tag_create_object(const char *name, const void *obj) {
  return tag_create_object_(name, object_copy(obj));
}


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

x86 assembly (clang, -O2):
<tag_create_object>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <object_copy@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <tag_create_object_@plt>

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

LLVM IR (-O2):
%struct.tag = type { i32 }
define %struct.tag* @tag_create_object(i8* %0, i8* %1) {
%3 = tail call i32 @object_copy(i8* %1)
%4 = tail call %struct.tag* @tag_create_object_(i8* %0, i32 %3)
ret %struct.tag* %4
}
/* Variables and functions */
int /*<<< orphan*/ printCombi(char *);
int main() {
  char *str = "abc";
  printCombi(str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printCombi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printCombi@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
define i32 @main() {
%1 = tail call i32 @printCombi(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: ./demo <file.js>\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: ./demo <file.js>\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Usage: ./demo <file.js>\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
char *RevertString(char *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
void main() {
  char s[] = "Hello, World!";
  printf("%s \n", s);
  printf("%s \n", RevertString(s, 13));
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xeb9(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    -0xe(%rbp),%rdi
mov    $0xd,%esi
call   1040 <RevertString@plt>
mov    %rax,%rsi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movabs $0x21646c726f5720,%rax
mov    %rax,0xe(%rsp)
movabs $0x57202c6f6c6c6548,%rax
2c 20 57
mov    %rax,0x8(%rsp)
lea    0xeb2(%rip),%r14
lea    0x8(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1040 <RevertString@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s = [14 x i8] c"Hello, World!\00"
@.str = [5 x i8] c"%s \0A\00"
define void @main() {
%1 = alloca [14 x i8]
%2 = bitcast [14 x i8]* %1 to i8*
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%6 = call i8* @RevertString(i8* %5, i32 13)
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@__const.main.s = [14 x i8] c"Hello, World!\00"
@.str = [5 x i8] c"%s \0A\00"
define void @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i8* @RevertString(i8* %2, i32 13)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @getchar()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ __stdfix_sat_uhk(scalar_t__);
uint32_t __stdfix_sadd_uhk(uint32_t x, uint32_t y) {
  return (__stdfix_sat_uhk((uint32_t)x + (uint32_t)y));
}


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

x86 assembly (clang, -O2):
<__stdfix_sadd_uhk>:
add    %rsi,%rdi
jmp    1030 <__stdfix_sat_uhk@plt>

LLVM IR (-O0):
define i64 @__stdfix_sadd_uhk(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = call i64 @__stdfix_sat_uhk(i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @__stdfix_sadd_uhk(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = tail call i64 @__stdfix_sat_uhk(i64 %3)
ret i64 %4
}