xunge/DecIR huggingface dataset:
short __ocl_clamp_short_short(short src, short minval, short maxval) {
  if (src < minval) {
    return minval;
  }
  if (src > maxval) {
    return maxval;
  }
  return src;
}


x86 assembly (clang, -O0):
<__ocl_clamp_short_short>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
movswl -0x4(%rbp),%eax
movswl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jge    1136 <__ocl_clamp_short_short+0x36>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115b <__ocl_clamp_short_short+0x5b>
movswl -0x4(%rbp),%eax
movswl -0x8(%rbp),%ecx
cmp    %ecx,%eax
jle    1153 <__ocl_clamp_short_short+0x53>
mov    -0x8(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    115b <__ocl_clamp_short_short+0x5b>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_clamp_short_short>:
cmp    %dx,%di
mov    %edi,%eax
cmovg  %edx,%eax
cmp    %si,%di
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define signext i16 @__ocl_clamp_short_short(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
store i16 %0, i16* %5
store i16 %1, i16* %6
store i16 %2, i16* %7
%8 = load i16, i16* %5
%9 = sext i16 %8 to i32
%10 = load i16, i16* %6
%11 = sext i16 %10 to i32
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i16, i16* %6
store i16 %14, i16* %4
br label %25
15: ; preds = %3
%16 = load i16, i16* %5
%17 = sext i16 %16 to i32
%18 = load i16, i16* %7
%19 = sext i16 %18 to i32
%20 = icmp sgt i32 %17, %19
br i1 %20, label %21, label %23
21: ; preds = %15
%22 = load i16, i16* %7
store i16 %22, i16* %4
br label %25
23: ; preds = %15
%24 = load i16, i16* %5
store i16 %24, i16* %4
br label %25
25: ; preds = %23, %21, %13
%26 = load i16, i16* %4
ret i16 %26
}

LLVM IR (-O2):
define signext i16 @__ocl_clamp_short_short(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = icmp slt i16 %0, %1
%5 = icmp sgt i16 %0, %2
%6 = select i1 %5, i16 %2, i16 %0
%7 = select i1 %4, i16 %1, i16 %6
ret i16 %7
}
/* Variables and functions */
int /*<<< orphan*/ ClearScr(unsigned int);
int /*<<< orphan*/ Lcd_PowerEnable(int /*<<< orphan*/, int);
int /*<<< orphan*/ Tft_Lcd_Init();
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ init_port();
int main() {
  unsigned int i = 0xff;
  init_port();
  Tft_Lcd_Init();
  Lcd_PowerEnable(0, 1);
  (*(volatile unsigned long *)0x4d000000) |= 1;
  while (1) {
    i++;
    ClearScr(i);
    delay(5);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xff,-0x8(%rbp)
mov    $0x0,%al
call   1060 <init_port@plt>
mov    $0x0,%al
call   1030 <Tft_Lcd_Init@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <Lcd_PowerEnable@plt>
mov    $0x4d000000,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0x4d000000,%eax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1070 <ClearScr@plt>
mov    $0x5,%edi
call   1050 <delay@plt>
jmp    1194 <main+0x44>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <init_port@plt>
xor    %eax,%eax
call   1030 <Tft_Lcd_Init@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <Lcd_PowerEnable@plt>
orq    $0x1,0x4d000000
4d 01
mov    $0x100,%ebx
nopl   0x0(%rax)
mov    %ebx,%edi
call   1070 <ClearScr@plt>
mov    $0x5,%edi
call   1050 <delay@plt>
add    $0x1,%ebx
jmp    1180 <main+0x30>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 255, i32* %2
%3 = call i32 (...) @init_port()
%4 = call i32 (...) @Tft_Lcd_Init()
%5 = call i32 @Lcd_PowerEnable(i32 0, i32 1)
%6 = load volatile i64, i64* inttoptr (i64 1291845632 to i64*)
%7 = or i64 %6, 1
store volatile i64 %7, i64* inttoptr (i64 1291845632 to i64*)
br label %8
8: ; preds = %0, %8
%9 = load i32, i32* %2
%10 = add i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @ClearScr(i32 %11)
%13 = call i32 @delay(i32 5)
br label %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init_port()
%2 = tail call i32 (...) @Tft_Lcd_Init()
%3 = tail call i32 @Lcd_PowerEnable(i32 0, i32 1)
%4 = load volatile i64, i64* inttoptr (i64 1291845632 to i64*)
%5 = or i64 %4, 1
store volatile i64 %5, i64* inttoptr (i64 1291845632 to i64*)
br label %6
6: ; preds = %6, %0
%7 = phi i32 [ 255, %0 ], [ %8, %6 ]
%8 = add i32 %7, 1
%9 = tail call i32 @ClearScr(i32 %8)
%10 = tail call i32 @delay(i32 5)
br label %6
}
void update_emuint_state(void) {}


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

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

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

LLVM IR (-O2):
define void @update_emuint_state() {
ret void
}
/* Variables and functions */
char *PICC_get_err_message(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, char *, int);
void PICC_crash(int errcode, char *file, int line) {
  printf("error: %s (%s %d)\n", PICC_get_err_message(errcode), file, line);
  exit(2);
}


x86 assembly (clang, -O0):
<PICC_crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <PICC_get_err_message@plt>
mov    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<PICC_crash>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1040 <PICC_get_err_message@plt>
lea    0xebc(%rip),%rdi
mov    %rax,%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"error: %s (%s %d)\0A\00"
define void @PICC_crash(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i8* @PICC_get_err_message(i32 %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"error: %s (%s %d)\0A\00"
define void @PICC_crash(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @PICC_get_err_message(i32 %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %1, i32 %2)
%6 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void error(char *e) {
  perror(e);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ usage();
int /*<<< orphan*/ warnx(char *, char const *);
void error(const char *message) {
  warnx("%s", message);
  usage();
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <warnx@plt>
mov    $0x0,%al
call   1040 <usage@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <warnx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <usage@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @usage()
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @error(i8* %0) {
%2 = tail call i32 @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @usage()
ret void
}
/* Variables and functions */
double floor(double);
double log(int);
double pow(int, double);
double largest_PoT_lte(double arg) {
  double l10 = log(arg) / log(10);
  double l10_fl = floor(l10);
  return pow(10, l10_fl);
}


x86 assembly (clang, -O0):
<largest_PoT_lte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%edi
call   1030 <log@plt>
movsd  %xmm0,-0x20(%rbp)
mov    $0xa,%edi
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <floor@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0xa,%edi
call   1040 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<largest_PoT_lte>:
push   %rax
cvttsd2si %xmm0,%edi
call   1030 <log@plt>
movsd  %xmm0,(%rsp)
mov    $0xa,%edi
call   1030 <log@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <floor@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <pow@plt>

LLVM IR (-O0):
define double @largest_PoT_lte(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i32
%7 = call double @log(i32 %6)
%8 = call double @log(i32 10)
%9 = fdiv double %7, %8
store double %9, double* %3
%10 = load double, double* %3
%11 = call double @llvm.floor.f64(double %10)
store double %11, double* %4
%12 = load double, double* %4
%13 = call double @pow(i32 10, double %12)
ret double %13
}

LLVM IR (-O2):
define double @largest_PoT_lte(double %0) {
%2 = fptosi double %0 to i32
%3 = tail call double @log(i32 %2)
%4 = tail call double @log(i32 10)
%5 = fdiv double %3, %4
%6 = tail call double @llvm.floor.f64(double %5)
%7 = tail call double @pow(i32 10, double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ check(int, int, int);
int /*<<< orphan*/ reg_set(int, int, int);
void _mul(int des, int src1, int src2) {
  check(des, 1, 1);
  check(src1, 0, 2);
  check(src2, 0, 3);
  int prod = src1 * src2;
  reg_set(0x1, des, prod);
  reg_set(0x0, 0x1, prod);
}


x86 assembly (clang, -O0):
<_mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <check@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <check@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <check@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1,%edi
call   1030 <reg_set@plt>
mov    -0x10(%rbp),%edx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <reg_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mul>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    $0x1,%esi
mov    $0x1,%edx
call   1040 <check@plt>
mov    %ebp,%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <check@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <check@plt>
imul   %ebp,%ebx
mov    $0x1,%edi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <reg_set@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <reg_set@plt>

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

LLVM IR (-O2):
define void @_mul(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @check(i32 %0, i32 1, i32 1)
%5 = tail call i32 @check(i32 %1, i32 0, i32 2)
%6 = tail call i32 @check(i32 %2, i32 0, i32 3)
%7 = mul nsw i32 %2, %1
%8 = tail call i32 @reg_set(i32 1, i32 %0, i32 %7)
%9 = tail call i32 @reg_set(i32 0, i32 1, i32 %7)
ret void
}
void ar5312_plat_time_init(void) {}


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

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

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

LLVM IR (-O2):
define void @ar5312_plat_time_init() {
ret void
}
/* Variables and functions */
int fls(unsigned int);
int get_count_order(unsigned int count) {
  int order;
  order = fls(count) - 1;
  if (count & (count - 1))
    order++;
  return order;
}


x86 assembly (clang, -O0):
<get_count_order>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <fls@plt>
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1146 <get_count_order+0x36>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_count_order>:
push   %rbx
mov    %edi,%ebx
call   1030 <fls@plt>
lea    -0x1(%rbx),%ecx
and    %ebx,%ecx
cmp    $0x1,%ecx
sbb    $0x0,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_count_order(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @fls(i32 %4)
%6 = sub nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = sub i32 %8, 1
%10 = and i32 %7, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %1
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_count_order(i32 %0) {
%2 = tail call i32 @fls(i32 %0)
%3 = tail call i32 @llvm.ctpop.i32(i32 %0)
%4 = icmp ult i32 %3, 2
%5 = sext i1 %4 to i32
%6 = add nsw i32 %2, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("suma: %d\n", 3 + 1);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"suma: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
void gtk_about_dialog_set_version() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_set_version() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_proxy {
  int dummy;
};
struct wl_data_offer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int, int /*<<< orphan*/,
                                    int /*<<< orphan*/);
void wl_data_offer_set_actions(struct wl_data_offer *wl_data_offer,
                               uint32_t dnd_actions,
                               uint32_t preferred_action) {
  wl_proxy_marshal((struct wl_proxy *)wl_data_offer, 4, dnd_actions,
                   preferred_action);
}


x86 assembly (clang, -O0):
<wl_data_offer_set_actions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x4,%esi
call   1030 <wl_proxy_marshal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_data_offer_set_actions>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x4,%esi
jmp    1030 <wl_proxy_marshal@plt>

LLVM IR (-O0):
%struct.wl_data_offer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_offer_set_actions(%struct.wl_data_offer* %0, i32 %1, i32 %2) {
%4 = alloca %struct.wl_data_offer*
%5 = alloca i32
%6 = alloca i32
store %struct.wl_data_offer* %0, %struct.wl_data_offer** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.wl_data_offer*, %struct.wl_data_offer** %4
%8 = bitcast %struct.wl_data_offer* %7 to %struct.wl_proxy*
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %8, i32 4, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.wl_data_offer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_offer_set_actions(%struct.wl_data_offer* %0, i32 %1, i32 %2) {
%4 = bitcast %struct.wl_data_offer* %0 to %struct.wl_proxy*
%5 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 4, i32 %1, i32 %2)
ret void
}
int platform_a() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @platform_a() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isspace(unsigned char);
int sasm_is_string_empty(const char *s) {
  while (*s != '\0') {
    if (!isspace((unsigned char)*s))
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<sasm_is_string_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <sasm_is_string_empty+0x4e>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114d <sasm_is_string_empty+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1165 <sasm_is_string_empty+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <sasm_is_string_empty+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sasm_is_string_empty>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <sasm_is_string_empty+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <sasm_is_string_empty+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <sasm_is_string_empty+0x20>
jmp    114b <sasm_is_string_empty+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sasm_is_string_empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isspace(i8 zeroext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ my_print_plan_level(int);
void my_print_plan_all(int max_time) {
  int i;
  for (i = 0; i <= max_time; i++)
    my_print_plan_level(i);
}


x86 assembly (clang, -O0):
<my_print_plan_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1144 <my_print_plan_all+0x34>
mov    -0x8(%rbp),%edi
call   1030 <my_print_plan_level@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <my_print_plan_all+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_print_plan_all>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
js     112e <my_print_plan_all+0x1e>
mov    %edi,%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <my_print_plan_level@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <my_print_plan_all+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @my_print_plan_all(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp sle i32 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* %3
%10 = call i32 @my_print_plan_level(i32 %9)
br label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @my_print_plan_all(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @my_print_plan_level(i32 %4)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test();
int main(int argc, char const *argv[]) {
  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 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <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 (...) @test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test()
ret i32 0
}
/* Variables and functions */
scalar_t__ DoMarker();
scalar_t__ ScreenMarker();
int DoAllMarker() {

  if (DoMarker() < 0) {
    return (-1);
  }
  while (ScreenMarker() >= 0)
    ;
  return (0);
}


x86 assembly (clang, -O0):
<DoAllMarker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <DoMarker@plt>
cmp    $0x0,%rax
jge    1145 <DoAllMarker+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <DoAllMarker+0x47>
jmp    114a <DoAllMarker+0x2a>
mov    $0x0,%al
call   1030 <ScreenMarker@plt>
cmp    $0x0,%rax
jl     1160 <DoAllMarker+0x40>
jmp    114a <DoAllMarker+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoAllMarker>:
push   %rbx
xor    %eax,%eax
call   1040 <DoMarker@plt>
test   %rax,%rax
js     113e <DoAllMarker+0x1e>
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1030 <ScreenMarker@plt>
test   %rax,%rax
jns    1130 <DoAllMarker+0x10>
jmp    1143 <DoAllMarker+0x23>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @DoAllMarker() {
%1 = alloca i32
%2 = call i64 (...) @DoMarker()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %11
5: ; preds = %0
br label %6
6: ; preds = %9, %5
%7 = call i64 (...) @ScreenMarker()
%8 = icmp sge i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %6
10: ; preds = %6
store i32 0, i32* %1
br label %11
11: ; preds = %10, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @DoAllMarker() {
%1 = tail call i64 (...) @DoMarker()
%2 = icmp slt i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @ScreenMarker()
%5 = icmp sgt i64 %4, -1
br i1 %5, label %3, label %6
6: ; preds = %3, %0
%7 = phi i32 [ -1, %0 ], [ 0, %3 ]
ret i32 %7
}
int get_plural_index(const int num_variants, const int n) {
  return n <= 0 ? num_variants
                : ((n - 1) < (num_variants) ? (n - 1) : (num_variants));
}


x86 assembly (clang, -O0):
<get_plural_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111f <get_plural_index+0x1f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <get_plural_index+0x48>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cmp    -0x4(%rbp),%eax
jge    113c <get_plural_index+0x3c>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <get_plural_index+0x42>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_plural_index>:
lea    -0x1(%rsi),%eax
cmp    %edi,%eax
cmovge %edi,%eax
test   %esi,%esi
cmovle %edi,%eax
ret

LLVM IR (-O0):
define i32 @get_plural_index(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %3
br label %21
9: ; preds = %2
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* %4
%16 = sub nsw i32 %15, 1
br label %19
17: ; preds = %9
%18 = load i32, i32* %3
br label %19
19: ; preds = %17, %14
%20 = phi i32 [ %16, %14 ], [ %18, %17 ]
br label %21
21: ; preds = %19, %7
%22 = phi i32 [ %8, %7 ], [ %20, %19 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @get_plural_index(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
%4 = add nsw i32 %1, -1
%5 = icmp slt i32 %4, %0
%6 = select i1 %5, i32 %4, i32 %0
%7 = select i1 %3, i32 %0, i32 %6
ret i32 %7
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dispose(struct list *);
int list_length(struct list *);
int main2(struct list *l) {
  int tmp = list_length(l);
  dispose(l);
  return 0;
}


x86 assembly (clang, -O0):
<main2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <list_length@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <dispose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_length@plt>
mov    %rbx,%rdi
call   1030 <dispose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.list = type { i32 }
define i32 @main2(%struct.list* %0) {
%2 = alloca %struct.list*
%3 = alloca i32
store %struct.list* %0, %struct.list** %2
%4 = load %struct.list*, %struct.list** %2
%5 = call i32 @list_length(%struct.list* %4)
store i32 %5, i32* %3
%6 = load %struct.list*, %struct.list** %2
%7 = call i32 @dispose(%struct.list* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.list = type { i32 }
define i32 @main2(%struct.list* %0) {
%2 = tail call i32 @list_length(%struct.list* %0)
%3 = tail call i32 @dispose(%struct.list* %0)
ret i32 0
}
void ft_get_values(char **data, char **dest, char **src, char **nb) {
  *dest = data[0];
  *src = data[1];
  *nb = data[2];
}


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

x86 assembly (clang, -O2):
<ft_get_values>:
mov    (%rdi),%rax
mov    %rax,(%rsi)
mov    0x8(%rdi),%rax
mov    %rax,(%rdx)
mov    0x10(%rdi),%rax
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @ft_get_values(i8** %0, i8** %1, i8** %2, i8** %3) {
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8**
store i8** %0, i8*** %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %6
store i8* %11, i8** %12
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %7
store i8* %15, i8** %16
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = load i8**, i8*** %8
store i8* %19, i8** %20
ret void
}

LLVM IR (-O2):
define void @ft_get_values(i8** nocapture %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2, i8** nocapture writeonly %3) {
%5 = load i8*, i8** %0
store i8* %5, i8** %1
%6 = getelementptr inbounds i8*, i8** %0, i64 1
%7 = load i8*, i8** %6
store i8* %7, i8** %2
%8 = getelementptr inbounds i8*, i8** %0, i64 2
%9 = load i8*, i8** %8
store i8* %9, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_test();
int /*<<< orphan*/ file_test(int, char **);
int /*<<< orphan*/ find_test();
int /*<<< orphan*/ json_create_test();
int /*<<< orphan*/ json_parser_test();
int main(int argc, char **argv) {
  file_test(argc, argv);
  create_test();
  find_test();
  json_create_test();
  json_parser_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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <file_test@plt>
mov    $0x0,%al
call   1030 <create_test@plt>
mov    $0x0,%al
call   1050 <find_test@plt>
mov    $0x0,%al
call   1070 <json_create_test@plt>
mov    $0x0,%al
call   1060 <json_parser_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <file_test@plt>
xor    %eax,%eax
call   1030 <create_test@plt>
xor    %eax,%eax
call   1050 <find_test@plt>
xor    %eax,%eax
call   1070 <json_create_test@plt>
xor    %eax,%eax
call   1060 <json_parser_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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @file_test(i32 %6, i8** %7)
%9 = call i32 (...) @create_test()
%10 = call i32 (...) @find_test()
%11 = call i32 (...) @json_create_test()
%12 = call i32 (...) @json_parser_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @file_test(i32 %0, i8** %1)
%4 = tail call i32 (...) @create_test()
%5 = tail call i32 (...) @find_test()
%6 = tail call i32 (...) @json_create_test()
%7 = tail call i32 (...) @json_parser_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void joe() {
  int b = 5678;
  printf("In joe()\n");
  {
    int c = 1234;
    printf("c = %d\n", c);
    goto outer;
    printf("uh-oh\n");
  }
outer:
  printf("done\n");
}


x86 assembly (clang, -O0):
<joe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x162e,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4d2,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<joe>:
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x4d2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"In joe()\0A\00"
@.str.1 = [8 x i8] c"c = %d\0A\00"
@.str.2 = [6 x i8] c"done\0A\00"
define void @joe() {
%1 = alloca i32
%2 = alloca i32
store i32 5678, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 1234, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"c = %d\0A\00"
@str = [9 x i8] c"In joe()\00"
@str.3 = [5 x i8] c"done\00"
define void @joe() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1234)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
int main() {
  int a = 1;
  int b = 2;
  const int *const_int_ptr = &a;
  int const *int_const_ptr = &a;
  const_int_ptr = &b;
  int_const_ptr = &b;
  printf("%d\n", *const_int_ptr);
  printf("%d\n", *int_const_ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
unsigned be_uint32_read(const void *ptr) {
  const unsigned char *ptr8 = (const unsigned char *)ptr;
  return (unsigned)ptr8[3] | (unsigned)ptr8[2] << 8 | (unsigned)ptr8[1] << 16 |
         (unsigned)ptr8[0] << 24;
}


x86 assembly (clang, -O0):
<be_uint32_read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @be_uint32_read(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = load i8, i8* %0
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %14, %17
ret i32 %18
}
void geom_CM2_cyl_rpz(double xm[], double xp[], double xc[], int dir) {
  xc[0] = 0.5 * (xm[0] + xp[0]);
  xc[1] = 0.5 * (xm[1] + xp[1]);
}


x86 assembly (clang, -O0):
<geom_CM2_cyl_rpz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm1
movsd  0xed5(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm1
movsd  0xeaf(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_CM2_cyl_rpz>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
movsd  0xef0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rdi),%xmm0
addsd  0x8(%rsi),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rdx)
ret

LLVM IR (-O0):
define void @geom_CM2_cyl_rpz(double* %0, double* %1, double* %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %6
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = fadd double %11, %14
%16 = fmul double 5.000000e-01, %15
%17 = load double*, double** %7
%18 = getelementptr inbounds double, double* %17, i64 0
store double %16, double* %18
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = load double*, double** %6
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double, double* %23
%25 = fadd double %21, %24
%26 = fmul double 5.000000e-01, %25
%27 = load double*, double** %7
%28 = getelementptr inbounds double, double* %27, i64 1
store double %26, double* %28
ret void
}

LLVM IR (-O2):
define void @geom_CM2_cyl_rpz(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2, i32 %3) {
%5 = load double, double* %0
%6 = load double, double* %1
%7 = fadd double %5, %6
%8 = fmul double %7, 5.000000e-01
store double %8, double* %2
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %1, i64 1
%12 = load double, double* %11
%13 = fadd double %10, %12
%14 = fmul double %13, 5.000000e-01
%15 = getelementptr inbounds double, double* %2, i64 1
store double %14, double* %15
ret void
}
int test_imm_42int64_lowword_mem(long long *val) {
  return ((*val) & (0x42 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_42int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 66
%6 = icmp ne i64 %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_42int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 66
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ refresh();
void update_screen(void) { refresh(); }


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

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

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

LLVM IR (-O2):
define void @update_screen() {
%1 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
scalar_t__ cset82(unsigned char const *, int const, int /*<<< orphan*/, int,
                  int, int *, int *, char *);
int x1__10(const unsigned char *data, const int data_len, int *p_err_no,
           int *p_err_posn, char err_msg[50]) {
  return data_len >= 1 && data_len <= 10 &&
         cset82(data, data_len, 0, 1, 10, p_err_no, p_err_posn, err_msg);
}


x86 assembly (clang, -O0):
<x1__10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jl     1181 <x1__10+0x71>
xor    %eax,%eax
cmpl   $0xa,-0xc(%rbp)
mov    %al,-0x29(%rbp)
jg     1181 <x1__10+0x71>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%r9
mov    -0x20(%rbp),%r10
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0xa,%r8d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <cset82@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x1__10>:
mov    %rcx,%r10
lea    -0x1(%rsi),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
ja     114d <x1__10+0x3d>
push   %rax
mov    %r8,%r11
mov    %rdx,%r9
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0xa,%r8d
push   %r11
push   %r10
call   1030 <cset82@plt>
add    $0x10,%rsp
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @x1__10(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i8* %4, i8** %10
%11 = load i32, i32* %7
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %24
13: ; preds = %5
%14 = load i32, i32* %7
%15 = icmp sle i32 %14, 10
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = load i32*, i32** %8
%20 = load i32*, i32** %9
%21 = load i8*, i8** %10
%22 = call i64 @cset82(i8* %17, i32 %18, i32 0, i32 1, i32 10, i32* %19, i32* %20, i8* %21)
%23 = icmp ne i64 %22, 0
br label %24
24: ; preds = %16, %13, %5
%25 = phi i1 [ false, %13 ], [ false, %5 ], [ %23, %16 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @x1__10(i8* %0, i32 %1, i32* %2, i32* %3, i8* %4) {
%6 = add i32 %1, -1
%7 = icmp ult i32 %6, 10
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i64 @cset82(i8* %0, i32 %1, i32 0, i32 1, i32 10, i32* %2, i32* %3, i8* %4)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Type definitions */
struct VectorNumBase {
  int dummy;
};

/* Variables and functions */
char const **KeywordExtractorChar(struct VectorNumBase *);
const char **keyword_char(struct VectorNumBase *basev) {
  return KeywordExtractorChar(basev);
}


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

x86 assembly (clang, -O2):
<keyword_char>:
jmp    1030 <KeywordExtractorChar@plt>

LLVM IR (-O0):
%struct.VectorNumBase = type { i32 }
define i8** @keyword_char(%struct.VectorNumBase* %0) {
%2 = alloca %struct.VectorNumBase*
store %struct.VectorNumBase* %0, %struct.VectorNumBase** %2
%3 = load %struct.VectorNumBase*, %struct.VectorNumBase** %2
%4 = call i8** @KeywordExtractorChar(%struct.VectorNumBase* %3)
ret i8** %4
}

LLVM IR (-O2):
%struct.VectorNumBase = type { i32 }
define i8** @keyword_char(%struct.VectorNumBase* %0) {
%2 = tail call i8** @KeywordExtractorChar(%struct.VectorNumBase* %0)
ret i8** %2
}