xunge/DecIR huggingface dataset:
/* Variables and functions */
char *ConstantString(int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int const);
char *GetExceptionMessage(const int error_code) {
  return (ConstantString(strerror(error_code)));
}


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

x86 assembly (clang, -O2):
<GetExceptionMessage>:
push   %rax
call   1040 <strerror@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ConstantString@plt>

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

LLVM IR (-O2):
define i8* @GetExceptionMessage(i32 %0) {
%2 = tail call i32 @strerror(i32 %0)
%3 = tail call i8* @ConstantString(i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
scalar_t__ write(int /*<<< orphan*/, char *, int);
void linenoiseClearScreen(void) {
  if (write(STDOUT_FILENO, "\x1b\x63\x1b[H\x1b[2J", 9) <= 0) {
  }
}


x86 assembly (clang, -O0):
<linenoiseClearScreen>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
cmp    $0x0,%rax
jg     113d <linenoiseClearScreen+0x2d>
jmp    113d <linenoiseClearScreen+0x2d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<linenoiseClearScreen>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0x9,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [10 x i8] c"\1Bc\1B[H\1B[2J\00"
define void @linenoiseClearScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i64 @write(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = icmp sle i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [10 x i8] c"\1Bc\1B[H\1B[2J\00"
define void @linenoiseClearScreen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i64 @write(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
ret void
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char const *);
int stic_is_string_equal_i(const char *s1, const char *s2) {
  return strcasecmp(s1, s2) == 0;
}


x86 assembly (clang, -O0):
<stic_is_string_equal_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @stic_is_string_equal_i(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void ff_hevc_put_hevc_bi_qpel_hv24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv24_12_sse4() {
ret void
}
/* Variables and functions */
char *do_popen(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
char *which_command(char *execname) {
  char buffer[4096] = {0};
  snprintf(buffer, 4096, "which %s", execname);
  return do_popen(buffer);
}


x86 assembly (clang, -O0):
<which_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x1010(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1040 <memset@plt>
lea    -0x1010(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1000,%esi
lea    0xe97(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x1010(%rbp),%rdi
call   1050 <do_popen@plt>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<which_command>:
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    $0x1000,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0xeaa(%rip),%rdx
mov    %r14,%rdi
mov    $0x1000,%esi
mov    %rbx,%rcx
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1050 <do_popen@plt>
add    $0x1008,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"which %s\00"
define i8* @which_command(i8* %0) {
%2 = alloca i8*
%3 = alloca [4096 x i8]
store i8* %0, i8** %2
%4 = bitcast [4096 x i8]* %3 to i8*
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @snprintf(i8* %5, i32 4096, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%9 = call i8* @do_popen(i8* %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [9 x i8] c"which %s\00"
define i8* @which_command(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 4096, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i8* @do_popen(i8* %3)
ret i8* %5
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t reverseWord(int32_t abcd) {
  int32_t dcba = (abcd >> 24 & 0x000000ff | abcd >> 8 & 0x0000ff00 |
                  abcd << 24 & 0xff000000 | abcd << 8 & 0x00ff0000);
  return dcba;
}


x86 assembly (clang, -O0):
<reverseWord>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reverseWord(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 24
%6 = and i32 %5, 255
%7 = load i32, i32* %2
%8 = ashr i32 %7, 8
%9 = and i32 %8, 65280
%10 = or i32 %6, %9
%11 = load i32, i32* %2
%12 = shl i32 %11, 24
%13 = and i32 %12, -16777216
%14 = or i32 %10, %13
%15 = load i32, i32* %2
%16 = shl i32 %15, 8
%17 = and i32 %16, 16711680
%18 = or i32 %14, %17
store i32 %18, i32* %3
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @reverseWord(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
int test_imm_45uint8_mem(unsigned char *val) {
  return ((*val) & (0x45 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_45uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x45,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_45uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 69
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *pe_utils_str_inplace_ltrim(char *);
char *pe_utils_str_inplace_rtrim(char *);
char *pe_utils_str_inplace_trim(char *str) {
  char *ptr;
  ptr = pe_utils_str_inplace_ltrim(str);
  return pe_utils_str_inplace_rtrim(ptr);
}


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

x86 assembly (clang, -O2):
<pe_utils_str_inplace_trim>:
push   %rax
call   1030 <pe_utils_str_inplace_ltrim@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <pe_utils_str_inplace_rtrim@plt>

LLVM IR (-O0):
define i8* @pe_utils_str_inplace_trim(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @pe_utils_str_inplace_ltrim(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @pe_utils_str_inplace_rtrim(i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @pe_utils_str_inplace_trim(i8* %0) {
%2 = tail call i8* @pe_utils_str_inplace_ltrim(i8* %0)
%3 = tail call i8* @pe_utils_str_inplace_rtrim(i8* %2)
ret i8* %3
}
int scamper_getsrc_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @scamper_getsrc_init() {
ret i32 0
}
/* Variables and functions */
char *getenv(char *);
char *MR_GETENV(char *envstr) {
  char *env = getenv(envstr);
  if (!env)
    return "0";
  else
    return env;
}


x86 assembly (clang, -O0):
<MR_GETENV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1144 <MR_GETENV+0x34>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114c <MR_GETENV+0x3c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MR_GETENV>:
push   %rax
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee0(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define i8* @MR_GETENV(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %2
ret i8* %4
}
void f20(void) {
  int x = 1;
#pragma unused(x)
}


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

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

LLVM IR (-O0):
define void @f20() {
%1 = alloca i32
store i32 1, i32* %1
ret void
}

LLVM IR (-O2):
define void @f20() {
ret void
}
/* Variables and functions */
size_t exact_minmax_sym(int);
void call_exact_minmax_sym_Bad() {
  int x = 5;
  int a[x];
  a[exact_minmax_sym(x)] = 0;
}


x86 assembly (clang, -O0):
<call_exact_minmax_sym_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exact_minmax_sym@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_exact_minmax_sym_Bad>:
mov    $0x5,%edi
jmp    1030 <exact_minmax_sym@plt>

LLVM IR (-O0):
define void @call_exact_minmax_sym_Bad() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 5, i32* %1
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %2
%7 = alloca i32, i64 %5
store i64 %5, i64* %3
%8 = load i32, i32* %1
%9 = call i64 @exact_minmax_sym(i32 %8)
%10 = getelementptr inbounds i32, i32* %7, i64 %9
store i32 0, i32* %10
%11 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @call_exact_minmax_sym_Bad() {
%1 = tail call i64 @exact_minmax_sym(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leftDropAtPos(int);
int /*<<< orphan*/ writeDebugStreamLine(char *);
void leftOuterCrate2() {
  writeDebugStreamLine("Crate 2");
  leftDropAtPos(1);
}


x86 assembly (clang, -O0):
<leftOuterCrate2>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
mov    $0x1,%edi
call   1030 <leftDropAtPos@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftOuterCrate2>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <writeDebugStreamLine@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <leftDropAtPos@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Crate 2\00"
define void @leftOuterCrate2() {
%1 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @leftDropAtPos(i32 1)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Crate 2\00"
define void @leftOuterCrate2() {
%1 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @leftDropAtPos(i32 1)
ret void
}
void TimerEnable(unsigned long ulBase, unsigned long ulTimer) {
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x0000000C))) |=
      ulTimer & (0x00000001 | 0x00000100);
}


x86 assembly (clang, -O0):
<TimerEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
and    $0x101,%rdx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerEnable>:
and    $0x101,%esi
or     %rsi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @TimerEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 257
%7 = load i64, i64* %3
%8 = add i64 %7, 12
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = or i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @TimerEnable(i64 %0, i64 %1) {
%3 = and i64 %1, 257
%4 = add i64 %0, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
int x1(int x) { return (x + 1) > x; }


x86 assembly (clang, -O0):
<x1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    -0x4(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @x1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @x1(i32 %0) {
ret i32 1
}
unsigned long _probing(unsigned long hash, unsigned long shift) {
  return hash + shift * shift + 3L * shift;
}


x86 assembly (clang, -O0):
<_probing>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   -0x10(%rbp),%rcx
add    %rcx,%rax
imul   $0x3,-0x10(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_probing>:
lea    0x3(%rsi),%rax
imul   %rsi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @_probing(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 = load i64, i64* %4
%8 = mul i64 %6, %7
%9 = add i64 %5, %8
%10 = load i64, i64* %4
%11 = mul i64 3, %10
%12 = add i64 %9, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @_probing(i64 %0, i64 %1) {
%3 = add i64 %1, 3
%4 = mul i64 %3, %1
%5 = add i64 %4, %0
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
__attribute__((no)) void big(void) {
  volatile char c[200000];
  if (c[200000 - 1])
    fprintf(stderr, "Accessing fresh %s\n", "stack");
  else
    fprintf(stderr, "Accessing %s stack\n", "fresh");
}


x86 assembly (clang, -O0):
<big>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30d40,%rsp
mov    -0x1(%rbp),%al
cmp    $0x0,%al
je     1147 <big+0x37>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
lea    0xed7(%rip),%rdx
call   1030 <fprintf@plt>
jmp    1163 <big+0x53>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
lea    0xed0(%rip),%rdx
call   1030 <fprintf@plt>
add    $0x30d40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big>:
cmpb   $0x0,-0x1(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
je     1133 <big+0x23>
lea    0xed9(%rip),%rsi
lea    0xee6(%rip),%rdx
jmp    1030 <fprintf@plt>
lea    0xee0(%rip),%rsi
lea    0xeed(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Accessing fresh %s\0A\00"
@.str.1 = [6 x i8] c"stack\00"
@.str.2 = [20 x i8] c"Accessing %s stack\0A\00"
@.str.3 = [6 x i8] c"fresh\00"
define void @big() {
%1 = alloca [200000 x i8]
%2 = getelementptr inbounds [200000 x i8], [200000 x i8]* %1, i64 0, i64 199999
%3 = load volatile i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %0
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Accessing fresh %s\0A\00"
@.str.1 = [6 x i8] c"stack\00"
@.str.2 = [20 x i8] c"Accessing %s stack\0A\00"
@.str.3 = [6 x i8] c"fresh\00"
define void @big() {
%1 = alloca i8
%2 = load volatile i8, i8* %1
%3 = icmp eq i8 %2, 0
%4 = load i32, i32* @stderr
br i1 %3, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}
void arithmetic_init_sizeof(void) { int x = sizeof(int); }


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

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

LLVM IR (-O0):
define void @arithmetic_init_sizeof() {
%1 = alloca i32
store i32 4, i32* %1
ret void
}

LLVM IR (-O2):
define void @arithmetic_init_sizeof() {
ret void
}
char *str_strip_lead_space(str)
char *str;
{
  int i;
  for (i = 0; isspace(str[i]); i++)
    ;
  return str + i;
}


x86 assembly (clang, -O0):
<str_strip_lead_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
je     1150 <str_strip_lead_space+0x40>
jmp    1142 <str_strip_lead_space+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <str_strip_lead_space+0x13>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_strip_lead_space>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffffffffffff,%rbx
xchg   %ax,%ax
movsbl 0x1(%r14,%rbx,1),%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <str_strip_lead_space+0x10>
mov    %ebx,%eax
add    %rax,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @str_strip_lead_space(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %9, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = tail call i32 @isspace(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = add nuw i64 %3, 1
br i1 %8, label %10, label %2
10: ; preds = %2
%11 = and i64 %3, 4294967295
%12 = getelementptr inbounds i8, i8* %0, i64 %11
ret i8* %12
}
/* Variables and functions */
double const cos(int);
double OmegaNNN(const double k, const double eta) {
  return 1 - cos(6.283185307179586476925 * k) -
         eta * cos(2 * 6.283185307179586476925 * k);
}


x86 assembly (clang, -O0):
<OmegaNNN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xee6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xec5(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OmegaNNN>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,(%rsp)
movsd  0xed9(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <cos@plt>
movsd  0xecc(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xebd(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @OmegaNNN(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fmul double 0x401921FB54442D18, %5
%7 = fptosi double %6 to i32
%8 = call double @cos(i32 %7)
%9 = fsub double 1.000000e+00, %8
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fmul double 0x402921FB54442D18, %11
%13 = fptosi double %12 to i32
%14 = call double @cos(i32 %13)
%15 = fneg double %10
%16 = call double @llvm.fmuladd.f64(double %15, double %14, double %9)
ret double %16
}

LLVM IR (-O2):
define double @OmegaNNN(double %0, double %1) {
%3 = fmul double %0, 0x401921FB54442D18
%4 = fptosi double %3 to i32
%5 = tail call double @cos(i32 %4)
%6 = fsub double 1.000000e+00, %5
%7 = fmul double %0, 0x402921FB54442D18
%8 = fptosi double %7 to i32
%9 = tail call double @cos(i32 %8)
%10 = fneg double %1
%11 = tail call double @llvm.fmuladd.f64(double %10, double %9, double %6)
ret double %11
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ prg32setBank0(int);
void m140_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  chr8setBank0((val & 0xF) << 13);
  prg32setBank0(((val >> 4) & 3) << 15);
}


x86 assembly (clang, -O0):
<m140_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0xf,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
and    $0x3,%edi
shl    $0xf,%edi
call   1030 <prg32setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m140_setParams>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0xf,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
and    $0x30,%ebx
shl    $0xb,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <prg32setBank0@plt>

LLVM IR (-O0):
define void @m140_setParams(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 = and i32 %6, 15
%8 = shl i32 %7, 13
%9 = call i32 @chr8setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = ashr i32 %10, 4
%12 = and i32 %11, 3
%13 = shl i32 %12, 15
%14 = call i32 @prg32setBank0(i32 %13)
ret void
}

LLVM IR (-O2):
define void @m140_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 13
%4 = and i32 %3, 122880
%5 = tail call i32 @chr8setBank0(i32 %4)
%6 = shl i32 %1, 11
%7 = and i32 %6, 98304
%8 = tail call i32 @prg32setBank0(i32 %7)
ret void
}
void decrypt(char message[], int key) {}


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

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

LLVM IR (-O0):
define void @decrypt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @decrypt(i8* nocapture %0, i32 %1) {
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  unsigned int i;
  i = 0;
  if (!s)
    return;
  while (s[i]) {
    f(i, &(s[i]));
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1127 <ft_striteri+0x27>
jmp    115e <ft_striteri+0x5e>
jmp    112c <ft_striteri+0x2c>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     115e <ft_striteri+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%ecx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112c <ft_striteri+0x2c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1133 <ft_striteri+0x33>
mov    %rdi,%r15
cmpb   $0x0,(%rdi)
je     1133 <ft_striteri+0x33>
mov    %rsi,%r14
xor    %ebx,%ebx
mov    %r15,%rsi
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   *%r14
add    $0x1,%ebx
lea    (%r15,%rbx,1),%rsi
cmpb   $0x0,(%r15,%rbx,1)
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* nocapture %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %4, %7
%8 = phi i8* [ %12, %7 ], [ %0, %4 ]
%9 = phi i32 [ %10, %7 ], [ 0, %4 ]
tail call void %1(i32 %9, i8* %8)
%10 = add i32 %9, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %7
15: ; preds = %7, %4, %2
ret void
}
void imageSystemFinalize() {}


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

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

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

LLVM IR (-O2):
define void @imageSystemFinalize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x6f() {
  Assert_real((islower(111)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              560, ("islower should be 1 for o"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x6f>:
push   %rax
mov    $0x6f,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x230,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for o\00"
define void @t_islower_0x6f() {
%1 = call i32 @islower(i32 111)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 560, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for o\00"
define void @t_islower_0x6f() {
%1 = tail call i32 @islower(i32 111)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RunAllEqualsTests();
int /*<<< orphan*/ RunWildcardParsingTests();
int /*<<< orphan*/ printf(char *);
void RunAllTests() {
  RunWildcardParsingTests();
  RunAllEqualsTests();
  printf("\nPassed all wildcard tests. \n");
}


x86 assembly (clang, -O0):
<RunAllTests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <RunWildcardParsingTests@plt>
mov    $0x0,%al
call   1030 <RunAllEqualsTests@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunAllTests>:
push   %rax
xor    %eax,%eax
call   1050 <RunWildcardParsingTests@plt>
xor    %eax,%eax
call   1040 <RunAllEqualsTests@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"\0APassed all wildcard tests. \0A\00"
define void @RunAllTests() {
%1 = call i32 (...) @RunWildcardParsingTests()
%2 = call i32 (...) @RunAllEqualsTests()
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"\0APassed all wildcard tests. \00"
define void @RunAllTests() {
%1 = tail call i32 (...) @RunWildcardParsingTests()
%2 = tail call i32 (...) @RunAllEqualsTests()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long resourceid;
};
typedef TYPE_1__ XErrorEvent;

/* Variables and functions */
void set_XErrorEvent_resourceid(void *_p, unsigned long _v) {
  ((XErrorEvent *)_p)->resourceid = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XErrorEvent_resourceid>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XErrorEvent_resourceid(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XErrorEvent_resourceid(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1(int, int, int);
void f2(void) { f1(1, 2, 3); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <f1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
jmp    1030 <f1@plt>

LLVM IR (-O0):
define void @f2() {
%1 = call i32 @f1(i32 1, i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32 @f1(i32 1, i32 2, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ net_send(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
void irc_join(char *channel) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s", "JOIN", channel);
  net_send(msg);
}


x86 assembly (clang, -O0):
<irc_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    $0x1fd,%esi
lea    0xeba(%rip),%rdx
lea    0xeb9(%rip),%rcx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <net_send@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_join>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%r8
lea    0xece(%rip),%rdx
lea    0xecd(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <net_send@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [5 x i8] c"JOIN\00"
define void @irc_join(i8* %0) {
%2 = alloca i8*
%3 = alloca [509 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 509, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%8 = call i32 @net_send(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [5 x i8] c"JOIN\00"
define void @irc_join(i8* %0) {
%2 = alloca [509 x i8]
%3 = getelementptr inbounds [509 x i8], [509 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 509, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = call i32 @net_send(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_sigs_test();
int /*<<< orphan*/ random_sigs_test();
int main(int argc, char *argv[]) {
  random_sigs_test();
  invalid_sigs_test();
  return 0;
}


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   1030 <random_sigs_test@plt>
mov    $0x0,%al
call   1040 <invalid_sigs_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <random_sigs_test@plt>
xor    %eax,%eax
call   1040 <invalid_sigs_test@plt>
xor    %eax,%eax
pop    %rcx
ret

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 (...) @random_sigs_test()
%7 = call i32 (...) @invalid_sigs_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @random_sigs_test()
%4 = tail call i32 (...) @invalid_sigs_test()
ret i32 0
}
int fn1(int p1) { return p1; }


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

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

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

LLVM IR (-O2):
define i32 @fn1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int, int);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void emit_writebyte_imm(int imm, int addr) {
  assem_debug("movb $%x,%x\n", imm, addr);
  assert(0);
}


x86 assembly (clang, -O0):
<emit_writebyte_imm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec5(%rip),%rdi
call   1030 <assem_debug@plt>
xor    %edi,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_writebyte_imm>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xed4(%rip),%rdi
call   1030 <assem_debug@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"movb $%x,%x\0A\00"
define void @emit_writebyte_imm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @assem_debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"movb $%x,%x\0A\00"
define void @emit_writebyte_imm(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%4 = tail call i32 @assert(i32 0)
ret void
}
void hal_soft_serial_init(void) {}


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

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

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

LLVM IR (-O2):
define void @hal_soft_serial_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ piece_set_character(int, char **);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc == 1) {
    fprintf(stderr, "Usage: piece_set_character.e "
                    "piece_offset,char,position,[left][right] ...\n");
    exit(1);
  }
  piece_set_character(argc, argv);
  return 0;
}


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)
cmpl   $0x1,-0x8(%rbp)
jne    116f <main+0x3f>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <piece_set_character@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
je     113f <main+0xf>
call   1030 <piece_set_character@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: piece_set_character.e piece_offset,char,position,[left][right] ...\0A\00"
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 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @piece_set_character(i32 %13, i8** %14)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: piece_set_character.e piece_offset,char,position,[left][right] ...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = tail call i32 @piece_set_character(i32 %0, i8** %1)
ret i32 0
}
__attribute__((always_)) void
check_trace_callback_type_mm_page_alloc_zone_locked(void (*cb)(
    void *__data, struct page *page, unsigned int order, int migratetype)) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @check_trace_callback_type_mm_page_alloc_zone_locked(void (i8*, %struct.page*, i32, i32)* %0) {
%2 = alloca void (i8*, %struct.page*, i32, i32)*
store void (i8*, %struct.page*, i32, i32)* %0, void (i8*, %struct.page*, i32, i32)** %2
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @check_trace_callback_type_mm_page_alloc_zone_locked(void (i8*, %struct.page*, i32, i32)* nocapture %0) {
ret void
}
void reinv_str(unsigned char *p, unsigned char *r) {
  while (p < r) {
    unsigned char t = *p;
    *p++ = (unsigned char)*r;
    *r-- = (unsigned char)t;
  }
}


x86 assembly (clang, -O0):
<reinv_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1153 <reinv_str+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    110c <reinv_str+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reinv_str>:
cmp    %rsi,%rdi
jae    112c <reinv_str+0x2c>
add    $0xffffffffffffffff,%rsi
nopl   0x0(%rax)
movzbl (%rdi),%eax
movzbl 0x1(%rsi),%ecx
mov    %cl,(%rdi)
add    $0x1,%rdi
mov    %al,0x1(%rsi)
lea    -0x1(%rsi),%rax
cmp    %rsi,%rdi
mov    %rax,%rsi
jb     1110 <reinv_str+0x10>
ret

LLVM IR (-O0):
define void @reinv_str(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %10, %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = icmp ult i8* %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
store i8 %12, i8* %5
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
store i8 %14, i8* %15
%17 = load i8, i8* %5
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 -1
store i8* %19, i8** %4
store i8 %17, i8* %18
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @reinv_str(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i8* [ %9, %4 ], [ %0, %2 ]
%6 = phi i8* [ %10, %4 ], [ %1, %2 ]
%7 = load i8, i8* %5
%8 = load i8, i8* %6
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %8, i8* %5
%10 = getelementptr inbounds i8, i8* %6, i64 -1
store i8 %7, i8* %6
%11 = icmp ult i8* %9, %10
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void terminate() { exit(0); }


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<terminate>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @terminate() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @terminate() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int f327(int *);
int f328(int *p) { return f327(p); }


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

x86 assembly (clang, -O2):
<f328>:
jmp    1030 <f327@plt>

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

LLVM IR (-O2):
define i32 @f328(i32* %0) {
%2 = tail call i32 @f327(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x9a() {
  Assert_real((islower(154) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              775, ("islower should be 0 for 0x9a"));
}


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

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

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

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