xunge/DecIR huggingface dataset:
/* Variables and functions */
int GET32(int);
int /*<<< orphan*/ PUT32(int, unsigned int);
void uart_send(unsigned int c) {
  while (1) {
    if (GET32((0x3F000000 + 0x00215054)) & 0x20)
      break;
  }
  PUT32((0x3F000000 + 0x00215040), c);
}


x86 assembly (clang, -O0):
<uart_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x3f215054,%edi
call   1040 <GET32@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     1146 <uart_send+0x26>
jmp    114b <uart_send+0x2b>
jmp    112b <uart_send+0xb>
mov    -0x4(%rbp),%esi
mov    $0x3f215040,%edi
call   1030 <PUT32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_send>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3f215054,%edi
call   1040 <GET32@plt>
test   $0x20,%al
je     1130 <uart_send+0x10>
mov    $0x3f215040,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <PUT32@plt>

LLVM IR (-O0):
define void @uart_send(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %8
%4 = call i32 @GET32(i32 1059147860)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %9
8: ; preds = %3
br label %3
9: ; preds = %7
%10 = load i32, i32* %2
%11 = call i32 @PUT32(i32 1059147840, i32 %10)
ret void
}

LLVM IR (-O2):
define void @uart_send(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @GET32(i32 1059147860)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @PUT32(i32 1059147840, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fopen(char *, char *);
int main(void) { fopen("tata", "r"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <fopen@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"tata\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = tail call i32 @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void InitSMLLink() {}


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

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

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

LLVM IR (-O2):
define void @InitSMLLink() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *, char *);
char *strerror(int /*<<< orphan*/);
void print_error(void) {
  printf("Problem connecting socket: %s\n", strerror(errno));
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %rax,%rsi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Problem connecting socket: %s\0A\00"
@errno = global i32 0
define void @print_error() {
%1 = load i32, i32* @errno
%2 = call i8* @strerror(i32 %1)
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Problem connecting socket: %s\0A\00"
@errno = global i32 0
define void @print_error() {
%1 = load i32, i32* @errno
%2 = tail call i8* @strerror(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xab() {
  Assert_real((isspace(171) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              860, ("isspace should be 0 for 0xab"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xab\00"
define void @t_isspace_0xab() {
%1 = call i64 @isspace(i32 171)
%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 860, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xab\00"
define void @t_isspace_0xab() {
%1 = tail call i64 @isspace(i32 171)
%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 860, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void __attribute__((no)) baz(void) {
  bar();
  printf("%s\n", __func__);
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <bar@plt>
lea    0xece(%rip),%rdi
lea    0xecb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
push   %rax
xor    %eax,%eax
call   1040 <bar@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.baz = [4 x i8] c"baz\00"
define void @baz() {
%1 = call i32 (...) @bar()
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.baz, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.baz = [4 x i8] c"baz\00"
define void @baz() {
%1 = tail call i32 (...) @bar()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.baz, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ LOG_NOTICE;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ skeleton_daemon();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
int main() {
  skeleton_daemon();
  syslog(LOG_NOTICE, "First daemon started.");
  while (1) {
    syslog(LOG_NOTICE, "daemon working");
    sleep(4);
  }
  syslog(LOG_NOTICE, "First daemon terminated.");
  closelog();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <skeleton_daemon@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1040 <syslog@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1040 <syslog@plt>
mov    $0x4,%edi
call   1050 <sleep@plt>
jmp    115b <main+0x2b>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <skeleton_daemon@plt>
mov    0x2e9e(%rip),%r14
mov    (%r14),%edi
lea    0xeb4(%rip),%rsi
call   1040 <syslog@plt>
lea    0xebe(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%r14),%edi
mov    %rbx,%rsi
call   1040 <syslog@plt>
mov    $0x4,%edi
call   1050 <sleep@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@LOG_NOTICE = global i32 0
@.str = [22 x i8] c"First daemon started.\00"
@.str.1 = [15 x i8] c"daemon working\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @skeleton_daemon()
%3 = load i32, i32* @LOG_NOTICE
%4 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0, %5
%6 = load i32, i32* @LOG_NOTICE
%7 = call i32 @syslog(i32 %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @sleep(i32 4)
br label %5
}

LLVM IR (-O2):
@LOG_NOTICE = global i32 0
@.str = [22 x i8] c"First daemon started.\00"
@.str.1 = [15 x i8] c"daemon working\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @skeleton_daemon()
%2 = load i32, i32* @LOG_NOTICE
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
%5 = load i32, i32* @LOG_NOTICE
%6 = tail call i32 @syslog(i32 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @sleep(i32 4)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_reg32_preg64x4pimm32(int reg1, int reg2, unsigned int imm32) {
  put8(0x8B);
  put8((reg1 << 3) | 4);
  put8(0x80 | (reg2 << 3) | 5);
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_reg32_preg64x4pimm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x8b,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0x4,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     $0x80,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_reg32_preg64x4pimm32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x8b,%edi
call   1030 <put8@plt>
lea    0x4(,%rbx,8),%edi
call   1030 <put8@plt>
shl    $0x3,%ebp
or     $0x85,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_reg32_preg64x4pimm32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @put8(i32 139)
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
%10 = or i32 %9, 4
%11 = call i32 @put8(i32 %10)
%12 = load i32, i32* %5
%13 = shl i32 %12, 3
%14 = or i32 128, %13
%15 = or i32 %14, 5
%16 = call i32 @put8(i32 %15)
%17 = load i32, i32* %6
%18 = call i32 @put32(i32 %17)
ret void
}

LLVM IR (-O2):
define void @mov_reg32_preg64x4pimm32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 139)
%5 = shl i32 %0, 3
%6 = or i32 %5, 4
%7 = tail call i32 @put8(i32 %6)
%8 = shl i32 %1, 3
%9 = or i32 %8, 133
%10 = tail call i32 @put8(i32 %9)
%11 = tail call i32 @put32(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *tracefs__mountpoint();
bool tracefs__configured(void) { return tracefs__mountpoint() != NULL; }


x86 assembly (clang, -O0):
<tracefs__configured>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tracefs__mountpoint@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracefs__configured>:
push   %rax
xor    %eax,%eax
call   1030 <tracefs__mountpoint@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tracefs__configured() {
%1 = call i32* (...) @tracefs__mountpoint()
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @tracefs__configured() {
%1 = tail call i32* (...) @tracefs__mountpoint()
%2 = icmp ne i32* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}
int test_imm_5Cuint8_reg(unsigned char val) {
  return ((val) & (-0x5C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Cuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffa4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_5Cuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -92
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ int_fast64_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_int_fast64_t(int_fast64_t const k1,
                                           int_fast64_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_int_fast64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_int_fast64_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_int_fast64_t(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 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_int_fast64_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int ppm_parsecolor(char *colorname, int maxval) {
  int hexit[256], i;
  int p;
  return p;
}


x86 assembly (clang, -O0):
<ppm_parsecolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3a0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x418(%rbp),%eax
add    $0x3a0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ppm_parsecolor(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [256 x i32]
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ppm_parsecolor(i8* nocapture readnone %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x7e() {
  Assert_real((isalpha(126) == 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_isalpha.c",
              635, ("isalpha should be 0 for ~"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x7e>:
push   %rax
mov    $0x7e,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x27b,%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 0 for ~\00"
define void @t_isalpha_0x7e() {
%1 = call i64 @isalpha(i32 126)
%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 635, 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 0 for ~\00"
define void @t_isalpha_0x7e() {
%1 = tail call i64 @isalpha(i32 126)
%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 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s [chomp [n]]\n", argv0);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s [chomp [n]]\0A\00"
define void @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 ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

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


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_args(char *, int);
int gen_actual_args(char *dirname) {
  gen_args(dirname, 2);
  return (0);
}


x86 assembly (clang, -O0):
<gen_actual_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <gen_args@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_actual_args>:
push   %rax
mov    $0x2,%esi
call   1030 <gen_args@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gen_actual_args(i8* %0) {
%2 = tail call i32 @gen_args(i8* %0, i32 2)
ret i32 0
}
int check_i_islarger(int i) {
  static int last_i;
  int islarger;
  if (i == 1)
    last_i = 0;
  islarger = ((i >= last_i) && (i - last_i <= 1));
  last_i = i;
  return (islarger);
}


x86 assembly (clang, -O0):
<check_i_islarger>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111b <check_i_islarger+0x1b>
movl   $0x0,0x2f09(%rip)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    0x2efe(%rip),%ecx
mov    %al,-0x9(%rbp)
jl     1141 <check_i_islarger+0x41>
mov    -0x4(%rbp),%eax
sub    0x2eec(%rip),%eax
cmp    $0x1,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,0x2ecf(%rip)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_i_islarger>:
xor    %eax,%eax
cmp    $0x1,%edi
je     110d <check_i_islarger+0xd>
mov    0x2f17(%rip),%eax
mov    %edi,%ecx
sub    %eax,%ecx
setge  %al
cmp    $0x2,%ecx
setl   %cl
and    %al,%cl
movzbl %cl,%eax
mov    %edi,0x2eff(%rip)
ret

LLVM IR (-O0):
@check_i_islarger.last_i = internal global i32 0
define i32 @check_i_islarger(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* @check_i_islarger.last_i
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
%9 = load i32, i32* @check_i_islarger.last_i
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* @check_i_islarger.last_i
%14 = sub nsw i32 %12, %13
%15 = icmp sle i32 %14, 1
br label %16
16: ; preds = %11, %7
%17 = phi i1 [ false, %7 ], [ %15, %11 ]
%18 = zext i1 %17 to i32
store i32 %18, i32* %3
%19 = load i32, i32* %2
store i32 %19, i32* @check_i_islarger.last_i
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@check_i_islarger.last_i = internal unnamed_addr global i32 0
define i32 @check_i_islarger(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = load i32, i32* @check_i_islarger.last_i
%4 = select i1 %2, i32 0, i32 %3
%5 = icmp sle i32 %4, %0
%6 = sub nsw i32 %0, %4
%7 = icmp slt i32 %6, 2
%8 = select i1 %5, i1 %7, i1 false
%9 = zext i1 %8 to i32
store i32 %0, i32* @check_i_islarger.last_i
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xfocus;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xfocus_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xfocus.window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xfocus_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xfocus_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
OPHANDLER(ret) { POP_PC(); }


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

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

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

LLVM IR (-O2):
define i32 @OPHANDLER(i32 %0) {
%2 = tail call i32 (...) @POP_PC()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ dot(double *, int, int, double *);
double sqrt(int /*<<< orphan*/);
double norm(double *vec, int beg, int end) {
  return (sqrt(dot(vec, beg, end, vec)));
}


x86 assembly (clang, -O0):
<norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rcx
call   1030 <dot@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm>:
push   %rax
mov    %rdi,%rcx
call   1030 <dot@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @norm(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load double*, double** %4
%11 = call i32 @dot(double* %7, i32 %8, i32 %9, double* %10)
%12 = call double @sqrt(i32 %11)
ret double %12
}

LLVM IR (-O2):
define double @norm(double* %0, i32 %1, i32 %2) {
%4 = tail call i32 @dot(double* %0, i32 %1, i32 %2, double* %0)
%5 = tail call double @sqrt(i32 %4)
ret double %5
}
/* Variables and functions */
int equal(char *, char *);
int /*<<< orphan*/ reverse(char *);
int test_reverse_empty() {
  char string[] = "";
  reverse(string);
  return equal("", string);
}


x86 assembly (clang, -O0):
<test_reverse_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <memset@plt>
lea    -0x1(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x1(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1050 <equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reverse_empty>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <reverse@plt>
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
call   1040 <equal@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @test_reverse_empty() {
%1 = alloca [1 x i8]
%2 = bitcast [1 x i8]* %1 to i8*
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%4 = call i32 @reverse(i8* %3)
%5 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%6 = call i32 @equal(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @test_reverse_empty() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = call i32 @reverse(i8* %2)
%4 = call i32 @equal(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ csc_cfg_format_directory(char *);
char *csc_strcpy_alloc(char *, int /*<<< orphan*/);
char *csc_cfg_format_dir_alloc(char *dkey) {
  char *dbuf;
  if ((dbuf = csc_strcpy_alloc(dkey, 0)) != NULL) {
    csc_cfg_format_directory(dbuf);
  }
  return dbuf;
}


x86 assembly (clang, -O0):
<csc_cfg_format_dir_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <csc_strcpy_alloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     114e <csc_cfg_format_dir_alloc+0x2e>
mov    -0x10(%rbp),%rdi
call   1040 <csc_cfg_format_directory@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csc_cfg_format_dir_alloc>:
push   %rbx
xor    %esi,%esi
call   1030 <csc_strcpy_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1138 <csc_cfg_format_dir_alloc+0x18>
mov    %rbx,%rdi
call   1040 <csc_cfg_format_directory@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @csc_cfg_format_dir_alloc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @csc_strcpy_alloc(i8* %4, i32 0)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @csc_cfg_format_directory(i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @csc_cfg_format_dir_alloc(i8* %0) {
%2 = tail call i8* @csc_strcpy_alloc(i8* %0, i32 0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @csc_cfg_format_directory(i8* %2)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int HASHTAB_STRKEYHSH(void *key) {
  int i;
  unsigned char *s = (unsigned char *)key;
  int sum = 0;
  for (i = 0; s[i] != '\0'; i++) {
    sum += s[i];
  }
  return sum;
}


x86 assembly (clang, -O0):
<HASHTAB_STRKEYHSH>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1153 <HASHTAB_STRKEYHSH+0x53>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111e <HASHTAB_STRKEYHSH+0x1e>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HASHTAB_STRKEYHSH>:
mov    (%rdi),%cl
test   %cl,%cl
je     1121 <HASHTAB_STRKEYHSH+0x21>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <HASHTAB_STRKEYHSH+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @HASHTAB_STRKEYHSH(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i8 [ %12, %4 ], [ %2, %1 ]
%7 = phi i32 [ %9, %4 ], [ 0, %1 ]
%8 = zext i8 %6 to i32
%9 = add nuw nsw i32 %7, %8
%10 = add nuw nsw i64 %5, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ swap(int /*<<< orphan*/ *);
uint32_t ntohl(uint32_t netint) {
  swap(&netint);
  return netint;
}


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

x86 assembly (clang, -O2):
<ntohl>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <swap@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ntohl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @swap(i32* %2)
%4 = load i32, i32* %2
ret i32 %4
}
/* Type definitions */
struct assembler {
  int dummy;
};

/* Variables and functions */
int skip_chars(struct assembler *, char *);
int skip_all_whitespaces(struct assembler *a) { return skip_chars(a, " \t\n"); }


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

x86 assembly (clang, -O2):
<skip_all_whitespaces>:
lea    0xee9(%rip),%rsi
jmp    1030 <skip_chars@plt>

LLVM IR (-O0):
%struct.assembler = type { i32 }
@.str = [4 x i8] c" \09\0A\00"
define i32 @skip_all_whitespaces(%struct.assembler* %0) {
%2 = alloca %struct.assembler*
store %struct.assembler* %0, %struct.assembler** %2
%3 = load %struct.assembler*, %struct.assembler** %2
%4 = call i32 @skip_chars(%struct.assembler* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.assembler = type { i32 }
@.str = [4 x i8] c" \09\0A\00"
define i32 @skip_all_whitespaces(%struct.assembler* %0) {
%2 = tail call i32 @skip_chars(%struct.assembler* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(char *, int, int, int /*<<< orphan*/ *);
int dtm_write_raw_header_to_file(FILE *dest_file, char *raw_data) {
  int written;
  written = fwrite(raw_data, sizeof(char), 256, dest_file);
  return written == 256 ? 0 : -1;
}


x86 assembly (clang, -O0):
<dtm_write_raw_header_to_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x100,%edx
call   1030 <fwrite@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x100,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtm_write_raw_header_to_file>:
push   %rax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
mov    $0x100,%edx
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    $0x100,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dtm_write_raw_header_to_file(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i32*, i32** %3
%8 = call i32 @fwrite(i8* %6, i32 1, i32 256, i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 256
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 0, i32 -1
ret i32 %12
}

LLVM IR (-O2):
define i32 @dtm_write_raw_header_to_file(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fwrite(i8* %1, i32 1, i32 256, i32* %0)
%4 = icmp ne i32 %3, 256
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int chk_int(char *name, int ierr) {
#pragma xmp nodes p[*]
#pragma xmp task on p[0]
  {
    if (ierr == 0) {
      printf("PASS %s\n", name);
    } else {
      printf("ERROR\n");
      exit(1);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<chk_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1150 <chk_int+0x30>
mov    -0x8(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1168 <chk_int+0x48>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_int>:
push   %rax
test   %esi,%esi
jne    114d <chk_int+0x1d>
mov    %rdi,%rax
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"PASS %s\0A\00"
@.str.1 = [7 x i8] c"ERROR\0A\00"
define i32 @chk_int(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 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %13
10: ; preds = %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"PASS %s\0A\00"
@str = [6 x i8] c"ERROR\00"
define i32 @chk_int(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
}
__attribute__((no)) unsigned long long di_sll(unsigned long long x) {
  return (x << 1);
}


x86 assembly (clang, -O0):
<di_sll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @di_sll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 1
ret i64 %4
}

LLVM IR (-O2):
define i64 @di_sll(i64 %0) {
%2 = shl i64 %0, 1
ret i64 %2
}
cant(f) char *f;
{
  perror(f);
  term(0);
}


x86 assembly (clang, -O0):
<cant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1030 <term@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cant>:
push   %rax
xor    %eax,%eax
call   1040 <perror@plt>
xor    %edi,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <term@plt>

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

LLVM IR (-O2):
define i32 @cant(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @term to i32 (i32, ...)*)(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ deepInspect(int, int);
void inspect(int op) { deepInspect(op, 1); }


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

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

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

LLVM IR (-O2):
define void @inspect(i32 %0) {
%2 = tail call i32 @deepInspect(i32 %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_FLASH_OUT_PIN() { set_io_bit(0x34, 7); }


x86 assembly (clang, -O0):
<TOSH_SET_FLASH_OUT_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
mov    $0x7,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_FLASH_OUT_PIN>:
mov    $0x34,%edi
mov    $0x7,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_FLASH_OUT_PIN() {
%1 = call i32 @set_io_bit(i32 52, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_FLASH_OUT_PIN() {
%1 = tail call i32 @set_io_bit(i32 52, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x6a() {
  Assert_real((isgraph(106)),
              "/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_isgraph.c",
              535, ("isgraph should be 1 for j"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x6a>:
push   %rax
mov    $0x6a,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x217,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for j\00"
define void @t_isgraph_0x6a() {
%1 = call i32 @isgraph(i32 106)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 535, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for j\00"
define void @t_isgraph_0x6a() {
%1 = tail call i32 @isgraph(i32 106)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 535, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int _lseek_r(struct _reent *r, int file, int ptr, int dir) {
  (void)r;
  (void)file;
  (void)ptr;
  (void)dir;
  return 0;
}


x86 assembly (clang, -O0):
<_lseek_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type opaque
define i32 @_lseek_r(%struct._reent* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct._reent*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct._reent* %0, %struct._reent** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct._reent*, %struct._reent** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_lseek_r(%struct._reent* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
void ff_hevc_put_hevc_bi_w_qpel_hv48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_hv48_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __cpuid(unsigned int *, unsigned int *, unsigned int *,
                           unsigned int *);
void cpuid_count(unsigned int op, int count, unsigned int *eax,
                 unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
  *eax = op;
  *ecx = count;
  __cpuid(eax, ebx, ecx, edx);
}


x86 assembly (clang, -O0):
<cpuid_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1030 <__cpuid@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_count>:
mov    %edi,(%rdx)
mov    %esi,(%r8)
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r9,%rcx
jmp    1030 <__cpuid@plt>

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

LLVM IR (-O2):
define void @cpuid_count(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4, i32* %5) {
store i32 %0, i32* %2
store i32 %1, i32* %4
%7 = tail call i32 @__cpuid(i32* %2, i32* %3, i32* %4, i32* %5)
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn99() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn99");
  return result;
}


x86 assembly (clang, -O0):
<fn99>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn99>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn99\00"
define i8* @fn99() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn99\00"
define i8* @fn99() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}