#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void implicit_conversion() {
  int a = -1;
  size_t b = -1;
  printf("int    a: %d, %lu, 0x%x\n", a);
  printf("size_t b: %d, %lu, 0x%x\n", b);
  if (a < 10) {
    printf("int    a < 10: TRUE\n");
  } else {
    printf("int    a < 10: FALSE\n");
  }
  if (b < 10) {
    printf("size_t b < 10: TRUE\n");
  } else {
    printf("size_t b < 10: FALSE\n");
  }
}


x86 assembly (clang, -O0):
<implicit_conversion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x4(%rbp),%esi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xa,-0x4(%rbp)
jge    1167 <implicit_conversion+0x57>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1175 <implicit_conversion+0x65>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0xa,-0x10(%rbp)
jae    1193 <implicit_conversion+0x83>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a1 <implicit_conversion+0x91>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<implicit_conversion>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0xffffffffffffffff,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"int a: %d, %lu, 0x%x\0A\00"
@.str.1 = [25 x i8] c"size_t b: %d, %lu, 0x%x\0A\00"
@.str.2 = [21 x i8] c"int a < 10: TRUE\0A\00"
@.str.3 = [22 x i8] c"int a < 10: FALSE\0A\00"
@.str.4 = [21 x i8] c"size_t b < 10: TRUE\0A\00"
@.str.5 = [22 x i8] c"size_t b < 10: FALSE\0A\00"
define void @implicit_conversion() {
%1 = alloca i32
%2 = alloca i64
store i32 -1, i32* %1
store i64 -1, i64* %2
%3 = load i32, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i64, i64* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 %5)
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i64, i64* %2
%15 = icmp ult i64 %14, 10
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %20
18: ; preds = %13
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"int a: %d, %lu, 0x%x\0A\00"
@.str.1 = [25 x i8] c"size_t b: %d, %lu, 0x%x\0A\00"
@str = [20 x i8] c"int a < 10: TRUE\00"
@str.6 = [21 x i8] c"size_t b < 10: FALSE\00"
define void @implicit_conversion() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 -1)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 -1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.6, i64 0, i64 0))
ret void
}