xunge/DecIR huggingface dataset:
int is_blank(char c) { return (c == 9) || (c == 32); }


x86 assembly (clang, -O0):
<is_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_blank+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank>:
cmp    $0x9,%dil
sete   %al
cmp    $0x20,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_blank(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 9
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 32
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_blank(i8 signext %0) {
%2 = icmp eq i8 %0, 9
%3 = icmp eq i8 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void warning_callback(const char *msg, void *client_data) {
  FILE *stream = (FILE *)client_data;
  fprintf(stream, "[WARNING] %s", msg);
}


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

x86 assembly (clang, -O2):
<warning_callback>:
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"[WARNING] %s\00"
define void @warning_callback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %3
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[WARNING] %s\00"
define void @warning_callback(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ bpa_up();
scalar_t__ eth_alive();
int bpa_alive(void) { return bpa_up() && eth_alive(); }


x86 assembly (clang, -O0):
<bpa_alive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <bpa_up@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1152 <bpa_alive+0x32>
mov    $0x0,%al
call   1030 <eth_alive@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpa_alive>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <bpa_up@plt>
test   %rax,%rax
je     113e <bpa_alive+0x1e>
xor    %eax,%eax
call   1030 <eth_alive@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bpa_alive() {
%1 = call i64 (...) @bpa_up()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 (...) @eth_alive()
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @bpa_alive() {
%1 = tail call i64 (...) @bpa_up()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 (...) @eth_alive()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
int int_div(int a, long b) { return a / b; }


x86 assembly (clang, -O0):
<int_div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rax
cqto
idivq  -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_div>:
movslq %edi,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <int_div+0x15>
cqto
idiv   %rsi
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i32 @int_div(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i64, i64* %4
%8 = sdiv i64 %6, %7
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @int_div(i32 %0, i64 %1) {
%3 = sext i32 %0 to i64
%4 = sdiv i64 %3, %1
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ reset_treader();
void Reset_Tiff_Reader() { reset_treader(); }


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

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

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

LLVM IR (-O2):
define void @Reset_Tiff_Reader() {
%1 = tail call i32 (...) @reset_treader()
ret void
}
/* Variables and functions */
double fabs(double);
int is(double val) { return fabs(val) > 0.01; }


x86 assembly (clang, -O0):
<is>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xedf(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is>:
andpd  0xef8(%rip),%xmm0
xor    %eax,%eax
ucomisd 0xefe(%rip),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @is(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fabs.f64(double %3)
%5 = fcmp ogt double %4, 1.000000e-02
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp ogt double %2, 1.000000e-02
%4 = zext i1 %3 to i32
ret i32 %4
}
void gtk_text_view_set_right_margin() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_set_right_margin() {
ret void
}
void rop3_15_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = ~T;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_15_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_15_1_0>:
or     %esi,%edx
not    %dl
mov    (%rdi),%al
and    %sil,%al
or     %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_15_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = xor i32 %9, -1
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8, i8* %7
%13 = zext i8 %12 to i32
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = xor i32 %15, -1
%17 = and i32 %13, %16
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = and i32 %20, %22
%24 = or i32 %17, %23
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %4
store i8 %25, i8* %26
ret void
}

LLVM IR (-O2):
define void @rop3_15_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = and i8 %6, %1
%8 = or i8 %7, %5
store i8 %8, i8* %0
ret void
}
void foo_1_2_1_2_2_2_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_2_2_2_2_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_prime(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("n=");
  scanf("%d", &n);
  is_prime(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <is_prime@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"n=\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @is_prime(i32 %5)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int i2c_read_leuint08(int, int, int, int *);
int i2c_write_leuint08(int, int, int, int);
int SetLED_BUZZ(int bus, int chip_addr, uint8_t Value) {
  uint8_t GPIOstatus;
  int err;
  err = i2c_read_leuint08(bus, chip_addr, 0x13, &GPIOstatus);
  if (err == 1) {
    err =
        i2c_write_leuint08(bus, chip_addr, 0x01, (~Value & GPIOstatus) | 0xE0);
  }
  return err;
}


x86 assembly (clang, -O0):
<SetLED_BUZZ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x13,%edx
lea    -0x10(%rbp),%rcx
call   1030 <i2c_read_leuint08@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1174 <SetLED_BUZZ+0x54>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0x10(%rbp),%ecx
or     $0xe0,%ecx
mov    $0x1,%edx
call   1040 <i2c_write_leuint08@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetLED_BUZZ>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
lea    0xc(%rsp),%rcx
mov    $0x13,%edx
call   1030 <i2c_read_leuint08@plt>
cmp    $0x1,%eax
jne    1160 <SetLED_BUZZ+0x40>
not    %ebx
and    0xc(%rsp),%ebx
or     $0xe0,%ebx
mov    %ebp,%edi
mov    %r14d,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
call   1040 <i2c_write_leuint08@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @SetLED_BUZZ(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 @i2c_read_leuint08(i32 %9, i32 %10, i32 19, i32* %7)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %23
14: ; preds = %3
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = xor i32 %17, -1
%19 = load i32, i32* %7
%20 = and i32 %18, %19
%21 = or i32 %20, 224
%22 = call i32 @i2c_write_leuint08(i32 %15, i32 %16, i32 1, i32 %21)
store i32 %22, i32* %8
br label %23
23: ; preds = %14, %3
%24 = load i32, i32* %8
ret i32 %24
}

LLVM IR (-O2):
define i32 @SetLED_BUZZ(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @i2c_read_leuint08(i32 %0, i32 %1, i32 19, i32* %4)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = xor i32 %2, -1
%10 = load i32, i32* %4
%11 = and i32 %10, %9
%12 = or i32 %11, 224
%13 = call i32 @i2c_write_leuint08(i32 %0, i32 %1, i32 1, i32 %12)
br label %14
14: ; preds = %8, %3
%15 = phi i32 [ %13, %8 ], [ %6, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ OS_ClearPeriodicTime();
int /*<<< orphan*/ UART_OutString(char *);
void term_ClearClock(void) {
  UART_OutString("\n\rResetting Time Counter...");
  OS_ClearPeriodicTime();
  UART_OutString("done.\n\r");
}


x86 assembly (clang, -O0):
<term_ClearClock>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <UART_OutString@plt>
mov    $0x0,%al
call   1040 <OS_ClearPeriodicTime@plt>
lea    0xede(%rip),%rdi
call   1030 <UART_OutString@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_ClearClock>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <UART_OutString@plt>
xor    %eax,%eax
call   1040 <OS_ClearPeriodicTime@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <UART_OutString@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0A\0DResetting Time Counter...\00"
@.str.1 = [8 x i8] c"done.\0A\0D\00"
define void @term_ClearClock() {
%1 = call i32 @UART_OutString(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @OS_ClearPeriodicTime()
%3 = call i32 @UART_OutString(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A\0DResetting Time Counter...\00"
@.str.1 = [8 x i8] c"done.\0A\0D\00"
define void @term_ClearClock() {
%1 = tail call i32 @UART_OutString(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @OS_ClearPeriodicTime()
%3 = tail call i32 @UART_OutString(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void __down_write(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<__down_write>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__down_write>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.__down_write = [13 x i8] c"__down_write\00"
define void @__down_write() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.__down_write, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.__down_write = [13 x i8] c"__down_write\00"
define void @__down_write() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.__down_write, i64 0, i64 0))
ret void
}
RX0AR1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((p0[x0]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<RX0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x28(%rbp),%rcx
cmp    0x10f444(%rcx),%eax
ja     113f <RX0AR1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <RX0AR1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0AR1>:
movslq %edx,%rax
mov    (%r8,%rax,4),%ecx
xor    %eax,%eax
cmp    0x10f444(%r9),%ecx
setbe  %al
ret

LLVM IR (-O0):
define i32 @RX0AR1(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*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %12
%15 = load i32, i32* %10
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32*, i32** %13
%20 = getelementptr inbounds i32, i32* %19, i64 277777
%21 = load i32, i32* %20
%22 = icmp ule i32 %18, %21
br i1 %22, label %23, label %24
23: ; preds = %6
store i32 1, i32* %7
br label %25
24: ; preds = %6
store i32 0, i32* %7
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @RX0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %5, i64 277777
%11 = load i32, i32* %10
%12 = icmp ule i32 %9, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
int getent(char *cp, char *name) {
  (void)cp;
  (void)name;
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @getent(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
ret i32 0
}

LLVM IR (-O2):
define i32 @getent(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
double d2f(double x, double y, double z) { return 0; }


x86 assembly (clang, -O0):
<d2f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2f>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @d2f(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @d2f(double %0, double %1, double %2) {
ret double 0.000000e+00
}
double d2phiarea(const double x) { return 1.0; }


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

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

LLVM IR (-O0):
define double @d2phiarea(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @d2phiarea(double %0) {
ret double 1.000000e+00
}
/* Variables and functions */
int getColumnaConflictoEnFila(int **, int, int);
int tieneConflictoEnEstaFila(int sudoku[9][9], int ii, int candidato) {
  if (getColumnaConflictoEnFila(sudoku, ii, candidato) != -1) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<tieneConflictoEnEstaFila>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <getColumnaConflictoEnFila@plt>
cmp    $0xffffffff,%eax
je     1146 <tieneConflictoEnEstaFila+0x36>
movl   $0x1,-0x4(%rbp)
jmp    114d <tieneConflictoEnEstaFila+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tieneConflictoEnEstaFila>:
push   %rax
call   1030 <getColumnaConflictoEnFila@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tieneConflictoEnEstaFila([9 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [9 x i32]*
%6 = alloca i32
%7 = alloca i32
store [9 x i32]* %0, [9 x i32]** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load [9 x i32]*, [9 x i32]** %5
%9 = bitcast [9 x i32]* %8 to i32**
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @getColumnaConflictoEnFila(i32** %9, i32 %10, i32 %11)
%13 = icmp ne i32 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 1, i32* %4
br label %16
15: ; preds = %3
store i32 0, i32* %4
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @tieneConflictoEnEstaFila([9 x i32]* %0, i32 %1, i32 %2) {
%4 = bitcast [9 x i32]* %0 to i32**
%5 = tail call i32 @getColumnaConflictoEnFila(i32** %4, i32 %1, i32 %2)
%6 = icmp ne i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}
long round1(float x) { return (long)(x + 0.5); }


x86 assembly (clang, -O0):
<round1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round1>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @round1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fptosi double %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @round1(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, 5.000000e-01
%4 = fptosi double %3 to i64
ret i64 %4
}
int replace_quote(char *str) {
  while (*str != '\0') {
    if (*str == '\"')
      *str = '\'';
    str++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<replace_quote>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <replace_quote+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    112f <replace_quote+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x27,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <replace_quote+0x8>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace_quote>:
jmp    1117 <replace_quote+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x27,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x22,%al
je     1110 <replace_quote+0x10>
test   %al,%al
jne    1113 <replace_quote+0x13>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @replace_quote(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 34, label %5
]
5: ; preds = %2
store i8 39, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret i32 0
}
/* Variables and functions */
int p_fnmatchx(char const *, char const *, int, int);
int p_fnmatch(const char *pattern, const char *string, int flags) {
  return p_fnmatchx(pattern, string, flags, 64);
}


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

x86 assembly (clang, -O2):
<p_fnmatch>:
mov    $0x40,%ecx
jmp    1030 <p_fnmatchx@plt>

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

LLVM IR (-O2):
define i32 @p_fnmatch(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @p_fnmatchx(i8* %0, i8* %1, i32 %2, i32 64)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ send_string(char const *);
void bbs_help() {
  const static char help_text[] =
      "Available commands:\n"
      "\t(L)ist [thread-id]\n"
      "\t\tList all threads, or messages in a thread\n"
      "\t(P)ost [thread-id]\n"
      "\t\tPost a new thread, or a reply to a thread\n"
      "\t(R)ead message-id\n"
      "\t\tGet message contents\n"
      "\t(H)elp\n"
      "\t\tThis screen\n";
  send_string(help_text);
}


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

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

LLVM IR (-O0):
@bbs_help.help_text = internal constant [213 x i8] c"Available commands:\0A\09(L)ist [thread-id]\0A\09\09List all threads, or messages in a thread\0A\09(P)ost [thread-id]\0A\09\09Post a new thread, or a reply to a thread\0A\09(R)ead message-id\0A\09\09Get message contents\0A\09(H)elp\0A\09\09This screen\0A\00"
define void @bbs_help() {
%1 = call i32 @send_string(i8* getelementptr inbounds ([213 x i8], [213 x i8]* @bbs_help.help_text, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@bbs_help.help_text = internal constant [213 x i8] c"Available commands:\0A\09(L)ist [thread-id]\0A\09\09List all threads, or messages in a thread\0A\09(P)ost [thread-id]\0A\09\09Post a new thread, or a reply to a thread\0A\09(R)ead message-id\0A\09\09Get message contents\0A\09(H)elp\0A\09\09This screen\0A\00"
define void @bbs_help() {
%1 = tail call i32 @send_string(i8* getelementptr inbounds ([213 x i8], [213 x i8]* @bbs_help.help_text, i64 0, i64 0))
ret void
}
void rcu_idle_count_callbacks_posted(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_idle_count_callbacks_posted() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENET_DriverIRQHandler();
__attribute__((weak)) void ENET_IRQHandler(void) { ENET_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @ENET_IRQHandler() {
%1 = call i32 (...) @ENET_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ENET_IRQHandler() {
%1 = tail call i32 (...) @ENET_DriverIRQHandler()
ret void
}
int test_imm_B4uint8_reg(unsigned char val) {
  return ((val) & (-0xB4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B4uint8_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, -180
%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_B4uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 76
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
scalar_t__ fileTooBig(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
off_t truncBytes32(off_t off) {
  if (fileTooBig(off)) {
    fprintf(stderr, "Internal error, offset too big\n");
    return off;
  }
  return (off_t)off;
}


x86 assembly (clang, -O0):
<truncBytes32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fileTooBig@plt>
cmp    $0x0,%rax
je     115d <truncBytes32+0x3d>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <truncBytes32+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncBytes32>:
push   %rbx
mov    %edi,%ebx
call   1040 <fileTooBig@plt>
test   %rax,%rax
je     1142 <truncBytes32+0x22>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Internal error, offset too big\0A\00"
define i32 @truncBytes32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @fileTooBig(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %3
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Internal error, offset too big\0A\00"
define i32 @truncBytes32(i32 returned %0) {
%2 = tail call i64 @fileTooBig(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %4
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void axt_close(int sd) { close(sd); }


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

x86 assembly (clang, -O2):
<axt_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @axt_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(char const *s) {
  int len;
  len = 0;
  if (!s)
    return;
  while (s[len])
    len++;
  write(1, s, len);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1133 <ft_putstr+0x23>
jmp    1169 <ft_putstr+0x59>
jmp    1138 <ft_putstr+0x28>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1158 <ft_putstr+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <ft_putstr+0x28>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
test   %rdi,%rdi
je     1137 <ft_putstr+0x27>
mov    %rdi,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr+0x10>
add    $0xffffffff,%edx
mov    $0x1,%edi
jmp    1030 <write@plt>
ret

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

LLVM IR (-O2):
define void @ft_putstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
%11 = tail call i32 @write(i32 1, i8* %0, i32 %10)
br label %12
12: ; preds = %1, %9
ret void
}
const char *player_get_last_chaned_time_info(void) { return " Unknow "; }


x86 assembly (clang, -O0):
<player_get_last_chaned_time_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<player_get_last_chaned_time_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c" Unknow \00"
define i8* @player_get_last_chaned_time_info() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c" Unknow \00"
define i8* @player_get_last_chaned_time_info() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int nlz(int /*<<< orphan*/);
size_t bitw(uint64_t u) { return 64 - nlz(u) + !u; }


x86 assembly (clang, -O0):
<bitw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <nlz@plt>
mov    %eax,%ecx
mov    $0x40,%eax
sub    %ecx,%eax
cmpl   $0x0,-0x4(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitw>:
push   %rbx
mov    %edi,%ebx
call   1030 <nlz@plt>
xor    %ecx,%ecx
test   %ebx,%ebx
sete   %cl
sub    %eax,%ecx
add    $0x40,%ecx
movslq %ecx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @bitw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @nlz(i32 %3)
%5 = sub nsw i32 64, %4
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = add nsw i32 %5, %9
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
define i64 @bitw(i32 %0) {
%2 = tail call i32 @nlz(i32 %0)
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 65, i32 64
%5 = sub i32 %4, %2
%6 = sext i32 %5 to i64
ret i64 %6
}
OP(fd, d5) { op_d5(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_d5()
ret i32 undef
}
void myth_log_flush_body(void) {}


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

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

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

LLVM IR (-O2):
define void @myth_log_flush_body() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ViewLog();
int main() {
  ViewLog();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ViewLog()
ret i32 0
}
/* Variables and functions */
int iscntrl(int c) { return (((unsigned int)c < 32u) || (c == 127)); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1120 <iscntrl+0x20>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setb   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct rtnl_handle {
  int dummy;
};

/* Variables and functions */
scalar_t__ rtnl_receive(struct rtnl_handle *);
int rtnl_receive_multi(struct rtnl_handle *rtnl_handle) {
  while (1) {
    if (rtnl_receive(rtnl_handle) <= 0)
      break;
  }
  return 1;
}


x86 assembly (clang, -O0):
<rtnl_receive_multi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rtnl_receive@plt>
cmp    $0x0,%rax
jg     1134 <rtnl_receive_multi+0x24>
jmp    1139 <rtnl_receive_multi+0x29>
jmp    111c <rtnl_receive_multi+0xc>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtnl_receive_multi>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <rtnl_receive@plt>
test   %rax,%rax
jg     1120 <rtnl_receive_multi+0x10>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rtnl_handle = type { i32 }
define i32 @rtnl_receive_multi(%struct.rtnl_handle* %0) {
%2 = alloca %struct.rtnl_handle*
store %struct.rtnl_handle* %0, %struct.rtnl_handle** %2
br label %3
3: ; preds = %1, %8
%4 = load %struct.rtnl_handle*, %struct.rtnl_handle** %2
%5 = call i64 @rtnl_receive(%struct.rtnl_handle* %4)
%6 = icmp sle i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %9
8: ; preds = %3
br label %3
9: ; preds = %7
ret i32 1
}

LLVM IR (-O2):
%struct.rtnl_handle = type { i32 }
define i32 @rtnl_receive_multi(%struct.rtnl_handle* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 @rtnl_receive(%struct.rtnl_handle* %0)
%4 = icmp slt i64 %3, 1
br i1 %4, label %5, label %2
5: ; preds = %2
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ GENERAL_NAME;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ GENERAL_NAME_it;
GENERAL_NAME *GENERAL_NAME_new(void) {
  return (GENERAL_NAME *)ASN1_item_new(&GENERAL_NAME_it);
}


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

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

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

LLVM IR (-O2):
@GENERAL_NAME_it = global i32 0
define i32* @GENERAL_NAME_new() {
%1 = tail call i64 @ASN1_item_new(i32* @GENERAL_NAME_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
void ldbl_canonicalize(double *a, double *aa) {
  double xh, xl;
  xh = *a + *aa;
  xl = (*a - xh) + *aa;
  *a = xh;
  *aa = xl;
}


x86 assembly (clang, -O0):
<ldbl_canonicalize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldbl_canonicalize>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm2,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @ldbl_canonicalize(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%7 = load double*, double** %3
%8 = load double, double* %7
%9 = load double*, double** %4
%10 = load double, double* %9
%11 = fadd double %8, %10
store double %11, double* %5
%12 = load double*, double** %3
%13 = load double, double* %12
%14 = load double, double* %5
%15 = fsub double %13, %14
%16 = load double*, double** %4
%17 = load double, double* %16
%18 = fadd double %15, %17
store double %18, double* %6
%19 = load double, double* %5
%20 = load double*, double** %3
store double %19, double* %20
%21 = load double, double* %6
%22 = load double*, double** %4
store double %21, double* %22
ret void
}

LLVM IR (-O2):
define void @ldbl_canonicalize(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fadd double %3, %4
%6 = fsub double %3, %5
%7 = fadd double %4, %6
store double %5, double* %0
store double %7, double* %1
ret void
}
/* Variables and functions */
bool nrf52_errata_40(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_40() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
wchar_t *__wcschr(const wchar_t *wcs, const wchar_t wc) {
  do
    if (*wcs == wc)
      return (wchar_t *)wcs;
  while (*wcs++ != L'\0');
  return NULL;
}


x86 assembly (clang, -O0):
<__wcschr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
jne    112a <__wcschr+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1150 <__wcschr+0x50>
jmp    112f <__wcschr+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,(%rax)
jne    110c <__wcschr+0xc>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wcschr>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rax),%rcx
cmp    %rsi,%rcx
je     1123 <__wcschr+0x23>
add    $0x8,%rax
test   %rcx,%rcx
jne    1110 <__wcschr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64* @__wcschr(i64* %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64* [ %0, %2 ], [ %8, %7 ]
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, %1
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i64, i64* %4, i64 1
%9 = icmp eq i64 %5, 0
br i1 %9, label %10, label %3
10: ; preds = %7, %3
%11 = phi i64* [ %4, %3 ], [ null, %7 ]
ret i64* %11
}
/* Variables and functions */
float atan(float);
float fabs(float);
float calculate_slope(float dist, float z1, float z2) {
  return atan(fabs(z1 - z2) / dist);
}


x86 assembly (clang, -O0):
<calculate_slope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
divss  -0x4(%rbp),%xmm0
call   1040 <atan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_slope>:
subss  %xmm2,%xmm1
andps  0xee5(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
jmp    1030 <atan@plt>

LLVM IR (-O0):
define float @calculate_slope(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %5
%8 = load float, float* %6
%9 = fsub float %7, %8
%10 = call float @fabs(float %9)
%11 = load float, float* %4
%12 = fdiv float %10, %11
%13 = call float @atan(float %12)
ret float %13
}

LLVM IR (-O2):
define float @calculate_slope(float %0, float %1, float %2) {
%4 = fsub float %1, %2
%5 = tail call float @llvm.fabs.f32(float %4)
%6 = fdiv float %5, %0
%7 = tail call float @atan(float %6)
ret float %7
}
void f76(void) {
  ({
    ({ 0; });
    ({ 0; });
    goto a;
    0;
  });
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f76>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f76() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
br label %9
9: ; preds = %0
store i32 0, i32* %4
%10 = load i32, i32* %4
store i32 0, i32* %5
%11 = load i32, i32* %5
store i32 0, i32* %6
%12 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @f76() {
ret void
}
char *sccsid(void) {
  return ("@(#)sysstat-"
          "8.1.5"
          ": "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/"
          "embedded_rootfs/pkg_addon/sysstat-8.1.5/mpstat.c"
          " compiled "
          "Mar 16 2022"
          " "
          "16:18:51");
}


x86 assembly (clang, -O0):
<sccsid>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sccsid>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [223 x i8] c"@(#)sysstat-8.1.5: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/embedded_rootfs/pkg_addon/sysstat-8.1.5/mpstat.c compiled Mar 16 2022 16:18:51\00"
define i8* @sccsid() {
ret i8* getelementptr inbounds ([223 x i8], [223 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [223 x i8] c"@(#)sysstat-8.1.5: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/embedded_rootfs/pkg_addon/sysstat-8.1.5/mpstat.c compiled Mar 16 2022 16:18:51\00"
define i8* @sccsid() {
ret i8* getelementptr inbounds ([223 x i8], [223 x i8]* @.str, i64 0, i64 0)
}