void checaNumero(int *a, int *b) {
  printf("Entre com o 1o numero: ");
  scanf("%d", &a);
  printf("Entre com o 2o numero: ");
  scanf("%d", &b);
  if (a > b) {
    printf("%d eh maior", a);
  } else {
    printf("%d eh menor.", b);
  }
}


x86 assembly (clang, -O0):
<checaNumero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1195 <checaNumero+0x75>
mov    -0x8(%rbp),%rsi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a7 <checaNumero+0x87>
mov    -0x10(%rbp),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checaNumero>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
mov    %rsi,(%rsp)
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rsp),%rsi
mov    (%rsp),%rax
cmp    %rax,%rsi
jbe    1184 <checaNumero+0x64>
lea    0xeb1(%rip),%rdi
jmp    118e <checaNumero+0x6e>
lea    0xeb4(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Entre com o 1o numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Entre com o 2o numero: \00"
@.str.3 = [12 x i8] c"%d eh maior\00"
@.str.4 = [13 x i8] c"%d eh menor.\00"
define void @checaNumero(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %3)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %4)
%9 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = icmp ugt i32* %9, %10
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32*, i32** %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32* %13)
br label %18
15: ; preds = %2
%16 = load i32*, i32** %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32* %16)
br label %18
18: ; preds = %15, %12
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Entre com o 1o numero: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [24 x i8] c"Entre com o 2o numero: \00"
@.str.3 = [12 x i8] c"%d eh maior\00"
@.str.4 = [13 x i8] c"%d eh menor.\00"
define void @checaNumero(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32** %4)
%9 = load i32*, i32** %3
%10 = load i32*, i32** %4
%11 = icmp ugt i32* %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32* %9)
br label %16
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32* %10)
br label %16
16: ; preds = %14, %12
ret void
}